index.19345c3d.js 2.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. var Uae=Object.defineProperty;var qae=(t,e,n)=>e in t?Uae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Yae=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var JE=(t,e,n)=>(qae(t,typeof e!="symbol"?e+"":e,n),n);var bat=Yae((ks,Ps)=>{const Xae=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};Xae();function PM(t,e){const n=Object.create(null),r=t.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return e?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function mt(t){if(ut(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],i=At(r)?Jae(r):mt(r);if(i)for(const o in i)e[o]=i[o]}return e}else{if(At(t))return t;if(sn(t))return t}}const Zae=/;(?![^(]*\))/g,Gae=/:([^]+)/,Kae=/\/\*.*?\*\//gs;function Jae(t){const e={};return t.replace(Kae,"").split(Zae).forEach(n=>{if(n){const r=n.split(Gae);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function j(t){let e="";if(At(t))e=t;else if(ut(t))for(let n=0;n<t.length;n++){const r=j(t[n]);r&&(e+=r+" ")}else if(sn(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Xl(t){if(!t)return null;let{class:e,style:n}=t;return e&&!At(e)&&(t.class=j(e)),n&&(t.style=mt(n)),t}const ese="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tse=PM(ese);function Xj(t){return!!t||t===""}function nse(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=jg(t[r],e[r]);return n}function jg(t,e){if(t===e)return!0;let n=af(t),r=af(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Ky(t),r=Ky(e),n||r)return t===e;if(n=ut(t),r=ut(e),n||r)return n&&r?nse(t,e):!1;if(n=sn(t),r=sn(e),n||r){if(!n||!r)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const a in t){const s=t.hasOwnProperty(a),l=e.hasOwnProperty(a);if(s&&!l||!s&&l||!jg(t[a],e[a]))return!1}}return String(t)===String(e)}function Zj(t,e){return t.findIndex(n=>jg(n,e))}const je=t=>At(t)?t:t==null?"":ut(t)||sn(t)&&(t.toString===Kj||!$t(t.toString))?JSON.stringify(t,Gj,2):String(t),Gj=(t,e)=>e&&e.__v_isRef?Gj(t,e.value):xg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:nx(e)?{[`Set(${e.size})`]:[...e.values()]}:sn(e)&&!ut(e)&&!tw(e)?String(e):e,yi={},Sg=[],yr=()=>{},rse=()=>!1,ise=/^on[^a-z]/,tx=t=>ise.test(t),AM=t=>t.startsWith("onUpdate:"),yo=Object.assign,MM=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},ose=Object.prototype.hasOwnProperty,Dn=(t,e)=>ose.call(t,e),ut=Array.isArray,xg=t=>cb(t)==="[object Map]",nx=t=>cb(t)==="[object Set]",af=t=>cb(t)==="[object Date]",$t=t=>typeof t=="function",At=t=>typeof t=="string",Ky=t=>typeof t=="symbol",sn=t=>t!==null&&typeof t=="object",Jy=t=>sn(t)&&$t(t.then)&&$t(t.catch),Kj=Object.prototype.toString,cb=t=>Kj.call(t),u1=t=>cb(t).slice(8,-1),tw=t=>cb(t)==="[object Object]",RM=t=>At(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,c1=PM(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rx=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ase=/-(\w)/g,gl=rx(t=>t.replace(ase,(e,n)=>n?n.toUpperCase():"")),sse=/\B([A-Z])/g,Mf=rx(t=>t.replace(sse,"-$1").toLowerCase()),db=rx(t=>t.charAt(0).toUpperCase()+t.slice(1)),gy=rx(t=>t?`on${db(t)}`:""),e0=(t,e)=>!Object.is(t,e),d1=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},nw=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},Q2=t=>{const e=parseFloat(t);return isNaN(e)?t:e},lse=t=>{const e=At(t)?Number(t):NaN;return isNaN(e)?t:e};let m3;const use=()=>m3||(m3=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let ws;class Jj{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ws,!e&&ws&&(this.index=(ws.scopes||(ws.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=ws;try{return ws=this,e()}finally{ws=n}}}on(){ws=this}off(){ws=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function cse(t){return new Jj(t)}function dse(t,e=ws){e&&e.active&&e.effects.push(t)}function ez(){return ws}function tz(t){ws&&ws.cleanups.push(t)}const $M=t=>{const e=new Set(t);return e.w=0,e.n=0,e},nz=t=>(t.w&sf)>0,rz=t=>(t.n&sf)>0,fse=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=sf},hse=t=>{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r<e.length;r++){const i=e[r];nz(i)&&!rz(i)?i.delete(t):e[n++]=i,i.w&=~sf,i.n&=~sf}e.length=n}},rw=new WeakMap;let Kv=0,sf=1;const H2=30;let Ul;const Bh=Symbol(""),W2=Symbol("");class NM{constructor(e,n=null,r){this.fn=e,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,dse(this,r)}run(){if(!this.active)return this.fn();let e=Ul,n=Zd;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=Ul,Ul=this,Zd=!0,sf=1<<++Kv,Kv<=H2?fse(this):v3(this),this.fn()}finally{Kv<=H2&&hse(this),sf=1<<--Kv,Ul=this.parent,Zd=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Ul===this?this.deferStop=!0:this.active&&(v3(this),this.onStop&&this.onStop(),this.active=!1)}}function v3(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let Zd=!0;const iz=[];function Pm(){iz.push(Zd),Zd=!1}function Am(){const t=iz.pop();Zd=t===void 0?!0:t}function es(t,e,n){if(Zd&&Ul){let r=rw.get(t);r||rw.set(t,r=new Map);let i=r.get(n);i||r.set(n,i=$M()),oz(i)}}function oz(t,e){let n=!1;Kv<=H2?rz(t)||(t.n|=sf,n=!nz(t)):n=!t.has(Ul),n&&(t.add(Ul),Ul.deps.push(t))}function Qc(t,e,n,r,i,o){const a=rw.get(t);if(!a)return;let s=[];if(e==="clear")s=[...a.values()];else if(n==="length"&&ut(t)){const l=Number(r);a.forEach((u,c)=>{(c==="length"||c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),e){case"add":ut(t)?RM(n)&&s.push(a.get("length")):(s.push(a.get(Bh)),xg(t)&&s.push(a.get(W2)));break;case"delete":ut(t)||(s.push(a.get(Bh)),xg(t)&&s.push(a.get(W2)));break;case"set":xg(t)&&s.push(a.get(Bh));break}if(s.length===1)s[0]&&U2(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);U2($M(l))}}function U2(t,e){const n=ut(t)?t:[...t];for(const r of n)r.computed&&y3(r);for(const r of n)r.computed||y3(r)}function y3(t,e){(t!==Ul||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function pse(t,e){var n;return(n=rw.get(t))===null||n===void 0?void 0:n.get(e)}const gse=PM("__proto__,__v_isRef,__isVue"),az=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ky)),mse=DM(),vse=DM(!1,!0),yse=DM(!0),b3=bse();function bse(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Bn(this);for(let o=0,a=this.length;o<a;o++)es(r,"get",o+"");const i=r[e](...n);return i===-1||i===!1?r[e](...n.map(Bn)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){Pm();const r=Bn(this)[e].apply(this,n);return Am(),r}}),t}function _se(t){const e=Bn(this);return es(e,"has",t),e.hasOwnProperty(t)}function DM(t=!1,e=!1){return function(r,i,o){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&o===(t?e?Lse:dz:e?cz:uz).get(r))return r;const a=ut(r);if(!t){if(a&&Dn(b3,i))return Reflect.get(b3,i,o);if(i==="hasOwnProperty")return _se}const s=Reflect.get(r,i,o);return(Ky(i)?az.has(i):gse(i))||(t||es(r,"get",i),e)?s:kr(s)?a&&RM(i)?s:s.value:sn(s)?t?Mm(s):Sn(s):s}}const Ose=sz(),wse=sz(!0);function sz(t=!1){return function(n,r,i,o){let a=n[r];if(zg(a)&&kr(a)&&!kr(i))return!1;if(!t&&(!iw(i)&&!zg(i)&&(a=Bn(a),i=Bn(i)),!ut(n)&&kr(a)&&!kr(i)))return a.value=i,!0;const s=ut(n)&&RM(r)?Number(r)<n.length:Dn(n,r),l=Reflect.set(n,r,i,o);return n===Bn(o)&&(s?e0(i,a)&&Qc(n,"set",r,i):Qc(n,"add",r,i)),l}}function Sse(t,e){const n=Dn(t,e);t[e];const r=Reflect.deleteProperty(t,e);return r&&n&&Qc(t,"delete",e,void 0),r}function xse(t,e){const n=Reflect.has(t,e);return(!Ky(e)||!az.has(e))&&es(t,"has",e),n}function Cse(t){return es(t,"iterate",ut(t)?"length":Bh),Reflect.ownKeys(t)}const lz={get:mse,set:Ose,deleteProperty:Sse,has:xse,ownKeys:Cse},Ese={get:yse,set(t,e){return!0},deleteProperty(t,e){return!0}},Tse=yo({},lz,{get:vse,set:wse}),LM=t=>t,ix=t=>Reflect.getPrototypeOf(t);function z_(t,e,n=!1,r=!1){t=t.__v_raw;const i=Bn(t),o=Bn(e);n||(e!==o&&es(i,"get",e),es(i,"get",o));const{has:a}=ix(i),s=r?LM:n?FM:t0;if(a.call(i,e))return s(t.get(e));if(a.call(i,o))return s(t.get(o));t!==i&&t.get(e)}function Q_(t,e=!1){const n=this.__v_raw,r=Bn(n),i=Bn(t);return e||(t!==i&&es(r,"has",t),es(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function H_(t,e=!1){return t=t.__v_raw,!e&&es(Bn(t),"iterate",Bh),Reflect.get(t,"size",t)}function _3(t){t=Bn(t);const e=Bn(this);return ix(e).has.call(e,t)||(e.add(t),Qc(e,"add",t,t)),this}function O3(t,e){e=Bn(e);const n=Bn(this),{has:r,get:i}=ix(n);let o=r.call(n,t);o||(t=Bn(t),o=r.call(n,t));const a=i.call(n,t);return n.set(t,e),o?e0(e,a)&&Qc(n,"set",t,e):Qc(n,"add",t,e),this}function w3(t){const e=Bn(this),{has:n,get:r}=ix(e);let i=n.call(e,t);i||(t=Bn(t),i=n.call(e,t)),r&&r.call(e,t);const o=e.delete(t);return i&&Qc(e,"delete",t,void 0),o}function S3(){const t=Bn(this),e=t.size!==0,n=t.clear();return e&&Qc(t,"clear",void 0,void 0),n}function W_(t,e){return function(r,i){const o=this,a=o.__v_raw,s=Bn(a),l=e?LM:t?FM:t0;return!t&&es(s,"iterate",Bh),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function U_(t,e,n){return function(...r){const i=this.__v_raw,o=Bn(i),a=xg(o),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,u=i[t](...r),c=n?LM:e?FM:t0;return!e&&es(o,"iterate",l?W2:Bh),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Od(t){return function(...e){return t==="delete"?!1:this}}function kse(){const t={get(o){return z_(this,o)},get size(){return H_(this)},has:Q_,add:_3,set:O3,delete:w3,clear:S3,forEach:W_(!1,!1)},e={get(o){return z_(this,o,!1,!0)},get size(){return H_(this)},has:Q_,add:_3,set:O3,delete:w3,clear:S3,forEach:W_(!1,!0)},n={get(o){return z_(this,o,!0)},get size(){return H_(this,!0)},has(o){return Q_.call(this,o,!0)},add:Od("add"),set:Od("set"),delete:Od("delete"),clear:Od("clear"),forEach:W_(!0,!1)},r={get(o){return z_(this,o,!0,!0)},get size(){return H_(this,!0)},has(o){return Q_.call(this,o,!0)},add:Od("add"),set:Od("set"),delete:Od("delete"),clear:Od("clear"),forEach:W_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=U_(o,!1,!1),n[o]=U_(o,!0,!1),e[o]=U_(o,!1,!0),r[o]=U_(o,!0,!0)}),[t,n,e,r]}const[Pse,Ase,Mse,Rse]=kse();function IM(t,e){const n=e?t?Rse:Mse:t?Ase:Pse;return(r,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?r:Reflect.get(Dn(n,i)&&i in r?n:r,i,o)}const $se={get:IM(!1,!1)},Nse={get:IM(!1,!0)},Dse={get:IM(!0,!1)},uz=new WeakMap,cz=new WeakMap,dz=new WeakMap,Lse=new WeakMap;function Ise(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bse(t){return t.__v_skip||!Object.isExtensible(t)?0:Ise(u1(t))}function Sn(t){return zg(t)?t:BM(t,!1,lz,$se,uz)}function fz(t){return BM(t,!1,Tse,Nse,cz)}function Mm(t){return BM(t,!0,Ese,Dse,dz)}function BM(t,e,n,r,i){if(!sn(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const a=Bse(t);if(a===0)return t;const s=new Proxy(t,a===2?r:n);return i.set(t,s),s}function Cg(t){return zg(t)?Cg(t.__v_raw):!!(t&&t.__v_isReactive)}function zg(t){return!!(t&&t.__v_isReadonly)}function iw(t){return!!(t&&t.__v_isShallow)}function hz(t){return Cg(t)||zg(t)}function Bn(t){const e=t&&t.__v_raw;return e?Bn(e):t}function Bc(t){return nw(t,"__v_skip",!0),t}const t0=t=>sn(t)?Sn(t):t,FM=t=>sn(t)?Mm(t):t;function VM(t){Zd&&Ul&&(t=Bn(t),oz(t.dep||(t.dep=$M())))}function jM(t,e){t=Bn(t);const n=t.dep;n&&U2(n)}function kr(t){return!!(t&&t.__v_isRef===!0)}function F(t){return pz(t,!1)}function Tr(t){return pz(t,!0)}function pz(t,e){return kr(t)?t:new Fse(t,e)}class Fse{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Bn(e),this._value=n?e:t0(e)}get value(){return VM(this),this._value}set value(e){const n=this.__v_isShallow||iw(e)||zg(e);e=n?e:Bn(e),e0(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:t0(e),jM(this))}}function p(t){return kr(t)?t.value:t}const Vse={get:(t,e,n)=>p(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const i=t[e];return kr(i)&&!kr(n)?(i.value=n,!0):Reflect.set(t,e,n,r)}};function gz(t){return Cg(t)?t:new Proxy(t,Vse)}class jse{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=e(()=>VM(this),()=>jM(this));this._get=n,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function zse(t){return new jse(t)}function Ri(t){const e=ut(t)?new Array(t.length):{};for(const n in t)e[n]=er(t,n);return e}class Qse{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return pse(Bn(this._object),this._key)}}function er(t,e,n){const r=t[e];return kr(r)?r:new Qse(t,e,n)}var mz;class Hse{constructor(e,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[mz]=!1,this._dirty=!0,this.effect=new NM(e,()=>{this._dirty||(this._dirty=!0,jM(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const e=Bn(this);return VM(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}mz="__v_isReadonly";function Wse(t,e,n=!1){let r,i;const o=$t(t);return o?(r=t,i=yr):(r=t.get,i=t.set),new Hse(r,i,o||!i,n)}function Use(t,...e){}function Gd(t,e,n,r){let i;try{i=r?t(...r):t()}catch(o){ox(o,e,n)}return i}function ul(t,e,n,r){if($t(t)){const o=Gd(t,e,n,r);return o&&Jy(o)&&o.catch(a=>{ox(a,e,n)}),o}const i=[];for(let o=0;o<t.length;o++)i.push(ul(t[o],e,n,r));return i}function ox(t,e,n,r=!0){const i=e?e.vnode:null;if(e){let o=e.parent;const a=e.proxy,s=n;for(;o;){const u=o.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](t,a,s)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){Gd(l,null,10,[t,a,s]);return}}qse(t,n,i,r)}function qse(t,e,n,r=!0){console.error(t)}let n0=!1,q2=!1;const ea=[];let Nu=0;const Eg=[];let Rc=null,gh=0;const vz=Promise.resolve();let zM=null;function Ot(t){const e=zM||vz;return t?e.then(this?t.bind(this):t):e}function Yse(t){let e=Nu+1,n=ea.length;for(;e<n;){const r=e+n>>>1;r0(ea[r])<t?e=r+1:n=r}return e}function QM(t){(!ea.length||!ea.includes(t,n0&&t.allowRecurse?Nu+1:Nu))&&(t.id==null?ea.push(t):ea.splice(Yse(t.id),0,t),yz())}function yz(){!n0&&!q2&&(q2=!0,zM=vz.then(_z))}function Xse(t){const e=ea.indexOf(t);e>Nu&&ea.splice(e,1)}function Zse(t){ut(t)?Eg.push(...t):(!Rc||!Rc.includes(t,t.allowRecurse?gh+1:gh))&&Eg.push(t),yz()}function x3(t,e=n0?Nu+1:0){for(;e<ea.length;e++){const n=ea[e];n&&n.pre&&(ea.splice(e,1),e--,n())}}function bz(t){if(Eg.length){const e=[...new Set(Eg)];if(Eg.length=0,Rc){Rc.push(...e);return}for(Rc=e,Rc.sort((n,r)=>r0(n)-r0(r)),gh=0;gh<Rc.length;gh++)Rc[gh]();Rc=null,gh=0}}const r0=t=>t.id==null?1/0:t.id,Gse=(t,e)=>{const n=r0(t)-r0(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function _z(t){q2=!1,n0=!0,ea.sort(Gse);const e=yr;try{for(Nu=0;Nu<ea.length;Nu++){const n=ea[Nu];n&&n.active!==!1&&Gd(n,null,14)}}finally{Nu=0,ea.length=0,bz(),n0=!1,zM=null,(ea.length||Eg.length)&&_z()}}function Kse(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||yi;let i=n;const o=e.startsWith("update:"),a=o&&e.slice(7);if(a&&a in r){const c=`${a==="modelValue"?"model":a}Modifiers`,{number:d,trim:f}=r[c]||yi;f&&(i=n.map(h=>At(h)?h.trim():h)),d&&(i=n.map(Q2))}let s,l=r[s=gy(e)]||r[s=gy(gl(e))];!l&&o&&(l=r[s=gy(Mf(e))]),l&&ul(l,t,6,i);const u=r[s+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,ul(u,t,6,i)}}function Oz(t,e,n=!1){const r=e.emitsCache,i=r.get(t);if(i!==void 0)return i;const o=t.emits;let a={},s=!1;if(!$t(t)){const l=u=>{const c=Oz(u,e,!0);c&&(s=!0,yo(a,c))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!s?(sn(t)&&r.set(t,null),null):(ut(o)?o.forEach(l=>a[l]=null):yo(a,o),sn(t)&&r.set(t,a),a)}function ax(t,e){return!t||!tx(e)?!1:(e=e.slice(2).replace(/Once$/,""),Dn(t,e[0].toLowerCase()+e.slice(1))||Dn(t,Mf(e))||Dn(t,e))}let Lo=null,sx=null;function ow(t){const e=Lo;return Lo=t,sx=t&&t.type.__scopeId||null,e}function Jse(t){sx=t}function ele(){sx=null}function z(t,e=Lo,n){if(!e||t._n)return t;const r=(...i)=>{r._d&&D3(-1);const o=ow(e);let a;try{a=t(...i)}finally{ow(o),r._d&&D3(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function eT(t){const{type:e,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[a],slots:s,attrs:l,emit:u,render:c,renderCache:d,data:f,setupState:h,ctx:m,inheritAttrs:g}=t;let y,b;const w=ow(t);try{if(n.shapeFlag&4){const S=i||r;y=Mu(c.call(S,S,d,o,h,f,m)),b=l}else{const S=e;y=Mu(S.length>1?S(o,{attrs:l,slots:s,emit:u}):S(o,null)),b=e.props?l:tle(l)}}catch(S){by.length=0,ox(S,t,1),y=B(oa)}let O=y;if(b&&g!==!1){const S=Object.keys(b),{shapeFlag:x}=O;S.length&&x&7&&(a&&S.some(AM)&&(b=nle(b,a)),O=Hc(O,b))}return n.dirs&&(O=Hc(O),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&(O.transition=n.transition),y=O,ow(w),y}const tle=t=>{let e;for(const n in t)(n==="class"||n==="style"||tx(n))&&((e||(e={}))[n]=t[n]);return e},nle=(t,e)=>{const n={};for(const r in t)(!AM(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function rle(t,e,n){const{props:r,children:i,component:o}=t,{props:a,children:s,patchFlag:l}=e,u=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?C3(r,a,u):!!a;if(l&8){const c=e.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(a[f]!==r[f]&&!ax(u,f))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===a?!1:r?a?C3(r,a,u):!0:!!a;return!1}function C3(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(e[o]!==t[o]&&!ax(n,o))return!0}return!1}function ile({vnode:t,parent:e},n){for(;e&&e.subTree===t;)(t=e.vnode).el=n,e=e.parent}const ole=t=>t.__isSuspense;function ale(t,e){e&&e.pendingBranch?ut(t)?e.effects.push(...t):e.effects.push(t):Zse(t)}function _n(t,e){if(ji){let n=ji.provides;const r=ji.parent&&ji.parent.provides;r===n&&(n=ji.provides=Object.create(r)),n[t]=e}}function ht(t,e,n=!1){const r=ji||Lo;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&t in i)return i[t];if(arguments.length>1)return n&&$t(e)?e.call(r.proxy):e}}function Bo(t,e){return HM(t,null,e)}const q_={};function Ve(t,e,n){return HM(t,e,n)}function HM(t,e,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:a}=yi){const s=ez()===(ji==null?void 0:ji.scope)?ji:null;let l,u=!1,c=!1;if(kr(t)?(l=()=>t.value,u=iw(t)):Cg(t)?(l=()=>t,r=!0):ut(t)?(c=!0,u=t.some(O=>Cg(O)||iw(O)),l=()=>t.map(O=>{if(kr(O))return O.value;if(Cg(O))return kh(O);if($t(O))return Gd(O,s,2)})):$t(t)?e?l=()=>Gd(t,s,2):l=()=>{if(!(s&&s.isUnmounted))return d&&d(),ul(t,s,3,[f])}:l=yr,e&&r){const O=l;l=()=>kh(O())}let d,f=O=>{d=b.onStop=()=>{Gd(O,s,4)}},h;if(s0)if(f=yr,e?n&&ul(e,s,3,[l(),c?[]:void 0,f]):l(),i==="sync"){const O=qle();h=O.__watcherHandles||(O.__watcherHandles=[])}else return yr;let m=c?new Array(t.length).fill(q_):q_;const g=()=>{if(!!b.active)if(e){const O=b.run();(r||u||(c?O.some((S,x)=>e0(S,m[x])):e0(O,m)))&&(d&&d(),ul(e,s,3,[O,m===q_?void 0:c&&m[0]===q_?[]:m,f]),m=O)}else b.run()};g.allowRecurse=!!e;let y;i==="sync"?y=g:i==="post"?y=()=>Fa(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),y=()=>QM(g));const b=new NM(l,y);e?n?g():m=b.run():i==="post"?Fa(b.run.bind(b),s&&s.suspense):b.run();const w=()=>{b.stop(),s&&s.scope&&MM(s.scope.effects,b)};return h&&h.push(w),w}function sle(t,e,n){const r=this.proxy,i=At(t)?t.includes(".")?wz(r,t):()=>r[t]:t.bind(r,r);let o;$t(e)?o=e:(o=e.handler,n=e);const a=ji;Qg(this);const s=HM(i,o.bind(r),n);return a?Qg(a):Fh(),s}function wz(t,e){const n=e.split(".");return()=>{let r=t;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function kh(t,e){if(!sn(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),kr(t))kh(t.value,e);else if(ut(t))for(let n=0;n<t.length;n++)kh(t[n],e);else if(nx(t)||xg(t))t.forEach(n=>{kh(n,e)});else if(tw(t))for(const n in t)kh(t[n],e);return t}function Sz(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Bt(()=>{t.isMounted=!0}),pr(()=>{t.isUnmounting=!0}),t}const Ys=[Function,Array],lle={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ys,onEnter:Ys,onAfterEnter:Ys,onEnterCancelled:Ys,onBeforeLeave:Ys,onLeave:Ys,onAfterLeave:Ys,onLeaveCancelled:Ys,onBeforeAppear:Ys,onAppear:Ys,onAfterAppear:Ys,onAppearCancelled:Ys},setup(t,{slots:e}){const n=en(),r=Sz();let i;return()=>{const o=e.default&&WM(e.default(),!0);if(!o||!o.length)return;let a=o[0];if(o.length>1){for(const g of o)if(g.type!==oa){a=g;break}}const s=Bn(t),{mode:l}=s;if(r.isLeaving)return tT(a);const u=E3(a);if(!u)return tT(a);const c=i0(u,s,r,n);o0(u,c);const d=n.subTree,f=d&&E3(d);let h=!1;const{getTransitionKey:m}=u.type;if(m){const g=m();i===void 0?i=g:g!==i&&(i=g,h=!0)}if(f&&f.type!==oa&&(!mh(u,f)||h)){const g=i0(f,s,r,n);if(o0(f,g),l==="out-in")return r.isLeaving=!0,g.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},tT(a);l==="in-out"&&u.type!==oa&&(g.delayLeave=(y,b,w)=>{const O=Cz(r,f);O[String(f.key)]=f,y._leaveCb=()=>{b(),y._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=w})}return a}}},xz=lle;function Cz(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function i0(t,e,n,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:w}=e,O=String(t.key),S=Cz(n,t),x=(T,P)=>{T&&ul(T,r,9,P)},C=(T,P)=>{const A=P[1];x(T,P),ut(T)?T.every(D=>D.length<=1)&&A():T.length<=1&&A()},E={mode:o,persisted:a,beforeEnter(T){let P=s;if(!n.isMounted)if(i)P=g||s;else return;T._leaveCb&&T._leaveCb(!0);const A=S[O];A&&mh(t,A)&&A.el._leaveCb&&A.el._leaveCb(),x(P,[T])},enter(T){let P=l,A=u,D=c;if(!n.isMounted)if(i)P=y||l,A=b||u,D=w||c;else return;let N=!1;const $=T._enterCb=W=>{N||(N=!0,W?x(D,[T]):x(A,[T]),E.delayedLeave&&E.delayedLeave(),T._enterCb=void 0)};P?C(P,[T,$]):$()},leave(T,P){const A=String(t.key);if(T._enterCb&&T._enterCb(!0),n.isUnmounting)return P();x(d,[T]);let D=!1;const N=T._leaveCb=$=>{D||(D=!0,P(),$?x(m,[T]):x(h,[T]),T._leaveCb=void 0,S[A]===t&&delete S[A])};S[A]=t,f?C(f,[T,N]):N()},clone(T){return i0(T,e,n,r)}};return E}function tT(t){if(lx(t))return t=Hc(t),t.children=null,t}function E3(t){return lx(t)?t.children?t.children[0]:void 0:t}function o0(t,e){t.shapeFlag&6&&t.component?o0(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 WM(t,e=!1,n){let r=[],i=0;for(let o=0;o<t.length;o++){let a=t[o];const s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===ct?(a.patchFlag&128&&i++,r=r.concat(WM(a.children,e,s))):(e||a.type!==oa)&&r.push(s!=null?Hc(a,{key:s}):a)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}function ue(t){return $t(t)?{setup:t,name:t.name}:t}const my=t=>!!t.type.__asyncLoader,lx=t=>t.type.__isKeepAlive;function UM(t,e){Tz(t,"a",e)}function Ez(t,e){Tz(t,"da",e)}function Tz(t,e,n=ji){const r=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(ux(e,r,n),n){let i=n.parent;for(;i&&i.parent;)lx(i.parent.vnode)&&ule(r,e,n,i),i=i.parent}}function ule(t,e,n,r){const i=ux(e,t,r,!0);ed(()=>{MM(r[e],i)},n)}function ux(t,e,n=ji,r=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...a)=>{if(n.isUnmounted)return;Pm(),Qg(n);const s=ul(e,n,t,a);return Fh(),Am(),s});return r?i.unshift(o):i.push(o),o}}const Kc=t=>(e,n=ji)=>(!s0||t==="sp")&&ux(t,(...r)=>e(...r),n),cx=Kc("bm"),Bt=Kc("m"),kz=Kc("bu"),Jc=Kc("u"),pr=Kc("bum"),ed=Kc("um"),cle=Kc("sp"),dle=Kc("rtg"),fle=Kc("rtc");function hle(t,e=ji){ux("ec",t,e)}function Ht(t,e){const n=Lo;if(n===null)return t;const r=hx(n)||n.proxy,i=t.dirs||(t.dirs=[]);for(let o=0;o<e.length;o++){let[a,s,l,u=yi]=e[o];a&&($t(a)&&(a={mounted:a,updated:a}),a.deep&&kh(s),i.push({dir:a,instance:r,value:s,oldValue:void 0,arg:l,modifiers:u}))}return t}function ih(t,e,n,r){const i=t.dirs,o=e&&e.dirs;for(let a=0;a<i.length;a++){const s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(Pm(),ul(l,n,8,[t.el,s,t,e]),Am())}}const qM="components",ple="directives";function an(t,e){return YM(qM,t,!0,e)||t}const Pz=Symbol();function un(t){return At(t)?YM(qM,t,!1)||t:t||Pz}function dx(t){return YM(ple,t)}function YM(t,e,n=!0,r=!1){const i=Lo||ji;if(i){const o=i.type;if(t===qM){const s=Hle(o,!1);if(s&&(s===e||s===gl(e)||s===db(gl(e))))return o}const a=T3(i[t]||o[t],e)||T3(i.appContext[t],e);return!a&&r?o:a}}function T3(t,e){return t&&(t[e]||t[gl(e)]||t[db(gl(e))])}function Wt(t,e,n,r){let i;const o=n&&n[r];if(ut(t)||At(t)){i=new Array(t.length);for(let a=0,s=t.length;a<s;a++)i[a]=e(t[a],a,void 0,o&&o[a])}else if(typeof t=="number"){i=new Array(t);for(let a=0;a<t;a++)i[a]=e(a+1,a,void 0,o&&o[a])}else if(sn(t))if(t[Symbol.iterator])i=Array.from(t,(a,s)=>e(a,s,void 0,o&&o[s]));else{const a=Object.keys(t);i=new Array(a.length);for(let s=0,l=a.length;s<l;s++){const u=a[s];i[s]=e(t[u],u,s,o&&o[s])}}else i=[];return n&&(n[r]=i),i}function ts(t,e){for(let n=0;n<e.length;n++){const r=e[n];if(ut(r))for(let i=0;i<r.length;i++)t[r[i].name]=r[i].fn;else r&&(t[r.name]=r.key?(...i)=>{const o=r.fn(...i);return o&&(o.key=r.key),o}:r.fn)}return t}function xe(t,e,n={},r,i){if(Lo.isCE||Lo.parent&&my(Lo.parent)&&Lo.parent.isCE)return e!=="default"&&(n.name=e),B("slot",n,r&&r());let o=t[e];o&&o._c&&(o._d=!1),R();const a=o&&Az(o(n)),s=we(ct,{key:n.key||a&&a.key||`_${e}`},a||(r?r():[]),a&&t._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function Az(t){return t.some(e=>Kr(e)?!(e.type===oa||e.type===ct&&!Az(e.children)):!0)?t:null}function gle(t,e){const n={};for(const r in t)n[e&&/[A-Z]/.test(r)?`on:${r}`:gy(r)]=t[r];return n}const Y2=t=>t?jz(t)?hx(t)||t.proxy:Y2(t.parent):null,vy=yo(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=>Y2(t.parent),$root:t=>Y2(t.root),$emit:t=>t.emit,$options:t=>XM(t),$forceUpdate:t=>t.f||(t.f=()=>QM(t.update)),$nextTick:t=>t.n||(t.n=Ot.bind(t.proxy)),$watch:t=>sle.bind(t)}),nT=(t,e)=>t!==yi&&!t.__isScriptSetup&&Dn(t,e),mle={get({_:t},e){const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=t;let u;if(e[0]!=="$"){const h=a[e];if(h!==void 0)switch(h){case 1:return r[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(nT(r,e))return a[e]=1,r[e];if(i!==yi&&Dn(i,e))return a[e]=2,i[e];if((u=t.propsOptions[0])&&Dn(u,e))return a[e]=3,o[e];if(n!==yi&&Dn(n,e))return a[e]=4,n[e];X2&&(a[e]=0)}}const c=vy[e];let d,f;if(c)return e==="$attrs"&&es(t,"get",e),c(t);if((d=s.__cssModules)&&(d=d[e]))return d;if(n!==yi&&Dn(n,e))return a[e]=4,n[e];if(f=l.config.globalProperties,Dn(f,e))return f[e]},set({_:t},e,n){const{data:r,setupState:i,ctx:o}=t;return nT(i,e)?(i[e]=n,!0):r!==yi&&Dn(r,e)?(r[e]=n,!0):Dn(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||t!==yi&&Dn(t,a)||nT(e,a)||(s=o[0])&&Dn(s,a)||Dn(r,a)||Dn(vy,a)||Dn(i.config.globalProperties,a)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Dn(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};let X2=!0;function vle(t){const e=XM(t),n=t.proxy,r=t.ctx;X2=!1,e.beforeCreate&&k3(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:g,deactivated:y,beforeDestroy:b,beforeUnmount:w,destroyed:O,unmounted:S,render:x,renderTracked:C,renderTriggered:E,errorCaptured:T,serverPrefetch:P,expose:A,inheritAttrs:D,components:N,directives:$,filters:W}=e;if(u&&yle(u,r,null,t.appContext.config.unwrapInjectedRef),a)for(const U in a){const Q=a[U];$t(Q)&&(r[U]=Q.bind(n))}if(i){const U=i.call(n,n);sn(U)&&(t.data=Sn(U))}if(X2=!0,o)for(const U in o){const Q=o[U],V=$t(Q)?Q.bind(n,n):$t(Q.get)?Q.get.bind(n,n):yr,q=!$t(Q)&&$t(Q.set)?Q.set.bind(n):yr,K=M({get:V,set:q});Object.defineProperty(r,U,{enumerable:!0,configurable:!0,get:()=>K.value,set:ie=>K.value=ie})}if(s)for(const U in s)Mz(s[U],r,n,U);if(l){const U=$t(l)?l.call(n):l;Reflect.ownKeys(U).forEach(Q=>{_n(Q,U[Q])})}c&&k3(c,t,"c");function I(U,Q){ut(Q)?Q.forEach(V=>U(V.bind(n))):Q&&U(Q.bind(n))}if(I(cx,d),I(Bt,f),I(kz,h),I(Jc,m),I(UM,g),I(Ez,y),I(hle,T),I(fle,C),I(dle,E),I(pr,w),I(ed,S),I(cle,P),ut(A))if(A.length){const U=t.exposed||(t.exposed={});A.forEach(Q=>{Object.defineProperty(U,Q,{get:()=>n[Q],set:V=>n[Q]=V})})}else t.exposed||(t.exposed={});x&&t.render===yr&&(t.render=x),D!=null&&(t.inheritAttrs=D),N&&(t.components=N),$&&(t.directives=$)}function yle(t,e,n=yr,r=!1){ut(t)&&(t=Z2(t));for(const i in t){const o=t[i];let a;sn(o)?"default"in o?a=ht(o.from||i,o.default,!0):a=ht(o.from||i):a=ht(o),kr(a)&&r?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):e[i]=a}}function k3(t,e,n){ul(ut(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function Mz(t,e,n,r){const i=r.includes(".")?wz(n,r):()=>n[r];if(At(t)){const o=e[t];$t(o)&&Ve(i,o)}else if($t(t))Ve(i,t.bind(n));else if(sn(t))if(ut(t))t.forEach(o=>Mz(o,e,n,r));else{const o=$t(t.handler)?t.handler.bind(n):e[t.handler];$t(o)&&Ve(i,o,t)}}function XM(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=t.appContext,s=o.get(e);let l;return s?l=s:!i.length&&!n&&!r?l=e:(l={},i.length&&i.forEach(u=>aw(l,u,a,!0)),aw(l,e,a)),sn(e)&&o.set(e,l),l}function aw(t,e,n,r=!1){const{mixins:i,extends:o}=e;o&&aw(t,o,n,!0),i&&i.forEach(a=>aw(t,a,n,!0));for(const a in e)if(!(r&&a==="expose")){const s=ble[a]||n&&n[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const ble={data:P3,props:hh,emits:hh,methods:hh,computed:hh,beforeCreate:ma,created:ma,beforeMount:ma,mounted:ma,beforeUpdate:ma,updated:ma,beforeDestroy:ma,beforeUnmount:ma,destroyed:ma,unmounted:ma,activated:ma,deactivated:ma,errorCaptured:ma,serverPrefetch:ma,components:hh,directives:hh,watch:Ole,provide:P3,inject:_le};function P3(t,e){return e?t?function(){return yo($t(t)?t.call(this,this):t,$t(e)?e.call(this,this):e)}:e:t}function _le(t,e){return hh(Z2(t),Z2(e))}function Z2(t){if(ut(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function ma(t,e){return t?[...new Set([].concat(t,e))]:e}function hh(t,e){return t?yo(yo(Object.create(null),t),e):e}function Ole(t,e){if(!t)return e;if(!e)return t;const n=yo(Object.create(null),t);for(const r in e)n[r]=ma(t[r],e[r]);return n}function wle(t,e,n,r=!1){const i={},o={};nw(o,fx,1),t.propsDefaults=Object.create(null),Rz(t,e,i,o);for(const a in t.propsOptions[0])a in i||(i[a]=void 0);n?t.props=r?i:fz(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function Sle(t,e,n,r){const{props:i,attrs:o,vnode:{patchFlag:a}}=t,s=Bn(i),[l]=t.propsOptions;let u=!1;if((r||a>0)&&!(a&16)){if(a&8){const c=t.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(ax(t.emitsOptions,f))continue;const h=e[f];if(l)if(Dn(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const m=gl(f);i[m]=G2(l,s,m,h,t,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{Rz(t,e,i,o)&&(u=!0);let c;for(const d in s)(!e||!Dn(e,d)&&((c=Mf(d))===d||!Dn(e,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=G2(l,s,d,void 0,t,!0)):delete i[d]);if(o!==s)for(const d in o)(!e||!Dn(e,d)&&!0)&&(delete o[d],u=!0)}u&&Qc(t,"set","$attrs")}function Rz(t,e,n,r){const[i,o]=t.propsOptions;let a=!1,s;if(e)for(let l in e){if(c1(l))continue;const u=e[l];let c;i&&Dn(i,c=gl(l))?!o||!o.includes(c)?n[c]=u:(s||(s={}))[c]=u:ax(t.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,a=!0)}if(o){const l=Bn(n),u=s||yi;for(let c=0;c<o.length;c++){const d=o[c];n[d]=G2(i,l,d,u[d],t,!Dn(u,d))}}return a}function G2(t,e,n,r,i,o){const a=t[n];if(a!=null){const s=Dn(a,"default");if(s&&r===void 0){const l=a.default;if(a.type!==Function&&$t(l)){const{propsDefaults:u}=i;n in u?r=u[n]:(Qg(i),r=u[n]=l.call(null,e),Fh())}else r=l}a[0]&&(o&&!s?r=!1:a[1]&&(r===""||r===Mf(n))&&(r=!0))}return r}function $z(t,e,n=!1){const r=e.propsCache,i=r.get(t);if(i)return i;const o=t.props,a={},s=[];let l=!1;if(!$t(t)){const c=d=>{l=!0;const[f,h]=$z(d,e,!0);yo(a,f),h&&s.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!o&&!l)return sn(t)&&r.set(t,Sg),Sg;if(ut(o))for(let c=0;c<o.length;c++){const d=gl(o[c]);A3(d)&&(a[d]=yi)}else if(o)for(const c in o){const d=gl(c);if(A3(d)){const f=o[c],h=a[d]=ut(f)||$t(f)?{type:f}:Object.assign({},f);if(h){const m=$3(Boolean,h.type),g=$3(String,h.type);h[0]=m>-1,h[1]=g<0||m<g,(m>-1||Dn(h,"default"))&&s.push(d)}}}const u=[a,s];return sn(t)&&r.set(t,u),u}function A3(t){return t[0]!=="$"}function M3(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function R3(t,e){return M3(t)===M3(e)}function $3(t,e){return ut(e)?e.findIndex(n=>R3(n,t)):$t(e)&&R3(e,t)?0:-1}const Nz=t=>t[0]==="_"||t==="$stable",ZM=t=>ut(t)?t.map(Mu):[Mu(t)],xle=(t,e,n)=>{if(e._n)return e;const r=z((...i)=>ZM(e(...i)),n);return r._c=!1,r},Dz=(t,e,n)=>{const r=t._ctx;for(const i in t){if(Nz(i))continue;const o=t[i];if($t(o))e[i]=xle(i,o,r);else if(o!=null){const a=ZM(o);e[i]=()=>a}}},Lz=(t,e)=>{const n=ZM(e);t.slots.default=()=>n},Cle=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=Bn(e),nw(e,"_",n)):Dz(e,t.slots={})}else t.slots={},e&&Lz(t,e);nw(t.slots,fx,1)},Ele=(t,e,n)=>{const{vnode:r,slots:i}=t;let o=!0,a=yi;if(r.shapeFlag&32){const s=e._;s?n&&s===1?o=!1:(yo(i,e),!n&&s===1&&delete i._):(o=!e.$stable,Dz(e,i)),a=e}else e&&(Lz(t,e),a={default:1});if(o)for(const s in i)!Nz(s)&&!(s in a)&&delete i[s]};function Iz(){return{app:null,config:{isNativeTag:rse,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 Tle=0;function kle(t,e){return function(r,i=null){$t(r)||(r=Object.assign({},r)),i!=null&&!sn(i)&&(i=null);const o=Iz(),a=new Set;let s=!1;const l=o.app={_uid:Tle++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Yle,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&$t(u.install)?(a.add(u),u.install(l,...c)):$t(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,d){if(!s){const f=B(r,i);return f.appContext=o,c&&e?e(f,u):t(f,u,d),s=!0,l._container=u,u.__vue_app__=l,hx(f.component)||f.component.proxy}},unmount(){s&&(t(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l}};return l}}function K2(t,e,n,r,i=!1){if(ut(t)){t.forEach((f,h)=>K2(f,e&&(ut(e)?e[h]:e),n,r,i));return}if(my(r)&&!i)return;const o=r.shapeFlag&4?hx(r.component)||r.component.proxy:r.el,a=i?null:o,{i:s,r:l}=t,u=e&&e.r,c=s.refs===yi?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(At(u)?(c[u]=null,Dn(d,u)&&(d[u]=null)):kr(u)&&(u.value=null)),$t(l))Gd(l,s,12,[a,c]);else{const f=At(l),h=kr(l);if(f||h){const m=()=>{if(t.f){const g=f?Dn(d,l)?d[l]:c[l]:l.value;i?ut(g)&&MM(g,o):ut(g)?g.includes(o)||g.push(o):f?(c[l]=[o],Dn(d,l)&&(d[l]=c[l])):(l.value=[o],t.k&&(c[t.k]=l.value))}else f?(c[l]=a,Dn(d,l)&&(d[l]=a)):h&&(l.value=a,t.k&&(c[t.k]=a))};a?(m.id=-1,Fa(m,n)):m()}}}const Fa=ale;function Ple(t){return Ale(t)}function Ale(t,e){const n=use();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=yr,insertStaticContent:m}=t,g=(Z,ce,Te,Ie=null,ae=null,me=null,Ae=!1,X=null,ee=!!ce.dynamicChildren)=>{if(Z===ce)return;Z&&!mh(Z,ce)&&(Ie=re(Z),ie(Z,ae,me,!0),Z=null),ce.patchFlag===-2&&(ee=!1,ce.dynamicChildren=null);const{type:le,ref:Ce,shapeFlag:fe}=ce;switch(le){case Rm:y(Z,ce,Te,Ie);break;case oa:b(Z,ce,Te,Ie);break;case rT:Z==null&&w(ce,Te,Ie,Ae);break;case ct:N(Z,ce,Te,Ie,ae,me,Ae,X,ee);break;default:fe&1?x(Z,ce,Te,Ie,ae,me,Ae,X,ee):fe&6?$(Z,ce,Te,Ie,ae,me,Ae,X,ee):(fe&64||fe&128)&&le.process(Z,ce,Te,Ie,ae,me,Ae,X,ee,ge)}Ce!=null&&ae&&K2(Ce,Z&&Z.ref,me,ce||Z,!ce)},y=(Z,ce,Te,Ie)=>{if(Z==null)r(ce.el=s(ce.children),Te,Ie);else{const ae=ce.el=Z.el;ce.children!==Z.children&&u(ae,ce.children)}},b=(Z,ce,Te,Ie)=>{Z==null?r(ce.el=l(ce.children||""),Te,Ie):ce.el=Z.el},w=(Z,ce,Te,Ie)=>{[Z.el,Z.anchor]=m(Z.children,ce,Te,Ie,Z.el,Z.anchor)},O=({el:Z,anchor:ce},Te,Ie)=>{let ae;for(;Z&&Z!==ce;)ae=f(Z),r(Z,Te,Ie),Z=ae;r(ce,Te,Ie)},S=({el:Z,anchor:ce})=>{let Te;for(;Z&&Z!==ce;)Te=f(Z),i(Z),Z=Te;i(ce)},x=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{Ae=Ae||ce.type==="svg",Z==null?C(ce,Te,Ie,ae,me,Ae,X,ee):P(Z,ce,ae,me,Ae,X,ee)},C=(Z,ce,Te,Ie,ae,me,Ae,X)=>{let ee,le;const{type:Ce,props:fe,shapeFlag:Ee,transition:be,dirs:Be}=Z;if(ee=Z.el=a(Z.type,me,fe&&fe.is,fe),Ee&8?c(ee,Z.children):Ee&16&&T(Z.children,ee,null,Ie,ae,me&&Ce!=="foreignObject",Ae,X),Be&&ih(Z,null,Ie,"created"),E(ee,Z,Z.scopeId,Ae,Ie),fe){for(const Ke in fe)Ke!=="value"&&!c1(Ke)&&o(ee,Ke,null,fe[Ke],me,Z.children,Ie,ae,Y);"value"in fe&&o(ee,"value",null,fe.value),(le=fe.onVnodeBeforeMount)&&wu(le,Ie,Z)}Be&&ih(Z,null,Ie,"beforeMount");const Xe=(!ae||ae&&!ae.pendingBranch)&&be&&!be.persisted;Xe&&be.beforeEnter(ee),r(ee,ce,Te),((le=fe&&fe.onVnodeMounted)||Xe||Be)&&Fa(()=>{le&&wu(le,Ie,Z),Xe&&be.enter(ee),Be&&ih(Z,null,Ie,"mounted")},ae)},E=(Z,ce,Te,Ie,ae)=>{if(Te&&h(Z,Te),Ie)for(let me=0;me<Ie.length;me++)h(Z,Ie[me]);if(ae){let me=ae.subTree;if(ce===me){const Ae=ae.vnode;E(Z,Ae,Ae.scopeId,Ae.slotScopeIds,ae.parent)}}},T=(Z,ce,Te,Ie,ae,me,Ae,X,ee=0)=>{for(let le=ee;le<Z.length;le++){const Ce=Z[le]=X?Pd(Z[le]):Mu(Z[le]);g(null,Ce,ce,Te,Ie,ae,me,Ae,X)}},P=(Z,ce,Te,Ie,ae,me,Ae)=>{const X=ce.el=Z.el;let{patchFlag:ee,dynamicChildren:le,dirs:Ce}=ce;ee|=Z.patchFlag&16;const fe=Z.props||yi,Ee=ce.props||yi;let be;Te&&oh(Te,!1),(be=Ee.onVnodeBeforeUpdate)&&wu(be,Te,ce,Z),Ce&&ih(ce,Z,Te,"beforeUpdate"),Te&&oh(Te,!0);const Be=ae&&ce.type!=="foreignObject";if(le?A(Z.dynamicChildren,le,X,Te,Ie,Be,me):Ae||Q(Z,ce,X,null,Te,Ie,Be,me,!1),ee>0){if(ee&16)D(X,ce,fe,Ee,Te,Ie,ae);else if(ee&2&&fe.class!==Ee.class&&o(X,"class",null,Ee.class,ae),ee&4&&o(X,"style",fe.style,Ee.style,ae),ee&8){const Xe=ce.dynamicProps;for(let Ke=0;Ke<Xe.length;Ke++){const tt=Xe[Ke],Dt=fe[tt],jt=Ee[tt];(jt!==Dt||tt==="value")&&o(X,tt,Dt,jt,ae,Z.children,Te,Ie,Y)}}ee&1&&Z.children!==ce.children&&c(X,ce.children)}else!Ae&&le==null&&D(X,ce,fe,Ee,Te,Ie,ae);((be=Ee.onVnodeUpdated)||Ce)&&Fa(()=>{be&&wu(be,Te,ce,Z),Ce&&ih(ce,Z,Te,"updated")},Ie)},A=(Z,ce,Te,Ie,ae,me,Ae)=>{for(let X=0;X<ce.length;X++){const ee=Z[X],le=ce[X],Ce=ee.el&&(ee.type===ct||!mh(ee,le)||ee.shapeFlag&70)?d(ee.el):Te;g(ee,le,Ce,null,Ie,ae,me,Ae,!0)}},D=(Z,ce,Te,Ie,ae,me,Ae)=>{if(Te!==Ie){if(Te!==yi)for(const X in Te)!c1(X)&&!(X in Ie)&&o(Z,X,Te[X],null,Ae,ce.children,ae,me,Y);for(const X in Ie){if(c1(X))continue;const ee=Ie[X],le=Te[X];ee!==le&&X!=="value"&&o(Z,X,le,ee,Ae,ce.children,ae,me,Y)}"value"in Ie&&o(Z,"value",Te.value,Ie.value)}},N=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{const le=ce.el=Z?Z.el:s(""),Ce=ce.anchor=Z?Z.anchor:s("");let{patchFlag:fe,dynamicChildren:Ee,slotScopeIds:be}=ce;be&&(X=X?X.concat(be):be),Z==null?(r(le,Te,Ie),r(Ce,Te,Ie),T(ce.children,Te,Ce,ae,me,Ae,X,ee)):fe>0&&fe&64&&Ee&&Z.dynamicChildren?(A(Z.dynamicChildren,Ee,Te,ae,me,Ae,X),(ce.key!=null||ae&&ce===ae.subTree)&&GM(Z,ce,!0)):Q(Z,ce,Te,Ce,ae,me,Ae,X,ee)},$=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{ce.slotScopeIds=X,Z==null?ce.shapeFlag&512?ae.ctx.activate(ce,Te,Ie,Ae,ee):W(ce,Te,Ie,ae,me,Ae,ee):L(Z,ce,ee)},W=(Z,ce,Te,Ie,ae,me,Ae)=>{const X=Z.component=Vle(Z,Ie,ae);if(lx(Z)&&(X.ctx.renderer=ge),jle(X),X.asyncDep){if(ae&&ae.registerDep(X,I),!Z.el){const ee=X.subTree=B(oa);b(null,ee,ce,Te)}return}I(X,Z,ce,Te,ae,me,Ae)},L=(Z,ce,Te)=>{const Ie=ce.component=Z.component;if(rle(Z,ce,Te))if(Ie.asyncDep&&!Ie.asyncResolved){U(Ie,ce,Te);return}else Ie.next=ce,Xse(Ie.update),Ie.update();else ce.el=Z.el,Ie.vnode=ce},I=(Z,ce,Te,Ie,ae,me,Ae)=>{const X=()=>{if(Z.isMounted){let{next:Ce,bu:fe,u:Ee,parent:be,vnode:Be}=Z,Xe=Ce,Ke;oh(Z,!1),Ce?(Ce.el=Be.el,U(Z,Ce,Ae)):Ce=Be,fe&&d1(fe),(Ke=Ce.props&&Ce.props.onVnodeBeforeUpdate)&&wu(Ke,be,Ce,Be),oh(Z,!0);const tt=eT(Z),Dt=Z.subTree;Z.subTree=tt,g(Dt,tt,d(Dt.el),re(Dt),Z,ae,me),Ce.el=tt.el,Xe===null&&ile(Z,tt.el),Ee&&Fa(Ee,ae),(Ke=Ce.props&&Ce.props.onVnodeUpdated)&&Fa(()=>wu(Ke,be,Ce,Be),ae)}else{let Ce;const{el:fe,props:Ee}=ce,{bm:be,m:Be,parent:Xe}=Z,Ke=my(ce);if(oh(Z,!1),be&&d1(be),!Ke&&(Ce=Ee&&Ee.onVnodeBeforeMount)&&wu(Ce,Xe,ce),oh(Z,!0),fe&&$e){const tt=()=>{Z.subTree=eT(Z),$e(fe,Z.subTree,Z,ae,null)};Ke?ce.type.__asyncLoader().then(()=>!Z.isUnmounted&&tt()):tt()}else{const tt=Z.subTree=eT(Z);g(null,tt,Te,Ie,Z,ae,me),ce.el=tt.el}if(Be&&Fa(Be,ae),!Ke&&(Ce=Ee&&Ee.onVnodeMounted)){const tt=ce;Fa(()=>wu(Ce,Xe,tt),ae)}(ce.shapeFlag&256||Xe&&my(Xe.vnode)&&Xe.vnode.shapeFlag&256)&&Z.a&&Fa(Z.a,ae),Z.isMounted=!0,ce=Te=Ie=null}},ee=Z.effect=new NM(X,()=>QM(le),Z.scope),le=Z.update=()=>ee.run();le.id=Z.uid,oh(Z,!0),le()},U=(Z,ce,Te)=>{ce.component=Z;const Ie=Z.vnode.props;Z.vnode=ce,Z.next=null,Sle(Z,ce.props,Ie,Te),Ele(Z,ce.children,Te),Pm(),x3(),Am()},Q=(Z,ce,Te,Ie,ae,me,Ae,X,ee=!1)=>{const le=Z&&Z.children,Ce=Z?Z.shapeFlag:0,fe=ce.children,{patchFlag:Ee,shapeFlag:be}=ce;if(Ee>0){if(Ee&128){q(le,fe,Te,Ie,ae,me,Ae,X,ee);return}else if(Ee&256){V(le,fe,Te,Ie,ae,me,Ae,X,ee);return}}be&8?(Ce&16&&Y(le,ae,me),fe!==le&&c(Te,fe)):Ce&16?be&16?q(le,fe,Te,Ie,ae,me,Ae,X,ee):Y(le,ae,me,!0):(Ce&8&&c(Te,""),be&16&&T(fe,Te,Ie,ae,me,Ae,X,ee))},V=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{Z=Z||Sg,ce=ce||Sg;const le=Z.length,Ce=ce.length,fe=Math.min(le,Ce);let Ee;for(Ee=0;Ee<fe;Ee++){const be=ce[Ee]=ee?Pd(ce[Ee]):Mu(ce[Ee]);g(Z[Ee],be,Te,null,ae,me,Ae,X,ee)}le>Ce?Y(Z,ae,me,!0,!1,fe):T(ce,Te,Ie,ae,me,Ae,X,ee,fe)},q=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{let le=0;const Ce=ce.length;let fe=Z.length-1,Ee=Ce-1;for(;le<=fe&&le<=Ee;){const be=Z[le],Be=ce[le]=ee?Pd(ce[le]):Mu(ce[le]);if(mh(be,Be))g(be,Be,Te,null,ae,me,Ae,X,ee);else break;le++}for(;le<=fe&&le<=Ee;){const be=Z[fe],Be=ce[Ee]=ee?Pd(ce[Ee]):Mu(ce[Ee]);if(mh(be,Be))g(be,Be,Te,null,ae,me,Ae,X,ee);else break;fe--,Ee--}if(le>fe){if(le<=Ee){const be=Ee+1,Be=be<Ce?ce[be].el:Ie;for(;le<=Ee;)g(null,ce[le]=ee?Pd(ce[le]):Mu(ce[le]),Te,Be,ae,me,Ae,X,ee),le++}}else if(le>Ee)for(;le<=fe;)ie(Z[le],ae,me,!0),le++;else{const be=le,Be=le,Xe=new Map;for(le=Be;le<=Ee;le++){const Pe=ce[le]=ee?Pd(ce[le]):Mu(ce[le]);Pe.key!=null&&Xe.set(Pe.key,le)}let Ke,tt=0;const Dt=Ee-Be+1;let jt=!1,Me=0;const nt=new Array(Dt);for(le=0;le<Dt;le++)nt[le]=0;for(le=be;le<=fe;le++){const Pe=Z[le];if(tt>=Dt){ie(Pe,ae,me,!0);continue}let Le;if(Pe.key!=null)Le=Xe.get(Pe.key);else for(Ke=Be;Ke<=Ee;Ke++)if(nt[Ke-Be]===0&&mh(Pe,ce[Ke])){Le=Ke;break}Le===void 0?ie(Pe,ae,me,!0):(nt[Le-Be]=le+1,Le>=Me?Me=Le:jt=!0,g(Pe,ce[Le],Te,null,ae,me,Ae,X,ee),tt++)}const de=jt?Mle(nt):Sg;for(Ke=de.length-1,le=Dt-1;le>=0;le--){const Pe=Be+le,Le=ce[Pe],wt=Pe+1<Ce?ce[Pe+1].el:Ie;nt[le]===0?g(null,Le,Te,wt,ae,me,Ae,X,ee):jt&&(Ke<0||le!==de[Ke]?K(Le,Te,wt,2):Ke--)}}},K=(Z,ce,Te,Ie,ae=null)=>{const{el:me,type:Ae,transition:X,children:ee,shapeFlag:le}=Z;if(le&6){K(Z.component.subTree,ce,Te,Ie);return}if(le&128){Z.suspense.move(ce,Te,Ie);return}if(le&64){Ae.move(Z,ce,Te,ge);return}if(Ae===ct){r(me,ce,Te);for(let fe=0;fe<ee.length;fe++)K(ee[fe],ce,Te,Ie);r(Z.anchor,ce,Te);return}if(Ae===rT){O(Z,ce,Te);return}if(Ie!==2&&le&1&&X)if(Ie===0)X.beforeEnter(me),r(me,ce,Te),Fa(()=>X.enter(me),ae);else{const{leave:fe,delayLeave:Ee,afterLeave:be}=X,Be=()=>r(me,ce,Te),Xe=()=>{fe(me,()=>{Be(),be&&be()})};Ee?Ee(me,Be,Xe):Xe()}else r(me,ce,Te)},ie=(Z,ce,Te,Ie=!1,ae=!1)=>{const{type:me,props:Ae,ref:X,children:ee,dynamicChildren:le,shapeFlag:Ce,patchFlag:fe,dirs:Ee}=Z;if(X!=null&&K2(X,null,Te,Z,!0),Ce&256){ce.ctx.deactivate(Z);return}const be=Ce&1&&Ee,Be=!my(Z);let Xe;if(Be&&(Xe=Ae&&Ae.onVnodeBeforeUnmount)&&wu(Xe,ce,Z),Ce&6)ke(Z.component,Te,Ie);else{if(Ce&128){Z.suspense.unmount(Te,Ie);return}be&&ih(Z,null,ce,"beforeUnmount"),Ce&64?Z.type.remove(Z,ce,Te,ae,ge,Ie):le&&(me!==ct||fe>0&&fe&64)?Y(le,ce,Te,!1,!0):(me===ct&&fe&384||!ae&&Ce&16)&&Y(ee,ce,Te),Ie&&oe(Z)}(Be&&(Xe=Ae&&Ae.onVnodeUnmounted)||be)&&Fa(()=>{Xe&&wu(Xe,ce,Z),be&&ih(Z,null,ce,"unmounted")},Te)},oe=Z=>{const{type:ce,el:Te,anchor:Ie,transition:ae}=Z;if(ce===ct){Se(Te,Ie);return}if(ce===rT){S(Z);return}const me=()=>{i(Te),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(Z.shapeFlag&1&&ae&&!ae.persisted){const{leave:Ae,delayLeave:X}=ae,ee=()=>Ae(Te,me);X?X(Z.el,me,ee):ee()}else me()},Se=(Z,ce)=>{let Te;for(;Z!==ce;)Te=f(Z),i(Z),Z=Te;i(ce)},ke=(Z,ce,Te)=>{const{bum:Ie,scope:ae,update:me,subTree:Ae,um:X}=Z;Ie&&d1(Ie),ae.stop(),me&&(me.active=!1,ie(Ae,Z,ce,Te)),X&&Fa(X,ce),Fa(()=>{Z.isUnmounted=!0},ce),ce&&ce.pendingBranch&&!ce.isUnmounted&&Z.asyncDep&&!Z.asyncResolved&&Z.suspenseId===ce.pendingId&&(ce.deps--,ce.deps===0&&ce.resolve())},Y=(Z,ce,Te,Ie=!1,ae=!1,me=0)=>{for(let Ae=me;Ae<Z.length;Ae++)ie(Z[Ae],ce,Te,Ie,ae)},re=Z=>Z.shapeFlag&6?re(Z.component.subTree):Z.shapeFlag&128?Z.suspense.next():f(Z.anchor||Z.el),te=(Z,ce,Te)=>{Z==null?ce._vnode&&ie(ce._vnode,null,null,!0):g(ce._vnode||null,Z,ce,null,null,null,Te),x3(),bz(),ce._vnode=Z},ge={p:g,um:ie,m:K,r:oe,mt:W,mc:T,pc:Q,pbc:A,n:re,o:t};let Re,$e;return e&&([Re,$e]=e(ge)),{render:te,hydrate:Re,createApp:kle(te,Re)}}function oh({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function GM(t,e,n=!1){const r=t.children,i=e.children;if(ut(r)&&ut(i))for(let o=0;o<r.length;o++){const a=r[o];let s=i[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[o]=Pd(i[o]),s.el=a.el),n||GM(a,s)),s.type===Rm&&(s.el=a.el)}}function Mle(t){const e=t.slice(),n=[0];let r,i,o,a,s;const l=t.length;for(r=0;r<l;r++){const u=t[r];if(u!==0){if(i=n[n.length-1],t[i]<u){e[r]=i,n.push(r);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,t[n[s]]<u?o=s+1:a=s;u<t[n[o]]&&(o>0&&(e[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=e[a];return n}const Rle=t=>t.__isTeleport,yy=t=>t&&(t.disabled||t.disabled===""),N3=t=>typeof SVGElement!="undefined"&&t instanceof SVGElement,J2=(t,e)=>{const n=t&&t.to;return At(n)?e?e(n):null:n},$le={__isTeleport:!0,process(t,e,n,r,i,o,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:g,createComment:y}}=u,b=yy(e.props);let{shapeFlag:w,children:O,dynamicChildren:S}=e;if(t==null){const x=e.el=g(""),C=e.anchor=g("");h(x,n,r),h(C,n,r);const E=e.target=J2(e.props,m),T=e.targetAnchor=g("");E&&(h(T,E),a=a||N3(E));const P=(A,D)=>{w&16&&c(O,A,D,i,o,a,s,l)};b?P(n,C):E&&P(E,T)}else{e.el=t.el;const x=e.anchor=t.anchor,C=e.target=t.target,E=e.targetAnchor=t.targetAnchor,T=yy(t.props),P=T?n:C,A=T?x:E;if(a=a||N3(C),S?(f(t.dynamicChildren,S,P,i,o,a,s),GM(t,e,!0)):l||d(t,e,P,A,i,o,a,s,!1),b)T||Y_(e,n,x,u,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const D=e.target=J2(e.props,m);D&&Y_(e,D,null,u,0)}else T&&Y_(e,C,E,u,1)}Bz(e)},remove(t,e,n,r,{um:i,o:{remove:o}},a){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:d,props:f}=t;if(d&&o(c),(a||!yy(f))&&(o(u),s&16))for(let h=0;h<l.length;h++){const m=l[h];i(m,e,n,!0,!!m.dynamicChildren)}},move:Y_,hydrate:Nle};function Y_(t,e,n,{o:{insert:r},m:i},o=2){o===0&&r(t.targetAnchor,e,n);const{el:a,anchor:s,shapeFlag:l,children:u,props:c}=t,d=o===2;if(d&&r(a,e,n),(!d||yy(c))&&l&16)for(let f=0;f<u.length;f++)i(u[f],e,n,2);d&&r(s,e,n)}function Nle(t,e,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l}},u){const c=e.target=J2(e.props,l);if(c){const d=c._lpa||c.firstChild;if(e.shapeFlag&16)if(yy(e.props))e.anchor=u(a(t),e,s(t),n,r,i,o),e.targetAnchor=d;else{e.anchor=a(t);let f=d;for(;f;)if(f=a(f),f&&f.nodeType===8&&f.data==="teleport anchor"){e.targetAnchor=f,c._lpa=e.targetAnchor&&a(e.targetAnchor);break}u(d,e,c,n,r,i,o)}Bz(e)}return e.anchor&&a(e.anchor)}const Dle=$le;function Bz(t){const e=t.ctx;if(e&&e.ut){let n=t.children[0].el;for(;n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}const ct=Symbol(void 0),Rm=Symbol(void 0),oa=Symbol(void 0),rT=Symbol(void 0),by=[];let Zl=null;function R(t=!1){by.push(Zl=t?null:[])}function Lle(){by.pop(),Zl=by[by.length-1]||null}let a0=1;function D3(t){a0+=t}function Fz(t){return t.dynamicChildren=a0>0?Zl||Sg:null,Lle(),a0>0&&Zl&&Zl.push(t),t}function G(t,e,n,r,i,o){return Fz(J(t,e,n,r,i,o,!0))}function we(t,e,n,r,i){return Fz(B(t,e,n,r,i,!0))}function Kr(t){return t?t.__v_isVNode===!0:!1}function mh(t,e){return t.type===e.type&&t.key===e.key}const fx="__vInternal",Vz=({key:t})=>t!=null?t:null,f1=({ref:t,ref_key:e,ref_for:n})=>t!=null?At(t)||kr(t)||$t(t)?{i:Lo,r:t,k:e,f:!!n}:t:null;function J(t,e=null,n=null,r=0,i=null,o=t===ct?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Vz(e),ref:e&&f1(e),scopeId:sx,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Lo};return s?(KM(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=At(n)?8:16),a0>0&&!a&&Zl&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Zl.push(l),l}const B=Ile;function Ile(t,e=null,n=null,r=0,i=null,o=!1){if((!t||t===Pz)&&(t=oa),Kr(t)){const s=Hc(t,e,!0);return n&&KM(s,n),a0>0&&!o&&Zl&&(s.shapeFlag&6?Zl[Zl.indexOf(t)]=s:Zl.push(s)),s.patchFlag|=-2,s}if(Wle(t)&&(t=t.__vccOpts),e){e=lf(e);let{class:s,style:l}=e;s&&!At(s)&&(e.class=j(s)),sn(l)&&(hz(l)&&!ut(l)&&(l=yo({},l)),e.style=mt(l))}const a=At(t)?1:ole(t)?128:Rle(t)?64:sn(t)?4:$t(t)?2:0;return J(t,e,n,r,i,a,o,!0)}function lf(t){return t?hz(t)||fx in t?yo({},t):t:null}function Hc(t,e,n=!1){const{props:r,ref:i,patchFlag:o,children:a}=t,s=e?gn(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:s,key:s&&Vz(s),ref:e&&e.ref?n&&i?ut(i)?i.concat(f1(e)):[i,f1(e)]:f1(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ct?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Hc(t.ssContent),ssFallback:t.ssFallback&&Hc(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function qe(t=" ",e=0){return B(Rm,null,t,e)}function _e(t="",e=!1){return e?(R(),we(oa,null,t)):B(oa,null,t)}function Mu(t){return t==null||typeof t=="boolean"?B(oa):ut(t)?B(ct,null,t.slice()):typeof t=="object"?Pd(t):B(Rm,null,String(t))}function Pd(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Hc(t)}function KM(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(ut(e))n=16;else if(typeof e=="object")if(r&65){const i=e.default;i&&(i._c&&(i._d=!1),KM(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!(fx in e)?e._ctx=Lo:i===3&&Lo&&(Lo.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else $t(e)?(e={default:e,_ctx:Lo},n=32):(e=String(e),r&64?(n=16,e=[qe(e)]):n=8);t.children=e,t.shapeFlag|=n}function gn(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const i in r)if(i==="class")e.class!==r.class&&(e.class=j([e.class,r.class]));else if(i==="style")e.style=mt([e.style,r.style]);else if(tx(i)){const o=e[i],a=r[i];a&&o!==a&&!(ut(o)&&o.includes(a))&&(e[i]=o?[].concat(o,a):a)}else i!==""&&(e[i]=r[i])}return e}function wu(t,e,n,r=null){ul(t,e,7,[n,r])}const Ble=Iz();let Fle=0;function Vle(t,e,n){const r=t.type,i=(e?e.appContext:t.appContext)||Ble,o={uid:Fle++,vnode:t,type:r,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Jj(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$z(r,i),emitsOptions:Oz(r,i),emit:null,emitted:null,propsDefaults:yi,inheritAttrs:r.inheritAttrs,ctx:yi,data:yi,props:yi,attrs:yi,slots:yi,refs:yi,setupState:yi,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=Kse.bind(null,o),t.ce&&t.ce(o),o}let ji=null;const en=()=>ji||Lo,Qg=t=>{ji=t,t.scope.on()},Fh=()=>{ji&&ji.scope.off(),ji=null};function jz(t){return t.vnode.shapeFlag&4}let s0=!1;function jle(t,e=!1){s0=e;const{props:n,children:r}=t.vnode,i=jz(t);wle(t,n,i,e),Cle(t,r);const o=i?zle(t,e):void 0;return s0=!1,o}function zle(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Bc(new Proxy(t.ctx,mle));const{setup:r}=n;if(r){const i=t.setupContext=r.length>1?Qz(t):null;Qg(t),Pm();const o=Gd(r,t,0,[t.props,i]);if(Am(),Fh(),Jy(o)){if(o.then(Fh,Fh),e)return o.then(a=>{L3(t,a,e)}).catch(a=>{ox(a,t,0)});t.asyncDep=o}else L3(t,o,e)}else zz(t,e)}function L3(t,e,n){$t(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:sn(e)&&(t.setupState=gz(e)),zz(t,n)}let I3;function zz(t,e,n){const r=t.type;if(!t.render){if(!e&&I3&&!r.render){const i=r.template||XM(t).template;if(i){const{isCustomElement:o,compilerOptions:a}=t.appContext.config,{delimiters:s,compilerOptions:l}=r,u=yo(yo({isCustomElement:o,delimiters:s},a),l);r.render=I3(i,u)}}t.render=r.render||yr}Qg(t),Pm(),vle(t),Am(),Fh()}function Qle(t){return new Proxy(t.attrs,{get(e,n){return es(t,"get","$attrs"),e[n]}})}function Qz(t){const e=r=>{t.exposed=r||{}};let n;return{get attrs(){return n||(n=Qle(t))},slots:t.slots,emit:t.emit,expose:e}}function hx(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(gz(Bc(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in vy)return vy[n](t)},has(e,n){return n in e||n in vy}}))}function Hle(t,e=!0){return $t(t)?t.displayName||t.name:t.name||e&&t.__name}function Wle(t){return $t(t)&&"__vccOpts"in t}const M=(t,e)=>Wse(t,e,s0);function Ji(){return Hz().slots}function mp(){return Hz().attrs}function Hz(){const t=en();return t.setupContext||(t.setupContext=Qz(t))}function Et(t,e,n){const r=arguments.length;return r===2?sn(e)&&!ut(e)?Kr(e)?B(t,null,[e]):B(t,e):B(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Kr(n)&&(n=[n]),B(t,e,n))}const Ule=Symbol(""),qle=()=>ht(Ule),Yle="3.2.47",Xle="http://www.w3.org/2000/svg",vh=typeof document!="undefined"?document:null,B3=vh&&vh.createElement("template"),Zle={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const i=e?vh.createElementNS(Xle,t):vh.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:t=>vh.createTextNode(t),createComment:t=>vh.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>vh.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,i,o){const a=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{B3.innerHTML=r?`<svg>${t}</svg>`:t;const s=B3.content;if(r){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,n)}return[a?a.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function Gle(t,e,n){const r=t._vtc;r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function Kle(t,e,n){const r=t.style,i=At(n);if(n&&!i){if(e&&!At(e))for(const o in e)n[o]==null&&ek(r,o,"");for(const o in n)ek(r,o,n[o])}else{const o=r.display;i?e!==n&&(r.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(r.display=o)}}const F3=/\s*!important$/;function ek(t,e,n){if(ut(n))n.forEach(r=>ek(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=Jle(t,e);F3.test(n)?t.setProperty(Mf(r),n.replace(F3,""),"important"):t[r]=n}}const V3=["Webkit","Moz","ms"],iT={};function Jle(t,e){const n=iT[e];if(n)return n;let r=gl(e);if(r!=="filter"&&r in t)return iT[e]=r;r=db(r);for(let i=0;i<V3.length;i++){const o=V3[i]+r;if(o in t)return iT[e]=o}return e}const j3="http://www.w3.org/1999/xlink";function eue(t,e,n,r,i){if(r&&e.startsWith("xlink:"))n==null?t.removeAttributeNS(j3,e.slice(6,e.length)):t.setAttributeNS(j3,e,n);else{const o=tse(e);n==null||o&&!Xj(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)}}function tue(t,e,n,r,i,o,a){if(e==="innerHTML"||e==="textContent"){r&&a(r,i,o),t[e]=n==null?"":n;return}if(e==="value"&&t.tagName!=="PROGRESS"&&!t.tagName.includes("-")){t._value=n;const l=n==null?"":n;(t.value!==l||t.tagName==="OPTION")&&(t.value=l),n==null&&t.removeAttribute(e);return}let s=!1;if(n===""||n==null){const l=typeof t[e];l==="boolean"?n=Xj(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{t[e]=n}catch{}s&&t.removeAttribute(e)}function Ld(t,e,n,r){t.addEventListener(e,n,r)}function nue(t,e,n,r){t.removeEventListener(e,n,r)}function rue(t,e,n,r,i=null){const o=t._vei||(t._vei={}),a=o[e];if(r&&a)a.value=r;else{const[s,l]=iue(e);if(r){const u=o[e]=sue(r,i);Ld(t,s,u,l)}else a&&(nue(t,s,a,l),o[e]=void 0)}}const z3=/(?:Once|Passive|Capture)$/;function iue(t){let e;if(z3.test(t)){e={};let r;for(;r=t.match(z3);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Mf(t.slice(2)),e]}let oT=0;const oue=Promise.resolve(),aue=()=>oT||(oue.then(()=>oT=0),oT=Date.now());function sue(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;ul(lue(r,n.value),e,5,[r])};return n.value=t,n.attached=aue(),n}function lue(t,e){if(ut(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>i=>!i._stopped&&r&&r(i))}else return e}const Q3=/^on[a-z]/,uue=(t,e,n,r,i=!1,o,a,s,l)=>{e==="class"?Gle(t,r,i):e==="style"?Kle(t,n,r):tx(e)?AM(e)||rue(t,e,n,r,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):cue(t,e,r,i))?tue(t,e,r,o,a,s,l):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),eue(t,e,r,i))};function cue(t,e,n,r){return r?!!(e==="innerHTML"||e==="textContent"||e in t&&Q3.test(e)&&$t(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||Q3.test(e)&&At(n)?!1:e in t}const wd="transition",Av="animation",Qi=(t,{slots:e})=>Et(xz,Uz(t),e);Qi.displayName="Transition";const Wz={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},due=Qi.props=yo({},xz.props,Wz),ah=(t,e=[])=>{ut(t)?t.forEach(n=>n(...e)):t&&t(...e)},H3=t=>t?ut(t)?t.some(e=>e.length>1):t.length>1:!1;function Uz(t){const e={};for(const N in t)N in Wz||(e[N]=t[N]);if(t.css===!1)return e;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,m=fue(i),g=m&&m[0],y=m&&m[1],{onBeforeEnter:b,onEnter:w,onEnterCancelled:O,onLeave:S,onLeaveCancelled:x,onBeforeAppear:C=b,onAppear:E=w,onAppearCancelled:T=O}=e,P=(N,$,W)=>{xd(N,$?c:s),xd(N,$?u:a),W&&W()},A=(N,$)=>{N._isLeaving=!1,xd(N,d),xd(N,h),xd(N,f),$&&$()},D=N=>($,W)=>{const L=N?E:w,I=()=>P($,N,W);ah(L,[$,I]),W3(()=>{xd($,N?l:o),Mc($,N?c:s),H3(L)||U3($,r,g,I)})};return yo(e,{onBeforeEnter(N){ah(b,[N]),Mc(N,o),Mc(N,a)},onBeforeAppear(N){ah(C,[N]),Mc(N,l),Mc(N,u)},onEnter:D(!1),onAppear:D(!0),onLeave(N,$){N._isLeaving=!0;const W=()=>A(N,$);Mc(N,d),Yz(),Mc(N,f),W3(()=>{!N._isLeaving||(xd(N,d),Mc(N,h),H3(S)||U3(N,r,y,W))}),ah(S,[N,W])},onEnterCancelled(N){P(N,!1),ah(O,[N])},onAppearCancelled(N){P(N,!0),ah(T,[N])},onLeaveCancelled(N){A(N),ah(x,[N])}})}function fue(t){if(t==null)return null;if(sn(t))return[aT(t.enter),aT(t.leave)];{const e=aT(t);return[e,e]}}function aT(t){return lse(t)}function Mc(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function xd(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function W3(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let hue=0;function U3(t,e,n,r){const i=t._endId=++hue,o=()=>{i===t._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=qz(t,e);if(!a)return r();const u=a+"end";let c=0;const d=()=>{t.removeEventListener(u,f),o()},f=h=>{h.target===t&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},s+1),t.addEventListener(u,f)}function qz(t,e){const n=window.getComputedStyle(t),r=m=>(n[m]||"").split(", "),i=r(`${wd}Delay`),o=r(`${wd}Duration`),a=q3(i,o),s=r(`${Av}Delay`),l=r(`${Av}Duration`),u=q3(s,l);let c=null,d=0,f=0;e===wd?a>0&&(c=wd,d=a,f=o.length):e===Av?u>0&&(c=Av,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?wd:Av:null,f=c?c===wd?o.length:l.length:0);const h=c===wd&&/\b(transform|all)(,|$)/.test(r(`${wd}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function q3(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,r)=>Y3(n)+Y3(t[r])))}function Y3(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function Yz(){return document.body.offsetHeight}const Xz=new WeakMap,Zz=new WeakMap,Gz={name:"TransitionGroup",props:yo({},due,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=en(),r=Sz();let i,o;return Jc(()=>{if(!i.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!yue(i[0].el,n.vnode.el,a))return;i.forEach(gue),i.forEach(mue);const s=i.filter(vue);Yz(),s.forEach(l=>{const u=l.el,c=u.style;Mc(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u._moveCb=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u._moveCb=null,xd(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=Bn(t),s=Uz(a);let l=a.tag||ct;i=o,o=e.default?WM(e.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&o0(c,i0(c,s,r,n))}if(i)for(let u=0;u<i.length;u++){const c=i[u];o0(c,i0(c,s,r,n)),Xz.set(c,c.el.getBoundingClientRect())}return B(l,null,o)}}},pue=t=>delete t.mode;Gz.props;const Kz=Gz;function gue(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function mue(t){Zz.set(t,t.el.getBoundingClientRect())}function vue(t){const e=Xz.get(t),n=Zz.get(t),r=e.left-n.left,i=e.top-n.top;if(r||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",t}}function yue(t,e,n){const r=t.cloneNode();t._vtc&&t._vtc.forEach(a=>{a.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(r);const{hasTransform:o}=qz(r);return i.removeChild(r),o}const Hg=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ut(e)?n=>d1(e,n):e};function bue(t){t.target.composing=!0}function X3(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const JM={created(t,{modifiers:{lazy:e,trim:n,number:r}},i){t._assign=Hg(i);const o=r||i.props&&i.props.type==="number";Ld(t,e?"change":"input",a=>{if(a.target.composing)return;let s=t.value;n&&(s=s.trim()),o&&(s=Q2(s)),t._assign(s)}),n&&Ld(t,"change",()=>{t.value=t.value.trim()}),e||(Ld(t,"compositionstart",bue),Ld(t,"compositionend",X3),Ld(t,"change",X3))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:i}},o){if(t._assign=Hg(o),t.composing||document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===e||(i||t.type==="number")&&Q2(t.value)===e))return;const a=e==null?"":e;t.value!==a&&(t.value=a)}},sw={deep:!0,created(t,e,n){t._assign=Hg(n),Ld(t,"change",()=>{const r=t._modelValue,i=e7(t),o=t.checked,a=t._assign;if(ut(r)){const s=Zj(r,i),l=s!==-1;if(o&&!l)a(r.concat(i));else if(!o&&l){const u=[...r];u.splice(s,1),a(u)}}else if(nx(r)){const s=new Set(r);o?s.add(i):s.delete(i),a(s)}else a(t7(t,o))})},mounted:Z3,beforeUpdate(t,e,n){t._assign=Hg(n),Z3(t,e,n)}};function Z3(t,{value:e,oldValue:n},r){t._modelValue=e,ut(e)?t.checked=Zj(e,r.props.value)>-1:nx(e)?t.checked=e.has(r.props.value):e!==n&&(t.checked=jg(e,t7(t,!0)))}const Jz={created(t,{value:e},n){t.checked=jg(e,n.props.value),t._assign=Hg(n),Ld(t,"change",()=>{t._assign(e7(t))})},beforeUpdate(t,{value:e,oldValue:n},r){t._assign=Hg(r),e!==n&&(t.checked=jg(e,r.props.value))}};function e7(t){return"_value"in t?t._value:t.value}function t7(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const _ue=["ctrl","shift","alt","meta"],Oue={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)=>_ue.some(n=>t[`${n}Key`]&&!e.includes(n))},Pt=(t,e)=>(n,...r)=>{for(let i=0;i<e.length;i++){const o=Oue[e[i]];if(o&&o(n,e))return}return t(n,...r)},wue={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},br=(t,e)=>n=>{if(!("key"in n))return;const r=Mf(n.key);if(e.some(i=>i===r||wue[i]===r))return t(n)},zn={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Mv(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),Mv(t,!0),r.enter(t)):r.leave(t,()=>{Mv(t,!1)}):Mv(t,e))},beforeUnmount(t,{value:e}){Mv(t,e)}};function Mv(t,e){t.style.display=e?t._vod:"none"}const Sue=yo({patchProp:uue},Zle);let G3;function n7(){return G3||(G3=Ple(Sue))}const uf=(...t)=>{n7().render(...t)},px=(...t)=>{const e=n7().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=xue(r);if(!i)return;const o=e._component;!$t(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function xue(t){return At(t)?document.querySelector(t):t}const Cue='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Eue=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,K3=t=>Array.from(t.querySelectorAll(Cue)).filter(e=>Tue(e)&&Eue(e)),Tue=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.disabled)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}},h1=function(t,e,...n){let r;e.includes("mouse")||e.includes("click")?r="MouseEvents":e.includes("key")?r="KeyboardEvent":r="HTMLEvents";const i=document.createEvent(r);return i.initEvent(e,...n),t.dispatchEvent(i),t},r7=t=>!t.getAttribute("aria-owns"),i7=(t,e,n)=>{const{parentNode:r}=t;if(!r)return null;const i=r.querySelectorAll(n),o=Array.prototype.indexOf.call(i,t);return i[o+e]||null},p1=t=>{!t||(t.focus(),!r7(t)&&t.click())},fi=(t,e,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=t==null?void 0:t(i);if(n===!1||!o)return e==null?void 0:e(i)},J3=t=>e=>e.pointerType==="mouse"?t(e):void 0;var kue=Object.defineProperty,Pue=Object.defineProperties,Aue=Object.getOwnPropertyDescriptors,e4=Object.getOwnPropertySymbols,Mue=Object.prototype.hasOwnProperty,Rue=Object.prototype.propertyIsEnumerable,t4=(t,e,n)=>e in t?kue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$ue=(t,e)=>{for(var n in e||(e={}))Mue.call(e,n)&&t4(t,n,e[n]);if(e4)for(var n of e4(e))Rue.call(e,n)&&t4(t,n,e[n]);return t},Nue=(t,e)=>Pue(t,Aue(e));function n4(t,e){var n;const r=Tr();return Bo(()=>{r.value=t()},Nue($ue({},e),{flush:(n=e==null?void 0:e.flush)!=null?n:"sync"})),Mm(r)}var r4;const Tn=typeof window!="undefined",Due=t=>typeof t!="undefined",tk=t=>typeof t=="function",Lue=t=>typeof t=="string",Wg=()=>{},nk=Tn&&((r4=window==null?void 0:window.navigator)==null?void 0:r4.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cf(t){return typeof t=="function"?t():p(t)}function o7(t,e){function n(...r){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return n}function Iue(t,e={}){let n,r,i=Wg;const o=s=>{clearTimeout(s),i(),i=Wg};return s=>{const l=cf(t),u=cf(e.maxWait);return n&&o(n),l<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((c,d)=>{i=e.rejectOnCancel?d:c,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,c(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,c(s())},l)})}}function Bue(t,e=!0,n=!0,r=!1){let i=0,o,a=!0,s=Wg,l;const u=()=>{o&&(clearTimeout(o),o=void 0,s(),s=Wg)};return d=>{const f=cf(t),h=Date.now()-i,m=()=>l=d();return u(),f<=0?(i=Date.now(),m()):(h>f&&(n||!a)?(i=Date.now(),m()):e&&(l=new Promise((g,y)=>{s=r?y:g,o=setTimeout(()=>{i=Date.now(),a=!0,g(m()),u()},Math.max(0,f-h))})),!n&&!o&&(o=setTimeout(()=>a=!0,f)),a=!1,l)}}function Fue(t){return t}function Vue(t,e){let n,r,i;const o=F(!0),a=()=>{o.value=!0,i()};Ve(t,a,{flush:"sync"});const s=tk(e)?e:e.get,l=tk(e)?void 0:e.set,u=zse((c,d)=>(r=c,i=d,{get(){return o.value&&(n=s(),o.value=!1),r(),n},set(f){l==null||l(f)}}));return Object.isExtensible(u)&&(u.trigger=a),u}function fb(t){return ez()?(tz(t),!0):!1}function jue(t,e=200,n={}){return o7(Iue(e,n),t)}function zue(t,e=200,n={}){const r=F(t.value),i=jue(()=>{r.value=t.value},e,n);return Ve(t,()=>i()),r}function a7(t,e=200,n=!1,r=!0,i=!1){return o7(Bue(e,n,r,i),t)}function eR(t,e=!0){en()?Bt(t):e?t():Ot(t)}function Xh(t,e,n={}){const{immediate:r=!0}=n,i=F(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function l(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,t(...u)},cf(e))}return r&&(i.value=!0,Tn&&l()),fb(s),{isPending:Mm(i),start:l,stop:s}}function Wa(t){var e;const n=cf(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Rf=Tn?window:void 0,Que=Tn?window.document:void 0;function sr(...t){let e,n,r,i;if(Lue(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=Rf):[e,n,r,i]=t,!e)return Wg;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=Ve(()=>[Wa(e),cf(i)],([c,d])=>{a(),c&&o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return fb(u),u}let i4=!1;function tR(t,e,n={}){const{window:r=Rf,ignore:i=[],capture:o=!0,detectIframe:a=!1}=n;if(!r)return;nk&&!i4&&(i4=!0,Array.from(r.document.body.children).forEach(f=>f.addEventListener("click",Wg)));let s=!0;const l=f=>i.some(h=>{if(typeof h=="string")return Array.from(r.document.querySelectorAll(h)).some(m=>m===f.target||f.composedPath().includes(m));{const m=Wa(h);return m&&(f.target===m||f.composedPath().includes(m))}}),c=[sr(r,"click",f=>{const h=Wa(t);if(!(!h||h===f.target||f.composedPath().includes(h))){if(f.detail===0&&(s=!l(f)),!s){s=!0;return}e(f)}},{passive:!0,capture:o}),sr(r,"pointerdown",f=>{const h=Wa(t);h&&(s=!f.composedPath().includes(h)&&!l(f))},{passive:!0}),a&&sr(r,"blur",f=>{var h;const m=Wa(t);((h=r.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(f)})].filter(Boolean);return()=>c.forEach(f=>f())}function Hue(t={}){var e;const{window:n=Rf}=t,r=(e=t.document)!=null?e:n==null?void 0:n.document,i=Vue(()=>null,()=>r==null?void 0:r.activeElement);return n&&(sr(n,"blur",o=>{o.relatedTarget===null&&i.trigger()},!0),sr(n,"focus",i.trigger,!0)),i}function s7(t,e=!1){const n=F(),r=()=>n.value=Boolean(t());return r(),eR(r,e),n}function Wue(t){return JSON.parse(JSON.stringify(t))}const rk=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ik="__vueuse_ssr_handlers__";rk[ik]=rk[ik]||{};rk[ik];function Uue(t,e,{window:n=Rf,initialValue:r=""}={}){const i=F(r),o=M(()=>{var a;return Wa(e)||((a=n==null?void 0:n.document)==null?void 0:a.documentElement)});return Ve([o,()=>cf(t)],([a,s])=>{var l;if(a&&n){const u=(l=n.getComputedStyle(a).getPropertyValue(s))==null?void 0:l.trim();i.value=u||r}},{immediate:!0}),Ve(i,a=>{var s;(s=o.value)!=null&&s.style&&o.value.style.setProperty(cf(t),a)}),i}function que({document:t=Que}={}){if(!t)return F("visible");const e=F(t.visibilityState);return sr(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var o4=Object.getOwnPropertySymbols,Yue=Object.prototype.hasOwnProperty,Xue=Object.prototype.propertyIsEnumerable,Zue=(t,e)=>{var n={};for(var r in t)Yue.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&o4)for(var r of o4(t))e.indexOf(r)<0&&Xue.call(t,r)&&(n[r]=t[r]);return n};function Zr(t,e,n={}){const r=n,{window:i=Rf}=r,o=Zue(r,["window"]);let a;const s=s7(()=>i&&"ResizeObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=Ve(()=>Wa(t),d=>{l(),s.value&&i&&d&&(a=new ResizeObserver(e),a.observe(d,o))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return fb(c),{isSupported:s,stop:c}}function a4(t,e={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0}=e,a=F(0),s=F(0),l=F(0),u=F(0),c=F(0),d=F(0),f=F(0),h=F(0);function m(){const g=Wa(t);if(!g){n&&(a.value=0,s.value=0,l.value=0,u.value=0,c.value=0,d.value=0,f.value=0,h.value=0);return}const y=g.getBoundingClientRect();a.value=y.height,s.value=y.bottom,l.value=y.left,u.value=y.right,c.value=y.top,d.value=y.width,f.value=y.x,h.value=y.y}return Zr(t,m),Ve(()=>Wa(t),g=>!g&&m()),i&&sr("scroll",m,{capture:!0,passive:!0}),r&&sr("resize",m,{passive:!0}),eR(()=>{o&&m()}),{height:a,bottom:s,left:l,right:u,top:c,width:d,x:f,y:h,update:m}}var s4=Object.getOwnPropertySymbols,Gue=Object.prototype.hasOwnProperty,Kue=Object.prototype.propertyIsEnumerable,Jue=(t,e)=>{var n={};for(var r in t)Gue.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&s4)for(var r of s4(t))e.indexOf(r)<0&&Kue.call(t,r)&&(n[r]=t[r]);return n};function l7(t,e,n={}){const r=n,{window:i=Rf}=r,o=Jue(r,["window"]);let a;const s=s7(()=>i&&"MutationObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=Ve(()=>Wa(t),d=>{l(),s.value&&i&&d&&(a=new MutationObserver(e),a.observe(d,o))},{immediate:!0}),c=()=>{l(),u()};return fb(c),{isSupported:s,stop:c}}var l4;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(l4||(l4={}));var ece=Object.defineProperty,u4=Object.getOwnPropertySymbols,tce=Object.prototype.hasOwnProperty,nce=Object.prototype.propertyIsEnumerable,c4=(t,e,n)=>e in t?ece(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rce=(t,e)=>{for(var n in e||(e={}))tce.call(e,n)&&c4(t,n,e[n]);if(u4)for(var n of u4(e))nce.call(e,n)&&c4(t,n,e[n]);return t};const ice={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};rce({linear:Fue},ice);function u7(t,e,n,r={}){var i,o,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d}=r,f=en(),h=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((a=(o=f==null?void 0:f.proxy)==null?void 0:o.$emit)==null?void 0:a.bind(f==null?void 0:f.proxy));let m=u;e||(e="modelValue"),m=u||m||`update:${e.toString()}`;const g=b=>s?tk(s)?s(b):Wue(b):b,y=()=>Due(t[e])?g(t[e]):d;if(l){const b=y(),w=F(b);return Ve(()=>t[e],O=>w.value=g(O)),Ve(w,O=>{(O!==t[e]||c)&&h(m,O)},{deep:c}),w}else return M({get(){return y()},set(b){h(m,b)}})}function oce({window:t=Rf}={}){if(!t)return F(!1);const e=F(t.document.hasFocus());return sr(t,"blur",()=>{e.value=!1}),sr(t,"focus",()=>{e.value=!0}),e}function ace(t={}){const{window:e=Rf,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:o=!0}=t,a=F(n),s=F(r),l=()=>{e&&(o?(a.value=e.innerWidth,s.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,s.value=e.document.documentElement.clientHeight))};return l(),eR(l),sr("resize",l,{passive:!0}),i&&sr("orientationchange",l,{passive:!0}),{width:a,height:s}}const nR=()=>Tn&&/firefox/i.test(window.navigator.userAgent),sce=(t,e)=>{if(!Tn||!t||!e)return!1;const n=t.getBoundingClientRect();let r;return e instanceof Element?r=e.getBoundingClientRect():r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right},d4=t=>{let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e},ok=(t,e)=>Math.abs(d4(t)-d4(e)),rR=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}};function lce(t,e,n,r){const i=n-e;return t/=r/2,t<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}var uce=typeof global=="object"&&global&&global.Object===Object&&global,c7=uce,cce=typeof self=="object"&&self&&self.Object===Object&&self,dce=c7||cce||Function("return this")(),Oo=dce,fce=Oo.Symbol,sa=fce,d7=Object.prototype,hce=d7.hasOwnProperty,pce=d7.toString,Rv=sa?sa.toStringTag:void 0;function gce(t){var e=hce.call(t,Rv),n=t[Rv];try{t[Rv]=void 0;var r=!0}catch{}var i=pce.call(t);return r&&(e?t[Rv]=n:delete t[Rv]),i}var mce=Object.prototype,vce=mce.toString;function yce(t){return vce.call(t)}var bce="[object Null]",_ce="[object Undefined]",f4=sa?sa.toStringTag:void 0;function ka(t){return t==null?t===void 0?_ce:bce:f4&&f4 in Object(t)?gce(t):yce(t)}function $i(t){return t!=null&&typeof t=="object"}var Oce="[object Symbol]";function $s(t){return typeof t=="symbol"||$i(t)&&ka(t)==Oce}var wce=0/0;function h4(t){return typeof t=="number"?t:$s(t)?wce:+t}function Ci(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Sce=Array.isArray,Qn=Sce,xce=1/0,p4=sa?sa.prototype:void 0,g4=p4?p4.toString:void 0;function Ns(t){if(typeof t=="string")return t;if(Qn(t))return Ci(t,Ns)+"";if($s(t))return g4?g4.call(t):"";var e=t+"";return e=="0"&&1/t==-xce?"-0":e}function gx(t,e){return function(n,r){var i;if(n===void 0&&r===void 0)return e;if(n!==void 0&&(i=n),r!==void 0){if(i===void 0)return r;typeof n=="string"||typeof r=="string"?(n=Ns(n),r=Ns(r)):(n=h4(n),r=h4(r)),i=t(n,r)}return i}}var Cce=gx(function(t,e){return t+e},0),Ece=Cce,Tce=/\s/;function f7(t){for(var e=t.length;e--&&Tce.test(t.charAt(e)););return e}var kce=/^\s+/;function h7(t){return t&&t.slice(0,f7(t)+1).replace(kce,"")}function _i(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var m4=0/0,Pce=/^[-+]0x[0-9a-f]+$/i,Ace=/^0b[01]+$/i,Mce=/^0o[0-7]+$/i,Rce=parseInt;function cl(t){if(typeof t=="number")return t;if($s(t))return m4;if(_i(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=_i(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=h7(t);var n=Ace.test(t);return n||Mce.test(t)?Rce(t.slice(2),n?2:8):Pce.test(t)?m4:+t}var v4=1/0,$ce=17976931348623157e292;function Fc(t){if(!t)return t===0?t:0;if(t=cl(t),t===v4||t===-v4){var e=t<0?-1:1;return e*$ce}return t===t?t:0}function tr(t){var e=Fc(t),n=e%1;return e===e?n?e-n:e:0}var Nce="Expected a function";function Dce(t,e){if(typeof e!="function")throw new TypeError(Nce);return t=tr(t),function(){if(--t<1)return e.apply(this,arguments)}}function Pa(t){return t}var Lce="[object AsyncFunction]",Ice="[object Function]",Bce="[object GeneratorFunction]",Fce="[object Proxy]";function td(t){if(!_i(t))return!1;var e=ka(t);return e==Ice||e==Bce||e==Lce||e==Fce}var Vce=Oo["__core-js_shared__"],g1=Vce,y4=function(){var t=/[^.]+$/.exec(g1&&g1.keys&&g1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function jce(t){return!!y4&&y4 in t}var zce=Function.prototype,Qce=zce.toString;function vp(t){if(t!=null){try{return Qce.call(t)}catch{}try{return t+""}catch{}}return""}var Hce=/[\\^$.*+?()[\]{}|]/g,Wce=/^\[object .+?Constructor\]$/,Uce=Function.prototype,qce=Object.prototype,Yce=Uce.toString,Xce=qce.hasOwnProperty,Zce=RegExp("^"+Yce.call(Xce).replace(Hce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p7(t){if(!_i(t)||jce(t))return!1;var e=td(t)?Zce:Wce;return e.test(vp(t))}function Gce(t,e){return t==null?void 0:t[e]}function yp(t,e){var n=Gce(t,e);return p7(n)?n:void 0}var Kce=yp(Oo,"WeakMap"),l0=Kce,Jce=l0&&new l0,lw=Jce,ede=lw?function(t,e){return lw.set(t,e),t}:Pa,g7=ede,b4=Object.create,tde=function(){function t(){}return function(e){if(!_i(e))return{};if(b4)return b4(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),$m=tde;function u0(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=$m(t.prototype),r=t.apply(n,e);return _i(r)?r:n}}var nde=1;function rde(t,e,n){var r=e&nde,i=u0(t);function o(){var a=this&&this!==Oo&&this instanceof o?i:t;return a.apply(r?n:this,arguments)}return o}function Ds(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)}var ide=Math.max;function m7(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,l=e.length,u=ide(o-a,0),c=Array(l+u),d=!r;++s<l;)c[s]=e[s];for(;++i<a;)(d||i<o)&&(c[n[i]]=t[i]);for(;u--;)c[s++]=t[i++];return c}var ode=Math.max;function v7(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,l=-1,u=e.length,c=ode(o-s,0),d=Array(c+u),f=!r;++i<c;)d[i]=t[i];for(var h=i;++l<u;)d[h+l]=e[l];for(;++a<s;)(f||i<o)&&(d[h+n[a]]=t[i++]);return d}function ade(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}function mx(){}var sde=4294967295;function Sr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=sde,this.__views__=[]}Sr.prototype=$m(mx.prototype);Sr.prototype.constructor=Sr;function Tg(){}var lde=lw?function(t){return lw.get(t)}:Tg,iR=lde,ude={},kg=ude,cde=Object.prototype,dde=cde.hasOwnProperty;function m1(t){for(var e=t.name+"",n=kg[e],r=dde.call(kg,e)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==t)return i.name}return e}function ml(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}ml.prototype=$m(mx.prototype);ml.prototype.constructor=ml;function Xa(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function y7(t){if(t instanceof Sr)return t.clone();var e=new ml(t.__wrapped__,t.__chain__);return e.__actions__=Xa(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var fde=Object.prototype,hde=fde.hasOwnProperty;function pe(t){if($i(t)&&!Qn(t)&&!(t instanceof Sr)){if(t instanceof ml)return t;if(hde.call(t,"__wrapped__"))return y7(t)}return new ml(t)}pe.prototype=mx.prototype;pe.prototype.constructor=pe;function ak(t){var e=m1(t),n=pe[e];if(typeof n!="function"||!(e in Sr.prototype))return!1;if(t===n)return!0;var r=iR(n);return!!r&&t===r[0]}var pde=800,gde=16,mde=Date.now;function b7(t){var e=0,n=0;return function(){var r=mde(),i=gde-(r-n);if(n=r,i>0){if(++e>=pde)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var vde=b7(g7),_7=vde,yde=/\{\n\/\* \[wrapped with (.+)\] \*/,bde=/,? & /;function _de(t){var e=t.match(yde);return e?e[1].split(bde):[]}var Ode=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function wde(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ode,`{
  2. /* [wrapped with `+e+`] */
  3. `)}function oR(t){return function(){return t}}var Sde=function(){try{var t=yp(Object,"defineProperty");return t({},"",{}),t}catch{}}(),uw=Sde,xde=uw?function(t,e){return uw(t,"toString",{configurable:!0,enumerable:!1,value:oR(e),writable:!0})}:Pa,Cde=xde,Ede=b7(Cde),aR=Ede;function Cl(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function vx(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function O7(t){return t!==t}function Tde(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Nm(t,e,n){return e===e?Tde(t,e,n):vx(t,O7,n)}function yx(t,e){var n=t==null?0:t.length;return!!n&&Nm(t,e,0)>-1}var kde=1,Pde=2,Ade=8,Mde=16,Rde=32,$de=64,Nde=128,Dde=256,Lde=512,Ide=[["ary",Nde],["bind",kde],["bindKey",Pde],["curry",Ade],["curryRight",Mde],["flip",Lde],["partial",Rde],["partialRight",$de],["rearg",Dde]];function Bde(t,e){return Cl(Ide,function(n){var r="_."+n[0];e&n[1]&&!yx(t,r)&&t.push(r)}),t.sort()}function w7(t,e,n){var r=e+"";return aR(t,wde(r,Bde(_de(r),n)))}var Fde=1,Vde=2,jde=4,zde=8,_4=32,O4=64;function S7(t,e,n,r,i,o,a,s,l,u){var c=e&zde,d=c?a:void 0,f=c?void 0:a,h=c?o:void 0,m=c?void 0:o;e|=c?_4:O4,e&=~(c?O4:_4),e&jde||(e&=~(Fde|Vde));var g=[t,e,i,h,d,m,f,s,l,u],y=n.apply(void 0,g);return ak(t)&&_7(y,g),y.placeholder=r,w7(y,t,e)}function Dm(t){var e=t;return e.placeholder}var Qde=9007199254740991,Hde=/^(?:0|[1-9]\d*)$/;function nd(t,e){var n=typeof t;return e=e==null?Qde:e,!!e&&(n=="number"||n!="symbol"&&Hde.test(t))&&t>-1&&t%1==0&&t<e}var Wde=Math.min;function Ude(t,e){for(var n=t.length,r=Wde(e.length,n),i=Xa(t);r--;){var o=e[r];t[r]=nd(o,n)?i[o]:void 0}return t}var w4="__lodash_placeholder__";function df(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];(a===e||a===w4)&&(t[n]=w4,o[i++]=n)}return o}var qde=1,Yde=2,Xde=8,Zde=16,Gde=128,Kde=512;function bx(t,e,n,r,i,o,a,s,l,u){var c=e&Gde,d=e&qde,f=e&Yde,h=e&(Xde|Zde),m=e&Kde,g=f?void 0:u0(t);function y(){for(var b=arguments.length,w=Array(b),O=b;O--;)w[O]=arguments[O];if(h)var S=Dm(y),x=ade(w,S);if(r&&(w=m7(w,r,i,h)),o&&(w=v7(w,o,a,h)),b-=x,h&&b<u){var C=df(w,S);return S7(t,e,bx,y.placeholder,n,w,C,s,l,u-b)}var E=d?n:this,T=f?E[t]:t;return b=w.length,s?w=Ude(w,s):m&&b>1&&w.reverse(),c&&l<b&&(w.length=l),this&&this!==Oo&&this instanceof y&&(T=g||u0(T)),T.apply(E,w)}return y}function Jde(t,e,n){var r=u0(t);function i(){for(var o=arguments.length,a=Array(o),s=o,l=Dm(i);s--;)a[s]=arguments[s];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:df(a,l);if(o-=u.length,o<n)return S7(t,e,bx,i.placeholder,void 0,a,u,void 0,void 0,n-o);var c=this&&this!==Oo&&this instanceof i?r:t;return Ds(c,this,a)}return i}var efe=1;function tfe(t,e,n,r){var i=e&efe,o=u0(t);function a(){for(var s=-1,l=arguments.length,u=-1,c=r.length,d=Array(c+l),f=this&&this!==Oo&&this instanceof a?o:t;++u<c;)d[u]=r[u];for(;l--;)d[u++]=arguments[++s];return Ds(f,i?n:this,d)}return a}var S4="__lodash_placeholder__",sT=1,nfe=2,rfe=4,x4=8,$v=128,C4=256,ife=Math.min;function ofe(t,e){var n=t[1],r=e[1],i=n|r,o=i<(sT|nfe|$v),a=r==$v&&n==x4||r==$v&&n==C4&&t[7].length<=e[8]||r==($v|C4)&&e[7].length<=e[8]&&n==x4;if(!(o||a))return t;r&sT&&(t[2]=e[2],i|=n&sT?0:rfe);var s=e[3];if(s){var l=t[3];t[3]=l?m7(l,s,e[4]):s,t[4]=l?df(t[3],S4):e[4]}return s=e[5],s&&(l=t[5],t[5]=l?v7(l,s,e[6]):s,t[6]=l?df(t[5],S4):e[6]),s=e[7],s&&(t[7]=s),r&$v&&(t[8]=t[8]==null?e[8]:ife(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}var afe="Expected a function",E4=1,sfe=2,lT=8,uT=16,cT=32,T4=64,k4=Math.max;function rd(t,e,n,r,i,o,a,s){var l=e&sfe;if(!l&&typeof t!="function")throw new TypeError(afe);var u=r?r.length:0;if(u||(e&=~(cT|T4),r=i=void 0),a=a===void 0?a:k4(tr(a),0),s=s===void 0?s:tr(s),u-=i?i.length:0,e&T4){var c=r,d=i;r=i=void 0}var f=l?void 0:iR(t),h=[t,e,n,r,i,c,d,o,a,s];if(f&&ofe(h,f),t=h[0],e=h[1],n=h[2],r=h[3],i=h[4],s=h[9]=h[9]===void 0?l?0:t.length:k4(h[9]-u,0),!s&&e&(lT|uT)&&(e&=~(lT|uT)),!e||e==E4)var m=rde(t,e,n);else e==lT||e==uT?m=Jde(t,e,s):(e==cT||e==(E4|cT))&&!i.length?m=tfe(t,e,n,r):m=bx.apply(void 0,h);var g=f?g7:_7;return w7(g(m,h),t,e)}var lfe=128;function x7(t,e,n){return e=n?void 0:e,e=t&&e==null?t.length:e,rd(t,lfe,void 0,void 0,void 0,void 0,e)}function id(t,e,n){e=="__proto__"&&uw?uw(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function fu(t,e){return t===e||t!==t&&e!==e}var ufe=Object.prototype,cfe=ufe.hasOwnProperty;function hb(t,e,n){var r=t[e];(!(cfe.call(t,e)&&fu(r,n))||n===void 0&&!(e in t))&&id(t,e,n)}function oc(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;l===void 0&&(l=t[s]),i?id(n,s,l):hb(n,s,l)}return n}var P4=Math.max;function C7(t,e,n){return e=P4(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=P4(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Ds(t,this,s)}}function cr(t,e){return aR(C7(t,e,Pa),t+"")}var dfe=9007199254740991;function _x(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=dfe}function as(t){return t!=null&&_x(t.length)&&!td(t)}function xa(t,e,n){if(!_i(n))return!1;var r=typeof e;return(r=="number"?as(n)&&nd(e,n.length):r=="string"&&e in n)?fu(n[e],t):!1}function Lm(t){return cr(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&xa(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}var ffe=Object.prototype;function pb(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ffe;return t===n}function sR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var hfe="[object Arguments]";function A4(t){return $i(t)&&ka(t)==hfe}var E7=Object.prototype,pfe=E7.hasOwnProperty,gfe=E7.propertyIsEnumerable,mfe=A4(function(){return arguments}())?A4:function(t){return $i(t)&&pfe.call(t,"callee")&&!gfe.call(t,"callee")},Zh=mfe;function lR(){return!1}var T7=typeof ks=="object"&&ks&&!ks.nodeType&&ks,M4=T7&&typeof Ps=="object"&&Ps&&!Ps.nodeType&&Ps,vfe=M4&&M4.exports===T7,R4=vfe?Oo.Buffer:void 0,yfe=R4?R4.isBuffer:void 0,bfe=yfe||lR,ff=bfe,_fe="[object Arguments]",Ofe="[object Array]",wfe="[object Boolean]",Sfe="[object Date]",xfe="[object Error]",Cfe="[object Function]",Efe="[object Map]",Tfe="[object Number]",kfe="[object Object]",Pfe="[object RegExp]",Afe="[object Set]",Mfe="[object String]",Rfe="[object WeakMap]",$fe="[object ArrayBuffer]",Nfe="[object DataView]",Dfe="[object Float32Array]",Lfe="[object Float64Array]",Ife="[object Int8Array]",Bfe="[object Int16Array]",Ffe="[object Int32Array]",Vfe="[object Uint8Array]",jfe="[object Uint8ClampedArray]",zfe="[object Uint16Array]",Qfe="[object Uint32Array]",mi={};mi[Dfe]=mi[Lfe]=mi[Ife]=mi[Bfe]=mi[Ffe]=mi[Vfe]=mi[jfe]=mi[zfe]=mi[Qfe]=!0;mi[_fe]=mi[Ofe]=mi[$fe]=mi[wfe]=mi[Nfe]=mi[Sfe]=mi[xfe]=mi[Cfe]=mi[Efe]=mi[Tfe]=mi[kfe]=mi[Pfe]=mi[Afe]=mi[Mfe]=mi[Rfe]=!1;function Hfe(t){return $i(t)&&_x(t.length)&&!!mi[ka(t)]}function Ls(t){return function(e){return t(e)}}var k7=typeof ks=="object"&&ks&&!ks.nodeType&&ks,_y=k7&&typeof Ps=="object"&&Ps&&!Ps.nodeType&&Ps,Wfe=_y&&_y.exports===k7,dT=Wfe&&c7.process,Ufe=function(){try{var t=_y&&_y.require&&_y.require("util").types;return t||dT&&dT.binding&&dT.binding("util")}catch{}}(),vl=Ufe,$4=vl&&vl.isTypedArray,qfe=$4?Ls($4):Hfe,Im=qfe,Yfe=Object.prototype,Xfe=Yfe.hasOwnProperty;function P7(t,e){var n=Qn(t),r=!n&&Zh(t),i=!n&&!r&&ff(t),o=!n&&!r&&!i&&Im(t),a=n||r||i||o,s=a?sR(t.length,String):[],l=s.length;for(var u in t)(e||Xfe.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nd(u,l)))&&s.push(u);return s}function A7(t,e){return function(n){return t(e(n))}}var Zfe=A7(Object.keys,Object),Gfe=Zfe,Kfe=Object.prototype,Jfe=Kfe.hasOwnProperty;function uR(t){if(!pb(t))return Gfe(t);var e=[];for(var n in Object(t))Jfe.call(t,n)&&n!="constructor"&&e.push(n);return e}function co(t){return as(t)?P7(t):uR(t)}var ehe=Object.prototype,the=ehe.hasOwnProperty,nhe=Lm(function(t,e){if(pb(e)||as(e)){oc(e,co(e),t);return}for(var n in e)the.call(e,n)&&hb(t,n,e[n])}),$r=nhe;function rhe(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var ihe=Object.prototype,ohe=ihe.hasOwnProperty;function ahe(t){if(!_i(t))return rhe(t);var e=pb(t),n=[];for(var r in t)r=="constructor"&&(e||!ohe.call(t,r))||n.push(r);return n}function ss(t){return as(t)?P7(t,!0):ahe(t)}var she=Lm(function(t,e){oc(e,ss(e),t)}),N4=she,lhe=Lm(function(t,e,n,r){oc(e,ss(e),t,r)}),cw=lhe,uhe=Lm(function(t,e,n,r){oc(e,co(e),t,r)}),che=uhe,dhe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fhe=/^\w*$/;function cR(t,e){if(Qn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||$s(t)?!0:fhe.test(t)||!dhe.test(t)||e!=null&&t in Object(e)}var hhe=yp(Object,"create"),c0=hhe;function phe(){this.__data__=c0?c0(null):{},this.size=0}function ghe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var mhe="__lodash_hash_undefined__",vhe=Object.prototype,yhe=vhe.hasOwnProperty;function bhe(t){var e=this.__data__;if(c0){var n=e[t];return n===mhe?void 0:n}return yhe.call(e,t)?e[t]:void 0}var _he=Object.prototype,Ohe=_he.hasOwnProperty;function whe(t){var e=this.__data__;return c0?e[t]!==void 0:Ohe.call(e,t)}var She="__lodash_hash_undefined__";function xhe(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=c0&&e===void 0?She:e,this}function Gh(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gh.prototype.clear=phe;Gh.prototype.delete=ghe;Gh.prototype.get=bhe;Gh.prototype.has=whe;Gh.prototype.set=xhe;function Che(){this.__data__=[],this.size=0}function Ox(t,e){for(var n=t.length;n--;)if(fu(t[n][0],e))return n;return-1}var Ehe=Array.prototype,The=Ehe.splice;function khe(t){var e=this.__data__,n=Ox(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():The.call(e,n,1),--this.size,!0}function Phe(t){var e=this.__data__,n=Ox(e,t);return n<0?void 0:e[n][1]}function Ahe(t){return Ox(this.__data__,t)>-1}function Mhe(t,e){var n=this.__data__,r=Ox(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function od(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}od.prototype.clear=Che;od.prototype.delete=khe;od.prototype.get=Phe;od.prototype.has=Ahe;od.prototype.set=Mhe;var Rhe=yp(Oo,"Map"),d0=Rhe;function $he(){this.size=0,this.__data__={hash:new Gh,map:new(d0||od),string:new Gh}}function Nhe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function wx(t,e){var n=t.__data__;return Nhe(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Dhe(t){var e=wx(this,t).delete(t);return this.size-=e?1:0,e}function Lhe(t){return wx(this,t).get(t)}function Ihe(t){return wx(this,t).has(t)}function Bhe(t,e){var n=wx(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function ad(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ad.prototype.clear=$he;ad.prototype.delete=Dhe;ad.prototype.get=Lhe;ad.prototype.has=Ihe;ad.prototype.set=Bhe;var Fhe="Expected a function";function gb(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Fhe);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(gb.Cache||ad),n}gb.Cache=ad;var Vhe=500;function jhe(t){var e=gb(t,function(r){return n.size===Vhe&&n.clear(),r}),n=e.cache;return e}var zhe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qhe=/\\(\\)?/g,Hhe=jhe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(zhe,function(n,r,i,o){e.push(i?o.replace(Qhe,"$1"):r||n)}),e}),M7=Hhe;function qr(t){return t==null?"":Ns(t)}function $f(t,e){return Qn(t)?t:cR(t,e)?[t]:M7(qr(t))}var Whe=1/0;function ac(t){if(typeof t=="string"||$s(t))return t;var e=t+"";return e=="0"&&1/t==-Whe?"-0":e}function bp(t,e){e=$f(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[ac(e[n++])];return n&&n==r?t:void 0}function Wr(t,e,n){var r=t==null?void 0:bp(t,e);return r===void 0?n:r}function dR(t,e){for(var n=-1,r=e.length,i=Array(r),o=t==null;++n<r;)i[n]=o?void 0:Wr(t,e[n]);return i}function Nf(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var D4=sa?sa.isConcatSpreadable:void 0;function Uhe(t){return Qn(t)||Zh(t)||!!(D4&&t&&t[D4])}function zo(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Uhe),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?zo(s,e-1,n,r,i):Nf(i,s):r||(i[i.length]=s)}return i}function fR(t){var e=t==null?0:t.length;return e?zo(t,1):[]}function sd(t){return aR(C7(t,void 0,fR),t+"")}var qhe=sd(dR),Yhe=qhe,Xhe=A7(Object.getPrototypeOf,Object),Sx=Xhe,Zhe="[object Object]",Ghe=Function.prototype,Khe=Object.prototype,R7=Ghe.toString,Jhe=Khe.hasOwnProperty,epe=R7.call(Object);function mb(t){if(!$i(t)||ka(t)!=Zhe)return!1;var e=Sx(t);if(e===null)return!0;var n=Jhe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&R7.call(n)==epe}var tpe="[object DOMException]",npe="[object Error]";function hR(t){if(!$i(t))return!1;var e=ka(t);return e==npe||e==tpe||typeof t.message=="string"&&typeof t.name=="string"&&!mb(t)}var rpe=cr(function(t,e){try{return Ds(t,void 0,e)}catch(n){return hR(n)?n:new Error(n)}}),$7=rpe,ipe="Expected a function";function N7(t,e){var n;if(typeof e!="function")throw new TypeError(ipe);return t=tr(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ope=1,ape=32,pR=cr(function(t,e,n){var r=ope;if(n.length){var i=df(n,Dm(pR));r|=ape}return rd(t,r,e,n,i)});pR.placeholder={};var D7=pR,spe=sd(function(t,e){return Cl(e,function(n){n=ac(n),id(t,n,D7(t[n],t))}),t}),lpe=spe,upe=1,cpe=2,dpe=32,gR=cr(function(t,e,n){var r=upe|cpe;if(n.length){var i=df(n,Dm(gR));r|=dpe}return rd(e,r,t,n,i)});gR.placeholder={};var fpe=gR;function yl(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function Df(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:yl(t,e,n)}var hpe="\\ud800-\\udfff",ppe="\\u0300-\\u036f",gpe="\\ufe20-\\ufe2f",mpe="\\u20d0-\\u20ff",vpe=ppe+gpe+mpe,ype="\\ufe0e\\ufe0f",bpe="\\u200d",_pe=RegExp("["+bpe+hpe+vpe+ype+"]");function Bm(t){return _pe.test(t)}function Ope(t){return t.split("")}var L7="\\ud800-\\udfff",wpe="\\u0300-\\u036f",Spe="\\ufe20-\\ufe2f",xpe="\\u20d0-\\u20ff",Cpe=wpe+Spe+xpe,Epe="\\ufe0e\\ufe0f",Tpe="["+L7+"]",sk="["+Cpe+"]",lk="\\ud83c[\\udffb-\\udfff]",kpe="(?:"+sk+"|"+lk+")",I7="[^"+L7+"]",B7="(?:\\ud83c[\\udde6-\\uddff]){2}",F7="[\\ud800-\\udbff][\\udc00-\\udfff]",Ppe="\\u200d",V7=kpe+"?",j7="["+Epe+"]?",Ape="(?:"+Ppe+"(?:"+[I7,B7,F7].join("|")+")"+j7+V7+")*",Mpe=j7+V7+Ape,Rpe="(?:"+[I7+sk+"?",sk,B7,F7,Tpe].join("|")+")",$pe=RegExp(lk+"(?="+lk+")|"+Rpe+Mpe,"g");function Npe(t){return t.match($pe)||[]}function au(t){return Bm(t)?Npe(t):Ope(t)}function z7(t){return function(e){e=qr(e);var n=Bm(e)?au(e):void 0,r=n?n[0]:e.charAt(0),i=n?Df(n,1).join(""):e.slice(1);return r[t]()+i}}var Dpe=z7("toUpperCase"),mR=Dpe;function Q7(t){return mR(qr(t).toLowerCase())}function vR(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function yR(t){return function(e){return t==null?void 0:t[e]}}var Lpe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ipe=yR(Lpe),Bpe=Ipe,Fpe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vpe="\\u0300-\\u036f",jpe="\\ufe20-\\ufe2f",zpe="\\u20d0-\\u20ff",Qpe=Vpe+jpe+zpe,Hpe="["+Qpe+"]",Wpe=RegExp(Hpe,"g");function H7(t){return t=qr(t),t&&t.replace(Fpe,Bpe).replace(Wpe,"")}var Upe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function qpe(t){return t.match(Upe)||[]}var Ype=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Xpe(t){return Ype.test(t)}var W7="\\ud800-\\udfff",Zpe="\\u0300-\\u036f",Gpe="\\ufe20-\\ufe2f",Kpe="\\u20d0-\\u20ff",Jpe=Zpe+Gpe+Kpe,U7="\\u2700-\\u27bf",q7="a-z\\xdf-\\xf6\\xf8-\\xff",ege="\\xac\\xb1\\xd7\\xf7",tge="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",nge="\\u2000-\\u206f",rge=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Y7="A-Z\\xc0-\\xd6\\xd8-\\xde",ige="\\ufe0e\\ufe0f",X7=ege+tge+nge+rge,Z7="['\u2019]",L4="["+X7+"]",oge="["+Jpe+"]",G7="\\d+",age="["+U7+"]",K7="["+q7+"]",J7="[^"+W7+X7+G7+U7+q7+Y7+"]",sge="\\ud83c[\\udffb-\\udfff]",lge="(?:"+oge+"|"+sge+")",uge="[^"+W7+"]",e9="(?:\\ud83c[\\udde6-\\uddff]){2}",t9="[\\ud800-\\udbff][\\udc00-\\udfff]",ig="["+Y7+"]",cge="\\u200d",I4="(?:"+K7+"|"+J7+")",dge="(?:"+ig+"|"+J7+")",B4="(?:"+Z7+"(?:d|ll|m|re|s|t|ve))?",F4="(?:"+Z7+"(?:D|LL|M|RE|S|T|VE))?",n9=lge+"?",r9="["+ige+"]?",fge="(?:"+cge+"(?:"+[uge,e9,t9].join("|")+")"+r9+n9+")*",hge="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pge="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gge=r9+n9+fge,mge="(?:"+[age,e9,t9].join("|")+")"+gge,vge=RegExp([ig+"?"+K7+"+"+B4+"(?="+[L4,ig,"$"].join("|")+")",dge+"+"+F4+"(?="+[L4,ig+I4,"$"].join("|")+")",ig+"?"+I4+"+"+B4,ig+"+"+F4,pge,hge,G7,mge].join("|"),"g");function yge(t){return t.match(vge)||[]}function i9(t,e,n){return t=qr(t),e=n?void 0:e,e===void 0?Xpe(t)?yge(t):qpe(t):t.match(e)||[]}var bge="['\u2019]",_ge=RegExp(bge,"g");function Fm(t){return function(e){return vR(i9(H7(e).replace(_ge,"")),t,"")}}var Oge=Fm(function(t,e,n){return e=e.toLowerCase(),t+(n?Q7(e):e)}),wge=Oge;function $o(){if(!arguments.length)return[];var t=arguments[0];return Qn(t)?t:[t]}var Sge=Oo.isFinite,xge=Math.min;function bR(t){var e=Math[t];return function(n,r){if(n=cl(n),r=r==null?0:xge(tr(r),292),r&&Sge(n)){var i=(qr(n)+"e").split("e"),o=e(i[0]+"e"+(+i[1]+r));return i=(qr(o)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var Cge=bR("ceil"),Ege=Cge;function o9(t){var e=pe(t);return e.__chain__=!0,e}var Tge=Math.ceil,kge=Math.max;function Pge(t,e,n){(n?xa(t,e,n):e===void 0)?e=1:e=kge(tr(e),0);var r=t==null?0:t.length;if(!r||e<1)return[];for(var i=0,o=0,a=Array(Tge(r/e));i<r;)a[o++]=yl(t,i,i+=e);return a}function _p(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function Age(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=cl(n),n=n===n?n:0),e!==void 0&&(e=cl(e),e=e===e?e:0),_p(cl(t),e,n)}function Mge(){this.__data__=new od,this.size=0}function Rge(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function $ge(t){return this.__data__.get(t)}function Nge(t){return this.__data__.has(t)}var Dge=200;function Lge(t,e){var n=this.__data__;if(n instanceof od){var r=n.__data__;if(!d0||r.length<Dge-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ad(r)}return n.set(t,e),this.size=n.size,this}function eu(t){var e=this.__data__=new od(t);this.size=e.size}eu.prototype.clear=Mge;eu.prototype.delete=Rge;eu.prototype.get=$ge;eu.prototype.has=Nge;eu.prototype.set=Lge;function a9(t,e){return t&&oc(e,co(e),t)}function Ige(t,e){return t&&oc(e,ss(e),t)}var s9=typeof ks=="object"&&ks&&!ks.nodeType&&ks,V4=s9&&typeof Ps=="object"&&Ps&&!Ps.nodeType&&Ps,Bge=V4&&V4.exports===s9,j4=Bge?Oo.Buffer:void 0,z4=j4?j4.allocUnsafe:void 0;function l9(t,e){if(e)return t.slice();var n=t.length,r=z4?z4(n):new t.constructor(n);return t.copy(r),r}function Lf(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function _R(){return[]}var Fge=Object.prototype,Vge=Fge.propertyIsEnumerable,Q4=Object.getOwnPropertySymbols,jge=Q4?function(t){return t==null?[]:(t=Object(t),Lf(Q4(t),function(e){return Vge.call(t,e)}))}:_R,OR=jge;function zge(t,e){return oc(t,OR(t),e)}var Qge=Object.getOwnPropertySymbols,Hge=Qge?function(t){for(var e=[];t;)Nf(e,OR(t)),t=Sx(t);return e}:_R,u9=Hge;function Wge(t,e){return oc(t,u9(t),e)}function c9(t,e,n){var r=e(t);return Qn(t)?r:Nf(r,n(t))}function uk(t){return c9(t,co,OR)}function wR(t){return c9(t,ss,u9)}var Uge=yp(Oo,"DataView"),ck=Uge,qge=yp(Oo,"Promise"),dk=qge,Yge=yp(Oo,"Set"),Pg=Yge,H4="[object Map]",Xge="[object Object]",W4="[object Promise]",U4="[object Set]",q4="[object WeakMap]",Y4="[object DataView]",Zge=vp(ck),Gge=vp(d0),Kge=vp(dk),Jge=vp(Pg),eme=vp(l0),ph=ka;(ck&&ph(new ck(new ArrayBuffer(1)))!=Y4||d0&&ph(new d0)!=H4||dk&&ph(dk.resolve())!=W4||Pg&&ph(new Pg)!=U4||l0&&ph(new l0)!=q4)&&(ph=function(t){var e=ka(t),n=e==Xge?t.constructor:void 0,r=n?vp(n):"";if(r)switch(r){case Zge:return Y4;case Gge:return H4;case Kge:return W4;case Jge:return U4;case eme:return q4}return e});var Zu=ph,tme=Object.prototype,nme=tme.hasOwnProperty;function rme(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&nme.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var ime=Oo.Uint8Array,dw=ime;function SR(t){var e=new t.constructor(t.byteLength);return new dw(e).set(new dw(t)),e}function ome(t,e){var n=e?SR(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var ame=/\w*$/;function sme(t){var e=new t.constructor(t.source,ame.exec(t));return e.lastIndex=t.lastIndex,e}var X4=sa?sa.prototype:void 0,Z4=X4?X4.valueOf:void 0;function lme(t){return Z4?Object(Z4.call(t)):{}}function d9(t,e){var n=e?SR(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var ume="[object Boolean]",cme="[object Date]",dme="[object Map]",fme="[object Number]",hme="[object RegExp]",pme="[object Set]",gme="[object String]",mme="[object Symbol]",vme="[object ArrayBuffer]",yme="[object DataView]",bme="[object Float32Array]",_me="[object Float64Array]",Ome="[object Int8Array]",wme="[object Int16Array]",Sme="[object Int32Array]",xme="[object Uint8Array]",Cme="[object Uint8ClampedArray]",Eme="[object Uint16Array]",Tme="[object Uint32Array]";function kme(t,e,n){var r=t.constructor;switch(e){case vme:return SR(t);case ume:case cme:return new r(+t);case yme:return ome(t,n);case bme:case _me:case Ome:case wme:case Sme:case xme:case Cme:case Eme:case Tme:return d9(t,n);case dme:return new r;case fme:case gme:return new r(t);case hme:return sme(t);case pme:return new r;case mme:return lme(t)}}function f9(t){return typeof t.constructor=="function"&&!pb(t)?$m(Sx(t)):{}}var Pme="[object Map]";function Ame(t){return $i(t)&&Zu(t)==Pme}var G4=vl&&vl.isMap,Mme=G4?Ls(G4):Ame,h9=Mme,Rme="[object Set]";function $me(t){return $i(t)&&Zu(t)==Rme}var K4=vl&&vl.isSet,Nme=K4?Ls(K4):$me,p9=Nme,Dme=1,Lme=2,Ime=4,g9="[object Arguments]",Bme="[object Array]",Fme="[object Boolean]",Vme="[object Date]",jme="[object Error]",m9="[object Function]",zme="[object GeneratorFunction]",Qme="[object Map]",Hme="[object Number]",v9="[object Object]",Wme="[object RegExp]",Ume="[object Set]",qme="[object String]",Yme="[object Symbol]",Xme="[object WeakMap]",Zme="[object ArrayBuffer]",Gme="[object DataView]",Kme="[object Float32Array]",Jme="[object Float64Array]",eve="[object Int8Array]",tve="[object Int16Array]",nve="[object Int32Array]",rve="[object Uint8Array]",ive="[object Uint8ClampedArray]",ove="[object Uint16Array]",ave="[object Uint32Array]",ui={};ui[g9]=ui[Bme]=ui[Zme]=ui[Gme]=ui[Fme]=ui[Vme]=ui[Kme]=ui[Jme]=ui[eve]=ui[tve]=ui[nve]=ui[Qme]=ui[Hme]=ui[v9]=ui[Wme]=ui[Ume]=ui[qme]=ui[Yme]=ui[rve]=ui[ive]=ui[ove]=ui[ave]=!0;ui[jme]=ui[m9]=ui[Xme]=!1;function dl(t,e,n,r,i,o){var a,s=e&Dme,l=e&Lme,u=e&Ime;if(n&&(a=i?n(t,r,i,o):n(t)),a!==void 0)return a;if(!_i(t))return t;var c=Qn(t);if(c){if(a=rme(t),!s)return Xa(t,a)}else{var d=Zu(t),f=d==m9||d==zme;if(ff(t))return l9(t,s);if(d==v9||d==g9||f&&!i){if(a=l||f?{}:f9(t),!s)return l?Wge(t,Ige(a,t)):zge(t,a9(a,t))}else{if(!ui[d])return i?t:{};a=kme(t,d,s)}}o||(o=new eu);var h=o.get(t);if(h)return h;o.set(t,a),p9(t)?t.forEach(function(y){a.add(dl(y,e,n,y,t,o))}):h9(t)&&t.forEach(function(y,b){a.set(b,dl(y,e,n,b,t,o))});var m=u?l?wR:uk:l?ss:co,g=c?void 0:m(t);return Cl(g||t,function(y,b){g&&(b=y,y=t[b]),hb(a,b,dl(y,e,n,b,t,o))}),a}var sve=4;function fk(t){return dl(t,sve)}var lve=1,uve=4;function Fn(t){return dl(t,lve|uve)}var cve=1,dve=4;function fve(t,e){return e=typeof e=="function"?e:void 0,dl(t,cve|dve,e)}var hve=4;function pve(t,e){return e=typeof e=="function"?e:void 0,dl(t,hve,e)}function gve(){return new ml(this.value(),this.__chain__)}function mve(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function vve(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Nf(Qn(n)?Xa(n):[n],zo(e,1))}var yve="__lodash_hash_undefined__";function bve(t){return this.__data__.set(t,yve),this}function _ve(t){return this.__data__.has(t)}function Kh(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new ad;++e<n;)this.add(t[e])}Kh.prototype.add=Kh.prototype.push=bve;Kh.prototype.has=_ve;function xR(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function f0(t,e){return t.has(e)}var Ove=1,wve=2;function y9(t,e,n,r,i,o){var a=n&Ove,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,h=n&wve?new Kh:void 0;for(o.set(t,e),o.set(e,t);++d<s;){var m=t[d],g=e[d];if(r)var y=a?r(g,m,d,e,t,o):r(m,g,d,t,e,o);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!xR(e,function(b,w){if(!f0(h,w)&&(m===b||i(m,b,n,r,o)))return h.push(w)})){f=!1;break}}else if(!(m===g||i(m,g,n,r,o))){f=!1;break}}return o.delete(t),o.delete(e),f}function CR(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function xx(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Sve=1,xve=2,Cve="[object Boolean]",Eve="[object Date]",Tve="[object Error]",kve="[object Map]",Pve="[object Number]",Ave="[object RegExp]",Mve="[object Set]",Rve="[object String]",$ve="[object Symbol]",Nve="[object ArrayBuffer]",Dve="[object DataView]",J4=sa?sa.prototype:void 0,fT=J4?J4.valueOf:void 0;function Lve(t,e,n,r,i,o,a){switch(n){case Dve:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Nve:return!(t.byteLength!=e.byteLength||!o(new dw(t),new dw(e)));case Cve:case Eve:case Pve:return fu(+t,+e);case Tve:return t.name==e.name&&t.message==e.message;case Ave:case Rve:return t==e+"";case kve:var s=CR;case Mve:var l=r&Sve;if(s||(s=xx),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=xve,a.set(t,e);var c=y9(s(t),s(e),r,i,o,a);return a.delete(t),c;case $ve:if(fT)return fT.call(t)==fT.call(e)}return!1}var Ive=1,Bve=Object.prototype,Fve=Bve.hasOwnProperty;function Vve(t,e,n,r,i,o){var a=n&Ive,s=uk(t),l=s.length,u=uk(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:Fve.call(e,f)))return!1}var h=o.get(t),m=o.get(e);if(h&&m)return h==e&&m==t;var g=!0;o.set(t,e),o.set(e,t);for(var y=a;++d<l;){f=s[d];var b=t[f],w=e[f];if(r)var O=a?r(w,b,f,e,t,o):r(b,w,f,t,e,o);if(!(O===void 0?b===w||i(b,w,n,r,o):O)){g=!1;break}y||(y=f=="constructor")}if(g&&!y){var S=t.constructor,x=e.constructor;S!=x&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof x=="function"&&x instanceof x)&&(g=!1)}return o.delete(t),o.delete(e),g}var jve=1,e5="[object Arguments]",t5="[object Array]",X_="[object Object]",zve=Object.prototype,n5=zve.hasOwnProperty;function Qve(t,e,n,r,i,o){var a=Qn(t),s=Qn(e),l=a?t5:Zu(t),u=s?t5:Zu(e);l=l==e5?X_:l,u=u==e5?X_:u;var c=l==X_,d=u==X_,f=l==u;if(f&&ff(t)){if(!ff(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new eu),a||Im(t)?y9(t,e,n,r,i,o):Lve(t,e,l,n,r,i,o);if(!(n&jve)){var h=c&&n5.call(t,"__wrapped__"),m=d&&n5.call(e,"__wrapped__");if(h||m){var g=h?t.value():t,y=m?e.value():e;return o||(o=new eu),i(g,y,n,r,o)}}return f?(o||(o=new eu),Vve(t,e,n,r,i,o)):!1}function vb(t,e,n,r,i){return t===e?!0:t==null||e==null||!$i(t)&&!$i(e)?t!==t&&e!==e:Qve(t,e,n,r,vb,i)}var Hve=1,Wve=2;function ER(t,e,n,r){var i=n.length,o=i,a=!r;if(t==null)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=n[i];var l=s[0],u=t[l],c=s[1];if(a&&s[2]){if(u===void 0&&!(l in t))return!1}else{var d=new eu;if(r)var f=r(u,c,l,t,e,d);if(!(f===void 0?vb(c,u,Hve|Wve,r,d):f))return!1}}return!0}function b9(t){return t===t&&!_i(t)}function TR(t){for(var e=co(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,b9(i)]}return e}function _9(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function O9(t){var e=TR(t);return e.length==1&&e[0][2]?_9(e[0][0],e[0][1]):function(n){return n===t||ER(n,t,e)}}function Uve(t,e){return t!=null&&e in Object(t)}function w9(t,e,n){e=$f(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var a=ac(e[r]);if(!(o=t!=null&&n(t,a)))break;t=t[a]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&_x(i)&&nd(a,i)&&(Qn(t)||Zh(t)))}function kR(t,e){return t!=null&&w9(t,e,Uve)}var qve=1,Yve=2;function S9(t,e){return cR(t)&&b9(e)?_9(ac(t),e):function(n){var r=Wr(n,t);return r===void 0&&r===e?kR(n,t):vb(e,r,qve|Yve)}}function PR(t){return function(e){return e==null?void 0:e[t]}}function Xve(t){return function(e){return bp(e,t)}}function x9(t){return cR(t)?PR(ac(t)):Xve(t)}function Un(t){return typeof t=="function"?t:t==null?Pa:typeof t=="object"?Qn(t)?S9(t[0],t[1]):O9(t):x9(t)}var Zve="Expected a function";function Gve(t){var e=t==null?0:t.length,n=Un;return t=e?Ci(t,function(r){if(typeof r[1]!="function")throw new TypeError(Zve);return[n(r[0]),r[1]]}):[],cr(function(r){for(var i=-1;++i<e;){var o=t[i];if(Ds(o[0],this,r))return Ds(o[1],this,r)}})}function C9(t,e,n){var r=n.length;if(t==null)return!r;for(t=Object(t);r--;){var i=n[r],o=e[i],a=t[i];if(a===void 0&&!(i in t)||!o(a))return!1}return!0}function Kve(t){var e=co(t);return function(n){return C9(n,t,e)}}var Jve=1;function eye(t){return Kve(dl(t,Jve))}function tye(t,e){return e==null||C9(t,e,co(e))}function nye(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function E9(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++i];if(n(o[l],l,o)===!1)break}return e}}var rye=E9(),AR=rye;function sc(t,e){return t&&AR(t,e,co)}function T9(t,e){return function(n,r){if(n==null)return n;if(!as(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var iye=T9(sc),If=iye;function oye(t,e,n,r){return If(t,function(i,o,a){e(r,i,n(i),a)}),r}function Cx(t,e){return function(n,r){var i=Qn(n)?nye:oye,o=e?e():{};return i(n,t,Un(r),o)}}var aye=Object.prototype,sye=aye.hasOwnProperty,lye=Cx(function(t,e,n){sye.call(t,n)?++t[n]:id(t,n,1)}),uye=lye;function cye(t,e){var n=$m(t);return e==null?n:a9(n,e)}var dye=8;function MR(t,e,n){e=n?void 0:e;var r=rd(t,dye,void 0,void 0,void 0,void 0,void 0,e);return r.placeholder=MR.placeholder,r}MR.placeholder={};var fye=16;function RR(t,e,n){e=n?void 0:e;var r=rd(t,fye,void 0,void 0,void 0,void 0,void 0,e);return r.placeholder=RR.placeholder,r}RR.placeholder={};var hye=function(){return Oo.Date.now()},v1=hye,pye="Expected a function",gye=Math.max,mye=Math.min;function jo(t,e,n){var r,i,o,a,s,l,u=0,c=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(pye);e=cl(e)||0,_i(n)&&(c=!!n.leading,d="maxWait"in n,o=d?gye(cl(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f);function h(C){var E=r,T=i;return r=i=void 0,u=C,a=t.apply(T,E),a}function m(C){return u=C,s=setTimeout(b,e),c?h(C):a}function g(C){var E=C-l,T=C-u,P=e-E;return d?mye(P,o-T):P}function y(C){var E=C-l,T=C-u;return l===void 0||E>=e||E<0||d&&T>=o}function b(){var C=v1();if(y(C))return w(C);s=setTimeout(b,g(C))}function w(C){return s=void 0,f&&r?h(C):(r=i=void 0,a)}function O(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function S(){return s===void 0?a:w(v1())}function x(){var C=v1(),E=y(C);if(r=arguments,i=this,l=C,E){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(b,e),h(l)}return s===void 0&&(s=setTimeout(b,e)),a}return x.cancel=O,x.flush=S,x}function vye(t,e){return t==null||t!==t?e:t}var k9=Object.prototype,yye=k9.hasOwnProperty,bye=cr(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&xa(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=ss(o),s=-1,l=a.length;++s<l;){var u=a[s],c=t[u];(c===void 0||fu(c,k9[u])&&!yye.call(t,u))&&(t[u]=o[u])}return t}),_ye=bye;function hk(t,e,n){(n!==void 0&&!fu(t[e],n)||n===void 0&&!(e in t))&&id(t,e,n)}function zi(t){return $i(t)&&as(t)}function pk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function P9(t){return oc(t,ss(t))}function Oye(t,e,n,r,i,o,a){var s=pk(t,n),l=pk(e,n),u=a.get(l);if(u){hk(t,n,u);return}var c=o?o(s,l,n+"",t,e,a):void 0,d=c===void 0;if(d){var f=Qn(l),h=!f&&ff(l),m=!f&&!h&&Im(l);c=l,f||h||m?Qn(s)?c=s:zi(s)?c=Xa(s):h?(d=!1,c=l9(l,!0)):m?(d=!1,c=d9(l,!0)):c=[]:mb(l)||Zh(l)?(c=s,Zh(s)?c=P9(s):(!_i(s)||td(s))&&(c=f9(l))):d=!1}d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),hk(t,n,c)}function Ex(t,e,n,r,i){t!==e&&AR(e,function(o,a){if(i||(i=new eu),_i(o))Oye(t,e,a,n,Ex,r,i);else{var s=r?r(pk(t,a),o,a+"",t,e,i):void 0;s===void 0&&(s=o),hk(t,a,s)}},ss)}function A9(t,e,n,r,i,o){return _i(t)&&_i(e)&&(o.set(e,t),Ex(t,e,void 0,A9,o),o.delete(e)),t}var wye=Lm(function(t,e,n,r){Ex(t,e,n,r)}),M9=wye,Sye=cr(function(t){return t.push(void 0,A9),Ds(M9,void 0,t)}),xye=Sye,Cye="Expected a function";function R9(t,e,n){if(typeof t!="function")throw new TypeError(Cye);return setTimeout(function(){t.apply(void 0,n)},e)}var Eye=cr(function(t,e){return R9(t,1,e)}),Tye=Eye,kye=cr(function(t,e,n){return R9(t,cl(e)||0,n)}),Pye=kye;function $R(t,e,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var Aye=200;function yb(t,e,n,r){var i=-1,o=yx,a=!0,s=t.length,l=[],u=e.length;if(!s)return l;n&&(e=Ci(e,Ls(n))),r?(o=$R,a=!1):e.length>=Aye&&(o=f0,a=!1,e=new Kh(e));e:for(;++i<s;){var c=t[i],d=n==null?c:n(c);if(c=r||c!==0?c:0,a&&d===d){for(var f=u;f--;)if(e[f]===d)continue e;l.push(c)}else o(e,d,r)||l.push(c)}return l}var Mye=cr(function(t,e){return zi(t)?yb(t,zo(e,1,zi,!0)):[]}),Rye=Mye;function ns(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var $ye=cr(function(t,e){var n=ns(e);return zi(n)&&(n=void 0),zi(t)?yb(t,zo(e,1,zi,!0),Un(n)):[]}),Nye=$ye,Dye=cr(function(t,e){var n=ns(e);return zi(n)&&(n=void 0),zi(t)?yb(t,zo(e,1,zi,!0),void 0,n):[]}),Lye=Dye,Iye=gx(function(t,e){return t/e},1),Bye=Iye;function Fye(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:tr(e),yl(t,e<0?0:e,r)):[]}function Vye(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:tr(e),e=r-e,yl(t,0,e<0?0:e)):[]}function Tx(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?yl(t,r?0:o,r?o+1:i):yl(t,r?o+1:0,r?i:o)}function jye(t,e){return t&&t.length?Tx(t,Un(e),!0,!0):[]}function zye(t,e){return t&&t.length?Tx(t,Un(e),!0):[]}function lc(t){return typeof t=="function"?t:Pa}function jn(t,e){var n=Qn(t)?Cl:If;return n(t,lc(e))}function Qye(t,e){for(var n=t==null?0:t.length;n--&&e(t[n],n,t)!==!1;);return t}var Hye=E9(!0),$9=Hye;function NR(t,e){return t&&$9(t,e,co)}var Wye=T9(NR,!0),N9=Wye;function r5(t,e){var n=Qn(t)?Qye:N9;return n(t,lc(e))}function Uye(t,e,n){t=qr(t),e=Ns(e);var r=t.length;n=n===void 0?r:_p(tr(n),0,r);var i=n;return n-=e.length,n>=0&&t.slice(n,i)==e}function qye(t,e){return Ci(e,function(n){return[n,t[n]]})}function Yye(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=[r,r]}),n}var Xye="[object Map]",Zye="[object Set]";function D9(t){return function(e){var n=Zu(e);return n==Xye?CR(e):n==Zye?Yye(e):qye(e,t(e))}}var Gye=D9(co),Gu=Gye,Kye=D9(ss),i5=Kye,Jye={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},e0e=yR(Jye),t0e=e0e,L9=/[&<>"']/g,n0e=RegExp(L9.source);function I9(t){return t=qr(t),t&&n0e.test(t)?t.replace(L9,t0e):t}var B9=/[\\^$.*+?()[\]{}|]/g,r0e=RegExp(B9.source);function i0e(t){return t=qr(t),t&&r0e.test(t)?t.replace(B9,"\\$&"):t}function F9(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function o0e(t,e){var n=!0;return If(t,function(r,i,o){return n=!!e(r,i,o),n}),n}function a0e(t,e,n){var r=Qn(t)?F9:o0e;return n&&xa(t,e,n)&&(e=void 0),r(t,Un(e))}var s0e=4294967295;function V9(t){return t?_p(tr(t),0,s0e):0}function l0e(t,e,n,r){var i=t.length;for(n=tr(n),n<0&&(n=-n>i?0:i+n),r=r===void 0||r>i?i:tr(r),r<0&&(r+=i),r=n>r?0:V9(r);n<r;)t[n++]=e;return t}function u0e(t,e,n,r){var i=t==null?0:t.length;return i?(n&&typeof n!="number"&&xa(t,e,n)&&(n=0,r=i),l0e(t,e,n,r)):[]}function j9(t,e){var n=[];return If(t,function(r,i,o){e(r,i,o)&&n.push(r)}),n}function Jv(t,e){var n=Qn(t)?Lf:j9;return n(t,Un(e))}function z9(t){return function(e,n,r){var i=Object(e);if(!as(e)){var o=Un(n);e=co(e),n=function(s){return o(i[s],s,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}var c0e=Math.max;function DR(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:tr(n);return i<0&&(i=c0e(r+i,0)),vx(t,Un(e),i)}var d0e=z9(DR),hf=d0e;function Q9(t,e,n){var r;return n(t,function(i,o,a){if(e(i,o,a))return r=o,!1}),r}function f0e(t,e){return Q9(t,Un(e),sc)}var h0e=Math.max,p0e=Math.min;function kx(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r-1;return n!==void 0&&(i=tr(n),i=n<0?h0e(r+i,0):p0e(i,r-1)),vx(t,Un(e),i,!0)}var g0e=z9(kx),m0e=g0e;function v0e(t,e){return Q9(t,Un(e),NR)}function o5(t){return t&&t.length?t[0]:void 0}function H9(t,e){var n=-1,r=as(t)?Array(t.length):[];return If(t,function(i,o,a){r[++n]=e(i,o,a)}),r}function Ca(t,e){var n=Qn(t)?Ci:H9;return n(t,Un(e))}function W9(t,e){return zo(Ca(t,e),1)}var y0e=1/0;function b0e(t,e){return zo(Ca(t,e),y0e)}function _0e(t,e,n){return n=n===void 0?1:tr(n),zo(Ca(t,e),n)}var O0e=1/0;function U9(t){var e=t==null?0:t.length;return e?zo(t,O0e):[]}function w0e(t,e){var n=t==null?0:t.length;return n?(e=e===void 0?1:tr(e),zo(t,e)):[]}var S0e=512;function x0e(t){return rd(t,S0e)}var C0e=bR("floor"),E0e=C0e,T0e="Expected a function",k0e=8,P0e=32,A0e=128,M0e=256;function q9(t){return sd(function(e){var n=e.length,r=n,i=ml.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new TypeError(T0e);if(i&&!a&&m1(o)=="wrapper")var a=new ml([],!0)}for(r=a?r:n;++r<n;){o=e[r];var s=m1(o),l=s=="wrapper"?iR(o):void 0;l&&ak(l[0])&&l[1]==(A0e|k0e|P0e|M0e)&&!l[4].length&&l[9]==1?a=a[m1(l[0])].apply(a,l[3]):a=o.length==1&&ak(o)?a[s]():a.thru(o)}return function(){var u=arguments,c=u[0];if(a&&u.length==1&&Qn(c))return a.plant(c).value();for(var d=0,f=n?e[d].apply(this,u):c;++d<n;)f=e[d].call(this,f);return f}})}var R0e=q9(),$0e=R0e,N0e=q9(!0),D0e=N0e;function L0e(t,e){return t==null?t:AR(t,lc(e),ss)}function I0e(t,e){return t==null?t:$9(t,lc(e),ss)}function B0e(t,e){return t&&sc(t,lc(e))}function F0e(t,e){return t&&NR(t,lc(e))}function Ug(t){for(var e=-1,n=t==null?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}function Px(t,e){return Lf(e,function(n){return td(t[n])})}function V0e(t){return t==null?[]:Px(t,co(t))}function j0e(t){return t==null?[]:Px(t,ss(t))}var z0e=Object.prototype,Q0e=z0e.hasOwnProperty,H0e=Cx(function(t,e,n){Q0e.call(t,n)?t[n].push(e):id(t,n,[e])}),W0e=H0e;function LR(t,e){return t>e}function Ax(t){return function(e,n){return typeof e=="string"&&typeof n=="string"||(e=cl(e),n=cl(n)),t(e,n)}}var U0e=Ax(LR),q0e=U0e,Y0e=Ax(function(t,e){return t>=e}),X0e=Y0e,Z0e=Object.prototype,G0e=Z0e.hasOwnProperty;function K0e(t,e){return t!=null&&G0e.call(t,e)}function qg(t,e){return t!=null&&w9(t,e,K0e)}var J0e=Math.max,ebe=Math.min;function tbe(t,e,n){return t>=ebe(e,n)&&t<J0e(e,n)}function nbe(t,e,n){return e=Fc(e),n===void 0?(n=e,e=0):n=Fc(n),t=cl(t),tbe(t,e,n)}var rbe="[object String]";function Mx(t){return typeof t=="string"||!Qn(t)&&$i(t)&&ka(t)==rbe}function IR(t,e){return Ci(e,function(n){return t[n]})}function Vm(t){return t==null?[]:IR(t,co(t))}var ibe=Math.max;function obe(t,e,n,r){t=as(t)?t:Vm(t),n=n&&!r?tr(n):0;var i=t.length;return n<0&&(n=ibe(i+n,0)),Mx(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Nm(t,e,n)>-1}var abe=Math.max;function Y9(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:tr(n);return i<0&&(i=abe(r+i,0)),Nm(t,e,i)}function sbe(t){var e=t==null?0:t.length;return e?yl(t,0,-1):[]}var lbe=Math.min;function BR(t,e,n){for(var r=n?$R:yx,i=t[0].length,o=t.length,a=o,s=Array(o),l=1/0,u=[];a--;){var c=t[a];a&&e&&(c=Ci(c,Ls(e))),l=lbe(c.length,l),s[a]=!n&&(e||i>=120&&c.length>=120)?new Kh(a&&c):void 0}c=t[0];var d=-1,f=s[0];e:for(;++d<i&&u.length<l;){var h=c[d],m=e?e(h):h;if(h=n||h!==0?h:0,!(f?f0(f,m):r(u,m,n))){for(a=o;--a;){var g=s[a];if(!(g?f0(g,m):r(t[a],m,n)))continue e}f&&f.push(m),u.push(h)}}return u}function FR(t){return zi(t)?t:[]}var ube=cr(function(t){var e=Ci(t,FR);return e.length&&e[0]===t[0]?BR(e):[]}),cbe=ube,dbe=cr(function(t){var e=ns(t),n=Ci(t,FR);return e===ns(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?BR(n,Un(e)):[]}),fbe=dbe,hbe=cr(function(t){var e=ns(t),n=Ci(t,FR);return e=typeof e=="function"?e:void 0,e&&n.pop(),n.length&&n[0]===t[0]?BR(n,void 0,e):[]}),pbe=hbe;function gbe(t,e,n,r){return sc(t,function(i,o,a){e(r,n(i),o,a)}),r}function X9(t,e){return function(n,r){return gbe(n,t,e(r),{})}}var mbe=Object.prototype,vbe=mbe.toString,ybe=X9(function(t,e,n){e!=null&&typeof e.toString!="function"&&(e=vbe.call(e)),t[e]=n},oR(Pa)),bbe=ybe,Z9=Object.prototype,_be=Z9.hasOwnProperty,Obe=Z9.toString,wbe=X9(function(t,e,n){e!=null&&typeof e.toString!="function"&&(e=Obe.call(e)),_be.call(t,e)?t[e].push(n):t[e]=[n]},Un),Sbe=wbe;function G9(t,e){return e.length<2?t:bp(t,yl(e,0,-1))}function bb(t,e,n){e=$f(e,t),t=G9(t,e);var r=t==null?t:t[ac(ns(e))];return r==null?void 0:Ds(r,t,n)}var xbe=cr(bb),Cbe=xbe,Ebe=cr(function(t,e,n){var r=-1,i=typeof e=="function",o=as(t)?Array(t.length):[];return If(t,function(a){o[++r]=i?Ds(e,a,n):bb(a,e,n)}),o}),Tbe=Ebe,kbe="[object ArrayBuffer]";function Pbe(t){return $i(t)&&ka(t)==kbe}var a5=vl&&vl.isArrayBuffer,Abe=a5?Ls(a5):Pbe,Mbe=Abe,Rbe="[object Boolean]";function fw(t){return t===!0||t===!1||$i(t)&&ka(t)==Rbe}var $be="[object Date]";function Nbe(t){return $i(t)&&ka(t)==$be}var s5=vl&&vl.isDate,Dbe=s5?Ls(s5):Nbe,Lbe=Dbe;function Ibe(t){return $i(t)&&t.nodeType===1&&!mb(t)}var Bbe="[object Map]",Fbe="[object Set]",Vbe=Object.prototype,jbe=Vbe.hasOwnProperty;function VR(t){if(t==null)return!0;if(as(t)&&(Qn(t)||typeof t=="string"||typeof t.splice=="function"||ff(t)||Im(t)||Zh(t)))return!t.length;var e=Zu(t);if(e==Bbe||e==Fbe)return!t.size;if(pb(t))return!uR(t).length;for(var n in t)if(jbe.call(t,n))return!1;return!0}function so(t,e){return vb(t,e)}function zbe(t,e,n){n=typeof n=="function"?n:void 0;var r=n?n(t,e):void 0;return r===void 0?vb(t,e,void 0,n):!!r}var Qbe=Oo.isFinite;function Hbe(t){return typeof t=="number"&&Qbe(t)}function K9(t){return typeof t=="number"&&t==tr(t)}function Wbe(t,e){return t===e||ER(t,e,TR(e))}function Ube(t,e,n){return n=typeof n=="function"?n:void 0,ER(t,e,TR(e),n)}var qbe="[object Number]";function J9(t){return typeof t=="number"||$i(t)&&ka(t)==qbe}function Ybe(t){return J9(t)&&t!=+t}var Xbe=g1?td:lR,Zbe=Xbe,Gbe="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function Kbe(t){if(Zbe(t))throw new Error(Gbe);return p7(t)}function Dr(t){return t==null}function Jbe(t){return t===null}var e_e="[object RegExp]";function t_e(t){return $i(t)&&ka(t)==e_e}var l5=vl&&vl.isRegExp,n_e=l5?Ls(l5):t_e,jR=n_e,u5=9007199254740991;function r_e(t){return K9(t)&&t>=-u5&&t<=u5}function Wc(t){return t===void 0}var i_e="[object WeakMap]";function o_e(t){return $i(t)&&Zu(t)==i_e}var a_e="[object WeakSet]";function s_e(t){return $i(t)&&ka(t)==a_e}var l_e=1;function u_e(t){return Un(typeof t=="function"?t:dl(t,l_e))}var c_e=Array.prototype,d_e=c_e.join;function f_e(t,e){return t==null?"":d_e.call(t,e)}var h_e=Fm(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),p_e=h_e,g_e=Cx(function(t,e,n){id(t,n,e)}),m_e=g_e;function v_e(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}var y_e=Math.max,b_e=Math.min;function __e(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r;return n!==void 0&&(i=tr(n),i=i<0?y_e(r+i,0):b_e(i,r-1)),e===e?v_e(t,e,i):vx(t,O7,i,!0)}var O_e=Fm(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),w_e=O_e,S_e=z7("toLowerCase"),x_e=S_e;function zR(t,e){return t<e}var C_e=Ax(zR),E_e=C_e,T_e=Ax(function(t,e){return t<=e}),k_e=T_e;function eQ(t,e){var n={};return e=Un(e),sc(t,function(r,i,o){id(n,e(r,i,o),r)}),n}function P_e(t,e){var n={};return e=Un(e),sc(t,function(r,i,o){id(n,i,e(r,i,o))}),n}var A_e=1;function M_e(t){return O9(dl(t,A_e))}var R_e=1;function $_e(t,e){return S9(t,dl(e,R_e))}function Rx(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(a!=null&&(s===void 0?a===a&&!$s(a):n(a,s)))var s=a,l=o}return l}function N_e(t){return t&&t.length?Rx(t,Pa,LR):void 0}function D_e(t,e){return t&&t.length?Rx(t,Un(e),LR):void 0}function QR(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==void 0&&(n=n===void 0?o:n+o)}return n}var L_e=0/0;function tQ(t,e){var n=t==null?0:t.length;return n?QR(t,e)/n:L_e}function I_e(t){return tQ(t,Pa)}function B_e(t,e){return tQ(t,Un(e))}var F_e=Lm(function(t,e,n){Ex(t,e,n)}),Jh=F_e,V_e=cr(function(t,e){return function(n){return bb(n,t,e)}}),j_e=V_e,z_e=cr(function(t,e){return function(n){return bb(t,n,e)}}),Q_e=z_e;function H_e(t){return t&&t.length?Rx(t,Pa,zR):void 0}function W_e(t,e){return t&&t.length?Rx(t,Un(e),zR):void 0}function nQ(t,e,n){var r=co(e),i=Px(e,r),o=!(_i(n)&&"chain"in n)||!!n.chain,a=td(t);return Cl(i,function(s){var l=e[s];t[s]=l,a&&(t.prototype[s]=function(){var u=this.__chain__;if(o||u){var c=t(this.__wrapped__),d=c.__actions__=Xa(this.__actions__);return d.push({func:l,args:arguments,thisArg:t}),c.__chain__=u,c}return l.apply(t,Nf([this.value()],arguments))})}),t}var U_e=gx(function(t,e){return t*e},1),q_e=U_e,Y_e="Expected a function";function _b(t){if(typeof t!="function")throw new TypeError(Y_e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function X_e(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}var Z_e="[object Map]",G_e="[object Set]",hT=sa?sa.iterator:void 0;function rQ(t){if(!t)return[];if(as(t))return Mx(t)?au(t):Xa(t);if(hT&&t[hT])return X_e(t[hT]());var e=Zu(t),n=e==Z_e?CR:e==G_e?xx:Vm;return n(t)}function K_e(){this.__values__===void 0&&(this.__values__=rQ(this.value()));var t=this.__index__>=this.__values__.length,e=t?void 0:this.__values__[this.__index__++];return{done:t,value:e}}function iQ(t,e){var n=t.length;if(!!n)return e+=e<0?n:0,nd(e,n)?t[e]:void 0}function J_e(t,e){return t&&t.length?iQ(t,tr(e)):void 0}function eOe(t){return t=tr(t),cr(function(e){return iQ(e,t)})}function HR(t,e){return e=$f(e,t),t=G9(t,e),t==null||delete t[ac(ns(e))]}function tOe(t){return mb(t)?void 0:t}var nOe=1,rOe=2,iOe=4,oOe=sd(function(t,e){var n={};if(t==null)return n;var r=!1;e=Ci(e,function(o){return o=$f(o,t),r||(r=o.length>1),o}),oc(t,wR(t),n),r&&(n=dl(n,nOe|rOe|iOe,tOe));for(var i=e.length;i--;)HR(n,e[i]);return n}),oQ=oOe;function Ob(t,e,n,r){if(!_i(t))return t;e=$f(e,t);for(var i=-1,o=e.length,a=o-1,s=t;s!=null&&++i<o;){var l=ac(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=a){var c=s[l];u=r?r(c,l,s):void 0,u===void 0&&(u=_i(c)?c:nd(e[i+1])?[]:{})}hb(s,l,u),s=s[l]}return t}function aQ(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=bp(t,a);n(s,a)&&Ob(o,$f(a,t),s)}return o}function sQ(t,e){if(t==null)return{};var n=Ci(wR(t),function(r){return[r]});return e=Un(e),aQ(t,n,function(r,i){return e(r,i[0])})}function aOe(t,e){return sQ(t,_b(Un(e)))}function sOe(t){return N7(2,t)}function lOe(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function lQ(t,e){if(t!==e){var n=t!==void 0,r=t===null,i=t===t,o=$s(t),a=e!==void 0,s=e===null,l=e===e,u=$s(e);if(!s&&!u&&!o&&t>e||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}function uOe(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var l=lQ(i[r],o[r]);if(l){if(r>=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return t.index-e.index}function uQ(t,e,n){e.length?e=Ci(e,function(o){return Qn(o)?function(a){return bp(a,o.length===1?o[0]:o)}:o}):e=[Pa];var r=-1;e=Ci(e,Ls(Un));var i=H9(t,function(o,a,s){var l=Ci(e,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return lOe(i,function(o,a){return uOe(o,a,n)})}function cOe(t,e,n,r){return t==null?[]:(Qn(e)||(e=e==null?[]:[e]),n=r?void 0:n,Qn(n)||(n=n==null?[]:[n]),uQ(t,e,n))}function WR(t){return sd(function(e){return e=Ci(e,Ls(Un)),cr(function(n){var r=this;return t(e,function(i){return Ds(i,r,n)})})})}var dOe=WR(Ci),fOe=dOe,hOe=cr,pOe=hOe,gOe=Math.min,mOe=pOe(function(t,e){e=e.length==1&&Qn(e[0])?Ci(e[0],Ls(Un)):Ci(zo(e,1),Ls(Un));var n=e.length;return cr(function(r){for(var i=-1,o=gOe(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ds(t,this,r)})}),vOe=mOe,yOe=WR(F9),bOe=yOe,_Oe=WR(xR),OOe=_Oe,wOe=9007199254740991,SOe=Math.floor;function gk(t,e){var n="";if(!t||e<1||e>wOe)return n;do e%2&&(n+=t),e=SOe(e/2),e&&(t+=t);while(e);return n}var xOe=PR("length"),COe=xOe,cQ="\\ud800-\\udfff",EOe="\\u0300-\\u036f",TOe="\\ufe20-\\ufe2f",kOe="\\u20d0-\\u20ff",POe=EOe+TOe+kOe,AOe="\\ufe0e\\ufe0f",MOe="["+cQ+"]",mk="["+POe+"]",vk="\\ud83c[\\udffb-\\udfff]",ROe="(?:"+mk+"|"+vk+")",dQ="[^"+cQ+"]",fQ="(?:\\ud83c[\\udde6-\\uddff]){2}",hQ="[\\ud800-\\udbff][\\udc00-\\udfff]",$Oe="\\u200d",pQ=ROe+"?",gQ="["+AOe+"]?",NOe="(?:"+$Oe+"(?:"+[dQ,fQ,hQ].join("|")+")"+gQ+pQ+")*",DOe=gQ+pQ+NOe,LOe="(?:"+[dQ+mk+"?",mk,fQ,hQ,MOe].join("|")+")",c5=RegExp(vk+"(?="+vk+")|"+LOe+DOe,"g");function IOe(t){for(var e=c5.lastIndex=0;c5.test(t);)++e;return e}function jm(t){return Bm(t)?IOe(t):COe(t)}var BOe=Math.ceil;function hw(t,e){e=e===void 0?" ":Ns(e);var n=e.length;if(n<2)return n?gk(e,t):e;var r=gk(e,BOe(t/jm(e)));return Bm(e)?Df(au(r),0,t).join(""):r.slice(0,t)}var FOe=Math.ceil,VOe=Math.floor;function jOe(t,e,n){t=qr(t),e=tr(e);var r=e?jm(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return hw(VOe(i),n)+t+hw(FOe(i),n)}function zOe(t,e,n){t=qr(t),e=tr(e);var r=e?jm(t):0;return e&&r<e?t+hw(e-r,n):t}function QOe(t,e,n){t=qr(t),e=tr(e);var r=e?jm(t):0;return e&&r<e?hw(e-r,n)+t:t}var HOe=/^\s+/,WOe=Oo.parseInt;function UOe(t,e,n){return n||e==null?e=0:e&&(e=+e),WOe(qr(t).replace(HOe,""),e||0)}var qOe=32,UR=cr(function(t,e){var n=df(e,Dm(UR));return rd(t,qOe,void 0,e,n)});UR.placeholder={};var mQ=UR,YOe=64,qR=cr(function(t,e){var n=df(e,Dm(qR));return rd(t,YOe,void 0,e,n)});qR.placeholder={};var XOe=qR,ZOe=Cx(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),GOe=ZOe;function KOe(t,e){return aQ(t,e,function(n,r){return kR(t,r)})}var JOe=sd(function(t,e){return t==null?{}:KOe(t,e)}),vo=JOe;function e1e(t){for(var e,n=this;n instanceof mx;){var r=y7(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e}function t1e(t){return function(e){return t==null?void 0:bp(t,e)}}function n1e(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}var r1e=Array.prototype,d5=r1e.splice;function YR(t,e,n,r){var i=r?n1e:Nm,o=-1,a=e.length,s=t;for(t===e&&(e=Xa(e)),n&&(s=Ci(t,Ls(n)));++o<a;)for(var l=0,u=e[o],c=n?n(u):u;(l=i(s,c,l,r))>-1;)s!==t&&d5.call(s,l,1),d5.call(t,l,1);return t}function vQ(t,e){return t&&t.length&&e&&e.length?YR(t,e):t}var i1e=cr(vQ),o1e=i1e;function a1e(t,e,n){return t&&t.length&&e&&e.length?YR(t,e,Un(n)):t}function s1e(t,e,n){return t&&t.length&&e&&e.length?YR(t,e,void 0,n):t}var l1e=Array.prototype,u1e=l1e.splice;function yQ(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;nd(i)?u1e.call(t,i,1):HR(t,i)}}return t}var c1e=sd(function(t,e){var n=t==null?0:t.length,r=dR(t,e);return yQ(t,Ci(e,function(i){return nd(i,n)?+i:i}).sort(lQ)),r}),d1e=c1e,f1e=Math.floor,h1e=Math.random;function XR(t,e){return t+f1e(h1e()*(e-t+1))}var p1e=parseFloat,g1e=Math.min,m1e=Math.random;function v1e(t,e,n){if(n&&typeof n!="boolean"&&xa(t,e,n)&&(e=n=void 0),n===void 0&&(typeof e=="boolean"?(n=e,e=void 0):typeof t=="boolean"&&(n=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=Fc(t),e===void 0?(e=t,t=0):e=Fc(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=m1e();return g1e(t+i*(e-t+p1e("1e-"+((i+"").length-1))),e)}return XR(t,e)}var y1e=Math.ceil,b1e=Math.max;function _1e(t,e,n,r){for(var i=-1,o=b1e(y1e((e-t)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=t,t+=n;return a}function bQ(t){return function(e,n,r){return r&&typeof r!="number"&&xa(e,n,r)&&(n=r=void 0),e=Fc(e),n===void 0?(n=e,e=0):n=Fc(n),r=r===void 0?e<n?1:-1:Fc(r),_1e(e,n,r,t)}}var O1e=bQ(),w1e=O1e,S1e=bQ(!0),x1e=S1e,C1e=256,E1e=sd(function(t,e){return rd(t,C1e,void 0,void 0,void 0,e)}),T1e=E1e;function _Q(t,e,n,r,i){return i(t,function(o,a,s){n=r?(r=!1,o):e(n,o,a,s)}),n}function OQ(t,e,n){var r=Qn(t)?vR:_Q,i=arguments.length<3;return r(t,Un(e),n,i,If)}function k1e(t,e,n,r){var i=t==null?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function P1e(t,e,n){var r=Qn(t)?k1e:_Q,i=arguments.length<3;return r(t,Un(e),n,i,N9)}function A1e(t,e){var n=Qn(t)?Lf:j9;return n(t,_b(Un(e)))}function M1e(t,e){var n=[];if(!(t&&t.length))return n;var r=-1,i=[],o=t.length;for(e=Un(e);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return yQ(t,i),n}function R1e(t,e,n){return(n?xa(t,e,n):e===void 0)?e=1:e=tr(e),gk(qr(t),e)}function $1e(){var t=arguments,e=qr(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var N1e="Expected a function";function D1e(t,e){if(typeof t!="function")throw new TypeError(N1e);return e=e===void 0?e:tr(e),cr(t,e)}function L1e(t,e,n){e=$f(e,t);var r=-1,i=e.length;for(i||(i=1,t=void 0);++r<i;){var o=t==null?void 0:t[ac(e[r])];o===void 0&&(r=i,o=n),t=td(o)?o.call(t):o}return t}var I1e=Array.prototype,B1e=I1e.reverse;function yk(t){return t==null?t:B1e.call(t)}var F1e=bR("round"),V1e=F1e;function wQ(t){var e=t.length;return e?t[XR(0,e-1)]:void 0}function j1e(t){return wQ(Vm(t))}function z1e(t){var e=Qn(t)?wQ:j1e;return e(t)}function $x(t,e){var n=-1,r=t.length,i=r-1;for(e=e===void 0?r:e;++n<e;){var o=XR(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}function Q1e(t,e){return $x(Xa(t),_p(e,0,t.length))}function H1e(t,e){var n=Vm(t);return $x(n,_p(e,0,n.length))}function W1e(t,e,n){(n?xa(t,e,n):e===void 0)?e=1:e=tr(e);var r=Qn(t)?Q1e:H1e;return r(t,e)}function ZR(t,e,n){return t==null?t:Ob(t,e,n)}function U1e(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:Ob(t,e,n,r)}function q1e(t){return $x(Xa(t))}function Y1e(t){return $x(Vm(t))}function X1e(t){var e=Qn(t)?q1e:Y1e;return e(t)}var Z1e="[object Map]",G1e="[object Set]";function K1e(t){if(t==null)return 0;if(as(t))return Mx(t)?jm(t):t.length;var e=Zu(t);return e==Z1e||e==G1e?t.size:uR(t).length}function J1e(t,e,n){var r=t==null?0:t.length;return r?(n&&typeof n!="number"&&xa(t,e,n)?(e=0,n=r):(e=e==null?0:tr(e),n=n===void 0?r:tr(n)),yl(t,e,n)):[]}var ewe=Fm(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),twe=ewe;function nwe(t,e){var n;return If(t,function(r,i,o){return n=e(r,i,o),!n}),!!n}function rwe(t,e,n){var r=Qn(t)?xR:nwe;return n&&xa(t,e,n)&&(e=void 0),r(t,Un(e))}var iwe=cr(function(t,e){if(t==null)return[];var n=e.length;return n>1&&xa(t,e[0],e[1])?e=[]:n>2&&xa(e[0],e[1],e[2])&&(e=[e[0]]),uQ(t,zo(e,1),[])}),SQ=iwe,owe=4294967295,awe=owe-1,swe=Math.floor,lwe=Math.min;function GR(t,e,n,r){var i=0,o=t==null?0:t.length;if(o===0)return 0;e=n(e);for(var a=e!==e,s=e===null,l=$s(e),u=e===void 0;i<o;){var c=swe((i+o)/2),d=n(t[c]),f=d!==void 0,h=d===null,m=d===d,g=$s(d);if(a)var y=r||m;else u?y=m&&(r||f):s?y=m&&f&&(r||!h):l?y=m&&f&&!h&&(r||!g):h||g?y=!1:y=r?d<=e:d<e;y?i=c+1:o=c}return lwe(o,awe)}var uwe=4294967295,cwe=uwe>>>1;function Nx(t,e,n){var r=0,i=t==null?r:t.length;if(typeof e=="number"&&e===e&&i<=cwe){for(;r<i;){var o=r+i>>>1,a=t[o];a!==null&&!$s(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return GR(t,e,Pa,n)}function dwe(t,e){return Nx(t,e)}function fwe(t,e,n){return GR(t,e,Un(n))}function hwe(t,e){var n=t==null?0:t.length;if(n){var r=Nx(t,e);if(r<n&&fu(t[r],e))return r}return-1}function pwe(t,e){return Nx(t,e,!0)}function gwe(t,e,n){return GR(t,e,Un(n),!0)}function mwe(t,e){var n=t==null?0:t.length;if(n){var r=Nx(t,e,!0)-1;if(fu(t[r],e))return r}return-1}function xQ(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!fu(s,l)){var l=s;o[i++]=a===0?0:a}}return o}function vwe(t){return t&&t.length?xQ(t):[]}function ywe(t,e){return t&&t.length?xQ(t,Un(e)):[]}var bwe=4294967295;function _we(t,e,n){return n&&typeof n!="number"&&xa(t,e,n)&&(e=n=void 0),n=n===void 0?bwe:n>>>0,n?(t=qr(t),t&&(typeof e=="string"||e!=null&&!jR(e))&&(e=Ns(e),!e&&Bm(t))?Df(au(t),0,n):t.split(e,n)):[]}var Owe="Expected a function",wwe=Math.max;function Swe(t,e){if(typeof t!="function")throw new TypeError(Owe);return e=e==null?0:wwe(tr(e),0),cr(function(n){var r=n[e],i=Df(n,0,e);return r&&Nf(i,r),Ds(t,this,i)})}var xwe=Fm(function(t,e,n){return t+(n?" ":"")+mR(e)}),Cwe=xwe;function Ewe(t,e,n){return t=qr(t),n=n==null?0:_p(tr(n),0,t.length),e=Ns(e),t.slice(n,n+e.length)==e}function Twe(){return{}}function kwe(){return""}function Pwe(){return!0}var Awe=gx(function(t,e){return t-e},0),Mwe=Awe;function Rwe(t){return t&&t.length?QR(t,Pa):0}function $we(t,e){return t&&t.length?QR(t,Un(e)):0}function Nwe(t){var e=t==null?0:t.length;return e?yl(t,1,e):[]}function Dwe(t,e,n){return t&&t.length?(e=n||e===void 0?1:tr(e),yl(t,0,e<0?0:e)):[]}function Lwe(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:tr(e),e=r-e,yl(t,e<0?0:e,r)):[]}function Iwe(t,e){return t&&t.length?Tx(t,Un(e),!1,!0):[]}function Bwe(t,e){return t&&t.length?Tx(t,Un(e)):[]}function Fwe(t,e){return e(t),t}var CQ=Object.prototype,Vwe=CQ.hasOwnProperty;function f5(t,e,n,r){return t===void 0||fu(t,CQ[n])&&!Vwe.call(r,n)?e:t}var jwe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function zwe(t){return"\\"+jwe[t]}var Qwe=/<%=([\s\S]+?)%>/g,EQ=Qwe,Hwe=/<%-([\s\S]+?)%>/g,Wwe=Hwe,Uwe=/<%([\s\S]+?)%>/g,qwe=Uwe,Ywe={escape:Wwe,evaluate:qwe,interpolate:EQ,variable:"",imports:{_:{escape:I9}}},bk=Ywe,Xwe="Invalid `variable` option passed into `_.template`",Zwe=/\b__p \+= '';/g,Gwe=/\b(__p \+=) '' \+/g,Kwe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Jwe=/[()=,{}\[\]\/\s]/,eSe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Z_=/($^)/,tSe=/['\n\r\u2028\u2029\\]/g,nSe=Object.prototype,h5=nSe.hasOwnProperty;function rSe(t,e,n){var r=bk.imports._.templateSettings||bk;n&&xa(t,e,n)&&(e=void 0),t=qr(t),e=cw({},e,r,f5);var i=cw({},e.imports,r.imports,f5),o=co(i),a=IR(i,o),s,l,u=0,c=e.interpolate||Z_,d="__p += '",f=RegExp((e.escape||Z_).source+"|"+c.source+"|"+(c===EQ?eSe:Z_).source+"|"+(e.evaluate||Z_).source+"|$","g"),h=h5.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+`
  4. `:"";t.replace(f,function(y,b,w,O,S,x){return w||(w=O),d+=t.slice(u,x).replace(tSe,zwe),b&&(s=!0,d+=`' +
  5. __e(`+b+`) +
  6. '`),S&&(l=!0,d+=`';
  7. `+S+`;
  8. __p += '`),w&&(d+=`' +
  9. ((__t = (`+w+`)) == null ? '' : __t) +
  10. '`),u=x+y.length,y}),d+=`';
  11. `;var m=h5.call(e,"variable")&&e.variable;if(!m)d=`with (obj) {
  12. `+d+`
  13. }
  14. `;else if(Jwe.test(m))throw new Error(Xwe);d=(l?d.replace(Zwe,""):d).replace(Gwe,"$1").replace(Kwe,"$1;"),d="function("+(m||"obj")+`) {
  15. `+(m?"":`obj || (obj = {});
  16. `)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(l?`, __j = Array.prototype.join;
  17. function print() { __p += __j.call(arguments, '') }
  18. `:`;
  19. `)+d+`return __p
  20. }`;var g=$7(function(){return Function(o,h+"return "+d).apply(void 0,a)});if(g.source=d,hR(g))throw g;return g}var iSe="Expected a function";function Vc(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(iSe);return _i(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jo(t,e,{leading:r,maxWait:e,trailing:i})}function wb(t,e){return e(t)}var oSe=9007199254740991,pT=4294967295,aSe=Math.min;function sSe(t,e){if(t=tr(t),t<1||t>oSe)return[];var n=pT,r=aSe(t,pT);e=lc(e),t-=pT;for(var i=sR(r,e);++n<t;)e(n);return i}function lSe(){return this}function TQ(t,e){var n=t;return n instanceof Sr&&(n=n.value()),vR(e,function(r,i){return i.func.apply(i.thisArg,Nf([r],i.args))},n)}function gT(){return TQ(this.__wrapped__,this.__actions__)}function uSe(t){return qr(t).toLowerCase()}function cSe(t){return Qn(t)?Ci(t,ac):$s(t)?[t]:Xa(M7(qr(t)))}var p5=9007199254740991;function dSe(t){return t?_p(tr(t),-p5,p5):t===0?t:0}function fSe(t){return qr(t).toUpperCase()}function hSe(t,e,n){var r=Qn(t),i=r||ff(t)||Im(t);if(e=Un(e),n==null){var o=t&&t.constructor;i?n=r?new o:[]:_i(t)?n=td(o)?$m(Sx(t)):{}:n={}}return(i?Cl:sc)(t,function(a,s,l){return e(n,a,s,l)}),n}function kQ(t,e){for(var n=t.length;n--&&Nm(e,t[n],0)>-1;);return n}function PQ(t,e){for(var n=-1,r=t.length;++n<r&&Nm(e,t[n],0)>-1;);return n}function pSe(t,e,n){if(t=qr(t),t&&(n||e===void 0))return h7(t);if(!t||!(e=Ns(e)))return t;var r=au(t),i=au(e),o=PQ(r,i),a=kQ(r,i)+1;return Df(r,o,a).join("")}function gSe(t,e,n){if(t=qr(t),t&&(n||e===void 0))return t.slice(0,f7(t)+1);if(!t||!(e=Ns(e)))return t;var r=au(t),i=kQ(r,au(e))+1;return Df(r,0,i).join("")}var mSe=/^\s+/;function vSe(t,e,n){if(t=qr(t),t&&(n||e===void 0))return t.replace(mSe,"");if(!t||!(e=Ns(e)))return t;var r=au(t),i=PQ(r,au(e));return Df(r,i).join("")}var ySe=30,bSe="...",_Se=/\w*$/;function OSe(t,e){var n=ySe,r=bSe;if(_i(e)){var i="separator"in e?e.separator:i;n="length"in e?tr(e.length):n,r="omission"in e?Ns(e.omission):r}t=qr(t);var o=t.length;if(Bm(t)){var a=au(t);o=a.length}if(n>=o)return t;var s=n-jm(r);if(s<1)return r;var l=a?Df(a,0,s).join(""):t.slice(0,s);if(i===void 0)return l+r;if(a&&(s+=l.length-s),jR(i)){if(t.slice(s).search(i)){var u,c=l;for(i.global||(i=RegExp(i.source,qr(_Se.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(t.indexOf(Ns(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r}function wSe(t){return x7(t,1)}var SSe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xSe=yR(SSe),CSe=xSe,AQ=/&(?:amp|lt|gt|quot|#39);/g,ESe=RegExp(AQ.source);function TSe(t){return t=qr(t),t&&ESe.test(t)?t.replace(AQ,CSe):t}var kSe=1/0,PSe=Pg&&1/xx(new Pg([,-0]))[1]==kSe?function(t){return new Pg(t)}:Tg,ASe=PSe,MSe=200;function pf(t,e,n){var r=-1,i=yx,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=$R;else if(o>=MSe){var u=e?null:ASe(t);if(u)return xx(u);a=!1,i=f0,l=new Kh}else l=e?[]:s;e:for(;++r<o;){var c=t[r],d=e?e(c):c;if(c=n||c!==0?c:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;e&&l.push(d),s.push(c)}else i(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s}var RSe=cr(function(t){return pf(zo(t,1,zi,!0))}),y1=RSe,$Se=cr(function(t){var e=ns(t);return zi(e)&&(e=void 0),pf(zo(t,1,zi,!0),Un(e))}),NSe=$Se,DSe=cr(function(t){var e=ns(t);return e=typeof e=="function"?e:void 0,pf(zo(t,1,zi,!0),void 0,e)}),LSe=DSe;function ISe(t){return t&&t.length?pf(t):[]}function BSe(t,e){return t&&t.length?pf(t,Un(e)):[]}function FSe(t,e){return e=typeof e=="function"?e:void 0,t&&t.length?pf(t,void 0,e):[]}var VSe=0;function jSe(t){var e=++VSe;return qr(t)+e}function zSe(t,e){return t==null?!0:HR(t,e)}var QSe=Math.max;function KR(t){if(!(t&&t.length))return[];var e=0;return t=Lf(t,function(n){if(zi(n))return e=QSe(n.length,e),!0}),sR(e,function(n){return Ci(t,PR(n))})}function MQ(t,e){if(!(t&&t.length))return[];var n=KR(t);return e==null?n:Ci(n,function(r){return Ds(e,void 0,r)})}function RQ(t,e,n,r){return Ob(t,e,n(bp(t,e)),r)}function HSe(t,e,n){return t==null?t:RQ(t,e,lc(n))}function WSe(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:RQ(t,e,lc(n),r)}var USe=Fm(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),qSe=USe;function YSe(t){return t==null?[]:IR(t,ss(t))}var XSe=cr(function(t,e){return zi(t)?yb(t,e):[]}),ZSe=XSe;function GSe(t,e){return mQ(lc(e),t)}var KSe=sd(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(o){return dR(o,t)};return e>1||this.__actions__.length||!(r instanceof Sr)||!nd(n)?this.thru(i):(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:wb,args:[i],thisArg:void 0}),new ml(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(void 0),o}))}),JSe=KSe;function exe(){return o9(this)}function txe(){var t=this.__wrapped__;if(t instanceof Sr){var e=t;return this.__actions__.length&&(e=new Sr(this)),e=e.reverse(),e.__actions__.push({func:wb,args:[yk],thisArg:void 0}),new ml(e,this.__chain__)}return this.thru(yk)}function JR(t,e,n){var r=t.length;if(r<2)return r?pf(t[0]):[];for(var i=-1,o=Array(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=yb(o[i]||a,t[s],e,n));return pf(zo(o,1),e,n)}var nxe=cr(function(t){return JR(Lf(t,zi))}),rxe=nxe,ixe=cr(function(t){var e=ns(t);return zi(e)&&(e=void 0),JR(Lf(t,zi),Un(e))}),oxe=ixe,axe=cr(function(t){var e=ns(t);return e=typeof e=="function"?e:void 0,JR(Lf(t,zi),void 0,e)}),sxe=axe,lxe=cr(KR),uxe=lxe;function $Q(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}function cxe(t,e){return $Q(t||[],e||[],hb)}function dxe(t,e){return $Q(t||[],e||[],Ob)}var fxe=cr(function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n=typeof n=="function"?(t.pop(),n):void 0,MQ(t,n)}),hxe=fxe,cn={chunk:Pge,compact:mve,concat:vve,difference:Rye,differenceBy:Nye,differenceWith:Lye,drop:Fye,dropRight:Vye,dropRightWhile:jye,dropWhile:zye,fill:u0e,findIndex:DR,findLastIndex:kx,first:o5,flatten:fR,flattenDeep:U9,flattenDepth:w0e,fromPairs:Ug,head:o5,indexOf:Y9,initial:sbe,intersection:cbe,intersectionBy:fbe,intersectionWith:pbe,join:f_e,last:ns,lastIndexOf:__e,nth:J_e,pull:o1e,pullAll:vQ,pullAllBy:a1e,pullAllWith:s1e,pullAt:d1e,remove:M1e,reverse:yk,slice:J1e,sortedIndex:dwe,sortedIndexBy:fwe,sortedIndexOf:hwe,sortedLastIndex:pwe,sortedLastIndexBy:gwe,sortedLastIndexOf:mwe,sortedUniq:vwe,sortedUniqBy:ywe,tail:Nwe,take:Dwe,takeRight:Lwe,takeRightWhile:Iwe,takeWhile:Bwe,union:y1,unionBy:NSe,unionWith:LSe,uniq:ISe,uniqBy:BSe,uniqWith:FSe,unzip:KR,unzipWith:MQ,without:ZSe,xor:rxe,xorBy:oxe,xorWith:sxe,zip:uxe,zipObject:cxe,zipObjectDeep:dxe,zipWith:hxe},ei={countBy:uye,each:jn,eachRight:r5,every:a0e,filter:Jv,find:hf,findLast:m0e,flatMap:W9,flatMapDeep:b0e,flatMapDepth:_0e,forEach:jn,forEachRight:r5,groupBy:W0e,includes:obe,invokeMap:Tbe,keyBy:m_e,map:Ca,orderBy:cOe,partition:GOe,reduce:OQ,reduceRight:P1e,reject:A1e,sample:z1e,sampleSize:W1e,shuffle:X1e,size:K1e,some:rwe,sortBy:SQ},pxe={now:v1},Di={after:Dce,ary:x7,before:N7,bind:D7,bindKey:fpe,curry:MR,curryRight:RR,debounce:jo,defer:Tye,delay:Pye,flip:x0e,memoize:gb,negate:_b,once:sOe,overArgs:vOe,partial:mQ,partialRight:XOe,rearg:T1e,rest:D1e,spread:Swe,throttle:Vc,unary:wSe,wrap:GSe},Cn={castArray:$o,clone:fk,cloneDeep:Fn,cloneDeepWith:fve,cloneWith:pve,conformsTo:tye,eq:fu,gt:q0e,gte:X0e,isArguments:Zh,isArray:Qn,isArrayBuffer:Mbe,isArrayLike:as,isArrayLikeObject:zi,isBoolean:fw,isBuffer:ff,isDate:Lbe,isElement:Ibe,isEmpty:VR,isEqual:so,isEqualWith:zbe,isError:hR,isFinite:Hbe,isFunction:td,isInteger:K9,isLength:_x,isMap:h9,isMatch:Wbe,isMatchWith:Ube,isNaN:Ybe,isNative:Kbe,isNil:Dr,isNull:Jbe,isNumber:J9,isObject:_i,isObjectLike:$i,isPlainObject:mb,isRegExp:jR,isSafeInteger:r_e,isSet:p9,isString:Mx,isSymbol:$s,isTypedArray:Im,isUndefined:Wc,isWeakMap:o_e,isWeakSet:s_e,lt:E_e,lte:k_e,toArray:rQ,toFinite:Fc,toInteger:tr,toLength:V9,toNumber:cl,toPlainObject:P9,toSafeInteger:dSe,toString:qr},Aa={add:Ece,ceil:Ege,divide:Bye,floor:E0e,max:N_e,maxBy:D_e,mean:I_e,meanBy:B_e,min:H_e,minBy:W_e,multiply:q_e,round:V1e,subtract:Mwe,sum:Rwe,sumBy:$we},e$={clamp:Age,inRange:nbe,random:v1e},Hn={assign:$r,assignIn:N4,assignInWith:cw,assignWith:che,at:Yhe,create:cye,defaults:_ye,defaultsDeep:xye,entries:Gu,entriesIn:i5,extend:N4,extendWith:cw,findKey:f0e,findLastKey:v0e,forIn:L0e,forInRight:I0e,forOwn:B0e,forOwnRight:F0e,functions:V0e,functionsIn:j0e,get:Wr,has:qg,hasIn:kR,invert:bbe,invertBy:Sbe,invoke:Cbe,keys:co,keysIn:ss,mapKeys:eQ,mapValues:P_e,merge:Jh,mergeWith:M9,omit:oQ,omitBy:aOe,pick:vo,pickBy:sQ,result:L1e,set:ZR,setWith:U1e,toPairs:Gu,toPairsIn:i5,transform:hSe,unset:zSe,update:HSe,updateWith:WSe,values:Vm,valuesIn:YSe},uc={at:JSe,chain:o9,commit:gve,lodash:pe,next:K_e,plant:e1e,reverse:txe,tap:Fwe,thru:wb,toIterator:lSe,toJSON:gT,value:gT,valueOf:gT,wrapperChain:exe},jr={camelCase:wge,capitalize:Q7,deburr:H7,endsWith:Uye,escape:I9,escapeRegExp:i0e,kebabCase:p_e,lowerCase:w_e,lowerFirst:x_e,pad:jOe,padEnd:zOe,padStart:QOe,parseInt:UOe,repeat:R1e,replace:$1e,snakeCase:twe,split:_we,startCase:Cwe,startsWith:Ewe,template:rSe,templateSettings:bk,toLower:uSe,toUpper:fSe,trim:pSe,trimEnd:gSe,trimStart:vSe,truncate:OSe,unescape:TSe,upperCase:qSe,upperFirst:mR,words:i9},Yr={attempt:$7,bindAll:lpe,cond:Gve,conforms:eye,constant:oR,defaultTo:vye,flow:$0e,flowRight:D0e,identity:Pa,iteratee:u_e,matches:M_e,matchesProperty:$_e,method:j_e,methodOf:Q_e,mixin:nQ,noop:Tg,nthArg:eOe,over:fOe,overEvery:bOe,overSome:OOe,property:x9,propertyOf:t1e,range:w1e,rangeRight:x1e,stubArray:_R,stubFalse:lR,stubObject:Twe,stubString:kwe,stubTrue:Pwe,times:sSe,toPath:cSe,uniqueId:jSe};function gxe(){var t=new Sr(this.__wrapped__);return t.__actions__=Xa(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Xa(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Xa(this.__views__),t}function mxe(){if(this.__filtered__){var t=new Sr(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}var vxe=Math.max,yxe=Math.min;function bxe(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=yxe(e,t+a);break;case"takeRight":t=vxe(t,e-a);break}}return{start:t,end:e}}var _xe=1,Oxe=2,wxe=Math.min;function Sxe(){var t=this.__wrapped__.value(),e=this.__dir__,n=Qn(t),r=e<0,i=n?t.length:0,o=bxe(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,f=0,h=wxe(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return TQ(t,this.__actions__);var m=[];e:for(;l--&&f<h;){u+=e;for(var g=-1,y=t[u];++g<d;){var b=c[g],w=b.iteratee,O=b.type,S=w(y);if(O==Oxe)y=S;else if(!S){if(O==_xe)continue e;break e}}m[f++]=y}return m}/**
  21. * @license
  22. * Lodash (Custom Build) <https://lodash.com/>
  23. * Build: `lodash modularize exports="es" -o ./`
  24. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  25. * Released under MIT license <https://lodash.com/license>
  26. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  27. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  28. */var xxe="4.17.21",Cxe=2,Exe=1,Txe=3,NQ=4294967295,kxe=Array.prototype,Pxe=Object.prototype,DQ=Pxe.hasOwnProperty,g5=sa?sa.iterator:void 0,Axe=Math.max,m5=Math.min,t$=function(t){return function(e,n,r){if(r==null){var i=_i(n),o=i&&co(n),a=o&&o.length&&Px(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(nQ);pe.after=Di.after;pe.ary=Di.ary;pe.assign=Hn.assign;pe.assignIn=Hn.assignIn;pe.assignInWith=Hn.assignInWith;pe.assignWith=Hn.assignWith;pe.at=Hn.at;pe.before=Di.before;pe.bind=Di.bind;pe.bindAll=Yr.bindAll;pe.bindKey=Di.bindKey;pe.castArray=Cn.castArray;pe.chain=uc.chain;pe.chunk=cn.chunk;pe.compact=cn.compact;pe.concat=cn.concat;pe.cond=Yr.cond;pe.conforms=Yr.conforms;pe.constant=Yr.constant;pe.countBy=ei.countBy;pe.create=Hn.create;pe.curry=Di.curry;pe.curryRight=Di.curryRight;pe.debounce=Di.debounce;pe.defaults=Hn.defaults;pe.defaultsDeep=Hn.defaultsDeep;pe.defer=Di.defer;pe.delay=Di.delay;pe.difference=cn.difference;pe.differenceBy=cn.differenceBy;pe.differenceWith=cn.differenceWith;pe.drop=cn.drop;pe.dropRight=cn.dropRight;pe.dropRightWhile=cn.dropRightWhile;pe.dropWhile=cn.dropWhile;pe.fill=cn.fill;pe.filter=ei.filter;pe.flatMap=ei.flatMap;pe.flatMapDeep=ei.flatMapDeep;pe.flatMapDepth=ei.flatMapDepth;pe.flatten=cn.flatten;pe.flattenDeep=cn.flattenDeep;pe.flattenDepth=cn.flattenDepth;pe.flip=Di.flip;pe.flow=Yr.flow;pe.flowRight=Yr.flowRight;pe.fromPairs=cn.fromPairs;pe.functions=Hn.functions;pe.functionsIn=Hn.functionsIn;pe.groupBy=ei.groupBy;pe.initial=cn.initial;pe.intersection=cn.intersection;pe.intersectionBy=cn.intersectionBy;pe.intersectionWith=cn.intersectionWith;pe.invert=Hn.invert;pe.invertBy=Hn.invertBy;pe.invokeMap=ei.invokeMap;pe.iteratee=Yr.iteratee;pe.keyBy=ei.keyBy;pe.keys=co;pe.keysIn=Hn.keysIn;pe.map=ei.map;pe.mapKeys=Hn.mapKeys;pe.mapValues=Hn.mapValues;pe.matches=Yr.matches;pe.matchesProperty=Yr.matchesProperty;pe.memoize=Di.memoize;pe.merge=Hn.merge;pe.mergeWith=Hn.mergeWith;pe.method=Yr.method;pe.methodOf=Yr.methodOf;pe.mixin=t$;pe.negate=_b;pe.nthArg=Yr.nthArg;pe.omit=Hn.omit;pe.omitBy=Hn.omitBy;pe.once=Di.once;pe.orderBy=ei.orderBy;pe.over=Yr.over;pe.overArgs=Di.overArgs;pe.overEvery=Yr.overEvery;pe.overSome=Yr.overSome;pe.partial=Di.partial;pe.partialRight=Di.partialRight;pe.partition=ei.partition;pe.pick=Hn.pick;pe.pickBy=Hn.pickBy;pe.property=Yr.property;pe.propertyOf=Yr.propertyOf;pe.pull=cn.pull;pe.pullAll=cn.pullAll;pe.pullAllBy=cn.pullAllBy;pe.pullAllWith=cn.pullAllWith;pe.pullAt=cn.pullAt;pe.range=Yr.range;pe.rangeRight=Yr.rangeRight;pe.rearg=Di.rearg;pe.reject=ei.reject;pe.remove=cn.remove;pe.rest=Di.rest;pe.reverse=cn.reverse;pe.sampleSize=ei.sampleSize;pe.set=Hn.set;pe.setWith=Hn.setWith;pe.shuffle=ei.shuffle;pe.slice=cn.slice;pe.sortBy=ei.sortBy;pe.sortedUniq=cn.sortedUniq;pe.sortedUniqBy=cn.sortedUniqBy;pe.split=jr.split;pe.spread=Di.spread;pe.tail=cn.tail;pe.take=cn.take;pe.takeRight=cn.takeRight;pe.takeRightWhile=cn.takeRightWhile;pe.takeWhile=cn.takeWhile;pe.tap=uc.tap;pe.throttle=Di.throttle;pe.thru=wb;pe.toArray=Cn.toArray;pe.toPairs=Hn.toPairs;pe.toPairsIn=Hn.toPairsIn;pe.toPath=Yr.toPath;pe.toPlainObject=Cn.toPlainObject;pe.transform=Hn.transform;pe.unary=Di.unary;pe.union=cn.union;pe.unionBy=cn.unionBy;pe.unionWith=cn.unionWith;pe.uniq=cn.uniq;pe.uniqBy=cn.uniqBy;pe.uniqWith=cn.uniqWith;pe.unset=Hn.unset;pe.unzip=cn.unzip;pe.unzipWith=cn.unzipWith;pe.update=Hn.update;pe.updateWith=Hn.updateWith;pe.values=Hn.values;pe.valuesIn=Hn.valuesIn;pe.without=cn.without;pe.words=jr.words;pe.wrap=Di.wrap;pe.xor=cn.xor;pe.xorBy=cn.xorBy;pe.xorWith=cn.xorWith;pe.zip=cn.zip;pe.zipObject=cn.zipObject;pe.zipObjectDeep=cn.zipObjectDeep;pe.zipWith=cn.zipWith;pe.entries=Hn.toPairs;pe.entriesIn=Hn.toPairsIn;pe.extend=Hn.assignIn;pe.extendWith=Hn.assignInWith;t$(pe,pe);pe.add=Aa.add;pe.attempt=Yr.attempt;pe.camelCase=jr.camelCase;pe.capitalize=jr.capitalize;pe.ceil=Aa.ceil;pe.clamp=e$.clamp;pe.clone=Cn.clone;pe.cloneDeep=Cn.cloneDeep;pe.cloneDeepWith=Cn.cloneDeepWith;pe.cloneWith=Cn.cloneWith;pe.conformsTo=Cn.conformsTo;pe.deburr=jr.deburr;pe.defaultTo=Yr.defaultTo;pe.divide=Aa.divide;pe.endsWith=jr.endsWith;pe.eq=Cn.eq;pe.escape=jr.escape;pe.escapeRegExp=jr.escapeRegExp;pe.every=ei.every;pe.find=ei.find;pe.findIndex=cn.findIndex;pe.findKey=Hn.findKey;pe.findLast=ei.findLast;pe.findLastIndex=cn.findLastIndex;pe.findLastKey=Hn.findLastKey;pe.floor=Aa.floor;pe.forEach=ei.forEach;pe.forEachRight=ei.forEachRight;pe.forIn=Hn.forIn;pe.forInRight=Hn.forInRight;pe.forOwn=Hn.forOwn;pe.forOwnRight=Hn.forOwnRight;pe.get=Hn.get;pe.gt=Cn.gt;pe.gte=Cn.gte;pe.has=Hn.has;pe.hasIn=Hn.hasIn;pe.head=cn.head;pe.identity=Pa;pe.includes=ei.includes;pe.indexOf=cn.indexOf;pe.inRange=e$.inRange;pe.invoke=Hn.invoke;pe.isArguments=Cn.isArguments;pe.isArray=Qn;pe.isArrayBuffer=Cn.isArrayBuffer;pe.isArrayLike=Cn.isArrayLike;pe.isArrayLikeObject=Cn.isArrayLikeObject;pe.isBoolean=Cn.isBoolean;pe.isBuffer=Cn.isBuffer;pe.isDate=Cn.isDate;pe.isElement=Cn.isElement;pe.isEmpty=Cn.isEmpty;pe.isEqual=Cn.isEqual;pe.isEqualWith=Cn.isEqualWith;pe.isError=Cn.isError;pe.isFinite=Cn.isFinite;pe.isFunction=Cn.isFunction;pe.isInteger=Cn.isInteger;pe.isLength=Cn.isLength;pe.isMap=Cn.isMap;pe.isMatch=Cn.isMatch;pe.isMatchWith=Cn.isMatchWith;pe.isNaN=Cn.isNaN;pe.isNative=Cn.isNative;pe.isNil=Cn.isNil;pe.isNull=Cn.isNull;pe.isNumber=Cn.isNumber;pe.isObject=_i;pe.isObjectLike=Cn.isObjectLike;pe.isPlainObject=Cn.isPlainObject;pe.isRegExp=Cn.isRegExp;pe.isSafeInteger=Cn.isSafeInteger;pe.isSet=Cn.isSet;pe.isString=Cn.isString;pe.isSymbol=Cn.isSymbol;pe.isTypedArray=Cn.isTypedArray;pe.isUndefined=Cn.isUndefined;pe.isWeakMap=Cn.isWeakMap;pe.isWeakSet=Cn.isWeakSet;pe.join=cn.join;pe.kebabCase=jr.kebabCase;pe.last=ns;pe.lastIndexOf=cn.lastIndexOf;pe.lowerCase=jr.lowerCase;pe.lowerFirst=jr.lowerFirst;pe.lt=Cn.lt;pe.lte=Cn.lte;pe.max=Aa.max;pe.maxBy=Aa.maxBy;pe.mean=Aa.mean;pe.meanBy=Aa.meanBy;pe.min=Aa.min;pe.minBy=Aa.minBy;pe.stubArray=Yr.stubArray;pe.stubFalse=Yr.stubFalse;pe.stubObject=Yr.stubObject;pe.stubString=Yr.stubString;pe.stubTrue=Yr.stubTrue;pe.multiply=Aa.multiply;pe.nth=cn.nth;pe.noop=Yr.noop;pe.now=pxe.now;pe.pad=jr.pad;pe.padEnd=jr.padEnd;pe.padStart=jr.padStart;pe.parseInt=jr.parseInt;pe.random=e$.random;pe.reduce=ei.reduce;pe.reduceRight=ei.reduceRight;pe.repeat=jr.repeat;pe.replace=jr.replace;pe.result=Hn.result;pe.round=Aa.round;pe.sample=ei.sample;pe.size=ei.size;pe.snakeCase=jr.snakeCase;pe.some=ei.some;pe.sortedIndex=cn.sortedIndex;pe.sortedIndexBy=cn.sortedIndexBy;pe.sortedIndexOf=cn.sortedIndexOf;pe.sortedLastIndex=cn.sortedLastIndex;pe.sortedLastIndexBy=cn.sortedLastIndexBy;pe.sortedLastIndexOf=cn.sortedLastIndexOf;pe.startCase=jr.startCase;pe.startsWith=jr.startsWith;pe.subtract=Aa.subtract;pe.sum=Aa.sum;pe.sumBy=Aa.sumBy;pe.template=jr.template;pe.times=Yr.times;pe.toFinite=Cn.toFinite;pe.toInteger=tr;pe.toLength=Cn.toLength;pe.toLower=jr.toLower;pe.toNumber=Cn.toNumber;pe.toSafeInteger=Cn.toSafeInteger;pe.toString=Cn.toString;pe.toUpper=jr.toUpper;pe.trim=jr.trim;pe.trimEnd=jr.trimEnd;pe.trimStart=jr.trimStart;pe.truncate=jr.truncate;pe.unescape=jr.unescape;pe.uniqueId=Yr.uniqueId;pe.upperCase=jr.upperCase;pe.upperFirst=jr.upperFirst;pe.each=ei.forEach;pe.eachRight=ei.forEachRight;pe.first=cn.head;t$(pe,function(){var t={};return sc(pe,function(e,n){DQ.call(pe.prototype,n)||(t[n]=e)}),t}(),{chain:!1});pe.VERSION=xxe;(pe.templateSettings=jr.templateSettings).imports._=pe;Cl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){pe[t].placeholder=pe});Cl(["drop","take"],function(t,e){Sr.prototype[t]=function(n){n=n===void 0?1:Axe(tr(n),0);var r=this.__filtered__&&!e?new Sr(this):this.clone();return r.__filtered__?r.__takeCount__=m5(n,r.__takeCount__):r.__views__.push({size:m5(n,NQ),type:t+(r.__dir__<0?"Right":"")}),r},Sr.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}});Cl(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==Exe||n==Txe;Sr.prototype[t]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:Un(i),type:n}),o.__filtered__=o.__filtered__||r,o}});Cl(["head","last"],function(t,e){var n="take"+(e?"Right":"");Sr.prototype[t]=function(){return this[n](1).value()[0]}});Cl(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Sr.prototype[t]=function(){return this.__filtered__?new Sr(this):this[n](1)}});Sr.prototype.compact=function(){return this.filter(Pa)};Sr.prototype.find=function(t){return this.filter(t).head()};Sr.prototype.findLast=function(t){return this.reverse().find(t)};Sr.prototype.invokeMap=cr(function(t,e){return typeof t=="function"?new Sr(this):this.map(function(n){return bb(n,t,e)})});Sr.prototype.reject=function(t){return this.filter(_b(Un(t)))};Sr.prototype.slice=function(t,e){t=tr(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Sr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==void 0&&(e=tr(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)};Sr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()};Sr.prototype.toArray=function(){return this.take(NQ)};sc(Sr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=pe[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);!i||(pe.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof Sr,u=s[0],c=l||Qn(a),d=function(b){var w=i.apply(pe,Nf([b],s));return r&&f?w[0]:w};c&&n&&typeof u=="function"&&u.length!=1&&(l=c=!1);var f=this.__chain__,h=!!this.__actions__.length,m=o&&!f,g=l&&!h;if(!o&&c){a=g?a:new Sr(this);var y=t.apply(a,s);return y.__actions__.push({func:wb,args:[d],thisArg:void 0}),new ml(y,f)}return m&&g?t.apply(this,s):(y=this.thru(d),m?r?y.value()[0]:y.value():y)})});Cl(["pop","push","shift","sort","splice","unshift"],function(t){var e=kxe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);pe.prototype[t]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Qn(o)?o:[],i)}return this[n](function(a){return e.apply(Qn(a)?a:[],i)})}});sc(Sr.prototype,function(t,e){var n=pe[e];if(n){var r=n.name+"";DQ.call(kg,r)||(kg[r]=[]),kg[r].push({name:e,func:n})}});kg[bx(void 0,Cxe).name]=[{name:"wrapper",func:void 0}];Sr.prototype.clone=gxe;Sr.prototype.reverse=mxe;Sr.prototype.value=Sxe;pe.prototype.at=uc.at;pe.prototype.chain=uc.wrapperChain;pe.prototype.commit=uc.commit;pe.prototype.next=uc.next;pe.prototype.plant=uc.plant;pe.prototype.reverse=uc.reverse;pe.prototype.toJSON=pe.prototype.valueOf=pe.prototype.value=uc.value;pe.prototype.first=pe.prototype.head;g5&&(pe.prototype[g5]=uc.toIterator);const ai=t=>t===void 0,si=t=>typeof t=="boolean",kt=t=>typeof t=="number",xs=t=>!t&&t!==0||ut(t)&&t.length===0||sn(t)&&!Object.keys(t).length,As=t=>typeof Element=="undefined"?!1:t instanceof Element,ep=t=>Dr(t),Mxe=t=>At(t)?!Number.isNaN(Number(t)):!1,Dx=t=>t===window,gf=t=>Tn?window.requestAnimationFrame(t):setTimeout(t,16),tp=t=>Tn?window.cancelAnimationFrame(t):clearTimeout(t),n$=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Du=t=>db(t),Yg=t=>Object.keys(t),Rxe=t=>Object.entries(t),b1=(t,e,n)=>({get value(){return Wr(t,e,n)},set value(r){ZR(t,e,r)}});class $xe extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function Hi(t,e){throw new $xe(`[${t}] ${e}`)}const LQ=(t="")=>t.split(" ").filter(e=>!!e.trim()),Ua=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},rl=(t,e)=>{!t||!e.trim()||t.classList.add(...LQ(e))},aa=(t,e)=>{!t||!e.trim()||t.classList.remove(...LQ(e))},Id=(t,e)=>{var n;if(!Tn||!t||!e)return"";let r=gl(e);r==="float"&&(r="cssFloat");try{const i=t.style[r];if(i)return i;const o=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return o?o[r]:""}catch{return t.style[r]}};function pi(t,e="px"){if(!t)return"";if(kt(t)||Mxe(t))return`${t}${e}`;if(At(t))return t}const Nxe=(t,e)=>{if(!Tn)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],r=Id(t,n);return["scroll","auto","overlay"].some(i=>r.includes(i))},r$=(t,e)=>{if(!Tn)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Nxe(n,e))return n;n=n.parentNode}return n};let G_;const IQ=t=>{var e;if(!Tn)return 0;if(G_!==void 0)return G_;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const r=n.offsetWidth;n.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",n.appendChild(i);const o=i.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),G_=r-o,G_};function i$(t,e){if(!Tn)return;if(!e){t.scrollTop=0;return}const n=[];let r=e.offsetParent;for(;r!==null&&t!==r&&t.contains(r);)n.push(r),r=r.offsetParent;const i=e.offsetTop+n.reduce((l,u)=>l+u.offsetTop,0),o=i+e.offsetHeight,a=t.scrollTop,s=a+t.clientHeight;i<a?t.scrollTop=i:o>s&&(t.scrollTop=o-t.clientHeight)}function Dxe(t,e,n,r,i){const o=Date.now();let a;const s=()=>{const u=Date.now()-o,c=lce(u>r?r:u,e,n,r);Dx(t)?t.scrollTo(window.pageXOffset,c):t.scrollTop=c,u<r?a=gf(s):typeof i=="function"&&i()};return s(),()=>{a&&tp(a)}}const v5=(t,e)=>Dx(e)?t.ownerDocument.documentElement:e,y5=t=>Dx(t)?window.scrollY:t.scrollTop,K_=t=>{if(!Tn||t==="")return null;if(At(t))try{return document.querySelector(t)}catch{return null}return t};/*! Element Plus Icons Vue v2.3.1 */var Lxe=ue({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),ld=Lxe,Ixe=ue({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),mf=Ixe,Bxe=ue({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),ba=Bxe,Fxe=ue({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),o$=Fxe,Vxe=ue({name:"Back",__name:"back",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),J("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"})]))}}),jxe=Vxe,zxe=ue({name:"BottomLeft",__name:"bottom-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),J("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}}),Lx=zxe,Qxe=ue({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),Hxe=Qxe,Wxe=ue({name:"CaretRight",__name:"caret-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),BQ=Wxe,Uxe=ue({name:"CaretTop",__name:"caret-top",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),qxe=Uxe,Yxe=ue({name:"Check",__name:"check",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),Sb=Yxe,Xxe=ue({name:"CircleCheckFilled",__name:"circle-check-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Zxe=Xxe,Gxe=ue({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("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"})]))}}),a$=Gxe,Kxe=ue({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),s$=Kxe,Jxe=ue({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("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"})]))}}),Bf=Jxe,eCe=ue({name:"Clock",__name:"clock",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),J("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),FQ=eCe,tCe=ue({name:"Close",__name:"close",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),_a=tCe,nCe=ue({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),vf=nCe,rCe=ue({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),yf=rCe,iCe=ue({name:"Delete",__name:"delete",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),l$=iCe,oCe=ue({name:"Document",__name:"document",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),aCe=oCe,sCe=ue({name:"Edit",__name:"edit",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("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"})]))}}),VQ=sCe,lCe=ue({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),zm=lCe,uCe=ue({name:"Hide",__name:"hide",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),J("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),cCe=uCe,dCe=ue({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),u$=dCe,fCe=ue({name:"Loading",__name:"loading",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Ku=fCe,hCe=ue({name:"MapLocation",__name:"map-location",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),J("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}}),pCe=hCe,gCe=ue({name:"Minus",__name:"minus",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),mCe=gCe,vCe=ue({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),Oy=vCe,yCe=ue({name:"More",__name:"more",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),bCe=yCe,_Ce=ue({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),OCe=_Ce,wCe=ue({name:"Plus",__name:"plus",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),pw=wCe,SCe=ue({name:"QuestionFilled",__name:"question-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),xCe=SCe,CCe=ue({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),ECe=CCe,TCe=ue({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),jQ=TCe,kCe=ue({name:"RemoveFilled",__name:"remove-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}}),PCe=kCe,ACe=ue({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),MCe=ACe,RCe=ue({name:"Search",__name:"search",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),c$=RCe,$Ce=ue({name:"SortDown",__name:"sort-down",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),NCe=$Ce,DCe=ue({name:"SortUp",__name:"sort-up",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),LCe=DCe,ICe=ue({name:"StarFilled",__name:"star-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),J_=ICe,BCe=ue({name:"Star",__name:"star",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),FCe=BCe,VCe=ue({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),d$=VCe,jCe=ue({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),zCe=jCe,QCe=ue({name:"View",__name:"view",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),HCe=QCe,WCe=ue({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Ix=WCe,UCe=ue({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),zQ=UCe,qCe=ue({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),YCe=qCe;const QQ="__epPropKey",Oe=t=>t,XCe=t=>sn(t)&&!!t[QQ],hu=(t,e)=>{if(!sn(t)||XCe(t))return t;const{values:n,required:r,default:i,type:o,validator:a}=t,l={type:o,required:!!r,validator:n||a?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Dn(t,"default")&&d.push(i),c||(c=d.includes(u))),a&&(c||(c=a(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");Use(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[QQ]:!0};return Dn(t,"default")&&(l.default=i),l},Ye=t=>Ug(Object.entries(t).map(([e,n])=>[e,hu(n,e)])),fr=Oe([String,Object,Function]),f$={Close:_a},h$={Close:_a,SuccessFilled:d$,InfoFilled:u$,WarningFilled:Ix,CircleCloseFilled:s$},bf={success:d$,warning:Ix,error:s$,info:u$},p$={validating:Ku,success:a$,error:Bf},Vt=(t,e)=>{if(t.install=n=>{for(const r of[t,...Object.values(e!=null?e:{})])n.component(r.name,r)},e)for(const[n,r]of Object.entries(e))t[n]=r;return t},HQ=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),ZCe=(t,e)=>(t.install=n=>{n.directive(e,t)},t),ti=t=>(t.install=yr,t),Bx=(...t)=>e=>{t.forEach(n=>{$t(n)?n(e):n.value=e})},St={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"},GCe=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],mT=["sun","mon","tue","wed","thu","fri","sat"],Zt="update:modelValue",Lr="change",Oa="input",b5=Symbol("INSTALLED_KEY"),cc=["","default","small","large"],WQ=t=>["",...cc].includes(t);var Ks=(t=>(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))(Ks||{});function _k(t){return Kr(t)&&t.type===ct}function KCe(t){return Kr(t)&&t.type===oa}function JCe(t){return Kr(t)&&!_k(t)&&!KCe(t)}const eEe=t=>{if(!Kr(t))return{};const e=t.props||{},n=(Kr(t.type)?t.type.props:void 0)||{},r={};return Object.keys(n).forEach(i=>{Dn(n[i],"default")&&(r[i]=n[i].default)}),Object.keys(e).forEach(i=>{r[gl(i)]=e[i]}),r},tEe=t=>{if(!ut(t)||t.length>1)throw new Error("expect to receive a single Vue element child");return t[0]},Kd=t=>{const e=ut(t)?t:[t],n=[];return e.forEach(r=>{var i;ut(r)?n.push(...Kd(r)):Kr(r)&&ut(r.children)?n.push(...Kd(r.children)):(n.push(r),Kr(r)&&((i=r.component)==null?void 0:i.subTree)&&n.push(...Kd(r.component.subTree)))}),n},_5=t=>[...new Set(t)],ya=t=>!t&&t!==0?[]:Array.isArray(t)?t:[t],nEe=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),Jr=t=>t;function rEe(t){let e=0;const n=(...r)=>{e&&tp(e),e=gf(()=>{t(...r),e=0})};return n.cancel=()=>{tp(e),e=0},n}const iEe=["class","style"],oEe=/^on[A-Z]/,g$=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,r=M(()=>((n==null?void 0:n.value)||[]).concat(iEe)),i=en();return M(i?()=>{var o;return Ug(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([a])=>!r.value.includes(a)&&!(e&&oEe.test(a))))}:()=>({}))},Jd=({from:t,replacement:e,scope:n,version:r,ref:i,type:o="API"},a)=>{Ve(()=>p(a),s=>{},{immediate:!0})},UQ=(t,e,n,r)=>{let i={offsetX:0,offsetY:0};const o=u=>{const c=u.clientX,d=u.clientY,{offsetX:f,offsetY:h}=i,m=t.value.getBoundingClientRect(),g=m.left,y=m.top,b=m.width,w=m.height,O=document.documentElement.clientWidth,S=document.documentElement.clientHeight,x=-g+f,C=-y+h,E=O-g-b+f,T=S-y-w+h,P=D=>{let N=f+D.clientX-c,$=h+D.clientY-d;r!=null&&r.value||(N=Math.min(Math.max(N,x),E),$=Math.min(Math.max($,C),T)),i={offsetX:N,offsetY:$},t.value&&(t.value.style.transform=`translate(${pi(N)}, ${pi($)})`)},A=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",A)},a=()=>{e.value&&t.value&&e.value.addEventListener("mousedown",o)},s=()=>{e.value&&t.value&&e.value.removeEventListener("mousedown",o)},l=()=>{i={offsetX:0,offsetY:0},t.value&&(t.value.style.transform="none")};return Bt(()=>{Bo(()=>{n.value?a():s()})}),pr(()=>{s()}),{resetPosition:l}};var aEe={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"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},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"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const sEe=t=>(e,n)=>lEe(e,n,p(t)),lEe=(t,e,n)=>Wr(n,t,t).replace(/\{(\w+)\}/g,(r,i)=>{var o;return`${(o=e==null?void 0:e[i])!=null?o:`{${i}}`}`}),uEe=t=>{const e=M(()=>p(t).name),n=kr(t)?t:F(t);return{lang:e,locale:n,t:sEe(t)}},qQ=Symbol("localeContextKey"),kn=t=>{const e=t||ht(qQ,F());return uEe(M(()=>e.value||aEe))},wy="el",cEe="is-",sh=(t,e,n,r,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},YQ=Symbol("namespaceContextKey"),m$=t=>{const e=t||(en()?ht(YQ,F(wy)):F(wy));return M(()=>p(e)||wy)},Qe=(t,e)=>{const n=m$(e);return{namespace:n,b:(g="")=>sh(n.value,t,g,"",""),e:g=>g?sh(n.value,t,"",g,""):"",m:g=>g?sh(n.value,t,"","",g):"",be:(g,y)=>g&&y?sh(n.value,t,g,y,""):"",em:(g,y)=>g&&y?sh(n.value,t,"",g,y):"",bm:(g,y)=>g&&y?sh(n.value,t,g,"",y):"",bem:(g,y,b)=>g&&y&&b?sh(n.value,t,g,y,b):"",is:(g,...y)=>{const b=y.length>=1?y[0]:!0;return g&&b?`${cEe}${g}`:""},cssVar:g=>{const y={};for(const b in g)g[b]&&(y[`--${n.value}-${b}`]=g[b]);return y},cssVarName:g=>`--${n.value}-${g}`,cssVarBlock:g=>{const y={};for(const b in g)g[b]&&(y[`--${n.value}-${t}-${b}`]=g[b]);return y},cssVarBlockName:g=>`--${n.value}-${t}-${g}`}},v$=(t,e={})=>{kr(t)||Hi("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Qe("popup"),r=M(()=>n.bm("parent","hidden"));if(!Tn||Ua(document.body,r.value))return;let i=0,o=!1,a="0";const s=()=>{setTimeout(()=>{typeof document!="undefined"&&(aa(document==null?void 0:document.body,r.value),o&&document&&(document.body.style.width=a))},200)};Ve(t,l=>{if(!l){s();return}o=!Ua(document.body,r.value),o&&(a=document.body.style.width),i=IQ(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,c=Id(document.body,"overflowY");i>0&&(u||c==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`),rl(document.body,r.value)}),tz(()=>s())},dEe=hu({type:Oe(Boolean),default:null}),fEe=hu({type:Oe(Function)}),hEe=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,r=[e],i={[t]:dEe,[n]:fEe};return{useModelToggle:({indicator:a,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:d})=>{const f=en(),{emit:h}=f,m=f.props,g=M(()=>$t(m[n])),y=M(()=>m[t]===null),b=E=>{a.value!==!0&&(a.value=!0,s&&(s.value=E),$t(c)&&c(E))},w=E=>{a.value!==!1&&(a.value=!1,s&&(s.value=E),$t(d)&&d(E))},O=E=>{if(m.disabled===!0||$t(u)&&!u())return;const T=g.value&&Tn;T&&h(e,!0),(y.value||!T)&&b(E)},S=E=>{if(m.disabled===!0||!Tn)return;const T=g.value&&Tn;T&&h(e,!1),(y.value||!T)&&w(E)},x=E=>{!si(E)||(m.disabled&&E?g.value&&h(e,!1):a.value!==E&&(E?b():w()))},C=()=>{a.value?S():O()};return Ve(()=>m[t],x),l&&f.appContext.config.globalProperties.$route!==void 0&&Ve(()=>({...f.proxy.$route}),()=>{l.value&&a.value&&S()}),Bt(()=>{x(m[t])}),{hide:S,show:O,toggle:C,hasUpdateHandler:g}},useModelToggleProps:i,useModelToggleEmits:r}},XQ=t=>{const e=en();return M(()=>{var n,r;return(r=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:r[t]})};var Za="top",bl="bottom",_l="right",Ga="left",y$="auto",xb=[Za,bl,_l,Ga],Xg="start",h0="end",pEe="clippingParents",ZQ="viewport",Nv="popper",gEe="reference",O5=xb.reduce(function(t,e){return t.concat([e+"-"+Xg,e+"-"+h0])},[]),ud=[].concat(xb,[y$]).reduce(function(t,e){return t.concat([e,e+"-"+Xg,e+"-"+h0])},[]),mEe="beforeRead",vEe="read",yEe="afterRead",bEe="beforeMain",_Ee="main",OEe="afterMain",wEe="beforeWrite",SEe="write",xEe="afterWrite",CEe=[mEe,vEe,yEe,bEe,_Ee,OEe,wEe,SEe,xEe];function Ju(t){return t?(t.nodeName||"").toLowerCase():null}function pu(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Zg(t){var e=pu(t).Element;return t instanceof e||t instanceof Element}function fl(t){var e=pu(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function b$(t){if(typeof ShadowRoot=="undefined")return!1;var e=pu(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function EEe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!fl(o)||!Ju(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function TEe(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(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!fl(i)||!Ju(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var GQ={name:"applyStyles",enabled:!0,phase:"write",fn:EEe,effect:TEe,requires:["computeStyles"]};function Wu(t){return t.split("-")[0]}var Vh=Math.max,gw=Math.min,Gg=Math.round;function Kg(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(fl(t)&&e){var o=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Gg(n.width)/a||1),o>0&&(i=Gg(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function _$(t){var e=Kg(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function KQ(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&b$(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Uc(t){return pu(t).getComputedStyle(t)}function kEe(t){return["table","td","th"].indexOf(Ju(t))>=0}function Ff(t){return((Zg(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fx(t){return Ju(t)==="html"?t:t.assignedSlot||t.parentNode||(b$(t)?t.host:null)||Ff(t)}function w5(t){return!fl(t)||Uc(t).position==="fixed"?null:t.offsetParent}function PEe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&fl(t)){var r=Uc(t);if(r.position==="fixed")return null}var i=Fx(t);for(b$(i)&&(i=i.host);fl(i)&&["html","body"].indexOf(Ju(i))<0;){var o=Uc(i);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 i;i=i.parentNode}return null}function Cb(t){for(var e=pu(t),n=w5(t);n&&kEe(n)&&Uc(n).position==="static";)n=w5(n);return n&&(Ju(n)==="html"||Ju(n)==="body"&&Uc(n).position==="static")?e:n||PEe(t)||e}function O$(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Sy(t,e,n){return Vh(t,gw(e,n))}function AEe(t,e,n){var r=Sy(t,e,n);return r>n?n:r}function JQ(){return{top:0,right:0,bottom:0,left:0}}function eH(t){return Object.assign({},JQ(),t)}function tH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var MEe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,eH(typeof t!="number"?t:tH(t,xb))};function REe(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Wu(n.placement),l=O$(s),u=[Ga,_l].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var d=MEe(i.padding,n),f=_$(o),h=l==="y"?Za:Ga,m=l==="y"?bl:_l,g=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],y=a[l]-n.rects.reference[l],b=Cb(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,O=g/2-y/2,S=d[h],x=w-f[c]-d[m],C=w/2-f[c]/2+O,E=Sy(S,C,x),T=l;n.modifiersData[r]=(e={},e[T]=E,e.centerOffset=E-C,e)}}function $Ee(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!KQ(e.elements.popper,i)||(e.elements.arrow=i))}var NEe={name:"arrow",enabled:!0,phase:"main",fn:REe,effect:$Ee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Jg(t){return t.split("-")[1]}var DEe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function LEe(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:Gg(e*i)/i||0,y:Gg(n*i)/i||0}}function S5(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,g=m===void 0?0:m,y=typeof c=="function"?c({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),O=Ga,S=Za,x=window;if(u){var C=Cb(n),E="clientHeight",T="clientWidth";if(C===pu(n)&&(C=Ff(n),Uc(C).position!=="static"&&s==="absolute"&&(E="scrollHeight",T="scrollWidth")),C=C,i===Za||(i===Ga||i===_l)&&o===h0){S=bl;var P=d&&C===x&&x.visualViewport?x.visualViewport.height:C[E];g-=P-r.height,g*=l?1:-1}if(i===Ga||(i===Za||i===bl)&&o===h0){O=_l;var A=d&&C===x&&x.visualViewport?x.visualViewport.width:C[T];h-=A-r.width,h*=l?1:-1}}var D=Object.assign({position:s},u&&DEe),N=c===!0?LEe({x:h,y:g}):{x:h,y:g};if(h=N.x,g=N.y,l){var $;return Object.assign({},D,($={},$[S]=w?"0":"",$[O]=b?"0":"",$.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",$))}return Object.assign({},D,(e={},e[S]=w?g+"px":"",e[O]=b?h+"px":"",e.transform="",e))}function IEe(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Wu(e.placement),variation:Jg(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,S5(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,S5(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var nH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:IEe,data:{}},eO={passive:!0};function BEe(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=pu(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,eO)}),s&&l.addEventListener("resize",n.update,eO),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,eO)}),s&&l.removeEventListener("resize",n.update,eO)}}var rH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:BEe,data:{}},FEe={left:"right",right:"left",bottom:"top",top:"bottom"};function _1(t){return t.replace(/left|right|bottom|top/g,function(e){return FEe[e]})}var VEe={start:"end",end:"start"};function x5(t){return t.replace(/start|end/g,function(e){return VEe[e]})}function w$(t){var e=pu(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function S$(t){return Kg(Ff(t)).left+w$(t).scrollLeft}function jEe(t){var e=pu(t),n=Ff(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+S$(t),y:s}}function zEe(t){var e,n=Ff(t),r=w$(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Vh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+S$(t),l=-r.scrollTop;return Uc(i||n).direction==="rtl"&&(s+=Vh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function x$(t){var e=Uc(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function iH(t){return["html","body","#document"].indexOf(Ju(t))>=0?t.ownerDocument.body:fl(t)&&x$(t)?t:iH(Fx(t))}function xy(t,e){var n;e===void 0&&(e=[]);var r=iH(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=pu(r),a=i?[o].concat(o.visualViewport||[],x$(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(xy(Fx(a)))}function Ok(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function QEe(t){var e=Kg(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 C5(t,e){return e===ZQ?Ok(jEe(t)):Zg(e)?QEe(e):Ok(zEe(Ff(t)))}function HEe(t){var e=xy(Fx(t)),n=["absolute","fixed"].indexOf(Uc(t).position)>=0,r=n&&fl(t)?Cb(t):t;return Zg(r)?e.filter(function(i){return Zg(i)&&KQ(i,r)&&Ju(i)!=="body"}):[]}function WEe(t,e,n){var r=e==="clippingParents"?HEe(t):[].concat(e),i=[].concat(r,[n]),o=i[0],a=i.reduce(function(s,l){var u=C5(t,l);return s.top=Vh(u.top,s.top),s.right=gw(u.right,s.right),s.bottom=gw(u.bottom,s.bottom),s.left=Vh(u.left,s.left),s},C5(t,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function oH(t){var e=t.reference,n=t.element,r=t.placement,i=r?Wu(r):null,o=r?Jg(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case Za:l={x:a,y:e.y-n.height};break;case bl:l={x:a,y:e.y+e.height};break;case _l:l={x:e.x+e.width,y:s};break;case Ga:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?O$(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Xg:l[u]=l[u]-(e[c]/2-n[c]/2);break;case h0:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function p0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.boundary,a=o===void 0?pEe:o,s=n.rootBoundary,l=s===void 0?ZQ:s,u=n.elementContext,c=u===void 0?Nv:u,d=n.altBoundary,f=d===void 0?!1:d,h=n.padding,m=h===void 0?0:h,g=eH(typeof m!="number"?m:tH(m,xb)),y=c===Nv?gEe:Nv,b=t.rects.popper,w=t.elements[f?y:c],O=WEe(Zg(w)?w:w.contextElement||Ff(t.elements.popper),a,l),S=Kg(t.elements.reference),x=oH({reference:S,element:b,strategy:"absolute",placement:i}),C=Ok(Object.assign({},b,x)),E=c===Nv?C:S,T={top:O.top-E.top+g.top,bottom:E.bottom-O.bottom+g.bottom,left:O.left-E.left+g.left,right:E.right-O.right+g.right},P=t.modifiersData.offset;if(c===Nv&&P){var A=P[i];Object.keys(T).forEach(function(D){var N=[_l,bl].indexOf(D)>=0?1:-1,$=[Za,bl].indexOf(D)>=0?"y":"x";T[D]+=A[$]*N})}return T}function UEe(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?ud:l,c=Jg(r),d=c?s?O5:O5.filter(function(m){return Jg(m)===c}):xb,f=d.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=d);var h=f.reduce(function(m,g){return m[g]=p0(t,{placement:g,boundary:i,rootBoundary:o,padding:a})[Wu(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function qEe(t){if(Wu(t)===y$)return[];var e=_1(t);return[x5(t),e,x5(e)]}function YEe(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,m=h===void 0?!0:h,g=n.allowedAutoPlacements,y=e.options.placement,b=Wu(y),w=b===y,O=l||(w||!m?[_1(y)]:qEe(y)),S=[y].concat(O).reduce(function(Se,ke){return Se.concat(Wu(ke)===y$?UEe(e,{placement:ke,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:g}):ke)},[]),x=e.rects.reference,C=e.rects.popper,E=new Map,T=!0,P=S[0],A=0;A<S.length;A++){var D=S[A],N=Wu(D),$=Jg(D)===Xg,W=[Za,bl].indexOf(N)>=0,L=W?"width":"height",I=p0(e,{placement:D,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),U=W?$?_l:Ga:$?bl:Za;x[L]>C[L]&&(U=_1(U));var Q=_1(U),V=[];if(o&&V.push(I[N]<=0),s&&V.push(I[U]<=0,I[Q]<=0),V.every(function(Se){return Se})){P=D,T=!1;break}E.set(D,V)}if(T)for(var q=m?3:1,K=function(Se){var ke=S.find(function(Y){var re=E.get(Y);if(re)return re.slice(0,Se).every(function(te){return te})});if(ke)return P=ke,"break"},ie=q;ie>0;ie--){var oe=K(ie);if(oe==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}var XEe={name:"flip",enabled:!0,phase:"main",fn:YEe,requiresIfExists:["offset"],data:{_skip:!1}};function E5(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 T5(t){return[Za,_l,bl,Ga].some(function(e){return t[e]>=0})}function ZEe(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=p0(e,{elementContext:"reference"}),s=p0(e,{altBoundary:!0}),l=E5(a,r),u=E5(s,i,o),c=T5(l),d=T5(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var GEe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ZEe};function KEe(t,e,n){var r=Wu(t),i=[Ga,Za].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ga,_l].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function JEe(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=ud.reduce(function(c,d){return c[d]=KEe(d,e.rects,o),c},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}var eTe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:JEe};function tTe(t){var e=t.state,n=t.name;e.modifiersData[n]=oH({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var aH={name:"popperOffsets",enabled:!0,phase:"read",fn:tTe,data:{}};function nTe(t){return t==="x"?"y":"x"}function rTe(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,y=p0(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Wu(e.placement),w=Jg(e.placement),O=!w,S=O$(b),x=nTe(S),C=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,P=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(C){if(o){var $,W=S==="y"?Za:Ga,L=S==="y"?bl:_l,I=S==="y"?"height":"width",U=C[S],Q=U+y[W],V=U-y[L],q=h?-T[I]/2:0,K=w===Xg?E[I]:T[I],ie=w===Xg?-T[I]:-E[I],oe=e.elements.arrow,Se=h&&oe?_$(oe):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:JQ(),Y=ke[W],re=ke[L],te=Sy(0,E[I],Se[I]),ge=O?E[I]/2-q-te-Y-A.mainAxis:K-te-Y-A.mainAxis,Re=O?-E[I]/2+q+te+re+A.mainAxis:ie+te+re+A.mainAxis,$e=e.elements.arrow&&Cb(e.elements.arrow),Z=$e?S==="y"?$e.clientTop||0:$e.clientLeft||0:0,ce=($=D==null?void 0:D[S])!=null?$:0,Te=U+ge-ce-Z,Ie=U+Re-ce,ae=Sy(h?gw(Q,Te):Q,U,h?Vh(V,Ie):V);C[S]=ae,N[S]=ae-U}if(s){var me,Ae=S==="x"?Za:Ga,X=S==="x"?bl:_l,ee=C[x],le=x==="y"?"height":"width",Ce=ee+y[Ae],fe=ee-y[X],Ee=[Za,Ga].indexOf(b)!==-1,be=(me=D==null?void 0:D[x])!=null?me:0,Be=Ee?Ce:ee-E[le]-T[le]-be+A.altAxis,Xe=Ee?ee+E[le]+T[le]-be-A.altAxis:fe,Ke=h&&Ee?AEe(Be,ee,Xe):Sy(h?Be:Ce,ee,h?Xe:fe);C[x]=Ke,N[x]=Ke-ee}e.modifiersData[r]=N}}var iTe={name:"preventOverflow",enabled:!0,phase:"main",fn:rTe,requiresIfExists:["offset"]};function oTe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function aTe(t){return t===pu(t)||!fl(t)?w$(t):oTe(t)}function sTe(t){var e=t.getBoundingClientRect(),n=Gg(e.width)/t.offsetWidth||1,r=Gg(e.height)/t.offsetHeight||1;return n!==1||r!==1}function lTe(t,e,n){n===void 0&&(n=!1);var r=fl(e),i=fl(e)&&sTe(e),o=Ff(e),a=Kg(t,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ju(e)!=="body"||x$(o))&&(s=aTe(e)),fl(e)?(l=Kg(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=S$(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function uTe(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function cTe(t){var e=uTe(t);return CEe.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function dTe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function fTe(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var k5={placement:"bottom",modifiers:[],strategy:"absolute"};function P5(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function C$(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?k5:i;return function(a,s,l){l===void 0&&(l=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},k5,o),modifiersData:{},elements:{reference:a,popper:s},attributes:{},styles:{}},c=[],d=!1,f={state:u,setOptions:function(g){var y=typeof g=="function"?g(u.options):g;m(),u.options=Object.assign({},o,u.options,y),u.scrollParents={reference:Zg(a)?xy(a):a.contextElement?xy(a.contextElement):[],popper:xy(s)};var b=cTe(fTe([].concat(r,u.options.modifiers)));return u.orderedModifiers=b.filter(function(w){return w.enabled}),h(),f.update()},forceUpdate:function(){if(!d){var g=u.elements,y=g.reference,b=g.popper;if(P5(y,b)){u.rects={reference:lTe(y,Cb(b),u.options.strategy==="fixed"),popper:_$(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(T){return u.modifiersData[T.name]=Object.assign({},T.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var O=u.orderedModifiers[w],S=O.fn,x=O.options,C=x===void 0?{}:x,E=O.name;typeof S=="function"&&(u=S({state:u,options:C,name:E,instance:f})||u)}}}},update:dTe(function(){return new Promise(function(g){f.forceUpdate(),g(u)})}),destroy:function(){m(),d=!0}};if(!P5(a,s))return f;f.setOptions(l).then(function(g){!d&&l.onFirstUpdate&&l.onFirstUpdate(g)});function h(){u.orderedModifiers.forEach(function(g){var y=g.name,b=g.options,w=b===void 0?{}:b,O=g.effect;if(typeof O=="function"){var S=O({state:u,name:y,instance:f,options:w}),x=function(){};c.push(S||x)}})}function m(){c.forEach(function(g){return g()}),c=[]}return f}}C$();var hTe=[rH,aH,nH,GQ];C$({defaultModifiers:hTe});var pTe=[rH,aH,nH,GQ,eTe,XEe,iTe,NEe,GEe],gTe=C$({defaultModifiers:pTe});const mTe=(t,e,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=vTe(l);Object.assign(a.value,u)},requires:["computeStyles"]},i=M(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:d}=p(n);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),o=Tr(),a=F({styles:{popper:{position:p(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{!o.value||(o.value.destroy(),o.value=void 0)};return Ve(i,l=>{const u=p(o);u&&u.setOptions(l)},{deep:!0}),Ve([t,e],([l,u])=>{s(),!(!l||!u)&&(o.value=gTe(l,u,p(i)))}),pr(()=>{s()}),{state:M(()=>{var l;return{...((l=p(o))==null?void 0:l.state)||{}}}),styles:M(()=>p(a).styles),attributes:M(()=>p(a).attributes),update:()=>{var l;return(l=p(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=p(o))==null?void 0:l.forceUpdate()},instanceRef:M(()=>p(o))}};function vTe(t){const e=Object.keys(t.elements),n=Ug(e.map(i=>[i,t.styles[i]||{}])),r=Ug(e.map(i=>[i,t.attributes[i]]));return{styles:n,attributes:r}}const E$=t=>{if(!t)return{onClick:yr,onMousedown:yr,onMouseup:yr};let e=!1,n=!1;return{onClick:a=>{e&&n&&t(a),e=n=!1},onMousedown:a=>{e=a.target===a.currentTarget},onMouseup:a=>{n=a.target===a.currentTarget}}},yTe=(t,e=0)=>{if(e===0)return t;const n=F(!1);let r=null;const i=()=>{r&&clearTimeout(r),r=setTimeout(()=>{n.value=t.value},e)};return Bt(i),Ve(()=>t.value,o=>{o?i():n.value=o}),n};function A5(){let t;const e=(r,i)=>{n(),t=window.setTimeout(r,i)},n=()=>window.clearTimeout(t);return fb(()=>n()),{registerTimeout:e,cancelTimeout:n}}const M5={prefix:Math.floor(Math.random()*1e4),current:0},bTe=Symbol("elIdInjection"),T$=()=>en()?ht(bTe,M5):M5,bo=t=>{const e=T$(),n=m$();return M(()=>p(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let og=[];const R5=t=>{const e=t;e.key===St.esc&&og.forEach(n=>n(e))},_Te=t=>{Bt(()=>{og.length===0&&document.addEventListener("keydown",R5),Tn&&og.push(t)}),pr(()=>{og=og.filter(e=>e!==t),og.length===0&&Tn&&document.removeEventListener("keydown",R5)})},sH=()=>{const t=m$(),e=T$(),n=M(()=>`${t.value}-popper-container-${e.prefix}`),r=M(()=>`#${n.value}`);return{id:n,selector:r}},OTe=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},wTe=()=>{const{id:t,selector:e}=sH();return cx(()=>{!Tn||document.body.querySelector(e.value)||OTe(t.value)}),{id:t,selector:e}},STe=Ye({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),xTe=({showAfter:t,hideAfter:e,autoClose:n,open:r,close:i})=>{const{registerTimeout:o}=A5(),{registerTimeout:a,cancelTimeout:s}=A5();return{onOpen:c=>{o(()=>{r(c);const d=p(n);kt(d)&&d>0&&a(()=>{i(c)},d)},p(t))},onClose:c=>{s(),o(()=>{i(c)},p(e))}}},lH=Symbol("elForwardRef"),CTe=t=>{_n(lH,{setForwardRef:n=>{t.value=n}})},ETe=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),$5={current:0},N5=F(0),uH=2e3,D5=Symbol("elZIndexContextKey"),cH=Symbol("zIndexContextKey"),Qm=t=>{const e=en()?ht(D5,$5):$5,n=t||(en()?ht(cH,void 0):void 0),r=M(()=>{const a=p(n);return kt(a)?a:uH}),i=M(()=>r.value+N5.value),o=()=>(e.current++,N5.value=e.current,i.value);return!Tn&&ht(D5),{initialZIndex:r,currentZIndex:i,nextZIndex:o}},em=Math.min,jh=Math.max,mw=Math.round,tO=Math.floor,_f=t=>({x:t,y:t}),TTe={left:"right",right:"left",bottom:"top",top:"bottom"},kTe={start:"end",end:"start"};function wk(t,e,n){return jh(t,em(e,n))}function Eb(t,e){return typeof t=="function"?t(e):t}function np(t){return t.split("-")[0]}function Tb(t){return t.split("-")[1]}function dH(t){return t==="x"?"y":"x"}function k$(t){return t==="y"?"height":"width"}function tm(t){return["top","bottom"].includes(np(t))?"y":"x"}function P$(t){return dH(tm(t))}function PTe(t,e,n){n===void 0&&(n=!1);const r=Tb(t),i=P$(t),o=k$(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=vw(a)),[a,vw(a)]}function ATe(t){const e=vw(t);return[Sk(t),e,Sk(e)]}function Sk(t){return t.replace(/start|end/g,e=>kTe[e])}function MTe(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:a;default:return[]}}function RTe(t,e,n,r){const i=Tb(t);let o=MTe(np(t),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),e&&(o=o.concat(o.map(Sk)))),o}function vw(t){return t.replace(/left|right|bottom|top/g,e=>TTe[e])}function $Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function fH(t){return typeof t!="number"?$Te(t):{top:t,right:t,bottom:t,left:t}}function yw(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function L5(t,e,n){let{reference:r,floating:i}=t;const o=tm(e),a=P$(e),s=k$(a),l=np(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Tb(e)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const NTe=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=L5(u,r,l),f=r,h={},m=0;for(let g=0;g<s.length;g++){const{name:y,fn:b}=s[g],{x:w,y:O,data:S,reset:x}=await b({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:t,floating:e}});c=w!=null?w:c,d=O!=null?O:d,h={...h,[y]:{...h[y],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:c,y:d}=L5(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function A$(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Eb(e,t),m=fH(h),y=s[f?d==="floating"?"reference":"floating":d],b=yw(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(s.floating)),boundary:u,rootBoundary:c,strategy:l})),w=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(O))?await(o.getScale==null?void 0:o.getScale(O))||{x:1,y:1}:{x:1,y:1},x=yw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:O,strategy:l}):w);return{top:(b.top-x.top+m.top)/S.y,bottom:(x.bottom-b.bottom+m.bottom)/S.y,left:(b.left-x.left+m.left)/S.x,right:(x.right-b.right+m.right)/S.x}}const DTe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=Eb(t,e)||{};if(u==null)return{};const d=fH(c),f={x:n,y:r},h=P$(i),m=k$(h),g=await a.getDimensions(u),y=h==="y",b=y?"top":"left",w=y?"bottom":"right",O=y?"clientHeight":"clientWidth",S=o.reference[m]+o.reference[h]-f[h]-o.floating[m],x=f[h]-o.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=C?C[O]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[O]||o.floating[m]);const T=S/2-x/2,P=E/2-g[m]/2-1,A=em(d[b],P),D=em(d[w],P),N=A,$=E-g[m]-D,W=E/2-g[m]/2+T,L=wk(N,W,$),I=!l.arrow&&Tb(i)!=null&&W!==L&&o.reference[m]/2-(W<N?A:D)-g[m]/2<0,U=I?W<N?W-N:W-$:0;return{[h]:f[h]+U,data:{[h]:L,centerOffset:W-L-U,...I&&{alignmentOffset:U}},reset:I}}}),LTe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Eb(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=np(i),w=tm(s),O=np(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(O||!g?[vw(s)]:ATe(s)),C=m!=="none";!f&&C&&x.push(...RTe(s,g,m,S));const E=[s,...x],T=await A$(e,y),P=[];let A=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&P.push(T[b]),d){const W=PTe(i,a,S);P.push(T[W[0]],T[W[1]])}if(A=[...A,{placement:i,overflows:P}],!P.every(W=>W<=0)){var D,N;const W=(((D=o.flip)==null?void 0:D.index)||0)+1,L=E[W];if(L)return{data:{index:W,overflows:A},reset:{placement:L}};let I=(N=A.filter(U=>U.overflows[0]<=0).sort((U,Q)=>U.overflows[1]-Q.overflows[1])[0])==null?void 0:N.placement;if(!I)switch(h){case"bestFit":{var $;const U=($=A.filter(Q=>{if(C){const V=tm(Q.placement);return V===w||V==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(V=>V>0).reduce((V,q)=>V+q,0)]).sort((Q,V)=>Q[1]-V[1])[0])==null?void 0:$[0];U&&(I=U);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}};async function ITe(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=np(n),s=Tb(n),l=tm(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Eb(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(h=s==="end"?m*-1:m),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const BTe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=e,l=await ITe(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},FTe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...l}=Eb(t,e),u={x:n,y:r},c=await A$(e,l),d=tm(np(i)),f=dH(d);let h=u[f],m=u[d];if(o){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+c[y],O=h-c[b];h=wk(w,h,O)}if(a){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=m+c[y],O=m-c[b];m=wk(w,m,O)}const g=s.fn({...e,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:o,[d]:a}}}}}};function Vx(){return typeof window!="undefined"}function Hm(t){return hH(t)?(t.nodeName||"").toLowerCase():"#document"}function Ms(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dc(t){var e;return(e=(hH(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function hH(t){return Vx()?t instanceof Node||t instanceof Ms(t).Node:!1}function su(t){return Vx()?t instanceof Element||t instanceof Ms(t).Element:!1}function ec(t){return Vx()?t instanceof HTMLElement||t instanceof Ms(t).HTMLElement:!1}function I5(t){return!Vx()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof Ms(t).ShadowRoot}function kb(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=lu(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function VTe(t){return["table","td","th"].includes(Hm(t))}function jx(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function M$(t){const e=R$(),n=su(t)?lu(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(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function jTe(t){let e=Of(t);for(;ec(e)&&!nm(e);){if(M$(e))return e;if(jx(e))return null;e=Of(e)}return null}function R$(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nm(t){return["html","body","#document"].includes(Hm(t))}function lu(t){return Ms(t).getComputedStyle(t)}function zx(t){return su(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Of(t){if(Hm(t)==="html")return t;const e=t.assignedSlot||t.parentNode||I5(t)&&t.host||dc(t);return I5(e)?e.host:e}function pH(t){const e=Of(t);return nm(e)?t.ownerDocument?t.ownerDocument.body:t.body:ec(e)&&kb(e)?e:pH(e)}function g0(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=pH(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),a=Ms(i);if(o){const s=xk(a);return e.concat(a,a.visualViewport||[],kb(i)?i:[],s&&n?g0(s):[])}return e.concat(i,g0(i,[],n))}function xk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function gH(t){const e=lu(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ec(t),o=i?t.offsetWidth:n,a=i?t.offsetHeight:r,s=mw(n)!==o||mw(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function $$(t){return su(t)?t:t.contextElement}function Ag(t){const e=$$(t);if(!ec(e))return _f(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=gH(e);let a=(o?mw(n.width):n.width)/r,s=(o?mw(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const zTe=_f(0);function mH(t){const e=Ms(t);return!R$()||!e.visualViewport?zTe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function QTe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ms(t)?!1:e}function rp(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=$$(t);let a=_f(1);e&&(r?su(r)&&(a=Ag(r)):a=Ag(t));const s=QTe(o,n,r)?mH(o):_f(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Ms(o),h=r&&su(r)?Ms(r):r;let m=f,g=xk(m);for(;g&&r&&h!==m;){const y=Ag(g),b=g.getBoundingClientRect(),w=lu(g),O=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=O,u+=S,m=Ms(g),g=xk(m)}}return yw({width:c,height:d,x:l,y:u})}function HTe(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",a=dc(r),s=e?jx(e.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=_f(1);const c=_f(0),d=ec(r);if((d||!d&&!o)&&((Hm(r)!=="body"||kb(a))&&(l=zx(r)),ec(r))){const f=rp(r);u=Ag(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function WTe(t){return Array.from(t.getClientRects())}function Ck(t,e){const n=zx(t).scrollLeft;return e?e.left+n:rp(dc(t)).left+n}function UTe(t){const e=dc(t),n=zx(t),r=t.ownerDocument.body,i=jh(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=jh(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ck(t);const s=-n.scrollTop;return lu(r).direction==="rtl"&&(a+=jh(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function qTe(t,e){const n=Ms(t),r=dc(t),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=R$();(!u||u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function YTe(t,e){const n=rp(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=ec(t)?Ag(t):_f(1),a=t.clientWidth*o.x,s=t.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function B5(t,e,n){let r;if(e==="viewport")r=qTe(t,n);else if(e==="document")r=UTe(dc(t));else if(su(e))r=YTe(e,n);else{const i=mH(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return yw(r)}function vH(t,e){const n=Of(t);return n===e||!su(n)||nm(n)?!1:lu(n).position==="fixed"||vH(n,e)}function XTe(t,e){const n=e.get(t);if(n)return n;let r=g0(t,[],!1).filter(s=>su(s)&&Hm(s)!=="body"),i=null;const o=lu(t).position==="fixed";let a=o?Of(t):t;for(;su(a)&&!nm(a);){const s=lu(a),l=M$(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kb(a)&&!l&&vH(t,a))?r=r.filter(c=>c!==a):i=s,a=Of(a)}return e.set(t,r),r}function ZTe(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?jx(e)?[]:XTe(e,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=B5(e,c,i);return u.top=jh(d.top,u.top),u.right=em(d.right,u.right),u.bottom=em(d.bottom,u.bottom),u.left=jh(d.left,u.left),u},B5(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GTe(t){const{width:e,height:n}=gH(t);return{width:e,height:n}}function KTe(t,e,n){const r=ec(e),i=dc(e),o=n==="fixed",a=rp(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const l=_f(0);if(r||!r&&!o)if((Hm(e)!=="body"||kb(i))&&(s=zx(e)),r){const h=rp(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=Ck(i));let u=0,c=0;if(i&&!r&&!o){const h=i.getBoundingClientRect();c=h.top+s.scrollTop,u=h.left+s.scrollLeft-Ck(i,h)}const d=a.left+s.scrollLeft-l.x-u,f=a.top+s.scrollTop-l.y-c;return{x:d,y:f,width:a.width,height:a.height}}function vT(t){return lu(t).position==="static"}function F5(t,e){if(!ec(t)||lu(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return dc(t)===n&&(n=n.ownerDocument.body),n}function yH(t,e){const n=Ms(t);if(jx(t))return n;if(!ec(t)){let i=Of(t);for(;i&&!nm(i);){if(su(i)&&!vT(i))return i;i=Of(i)}return n}let r=F5(t,e);for(;r&&VTe(r)&&vT(r);)r=F5(r,e);return r&&nm(r)&&vT(r)&&!M$(r)?n:r||jTe(t)||n}const JTe=async function(t){const e=this.getOffsetParent||yH,n=this.getDimensions,r=await n(t.floating);return{reference:KTe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function e2e(t){return lu(t).direction==="rtl"}const t2e={convertOffsetParentRelativeRectToViewportRelativeRect:HTe,getDocumentElement:dc,getClippingRect:ZTe,getOffsetParent:yH,getElementRects:JTe,getClientRects:WTe,getDimensions:GTe,getScale:Ag,isElement:su,isRTL:e2e};function n2e(t,e){let n=null,r;const i=dc(t);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(s||e(),!d||!f)return;const h=tO(c),m=tO(i.clientWidth-(u+d)),g=tO(i.clientHeight-(c+f)),y=tO(u),w={rootMargin:-h+"px "+-m+"px "+-g+"px "+-y+"px",threshold:jh(0,em(1,l))||1};let O=!0;function S(x){const C=x[0].intersectionRatio;if(C!==l){if(!O)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(S,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(t)}return a(!0),o}function r2e(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=$$(t),c=i||o?[...u?g0(u):[],...g0(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&s?n2e(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var O;(O=h)==null||O.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let m,g=l?rp(t):null;l&&y();function y(){const b=rp(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const i2e=A$,bH=BTe,o2e=FTe,a2e=LTe,_H=DTe,OH=(t,e,n)=>{const r=new Map,i={platform:t2e,...n},o={...i.platform,_c:r};return NTe(t,e,{...i,platform:o})};Ye({});const s2e=t=>{if(!Tn)return;if(!t)return t;const e=Wa(t);return e||(kr(t)?e:t)},l2e=({middleware:t,placement:e,strategy:n})=>{const r=F(),i=F(),o=F(),a=F(),s=F({}),l={x:o,y:a,placement:e,strategy:n,middlewareData:s},u=async()=>{if(!Tn)return;const c=s2e(r),d=Wa(i);if(!c||!d)return;const f=await OH(c,d,{placement:p(e),strategy:p(n),middleware:p(t)});Yg(l).forEach(h=>{l[h].value=f[h]})};return Bt(()=>{Bo(()=>{u()})}),{...l,update:u,referenceRef:r,contentRef:i}},u2e=({arrowRef:t,padding:e})=>({name:"arrow",options:{element:t,padding:e},fn(n){const r=p(t);return r?_H({element:r,padding:e}).fn(n):{}}});function c2e(t){let e;function n(){if(t.value==null)return;const{selectionStart:i,selectionEnd:o,value:a}=t.value;if(i==null||o==null)return;const s=a.slice(0,Math.max(0,i)),l=a.slice(Math.max(0,o));e={selectionStart:i,selectionEnd:o,value:a,beforeTxt:s,afterTxt:l}}function r(){if(t.value==null||e==null)return;const{value:i}=t.value,{beforeTxt:o,afterTxt:a,selectionStart:s}=e;if(o==null||a==null||s==null)return;let l=i.length;if(i.endsWith(a))l=i.length-a.length;else if(i.startsWith(o))l=o.length;else{const u=o[s-1],c=i.indexOf(u,s-1);c!==-1&&(l=c+1)}t.value.setSelectionRange(l,l)}return[n,r]}const d2e=(t,e,n)=>Kd(t.subTree).filter(o=>{var a;return Kr(o)&&((a=o.type)==null?void 0:a.name)===e&&!!o.component}).map(o=>o.component.uid).map(o=>n[o]).filter(o=>!!o),N$=(t,e)=>{const n={},r=Tr([]);return{children:r,addChild:a=>{n[a.uid]=a,r.value=d2e(t,e,n)},removeChild:a=>{delete n[a],r.value=r.value.filter(s=>s.uid!==a)}}},Wi=hu({type:String,values:cc,required:!1}),wH=Symbol("size"),SH=()=>{const t=ht(wH,{});return M(()=>p(t.size)||"")};function Pb(t,{beforeFocus:e,afterFocus:n,beforeBlur:r,afterBlur:i}={}){const o=en(),{emit:a}=o,s=Tr(),l=F(!1),u=f=>{($t(e)?e(f):!1)||l.value||(l.value=!0,a("focus",f),n==null||n())},c=f=>{var h;($t(r)?r(f):!1)||f.relatedTarget&&((h=s.value)==null?void 0:h.contains(f.relatedTarget))||(l.value=!1,a("blur",f),i==null||i())},d=()=>{var f,h;((f=s.value)==null?void 0:f.contains(document.activeElement))&&s.value!==document.activeElement||(h=t.value)==null||h.focus()};return Ve(s,f=>{f&&f.setAttribute("tabindex","-1")}),sr(s,"focus",u,!0),sr(s,"blur",c,!0),sr(s,"click",d,!0),{isFocused:l,wrapperRef:s,handleFocus:u,handleBlur:c}}function Qx({afterComposition:t,emit:e}){const n=F(!1),r=s=>{e==null||e("compositionstart",s),n.value=!0},i=s=>{var l;e==null||e("compositionupdate",s);const u=(l=s.target)==null?void 0:l.value,c=u[u.length-1]||"";n.value=!nEe(c)},o=s=>{e==null||e("compositionend",s),n.value&&(n.value=!1,Ot(()=>t(s)))};return{isComposing:n,handleComposition:s=>{s.type==="compositionend"?o(s):i(s)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:o}}const xH=Symbol("emptyValuesContextKey"),f2e=["",void 0,null],h2e=void 0,Wm=Ye({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>$t(t)?!t():!t}}),Hx=(t,e)=>{const n=en()?ht(xH,F({})):F({}),r=M(()=>t.emptyValues||n.value.emptyValues||f2e),i=M(()=>$t(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:$t(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:h2e),o=a=>r.value.includes(a);return r.value.includes(i.value),{emptyValues:r,valueOnClear:i,isEmptyValue:o}},p2e=Ye({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),wo=t=>vo(p2e,t),CH=Symbol(),bw=F();function Wx(t,e=void 0){const n=en()?ht(CH,bw):bw;return t?M(()=>{var r,i;return(i=(r=n.value)==null?void 0:r[t])!=null?i:e}):n}function Ux(t,e){const n=Wx(),r=Qe(t,M(()=>{var s;return((s=n.value)==null?void 0:s.namespace)||wy})),i=kn(M(()=>{var s;return(s=n.value)==null?void 0:s.locale})),o=Qm(M(()=>{var s;return((s=n.value)==null?void 0:s.zIndex)||uH})),a=M(()=>{var s;return p(e)||((s=n.value)==null?void 0:s.size)||""});return D$(M(()=>p(n)||{})),{ns:r,locale:i,zIndex:o,size:a}}const D$=(t,e,n=!1)=>{var r;const i=!!en(),o=i?Wx():void 0,a=(r=e==null?void 0:e.provide)!=null?r:i?_n:void 0;if(!a)return;const s=M(()=>{const l=p(t);return o!=null&&o.value?g2e(o.value,l):l});return a(CH,s),a(qQ,M(()=>s.value.locale)),a(YQ,M(()=>s.value.namespace)),a(cH,M(()=>s.value.zIndex)),a(wH,{size:M(()=>s.value.size||"")}),a(xH,M(()=>({emptyValues:s.value.emptyValues,valueOnClear:s.value.valueOnClear}))),(n||!bw.value)&&(bw.value=s.value),s},g2e=(t,e)=>{const n=[...new Set([...Yg(t),...Yg(e)])],r={};for(const i of n)r[i]=e[i]!==void 0?e[i]:t[i];return r},m2e=Ye({a11y:{type:Boolean,default:!0},locale:{type:Oe(Object)},size:Wi,button:{type:Oe(Object)},experimentalFeatures:{type:Oe(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Oe(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Wm}),Ql={},v2e=ue({name:"ElConfigProvider",props:m2e,setup(t,{slots:e}){Ve(()=>t.message,r=>{Object.assign(Ql,r!=null?r:{})},{immediate:!0,deep:!0});const n=D$(t);return()=>xe(e,"default",{config:n==null?void 0:n.value})}}),EH=Vt(v2e),y2e="2.8.6",b2e=(t=[])=>({version:y2e,install:(n,r)=>{n[b5]||(n[b5]=!0,t.forEach(i=>n.use(i)),r&&D$(r,n,!0))}}),_2e=Ye({zIndex:{type:Oe([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),O2e={scroll:({scrollTop:t,fixed:e})=>kt(t)&&si(e),[Lr]:t=>si(t)};var Ge=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const TH="ElAffix",w2e=ue({name:TH}),S2e=ue({...w2e,props:_2e,emits:O2e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("affix"),o=Tr(),a=Tr(),s=Tr(),{height:l}=ace(),{height:u,width:c,top:d,bottom:f,update:h}=a4(a,{windowScroll:!1}),m=a4(o),g=F(!1),y=F(0),b=F(0),w=M(()=>({height:g.value?`${u.value}px`:"",width:g.value?`${c.value}px`:""})),O=M(()=>{if(!g.value)return{};const C=r.offset?pi(r.offset):0;return{height:`${u.value}px`,width:`${c.value}px`,top:r.position==="top"?C:"",bottom:r.position==="bottom"?C:"",transform:b.value?`translateY(${b.value}px)`:"",zIndex:r.zIndex}}),S=()=>{if(!s.value)return;y.value=s.value instanceof Window?document.documentElement.scrollTop:s.value.scrollTop||0;const{position:C,target:E,offset:T}=r,P=T+u.value;if(C==="top")if(E){const A=m.bottom.value-P;g.value=T>d.value&&m.bottom.value>0,b.value=A<0?A:0}else g.value=T>d.value;else if(E){const A=l.value-m.top.value-P;g.value=l.value-T<f.value&&l.value>m.top.value,b.value=A<0?-A:0}else g.value=l.value-T<f.value},x=()=>{h(),n("scroll",{scrollTop:y.value,fixed:g.value})};return Ve(g,C=>n("change",C)),Bt(()=>{var C;r.target?(o.value=(C=document.querySelector(r.target))!=null?C:void 0,o.value||Hi(TH,`Target does not exist: ${r.target}`)):o.value=document.documentElement,s.value=r$(a.value,!0),h()}),sr(s,"scroll",x),Bo(S),e({update:S,updateRoot:h}),(C,E)=>(R(),G("div",{ref_key:"root",ref:a,class:j(p(i).b()),style:mt(p(w))},[J("div",{class:j({[p(i).m("fixed")]:g.value}),style:mt(p(O))},[xe(C.$slots,"default")],6)],6))}});var x2e=Ge(S2e,[["__file","affix.vue"]]);const C2e=Vt(x2e),E2e=Ye({size:{type:Oe([Number,String])},color:{type:String}}),T2e=ue({name:"ElIcon",inheritAttrs:!1}),k2e=ue({...T2e,props:E2e,setup(t){const e=t,n=Qe("icon"),r=M(()=>{const{size:i,color:o}=e;return!i&&!o?{}:{fontSize:ai(i)?void 0:pi(i),"--color":o}});return(i,o)=>(R(),G("i",gn({class:p(n).b(),style:p(r)},i.$attrs),[xe(i.$slots,"default")],16))}});var P2e=Ge(k2e,[["__file","icon.vue"]]);const gt=Vt(P2e),A2e=["light","dark"],M2e=Ye({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:Yg(bf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:A2e,default:"light"}}),R2e={close:t=>t instanceof MouseEvent},$2e=ue({name:"ElAlert"}),N2e=ue({...$2e,props:M2e,emits:R2e,setup(t,{emit:e}){const n=t,{Close:r}=h$,i=Ji(),o=Qe("alert"),a=F(!0),s=M(()=>bf[n.type]),l=M(()=>[o.e("icon"),{[o.is("big")]:!!n.description||!!i.default}]),u=M(()=>({"with-description":n.description||i.default})),c=d=>{a.value=!1,e("close",d)};return(d,f)=>(R(),we(Qi,{name:p(o).b("fade"),persisted:""},{default:z(()=>[Ht(J("div",{class:j([p(o).b(),p(o).m(d.type),p(o).is("center",d.center),p(o).is(d.effect)]),role:"alert"},[d.showIcon&&p(s)?(R(),we(p(gt),{key:0,class:j(p(l))},{default:z(()=>[(R(),we(un(p(s))))]),_:1},8,["class"])):_e("v-if",!0),J("div",{class:j(p(o).e("content"))},[d.title||d.$slots.title?(R(),G("span",{key:0,class:j([p(o).e("title"),p(u)])},[xe(d.$slots,"title",{},()=>[qe(je(d.title),1)])],2)):_e("v-if",!0),d.$slots.default||d.description?(R(),G("p",{key:1,class:j(p(o).e("description"))},[xe(d.$slots,"default",{},()=>[qe(je(d.description),1)])],2)):_e("v-if",!0),d.closable?(R(),G(ct,{key:2},[d.closeText?(R(),G("div",{key:0,class:j([p(o).e("close-btn"),p(o).is("customed")]),onClick:c},je(d.closeText),3)):(R(),we(p(gt),{key:1,class:j(p(o).e("close-btn")),onClick:c},{default:z(()=>[B(p(r))]),_:1},8,["class"]))],64)):_e("v-if",!0)],2)],2),[[zn,a.value]])]),_:3},8,["name"]))}});var D2e=Ge(N2e,[["__file","alert.vue"]]);const kH=Vt(D2e),Op=Symbol("formContextKey"),tc=Symbol("formItemContextKey"),Ni=(t,e={})=>{const n=F(void 0),r=e.prop?n:XQ("size"),i=e.global?n:SH(),o=e.form?{size:void 0}:ht(Op,void 0),a=e.formItem?{size:void 0}:ht(tc,void 0);return M(()=>r.value||p(t)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},la=t=>{const e=XQ("disabled"),n=ht(Op,void 0);return M(()=>e.value||p(t)||(n==null?void 0:n.disabled)||!1)},ua=()=>{const t=ht(Op,void 0),e=ht(tc,void 0);return{form:t,formItem:e}},gu=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=F(!1)),r||(r=F(!1));const i=F();let o;const a=M(()=>{var s;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((s=e.inputIds)==null?void 0:s.length)<=1)});return Bt(()=>{o=Ve([er(t,"id"),n],([s,l])=>{const u=s!=null?s:l?void 0:bo().value;u!==i.value&&(e!=null&&e.removeInputId&&(i.value&&e.removeInputId(i.value),!(r!=null&&r.value)&&!l&&u&&e.addInputId(u)),i.value=u)},{immediate:!0})}),ed(()=>{o&&o(),e!=null&&e.removeInputId&&i.value&&e.removeInputId(i.value)}),{isLabeledByFormItem:a,inputId:i}},L2e=Ye({size:{type:String,values:cc},disabled:Boolean}),I2e=Ye({...L2e,model:Object,rules:{type:Oe(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),B2e={validate:(t,e,n)=>(ut(t)||At(t))&&si(e)&&At(n)};function F2e(){const t=F([]),e=M(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const a=t.value.indexOf(o);return a===-1&&e.value,a}function r(o,a){if(o&&a){const s=n(a);t.value.splice(s,1,o)}else o&&t.value.push(o)}function i(o){const a=n(o);a>-1&&t.value.splice(a,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:i}}const nO=(t,e)=>{const n=$o(e);return n.length>0?t.filter(r=>r.prop&&n.includes(r.prop)):t},V2e="ElForm",j2e=ue({name:V2e}),z2e=ue({...j2e,props:I2e,emits:B2e,setup(t,{expose:e,emit:n}){const r=t,i=[],o=Ni(),a=Qe("form"),s=M(()=>{const{labelPosition:O,inline:S}=r;return[a.b(),a.m(o.value||"default"),{[a.m(`label-${O}`)]:O,[a.m("inline")]:S}]}),l=O=>i.find(S=>S.prop===O),u=O=>{i.push(O)},c=O=>{O.prop&&i.splice(i.indexOf(O),1)},d=(O=[])=>{!r.model||nO(i,O).forEach(S=>S.resetField())},f=(O=[])=>{nO(i,O).forEach(S=>S.clearValidate())},h=M(()=>!!r.model),m=O=>{if(i.length===0)return[];const S=nO(i,O);return S.length?S:[]},g=async O=>b(void 0,O),y=async(O=[])=>{if(!h.value)return!1;const S=m(O);if(S.length===0)return!0;let x={};for(const C of S)try{await C.validate("")}catch(E){x={...x,...E}}return Object.keys(x).length===0?!0:Promise.reject(x)},b=async(O=[],S)=>{const x=!$t(S);try{const C=await y(O);return C===!0&&await(S==null?void 0:S(C)),C}catch(C){if(C instanceof Error)throw C;const E=C;return r.scrollToError&&w(Object.keys(E)[0]),await(S==null?void 0:S(!1,E)),x&&Promise.reject(E)}},w=O=>{var S;const x=nO(i,O)[0];x&&((S=x.$el)==null||S.scrollIntoView(r.scrollIntoViewOptions))};return Ve(()=>r.rules,()=>{r.validateOnRuleChange&&g().catch(O=>void 0)},{deep:!0}),_n(Op,Sn({...Ri(r),emit:n,resetFields:d,clearValidate:f,validateField:b,getField:l,addField:u,removeField:c,...F2e()})),e({validate:g,validateField:b,resetFields:d,clearValidate:f,scrollToField:w,fields:i}),(O,S)=>(R(),G("form",{class:j(p(s))},[xe(O.$slots,"default")],2))}});var Q2e=Ge(z2e,[["__file","form.vue"]]);function Ph(){return Ph=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ph.apply(this,arguments)}function H2e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,m0(t,e)}function Ek(t){return Ek=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ek(t)}function m0(t,e){return m0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},m0(t,e)}function W2e(){if(typeof Reflect=="undefined"||!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 O1(t,e,n){return W2e()?O1=Reflect.construct.bind():O1=function(i,o,a){var s=[null];s.push.apply(s,o);var l=Function.bind.apply(i,s),u=new l;return a&&m0(u,a.prototype),u},O1.apply(null,arguments)}function U2e(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Tk(t){var e=typeof Map=="function"?new Map:void 0;return Tk=function(r){if(r===null||!U2e(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return O1(r,arguments,Ek(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),m0(i,r)},Tk(t)}var q2e=/%[sdj%]/g,Y2e=function(){};typeof process!="undefined"&&process.env;function kk(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function Es(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var a=t.replace(q2e,function(s){if(s==="%%")return"%";if(i>=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function X2e(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function lo(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||X2e(e)&&typeof t=="string"&&!t)}function Z2e(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,s||[]),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function V5(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<i?e(t[s],o):n([])}o([])}function G2e(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var j5=function(t){H2e(e,t);function e(n,r){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return e}(Tk(Error));function K2e(t,e,n,r,i){if(e.first){var o=new Promise(function(f,h){var m=function(b){return r(b),b.length?h(new j5(b,kk(b))):f(i)},g=G2e(t);V5(g,n,m)});return o.catch(function(f){return f}),o}var a=e.firstFields===!0?Object.keys(t):e.firstFields||[],s=Object.keys(t),l=s.length,u=0,c=[],d=new Promise(function(f,h){var m=function(y){if(c.push.apply(c,y),u++,u===l)return r(c),c.length?h(new j5(c,kk(c))):f(i)};s.length||(r(c),f(i)),s.forEach(function(g){var y=t[g];a.indexOf(g)!==-1?V5(y,n,m):Z2e(y,n,m)})});return d.catch(function(f){return f}),d}function J2e(t){return!!(t&&t.message!==void 0)}function eke(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function z5(t,e){return function(n){var r;return t.fullFields?r=eke(e,t.fullFields):r=e[n.field||t.fullField],J2e(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function Q5(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];typeof r=="object"&&typeof t[n]=="object"?t[n]=Ph({},t[n],r):t[n]=r}}return t}var PH=function(e,n,r,i,o,a){e.required&&(!r.hasOwnProperty(e.field)||lo(n,a||e.type))&&i.push(Es(o.messages.required,e.fullField))},tke=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Es(o.messages.whitespace,e.fullField))},rO,nke=function(){if(rO)return rO;var t="[a-fA-F\\d:]",e=function(S){return S&&S.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}",r="[a-fA-F\\d]{1,4}",i=(`
  29. (?:
  30. (?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
  31. (?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 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
  32. (?:`+r+":){5}(?::"+n+"|(?::"+r+`){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
  33. (?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){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
  34. (?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){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
  35. (?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
  36. (?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
  37. (?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
  38. )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
  39. `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(S){return S&&S.exact?o:new RegExp("(?:"+e(S)+n+e(S)+")|(?:"+e(S)+i+e(S)+")","g")};l.v4=function(O){return O&&O.exact?a:new RegExp(""+e(O)+n+e(O),"g")},l.v6=function(O){return O&&O.exact?s:new RegExp(""+e(O)+i+e(O),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",b='(?:[/?#][^\\s"]*)?',w="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+h+m+g+")"+y+b;return rO=new RegExp("(?:^"+w+"$)","i"),rO},H5={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ey={integer:function(e){return ey.number(e)&&parseInt(e,10)===e},float:function(e){return ey.number(e)&&!ey.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"&&!ey.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(H5.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(nke())},hex:function(e){return typeof e=="string"&&!!e.match(H5.hex)}},rke=function(e,n,r,i,o){if(e.required&&n===void 0){PH(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?ey[s](n)||i.push(Es(o.messages.types[s],e.fullField,e.type)):s&&typeof n!==e.type&&i.push(Es(o.messages.types[s],e.fullField,e.type))},ike=function(e,n,r,i,o){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",h=typeof n=="string",m=Array.isArray(n);if(f?d="number":h?d="string":m&&(d="array"),!d)return!1;m&&(c=n.length),h&&(c=n.replace(u,"_").length),a?c!==e.len&&i.push(Es(o.messages[d].len,e.fullField,e.len)):s&&!l&&c<e.min?i.push(Es(o.messages[d].min,e.fullField,e.min)):l&&!s&&c>e.max?i.push(Es(o.messages[d].max,e.fullField,e.max)):s&&l&&(c<e.min||c>e.max)&&i.push(Es(o.messages[d].range,e.fullField,e.min,e.max))},zp="enum",oke=function(e,n,r,i,o){e[zp]=Array.isArray(e[zp])?e[zp]:[],e[zp].indexOf(n)===-1&&i.push(Es(o.messages[zp],e.fullField,e[zp].join(", ")))},ake=function(e,n,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(Es(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||i.push(Es(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},wr={required:PH,whitespace:tke,type:rke,range:ike,enum:oke,pattern:ake},ske=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n,"string")&&!e.required)return r();wr.required(e,n,i,a,o,"string"),lo(n,"string")||(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o),wr.pattern(e,n,i,a,o),e.whitespace===!0&&wr.whitespace(e,n,i,a,o))}r(a)},lke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr.type(e,n,i,a,o)}r(a)},uke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},cke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr.type(e,n,i,a,o)}r(a)},dke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),lo(n)||wr.type(e,n,i,a,o)}r(a)},fke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},hke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},pke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();wr.required(e,n,i,a,o,"array"),n!=null&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},gke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr.type(e,n,i,a,o)}r(a)},mke="enum",vke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr[mke](e,n,i,a,o)}r(a)},yke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n,"string")&&!e.required)return r();wr.required(e,n,i,a,o),lo(n,"string")||wr.pattern(e,n,i,a,o)}r(a)},bke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n,"date")&&!e.required)return r();if(wr.required(e,n,i,a,o),!lo(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),wr.type(e,l,i,a,o),l&&wr.range(e,l.getTime(),i,a,o)}}r(a)},_ke=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":typeof n;wr.required(e,n,i,a,o,s),r(a)},yT=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(lo(n,a)&&!e.required)return r();wr.required(e,n,i,s,o,a),lo(n,a)||wr.type(e,n,i,s,o)}r(s)},Oke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o)}r(a)},Cy={string:ske,method:lke,number:uke,boolean:cke,regexp:dke,integer:fke,float:hke,array:pke,object:gke,enum:vke,pattern:yke,date:bke,url:yT,hex:yT,email:yT,required:_ke,any:Oke};function Pk(){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 Ak=Pk(),Ab=function(){function t(n){this.rules=null,this._messages=Ak,this.define(n)}var e=t.prototype;return e.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var a=r[o];i.rules[o]=Array.isArray(a)?a:[a]})},e.messages=function(r){return r&&(this._messages=Q5(Pk(),r)),this._messages},e.validate=function(r,i,o){var a=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var s=r,l=i,u=o;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function c(g){var y=[],b={};function w(S){if(Array.isArray(S)){var x;y=(x=y).concat.apply(x,S)}else y.push(S)}for(var O=0;O<g.length;O++)w(g[O]);y.length?(b=kk(y),u(y,b)):u(null,s)}if(l.messages){var d=this.messages();d===Ak&&(d=Pk()),Q5(d,l.messages),l.messages=d}else l.messages=this.messages();var f={},h=l.keys||Object.keys(this.rules);h.forEach(function(g){var y=a.rules[g],b=s[g];y.forEach(function(w){var O=w;typeof O.transform=="function"&&(s===r&&(s=Ph({},s)),b=s[g]=O.transform(b)),typeof O=="function"?O={validator:O}:O=Ph({},O),O.validator=a.getValidationMethod(O),O.validator&&(O.field=g,O.fullField=O.fullField||g,O.type=a.getType(O),f[g]=f[g]||[],f[g].push({rule:O,value:b,source:s,field:g}))})});var m={};return K2e(f,l,function(g,y){var b=g.rule,w=(b.type==="object"||b.type==="array")&&(typeof b.fields=="object"||typeof b.defaultField=="object");w=w&&(b.required||!b.required&&g.value),b.field=g.field;function O(C,E){return Ph({},E,{fullField:b.fullField+"."+C,fullFields:b.fullFields?[].concat(b.fullFields,[C]):[C]})}function S(C){C===void 0&&(C=[]);var E=Array.isArray(C)?C:[C];!l.suppressWarning&&E.length&&t.warning("async-validator:",E),E.length&&b.message!==void 0&&(E=[].concat(b.message));var T=E.map(z5(b,s));if(l.first&&T.length)return m[b.field]=1,y(T);if(!w)y(T);else{if(b.required&&!g.value)return b.message!==void 0?T=[].concat(b.message).map(z5(b,s)):l.error&&(T=[l.error(b,Es(l.messages.required,b.field))]),y(T);var P={};b.defaultField&&Object.keys(g.value).map(function(N){P[N]=b.defaultField}),P=Ph({},P,g.rule.fields);var A={};Object.keys(P).forEach(function(N){var $=P[N],W=Array.isArray($)?$:[$];A[N]=W.map(O.bind(null,N))});var D=new t(A);D.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),D.validate(g.value,g.rule.options||l,function(N){var $=[];T&&T.length&&$.push.apply($,T),N&&N.length&&$.push.apply($,N),y($.length?$:null)})}}var x;if(b.asyncValidator)x=b.asyncValidator(b,g.value,S,g.source,l);else if(b.validator){try{x=b.validator(b,g.value,S,g.source,l)}catch(C){console.error==null||console.error(C),l.suppressValidatorError||setTimeout(function(){throw C},0),S(C.message)}x===!0?S():x===!1?S(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||(b.fullField||b.field)+" fails"):x instanceof Array?S(x):x instanceof Error&&S(x.message)}x&&x.then&&x.then(function(){return S()},function(C){return S(C)})},function(g){c(g)},s)},e.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Cy.hasOwnProperty(r.type))throw new Error(Es("Unknown rule type %s",r.type));return r.type||"string"},e.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?Cy.required:Cy[this.getType(r)]||void 0},t}();Ab.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Cy[e]=n};Ab.warning=Y2e;Ab.messages=Ak;Ab.validators=Cy;const wke=["","error","validating","success"],Ske=Ye({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:Oe([String,Array])},required:{type:Boolean,default:void 0},rules:{type:Oe([Object,Array])},error:String,validateStatus:{type:String,values:wke},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:cc}}),W5="ElLabelWrap";var xke=ue({name:W5,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=ht(Op,void 0),r=ht(tc);r||Hi(W5,"usage: <el-form-item><label-wrap /></el-form-item>");const i=Qe("form"),o=F(),a=F(0),s=()=>{var c;if((c=o.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(o.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(c="update")=>{Ot(()=>{e.default&&t.isAutoWidth&&(c==="update"?a.value=s():c==="remove"&&(n==null||n.deregisterLabelWidth(a.value)))})},u=()=>l("update");return Bt(()=>{u()}),pr(()=>{l("remove")}),Jc(()=>u()),Ve(a,(c,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(c,d))}),Zr(M(()=>{var c,d;return(d=(c=o.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!e)return null;const{isAutoWidth:f}=t;if(f){const h=n==null?void 0:n.autoLabelWidth,m=r==null?void 0:r.hasLabel,g={};if(m&&h&&h!=="auto"){const y=Math.max(0,Number.parseInt(h,10)-a.value),w=(r.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";y&&(g[w]=`${y}px`)}return B("div",{ref:o,class:[i.be("item","label-wrap")],style:g},[(c=e.default)==null?void 0:c.call(e)])}else return B(ct,{ref:o},[(d=e.default)==null?void 0:d.call(e)])}}});const Cke=ue({name:"ElFormItem"}),Eke=ue({...Cke,props:Ske,setup(t,{expose:e}){const n=t,r=Ji(),i=ht(Op,void 0),o=ht(tc,void 0),a=Ni(void 0,{formItem:!1}),s=Qe("form-item"),l=bo().value,u=F([]),c=F(""),d=zue(c,100),f=F(""),h=F();let m,g=!1;const y=M(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),b=M(()=>{if(y.value==="top")return{};const te=pi(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return te?{width:te}:{}}),w=M(()=>{if(y.value==="top"||(i==null?void 0:i.inline))return{};if(!n.label&&!n.labelWidth&&A)return{};const te=pi(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return!n.label&&!r.label?{marginLeft:te}:{}}),O=M(()=>[s.b(),s.m(a.value),s.is("error",c.value==="error"),s.is("validating",c.value==="validating"),s.is("success",c.value==="success"),s.is("required",L.value||n.required),s.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[s.m("feedback")]:i==null?void 0:i.statusIcon,[s.m(`label-${y.value}`)]:y.value}]),S=M(()=>si(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),x=M(()=>[s.e("error"),{[s.em("error","inline")]:S.value}]),C=M(()=>n.prop?At(n.prop)?n.prop:n.prop.join("."):""),E=M(()=>!!(n.label||r.label)),T=M(()=>n.for||(u.value.length===1?u.value[0]:void 0)),P=M(()=>!T.value&&E.value),A=!!o,D=M(()=>{const te=i==null?void 0:i.model;if(!(!te||!n.prop))return b1(te,n.prop).value}),N=M(()=>{const{required:te}=n,ge=[];n.rules&&ge.push(...$o(n.rules));const Re=i==null?void 0:i.rules;if(Re&&n.prop){const $e=b1(Re,n.prop).value;$e&&ge.push(...$o($e))}if(te!==void 0){const $e=ge.map((Z,ce)=>[Z,ce]).filter(([Z])=>Object.keys(Z).includes("required"));if($e.length>0)for(const[Z,ce]of $e)Z.required!==te&&(ge[ce]={...Z,required:te});else ge.push({required:te})}return ge}),$=M(()=>N.value.length>0),W=te=>N.value.filter(Re=>!Re.trigger||!te?!0:Array.isArray(Re.trigger)?Re.trigger.includes(te):Re.trigger===te).map(({trigger:Re,...$e})=>$e),L=M(()=>N.value.some(te=>te.required)),I=M(()=>{var te;return d.value==="error"&&n.showMessage&&((te=i==null?void 0:i.showMessage)!=null?te:!0)}),U=M(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),Q=te=>{c.value=te},V=te=>{var ge,Re;const{errors:$e,fields:Z}=te;(!$e||!Z)&&console.error(te),Q("error"),f.value=$e?(Re=(ge=$e==null?void 0:$e[0])==null?void 0:ge.message)!=null?Re:`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,f.value)},q=()=>{Q("success"),i==null||i.emit("validate",n.prop,!0,"")},K=async te=>{const ge=C.value;return new Ab({[ge]:te}).validate({[ge]:D.value},{firstFields:!0}).then(()=>(q(),!0)).catch($e=>(V($e),Promise.reject($e)))},ie=async(te,ge)=>{if(g||!n.prop)return!1;const Re=$t(ge);if(!$.value)return ge==null||ge(!1),!1;const $e=W(te);return $e.length===0?(ge==null||ge(!0),!0):(Q("validating"),K($e).then(()=>(ge==null||ge(!0),!0)).catch(Z=>{const{fields:ce}=Z;return ge==null||ge(!1,ce),Re?!1:Promise.reject(ce)}))},oe=()=>{Q(""),f.value="",g=!1},Se=async()=>{const te=i==null?void 0:i.model;if(!te||!n.prop)return;const ge=b1(te,n.prop);g=!0,ge.value=fk(m),await Ot(),oe(),g=!1},ke=te=>{u.value.includes(te)||u.value.push(te)},Y=te=>{u.value=u.value.filter(ge=>ge!==te)};Ve(()=>n.error,te=>{f.value=te||"",Q(te?"error":"")},{immediate:!0}),Ve(()=>n.validateStatus,te=>Q(te||""));const re=Sn({...Ri(n),$el:h,size:a,validateState:c,labelId:l,inputIds:u,isGroup:P,hasLabel:E,fieldValue:D,addInputId:ke,removeInputId:Y,resetField:Se,clearValidate:oe,validate:ie});return _n(tc,re),Bt(()=>{n.prop&&(i==null||i.addField(re),m=fk(D.value))}),pr(()=>{i==null||i.removeField(re)}),e({size:a,validateMessage:f,validateState:c,validate:ie,clearValidate:oe,resetField:Se}),(te,ge)=>{var Re;return R(),G("div",{ref_key:"formItemRef",ref:h,class:j(p(O)),role:p(P)?"group":void 0,"aria-labelledby":p(P)?p(l):void 0},[B(p(xke),{"is-auto-width":p(b).width==="auto","update-all":((Re=p(i))==null?void 0:Re.labelWidth)==="auto"},{default:z(()=>[p(E)?(R(),we(un(p(T)?"label":"div"),{key:0,id:p(l),for:p(T),class:j(p(s).e("label")),style:mt(p(b))},{default:z(()=>[xe(te.$slots,"label",{label:p(U)},()=>[qe(je(p(U)),1)])]),_:3},8,["id","for","class","style"])):_e("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),J("div",{class:j(p(s).e("content")),style:mt(p(w))},[xe(te.$slots,"default"),B(Kz,{name:`${p(s).namespace.value}-zoom-in-top`},{default:z(()=>[p(I)?xe(te.$slots,"error",{key:0,error:f.value},()=>[J("div",{class:j(p(x))},je(f.value),3)]):_e("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var AH=Ge(Eke,[["__file","form-item.vue"]]);const El=Vt(Q2e,{FormItem:AH}),Tl=ti(AH);let Il;const Tke=`
  40. height:0 !important;
  41. visibility:hidden !important;
  42. ${nR()?"":"overflow:hidden !important;"}
  43. position:absolute !important;
  44. z-index:-1000 !important;
  45. top:0 !important;
  46. right:0 !important;
  47. `,kke=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Pke(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),r=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:kke.map(a=>`${a}:${e.getPropertyValue(a)}`).join(";"),paddingSize:r,borderSize:i,boxSizing:n}}function U5(t,e=1,n){var r;Il||(Il=document.createElement("textarea"),document.body.appendChild(Il));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=Pke(t);Il.setAttribute("style",`${s};${Tke}`),Il.value=t.value||t.placeholder||"";let l=Il.scrollHeight;const u={};a==="border-box"?l=l+o:a==="content-box"&&(l=l-i),Il.value="";const c=Il.scrollHeight-i;if(kt(e)){let d=c*e;a==="border-box"&&(d=d+i+o),l=Math.max(d,l),u.minHeight=`${d}px`}if(kt(n)){let d=c*n;a==="border-box"&&(d=d+i+o),l=Math.min(d,l)}return u.height=`${l}px`,(r=Il.parentNode)==null||r.removeChild(Il),Il=void 0,u}const L$=Ye({id:{type:String,default:void 0},size:Wi,disabled:Boolean,modelValue:{type:Oe([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Oe([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:fr},prefixIcon:{type:fr},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Oe([Object,Array,String]),default:()=>Jr({})},autofocus:Boolean,rows:{type:Number,default:2},...wo(["ariaLabel"])}),Ake={[Zt]:t=>At(t),input:t=>At(t),change:t=>At(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,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},Mke=ue({name:"ElInput",inheritAttrs:!1}),Rke=ue({...Mke,props:L$,emits:Ake,setup(t,{expose:e,emit:n}){const r=t,i=mp(),o=Ji(),a=M(()=>{const be={};return r.containerRole==="combobox"&&(be["aria-haspopup"]=i["aria-haspopup"],be["aria-owns"]=i["aria-owns"],be["aria-expanded"]=i["aria-expanded"]),be}),s=M(()=>[r.type==="textarea"?y.b():g.b(),g.m(h.value),g.is("disabled",m.value),g.is("exceed",oe.value),{[g.b("group")]:o.prepend||o.append,[g.m("prefix")]:o.prefix||r.prefixIcon,[g.m("suffix")]:o.suffix||r.suffixIcon||r.clearable||r.showPassword,[g.bm("suffix","password-clear")]:V.value&&q.value,[g.b("hidden")]:r.type==="hidden"},i.class]),l=M(()=>[g.e("wrapper"),g.is("focus",P.value)]),u=g$({excludeKeys:M(()=>Object.keys(a.value))}),{form:c,formItem:d}=ua(),{inputId:f}=gu(r,{formItemContext:d}),h=Ni(),m=la(),g=Qe("input"),y=Qe("textarea"),b=Tr(),w=Tr(),O=F(!1),S=F(!1),x=F(),C=Tr(r.inputStyle),E=M(()=>b.value||w.value),{wrapperRef:T,isFocused:P,handleFocus:A,handleBlur:D}=Pb(E,{beforeFocus(){return m.value},afterBlur(){var be;r.validateEvent&&((be=d==null?void 0:d.validate)==null||be.call(d,"blur").catch(Be=>void 0))}}),N=M(()=>{var be;return(be=c==null?void 0:c.statusIcon)!=null?be:!1}),$=M(()=>(d==null?void 0:d.validateState)||""),W=M(()=>$.value&&p$[$.value]),L=M(()=>S.value?HCe:cCe),I=M(()=>[i.style]),U=M(()=>[r.inputStyle,C.value,{resize:r.resize}]),Q=M(()=>Dr(r.modelValue)?"":String(r.modelValue)),V=M(()=>r.clearable&&!m.value&&!r.readonly&&!!Q.value&&(P.value||O.value)),q=M(()=>r.showPassword&&!m.value&&!!Q.value&&(!!Q.value||P.value)),K=M(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!m.value&&!r.readonly&&!r.showPassword),ie=M(()=>Q.value.length),oe=M(()=>!!K.value&&ie.value>Number(r.maxlength)),Se=M(()=>!!o.suffix||!!r.suffixIcon||V.value||r.showPassword||K.value||!!$.value&&N.value),[ke,Y]=c2e(b);Zr(w,be=>{if(ge(),!K.value||r.resize!=="both")return;const Be=be[0],{width:Xe}=Be.contentRect;x.value={right:`calc(100% - ${Xe+15+6}px)`}});const re=()=>{const{type:be,autosize:Be}=r;if(!(!Tn||be!=="textarea"||!w.value))if(Be){const Xe=sn(Be)?Be.minRows:void 0,Ke=sn(Be)?Be.maxRows:void 0,tt=U5(w.value,Xe,Ke);C.value={overflowY:"hidden",...tt},Ot(()=>{w.value.offsetHeight,C.value=tt})}else C.value={minHeight:U5(w.value).minHeight}},ge=(be=>{let Be=!1;return()=>{var Xe;if(Be||!r.autosize)return;((Xe=w.value)==null?void 0:Xe.offsetParent)===null||(be(),Be=!0)}})(re),Re=()=>{const be=E.value,Be=r.formatter?r.formatter(Q.value):Q.value;!be||be.value===Be||(be.value=Be)},$e=async be=>{ke();let{value:Be}=be.target;if(r.formatter&&(Be=r.parser?r.parser(Be):Be),!ce.value){if(Be===Q.value){Re();return}n(Zt,Be),n("input",Be),await Ot(),Re(),Y()}},Z=be=>{n("change",be.target.value)},{isComposing:ce,handleCompositionStart:Te,handleCompositionUpdate:Ie,handleCompositionEnd:ae}=Qx({emit:n,afterComposition:$e}),me=()=>{S.value=!S.value,Ae()},Ae=async()=>{var be;await Ot(),(be=E.value)==null||be.focus()},X=()=>{var be;return(be=E.value)==null?void 0:be.blur()},ee=be=>{O.value=!1,n("mouseleave",be)},le=be=>{O.value=!0,n("mouseenter",be)},Ce=be=>{n("keydown",be)},fe=()=>{var be;(be=E.value)==null||be.select()},Ee=()=>{n(Zt,""),n("change",""),n("clear"),n("input","")};return Ve(()=>r.modelValue,()=>{var be;Ot(()=>re()),r.validateEvent&&((be=d==null?void 0:d.validate)==null||be.call(d,"change").catch(Be=>void 0))}),Ve(Q,()=>Re()),Ve(()=>r.type,async()=>{await Ot(),Re(),re()}),Bt(()=>{!r.formatter&&r.parser,Re(),Ot(re)}),e({input:b,textarea:w,ref:E,textareaStyle:U,autosize:er(r,"autosize"),isComposing:ce,focus:Ae,blur:X,select:fe,clear:Ee,resizeTextarea:re}),(be,Be)=>(R(),G("div",gn(p(a),{class:[p(s),{[p(g).bm("group","append")]:be.$slots.append,[p(g).bm("group","prepend")]:be.$slots.prepend}],style:p(I),role:be.containerRole,onMouseenter:le,onMouseleave:ee}),[_e(" input "),be.type!=="textarea"?(R(),G(ct,{key:0},[_e(" prepend slot "),be.$slots.prepend?(R(),G("div",{key:0,class:j(p(g).be("group","prepend"))},[xe(be.$slots,"prepend")],2)):_e("v-if",!0),J("div",{ref_key:"wrapperRef",ref:T,class:j(p(l))},[_e(" prefix slot "),be.$slots.prefix||be.prefixIcon?(R(),G("span",{key:0,class:j(p(g).e("prefix"))},[J("span",{class:j(p(g).e("prefix-inner"))},[xe(be.$slots,"prefix"),be.prefixIcon?(R(),we(p(gt),{key:0,class:j(p(g).e("icon"))},{default:z(()=>[(R(),we(un(be.prefixIcon)))]),_:1},8,["class"])):_e("v-if",!0)],2)],2)):_e("v-if",!0),J("input",gn({id:p(f),ref_key:"input",ref:b,class:p(g).e("inner")},p(u),{minlength:be.minlength,maxlength:be.maxlength,type:be.showPassword?S.value?"text":"password":be.type,disabled:p(m),readonly:be.readonly,autocomplete:be.autocomplete,tabindex:be.tabindex,"aria-label":be.ariaLabel,placeholder:be.placeholder,style:be.inputStyle,form:be.form,autofocus:be.autofocus,onCompositionstart:p(Te),onCompositionupdate:p(Ie),onCompositionend:p(ae),onInput:$e,onChange:Z,onKeydown:Ce}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),_e(" suffix slot "),p(Se)?(R(),G("span",{key:1,class:j(p(g).e("suffix"))},[J("span",{class:j(p(g).e("suffix-inner"))},[!p(V)||!p(q)||!p(K)?(R(),G(ct,{key:0},[xe(be.$slots,"suffix"),be.suffixIcon?(R(),we(p(gt),{key:0,class:j(p(g).e("icon"))},{default:z(()=>[(R(),we(un(be.suffixIcon)))]),_:1},8,["class"])):_e("v-if",!0)],64)):_e("v-if",!0),p(V)?(R(),we(p(gt),{key:1,class:j([p(g).e("icon"),p(g).e("clear")]),onMousedown:Pt(p(yr),["prevent"]),onClick:Ee},{default:z(()=>[B(p(Bf))]),_:1},8,["class","onMousedown"])):_e("v-if",!0),p(q)?(R(),we(p(gt),{key:2,class:j([p(g).e("icon"),p(g).e("password")]),onClick:me},{default:z(()=>[(R(),we(un(p(L))))]),_:1},8,["class"])):_e("v-if",!0),p(K)?(R(),G("span",{key:3,class:j(p(g).e("count"))},[J("span",{class:j(p(g).e("count-inner"))},je(p(ie))+" / "+je(be.maxlength),3)],2)):_e("v-if",!0),p($)&&p(W)&&p(N)?(R(),we(p(gt),{key:4,class:j([p(g).e("icon"),p(g).e("validateIcon"),p(g).is("loading",p($)==="validating")])},{default:z(()=>[(R(),we(un(p(W))))]),_:1},8,["class"])):_e("v-if",!0)],2)],2)):_e("v-if",!0)],2),_e(" append slot "),be.$slots.append?(R(),G("div",{key:1,class:j(p(g).be("group","append"))},[xe(be.$slots,"append")],2)):_e("v-if",!0)],64)):(R(),G(ct,{key:1},[_e(" textarea "),J("textarea",gn({id:p(f),ref_key:"textarea",ref:w,class:[p(y).e("inner"),p(g).is("focus",p(P))]},p(u),{minlength:be.minlength,maxlength:be.maxlength,tabindex:be.tabindex,disabled:p(m),readonly:be.readonly,autocomplete:be.autocomplete,style:p(U),"aria-label":be.ariaLabel,placeholder:be.placeholder,form:be.form,autofocus:be.autofocus,rows:be.rows,onCompositionstart:p(Te),onCompositionupdate:p(Ie),onCompositionend:p(ae),onInput:$e,onFocus:p(A),onBlur:p(D),onChange:Z,onKeydown:Ce}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),p(K)?(R(),G("span",{key:0,style:mt(x.value),class:j(p(g).e("count"))},je(p(ie))+" / "+je(be.maxlength),7)):_e("v-if",!0)],64))],16,["role"]))}});var $ke=Ge(Rke,[["__file","input.vue"]]);const hi=Vt($ke),Qp=4,MH={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"}},Nke=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),I$=Symbol("scrollbarContextKey"),Dke=Ye({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Lke="Thumb",Ike=ue({__name:"thumb",props:Dke,setup(t){const e=t,n=ht(I$),r=Qe("scrollbar");n||Hi(Lke,"can not inject scrollbar context");const i=F(),o=F(),a=F({}),s=F(!1);let l=!1,u=!1,c=Tn?document.onselectstart:null;const d=M(()=>MH[e.vertical?"vertical":"horizontal"]),f=M(()=>Nke({size:e.size,move:e.move,bar:d.value})),h=M(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/o.value[d.value.offset]),m=C=>{var E;if(C.stopPropagation(),C.ctrlKey||[1,2].includes(C.button))return;(E=window.getSelection())==null||E.removeAllRanges(),y(C);const T=C.currentTarget;!T||(a.value[d.value.axis]=T[d.value.offset]-(C[d.value.client]-T.getBoundingClientRect()[d.value.direction]))},g=C=>{if(!o.value||!i.value||!n.wrapElement)return;const E=Math.abs(C.target.getBoundingClientRect()[d.value.direction]-C[d.value.client]),T=o.value[d.value.offset]/2,P=(E-T)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=P*n.wrapElement[d.value.scrollSize]/100},y=C=>{C.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),c=document.onselectstart,document.onselectstart=()=>!1},b=C=>{if(!i.value||!o.value||l===!1)return;const E=a.value[d.value.axis];if(!E)return;const T=(i.value.getBoundingClientRect()[d.value.direction]-C[d.value.client])*-1,P=o.value[d.value.offset]-E,A=(T-P)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=A*n.wrapElement[d.value.scrollSize]/100},w=()=>{l=!1,a.value[d.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",w),x(),u&&(s.value=!1)},O=()=>{u=!1,s.value=!!e.size},S=()=>{u=!0,s.value=l};pr(()=>{x(),document.removeEventListener("mouseup",w)});const x=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return sr(er(n,"scrollbarElement"),"mousemove",O),sr(er(n,"scrollbarElement"),"mouseleave",S),(C,E)=>(R(),we(Qi,{name:p(r).b("fade"),persisted:""},{default:z(()=>[Ht(J("div",{ref_key:"instance",ref:i,class:j([p(r).e("bar"),p(r).is(p(d).key)]),onMousedown:g},[J("div",{ref_key:"thumb",ref:o,class:j(p(r).e("thumb")),style:mt(p(f)),onMousedown:m},null,38)],34),[[zn,C.always||s.value]])]),_:1},8,["name"]))}});var q5=Ge(Ike,[["__file","thumb.vue"]]);const Bke=Ye({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Fke=ue({__name:"bar",props:Bke,setup(t,{expose:e}){const n=t,r=ht(I$),i=F(0),o=F(0),a=F(""),s=F(""),l=F(1),u=F(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-Qp,m=f.offsetWidth-Qp;o.value=f.scrollTop*100/h*l.value,i.value=f.scrollLeft*100/m*u.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const h=f.offsetHeight-Qp,m=f.offsetWidth-Qp,g=h**2/f.scrollHeight,y=m**2/f.scrollWidth,b=Math.max(g,n.minSize),w=Math.max(y,n.minSize);l.value=g/(h-g)/(b/(h-b)),u.value=y/(m-y)/(w/(m-w)),s.value=b+Qp<h?`${b}px`:"",a.value=w+Qp<m?`${w}px`:""}}),(f,h)=>(R(),G(ct,null,[B(q5,{move:i.value,ratio:u.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),B(q5,{move:o.value,ratio:l.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var Vke=Ge(Fke,[["__file","bar.vue"]]);const jke=Ye({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Oe([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,...wo(["ariaLabel","ariaOrientation"])}),zke={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(kt)},Qke="ElScrollbar",Hke=ue({name:Qke}),Wke=ue({...Hke,props:jke,emits:zke,setup(t,{expose:e,emit:n}){const r=t,i=Qe("scrollbar");let o,a,s=0,l=0;const u=F(),c=F(),d=F(),f=F(),h=M(()=>{const x={};return r.height&&(x.height=pi(r.height)),r.maxHeight&&(x.maxHeight=pi(r.maxHeight)),[r.wrapStyle,x]}),m=M(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),g=M(()=>[i.e("view"),r.viewClass]),y=()=>{var x;c.value&&((x=f.value)==null||x.handleScroll(c.value),s=c.value.scrollTop,l=c.value.scrollLeft,n("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function b(x,C){sn(x)?c.value.scrollTo(x):kt(x)&&kt(C)&&c.value.scrollTo(x,C)}const w=x=>{!kt(x)||(c.value.scrollTop=x)},O=x=>{!kt(x)||(c.value.scrollLeft=x)},S=()=>{var x;(x=f.value)==null||x.update()};return Ve(()=>r.noresize,x=>{x?(o==null||o(),a==null||a()):({stop:o}=Zr(d,S),a=sr("resize",S))},{immediate:!0}),Ve(()=>[r.maxHeight,r.height],()=>{r.native||Ot(()=>{var x;S(),c.value&&((x=f.value)==null||x.handleScroll(c.value))})}),_n(I$,Sn({scrollbarElement:u,wrapElement:c})),UM(()=>{c.value&&(c.value.scrollTop=s,c.value.scrollLeft=l)}),Bt(()=>{r.native||Ot(()=>{S()})}),Jc(()=>S()),e({wrapRef:c,update:S,scrollTo:b,setScrollTop:w,setScrollLeft:O,handleScroll:y}),(x,C)=>(R(),G("div",{ref_key:"scrollbarRef",ref:u,class:j(p(i).b())},[J("div",{ref_key:"wrapRef",ref:c,class:j(p(m)),style:mt(p(h)),tabindex:x.tabindex,onScroll:y},[(R(),we(un(x.tag),{id:x.id,ref_key:"resizeRef",ref:d,class:j(p(g)),style:mt(x.viewStyle),role:x.role,"aria-label":x.ariaLabel,"aria-orientation":x.ariaOrientation},{default:z(()=>[xe(x.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),x.native?_e("v-if",!0):(R(),we(Vke,{key:0,ref_key:"barRef",ref:f,always:x.always,"min-size":x.minSize},null,8,["always","min-size"]))],2))}});var Uke=Ge(Wke,[["__file","scrollbar.vue"]]);const mu=Vt(Uke),B$=Symbol("popper"),RH=Symbol("popperContent"),qke=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],$H=Ye({role:{type:String,values:qke,default:"tooltip"}}),Yke=ue({name:"ElPopper",inheritAttrs:!1}),Xke=ue({...Yke,props:$H,setup(t,{expose:e}){const n=t,r=F(),i=F(),o=F(),a=F(),s=M(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return e(l),_n(B$,l),(u,c)=>xe(u.$slots,"default")}});var Zke=Ge(Xke,[["__file","popper.vue"]]);const NH=Ye({arrowOffset:{type:Number,default:5}}),Gke=ue({name:"ElPopperArrow",inheritAttrs:!1}),Kke=ue({...Gke,props:NH,setup(t,{expose:e}){const n=t,r=Qe("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=ht(RH,void 0);return Ve(()=>n.arrowOffset,s=>{i.value=s}),pr(()=>{o.value=void 0}),e({arrowRef:o}),(s,l)=>(R(),G("span",{ref_key:"arrowRef",ref:o,class:j(p(r).e("arrow")),style:mt(p(a)),"data-popper-arrow":""},null,6))}});var Jke=Ge(Kke,[["__file","arrow.vue"]]);const ePe="ElOnlyChild",DH=ue({name:ePe,setup(t,{slots:e,attrs:n}){var r;const i=ht(lH),o=ETe((r=i==null?void 0:i.setForwardRef)!=null?r:yr);return()=>{var a;const s=(a=e.default)==null?void 0:a.call(e,n);if(!s||s.length>1)return null;const l=LH(s);return l?Ht(Hc(l,n),[[o]]):null}}});function LH(t){if(!t)return null;const e=t;for(const n of e){if(sn(n))switch(n.type){case oa:continue;case Rm:case"svg":return Y5(n);case ct:return LH(n.children);default:return n}return Y5(n)}return null}function Y5(t){const e=Qe("only-child");return B("span",{class:e.e("content")},[t])}const IH=Ye({virtualRef:{type:Oe(Object)},virtualTriggering:Boolean,onMouseenter:{type:Oe(Function)},onMouseleave:{type:Oe(Function)},onClick:{type:Oe(Function)},onKeydown:{type:Oe(Function)},onFocus:{type:Oe(Function)},onBlur:{type:Oe(Function)},onContextmenu:{type:Oe(Function)},id:String,open:Boolean}),tPe=ue({name:"ElPopperTrigger",inheritAttrs:!1}),nPe=ue({...tPe,props:IH,setup(t,{expose:e}){const n=t,{role:r,triggerRef:i}=ht(B$,void 0);CTe(i);const o=M(()=>s.value?n.id:void 0),a=M(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=M(()=>{if(r&&r.value!=="tooltip")return r.value}),l=M(()=>s.value?`${n.open}`:void 0);let u;const c=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Bt(()=>{Ve(()=>n.virtualRef,d=>{d&&(i.value=Wa(d))},{immediate:!0}),Ve(i,(d,f)=>{u==null||u(),u=void 0,As(d)&&(c.forEach(h=>{var m;const g=n[h];g&&(d.addEventListener(h.slice(2).toLowerCase(),g),(m=f==null?void 0:f.removeEventListener)==null||m.call(f,h.slice(2).toLowerCase(),g))}),u=Ve([o,a,s,l],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((m,g)=>{Dr(h[g])?d.removeAttribute(m):d.setAttribute(m,h[g])})},{immediate:!0})),As(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>f.removeAttribute(h))},{immediate:!0})}),pr(()=>{if(u==null||u(),u=void 0,i.value&&As(i.value)){const d=i.value;c.forEach(f=>{const h=n[f];h&&d.removeEventListener(f.slice(2).toLowerCase(),h)}),i.value=void 0}}),e({triggerRef:i}),(d,f)=>d.virtualTriggering?_e("v-if",!0):(R(),we(p(DH),gn({key:0},d.$attrs,{"aria-controls":p(o),"aria-describedby":p(a),"aria-expanded":p(l),"aria-haspopup":p(s)}),{default:z(()=>[xe(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var rPe=Ge(nPe,[["__file","trigger.vue"]]);const bT="focus-trap.focus-after-trapped",_T="focus-trap.focus-after-released",iPe="focus-trap.focusout-prevented",X5={cancelable:!0,bubbles:!1},oPe={cancelable:!0,bubbles:!1},Z5="focusAfterTrapped",G5="focusAfterReleased",F$=Symbol("elFocusTrap"),V$=F(),qx=F(0),j$=F(0);let iO=0;const BH=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},K5=(t,e)=>{for(const n of t)if(!aPe(n,e))return n},aPe=(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},sPe=t=>{const e=BH(t),n=K5(e,t),r=K5(e.reverse(),t);return[n,r]},lPe=t=>t instanceof HTMLInputElement&&"select"in t,Cd=(t,e)=>{if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),j$.value=window.performance.now(),t!==n&&lPe(t)&&e&&t.select()}};function J5(t,e){const n=[...t],r=t.indexOf(e);return r!==-1&&n.splice(r,1),n}const uPe=()=>{let t=[];return{push:r=>{const i=t[0];i&&r!==i&&i.pause(),t=J5(t,r),t.unshift(r)},remove:r=>{var i,o;t=J5(t,r),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},cPe=(t,e=!1)=>{const n=document.activeElement;for(const r of t)if(Cd(r,e),document.activeElement!==n)return},e8=uPe(),dPe=()=>qx.value>j$.value,oO=()=>{V$.value="pointer",qx.value=window.performance.now()},t8=()=>{V$.value="keyboard",qx.value=window.performance.now()},fPe=()=>(Bt(()=>{iO===0&&(document.addEventListener("mousedown",oO),document.addEventListener("touchstart",oO),document.addEventListener("keydown",t8)),iO++}),pr(()=>{iO--,iO<=0&&(document.removeEventListener("mousedown",oO),document.removeEventListener("touchstart",oO),document.removeEventListener("keydown",t8))}),{focusReason:V$,lastUserFocusTimestamp:qx,lastAutomatedFocusTimestamp:j$}),aO=t=>new CustomEvent(iPe,{...oPe,detail:t}),hPe=ue({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Z5,G5,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=F();let r,i;const{focusReason:o}=fPe();_Te(m=>{t.trapped&&!a.paused&&e("release-requested",m)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=m=>{if(!t.loop&&!t.trapped||a.paused)return;const{key:g,altKey:y,ctrlKey:b,metaKey:w,currentTarget:O,shiftKey:S}=m,{loop:x}=t,C=g===St.tab&&!y&&!b&&!w,E=document.activeElement;if(C&&E){const T=O,[P,A]=sPe(T);if(P&&A){if(!S&&E===A){const N=aO({focusReason:o.value});e("focusout-prevented",N),N.defaultPrevented||(m.preventDefault(),x&&Cd(P,!0))}else if(S&&[P,T].includes(E)){const N=aO({focusReason:o.value});e("focusout-prevented",N),N.defaultPrevented||(m.preventDefault(),x&&Cd(A,!0))}}else if(E===T){const N=aO({focusReason:o.value});e("focusout-prevented",N),N.defaultPrevented||m.preventDefault()}}};_n(F$,{focusTrapRef:n,onKeydown:s}),Ve(()=>t.focusTrapEl,m=>{m&&(n.value=m)},{immediate:!0}),Ve([n],([m],[g])=>{m&&(m.addEventListener("keydown",s),m.addEventListener("focusin",c),m.addEventListener("focusout",d)),g&&(g.removeEventListener("keydown",s),g.removeEventListener("focusin",c),g.removeEventListener("focusout",d))});const l=m=>{e(Z5,m)},u=m=>e(G5,m),c=m=>{const g=p(n);if(!g)return;const y=m.target,b=m.relatedTarget,w=y&&g.contains(y);t.trapped||b&&g.contains(b)||(r=b),w&&e("focusin",m),!a.paused&&t.trapped&&(w?i=y:Cd(i,!0))},d=m=>{const g=p(n);if(!(a.paused||!g))if(t.trapped){const y=m.relatedTarget;!Dr(y)&&!g.contains(y)&&setTimeout(()=>{if(!a.paused&&t.trapped){const b=aO({focusReason:o.value});e("focusout-prevented",b),b.defaultPrevented||Cd(i,!0)}},0)}else{const y=m.target;y&&g.contains(y)||e("focusout",m)}};async function f(){await Ot();const m=p(n);if(m){e8.push(a);const g=m.contains(document.activeElement)?r:document.activeElement;if(r=g,!m.contains(g)){const b=new Event(bT,X5);m.addEventListener(bT,l),m.dispatchEvent(b),b.defaultPrevented||Ot(()=>{let w=t.focusStartEl;At(w)||(Cd(w),document.activeElement!==w&&(w="first")),w==="first"&&cPe(BH(m),!0),(document.activeElement===g||w==="container")&&Cd(m)})}}}function h(){const m=p(n);if(m){m.removeEventListener(bT,l);const g=new CustomEvent(_T,{...X5,detail:{focusReason:o.value}});m.addEventListener(_T,u),m.dispatchEvent(g),!g.defaultPrevented&&(o.value=="keyboard"||!dPe()||m.contains(document.activeElement))&&Cd(r!=null?r:document.body),m.removeEventListener(_T,u),e8.remove(a)}}return Bt(()=>{t.trapped&&f(),Ve(()=>t.trapped,m=>{m?f():h()})}),pr(()=>{t.trapped&&h(),n.value&&(n.value.removeEventListener("keydown",s),n.value.removeEventListener("focusin",c),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:s}}});function pPe(t,e,n,r,i,o){return xe(t.$slots,"default",{handleKeydown:t.onKeydown})}var Mb=Ge(hPe,[["render",pPe],["__file","focus-trap.vue"]]);const gPe=["fixed","absolute"],mPe=Ye({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Oe(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:ud,default:"bottom"},popperOptions:{type:Oe(Object),default:()=>({})},strategy:{type:String,values:gPe,default:"absolute"}}),FH=Ye({...mPe,id:String,style:{type:Oe([String,Array,Object])},className:{type:Oe([String,Array,Object])},effect:{type:Oe(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Oe([String,Array,Object])},popperStyle:{type:Oe([String,Array,Object])},referenceEl:{type:Oe(Object)},triggerTargetEl:{type:Oe(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...wo(["ariaLabel"])}),vPe={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},yPe=(t,e=[])=>{const{placement:n,strategy:r,popperOptions:i}=t,o={placement:n,strategy:r,...i,modifiers:[..._Pe(t),...e]};return OPe(o,i==null?void 0:i.modifiers),o},bPe=t=>{if(!!Tn)return Wa(t)};function _Pe(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:r}=t;return[{name:"offset",options:{offset:[0,e!=null?e:12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function OPe(t,e){e&&(t.modifiers=[...t.modifiers,...e!=null?e:[]])}const wPe=0,SPe=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:r,role:i}=ht(B$,void 0),o=F(),a=F(),s=M(()=>({name:"eventListeners",enabled:!!t.visible})),l=M(()=>{var b;const w=p(o),O=(b=p(a))!=null?b:wPe;return{name:"arrow",enabled:!Wc(w),options:{element:w,padding:O}}}),u=M(()=>({onFirstUpdate:()=>{m()},...yPe(t,[p(l),p(s)])})),c=M(()=>bPe(t.referenceEl)||p(r)),{attributes:d,state:f,styles:h,update:m,forceUpdate:g,instanceRef:y}=mTe(c,n,u);return Ve(y,b=>e.value=b),Bt(()=>{Ve(()=>{var b;return(b=p(c))==null?void 0:b.getBoundingClientRect()},()=>{m()})}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:y,state:f,styles:h,role:i,forceUpdate:g,update:m}},xPe=(t,{attributes:e,styles:n,role:r})=>{const{nextZIndex:i}=Qm(),o=Qe("popper"),a=M(()=>p(e).popper),s=F(kt(t.zIndex)?t.zIndex:i()),l=M(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),u=M(()=>[{zIndex:p(s)},p(n).popper,t.popperStyle||{}]),c=M(()=>r.value==="dialog"?"false":void 0),d=M(()=>p(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:a,contentClass:l,contentStyle:u,contentZIndex:s,updateZIndex:()=>{s.value=kt(t.zIndex)?t.zIndex:i()}}},CPe=(t,e)=>{const n=F(!1),r=F();return{focusStartRef:r,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(r.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:u=>{t.visible&&!n.value&&(u.target&&(r.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{t.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,e("close")}}},EPe=ue({name:"ElPopperContent"}),TPe=ue({...EPe,props:FH,emits:vPe,setup(t,{expose:e,emit:n}){const r=t,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=CPe(r,n),{attributes:d,arrowRef:f,contentRef:h,styles:m,instanceRef:g,role:y,update:b}=SPe(r),{ariaModal:w,arrowStyle:O,contentAttrs:S,contentClass:x,contentStyle:C,updateZIndex:E}=xPe(r,{styles:m,attributes:d,role:y}),T=ht(tc,void 0),P=F();_n(RH,{arrowStyle:O,arrowRef:f,arrowOffset:P}),T&&_n(tc,{...T,addInputId:yr,removeInputId:yr});let A;const D=($=!0)=>{b(),$&&E()},N=()=>{D(!1),r.visible&&r.focusOnShow?o.value=!0:r.visible===!1&&(o.value=!1)};return Bt(()=>{Ve(()=>r.triggerTargetEl,($,W)=>{A==null||A(),A=void 0;const L=p($||h.value),I=p(W||h.value);As(L)&&(A=Ve([y,()=>r.ariaLabel,w,()=>r.id],U=>{["role","aria-label","aria-modal","id"].forEach((Q,V)=>{Dr(U[V])?L.removeAttribute(Q):L.setAttribute(Q,U[V])})},{immediate:!0})),I!==L&&As(I)&&["role","aria-label","aria-modal","id"].forEach(U=>{I.removeAttribute(U)})},{immediate:!0}),Ve(()=>r.visible,N,{immediate:!0})}),pr(()=>{A==null||A(),A=void 0}),e({popperContentRef:h,popperInstanceRef:g,updatePopper:D,contentStyle:C}),($,W)=>(R(),G("div",gn({ref_key:"contentRef",ref:h},p(S),{style:p(C),class:p(x),tabindex:"-1",onMouseenter:L=>$.$emit("mouseenter",L),onMouseleave:L=>$.$emit("mouseleave",L)}),[B(p(Mb),{trapped:p(o),"trap-on-focus-in":!0,"focus-trap-el":p(h),"focus-start-el":p(i),onFocusAfterTrapped:p(s),onFocusAfterReleased:p(a),onFocusin:p(l),onFocusoutPrevented:p(u),onReleaseRequested:p(c)},{default:z(()=>[xe($.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var kPe=Ge(TPe,[["__file","content.vue"]]);const VH=Vt(Zke),Yx=Symbol("elTooltip"),io=Ye({...STe,...FH,appendTo:{type:Oe([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Oe(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...wo(["ariaLabel"])}),v0=Ye({...IH,disabled:Boolean,trigger:{type:Oe([String,Array]),default:"hover"},triggerKeys:{type:Oe(Array),default:()=>[St.enter,St.space]}}),{useModelToggleProps:PPe,useModelToggleEmits:APe,useModelToggle:MPe}=hEe("visible"),RPe=Ye({...$H,...PPe,...io,...v0,...NH,showArrow:{type:Boolean,default:!0}}),$Pe=[...APe,"before-show","before-hide","show","hide","open","close"],NPe=(t,e)=>ut(t)?t.includes(e):t===e,Hp=(t,e,n)=>r=>{NPe(p(t),e)&&n(r)},DPe=ue({name:"ElTooltipTrigger"}),LPe=ue({...DPe,props:v0,setup(t,{expose:e}){const n=t,r=Qe("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:l,onToggle:u}=ht(Yx,void 0),c=F(null),d=()=>{if(p(i)||n.disabled)return!0},f=er(n,"trigger"),h=fi(d,Hp(f,"hover",s)),m=fi(d,Hp(f,"hover",l)),g=fi(d,Hp(f,"click",S=>{S.button===0&&u(S)})),y=fi(d,Hp(f,"focus",s)),b=fi(d,Hp(f,"focus",l)),w=fi(d,Hp(f,"contextmenu",S=>{S.preventDefault(),u(S)})),O=fi(d,S=>{const{code:x}=S;n.triggerKeys.includes(x)&&(S.preventDefault(),u(S))});return e({triggerRef:c}),(S,x)=>(R(),we(p(rPe),{id:p(o),"virtual-ref":S.virtualRef,open:p(a),"virtual-triggering":S.virtualTriggering,class:j(p(r).e("trigger")),onBlur:p(b),onClick:p(g),onContextmenu:p(w),onFocus:p(y),onMouseenter:p(h),onMouseleave:p(m),onKeydown:p(O)},{default:z(()=>[xe(S.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var IPe=Ge(LPe,[["__file","trigger.vue"]]);const BPe=Ye({to:{type:Oe([String,Object]),required:!0},disabled:Boolean}),FPe=ue({__name:"teleport",props:BPe,setup(t){return(e,n)=>e.disabled?xe(e.$slots,"default",{key:0}):(R(),we(Dle,{key:1,to:e.to},[xe(e.$slots,"default")],8,["to"]))}});var VPe=Ge(FPe,[["__file","teleport.vue"]]);const Um=Vt(VPe),jPe=ue({name:"ElTooltipContent",inheritAttrs:!1}),zPe=ue({...jPe,props:io,setup(t,{expose:e}){const n=t,{selector:r}=sH(),i=Qe("tooltip"),o=F(null);let a;const{controlled:s,id:l,open:u,trigger:c,onClose:d,onOpen:f,onShow:h,onHide:m,onBeforeShow:g,onBeforeHide:y}=ht(Yx,void 0),b=M(()=>n.transition||`${i.namespace.value}-fade-in-linear`),w=M(()=>n.persistent);pr(()=>{a==null||a()});const O=M(()=>p(w)?!0:p(u)),S=M(()=>n.disabled?!1:p(u)),x=M(()=>n.appendTo||r.value),C=M(()=>{var I;return(I=n.style)!=null?I:{}}),E=F(!0),T=()=>{m(),E.value=!0},P=()=>{if(p(s))return!0},A=fi(P,()=>{n.enterable&&p(c)==="hover"&&f()}),D=fi(P,()=>{p(c)==="hover"&&d()}),N=()=>{var I,U;(U=(I=o.value)==null?void 0:I.updatePopper)==null||U.call(I),g==null||g()},$=()=>{y==null||y()},W=()=>{h(),a=tR(M(()=>{var I;return(I=o.value)==null?void 0:I.popperContentRef}),()=>{if(p(s))return;p(c)!=="hover"&&d()})},L=()=>{n.virtualTriggering||d()};return Ve(()=>p(u),I=>{I?E.value=!1:a==null||a()},{flush:"post"}),Ve(()=>n.content,()=>{var I,U;(U=(I=o.value)==null?void 0:I.updatePopper)==null||U.call(I)}),e({contentRef:o}),(I,U)=>(R(),we(p(Um),{disabled:!I.teleported,to:p(x)},{default:z(()=>[B(Qi,{name:p(b),onAfterLeave:T,onBeforeEnter:N,onAfterEnter:W,onBeforeLeave:$},{default:z(()=>[p(O)?Ht((R(),we(p(kPe),gn({key:0,id:p(l),ref_key:"contentRef",ref:o},I.$attrs,{"aria-label":I.ariaLabel,"aria-hidden":E.value,"boundaries-padding":I.boundariesPadding,"fallback-placements":I.fallbackPlacements,"gpu-acceleration":I.gpuAcceleration,offset:I.offset,placement:I.placement,"popper-options":I.popperOptions,strategy:I.strategy,effect:I.effect,enterable:I.enterable,pure:I.pure,"popper-class":I.popperClass,"popper-style":[I.popperStyle,p(C)],"reference-el":I.referenceEl,"trigger-target-el":I.triggerTargetEl,visible:p(S),"z-index":I.zIndex,onMouseenter:p(A),onMouseleave:p(D),onBlur:L,onClose:p(d)}),{default:z(()=>[xe(I.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[zn,p(S)]]):_e("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var QPe=Ge(zPe,[["__file","content.vue"]]);const HPe=ue({name:"ElTooltip"}),WPe=ue({...HPe,props:RPe,emits:$Pe,setup(t,{expose:e,emit:n}){const r=t;wTe();const i=bo(),o=F(),a=F(),s=()=>{var b;const w=p(o);w&&((b=w.popperInstanceRef)==null||b.update())},l=F(!1),u=F(),{show:c,hide:d,hasUpdateHandler:f}=MPe({indicator:l,toggleReason:u}),{onOpen:h,onClose:m}=xTe({showAfter:er(r,"showAfter"),hideAfter:er(r,"hideAfter"),autoClose:er(r,"autoClose"),open:c,close:d}),g=M(()=>si(r.visible)&&!f.value);_n(Yx,{controlled:g,id:i,open:Mm(l),trigger:er(r,"trigger"),onOpen:b=>{h(b)},onClose:b=>{m(b)},onToggle:b=>{p(l)?m(b):h(b)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:s}),Ve(()=>r.disabled,b=>{b&&l.value&&(l.value=!1)});const y=b=>{var w,O;const S=(O=(w=a.value)==null?void 0:w.contentRef)==null?void 0:O.popperContentRef,x=(b==null?void 0:b.relatedTarget)||document.activeElement;return S&&S.contains(x)};return Ez(()=>l.value&&d()),e({popperRef:o,contentRef:a,isFocusInsideContent:y,updatePopper:s,onOpen:h,onClose:m,hide:d}),(b,w)=>(R(),we(p(VH),{ref_key:"popperRef",ref:o,role:b.role},{default:z(()=>[B(IPe,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:z(()=>[b.$slots.default?xe(b.$slots,"default",{key:0}):_e("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),B(QPe,{ref_key:"contentRef",ref:a,"aria-label":b.ariaLabel,"boundaries-padding":b.boundariesPadding,content:b.content,disabled:b.disabled,effect:b.effect,enterable:b.enterable,"fallback-placements":b.fallbackPlacements,"hide-after":b.hideAfter,"gpu-acceleration":b.gpuAcceleration,offset:b.offset,persistent:b.persistent,"popper-class":b.popperClass,"popper-style":b.popperStyle,placement:b.placement,"popper-options":b.popperOptions,pure:b.pure,"raw-content":b.rawContent,"reference-el":b.referenceEl,"trigger-target-el":b.triggerTargetEl,"show-after":b.showAfter,strategy:b.strategy,teleported:b.teleported,transition:b.transition,"virtual-triggering":b.virtualTriggering,"z-index":b.zIndex,"append-to":b.appendTo},{default:z(()=>[xe(b.$slots,"content",{},()=>[b.rawContent?(R(),G("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(R(),G("span",{key:1},je(b.content),1))]),b.showArrow?(R(),we(p(Jke),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):_e("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var UPe=Ge(WPe,[["__file","tooltip.vue"]]);const Ui=Vt(UPe),qPe=Ye({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:Oe(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:Oe([Function,Array]),default:yr},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:io.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...wo(["ariaLabel"])}),YPe={[Zt]:t=>At(t),[Oa]:t=>At(t),[Lr]:t=>At(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,select:t=>sn(t)},jH="ElAutocomplete",XPe=ue({name:jH,inheritAttrs:!1}),ZPe=ue({...XPe,props:qPe,emits:YPe,setup(t,{expose:e,emit:n}){const r=t,i=g$(),o=mp(),a=la(),s=Qe("autocomplete"),l=F(),u=F(),c=F(),d=F();let f=!1,h=!1;const m=F([]),g=F(-1),y=F(""),b=F(!1),w=F(!1),O=F(!1),S=bo(),x=M(()=>o.style),C=M(()=>(m.value.length>0||O.value)&&b.value),E=M(()=>!r.hideLoading&&O.value),T=M(()=>l.value?Array.from(l.value.$el.querySelectorAll("input")):[]),P=()=>{C.value&&(y.value=`${l.value.$el.offsetWidth}px`)},A=()=>{g.value=-1},D=async re=>{if(w.value)return;const te=ge=>{O.value=!1,!w.value&&(ut(ge)?(m.value=ge,g.value=r.highlightFirstItem?0:-1):Hi(jH,"autocomplete suggestions must be an array"))};if(O.value=!0,ut(r.fetchSuggestions))te(r.fetchSuggestions);else{const ge=await r.fetchSuggestions(re,te);ut(ge)&&te(ge)}},N=jo(D,r.debounce),$=re=>{const te=!!re;if(n(Oa,re),n(Zt,re),w.value=!1,b.value||(b.value=te),!r.triggerOnFocus&&!re){w.value=!0,m.value=[];return}N(re)},W=re=>{var te;a.value||(((te=re.target)==null?void 0:te.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(b.value=!0)},L=re=>{n(Lr,re)},I=re=>{h?h=!1:(b.value=!0,n("focus",re),r.triggerOnFocus&&!f&&N(String(r.modelValue)))},U=re=>{setTimeout(()=>{var te;if((te=c.value)!=null&&te.isFocusInsideContent()){h=!0;return}b.value&&K(),n("blur",re)})},Q=()=>{b.value=!1,n(Zt,""),n("clear")},V=async()=>{C.value&&g.value>=0&&g.value<m.value.length?Se(m.value[g.value]):r.selectWhenUnmatched&&(n("select",{value:r.modelValue}),m.value=[],g.value=-1)},q=re=>{C.value&&(re.preventDefault(),re.stopPropagation(),K())},K=()=>{b.value=!1},ie=()=>{var re;(re=l.value)==null||re.focus()},oe=()=>{var re;(re=l.value)==null||re.blur()},Se=async re=>{n(Oa,re[r.valueKey]),n(Zt,re[r.valueKey]),n("select",re),m.value=[],g.value=-1},ke=re=>{if(!C.value||O.value)return;if(re<0){g.value=-1;return}re>=m.value.length&&(re=m.value.length-1);const te=u.value.querySelector(`.${s.be("suggestion","wrap")}`),Re=te.querySelectorAll(`.${s.be("suggestion","list")} li`)[re],$e=te.scrollTop,{offsetTop:Z,scrollHeight:ce}=Re;Z+ce>$e+te.clientHeight&&(te.scrollTop+=ce),Z<$e&&(te.scrollTop-=ce),g.value=re,l.value.ref.setAttribute("aria-activedescendant",`${S.value}-item-${g.value}`)},Y=tR(d,()=>{C.value&&K()});return pr(()=>{Y==null||Y()}),Bt(()=>{l.value.ref.setAttribute("role","textbox"),l.value.ref.setAttribute("aria-autocomplete","list"),l.value.ref.setAttribute("aria-controls","id"),l.value.ref.setAttribute("aria-activedescendant",`${S.value}-item-${g.value}`),f=l.value.ref.hasAttribute("readonly")}),e({highlightedIndex:g,activated:b,loading:O,inputRef:l,popperRef:c,suggestions:m,handleSelect:Se,handleKeyEnter:V,focus:ie,blur:oe,close:K,highlight:ke,getData:D}),(re,te)=>(R(),we(p(Ui),{ref_key:"popperRef",ref:c,visible:p(C),placement:re.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[p(s).e("popper"),re.popperClass],teleported:re.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${p(s).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:P,onHide:A},{content:z(()=>[J("div",{ref_key:"regionRef",ref:u,class:j([p(s).b("suggestion"),p(s).is("loading",p(E))]),style:mt({[re.fitInputWidth?"width":"minWidth"]:y.value,outline:"none"}),role:"region"},[B(p(mu),{id:p(S),tag:"ul","wrap-class":p(s).be("suggestion","wrap"),"view-class":p(s).be("suggestion","list"),role:"listbox"},{default:z(()=>[p(E)?(R(),G("li",{key:0},[xe(re.$slots,"loading",{},()=>[B(p(gt),{class:j(p(s).is("loading"))},{default:z(()=>[B(p(Ku))]),_:1},8,["class"])])])):(R(!0),G(ct,{key:1},Wt(m.value,(ge,Re)=>(R(),G("li",{id:`${p(S)}-item-${Re}`,key:Re,class:j({highlighted:g.value===Re}),role:"option","aria-selected":g.value===Re,onClick:$e=>Se(ge)},[xe(re.$slots,"default",{item:ge},()=>[qe(je(ge[re.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:z(()=>[J("div",{ref_key:"listboxRef",ref:d,class:j([p(s).b(),re.$attrs.class]),style:mt(p(x)),role:"combobox","aria-haspopup":"listbox","aria-expanded":p(C),"aria-owns":p(S)},[B(p(hi),gn({ref_key:"inputRef",ref:l},p(i),{clearable:re.clearable,disabled:p(a),name:re.name,"model-value":re.modelValue,"aria-label":re.ariaLabel,onInput:$,onChange:L,onFocus:I,onBlur:U,onClear:Q,onKeydown:[br(Pt(ge=>ke(g.value-1),["prevent"]),["up"]),br(Pt(ge=>ke(g.value+1),["prevent"]),["down"]),br(V,["enter"]),br(K,["tab"]),br(q,["esc"])],onMousedown:W}),ts({_:2},[re.$slots.prepend?{name:"prepend",fn:z(()=>[xe(re.$slots,"prepend")])}:void 0,re.$slots.append?{name:"append",fn:z(()=>[xe(re.$slots,"append")])}:void 0,re.$slots.prefix?{name:"prefix",fn:z(()=>[xe(re.$slots,"prefix")])}:void 0,re.$slots.suffix?{name:"suffix",fn:z(()=>[xe(re.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});var GPe=Ge(ZPe,[["__file","autocomplete.vue"]]);const KPe=Vt(GPe),JPe=Ye({size:{type:[Number,String],values:cc,default:"",validator:t=>kt(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:fr},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Oe(String),default:"cover"}}),eAe={error:t=>t instanceof Event},tAe=ue({name:"ElAvatar"}),nAe=ue({...tAe,props:JPe,emits:eAe,setup(t,{emit:e}){const n=t,r=Qe("avatar"),i=F(!1),o=M(()=>{const{size:u,icon:c,shape:d}=n,f=[r.b()];return At(u)&&f.push(r.m(u)),c&&f.push(r.m("icon")),d&&f.push(r.m(d)),f}),a=M(()=>{const{size:u}=n;return kt(u)?r.cssVarBlock({size:pi(u)||""}):void 0}),s=M(()=>({objectFit:n.fit}));Ve(()=>n.src,()=>i.value=!1);function l(u){i.value=!0,e("error",u)}return(u,c)=>(R(),G("span",{class:j(p(o)),style:mt(p(a))},[(u.src||u.srcSet)&&!i.value?(R(),G("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:mt(p(s)),onError:l},null,44,["src","alt","srcset"])):u.icon?(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(u.icon)))]),_:1})):xe(u.$slots,"default",{key:2})],6))}});var rAe=Ge(nAe,[["__file","avatar.vue"]]);const iAe=Vt(rAe),oAe={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},aAe={click:t=>t instanceof MouseEvent},sAe=(t,e,n)=>{const r=Tr(),i=Tr(),o=F(!1),a=()=>{r.value&&(o.value=r.value.scrollTop>=t.visibilityHeight)},s=u=>{var c;(c=r.value)==null||c.scrollTo({top:0,behavior:"smooth"}),e("click",u)},l=a7(a,300,!0);return sr(i,"scroll",l),Bt(()=>{var u;i.value=document,r.value=document.documentElement,t.target&&(r.value=(u=document.querySelector(t.target))!=null?u:void 0,r.value||Hi(n,`target does not exist: ${t.target}`),i.value=r.value),a()}),{visible:o,handleClick:s}},zH="ElBacktop",lAe=ue({name:zH}),uAe=ue({...lAe,props:oAe,emits:aAe,setup(t,{emit:e}){const n=t,r=Qe("backtop"),{handleClick:i,visible:o}=sAe(n,e,zH),a=M(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(s,l)=>(R(),we(Qi,{name:`${p(r).namespace.value}-fade-in`},{default:z(()=>[p(o)?(R(),G("div",{key:0,style:mt(p(a)),class:j(p(r).b()),onClick:Pt(p(i),["stop"])},[xe(s.$slots,"default",{},()=>[B(p(gt),{class:j(p(r).e("icon"))},{default:z(()=>[B(p(qxe))]),_:1},8,["class"])])],14,["onClick"])):_e("v-if",!0)]),_:3},8,["name"]))}});var cAe=Ge(uAe,[["__file","backtop.vue"]]);const dAe=Vt(cAe),fAe=Ye({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Oe([String,Object,Array])},offset:{type:Oe(Array),default:[0,0]},badgeClass:{type:String}}),hAe=ue({name:"ElBadge"}),pAe=ue({...hAe,props:fAe,setup(t,{expose:e}){const n=t,r=Qe("badge"),i=M(()=>n.isDot?"":kt(n.value)&&kt(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),o=M(()=>{var a,s,l,u,c;return[{backgroundColor:n.color,marginRight:pi(-((s=(a=n.offset)==null?void 0:a[0])!=null?s:0)),marginTop:pi((u=(l=n.offset)==null?void 0:l[1])!=null?u:0)},(c=n.badgeStyle)!=null?c:{}]});return e({content:i}),(a,s)=>(R(),G("div",{class:j(p(r).b())},[xe(a.$slots,"default"),B(Qi,{name:`${p(r).namespace.value}-zoom-in-center`,persisted:""},{default:z(()=>[Ht(J("sup",{class:j([p(r).e("content"),p(r).em("content",a.type),p(r).is("fixed",!!a.$slots.default),p(r).is("dot",a.isDot),p(r).is("hide-zero",!a.showZero&&n.value===0),a.badgeClass]),style:mt(p(o)),textContent:je(p(i))},null,14,["textContent"]),[[zn,!a.hidden&&(p(i)||a.isDot)]])]),_:1},8,["name"])],2))}});var gAe=Ge(pAe,[["__file","badge.vue"]]);const QH=Vt(gAe),HH=Symbol("breadcrumbKey"),mAe=Ye({separator:{type:String,default:"/"},separatorIcon:{type:fr}}),vAe=ue({name:"ElBreadcrumb"}),yAe=ue({...vAe,props:mAe,setup(t){const e=t,{t:n}=kn(),r=Qe("breadcrumb"),i=F();return _n(HH,e),Bt(()=>{const o=i.value.querySelectorAll(`.${r.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,a)=>(R(),G("div",{ref_key:"breadcrumb",ref:i,class:j(p(r).b()),"aria-label":p(n)("el.breadcrumb.label"),role:"navigation"},[xe(o.$slots,"default")],10,["aria-label"]))}});var bAe=Ge(yAe,[["__file","breadcrumb.vue"]]);const _Ae=Ye({to:{type:Oe([String,Object]),default:""},replace:Boolean}),OAe=ue({name:"ElBreadcrumbItem"}),wAe=ue({...OAe,props:_Ae,setup(t){const e=t,n=en(),r=ht(HH,void 0),i=Qe("breadcrumb"),o=n.appContext.config.globalProperties.$router,a=F(),s=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(l,u)=>{var c,d;return R(),G("span",{class:j(p(i).e("item"))},[J("span",{ref_key:"link",ref:a,class:j([p(i).e("inner"),p(i).is("link",!!l.to)]),role:"link",onClick:s},[xe(l.$slots,"default")],2),(c=p(r))!=null&&c.separatorIcon?(R(),we(p(gt),{key:0,class:j(p(i).e("separator"))},{default:z(()=>[(R(),we(un(p(r).separatorIcon)))]),_:1},8,["class"])):(R(),G("span",{key:1,class:j(p(i).e("separator")),role:"presentation"},je((d=p(r))==null?void 0:d.separator),3))],2)}}});var WH=Ge(wAe,[["__file","breadcrumb-item.vue"]]);const SAe=Vt(bAe,{BreadcrumbItem:WH}),xAe=ti(WH),UH=Symbol("buttonGroupContextKey"),CAe=(t,e)=>{Jd({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},M(()=>t.type==="text"));const n=ht(UH,void 0),r=Wx("button"),{form:i}=ua(),o=Ni(M(()=>n==null?void 0:n.size)),a=la(),s=F(),l=Ji(),u=M(()=>t.type||(n==null?void 0:n.type)||""),c=M(()=>{var m,g,y;return(y=(g=t.autoInsertSpace)!=null?g:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?y:!1}),d=M(()=>t.tag==="button"?{ariaDisabled:a.value||t.loading,disabled:a.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),f=M(()=>{var m;const g=(m=l.default)==null?void 0:m.call(l);if(c.value&&(g==null?void 0:g.length)===1){const y=g[0];if((y==null?void 0:y.type)===Rm){const b=y.children;return/^\p{Unified_Ideograph}{2}$/u.test(b.trim())}}return!1});return{_disabled:a,_size:o,_type:u,_ref:s,_props:d,shouldAddSpace:f,handleClick:m=>{if(a.value||t.loading){m.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",m)}}},Mk=["default","primary","success","warning","info","danger","text",""],EAe=["button","submit","reset"],Rk=Ye({size:Wi,disabled:Boolean,type:{type:String,values:Mk,default:""},icon:{type:fr},nativeType:{type:String,values:EAe,default:"button"},loading:Boolean,loadingIcon:{type:fr,default:()=>Ku},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Oe([String,Object]),default:"button"}}),TAe={click:t=>t instanceof MouseEvent};function Fo(t,e){kAe(t)&&(t="100%");var n=PAe(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 sO(t){return Math.min(1,Math.max(0,t))}function kAe(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function PAe(t){return typeof t=="string"&&t.indexOf("%")!==-1}function qH(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function lO(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ah(t){return t.length===1?"0"+t:String(t)}function AAe(t,e,n){return{r:Fo(t,255)*255,g:Fo(e,255)*255,b:Fo(n,255)*255}}function n8(t,e,n){t=Fo(t,255),e=Fo(e,255),n=Fo(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){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:a,l:s}}function OT(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 MAe(t,e,n){var r,i,o;if(t=Fo(t,360),e=Fo(e,100),n=Fo(n,100),e===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;r=OT(s,a,t+1/3),i=OT(s,a,t),o=OT(s,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function r8(t,e,n){t=Fo(t,255),e=Fo(e,255),n=Fo(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:o=(e-n)/s+(e<n?6:0);break;case e:o=(n-t)/s+2;break;case n:o=(t-e)/s+4;break}o/=6}return{h:o,s:l,v:a}}function RAe(t,e,n){t=Fo(t,360)*6,e=Fo(e,100),n=Fo(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6,u=[n,a,o,o,s,n][l],c=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:u*255,g:c*255,b:d*255}}function i8(t,e,n,r){var i=[Ah(Math.round(t).toString(16)),Ah(Math.round(e).toString(16)),Ah(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function $Ae(t,e,n,r,i){var o=[Ah(Math.round(t).toString(16)),Ah(Math.round(e).toString(16)),Ah(Math.round(n).toString(16)),Ah(NAe(r))];return i&&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 NAe(t){return Math.round(parseFloat(t)*255).toString(16)}function o8(t){return _s(t)/255}function _s(t){return parseInt(t,16)}function DAe(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var $k={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 LAe(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=FAe(t)),typeof t=="object"&&(kc(t.r)&&kc(t.g)&&kc(t.b)?(e=AAe(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):kc(t.h)&&kc(t.s)&&kc(t.v)?(r=lO(t.s),i=lO(t.v),e=RAe(t.h,r,i),a=!0,s="hsv"):kc(t.h)&&kc(t.s)&&kc(t.l)&&(r=lO(t.s),o=lO(t.l),e=MAe(t.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=qH(n),{ok:a,format:t.format||s,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}}var IAe="[-\\+]?\\d+%?",BAe="[-\\+]?\\d*\\.\\d+%?",Vd="(?:".concat(BAe,")|(?:").concat(IAe,")"),wT="[\\s|\\(]+(".concat(Vd,")[,|\\s]+(").concat(Vd,")[,|\\s]+(").concat(Vd,")\\s*\\)?"),ST="[\\s|\\(]+(".concat(Vd,")[,|\\s]+(").concat(Vd,")[,|\\s]+(").concat(Vd,")[,|\\s]+(").concat(Vd,")\\s*\\)?"),Vl={CSS_UNIT:new RegExp(Vd),rgb:new RegExp("rgb"+wT),rgba:new RegExp("rgba"+ST),hsl:new RegExp("hsl"+wT),hsla:new RegExp("hsla"+ST),hsv:new RegExp("hsv"+wT),hsva:new RegExp("hsva"+ST),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 FAe(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if($k[t])t=$k[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Vl.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Vl.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Vl.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Vl.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Vl.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Vl.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Vl.hex8.exec(t),n?{r:_s(n[1]),g:_s(n[2]),b:_s(n[3]),a:o8(n[4]),format:e?"name":"hex8"}:(n=Vl.hex6.exec(t),n?{r:_s(n[1]),g:_s(n[2]),b:_s(n[3]),format:e?"name":"hex"}:(n=Vl.hex4.exec(t),n?{r:_s(n[1]+n[1]),g:_s(n[2]+n[2]),b:_s(n[3]+n[3]),a:o8(n[4]+n[4]),format:e?"name":"hex8"}:(n=Vl.hex3.exec(t),n?{r:_s(n[1]+n[1]),g:_s(n[2]+n[2]),b:_s(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function kc(t){return Boolean(Vl.CSS_UNIT.exec(String(t)))}var YH=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var r;if(e instanceof t)return e;typeof e=="number"&&(e=DAe(e)),this.originalInput=e;var i=LAe(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=(r=n.format)!==null&&r!==void 0?r: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}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,r,i,o=e.r/255,a=e.g/255,s=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=qH(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=r8(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=r8(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=n8(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=n8(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),i8(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),$Ae(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(r,")"):"rgba(".concat(e,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Fo(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Fo(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+i8(this.r,this.g,this.b,!1),n=0,r=Object.entries($k);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(e===a)return o}return!1},t.prototype.toString=function(e){var n=Boolean(e);e=e!=null?e:this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=sO(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var 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 t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=sO(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=sO(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=sO(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var r=this.toRgb(),i=new t(e).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new t(a)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(new t(r));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(new t({h:r,s:i,v:o})),o=(o+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),r=new t(e).toRgb(),i=n.a+r.a*(1-n.a);return new t({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),r=n.h,i=[this],o=360/e,a=1;a<e;a++)i.push(new t({h:(r+a*o)%360,s:n.s,l:n.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function Sd(t,e=20){return t.mix("#141414",e).toString()}function VAe(t){const e=la(),n=Qe("button");return M(()=>{let r={},i=t.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const a=new YH(i),s=t.dark?a.tint(20).toString():Sd(a,20);if(t.plain)r=n.cssVarBlock({"bg-color":t.dark?Sd(a,90):a.tint(90).toString(),"text-color":i,"border-color":t.dark?Sd(a,50):a.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":s,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(r[n.cssVarBlockName("disabled-bg-color")]=t.dark?Sd(a,90):a.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=t.dark?Sd(a,50):a.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=t.dark?Sd(a,80):a.tint(80).toString());else{const l=t.dark?Sd(a,30):a.tint(30).toString(),u=a.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),e.value){const c=t.dark?Sd(a,50):a.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=c,r[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=c}}}return r})}const jAe=ue({name:"ElButton"}),zAe=ue({...jAe,props:Rk,emits:TAe,setup(t,{expose:e,emit:n}){const r=t,i=VAe(r),o=Qe("button"),{_ref:a,_size:s,_type:l,_disabled:u,_props:c,shouldAddSpace:d,handleClick:f}=CAe(r,n),h=M(()=>[o.b(),o.m(l.value),o.m(s.value),o.is("disabled",u.value),o.is("loading",r.loading),o.is("plain",r.plain),o.is("round",r.round),o.is("circle",r.circle),o.is("text",r.text),o.is("link",r.link),o.is("has-bg",r.bg)]);return e({ref:a,size:s,type:l,disabled:u,shouldAddSpace:d}),(m,g)=>(R(),we(un(m.tag),gn({ref_key:"_ref",ref:a},p(c),{class:p(h),style:p(i),onClick:p(f)}),{default:z(()=>[m.loading?(R(),G(ct,{key:0},[m.$slots.loading?xe(m.$slots,"loading",{key:0}):(R(),we(p(gt),{key:1,class:j(p(o).is("loading"))},{default:z(()=>[(R(),we(un(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(R(),we(p(gt),{key:1},{default:z(()=>[m.icon?(R(),we(un(m.icon),{key:0})):xe(m.$slots,"icon",{key:1})]),_:3})):_e("v-if",!0),m.$slots.default?(R(),G("span",{key:2,class:j({[p(o).em("text","expand")]:p(d)})},[xe(m.$slots,"default")],2)):_e("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var QAe=Ge(zAe,[["__file","button.vue"]]);const HAe={size:Rk.size,type:Rk.type},WAe=ue({name:"ElButtonGroup"}),UAe=ue({...WAe,props:HAe,setup(t){const e=t;_n(UH,Sn({size:er(e,"size"),type:er(e,"type")}));const n=Qe("button");return(r,i)=>(R(),G("div",{class:j(p(n).b("group"))},[xe(r.$slots,"default")],2))}});var XH=Ge(UAe,[["__file","button-group.vue"]]);const lr=Vt(QAe,{ButtonGroup:XH}),ZH=ti(XH);var Mi=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},GH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",d="month",f="quarter",h="year",m="date",g="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,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var L=["th","st","nd","rd"],I=W%100;return"["+W+(L[(I-20)%10]||L[I]||L[0])+"]"}},O=function(W,L,I){var U=String(W);return!U||U.length>=L?W:""+Array(L+1-U.length).join(I)+W},S={s:O,z:function(W){var L=-W.utcOffset(),I=Math.abs(L),U=Math.floor(I/60),Q=I%60;return(L<=0?"+":"-")+O(U,2,"0")+":"+O(Q,2,"0")},m:function W(L,I){if(L.date()<I.date())return-W(I,L);var U=12*(I.year()-L.year())+(I.month()-L.month()),Q=L.clone().add(U,d),V=I-Q<0,q=L.clone().add(U+(V?-1:1),d);return+(-(U+(I-Q)/(V?Q-q:q-Q))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:d,y:h,w:c,d:u,D:m,h:l,m:s,s:a,ms:o,Q:f}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},x="en",C={};C[x]=w;var E="$isDayjsObject",T=function(W){return W instanceof N||!(!W||!W[E])},P=function W(L,I,U){var Q;if(!L)return x;if(typeof L=="string"){var V=L.toLowerCase();C[V]&&(Q=V),I&&(C[V]=I,Q=V);var q=L.split("-");if(!Q&&q.length>1)return W(q[0])}else{var K=L.name;C[K]=L,Q=K}return!U&&Q&&(x=Q),Q||!U&&x},A=function(W,L){if(T(W))return W.clone();var I=typeof L=="object"?L:{};return I.date=W,I.args=arguments,new N(I)},D=S;D.l=P,D.i=T,D.w=function(W,L){return A(W,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var N=function(){function W(I){this.$L=P(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[E]=!0}var L=W.prototype;return L.parse=function(I){this.$d=function(U){var Q=U.date,V=U.utc;if(Q===null)return new Date(NaN);if(D.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var q=Q.match(y);if(q){var K=q[2]-1||0,ie=(q[7]||"0").substring(0,3);return V?new Date(Date.UTC(q[1],K,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ie)):new Date(q[1],K,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ie)}}return new Date(Q)}(I),this.init()},L.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},L.$utils=function(){return D},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(I,U){var Q=A(I);return this.startOf(U)<=Q&&Q<=this.endOf(U)},L.isAfter=function(I,U){return A(I)<this.startOf(U)},L.isBefore=function(I,U){return this.endOf(U)<A(I)},L.$g=function(I,U,Q){return D.u(I)?this[U]:this.set(Q,I)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(I,U){var Q=this,V=!!D.u(U)||U,q=D.p(I),K=function(ge,Re){var $e=D.w(Q.$u?Date.UTC(Q.$y,Re,ge):new Date(Q.$y,Re,ge),Q);return V?$e:$e.endOf(u)},ie=function(ge,Re){return D.w(Q.toDate()[ge].apply(Q.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(Re)),Q)},oe=this.$W,Se=this.$M,ke=this.$D,Y="set"+(this.$u?"UTC":"");switch(q){case h:return V?K(1,0):K(31,11);case d:return V?K(1,Se):K(0,Se+1);case c:var re=this.$locale().weekStart||0,te=(oe<re?oe+7:oe)-re;return K(V?ke-te:ke+(6-te),Se);case u:case m:return ie(Y+"Hours",0);case l:return ie(Y+"Minutes",1);case s:return ie(Y+"Seconds",2);case a:return ie(Y+"Milliseconds",3);default:return this.clone()}},L.endOf=function(I){return this.startOf(I,!1)},L.$set=function(I,U){var Q,V=D.p(I),q="set"+(this.$u?"UTC":""),K=(Q={},Q[u]=q+"Date",Q[m]=q+"Date",Q[d]=q+"Month",Q[h]=q+"FullYear",Q[l]=q+"Hours",Q[s]=q+"Minutes",Q[a]=q+"Seconds",Q[o]=q+"Milliseconds",Q)[V],ie=V===u?this.$D+(U-this.$W):U;if(V===d||V===h){var oe=this.clone().set(m,1);oe.$d[K](ie),oe.init(),this.$d=oe.set(m,Math.min(this.$D,oe.daysInMonth())).$d}else K&&this.$d[K](ie);return this.init(),this},L.set=function(I,U){return this.clone().$set(I,U)},L.get=function(I){return this[D.p(I)]()},L.add=function(I,U){var Q,V=this;I=Number(I);var q=D.p(U),K=function(Se){var ke=A(V);return D.w(ke.date(ke.date()+Math.round(Se*I)),V)};if(q===d)return this.set(d,this.$M+I);if(q===h)return this.set(h,this.$y+I);if(q===u)return K(1);if(q===c)return K(7);var ie=(Q={},Q[s]=r,Q[l]=i,Q[a]=n,Q)[q]||1,oe=this.$d.getTime()+I*ie;return D.w(oe,this)},L.subtract=function(I,U){return this.add(-1*I,U)},L.format=function(I){var U=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||g;var V=I||"YYYY-MM-DDTHH:mm:ssZ",q=D.z(this),K=this.$H,ie=this.$m,oe=this.$M,Se=Q.weekdays,ke=Q.months,Y=Q.meridiem,re=function(Re,$e,Z,ce){return Re&&(Re[$e]||Re(U,V))||Z[$e].slice(0,ce)},te=function(Re){return D.s(K%12||12,Re,"0")},ge=Y||function(Re,$e,Z){var ce=Re<12?"AM":"PM";return Z?ce.toLowerCase():ce};return V.replace(b,function(Re,$e){return $e||function(Z){switch(Z){case"YY":return String(U.$y).slice(-2);case"YYYY":return D.s(U.$y,4,"0");case"M":return oe+1;case"MM":return D.s(oe+1,2,"0");case"MMM":return re(Q.monthsShort,oe,ke,3);case"MMMM":return re(ke,oe);case"D":return U.$D;case"DD":return D.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return re(Q.weekdaysMin,U.$W,Se,2);case"ddd":return re(Q.weekdaysShort,U.$W,Se,3);case"dddd":return Se[U.$W];case"H":return String(K);case"HH":return D.s(K,2,"0");case"h":return te(1);case"hh":return te(2);case"a":return ge(K,ie,!0);case"A":return ge(K,ie,!1);case"m":return String(ie);case"mm":return D.s(ie,2,"0");case"s":return String(U.$s);case"ss":return D.s(U.$s,2,"0");case"SSS":return D.s(U.$ms,3,"0");case"Z":return q}return null}(Re)||q.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(I,U,Q){var V,q=this,K=D.p(U),ie=A(I),oe=(ie.utcOffset()-this.utcOffset())*r,Se=this-ie,ke=function(){return D.m(q,ie)};switch(K){case h:V=ke()/12;break;case d:V=ke();break;case f:V=ke()/3;break;case c:V=(Se-oe)/6048e5;break;case u:V=(Se-oe)/864e5;break;case l:V=Se/i;break;case s:V=Se/r;break;case a:V=Se/n;break;default:V=Se}return Q?V:D.a(V)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return C[this.$L]},L.locale=function(I,U){if(!I)return this.$L;var Q=this.clone(),V=P(I,U,!0);return V&&(Q.$L=V),Q},L.clone=function(){return D.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},W}(),$=N.prototype;return A.prototype=$,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",u],["$M",d],["$y",h],["$D",m]].forEach(function(W){$[W[1]]=function(L){return this.$g(L,W[0],W[1])}}),A.extend=function(W,L){return W.$i||(W(L,N,A),W.$i=!0),A},A.locale=P,A.isDayjs=T,A.unix=function(W){return A(1e3*W)},A.en=C[x],A.Ls=C,A.p={},A})})(GH);var It=GH.exports,KH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(y){return(y=+y)+(y>68?1900:2e3)},c=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 w=b.match(/([+-]|\d\d)/g),O=60*w[1]+(+w[2]||0);return O===0?0:w[0]==="+"?-O:O}(y)}],f=function(y){var b=l[y];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(y,b){var w,O=l.meridiem;if(O){for(var S=1;S<=24;S+=1)if(y.indexOf(O(S,0,b))>-1){w=S>12;break}}else w=y===(b?"pm":"PM");return w},m={A:[s,function(y){this.afternoon=h(y,!1)}],a:[s,function(y){this.afternoon=h(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[o,c("day")],Do:[s,function(y){var b=l.ordinal,w=y.match(/\d+/);if(this.day=w[0],b)for(var O=1;O<=31;O+=1)b(O).replace(/\[|\]/g,"")===y&&(this.day=O)}],w:[a,c("week")],ww:[o,c("week")],M:[a,c("month")],MM:[o,c("month")],MMM:[s,function(y){var b=f("months"),w=(f("monthsShort")||b.map(function(O){return O.slice(0,3)})).indexOf(y)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(y){var b=f("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(y){this.year=u(y)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function g(y){var b,w;b=y,w=l&&l.formats;for(var O=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,D,N){var $=N&&N.toUpperCase();return D||w[N]||n[N]||w[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(W,L,I){return L||I.slice(1)})})).match(r),S=O.length,x=0;x<S;x+=1){var C=O[x],E=m[C],T=E&&E[0],P=E&&E[1];O[x]=P?{regex:T,parser:P}:C.replace(/^\[|\]$/g,"")}return function(A){for(var D={},N=0,$=0;N<S;N+=1){var W=O[N];if(typeof W=="string")$+=W.length;else{var L=W.regex,I=W.parser,U=A.slice($),Q=L.exec(U)[0];I.call(D,Q),A=A.replace(Q,"")}}return function(V){var q=V.afternoon;if(q!==void 0){var K=V.hours;q?K<12&&(V.hours+=12):K===12&&(V.hours=0),delete V.afternoon}}(D),D}}return function(y,b,w){w.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var O=b.prototype,S=O.parse;O.parse=function(x){var C=x.date,E=x.utc,T=x.args;this.$u=E;var P=T[1];if(typeof P=="string"){var A=T[2]===!0,D=T[3]===!0,N=A||D,$=T[2];D&&($=T[2]),l=this.$locale(),!A&&$&&(l=w.Ls[$]),this.$d=function(U,Q,V,q){try{if(["x","X"].indexOf(Q)>-1)return new Date((Q==="X"?1e3:1)*U);var K=g(Q)(U),ie=K.year,oe=K.month,Se=K.day,ke=K.hours,Y=K.minutes,re=K.seconds,te=K.milliseconds,ge=K.zone,Re=K.week,$e=new Date,Z=Se||(ie||oe?1:$e.getDate()),ce=ie||$e.getFullYear(),Te=0;ie&&!oe||(Te=oe>0?oe-1:$e.getMonth());var Ie,ae=ke||0,me=Y||0,Ae=re||0,X=te||0;return ge?new Date(Date.UTC(ce,Te,Z,ae,me,Ae,X+60*ge.offset*1e3)):V?new Date(Date.UTC(ce,Te,Z,ae,me,Ae,X)):(Ie=new Date(ce,Te,Z,ae,me,Ae,X),Re&&(Ie=q(Ie).week(Re).toDate()),Ie)}catch{return new Date("")}}(C,P,E,w),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&C!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var W=P.length,L=1;L<=W;L+=1){T[1]=P[L-1];var I=w.apply(this,T);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}L===W&&(this.$d=new Date(""))}else S.call(this,x)}}})})(KH);var z$=KH.exports;const a8=["hours","minutes","seconds"],Nk="HH:mm:ss",ag="YYYY-MM-DD",qAe={date:ag,dates:ag,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${ag} ${Nk}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:ag,datetimerange:`${ag} ${Nk}`},xT=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],ef=t=>Array.from(Array.from({length:t}).keys()),JH=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),eW=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),s8=function(t,e){const n=af(t),r=af(e);return n&&r?t.getTime()===e.getTime():!n&&!r?t===e:!1},l8=function(t,e){const n=ut(t),r=ut(e);return n&&r?t.length!==e.length?!1:t.every((i,o)=>s8(i,e[o])):!n&&!r?s8(t,e):!1},u8=function(t,e,n){const r=xs(e)||e==="x"?It(t).locale(n):It(t,e).locale(n);return r.isValid()?r:void 0},c8=function(t,e,n){return xs(e)?t:e==="x"?+t:It(t).locale(n).format(e)},CT=(t,e)=>{var n;const r=[],i=e==null?void 0:e();for(let o=0;o<t;o++)r.push((n=i==null?void 0:i.includes(o))!=null?n:!1);return r},tW=Ye({disabledHours:{type:Oe(Function)},disabledMinutes:{type:Oe(Function)},disabledSeconds:{type:Oe(Function)}}),nW=Ye({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),Q$=Ye({id:{type:Oe([Array,String])},name:{type:Oe([Array,String]),default:""},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Oe([String,Object]),default:Bf},editable:{type:Boolean,default:!0},prefixIcon:{type:Oe([String,Object]),default:""},size:Wi,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})},modelValue:{type:Oe([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:Oe([Date,Array])},defaultTime:{type:Oe([Date,Array])},isRange:Boolean,...tW,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:Oe([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:Oe(String),values:ud,default:"bottom"},fallbackPlacements:{type:Oe(Array),default:["bottom","top","right","left"]},...Wm,...wo(["ariaLabel"])}),YAe=ue({name:"Picker"}),XAe=ue({...YAe,props:Q$,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const r=t,i=mp(),{lang:o}=kn(),a=Qe("date"),s=Qe("input"),l=Qe("range"),{form:u,formItem:c}=ua(),d=ht("ElPopperOptions",{}),{valueOnClear:f}=Hx(r,null),h=F(),m=F(),g=F(!1),y=F(!1),b=F(null);let w=!1,O=!1;const S=M(()=>[a.b("editor"),a.bm("editor",r.type),s.e("wrapper"),a.is("disabled",oe.value),a.is("active",g.value),l.b("editor"),ee?l.bm("editor",ee.value):"",i.class]),x=M(()=>[s.e("icon"),l.e("close-icon"),Z.value?"":l.e("close-icon--hidden")]);Ve(g,De=>{De?Ot(()=>{De&&(b.value=r.modelValue)}):(Ee.value=null,Ot(()=>{C(r.modelValue)}))});const C=(De,xt)=>{(xt||!l8(De,b.value))&&(n("change",De),r.validateEvent&&(c==null||c.validate("change").catch(qt=>void 0)))},E=De=>{if(!l8(r.modelValue,De)){let xt;ut(De)?xt=De.map(qt=>c8(qt,r.valueFormat,o.value)):De&&(xt=c8(De,r.valueFormat,o.value)),n("update:modelValue",De&&xt,o.value)}},T=De=>{n("keydown",De)},P=M(()=>{if(m.value){const De=X.value?m.value:m.value.$el;return Array.from(De.querySelectorAll("input"))}return[]}),A=(De,xt,qt)=>{const ln=P.value;!ln.length||(!qt||qt==="min"?(ln[0].setSelectionRange(De,xt),ln[0].focus()):qt==="max"&&(ln[1].setSelectionRange(De,xt),ln[1].focus()))},D=()=>{V(!0,!0),Ot(()=>{O=!1})},N=(De="",xt=!1)=>{xt||(O=!0),g.value=xt;let qt;ut(De)?qt=De.map(ln=>ln.toDate()):qt=De&&De.toDate(),Ee.value=null,E(qt)},$=()=>{y.value=!0},W=()=>{n("visible-change",!0)},L=De=>{(De==null?void 0:De.key)===St.esc&&V(!0,!0)},I=()=>{y.value=!1,g.value=!1,O=!1,n("visible-change",!1)},U=()=>{g.value=!0},Q=()=>{g.value=!1},V=(De=!0,xt=!1)=>{O=xt;const[qt,ln]=p(P);let nn=qt;!De&&X.value&&(nn=ln),nn&&nn.focus()},q=De=>{r.readonly||oe.value||g.value||O||(g.value=!0,n("focus",De))};let K;const ie=De=>{const xt=async()=>{setTimeout(()=>{var qt;K===xt&&(!(((qt=h.value)==null?void 0:qt.isFocusInsideContent())&&!w)&&P.value.filter(ln=>ln.contains(document.activeElement)).length===0&&(be(),g.value=!1,n("blur",De),r.validateEvent&&(c==null||c.validate("blur").catch(ln=>void 0))),w=!1)},0)};K=xt,xt()},oe=M(()=>r.disabled||(u==null?void 0:u.disabled)),Se=M(()=>{let De;if(Te.value?Pe.value.getDefaultValue&&(De=Pe.value.getDefaultValue()):ut(r.modelValue)?De=r.modelValue.map(xt=>u8(xt,r.valueFormat,o.value)):De=u8(r.modelValue,r.valueFormat,o.value),Pe.value.getRangeAvailableTime){const xt=Pe.value.getRangeAvailableTime(De);so(xt,De)||(De=xt,Te.value||E(ut(De)?De.map(qt=>qt.toDate()):De.toDate()))}return ut(De)&&De.some(xt=>!xt)&&(De=[]),De}),ke=M(()=>{if(!Pe.value.panelReady)return"";const De=Xe(Se.value);return ut(Ee.value)?[Ee.value[0]||De&&De[0]||"",Ee.value[1]||De&&De[1]||""]:Ee.value!==null?Ee.value:!re.value&&Te.value||!g.value&&Te.value?"":De?te.value||ge.value||Re.value?De.join(", "):De:""}),Y=M(()=>r.type.includes("time")),re=M(()=>r.type.startsWith("time")),te=M(()=>r.type==="dates"),ge=M(()=>r.type==="months"),Re=M(()=>r.type==="years"),$e=M(()=>r.prefixIcon||(Y.value?FQ:Hxe)),Z=F(!1),ce=De=>{r.readonly||oe.value||(Z.value&&(De.stopPropagation(),D(),Pe.value.handleClear?Pe.value.handleClear():E(f.value),C(f.value,!0),Z.value=!1,I()),n("clear"))},Te=M(()=>{const{modelValue:De}=r;return!De||ut(De)&&!De.filter(Boolean).length}),Ie=async De=>{var xt;r.readonly||oe.value||(((xt=De.target)==null?void 0:xt.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(g.value=!0)},ae=()=>{r.readonly||oe.value||!Te.value&&r.clearable&&(Z.value=!0)},me=()=>{Z.value=!1},Ae=De=>{var xt;r.readonly||oe.value||(((xt=De.touches[0].target)==null?void 0:xt.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(g.value=!0)},X=M(()=>r.type.includes("range")),ee=Ni(),le=M(()=>{var De,xt;return(xt=(De=p(h))==null?void 0:De.popperRef)==null?void 0:xt.contentRef}),Ce=M(()=>{var De;return p(X)?p(m):(De=p(m))==null?void 0:De.$el}),fe=tR(Ce,De=>{const xt=p(le),qt=p(Ce);xt&&(De.target===xt||De.composedPath().includes(xt))||De.target===qt||De.composedPath().includes(qt)||(g.value=!1)});pr(()=>{fe==null||fe()});const Ee=F(null),be=()=>{if(Ee.value){const De=Be(ke.value);De&&Ke(De)&&(E(ut(De)?De.map(xt=>xt.toDate()):De.toDate()),Ee.value=null)}Ee.value===""&&(E(f.value),C(f.value),Ee.value=null)},Be=De=>De?Pe.value.parseUserInput(De):null,Xe=De=>De?Pe.value.formatToString(De):null,Ke=De=>Pe.value.isValidValue(De),tt=async De=>{if(r.readonly||oe.value)return;const{code:xt}=De;if(T(De),xt===St.esc){g.value===!0&&(g.value=!1,De.preventDefault(),De.stopPropagation());return}if(xt===St.down&&(Pe.value.handleFocusPicker&&(De.preventDefault(),De.stopPropagation()),g.value===!1&&(g.value=!0,await Ot()),Pe.value.handleFocusPicker)){Pe.value.handleFocusPicker();return}if(xt===St.tab){w=!0;return}if(xt===St.enter||xt===St.numpadEnter){(Ee.value===null||Ee.value===""||Ke(Be(ke.value)))&&(be(),g.value=!1),De.stopPropagation();return}if(Ee.value){De.stopPropagation();return}Pe.value.handleKeydownInput&&Pe.value.handleKeydownInput(De)},Dt=De=>{Ee.value=De,g.value||(g.value=!0)},jt=De=>{const xt=De.target;Ee.value?Ee.value=[xt.value,Ee.value[1]]:Ee.value=[xt.value,null]},Me=De=>{const xt=De.target;Ee.value?Ee.value=[Ee.value[0],xt.value]:Ee.value=[null,xt.value]},nt=()=>{var De;const xt=Ee.value,qt=Be(xt&&xt[0]),ln=p(Se);if(qt&&qt.isValid()){Ee.value=[Xe(qt),((De=ke.value)==null?void 0:De[1])||null];const nn=[qt,ln&&(ln[1]||null)];Ke(nn)&&(E(nn),Ee.value=null)}},de=()=>{var De;const xt=p(Ee),qt=Be(xt&&xt[1]),ln=p(Se);if(qt&&qt.isValid()){Ee.value=[((De=p(ke))==null?void 0:De[0])||null,Xe(qt)];const nn=[ln&&ln[0],qt];Ke(nn)&&(E(nn),Ee.value=null)}},Pe=F({}),Le=De=>{Pe.value[De[0]]=De[1],Pe.value.panelReady=!0},wt=De=>{n("calendar-change",De)},tn=(De,xt,qt)=>{n("panel-change",De,xt,qt)};return _n("EP_PICKER_BASE",{props:r}),e({focus:V,handleFocusInput:q,handleBlurInput:ie,handleOpen:U,handleClose:Q,onPick:N}),(De,xt)=>(R(),we(p(Ui),gn({ref_key:"refPopper",ref:h,visible:g.value,effect:"light",pure:"",trigger:"click"},De.$attrs,{role:"dialog",teleported:"",transition:`${p(a).namespace.value}-zoom-in-top`,"popper-class":[`${p(a).namespace.value}-picker__popper`,De.popperClass],"popper-options":p(d),"fallback-placements":De.fallbackPlacements,"gpu-acceleration":!1,placement:De.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:$,onShow:W,onHide:I}),{default:z(()=>[p(X)?(R(),G("div",{key:1,ref_key:"inputRef",ref:m,class:j(p(S)),style:mt(De.$attrs.style),onClick:q,onMouseenter:ae,onMouseleave:me,onTouchstartPassive:Ae,onKeydown:tt},[p($e)?(R(),we(p(gt),{key:0,class:j([p(s).e("icon"),p(l).e("icon")]),onMousedown:Pt(Ie,["prevent"]),onTouchstartPassive:Ae},{default:z(()=>[(R(),we(un(p($e))))]),_:1},8,["class","onMousedown"])):_e("v-if",!0),J("input",{id:De.id&&De.id[0],autocomplete:"off",name:De.name&&De.name[0],placeholder:De.startPlaceholder,value:p(ke)&&p(ke)[0],disabled:p(oe),readonly:!De.editable||De.readonly,class:j(p(l).b("input")),onMousedown:Ie,onInput:jt,onChange:nt,onFocus:q,onBlur:ie},null,42,["id","name","placeholder","value","disabled","readonly"]),xe(De.$slots,"range-separator",{},()=>[J("span",{class:j(p(l).b("separator"))},je(De.rangeSeparator),3)]),J("input",{id:De.id&&De.id[1],autocomplete:"off",name:De.name&&De.name[1],placeholder:De.endPlaceholder,value:p(ke)&&p(ke)[1],disabled:p(oe),readonly:!De.editable||De.readonly,class:j(p(l).b("input")),onMousedown:Ie,onFocus:q,onBlur:ie,onInput:Me,onChange:de},null,42,["id","name","placeholder","value","disabled","readonly"]),De.clearIcon?(R(),we(p(gt),{key:1,class:j(p(x)),onClick:ce},{default:z(()=>[(R(),we(un(De.clearIcon)))]),_:1},8,["class"])):_e("v-if",!0)],38)):(R(),we(p(hi),{key:0,id:De.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":p(ke),name:De.name,size:p(ee),disabled:p(oe),placeholder:De.placeholder,class:j([p(a).b("editor"),p(a).bm("editor",De.type),De.$attrs.class]),style:mt(De.$attrs.style),readonly:!De.editable||De.readonly||p(te)||p(ge)||p(Re)||De.type==="week","aria-label":De.ariaLabel,tabindex:De.tabindex,"validate-event":!1,onInput:Dt,onFocus:q,onBlur:ie,onKeydown:tt,onChange:be,onMousedown:Ie,onMouseenter:ae,onMouseleave:me,onTouchstartPassive:Ae,onClick:Pt(()=>{},["stop"])},{prefix:z(()=>[p($e)?(R(),we(p(gt),{key:0,class:j(p(s).e("icon")),onMousedown:Pt(Ie,["prevent"]),onTouchstartPassive:Ae},{default:z(()=>[(R(),we(un(p($e))))]),_:1},8,["class","onMousedown"])):_e("v-if",!0)]),suffix:z(()=>[Z.value&&De.clearIcon?(R(),we(p(gt),{key:0,class:j(`${p(s).e("icon")} clear-icon`),onClick:Pt(ce,["stop"])},{default:z(()=>[(R(),we(un(De.clearIcon)))]),_:1},8,["class","onClick"])):_e("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onKeydown","onClick"]))]),content:z(()=>[xe(De.$slots,"default",{visible:g.value,actualVisible:y.value,parsedValue:p(Se),format:De.format,dateFormat:De.dateFormat,timeFormat:De.timeFormat,unlinkPanels:De.unlinkPanels,type:De.type,defaultValue:De.defaultValue,onPick:N,onSelectRange:A,onSetPickerOption:Le,onCalendarChange:wt,onPanelChange:tn,onKeydown:L,onMousedown:Pt(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var rW=Ge(XAe,[["__file","picker.vue"]]);const ZAe=Ye({...nW,datetimeRole:String,parsedValue:{type:Oe(Object)}}),iW=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const r=(a,s,l,u)=>{const c={hour:t,minute:e,second:n};let d=a;return["hour","minute","second"].forEach(f=>{if(c[f]){let h;const m=c[f];switch(f){case"minute":{h=m(d.hour(),s,u);break}case"second":{h=m(d.hour(),d.minute(),s,u);break}default:{h=m(s,u);break}}if((h==null?void 0:h.length)&&!h.includes(d[f]())){const g=l?0:h.length-1;d=d[f](h[g])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:r,onSetOption:([a,s])=>{i[a]=s}}},ET=t=>{const e=(r,i)=>r||i,n=r=>r!==!0;return t.map(e).filter(n)},oW=(t,e,n)=>({getHoursList:(a,s)=>CT(24,t&&(()=>t==null?void 0:t(a,s))),getMinutesList:(a,s,l)=>CT(60,e&&(()=>e==null?void 0:e(a,s,l))),getSecondsList:(a,s,l,u)=>CT(60,n&&(()=>n==null?void 0:n(a,s,l,u)))}),aW=(t,e,n)=>{const{getHoursList:r,getMinutesList:i,getSecondsList:o}=oW(t,e,n);return{getAvailableHours:(u,c)=>ET(r(u,c)),getAvailableMinutes:(u,c,d)=>ET(i(u,c,d)),getAvailableSeconds:(u,c,d,f)=>ET(o(u,c,d,f))}},sW=t=>{const e=F(t.parsedValue);return Ve(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},Ed=new Map;if(Tn){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Ed.values())for(const{documentHandler:r}of n)r(e,t);t=void 0}})}function d8(t,e){let n=[];return Array.isArray(e.arg)?n=e.arg:As(e.arg)&&n.push(e.arg),function(r,i){const o=e.instance.popperRef,a=r.target,s=i==null?void 0:i.target,l=!e||!e.instance,u=!a||!s,c=t.contains(a)||t.contains(s),d=t===a,f=n.length&&n.some(m=>m==null?void 0:m.contains(a))||n.length&&n.includes(s),h=o&&(o.contains(a)||o.contains(s));l||u||c||d||f||h||e.value(r,i)}}const qc={beforeMount(t,e){Ed.has(t)||Ed.set(t,[]),Ed.get(t).push({documentHandler:d8(t,e),bindingFn:e.value})},updated(t,e){Ed.has(t)||Ed.set(t,[]);const n=Ed.get(t),r=n.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:d8(t,e),bindingFn:e.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(t){Ed.delete(t)}},GAe=100,KAe=600,_w={beforeMount(t,e){const n=e.value,{interval:r=GAe,delay:i=KAe}=$t(n)?{}:n;let o,a;const s=()=>$t(n)?n():n.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),o&&(clearInterval(o),o=void 0)};t.addEventListener("mousedown",u=>{u.button===0&&(l(),s(),document.addEventListener("mouseup",()=>l(),{once:!0}),a=setTimeout(()=>{o=setInterval(()=>{s()},r)},i))})}},Dk="_trap-focus-children",Mh=[],f8=t=>{if(Mh.length===0)return;const e=Mh[Mh.length-1][Dk];if(e.length>0&&t.code===St.tab){if(e.length===1){t.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const n=t.shiftKey,r=t.target===e[0],i=t.target===e[e.length-1];r&&n&&(t.preventDefault(),e[e.length-1].focus()),i&&!n&&(t.preventDefault(),e[0].focus())}},JAe={beforeMount(t){t[Dk]=K3(t),Mh.push(t),Mh.length<=1&&document.addEventListener("keydown",f8)},updated(t){Ot(()=>{t[Dk]=K3(t)})},unmounted(){Mh.shift(),Mh.length===0&&document.removeEventListener("keydown",f8)}};var h8=!1,yh,Lk,Ik,w1,S1,lW,x1,Bk,Fk,Vk,uW,jk,zk,cW,dW;function Ba(){if(!h8){h8=!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(jk=/\b(iPhone|iP[ao]d)/.exec(t),zk=/\b(iP[ao]d)/.exec(t),Vk=/Android/i.exec(t),cW=/FBAN\/\w+;/i.exec(t),dW=/Mobile/i.exec(t),uW=!!/Win64/.exec(t),e){yh=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,yh&&document&&document.documentMode&&(yh=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);lW=r?parseFloat(r[1])+4:yh,Lk=e[2]?parseFloat(e[2]):NaN,Ik=e[3]?parseFloat(e[3]):NaN,w1=e[4]?parseFloat(e[4]):NaN,w1?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),S1=e&&e[1]?parseFloat(e[1]):NaN):S1=NaN}else yh=Lk=Ik=S1=w1=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);x1=i?parseFloat(i[1].replace("_",".")):!0}else x1=!1;Bk=!!n[2],Fk=!!n[3]}else x1=Bk=Fk=!1}}var Qk={ie:function(){return Ba()||yh},ieCompatibilityMode:function(){return Ba()||lW>yh},ie64:function(){return Qk.ie()&&uW},firefox:function(){return Ba()||Lk},opera:function(){return Ba()||Ik},webkit:function(){return Ba()||w1},safari:function(){return Qk.webkit()},chrome:function(){return Ba()||S1},windows:function(){return Ba()||Bk},osx:function(){return Ba()||x1},linux:function(){return Ba()||Fk},iphone:function(){return Ba()||jk},mobile:function(){return Ba()||jk||zk||Vk||dW},nativeApp:function(){return Ba()||cW},android:function(){return Ba()||Vk},ipad:function(){return Ba()||zk}},eMe=Qk,uO=!!(typeof window<"u"&&window.document&&window.document.createElement),tMe={canUseDOM:uO,canUseWorkers:typeof Worker<"u",canUseEventListeners:uO&&!!(window.addEventListener||window.attachEvent),canUseViewport:uO&&!!window.screen,isInWorker:!uO},fW=tMe,hW;fW.canUseDOM&&(hW=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function nMe(t,e){if(!fW.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&hW&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var rMe=nMe,p8=10,g8=40,m8=800;function pW(t){var e=0,n=0,r=0,i=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),r=e*p8,i=n*p8,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(t.deltaMode==1?(r*=g8,i*=g8):(r*=m8,i*=m8)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}pW.getEventType=function(){return eMe.firefox()?"DOMMouseScroll":rMe("wheel")?"wheel":"mousewheel"};var iMe=pW;/**
  48. * Checks if an event is supported in the current execution environment.
  49. *
  50. * NOTE: This will not work correctly for non-generic events such as `change`,
  51. * `reset`, `load`, `error`, and `select`.
  52. *
  53. * Borrows from Modernizr.
  54. *
  55. * @param {string} eventNameSuffix Event name, e.g. "click".
  56. * @param {?boolean} capture Check if the capture phase is supported.
  57. * @return {boolean} True if the event is supported.
  58. * @internal
  59. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  60. */const oMe=function(t,e){if(t&&t.addEventListener){const n=function(r){const i=iMe(r);e&&Reflect.apply(e,this,[r,i])};t.addEventListener("wheel",n,{passive:!0})}},aMe={beforeMount(t,e){oMe(t,e.value)}},sMe=Ye({role:{type:String,required:!0},spinnerDate:{type:Oe(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:Oe(String),default:""},...tW}),lMe=ue({__name:"basic-time-spinner",props:sMe,emits:["change","select-range","set-option"],setup(t,{emit:e}){const n=t,r=Qe("time"),{getHoursList:i,getMinutesList:o,getSecondsList:a}=oW(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let s=!1;const l=F(),u=F(),c=F(),d=F(),f={hours:u,minutes:c,seconds:d},h=M(()=>n.showSeconds?a8:a8.slice(0,2)),m=M(()=>{const{spinnerDate:V}=n,q=V.hour(),K=V.minute(),ie=V.second();return{hours:q,minutes:K,seconds:ie}}),g=M(()=>{const{hours:V,minutes:q}=p(m);return{hours:i(n.role),minutes:o(V,n.role),seconds:a(V,q,n.role)}}),y=M(()=>{const{hours:V,minutes:q,seconds:K}=p(m);return{hours:xT(V,23),minutes:xT(q,59),seconds:xT(K,59)}}),b=jo(V=>{s=!1,S(V)},200),w=V=>{if(!!!n.amPmMode)return"";const K=n.amPmMode==="A";let ie=V<12?" am":" pm";return K&&(ie=ie.toUpperCase()),ie},O=V=>{let q;switch(V){case"hours":q=[0,2];break;case"minutes":q=[3,5];break;case"seconds":q=[6,8];break}const[K,ie]=q;e("select-range",K,ie),l.value=V},S=V=>{E(V,p(m)[V])},x=()=>{S("hours"),S("minutes"),S("seconds")},C=V=>V.querySelector(`.${r.namespace.value}-scrollbar__wrap`),E=(V,q)=>{if(n.arrowControl)return;const K=p(f[V]);K&&K.$el&&(C(K.$el).scrollTop=Math.max(0,q*T(V)))},T=V=>{const q=p(f[V]),K=q==null?void 0:q.$el.querySelector("li");return K&&Number.parseFloat(Id(K,"height"))||0},P=()=>{D(1)},A=()=>{D(-1)},D=V=>{l.value||O("hours");const q=l.value,K=p(m)[q],ie=l.value==="hours"?24:60,oe=N(q,K,V,ie);$(q,oe),E(q,oe),Ot(()=>O(q))},N=(V,q,K,ie)=>{let oe=(q+K+ie)%ie;const Se=p(g)[V];for(;Se[oe]&&oe!==q;)oe=(oe+K+ie)%ie;return oe},$=(V,q)=>{if(p(g)[V][q])return;const{hours:oe,minutes:Se,seconds:ke}=p(m);let Y;switch(V){case"hours":Y=n.spinnerDate.hour(q).minute(Se).second(ke);break;case"minutes":Y=n.spinnerDate.hour(oe).minute(q).second(ke);break;case"seconds":Y=n.spinnerDate.hour(oe).minute(Se).second(q);break}e("change",Y)},W=(V,{value:q,disabled:K})=>{K||($(V,q),O(V),E(V,q))},L=V=>{s=!0,b(V);const q=Math.min(Math.round((C(p(f[V]).$el).scrollTop-(I(V)*.5-10)/T(V)+3)/T(V)),V==="hours"?23:59);$(V,q)},I=V=>p(f[V]).$el.offsetHeight,U=()=>{const V=q=>{const K=p(f[q]);K&&K.$el&&(C(K.$el).onscroll=()=>{L(q)})};V("hours"),V("minutes"),V("seconds")};Bt(()=>{Ot(()=>{!n.arrowControl&&U(),x(),n.role==="start"&&O("hours")})});const Q=(V,q)=>{f[q].value=V};return e("set-option",[`${n.role}_scrollDown`,D]),e("set-option",[`${n.role}_emitSelectRange`,O]),Ve(()=>n.spinnerDate,()=>{s||x()}),(V,q)=>(R(),G("div",{class:j([p(r).b("spinner"),{"has-seconds":V.showSeconds}])},[V.arrowControl?_e("v-if",!0):(R(!0),G(ct,{key:0},Wt(p(h),K=>(R(),we(p(mu),{key:K,ref_for:!0,ref:ie=>Q(ie,K),class:j(p(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":p(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ie=>O(K),onMousemove:ie=>S(K)},{default:z(()=>[(R(!0),G(ct,null,Wt(p(g)[K],(ie,oe)=>(R(),G("li",{key:oe,class:j([p(r).be("spinner","item"),p(r).is("active",oe===p(m)[K]),p(r).is("disabled",ie)]),onClick:Se=>W(K,{value:oe,disabled:ie})},[K==="hours"?(R(),G(ct,{key:0},[qe(je(("0"+(V.amPmMode?oe%12||12:oe)).slice(-2))+je(w(oe)),1)],64)):(R(),G(ct,{key:1},[qe(je(("0"+oe).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),V.arrowControl?(R(!0),G(ct,{key:1},Wt(p(h),K=>(R(),G("div",{key:K,class:j([p(r).be("spinner","wrapper"),p(r).is("arrow")]),onMouseenter:ie=>O(K)},[Ht((R(),we(p(gt),{class:j(["arrow-up",p(r).be("spinner","arrow")])},{default:z(()=>[B(p(o$))]),_:1},8,["class"])),[[p(_w),A]]),Ht((R(),we(p(gt),{class:j(["arrow-down",p(r).be("spinner","arrow")])},{default:z(()=>[B(p(ld))]),_:1},8,["class"])),[[p(_w),P]]),J("ul",{class:j(p(r).be("spinner","list"))},[(R(!0),G(ct,null,Wt(p(y)[K],(ie,oe)=>(R(),G("li",{key:oe,class:j([p(r).be("spinner","item"),p(r).is("active",ie===p(m)[K]),p(r).is("disabled",p(g)[K][ie])])},[typeof ie=="number"?(R(),G(ct,{key:0},[K==="hours"?(R(),G(ct,{key:0},[qe(je(("0"+(V.amPmMode?ie%12||12:ie)).slice(-2))+je(w(ie)),1)],64)):(R(),G(ct,{key:1},[qe(je(("0"+ie).slice(-2)),1)],64))],64)):_e("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):_e("v-if",!0)],2))}});var Hk=Ge(lMe,[["__file","basic-time-spinner.vue"]]);const uMe=ue({__name:"panel-time-pick",props:ZAe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{arrowControl:i,disabledHours:o,disabledMinutes:a,disabledSeconds:s,defaultValue:l}=r.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=aW(o,a,s),f=Qe("time"),{t:h,lang:m}=kn(),g=F([0,2]),y=sW(n),b=M(()=>ai(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),w=M(()=>n.format.includes("ss")),O=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=Q=>{const V=It(Q).locale(m.value),q=W(V);return V.isSame(q)},x=()=>{e("pick",y.value,!1)},C=(Q=!1,V=!1)=>{V||e("pick",n.parsedValue,Q)},E=Q=>{if(!n.visible)return;const V=W(Q).millisecond(0);e("pick",V,!0)},T=(Q,V)=>{e("select-range",Q,V),g.value=[Q,V]},P=Q=>{const V=[0,3].concat(w.value?[6]:[]),q=["hours","minutes"].concat(w.value?["seconds"]:[]),ie=(V.indexOf(g.value[0])+Q+V.length)%V.length;D.start_emitSelectRange(q[ie])},A=Q=>{const V=Q.code,{left:q,right:K,up:ie,down:oe}=St;if([q,K].includes(V)){P(V===q?-1:1),Q.preventDefault();return}if([ie,oe].includes(V)){const Se=V===ie?-1:1;D.start_scrollDown(Se),Q.preventDefault();return}},{timePickerOptions:D,onSetOption:N,getAvailableTime:$}=iW({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),W=Q=>$(Q,n.datetimeRole||"",!0),L=Q=>Q?It(Q,n.format).locale(m.value):null,I=Q=>Q?Q.format(n.format):null,U=()=>It(l).locale(m.value);return e("set-picker-option",["isValidValue",S]),e("set-picker-option",["formatToString",I]),e("set-picker-option",["parseUserInput",L]),e("set-picker-option",["handleKeydownInput",A]),e("set-picker-option",["getRangeAvailableTime",W]),e("set-picker-option",["getDefaultValue",U]),(Q,V)=>(R(),we(Qi,{name:p(b)},{default:z(()=>[Q.actualVisible||Q.visible?(R(),G("div",{key:0,class:j(p(f).b("panel"))},[J("div",{class:j([p(f).be("panel","content"),{"has-seconds":p(w)}])},[B(Hk,{ref:"spinner",role:Q.datetimeRole||"start","arrow-control":p(i),"show-seconds":p(w),"am-pm-mode":p(O),"spinner-date":Q.parsedValue,"disabled-hours":p(o),"disabled-minutes":p(a),"disabled-seconds":p(s),onChange:E,onSetOption:p(N),onSelectRange:T},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),J("div",{class:j(p(f).be("panel","footer"))},[J("button",{type:"button",class:j([p(f).be("panel","btn"),"cancel"]),onClick:x},je(p(h)("el.datepicker.cancel")),3),J("button",{type:"button",class:j([p(f).be("panel","btn"),"confirm"]),onClick:q=>C()},je(p(h)("el.datepicker.confirm")),11,["onClick"])],2)],2)):_e("v-if",!0)]),_:1},8,["name"]))}});var Ow=Ge(uMe,[["__file","panel-time-pick.vue"]]);const cMe=Ye({...nW,parsedValue:{type:Oe(Array)}}),dMe=ue({__name:"panel-time-range",props:cMe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=($e,Z)=>{const ce=[];for(let Te=$e;Te<=Z;Te++)ce.push(Te);return ce},{t:i,lang:o}=kn(),a=Qe("time"),s=Qe("picker"),l=ht("EP_PICKER_BASE"),{arrowControl:u,disabledHours:c,disabledMinutes:d,disabledSeconds:f,defaultValue:h}=l.props,m=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),S.value?"has-seconds":""]),g=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),S.value?"has-seconds":""]),y=M(()=>n.parsedValue[0]),b=M(()=>n.parsedValue[1]),w=sW(n),O=()=>{e("pick",w.value,!1)},S=M(()=>n.format.includes("ss")),x=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),C=($e=!1)=>{e("pick",[y.value,b.value],$e)},E=$e=>{A($e.millisecond(0),b.value)},T=$e=>{A(y.value,$e.millisecond(0))},P=$e=>{const Z=$e.map(Te=>It(Te).locale(o.value)),ce=K(Z);return Z[0].isSame(ce[0])&&Z[1].isSame(ce[1])},A=($e,Z)=>{e("pick",[$e,Z],!0)},D=M(()=>y.value>b.value),N=F([0,2]),$=($e,Z)=>{e("select-range",$e,Z,"min"),N.value=[$e,Z]},W=M(()=>S.value?11:8),L=($e,Z)=>{e("select-range",$e,Z,"max");const ce=p(W);N.value=[$e+ce,Z+ce]},I=$e=>{const Z=S.value?[0,3,6,11,14,17]:[0,3,8,11],ce=["hours","minutes"].concat(S.value?["seconds"]:[]),Ie=(Z.indexOf(N.value[0])+$e+Z.length)%Z.length,ae=Z.length/2;Ie<ae?ke.start_emitSelectRange(ce[Ie]):ke.end_emitSelectRange(ce[Ie-ae])},U=$e=>{const Z=$e.code,{left:ce,right:Te,up:Ie,down:ae}=St;if([ce,Te].includes(Z)){I(Z===ce?-1:1),$e.preventDefault();return}if([Ie,ae].includes(Z)){const me=Z===Ie?-1:1,Ae=N.value[0]<W.value?"start":"end";ke[`${Ae}_scrollDown`](me),$e.preventDefault();return}},Q=($e,Z)=>{const ce=c?c($e):[],Te=$e==="start",ae=(Z||(Te?b.value:y.value)).hour(),me=Te?r(ae+1,23):r(0,ae-1);return y1(ce,me)},V=($e,Z,ce)=>{const Te=d?d($e,Z):[],Ie=Z==="start",ae=ce||(Ie?b.value:y.value),me=ae.hour();if($e!==me)return Te;const Ae=ae.minute(),X=Ie?r(Ae+1,59):r(0,Ae-1);return y1(Te,X)},q=($e,Z,ce,Te)=>{const Ie=f?f($e,Z,ce):[],ae=ce==="start",me=Te||(ae?b.value:y.value),Ae=me.hour(),X=me.minute();if($e!==Ae||Z!==X)return Ie;const ee=me.second(),le=ae?r(ee+1,59):r(0,ee-1);return y1(Ie,le)},K=([$e,Z])=>[Y($e,"start",!0,Z),Y(Z,"end",!1,$e)],{getAvailableHours:ie,getAvailableMinutes:oe,getAvailableSeconds:Se}=aW(Q,V,q),{timePickerOptions:ke,getAvailableTime:Y,onSetOption:re}=iW({getAvailableHours:ie,getAvailableMinutes:oe,getAvailableSeconds:Se}),te=$e=>$e?ut($e)?$e.map(Z=>It(Z,n.format).locale(o.value)):It($e,n.format).locale(o.value):null,ge=$e=>$e?ut($e)?$e.map(Z=>Z.format(n.format)):$e.format(n.format):null,Re=()=>{if(ut(h))return h.map(Z=>It(Z).locale(o.value));const $e=It(h).locale(o.value);return[$e,$e.add(60,"m")]};return e("set-picker-option",["formatToString",ge]),e("set-picker-option",["parseUserInput",te]),e("set-picker-option",["isValidValue",P]),e("set-picker-option",["handleKeydownInput",U]),e("set-picker-option",["getDefaultValue",Re]),e("set-picker-option",["getRangeAvailableTime",K]),($e,Z)=>$e.actualVisible?(R(),G("div",{key:0,class:j([p(a).b("range-picker"),p(s).b("panel")])},[J("div",{class:j(p(a).be("range-picker","content"))},[J("div",{class:j(p(a).be("range-picker","cell"))},[J("div",{class:j(p(a).be("range-picker","header"))},je(p(i)("el.datepicker.startTime")),3),J("div",{class:j(p(m))},[B(Hk,{ref:"minSpinner",role:"start","show-seconds":p(S),"am-pm-mode":p(x),"arrow-control":p(u),"spinner-date":p(y),"disabled-hours":Q,"disabled-minutes":V,"disabled-seconds":q,onChange:E,onSetOption:p(re),onSelectRange:$},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),J("div",{class:j(p(a).be("range-picker","cell"))},[J("div",{class:j(p(a).be("range-picker","header"))},je(p(i)("el.datepicker.endTime")),3),J("div",{class:j(p(g))},[B(Hk,{ref:"maxSpinner",role:"end","show-seconds":p(S),"am-pm-mode":p(x),"arrow-control":p(u),"spinner-date":p(b),"disabled-hours":Q,"disabled-minutes":V,"disabled-seconds":q,onChange:T,onSetOption:p(re),onSelectRange:L},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),J("div",{class:j(p(a).be("panel","footer"))},[J("button",{type:"button",class:j([p(a).be("panel","btn"),"cancel"]),onClick:ce=>O()},je(p(i)("el.datepicker.cancel")),11,["onClick"]),J("button",{type:"button",class:j([p(a).be("panel","btn"),"confirm"]),disabled:p(D),onClick:ce=>C()},je(p(i)("el.datepicker.confirm")),11,["disabled","onClick"])],2)],2)):_e("v-if",!0)}});var fMe=Ge(dMe,[["__file","panel-time-range.vue"]]);It.extend(z$);var hMe=ue({name:"ElTimePicker",install:null,props:{...Q$,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,e){const n=F(),[r,i]=t.isRange?["timerange",fMe]:["time",Ow],o=a=>e.emit("update:modelValue",a);return _n("ElPopperOptions",t.popperOptions),e.expose({focus:a=>{var s;(s=n.value)==null||s.handleFocusInput(a)},blur:a=>{var s;(s=n.value)==null||s.handleBlurInput(a)},handleOpen:()=>{var a;(a=n.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=n.value)==null||a.handleClose()}}),()=>{var a;const s=(a=t.format)!=null?a:Nk;return B(rW,gn(t,{ref:n,type:r,format:s,"onUpdate:modelValue":o}),{default:l=>B(i,l,null)})}}});const pMe=Vt(hMe),gMe=(t,e)=>{const n=t.subtract(1,"month").endOf("month").date();return ef(e).map((r,i)=>n-(e-i-1))},mMe=t=>{const e=t.daysInMonth();return ef(e).map((n,r)=>r+1)},vMe=t=>ef(t.length/7).map(e=>{const n=e*7;return t.slice(n,n+7)}),yMe=Ye({selectedDay:{type:Oe(Object)},range:{type:Oe(Array)},date:{type:Oe(Object),required:!0},hideHeader:{type:Boolean}}),bMe={pick:t=>sn(t)};var gW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r,i){var o=r.prototype,a=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,f,h,m,g){var y=d.name?d:d.$locale(),b=a(y[f]),w=a(y[h]),O=b||w.map(function(x){return x.slice(0,m)});if(!g)return O;var S=y.weekStart;return O.map(function(x,C){return O[(C+(S||0))%7]})},l=function(){return i.Ls[i.locale()]},u=function(d,f){return d.formats[f]||function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,g,y){return g||y.slice(1)})}(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):s(d,"months")},monthsShort:function(f){return f?f.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):s(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):s(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return c.bind(this)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return s(l(),"months")},i.monthsShort=function(){return s(l(),"monthsShort","months",3)},i.weekdays=function(d){return s(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return s(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return s(l(),"weekdaysMin","weekdays",2,d)}}})})(gW);var mW=gW.exports;const _Me=(t,e)=>{It.extend(mW);const n=It.localeData().firstDayOfWeek(),{t:r,lang:i}=kn(),o=It().locale(i.value),a=M(()=>!!t.range&&!!t.range.length),s=M(()=>{let f=[];if(a.value){const[h,m]=t.range,g=ef(m.date()-h.date()+1).map(w=>({text:h.date()+w,type:"current"}));let y=g.length%7;y=y===0?0:7-y;const b=ef(y).map((w,O)=>({text:O+1,type:"next"}));f=g.concat(b)}else{const h=t.date.startOf("month").day(),m=gMe(t.date,(h-n+7)%7).map(w=>({text:w,type:"prev"})),g=mMe(t.date).map(w=>({text:w,type:"current"}));f=[...m,...g];const y=7-(f.length%7||7),b=ef(y).map((w,O)=>({text:O+1,type:"next"}));f=f.concat(b)}return vMe(f)}),l=M(()=>{const f=n;return f===0?mT.map(h=>r(`el.datepicker.weeks.${h}`)):mT.slice(f).concat(mT.slice(0,f)).map(h=>r(`el.datepicker.weeks.${h}`))}),u=(f,h)=>{switch(h){case"prev":return t.date.startOf("month").subtract(1,"month").date(f);case"next":return t.date.startOf("month").add(1,"month").date(f);case"current":return t.date.date(f)}};return{now:o,isInRange:a,rows:s,weekDays:l,getFormattedDate:u,handlePickDay:({text:f,type:h})=>{const m=u(f,h);e("pick",m)},getSlotData:({text:f,type:h})=>{const m=u(f,h);return{isSelected:m.isSame(t.selectedDay),type:`${h}-month`,day:m.format("YYYY-MM-DD"),date:m.toDate()}}}},OMe=ue({name:"DateTable"}),wMe=ue({...OMe,props:yMe,emits:bMe,setup(t,{expose:e,emit:n}){const r=t,{isInRange:i,now:o,rows:a,weekDays:s,getFormattedDate:l,handlePickDay:u,getSlotData:c}=_Me(r,n),d=Qe("calendar-table"),f=Qe("calendar-day"),h=({text:m,type:g})=>{const y=[g];if(g==="current"){const b=l(m,g);b.isSame(r.selectedDay,"day")&&y.push(f.is("selected")),b.isSame(o,"day")&&y.push(f.is("today"))}return y};return e({getFormattedDate:l}),(m,g)=>(R(),G("table",{class:j([p(d).b(),p(d).is("range",p(i))]),cellspacing:"0",cellpadding:"0"},[m.hideHeader?_e("v-if",!0):(R(),G("thead",{key:0},[(R(!0),G(ct,null,Wt(p(s),y=>(R(),G("th",{key:y},je(y),1))),128))])),J("tbody",null,[(R(!0),G(ct,null,Wt(p(a),(y,b)=>(R(),G("tr",{key:b,class:j({[p(d).e("row")]:!0,[p(d).em("row","hide-border")]:b===0&&m.hideHeader})},[(R(!0),G(ct,null,Wt(y,(w,O)=>(R(),G("td",{key:O,class:j(h(w)),onClick:S=>p(u)(w)},[J("div",{class:j(p(f).b())},[xe(m.$slots,"date-cell",{data:p(c)(w)},()=>[J("span",null,je(w.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var v8=Ge(wMe,[["__file","date-table.vue"]]);const SMe=(t,e)=>{const n=t.endOf("month"),r=e.startOf("month"),o=n.isSame(r,"week")?r.add(1,"week"):r;return[[t,n],[o.startOf("week"),e]]},xMe=(t,e)=>{const n=t.endOf("month"),r=t.add(1,"month").startOf("month"),i=n.isSame(r,"week")?r.add(1,"week"):r,o=i.endOf("month"),a=e.startOf("month"),s=o.isSame(a,"week")?a.add(1,"week"):a;return[[t,n],[i.startOf("week"),o],[s.startOf("week"),e]]},CMe=(t,e,n)=>{const{lang:r}=kn(),i=F(),o=It().locale(r.value),a=M({get(){return t.modelValue?l.value:i.value},set(y){if(!y)return;i.value=y;const b=y.toDate();e(Oa,b),e(Zt,b)}}),s=M(()=>{if(!t.range||!ut(t.range)||t.range.length!==2||t.range.some(O=>!af(O)))return[];const y=t.range.map(O=>It(O).locale(r.value)),[b,w]=y;return b.isAfter(w)?[]:b.isSame(w,"month")?h(b,w):b.add(1,"month").month()!==w.month()?[]:h(b,w)}),l=M(()=>t.modelValue?It(t.modelValue).locale(r.value):a.value||(s.value.length?s.value[0][0]:o)),u=M(()=>l.value.subtract(1,"month").date(1)),c=M(()=>l.value.add(1,"month").date(1)),d=M(()=>l.value.subtract(1,"year").date(1)),f=M(()=>l.value.add(1,"year").date(1)),h=(y,b)=>{const w=y.startOf("week"),O=b.endOf("week"),S=w.get("month"),x=O.get("month");return S===x?[[w,O]]:(S+1)%12===x?SMe(w,O):S+2===x||(S+1)%11===x?xMe(w,O):[]},m=y=>{a.value=y};return{calculateValidatedDateRange:h,date:l,realSelectedDay:a,pickDay:m,selectDate:y=>{const w={"prev-month":u.value,"next-month":c.value,"prev-year":d.value,"next-year":f.value,today:o}[y];w.isSame(l.value,"day")||m(w)},validatedRange:s}},EMe=t=>ut(t)&&t.length===2&&t.every(e=>af(e)),TMe=Ye({modelValue:{type:Date},range:{type:Oe(Array),validator:EMe}}),kMe={[Zt]:t=>af(t),[Oa]:t=>af(t)},PMe="ElCalendar",AMe=ue({name:PMe}),MMe=ue({...AMe,props:TMe,emits:kMe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("calendar"),{calculateValidatedDateRange:o,date:a,pickDay:s,realSelectedDay:l,selectDate:u,validatedRange:c}=CMe(r,n),{t:d}=kn(),f=M(()=>{const h=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${d("el.datepicker.year")} ${d(h)}`});return e({selectedDay:l,pickDay:s,selectDate:u,calculateValidatedDateRange:o}),(h,m)=>(R(),G("div",{class:j(p(i).b())},[J("div",{class:j(p(i).e("header"))},[xe(h.$slots,"header",{date:p(f)},()=>[J("div",{class:j(p(i).e("title"))},je(p(f)),3),p(c).length===0?(R(),G("div",{key:0,class:j(p(i).e("button-group"))},[B(p(ZH),null,{default:z(()=>[B(p(lr),{size:"small",onClick:g=>p(u)("prev-month")},{default:z(()=>[qe(je(p(d)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),B(p(lr),{size:"small",onClick:g=>p(u)("today")},{default:z(()=>[qe(je(p(d)("el.datepicker.today")),1)]),_:1},8,["onClick"]),B(p(lr),{size:"small",onClick:g=>p(u)("next-month")},{default:z(()=>[qe(je(p(d)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):_e("v-if",!0)])],2),p(c).length===0?(R(),G("div",{key:0,class:j(p(i).e("body"))},[B(v8,{date:p(a),"selected-day":p(l),onPick:p(s)},ts({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:z(g=>[xe(h.$slots,"date-cell",Xl(lf(g)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(R(),G("div",{key:1,class:j(p(i).e("body"))},[(R(!0),G(ct,null,Wt(p(c),(g,y)=>(R(),we(v8,{key:y,date:g[0],"selected-day":p(l),range:g,"hide-header":y!==0,onPick:p(s)},ts({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:z(b=>[xe(h.$slots,"date-cell",Xl(lf(b)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var RMe=Ge(MMe,[["__file","calendar.vue"]]);const $Me=Vt(RMe),NMe=Ye({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:Oe([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),DMe=ue({name:"ElCard"}),LMe=ue({...DMe,props:NMe,setup(t){const e=Qe("card");return(n,r)=>(R(),G("div",{class:j([p(e).b(),p(e).is(`${n.shadow}-shadow`)])},[n.$slots.header||n.header?(R(),G("div",{key:0,class:j(p(e).e("header"))},[xe(n.$slots,"header",{},()=>[qe(je(n.header),1)])],2)):_e("v-if",!0),J("div",{class:j([p(e).e("body"),n.bodyClass]),style:mt(n.bodyStyle)},[xe(n.$slots,"default")],6),n.$slots.footer||n.footer?(R(),G("div",{key:1,class:j(p(e).e("footer"))},[xe(n.$slots,"footer",{},()=>[qe(je(n.footer),1)])],2)):_e("v-if",!0)],2))}});var IMe=Ge(LMe,[["__file","card.vue"]]);const BMe=Vt(IMe),FMe=Ye({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),VMe={change:(t,e)=>[t,e].every(kt)},vW=Symbol("carouselContextKey"),Wk="ElCarouselItem",y8=300,jMe=(t,e,n)=>{const{children:r,addChild:i,removeChild:o}=N$(en(),Wk),a=Ji(),s=F(-1),l=F(null),u=F(!1),c=F(),d=F(0),f=F(!0),h=F(!0),m=F(!1),g=M(()=>t.arrow!=="never"&&!p(w)),y=M(()=>r.value.some(Y=>Y.props.label.toString().length>0)),b=M(()=>t.type==="card"),w=M(()=>t.direction==="vertical"),O=M(()=>t.height!=="auto"?{height:t.height}:{height:`${d.value}px`,overflow:"hidden"}),S=Vc(Y=>{A(Y)},y8,{trailing:!0}),x=Vc(Y=>{V(Y)},y8),C=Y=>f.value?s.value<=1?Y<=1:Y>1:!0;function E(){l.value&&(clearInterval(l.value),l.value=null)}function T(){t.interval<=0||!t.autoplay||l.value||(l.value=setInterval(()=>P(),t.interval))}const P=()=>{h.value||(m.value=!0),h.value=!1,s.value<r.value.length-1?s.value=s.value+1:t.loop?s.value=0:m.value=!1};function A(Y){if(h.value||(m.value=!0),h.value=!1,At(Y)){const ge=r.value.filter(Re=>Re.props.name===Y);ge.length>0&&(Y=r.value.indexOf(ge[0]))}if(Y=Number(Y),Number.isNaN(Y)||Y!==Math.floor(Y))return;const re=r.value.length,te=s.value;Y<0?s.value=t.loop?re-1:0:Y>=re?s.value=t.loop?0:re-1:s.value=Y,te===s.value&&D(te),ie()}function D(Y){r.value.forEach((re,te)=>{re.translateItem(te,s.value,Y)})}function N(Y,re){var te,ge,Re,$e;const Z=p(r),ce=Z.length;if(ce===0||!Y.states.inStage)return!1;const Te=re+1,Ie=re-1,ae=ce-1,me=Z[ae].states.active,Ae=Z[0].states.active,X=(ge=(te=Z[Te])==null?void 0:te.states)==null?void 0:ge.active,ee=($e=(Re=Z[Ie])==null?void 0:Re.states)==null?void 0:$e.active;return re===ae&&Ae||X?"left":re===0&&me||ee?"right":!1}function $(){u.value=!0,t.pauseOnHover&&E()}function W(){u.value=!1,T()}function L(){m.value=!1}function I(Y){p(w)||r.value.forEach((re,te)=>{Y===N(re,te)&&(re.states.hover=!0)})}function U(){p(w)||r.value.forEach(Y=>{Y.states.hover=!1})}function Q(Y){Y!==s.value&&(h.value||(m.value=!0)),s.value=Y}function V(Y){t.trigger==="hover"&&Y!==s.value&&(s.value=Y,h.value||(m.value=!0))}function q(){A(s.value-1)}function K(){A(s.value+1)}function ie(){E(),t.pauseOnHover||T()}function oe(Y){t.height==="auto"&&(d.value=Y)}function Se(){var Y;const re=(Y=a.default)==null?void 0:Y.call(a);if(!re)return null;const ge=Kd(re).filter(Re=>Kr(Re)&&Re.type.name===Wk);return(ge==null?void 0:ge.length)===2&&t.loop&&!b.value?(f.value=!0,ge):(f.value=!1,null)}Ve(()=>s.value,(Y,re)=>{D(re),f.value&&(Y=Y%2,re=re%2),re>-1&&e("change",Y,re)}),Ve(()=>t.autoplay,Y=>{Y?T():E()}),Ve(()=>t.loop,()=>{A(s.value)}),Ve(()=>t.interval,()=>{ie()});const ke=Tr();return Bt(()=>{Ve(()=>r.value,()=>{r.value.length>0&&A(t.initialIndex)},{immediate:!0}),ke.value=Zr(c.value,()=>{D()}),T()}),pr(()=>{E(),c.value&&ke.value&&ke.value.stop()}),_n(vW,{root:c,isCardType:b,isVertical:w,items:r,loop:t.loop,cardScale:t.cardScale,addItem:i,removeItem:o,setActiveItem:A,setContainerHeight:oe}),{root:c,activeIndex:s,arrowDisplay:g,hasLabel:y,hover:u,isCardType:b,isTransitioning:m,items:r,isVertical:w,containerStyle:O,isItemsTwoLength:f,handleButtonEnter:I,handleTransitionEnd:L,handleButtonLeave:U,handleIndicatorClick:Q,handleMouseEnter:$,handleMouseLeave:W,setActiveItem:A,prev:q,next:K,PlaceholderItem:Se,isTwoLengthShow:C,throttledArrowClick:S,throttledIndicatorHover:x}},zMe="ElCarousel",QMe=ue({name:zMe}),HMe=ue({...QMe,props:FMe,emits:VMe,setup(t,{expose:e,emit:n}){const r=t,{root:i,activeIndex:o,arrowDisplay:a,hasLabel:s,hover:l,isCardType:u,items:c,isVertical:d,containerStyle:f,handleButtonEnter:h,handleButtonLeave:m,isTransitioning:g,handleIndicatorClick:y,handleMouseEnter:b,handleMouseLeave:w,handleTransitionEnd:O,setActiveItem:S,prev:x,next:C,PlaceholderItem:E,isTwoLengthShow:T,throttledArrowClick:P,throttledIndicatorHover:A}=jMe(r,n),D=Qe("carousel"),{t:N}=kn(),$=M(()=>{const I=[D.b(),D.m(r.direction)];return p(u)&&I.push(D.m("card")),I}),W=M(()=>{const I=[D.e("container")];return r.motionBlur&&p(g)&&c.value.length>1&&I.push(p(d)?`${D.namespace.value}-transitioning-vertical`:`${D.namespace.value}-transitioning`),I}),L=M(()=>{const I=[D.e("indicators"),D.em("indicators",r.direction)];return p(s)&&I.push(D.em("indicators","labels")),r.indicatorPosition==="outside"&&I.push(D.em("indicators","outside")),p(d)&&I.push(D.em("indicators","right")),I});return e({activeIndex:o,setActiveItem:S,prev:x,next:C}),(I,U)=>(R(),G("div",{ref_key:"root",ref:i,class:j(p($)),onMouseenter:Pt(p(b),["stop"]),onMouseleave:Pt(p(w),["stop"])},[p(a)?(R(),we(Qi,{key:0,name:"carousel-arrow-left",persisted:""},{default:z(()=>[Ht(J("button",{type:"button",class:j([p(D).e("arrow"),p(D).em("arrow","left")]),"aria-label":p(N)("el.carousel.leftArrow"),onMouseenter:Q=>p(h)("left"),onMouseleave:p(m),onClick:Pt(Q=>p(P)(p(o)-1),["stop"])},[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[zn,(I.arrow==="always"||p(l))&&(r.loop||p(o)>0)]])]),_:1})):_e("v-if",!0),p(a)?(R(),we(Qi,{key:1,name:"carousel-arrow-right",persisted:""},{default:z(()=>[Ht(J("button",{type:"button",class:j([p(D).e("arrow"),p(D).em("arrow","right")]),"aria-label":p(N)("el.carousel.rightArrow"),onMouseenter:Q=>p(h)("right"),onMouseleave:p(m),onClick:Pt(Q=>p(P)(p(o)+1),["stop"])},[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[zn,(I.arrow==="always"||p(l))&&(r.loop||p(o)<p(c).length-1)]])]),_:1})):_e("v-if",!0),J("div",{class:j(p(W)),style:mt(p(f)),onTransitionend:p(O)},[B(p(E)),xe(I.$slots,"default")],46,["onTransitionend"]),I.indicatorPosition!=="none"?(R(),G("ul",{key:2,class:j(p(L))},[(R(!0),G(ct,null,Wt(p(c),(Q,V)=>Ht((R(),G("li",{key:V,class:j([p(D).e("indicator"),p(D).em("indicator",I.direction),p(D).is("active",V===p(o))]),onMouseenter:q=>p(A)(V),onClick:Pt(q=>p(y)(V),["stop"])},[J("button",{class:j(p(D).e("button")),"aria-label":p(N)("el.carousel.indicator",{index:V+1})},[p(s)?(R(),G("span",{key:0},je(Q.props.label),1)):_e("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[zn,p(T)(V)]])),128))],2)):_e("v-if",!0),r.motionBlur?(R(),G("svg",{key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[J("defs",null,[J("filter",{id:"elCarouselHorizontal"},[J("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),J("filter",{id:"elCarouselVertical"},[J("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):_e("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var WMe=Ge(HMe,[["__file","carousel.vue"]]);const UMe=Ye({name:{type:String,default:""},label:{type:[String,Number],default:""}}),qMe=t=>{const e=ht(vW),n=en(),r=F(),i=F(!1),o=F(0),a=F(1),s=F(!1),l=F(!1),u=F(!1),c=F(!1),{isCardType:d,isVertical:f,cardScale:h}=e;function m(O,S,x){const C=x-1,E=S-1,T=S+1,P=x/2;return S===0&&O===C?-1:S===C&&O===0?x:O<E&&S-O>=P?x+1:O>T&&O-S>=P?-2:O}function g(O,S){var x,C;const E=p(f)?((x=e.root.value)==null?void 0:x.offsetHeight)||0:((C=e.root.value)==null?void 0:C.offsetWidth)||0;return u.value?E*((2-h)*(O-S)+1)/4:O<S?-(1+h)*E/4:(3+h)*E/4}function y(O,S,x){const C=e.root.value;return C?((x?C.offsetHeight:C.offsetWidth)||0)*(O-S):0}const b=(O,S,x)=>{var C;const E=p(d),T=(C=e.items.value.length)!=null?C:Number.NaN,P=O===S;!E&&!ai(x)&&(c.value=P||O===x),!P&&T>2&&e.loop&&(O=m(O,S,T));const A=p(f);s.value=P,E?(u.value=Math.round(Math.abs(O-S))<=1,o.value=g(O,S),a.value=p(s)?1:h):o.value=y(O,S,A),l.value=!0,P&&r.value&&e.setContainerHeight(r.value.offsetHeight)};function w(){if(e&&p(d)){const O=e.items.value.findIndex(({uid:S})=>S===n.uid);e.setActiveItem(O)}}return Bt(()=>{e.addItem({props:t,states:Sn({hover:i,translate:o,scale:a,active:s,ready:l,inStage:u,animating:c}),uid:n.uid,translateItem:b})}),ed(()=>{e.removeItem(n.uid)}),{carouselItemRef:r,active:s,animating:c,hover:i,inStage:u,isVertical:f,translate:o,isCardType:d,scale:a,ready:l,handleItemClick:w}},YMe=ue({name:Wk}),XMe=ue({...YMe,props:UMe,setup(t){const e=t,n=Qe("carousel"),{carouselItemRef:r,active:i,animating:o,hover:a,inStage:s,isVertical:l,translate:u,isCardType:c,scale:d,ready:f,handleItemClick:h}=qMe(e),m=M(()=>[n.e("item"),n.is("active",i.value),n.is("in-stage",s.value),n.is("hover",a.value),n.is("animating",o.value),{[n.em("item","card")]:c.value,[n.em("item","card-vertical")]:c.value&&l.value}]),g=M(()=>{const b=`${`translate${p(l)?"Y":"X"}`}(${p(u)}px)`,w=`scale(${p(d)})`;return{transform:[b,w].join(" ")}});return(y,b)=>Ht((R(),G("div",{ref_key:"carouselItemRef",ref:r,class:j(p(m)),style:mt(p(g)),onClick:p(h)},[p(c)?Ht((R(),G("div",{key:0,class:j(p(n).e("mask"))},null,2)),[[zn,!p(i)]]):_e("v-if",!0),xe(y.$slots,"default")],14,["onClick"])),[[zn,p(f)]])}});var yW=Ge(XMe,[["__file","carousel-item.vue"]]);const ZMe=Vt(WMe,{CarouselItem:yW}),GMe=ti(yW),bW={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Wi,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...wo(["ariaControls"])},_W={[Zt]:t=>At(t)||kt(t)||si(t),change:t=>At(t)||kt(t)||si(t)},qm=Symbol("checkboxGroupContextKey"),KMe=({model:t,isChecked:e})=>{const n=ht(qm,void 0),r=M(()=>{var o,a;const s=(o=n==null?void 0:n.max)==null?void 0:o.value,l=(a=n==null?void 0:n.min)==null?void 0:a.value;return!ai(s)&&t.value.length>=s&&!e.value||!ai(l)&&t.value.length<=l&&e.value});return{isDisabled:la(M(()=>(n==null?void 0:n.disabled.value)||r.value)),isLimitDisabled:r}},JMe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:r,isDisabled:i,isLabeledByFormItem:o})=>{const a=ht(qm,void 0),{formItem:s}=ua(),{emit:l}=en();function u(m){var g,y,b,w;return[!0,t.trueValue,t.trueLabel].includes(m)?(y=(g=t.trueValue)!=null?g:t.trueLabel)!=null?y:!0:(w=(b=t.falseValue)!=null?b:t.falseLabel)!=null?w:!1}function c(m,g){l("change",u(m),g)}function d(m){if(n.value)return;const g=m.target;l("change",u(g.checked),m)}async function f(m){n.value||!r.value&&!i.value&&o.value&&(m.composedPath().some(b=>b.tagName==="LABEL")||(e.value=u([!1,t.falseValue,t.falseLabel].includes(e.value)),await Ot(),c(e.value,m)))}const h=M(()=>(a==null?void 0:a.validateEvent)||t.validateEvent);return Ve(()=>t.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(m=>void 0))}),{handleChange:d,onClickRoot:f}},eRe=t=>{const e=F(!1),{emit:n}=en(),r=ht(qm,void 0),i=M(()=>ai(r)===!1),o=F(!1),a=M({get(){var s,l;return i.value?(s=r==null?void 0:r.modelValue)==null?void 0:s.value:(l=t.modelValue)!=null?l:e.value},set(s){var l,u;i.value&&ut(s)?(o.value=((l=r==null?void 0:r.max)==null?void 0:l.value)!==void 0&&s.length>(r==null?void 0:r.max.value)&&s.length>a.value.length,o.value===!1&&((u=r==null?void 0:r.changeEvent)==null||u.call(r,s))):(n(Zt,s),e.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},tRe=(t,e,{model:n})=>{const r=ht(qm,void 0),i=F(!1),o=M(()=>ep(t.value)?t.label:t.value),a=M(()=>{const c=n.value;return si(c)?c:ut(c)?sn(o.value)?c.map(Bn).some(d=>so(d,o.value)):c.map(Bn).includes(o.value):c!=null?c===t.trueValue||c===t.trueLabel:!!c}),s=Ni(M(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value}),{prop:!0}),l=Ni(M(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value})),u=M(()=>!!e.default||!ep(o.value));return{checkboxButtonSize:s,isChecked:a,isFocused:i,checkboxSize:l,hasOwnLabel:u,actualValue:o}},OW=(t,e)=>{const{formItem:n}=ua(),{model:r,isGroup:i,isLimitExceeded:o}=eRe(t),{isFocused:a,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,actualValue:d}=tRe(t,e,{model:r}),{isDisabled:f}=KMe({model:r,isChecked:s}),{inputId:h,isLabeledByFormItem:m}=gu(t,{formItemContext:n,disableIdGeneration:c,disableIdManagement:i}),{handleChange:g,onClickRoot:y}=JMe(t,{model:r,isLimitExceeded:o,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:m});return(()=>{function w(){var O,S;ut(r.value)&&!r.value.includes(d.value)?r.value.push(d.value):r.value=(S=(O=t.trueValue)!=null?O:t.trueLabel)!=null?S:!0}t.checked&&w()})(),Jd({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>i.value&&ep(t.value))),Jd({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>!!t.trueLabel)),Jd({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>!!t.falseLabel)),{inputId:h,isLabeledByFormItem:m,isChecked:s,isDisabled:f,isFocused:a,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:r,actualValue:d,handleChange:g,onClickRoot:y}},nRe=ue({name:"ElCheckbox"}),rRe=ue({...nRe,props:bW,emits:_W,setup(t){const e=t,n=Ji(),{inputId:r,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:h}=OW(e,n),m=Qe("checkbox"),g=M(()=>[m.b(),m.m(l.value),m.is("disabled",a.value),m.is("bordered",e.border),m.is("checked",o.value)]),y=M(()=>[m.e("input"),m.is("disabled",a.value),m.is("checked",o.value),m.is("indeterminate",e.indeterminate),m.is("focus",s.value)]);return(b,w)=>(R(),we(un(!p(u)&&p(i)?"span":"label"),{class:j(p(g)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:p(h)},{default:z(()=>{var O,S,x,C;return[J("span",{class:j(p(y))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?Ht((R(),G("input",{key:0,id:p(r),"onUpdate:modelValue":E=>kr(c)?c.value=E:null,class:j(p(m).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:p(a),"true-value":(S=(O=b.trueValue)!=null?O:b.trueLabel)!=null?S:!0,"false-value":(C=(x=b.falseValue)!=null?x:b.falseLabel)!=null?C:!1,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[sw,p(c)]]):Ht((R(),G("input",{key:1,id:p(r),"onUpdate:modelValue":E=>kr(c)?c.value=E:null,class:j(p(m).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:p(a),value:p(d),name:b.name,tabindex:b.tabindex,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[sw,p(c)]]),J("span",{class:j(p(m).e("inner"))},null,2)],2),p(u)?(R(),G("span",{key:0,class:j(p(m).e("label"))},[xe(b.$slots,"default"),b.$slots.default?_e("v-if",!0):(R(),G(ct,{key:0},[qe(je(b.label),1)],64))],2)):_e("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var iRe=Ge(rRe,[["__file","checkbox.vue"]]);const oRe=ue({name:"ElCheckboxButton"}),aRe=ue({...oRe,props:bW,emits:_W,setup(t){const e=t,n=Ji(),{isFocused:r,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,actualValue:l,handleChange:u}=OW(e,n),c=ht(qm,void 0),d=Qe("checkbox"),f=M(()=>{var m,g,y,b;const w=(g=(m=c==null?void 0:c.fill)==null?void 0:m.value)!=null?g:"";return{backgroundColor:w,borderColor:w,color:(b=(y=c==null?void 0:c.textColor)==null?void 0:y.value)!=null?b:"",boxShadow:w?`-1px 0 0 0 ${w}`:void 0}}),h=M(()=>[d.b("button"),d.bm("button",a.value),d.is("disabled",o.value),d.is("checked",i.value),d.is("focus",r.value)]);return(m,g)=>{var y,b,w,O;return R(),G("label",{class:j(p(h))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?Ht((R(),G("input",{key:0,"onUpdate:modelValue":S=>kr(s)?s.value=S:null,class:j(p(d).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:p(o),"true-value":(b=(y=m.trueValue)!=null?y:m.trueLabel)!=null?b:!0,"false-value":(O=(w=m.falseValue)!=null?w:m.falseLabel)!=null?O:!1,onChange:p(u),onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[sw,p(s)]]):Ht((R(),G("input",{key:1,"onUpdate:modelValue":S=>kr(s)?s.value=S:null,class:j(p(d).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:p(o),value:p(l),onChange:p(u),onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[sw,p(s)]]),m.$slots.default||m.label?(R(),G("span",{key:2,class:j(p(d).be("button","inner")),style:mt(p(i)?p(f):void 0)},[xe(m.$slots,"default",{},()=>[qe(je(m.label),1)])],6)):_e("v-if",!0)],2)}}});var wW=Ge(aRe,[["__file","checkbox-button.vue"]]);const sRe=Ye({modelValue:{type:Oe(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Wi,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),lRe={[Zt]:t=>ut(t),change:t=>ut(t)},uRe=ue({name:"ElCheckboxGroup"}),cRe=ue({...uRe,props:sRe,emits:lRe,setup(t,{emit:e}){const n=t,r=Qe("checkbox"),{formItem:i}=ua(),{inputId:o,isLabeledByFormItem:a}=gu(n,{formItemContext:i}),s=async u=>{e(Zt,u),await Ot(),e("change",u)},l=M({get(){return n.modelValue},set(u){s(u)}});return _n(qm,{...vo(Ri(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Ve(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(u=>void 0))}),(u,c)=>{var d;return R(),we(un(u.tag),{id:p(o),class:j(p(r).b("group")),role:"group","aria-label":p(a)?void 0:u.ariaLabel||"checkbox-group","aria-labelledby":p(a)?(d=p(i))==null?void 0:d.labelId:void 0},{default:z(()=>[xe(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var SW=Ge(cRe,[["__file","checkbox-group.vue"]]);const Is=Vt(iRe,{CheckboxButton:wW,CheckboxGroup:SW}),dRe=ti(wW),xW=ti(SW),CW=Ye({modelValue:{type:[String,Number,Boolean],default:void 0},size:Wi,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),fRe=Ye({...CW,border:Boolean}),EW={[Zt]:t=>At(t)||kt(t)||si(t),[Lr]:t=>At(t)||kt(t)||si(t)},TW=Symbol("radioGroupKey"),kW=(t,e)=>{const n=F(),r=ht(TW,void 0),i=M(()=>!!r),o=M(()=>ep(t.value)?t.label:t.value),a=M({get(){return i.value?r.modelValue:t.modelValue},set(d){i.value?r.changeEvent(d):e&&e(Zt,d),n.value.checked=t.modelValue===o.value}}),s=Ni(M(()=>r==null?void 0:r.size)),l=la(M(()=>r==null?void 0:r.disabled)),u=F(!1),c=M(()=>l.value||i.value&&a.value!==o.value?-1:0);return Jd({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},M(()=>i.value&&ep(t.value))),{radioRef:n,isGroup:i,radioGroup:r,focus:u,size:s,disabled:l,tabIndex:c,modelValue:a,actualValue:o}},hRe=ue({name:"ElRadio"}),pRe=ue({...hRe,props:fRe,emits:EW,setup(t,{emit:e}){const n=t,r=Qe("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:l,modelValue:u,actualValue:c}=kW(n,e);function d(){Ot(()=>e("change",u.value))}return(f,h)=>{var m;return R(),G("label",{class:j([p(r).b(),p(r).is("disabled",p(l)),p(r).is("focus",p(a)),p(r).is("bordered",f.border),p(r).is("checked",p(u)===p(c)),p(r).m(p(s))])},[J("span",{class:j([p(r).e("input"),p(r).is("disabled",p(l)),p(r).is("checked",p(u)===p(c))])},[Ht(J("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":g=>kr(u)?u.value=g:null,class:j(p(r).e("original")),value:p(c),name:f.name||((m=p(o))==null?void 0:m.name),disabled:p(l),checked:p(u)===p(c),type:"radio",onFocus:g=>a.value=!0,onBlur:g=>a.value=!1,onChange:d,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[Jz,p(u)]]),J("span",{class:j(p(r).e("inner"))},null,2)],2),J("span",{class:j(p(r).e("label")),onKeydown:Pt(()=>{},["stop"])},[xe(f.$slots,"default",{},()=>[qe(je(f.label),1)])],42,["onKeydown"])],2)}}});var gRe=Ge(pRe,[["__file","radio.vue"]]);const mRe=Ye({...CW}),vRe=ue({name:"ElRadioButton"}),yRe=ue({...vRe,props:mRe,setup(t){const e=t,n=Qe("radio"),{radioRef:r,focus:i,size:o,disabled:a,modelValue:s,radioGroup:l,actualValue:u}=kW(e),c=M(()=>({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,f)=>{var h;return R(),G("label",{class:j([p(n).b("button"),p(n).is("active",p(s)===p(u)),p(n).is("disabled",p(a)),p(n).is("focus",p(i)),p(n).bm("button",p(o))])},[Ht(J("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":m=>kr(s)?s.value=m:null,class:j(p(n).be("button","original-radio")),value:p(u),type:"radio",name:d.name||((h=p(l))==null?void 0:h.name),disabled:p(a),onFocus:m=>i.value=!0,onBlur:m=>i.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[Jz,p(s)]]),J("span",{class:j(p(n).be("button","inner")),style:mt(p(s)===p(u)?p(c):{}),onKeydown:Pt(()=>{},["stop"])},[xe(d.$slots,"default",{},()=>[qe(je(d.label),1)])],46,["onKeydown"])],2)}}});var PW=Ge(yRe,[["__file","radio-button.vue"]]);const bRe=Ye({id:{type:String,default:void 0},size:Wi,disabled:Boolean,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},...wo(["ariaLabel"])}),_Re=EW,ORe=ue({name:"ElRadioGroup"}),wRe=ue({...ORe,props:bRe,emits:_Re,setup(t,{emit:e}){const n=t,r=Qe("radio"),i=bo(),o=F(),{formItem:a}=ua(),{inputId:s,isLabeledByFormItem:l}=gu(n,{formItemContext:a}),u=d=>{e(Zt,d),Ot(()=>e("change",d))};Bt(()=>{const d=o.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(h=>h.checked)&&f&&(f.tabIndex=0)});const c=M(()=>n.name||i.value);return _n(TW,Sn({...Ri(n),changeEvent:u,name:c})),Ve(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(d=>void 0))}),(d,f)=>(R(),G("div",{id:p(s),ref_key:"radioGroupRef",ref:o,class:j(p(r).b("group")),role:"radiogroup","aria-label":p(l)?void 0:d.ariaLabel||"radio-group","aria-labelledby":p(l)?p(a).labelId:void 0},[xe(d.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var AW=Ge(wRe,[["__file","radio-group.vue"]]);const MW=Vt(gRe,{RadioButton:PW,RadioGroup:AW}),SRe=ti(AW),xRe=ti(PW);var CRe=ue({name:"NodeContent",setup(){return{ns:Qe("cascader-node")}},render(){const{ns:t}=this,{node:e,panel:n}=this.$parent,{data:r,label:i}=e,{renderLabelFn:o}=n;return Et("span",{class:t.e("label")},o?o({node:e,data:r}):i)}});const H$=Symbol(),ERe=ue({name:"ElCascaderNode",components:{ElCheckbox:Is,ElRadio:MW,NodeContent:CRe,ElIcon:gt,Check:Sb,Loading:Ku,ArrowRight:ba},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(t,{emit:e}){const n=ht(H$),r=Qe("cascader-node"),i=M(()=>n.isHoverMenu),o=M(()=>n.config.multiple),a=M(()=>n.config.checkStrictly),s=M(()=>{var C;return(C=n.checkedNodes[0])==null?void 0:C.uid}),l=M(()=>t.node.isDisabled),u=M(()=>t.node.isLeaf),c=M(()=>a.value&&!u.value||!l.value),d=M(()=>h(n.expandingNode)),f=M(()=>a.value&&n.checkedNodes.some(h)),h=C=>{var E;const{level:T,uid:P}=t.node;return((E=C==null?void 0:C.pathNodes[T-1])==null?void 0:E.uid)===P},m=()=>{d.value||n.expandNode(t.node)},g=C=>{const{node:E}=t;C!==E.checked&&n.handleCheckChange(E,C)},y=()=>{n.lazyLoad(t.node,()=>{u.value||m()})},b=C=>{!i.value||(w(),!u.value&&e("expand",C))},w=()=>{const{node:C}=t;!c.value||C.loading||(C.loaded?m():y())},O=()=>{i.value&&!u.value||(u.value&&!l.value&&!a.value&&!o.value?x(!0):w())},S=C=>{a.value?(g(C),t.node.loaded&&m()):x(C)},x=C=>{t.node.loaded?(g(C),!a.value&&m()):y()};return{panel:n,isHoverMenu:i,multiple:o,checkStrictly:a,checkedNodeId:s,isDisabled:l,isLeaf:u,expandable:c,inExpandingPath:d,inCheckedPath:f,ns:r,handleHoverExpand:b,handleExpand:w,handleClick:O,handleCheck:x,handleSelectCheck:S}}});function TRe(t,e,n,r,i,o){const a=an("el-checkbox"),s=an("el-radio"),l=an("check"),u=an("el-icon"),c=an("node-content"),d=an("loading"),f=an("arrow-right");return R(),G("li",{id:`${t.menuId}-${t.node.uid}`,role:"menuitem","aria-haspopup":!t.isLeaf,"aria-owns":t.isLeaf?null:t.menuId,"aria-expanded":t.inExpandingPath,tabindex:t.expandable?-1:void 0,class:j([t.ns.b(),t.ns.is("selectable",t.checkStrictly),t.ns.is("active",t.node.checked),t.ns.is("disabled",!t.expandable),t.inExpandingPath&&"in-active-path",t.inCheckedPath&&"in-checked-path"]),onMouseenter:t.handleHoverExpand,onFocus:t.handleHoverExpand,onClick:t.handleClick},[_e(" prefix "),t.multiple?(R(),we(a,{key:0,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:t.isDisabled,onClick:Pt(()=>{},["stop"]),"onUpdate:modelValue":t.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onClick","onUpdate:modelValue"])):t.checkStrictly?(R(),we(s,{key:1,"model-value":t.checkedNodeId,label:t.node.uid,disabled:t.isDisabled,"onUpdate:modelValue":t.handleSelectCheck,onClick:Pt(()=>{},["stop"])},{default:z(()=>[_e(`
  61. Add an empty element to avoid render label,
  62. do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
  63. `),J("span")]),_:1},8,["model-value","label","disabled","onUpdate:modelValue","onClick"])):t.isLeaf&&t.node.checked?(R(),we(u,{key:2,class:j(t.ns.e("prefix"))},{default:z(()=>[B(l)]),_:1},8,["class"])):_e("v-if",!0),_e(" content "),B(c),_e(" postfix "),t.isLeaf?_e("v-if",!0):(R(),G(ct,{key:3},[t.node.loading?(R(),we(u,{key:0,class:j([t.ns.is("loading"),t.ns.e("postfix")])},{default:z(()=>[B(d)]),_:1},8,["class"])):(R(),we(u,{key:1,class:j(["arrow-right",t.ns.e("postfix")])},{default:z(()=>[B(f)]),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex","onMouseenter","onFocus","onClick"])}var kRe=Ge(ERe,[["render",TRe],["__file","node.vue"]]);const PRe=ue({name:"ElCascaderMenu",components:{Loading:Ku,ElIcon:gt,ElScrollbar:mu,ElCascaderNode:kRe},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(t){const e=en(),n=Qe("cascader-menu"),{t:r}=kn(),i=bo();let o=null,a=null;const s=ht(H$),l=F(null),u=M(()=>!t.nodes.length),c=M(()=>!s.initialLoaded),d=M(()=>`${i.value}-${t.index}`),f=y=>{o=y.target},h=y=>{if(!(!s.isHoverMenu||!o||!l.value))if(o.contains(y.target)){m();const b=e.vnode.el,{left:w}=b.getBoundingClientRect(),{offsetWidth:O,offsetHeight:S}=b,x=y.clientX-w,C=o.offsetTop,E=C+o.offsetHeight;l.value.innerHTML=`
  64. <path style="pointer-events: auto;" fill="transparent" d="M${x} ${C} L${O} 0 V${C} Z" />
  65. <path style="pointer-events: auto;" fill="transparent" d="M${x} ${E} L${O} ${S} V${E} Z" />
  66. `}else a||(a=window.setTimeout(g,s.config.hoverThreshold))},m=()=>{!a||(clearTimeout(a),a=null)},g=()=>{!l.value||(l.value.innerHTML="",m())};return{ns:n,panel:s,hoverZone:l,isEmpty:u,isLoading:c,menuId:d,t:r,handleExpand:f,handleMouseMove:h,clearHoverZone:g}}});function ARe(t,e,n,r,i,o){const a=an("el-cascader-node"),s=an("loading"),l=an("el-icon"),u=an("el-scrollbar");return R(),we(u,{key:t.menuId,tag:"ul",role:"menu",class:j(t.ns.b()),"wrap-class":t.ns.e("wrap"),"view-class":[t.ns.e("list"),t.ns.is("empty",t.isEmpty)],onMousemove:t.handleMouseMove,onMouseleave:t.clearHoverZone},{default:z(()=>{var c;return[(R(!0),G(ct,null,Wt(t.nodes,d=>(R(),we(a,{key:d.uid,node:d,"menu-id":t.menuId,onExpand:t.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),t.isLoading?(R(),G("div",{key:0,class:j(t.ns.e("empty-text"))},[B(l,{size:"14",class:j(t.ns.is("loading"))},{default:z(()=>[B(s)]),_:1},8,["class"]),qe(" "+je(t.t("el.cascader.loading")),1)],2)):t.isEmpty?(R(),G("div",{key:1,class:j(t.ns.e("empty-text"))},[xe(t.$slots,"empty",{},()=>[qe(je(t.t("el.cascader.noData")),1)])],2)):(c=t.panel)!=null&&c.isHoverMenu?(R(),G("svg",{key:2,ref:"hoverZone",class:j(t.ns.e("hover-zone"))},null,2)):_e("v-if",!0)]}),_:3},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var MRe=Ge(PRe,[["render",ARe],["__file","menu.vue"]]);let RRe=0;const $Re=t=>{const e=[t];let{parent:n}=t;for(;n;)e.unshift(n),n=n.parent;return e};class rm{constructor(e,n,r,i=!1){this.data=e,this.config=n,this.parent=r,this.root=i,this.uid=RRe++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:o,label:a,children:s}=n,l=e[s],u=$Re(this);this.level=i?0:r?r.level+1:1,this.value=e[o],this.label=e[a],this.pathNodes=u,this.pathValues=u.map(c=>c.value),this.pathLabels=u.map(c=>c.label),this.childrenData=l,this.children=(l||[]).map(c=>new rm(c,n,this)),this.loaded=!n.lazy||this.isLeaf||!xs(l)}get isDisabled(){const{data:e,parent:n,config:r}=this,{disabled:i,checkStrictly:o}=r;return($t(i)?i(e,this):!!e[i])||!o&&(n==null?void 0:n.isDisabled)}get isLeaf(){const{data:e,config:n,childrenData:r,loaded:i}=this,{lazy:o,leaf:a}=n,s=$t(a)?a(e,this):e[a];return ai(s)?o&&!i?!1:!(Array.isArray(r)&&r.length):!!s}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:n,children:r}=this,i=new rm(e,this.config,this);return Array.isArray(n)?n.push(e):this.childrenData=[e],r.push(i),i}calcText(e,n){const r=e?this.pathLabels.join(n):this.label;return this.text=r,r}broadcast(e,...n){const r=`onParent${Du(e)}`;this.children.forEach(i=>{i&&(i.broadcast(e,...n),i[r]&&i[r](...n))})}emit(e,...n){const{parent:r}=this,i=`onChild${Du(e)}`;r&&(r[i]&&r[i](...n),r.emit(e,...n))}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,n=e.filter(i=>!i.isDisabled),r=n.length?n.every(i=>i.checked):!1;this.setCheckState(r)}setCheckState(e){const n=this.children.length,r=this.children.reduce((i,o)=>{const a=o.checked?1:o.indeterminate?.5:0;return i+a},0);this.checked=this.loaded&&this.children.filter(i=>!i.isDisabled).every(i=>i.loaded&&i.checked)&&e,this.indeterminate=this.loaded&&r!==n&&r>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:n,multiple:r}=this.config;n||!r?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check"))}}const Uk=(t,e)=>t.reduce((n,r)=>(r.isLeaf?n.push(r):(!e&&n.push(r),n=n.concat(Uk(r.children,e))),n),[]);class b8{constructor(e,n){this.config=n;const r=(e||[]).map(i=>new rm(i,this.config));this.nodes=r,this.allNodes=Uk(r,!1),this.leafNodes=Uk(r,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,n){const r=n?n.appendChild(e):new rm(e,this.config);n||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(e,n){e.forEach(r=>this.appendNode(r,n))}getNodeByValue(e,n=!1){return!e&&e!==0?null:this.getFlattedNodes(n).find(i=>so(i.value,e)||so(i.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:r,level:i})=>so(e.value,r)&&e.level===i)||null}}const RW=Ye({modelValue:{type:Oe([Number,String,Array])},options:{type:Oe(Array),default:()=>[]},props:{type:Oe(Object),default:()=>({})}}),NRe={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:yr,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},DRe=t=>M(()=>({...NRe,...t.props})),_8=t=>{if(!t)return 0;const e=t.id.split("-");return Number(e[e.length-2])},LRe=t=>{if(!t)return;const e=t.querySelector("input");e?e.click():r7(t)&&t.click()},IRe=(t,e)=>{const n=e.slice(0),r=n.map(o=>o.uid),i=t.reduce((o,a)=>{const s=r.indexOf(a.uid);return s>-1&&(o.push(a),n.splice(s,1),r.splice(s,1)),o},[]);return i.push(...n),i},BRe=ue({name:"ElCascaderPanel",components:{ElCascaderMenu:MRe},props:{...RW,border:{type:Boolean,default:!0},renderLabel:Function},emits:[Zt,Lr,"close","expand-change"],setup(t,{emit:e,slots:n}){let r=!1;const i=Qe("cascader"),o=DRe(t);let a=null;const s=F(!0),l=F([]),u=F(null),c=F([]),d=F(null),f=F([]),h=M(()=>o.value.expandTrigger==="hover"),m=M(()=>t.renderLabel||n.default),g=()=>{const{options:N}=t,$=o.value;r=!1,a=new b8(N,$),c.value=[a.getNodes()],$.lazy&&xs(t.options)?(s.value=!1,y(void 0,W=>{W&&(a=new b8(W,$),c.value=[a.getNodes()]),s.value=!0,T(!1,!0)})):T(!1,!0)},y=(N,$)=>{const W=o.value;N=N||new rm({},W,void 0,!0),N.loading=!0;const L=I=>{const U=N,Q=U.root?null:U;I&&(a==null||a.appendNodes(I,Q)),U.loading=!1,U.loaded=!0,U.childrenData=U.childrenData||[],$&&$(I)};W.lazyLoad(N,L)},b=(N,$)=>{var W;const{level:L}=N,I=c.value.slice(0,L);let U;N.isLeaf?U=N.pathNodes[L-2]:(U=N,I.push(N.children)),((W=d.value)==null?void 0:W.uid)!==(U==null?void 0:U.uid)&&(d.value=N,c.value=I,!$&&e("expand-change",(N==null?void 0:N.pathValues)||[]))},w=(N,$,W=!0)=>{const{checkStrictly:L,multiple:I}=o.value,U=f.value[0];r=!0,!I&&(U==null||U.doCheck(!1)),N.doCheck($),E(),W&&!I&&!L&&e("close"),!W&&!I&&!L&&O(N)},O=N=>{!N||(N=N.parent,O(N),N&&b(N))},S=N=>a==null?void 0:a.getFlattedNodes(N),x=N=>{var $;return($=S(N))==null?void 0:$.filter(W=>W.checked!==!1)},C=()=>{f.value.forEach(N=>N.doCheck(!1)),E(),c.value=c.value.slice(0,1),d.value=null,e("expand-change",[])},E=()=>{var N;const{checkStrictly:$,multiple:W}=o.value,L=f.value,I=x(!$),U=IRe(L,I),Q=U.map(V=>V.valueByOption);f.value=U,u.value=W?Q:(N=Q[0])!=null?N:null},T=(N=!1,$=!1)=>{const{modelValue:W}=t,{lazy:L,multiple:I,checkStrictly:U}=o.value,Q=!U;if(!(!s.value||r||!$&&so(W,u.value)))if(L&&!N){const q=_5(U9(ya(W))).map(K=>a==null?void 0:a.getNodeByValue(K)).filter(K=>!!K&&!K.loaded&&!K.loading);q.length?q.forEach(K=>{y(K,()=>T(!1,$))}):T(!0,$)}else{const V=I?ya(W):[W],q=_5(V.map(K=>a==null?void 0:a.getNodeByValue(K,Q)));P(q,$),u.value=Fn(W)}},P=(N,$=!0)=>{const{checkStrictly:W}=o.value,L=f.value,I=N.filter(V=>!!V&&(W||V.isLeaf)),U=a==null?void 0:a.getSameNode(d.value),Q=$&&U||I[0];Q?Q.pathNodes.forEach(V=>b(V,!0)):d.value=null,L.forEach(V=>V.doCheck(!1)),Sn(I).forEach(V=>V.doCheck(!0)),f.value=I,Ot(A)},A=()=>{!Tn||l.value.forEach(N=>{const $=N==null?void 0:N.$el;if($){const W=$.querySelector(`.${i.namespace.value}-scrollbar__wrap`),L=$.querySelector(`.${i.b("node")}.${i.is("active")}`)||$.querySelector(`.${i.b("node")}.in-active-path`);i$(W,L)}})},D=N=>{const $=N.target,{code:W}=N;switch(W){case St.up:case St.down:{N.preventDefault();const L=W===St.up?-1:1;p1(i7($,L,`.${i.b("node")}[tabindex="-1"]`));break}case St.left:{N.preventDefault();const L=l.value[_8($)-1],I=L==null?void 0:L.$el.querySelector(`.${i.b("node")}[aria-expanded="true"]`);p1(I);break}case St.right:{N.preventDefault();const L=l.value[_8($)+1],I=L==null?void 0:L.$el.querySelector(`.${i.b("node")}[tabindex="-1"]`);p1(I);break}case St.enter:LRe($);break}};return _n(H$,Sn({config:o,expandingNode:d,checkedNodes:f,isHoverMenu:h,initialLoaded:s,renderLabelFn:m,lazyLoad:y,expandNode:b,handleCheckChange:w})),Ve([o,()=>t.options],g,{deep:!0,immediate:!0}),Ve(()=>t.modelValue,()=>{r=!1,T()},{deep:!0}),Ve(()=>u.value,N=>{so(N,t.modelValue)||(e(Zt,N),e(Lr,N))}),kz(()=>l.value=[]),Bt(()=>!xs(t.modelValue)&&T()),{ns:i,menuList:l,menus:c,checkedNodes:f,handleKeyDown:D,handleCheckChange:w,getFlattedNodes:S,getCheckedNodes:x,clearCheckedNodes:C,calculateCheckedValue:E,scrollToExpandingNode:A}}});function FRe(t,e,n,r,i,o){const a=an("el-cascader-menu");return R(),G("div",{class:j([t.ns.b("panel"),t.ns.is("bordered",t.border)]),onKeydown:t.handleKeyDown},[(R(!0),G(ct,null,Wt(t.menus,(s,l)=>(R(),we(a,{key:l,ref_for:!0,ref:u=>t.menuList[l]=u,index:l,nodes:[...s]},{empty:z(()=>[xe(t.$slots,"empty")]),_:2},1032,["index","nodes"]))),128))],42,["onKeydown"])}var VRe=Ge(BRe,[["render",FRe],["__file","index.vue"]]);const $W=Vt(VRe),ip=Ye({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:cc},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),jRe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},zRe=ue({name:"ElTag"}),QRe=ue({...zRe,props:ip,emits:jRe,setup(t,{emit:e}){const n=t,r=Ni(),i=Qe("tag"),o=M(()=>{const{type:u,hit:c,effect:d,closable:f,round:h}=n;return[i.b(),i.is("closable",f),i.m(u||"primary"),i.m(r.value),i.m(d),i.is("hit",c),i.is("round",h)]}),a=u=>{e("close",u)},s=u=>{e("click",u)},l=u=>{u.component.subTree.component.bum=null};return(u,c)=>u.disableTransitions?(R(),G("span",{key:0,class:j(p(o)),style:mt({backgroundColor:u.color}),onClick:s},[J("span",{class:j(p(i).e("content"))},[xe(u.$slots,"default")],2),u.closable?(R(),we(p(gt),{key:0,class:j(p(i).e("close")),onClick:Pt(a,["stop"])},{default:z(()=>[B(p(_a))]),_:1},8,["class","onClick"])):_e("v-if",!0)],6)):(R(),we(Qi,{key:1,name:`${p(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:z(()=>[J("span",{class:j(p(o)),style:mt({backgroundColor:u.color}),onClick:s},[J("span",{class:j(p(i).e("content"))},[xe(u.$slots,"default")],2),u.closable?(R(),we(p(gt),{key:0,class:j(p(i).e("close")),onClick:Pt(a,["stop"])},{default:z(()=>[B(p(_a))]),_:1},8,["class","onClick"])):_e("v-if",!0)],6)]),_:3},8,["name"]))}});var HRe=Ge(QRe,[["__file","tag.vue"]]);const Bs=Vt(HRe),WRe=Ye({...RW,size:Wi,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:Oe(Function),default:(t,e)=>t.text.includes(e)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:Oe(Function),default:()=>!0},placement:{type:Oe(String),values:ud,default:"bottom-start"},fallbackPlacements:{type:Oe(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:{type:String,default:""},teleported:io.teleported,tagType:{...ip.type,default:"info"},tagEffect:{...ip.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Wm}),URe={[Zt]:t=>!0,[Lr]:t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,visibleChange:t=>si(t),expandChange:t=>!!t,removeTag:t=>!!t},qRe="ElCascader",YRe=ue({name:qRe}),XRe=ue({...YRe,props:WRe,emits:URe,setup(t,{expose:e,emit:n}){const r=t,i={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:de})=>{const{modifiersData:Pe,placement:Le}=de;["right","left","bottom","top"].includes(Le)||(Pe.arrow.x=35)},requires:["arrow"]}]},o=mp();let a=0,s=0;const l=Qe("cascader"),u=Qe("input"),{t:c}=kn(),{form:d,formItem:f}=ua(),{valueOnClear:h}=Hx(r),{isComposing:m,handleComposition:g}=Qx({afterComposition(de){var Pe;const Le=(Pe=de.target)==null?void 0:Pe.value;Me(Le)}}),y=F(null),b=F(null),w=F(null),O=F(null),S=F(null),x=F(!1),C=F(!1),E=F(!1),T=F(!1),P=F(""),A=F(""),D=F([]),N=F([]),$=F([]),W=M(()=>o.style),L=M(()=>r.disabled||(d==null?void 0:d.disabled)),I=M(()=>r.placeholder||c("el.cascader.placeholder")),U=M(()=>A.value||D.value.length>0||m.value?"":I.value),Q=Ni(),V=M(()=>["small"].includes(Q.value)?"small":"default"),q=M(()=>!!r.props.multiple),K=M(()=>!r.filterable||q.value),ie=M(()=>q.value?A.value:P.value),oe=M(()=>{var de;return((de=O.value)==null?void 0:de.checkedNodes)||[]}),Se=M(()=>!r.clearable||L.value||E.value||!C.value?!1:!!oe.value.length),ke=M(()=>{const{showAllLevels:de,separator:Pe}=r,Le=oe.value;return Le.length?q.value?"":Le[0].calcText(de,Pe):""}),Y=M(()=>(f==null?void 0:f.validateState)||""),re=M({get(){return Fn(r.modelValue)},set(de){const Pe=de!=null?de:h.value;n(Zt,Pe),n(Lr,Pe),r.validateEvent&&(f==null||f.validate("change").catch(Le=>void 0))}}),te=M(()=>[l.b(),l.m(Q.value),l.is("disabled",L.value),o.class]),ge=M(()=>[u.e("icon"),"icon-arrow-down",l.is("reverse",x.value)]),Re=M(()=>l.is("focus",x.value||T.value)),$e=M(()=>{var de,Pe;return(Pe=(de=y.value)==null?void 0:de.popperRef)==null?void 0:Pe.contentRef}),Z=de=>{var Pe,Le,wt;L.value||(de=de!=null?de:!x.value,de!==x.value&&(x.value=de,(Le=(Pe=b.value)==null?void 0:Pe.input)==null||Le.setAttribute("aria-expanded",`${de}`),de?(ce(),Ot((wt=O.value)==null?void 0:wt.scrollToExpandingNode)):r.filterable&&be(),n("visibleChange",de)))},ce=()=>{Ot(()=>{var de;(de=y.value)==null||de.updatePopper()})},Te=()=>{E.value=!1},Ie=de=>{const{showAllLevels:Pe,separator:Le}=r;return{node:de,key:de.uid,text:de.calcText(Pe,Le),hitState:!1,closable:!L.value&&!de.isDisabled,isCollapseTag:!1}},ae=de=>{var Pe;const Le=de.node;Le.doCheck(!1),(Pe=O.value)==null||Pe.calculateCheckedValue(),n("removeTag",Le.valueByOption)},me=()=>{if(!q.value)return;const de=oe.value,Pe=[],Le=[];if(de.forEach(wt=>Le.push(Ie(wt))),N.value=Le,de.length){de.slice(0,r.maxCollapseTags).forEach(De=>Pe.push(Ie(De)));const wt=de.slice(r.maxCollapseTags),tn=wt.length;tn&&(r.collapseTags?Pe.push({key:-1,text:`+ ${tn}`,closable:!1,isCollapseTag:!0}):wt.forEach(De=>Pe.push(Ie(De))))}D.value=Pe},Ae=()=>{var de,Pe;const{filterMethod:Le,showAllLevels:wt,separator:tn}=r,De=(Pe=(de=O.value)==null?void 0:de.getFlattedNodes(!r.props.checkStrictly))==null?void 0:Pe.filter(xt=>xt.isDisabled?!1:(xt.calcText(wt,tn),Le(xt,ie.value)));q.value&&(D.value.forEach(xt=>{xt.hitState=!1}),N.value.forEach(xt=>{xt.hitState=!1})),E.value=!0,$.value=De,ce()},X=()=>{var de;let Pe;E.value&&S.value?Pe=S.value.$el.querySelector(`.${l.e("suggestion-item")}`):Pe=(de=O.value)==null?void 0:de.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`),Pe&&(Pe.focus(),!E.value&&Pe.click())},ee=()=>{var de,Pe;const Le=(de=b.value)==null?void 0:de.input,wt=w.value,tn=(Pe=S.value)==null?void 0:Pe.$el;if(!(!Tn||!Le)){if(tn){const De=tn.querySelector(`.${l.e("suggestion-list")}`);De.style.minWidth=`${Le.offsetWidth}px`}if(wt){const{offsetHeight:De}=wt,xt=D.value.length>0?`${Math.max(De+6,a)}px`:`${a}px`;Le.style.height=xt,ce()}}},le=de=>{var Pe;return(Pe=O.value)==null?void 0:Pe.getCheckedNodes(de)},Ce=de=>{ce(),n("expandChange",de)},fe=de=>{if(!m.value)switch(de.code){case St.enter:Z();break;case St.down:Z(!0),Ot(X),de.preventDefault();break;case St.esc:x.value===!0&&(de.preventDefault(),de.stopPropagation(),Z(!1));break;case St.tab:Z(!1);break}},Ee=()=>{var de;(de=O.value)==null||de.clearCheckedNodes(),!x.value&&r.filterable&&be(),Z(!1),n("clear")},be=()=>{const{value:de}=ke;P.value=de,A.value=de},Be=de=>{var Pe,Le;const{checked:wt}=de;q.value?(Pe=O.value)==null||Pe.handleCheckChange(de,!wt,!1):(!wt&&((Le=O.value)==null||Le.handleCheckChange(de,!0,!1)),Z(!1))},Xe=de=>{const Pe=de.target,{code:Le}=de;switch(Le){case St.up:case St.down:{const wt=Le===St.up?-1:1;p1(i7(Pe,wt,`.${l.e("suggestion-item")}[tabindex="-1"]`));break}case St.enter:Pe.click();break}},Ke=()=>{const de=D.value,Pe=de[de.length-1];s=A.value?0:s+1,!(!Pe||!s||r.collapseTags&&de.length>1)&&(Pe.hitState?ae(Pe):Pe.hitState=!0)},tt=de=>{const Pe=de.target,Le=l.e("search-input");Pe.className===Le&&(T.value=!0),n("focus",de)},Dt=de=>{T.value=!1,n("blur",de)},jt=jo(()=>{const{value:de}=ie;if(!de)return;const Pe=r.beforeFilter(de);Jy(Pe)?Pe.then(Ae).catch(()=>{}):Pe!==!1?Ae():Te()},r.debounce),Me=(de,Pe)=>{!x.value&&Z(!0),!(Pe!=null&&Pe.isComposing)&&(de?jt():Te())},nt=de=>Number.parseFloat(Uue(u.cssVarName("input-height"),de).value)-2;return Ve(E,ce),Ve([oe,L,()=>r.collapseTags],me),Ve(D,()=>{Ot(()=>ee())}),Ve(Q,async()=>{await Ot();const de=b.value.input;a=nt(de)||a,ee()}),Ve(ke,be,{immediate:!0}),Bt(()=>{const de=b.value.input,Pe=nt(de);a=de.offsetHeight||Pe,Zr(de,ee)}),e({getCheckedNodes:le,cascaderPanelRef:O,togglePopperVisible:Z,contentRef:$e,presentText:ke}),(de,Pe)=>(R(),we(p(Ui),{ref_key:"tooltipRef",ref:y,visible:x.value,teleported:de.teleported,"popper-class":[p(l).e("dropdown"),de.popperClass],"popper-options":i,"fallback-placements":de.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:de.placement,transition:`${p(l).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:de.persistent,onHide:Te},{default:z(()=>[Ht((R(),G("div",{class:j(p(te)),style:mt(p(W)),onClick:()=>Z(p(K)?void 0:!0),onKeydown:fe,onMouseenter:Le=>C.value=!0,onMouseleave:Le=>C.value=!1},[B(p(hi),{ref_key:"input",ref:b,modelValue:P.value,"onUpdate:modelValue":Le=>P.value=Le,placeholder:p(U),readonly:p(K),disabled:p(L),"validate-event":!1,size:p(Q),class:j(p(Re)),tabindex:p(q)&&de.filterable&&!p(L)?-1:void 0,onCompositionstart:p(g),onCompositionupdate:p(g),onCompositionend:p(g),onFocus:tt,onBlur:Dt,onInput:Me},{suffix:z(()=>[p(Se)?(R(),we(p(gt),{key:"clear",class:j([p(u).e("icon"),"icon-circle-close"]),onClick:Pt(Ee,["stop"])},{default:z(()=>[B(p(Bf))]),_:1},8,["class","onClick"])):(R(),we(p(gt),{key:"arrow-down",class:j(p(ge)),onClick:Pt(Le=>Z(),["stop"])},{default:z(()=>[B(p(ld))]),_:1},8,["class","onClick"]))]),_:1},8,["modelValue","onUpdate:modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),p(q)?(R(),G("div",{key:0,ref_key:"tagWrapper",ref:w,class:j([p(l).e("tags"),p(l).is("validate",Boolean(p(Y)))])},[(R(!0),G(ct,null,Wt(D.value,Le=>(R(),we(p(Bs),{key:Le.key,type:de.tagType,size:p(V),effect:de.tagEffect,hit:Le.hitState,closable:Le.closable,"disable-transitions":"",onClose:wt=>ae(Le)},{default:z(()=>[Le.isCollapseTag===!1?(R(),G("span",{key:0},je(Le.text),1)):(R(),we(p(Ui),{key:1,disabled:x.value||!de.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:z(()=>[J("span",null,je(Le.text),1)]),content:z(()=>[J("div",{class:j(p(l).e("collapse-tags"))},[(R(!0),G(ct,null,Wt(N.value.slice(de.maxCollapseTags),(wt,tn)=>(R(),G("div",{key:tn,class:j(p(l).e("collapse-tag"))},[(R(),we(p(Bs),{key:wt.key,class:"in-tooltip",type:de.tagType,size:p(V),effect:de.tagEffect,hit:wt.hitState,closable:wt.closable,"disable-transitions":"",onClose:De=>ae(wt)},{default:z(()=>[J("span",null,je(wt.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128)),de.filterable&&!p(L)?Ht((R(),G("input",{key:0,"onUpdate:modelValue":Le=>A.value=Le,type:"text",class:j(p(l).e("search-input")),placeholder:p(ke)?"":p(I),onInput:Le=>Me(A.value,Le),onClick:Pt(Le=>Z(!0),["stop"]),onKeydown:br(Ke,["delete"]),onCompositionstart:p(g),onCompositionupdate:p(g),onCompositionend:p(g),onFocus:tt,onBlur:Dt},null,42,["onUpdate:modelValue","placeholder","onInput","onClick","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend"])),[[JM,A.value]]):_e("v-if",!0)],2)):_e("v-if",!0)],46,["onClick","onMouseenter","onMouseleave"])),[[p(qc),()=>Z(!1),p($e)]])]),content:z(()=>[Ht(B(p($W),{ref_key:"cascaderPanelRef",ref:O,modelValue:p(re),"onUpdate:modelValue":Le=>kr(re)?re.value=Le:null,options:de.options,props:r.props,border:!1,"render-label":de.$slots.default,onExpandChange:Ce,onClose:Le=>de.$nextTick(()=>Z(!1))},{empty:z(()=>[xe(de.$slots,"empty")]),_:3},8,["modelValue","onUpdate:modelValue","options","props","render-label","onClose"]),[[zn,!E.value]]),de.filterable?Ht((R(),we(p(mu),{key:0,ref_key:"suggestionPanel",ref:S,tag:"ul",class:j(p(l).e("suggestion-panel")),"view-class":p(l).e("suggestion-list"),onKeydown:Xe},{default:z(()=>[$.value.length?(R(!0),G(ct,{key:0},Wt($.value,Le=>(R(),G("li",{key:Le.uid,class:j([p(l).e("suggestion-item"),p(l).is("checked",Le.checked)]),tabindex:-1,onClick:wt=>Be(Le)},[J("span",null,je(Le.text),1),Le.checked?(R(),we(p(gt),{key:0},{default:z(()=>[B(p(Sb))]),_:1})):_e("v-if",!0)],10,["onClick"]))),128)):xe(de.$slots,"empty",{key:1},()=>[J("li",{class:j(p(l).e("empty-text"))},je(p(c)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[zn,E.value]]):_e("v-if",!0)]),_:3},8,["visible","teleported","popper-class","fallback-placements","placement","transition","persistent"]))}});var ZRe=Ge(XRe,[["__file","cascader.vue"]]);const GRe=Vt(ZRe),KRe=Ye({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),JRe={"update:checked":t=>si(t),[Lr]:t=>si(t)},e$e=ue({name:"ElCheckTag"}),t$e=ue({...e$e,props:KRe,emits:JRe,setup(t,{emit:e}){const n=t,r=Qe("check-tag"),i=M(()=>n.disabled),o=M(()=>[r.b(),r.is("checked",n.checked),r.is("disabled",i.value),r.m(n.type||"primary")]),a=()=>{if(i.value)return;const s=!n.checked;e(Lr,s),e("update:checked",s)};return(s,l)=>(R(),G("span",{class:j(p(o)),onClick:a},[xe(s.$slots,"default")],2))}});var n$e=Ge(t$e,[["__file","check-tag.vue"]]);const r$e=Vt(n$e),NW=Symbol("rowContextKey"),i$e=["start","center","end","space-around","space-between","space-evenly"],o$e=["top","middle","bottom"],a$e=Ye({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:i$e,default:"start"},align:{type:String,values:o$e}}),s$e=ue({name:"ElRow"}),l$e=ue({...s$e,props:a$e,setup(t){const e=t,n=Qe("row"),r=M(()=>e.gutter);_n(NW,{gutter:r});const i=M(()=>{const a={};return e.gutter&&(a.marginRight=a.marginLeft=`-${e.gutter/2}px`),a}),o=M(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(a,s)=>(R(),we(un(a.tag),{class:j(p(o)),style:mt(p(i))},{default:z(()=>[xe(a.$slots,"default")]),_:3},8,["class","style"]))}});var u$e=Ge(l$e,[["__file","row.vue"]]);const fo=Vt(u$e),c$e=Ye({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:Oe([Number,Object]),default:()=>Jr({})},sm:{type:Oe([Number,Object]),default:()=>Jr({})},md:{type:Oe([Number,Object]),default:()=>Jr({})},lg:{type:Oe([Number,Object]),default:()=>Jr({})},xl:{type:Oe([Number,Object]),default:()=>Jr({})}}),d$e=ue({name:"ElCol"}),f$e=ue({...d$e,props:c$e,setup(t){const e=t,{gutter:n}=ht(NW,{gutter:M(()=>0)}),r=Qe("col"),i=M(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=`${n.value/2}px`),a}),o=M(()=>{const a=[];return["span","offset","pull","push"].forEach(u=>{const c=e[u];kt(c)&&(u==="span"?a.push(r.b(`${e[u]}`)):c>0&&a.push(r.b(`${u}-${e[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{kt(e[u])?a.push(r.b(`${u}-${e[u]}`)):sn(e[u])&&Object.entries(e[u]).forEach(([c,d])=>{a.push(c!=="span"?r.b(`${u}-${c}-${d}`):r.b(`${u}-${d}`))})}),n.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,s)=>(R(),we(un(a.tag),{class:j(p(o)),style:mt(p(i))},{default:z(()=>[xe(a.$slots,"default")]),_:3},8,["class","style"]))}});var h$e=Ge(f$e,[["__file","col.vue"]]);const ho=Vt(h$e),O8=t=>kt(t)||At(t)||ut(t),p$e=Ye({accordion:Boolean,modelValue:{type:Oe([Array,String,Number]),default:()=>Jr([])}}),g$e={[Zt]:O8,[Lr]:O8},DW=Symbol("collapseContextKey"),m$e=(t,e)=>{const n=F($o(t.modelValue)),r=o=>{n.value=o;const a=t.accordion?n.value[0]:n.value;e(Zt,a),e(Lr,a)},i=o=>{if(t.accordion)r([n.value[0]===o?"":o]);else{const a=[...n.value],s=a.indexOf(o);s>-1?a.splice(s,1):a.push(o),r(a)}};return Ve(()=>t.modelValue,()=>n.value=$o(t.modelValue),{deep:!0}),_n(DW,{activeNames:n,handleItemClick:i}),{activeNames:n,setActiveNames:r}},v$e=()=>{const t=Qe("collapse");return{rootKls:M(()=>t.b())}},y$e=ue({name:"ElCollapse"}),b$e=ue({...y$e,props:p$e,emits:g$e,setup(t,{expose:e,emit:n}){const r=t,{activeNames:i,setActiveNames:o}=m$e(r,n),{rootKls:a}=v$e();return e({activeNames:i,setActiveNames:o}),(s,l)=>(R(),G("div",{class:j(p(a))},[xe(s.$slots,"default")],2))}});var _$e=Ge(b$e,[["__file","collapse.vue"]]);const O$e=ue({name:"ElCollapseTransition"}),w$e=ue({...O$e,setup(t){const e=Qe("collapse-transition"),n=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},r={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){n(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){n(i)},leaveCancelled(i){n(i)}};return(i,o)=>(R(),we(Qi,gn({name:p(e).b()},gle(r)),{default:z(()=>[xe(i.$slots,"default")]),_:3},16,["name"]))}});var S$e=Ge(w$e,[["__file","collapse-transition.vue"]]);const Xx=Vt(S$e),x$e=Ye({title:{type:String,default:""},name:{type:Oe([String,Number]),default:void 0},icon:{type:fr,default:ba},disabled:Boolean}),C$e=t=>{const e=ht(DW),{namespace:n}=Qe("collapse"),r=F(!1),i=F(!1),o=T$(),a=M(()=>o.current++),s=M(()=>{var f;return(f=t.name)!=null?f:`${n.value}-id-${o.prefix}-${p(a)}`}),l=M(()=>e==null?void 0:e.activeNames.value.includes(p(s)));return{focusing:r,id:a,isActive:l,handleFocus:()=>{setTimeout(()=>{i.value?i.value=!1:r.value=!0},50)},handleHeaderClick:()=>{t.disabled||(e==null||e.handleItemClick(p(s)),r.value=!1,i.value=!0)},handleEnterClick:()=>{e==null||e.handleItemClick(p(s))}}},E$e=(t,{focusing:e,isActive:n,id:r})=>{const i=Qe("collapse"),o=M(()=>[i.b("item"),i.is("active",p(n)),i.is("disabled",t.disabled)]),a=M(()=>[i.be("item","header"),i.is("active",p(n)),{focusing:p(e)&&!t.disabled}]),s=M(()=>[i.be("item","arrow"),i.is("active",p(n))]),l=M(()=>i.be("item","wrap")),u=M(()=>i.be("item","content")),c=M(()=>i.b(`content-${p(r)}`)),d=M(()=>i.b(`head-${p(r)}`));return{arrowKls:s,headKls:a,rootKls:o,itemWrapperKls:l,itemContentKls:u,scopedContentId:c,scopedHeadId:d}},T$e=ue({name:"ElCollapseItem"}),k$e=ue({...T$e,props:x$e,setup(t,{expose:e}){const n=t,{focusing:r,id:i,isActive:o,handleFocus:a,handleHeaderClick:s,handleEnterClick:l}=C$e(n),{arrowKls:u,headKls:c,rootKls:d,itemWrapperKls:f,itemContentKls:h,scopedContentId:m,scopedHeadId:g}=E$e(n,{focusing:r,isActive:o,id:i});return e({isActive:o}),(y,b)=>(R(),G("div",{class:j(p(d))},[J("button",{id:p(g),class:j(p(c)),"aria-expanded":p(o),"aria-controls":p(m),"aria-describedby":p(m),tabindex:y.disabled?-1:0,type:"button",onClick:p(s),onKeydown:br(Pt(p(l),["stop","prevent"]),["space","enter"]),onFocus:p(a),onBlur:w=>r.value=!1},[xe(y.$slots,"title",{},()=>[qe(je(y.title),1)]),xe(y.$slots,"icon",{isActive:p(o)},()=>[B(p(gt),{class:j(p(u))},{default:z(()=>[(R(),we(un(y.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),B(p(Xx),null,{default:z(()=>[Ht(J("div",{id:p(m),role:"region",class:j(p(f)),"aria-hidden":!p(o),"aria-labelledby":p(g)},[J("div",{class:j(p(h))},[xe(y.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[zn,p(o)]])]),_:3})],2))}});var LW=Ge(k$e,[["__file","collapse-item.vue"]]);const Zx=Vt(_$e,{CollapseItem:LW}),Gx=ti(LW),P$e=Ye({color:{type:Oe(Object),required:!0},vertical:{type:Boolean,default:!1}});let TT=!1;function y0(t,e){if(!Tn)return;const n=function(o){var a;(a=e.drag)==null||a.call(e,o)},r=function(o){var a;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,TT=!1,(a=e.end)==null||a.call(e,o)},i=function(o){var a;TT||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",r),document.addEventListener("touchmove",n),document.addEventListener("touchend",r),TT=!0,(a=e.start)==null||a.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!1})}const A$e=t=>{const e=en(),{t:n}=kn(),r=Tr(),i=Tr(),o=M(()=>t.color.get("alpha")),a=M(()=>n("el.colorpicker.alphaLabel"));function s(d){var f;d.target!==r.value&&l(d),(f=r.value)==null||f.focus()}function l(d){if(!i.value||!r.value)return;const h=e.vnode.el.getBoundingClientRect(),{clientX:m,clientY:g}=rR(d);if(t.vertical){let y=g-h.top;y=Math.max(r.value.offsetHeight/2,y),y=Math.min(y,h.height-r.value.offsetHeight/2),t.color.set("alpha",Math.round((y-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let y=m-h.left;y=Math.max(r.value.offsetWidth/2,y),y=Math.min(y,h.width-r.value.offsetWidth/2),t.color.set("alpha",Math.round((y-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}function u(d){const{code:f,shiftKey:h}=d,m=h?10:1;switch(f){case St.left:case St.down:d.preventDefault(),d.stopPropagation(),c(-m);break;case St.right:case St.up:d.preventDefault(),d.stopPropagation(),c(m);break}}function c(d){let f=o.value+d;f=f<0?0:f>100?100:f,t.color.set("alpha",f)}return{thumb:r,bar:i,alpha:o,alphaLabel:a,handleDrag:l,handleClick:s,handleKeydown:u}},M$e=(t,{bar:e,thumb:n,handleDrag:r})=>{const i=en(),o=Qe("color-alpha-slider"),a=F(0),s=F(0),l=F();function u(){if(!n.value||t.vertical)return 0;const w=i.vnode.el,O=t.color.get("alpha");return w?Math.round(O*(w.offsetWidth-n.value.offsetWidth/2)/100):0}function c(){if(!n.value)return 0;const w=i.vnode.el;if(!t.vertical)return 0;const O=t.color.get("alpha");return w?Math.round(O*(w.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(t.color&&t.color.value){const{r:w,g:O,b:S}=t.color.toRgb();return`linear-gradient(to right, rgba(${w}, ${O}, ${S}, 0) 0%, rgba(${w}, ${O}, ${S}, 1) 100%)`}return""}function f(){a.value=u(),s.value=c(),l.value=d()}Bt(()=>{if(!e.value||!n.value)return;const w={drag:O=>{r(O)},end:O=>{r(O)}};y0(e.value,w),y0(n.value,w),f()}),Ve(()=>t.color.get("alpha"),()=>f()),Ve(()=>t.color.value,()=>f());const h=M(()=>[o.b(),o.is("vertical",t.vertical)]),m=M(()=>o.e("bar")),g=M(()=>o.e("thumb")),y=M(()=>({background:l.value})),b=M(()=>({left:pi(a.value),top:pi(s.value)}));return{rootKls:h,barKls:m,barStyle:y,thumbKls:g,thumbStyle:b,update:f}},R$e="ElColorAlphaSlider",$$e=ue({name:R$e}),N$e=ue({...$$e,props:P$e,setup(t,{expose:e}){const n=t,{alpha:r,alphaLabel:i,bar:o,thumb:a,handleDrag:s,handleClick:l,handleKeydown:u}=A$e(n),{rootKls:c,barKls:d,barStyle:f,thumbKls:h,thumbStyle:m,update:g}=M$e(n,{bar:o,thumb:a,handleDrag:s});return e({update:g,bar:o,thumb:a}),(y,b)=>(R(),G("div",{class:j(p(c))},[J("div",{ref_key:"bar",ref:o,class:j(p(d)),style:mt(p(f)),onClick:p(l)},null,14,["onClick"]),J("div",{ref_key:"thumb",ref:a,class:j(p(h)),style:mt(p(m)),"aria-label":p(i),"aria-valuenow":p(r),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:p(u)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var D$e=Ge(N$e,[["__file","alpha-slider.vue"]]);const L$e=ue({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=Qe("color-hue-slider"),n=en(),r=F(),i=F(),o=F(0),a=F(0),s=M(()=>t.color.get("hue"));Ve(()=>s.value,()=>{f()});function l(h){h.target!==r.value&&u(h)}function u(h){if(!i.value||!r.value)return;const g=n.vnode.el.getBoundingClientRect(),{clientX:y,clientY:b}=rR(h);let w;if(t.vertical){let O=b-g.top;O=Math.min(O,g.height-r.value.offsetHeight/2),O=Math.max(r.value.offsetHeight/2,O),w=Math.round((O-r.value.offsetHeight/2)/(g.height-r.value.offsetHeight)*360)}else{let O=y-g.left;O=Math.min(O,g.width-r.value.offsetWidth/2),O=Math.max(r.value.offsetWidth/2,O),w=Math.round((O-r.value.offsetWidth/2)/(g.width-r.value.offsetWidth)*360)}t.color.set("hue",w)}function c(){if(!r.value)return 0;const h=n.vnode.el;if(t.vertical)return 0;const m=t.color.get("hue");return h?Math.round(m*(h.offsetWidth-r.value.offsetWidth/2)/360):0}function d(){if(!r.value)return 0;const h=n.vnode.el;if(!t.vertical)return 0;const m=t.color.get("hue");return h?Math.round(m*(h.offsetHeight-r.value.offsetHeight/2)/360):0}function f(){o.value=c(),a.value=d()}return Bt(()=>{if(!i.value||!r.value)return;const h={drag:m=>{u(m)},end:m=>{u(m)}};y0(i.value,h),y0(r.value,h),f()}),{bar:i,thumb:r,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:l,update:f,ns:e}}});function I$e(t,e,n,r,i,o){return R(),G("div",{class:j([t.ns.b(),t.ns.is("vertical",t.vertical)])},[J("div",{ref:"bar",class:j(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),J("div",{ref:"thumb",class:j(t.ns.e("thumb")),style:mt({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var B$e=Ge(L$e,[["render",I$e],["__file","hue-slider.vue"]]);const F$e=Ye({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Wi,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:io.teleported,predefine:{type:Oe(Array)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),V$e={[Zt]:t=>At(t)||Dr(t),[Lr]:t=>At(t)||Dr(t),activeChange:t=>At(t)||Dr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},IW=Symbol("colorPickerContextKey"),w8=function(t,e,n){return[t,e*n/((t=(2-e)*n)<1?t:2-t)||0,t/2]},j$e=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},z$e=function(t){return typeof t=="string"&&t.includes("%")},Mg=function(t,e){j$e(t)&&(t="100%");const n=z$e(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),n&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},S8={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},C1=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),n=t%16;return`${S8[e]||e}${S8[n]||n}`},x8=function({r:t,g:e,b:n}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+n)?"":`#${C1(t)}${C1(e)}${C1(n)}`},kT={A:10,B:11,C:12,D:13,E:14,F:15},lh=function(t){return t.length===2?(kT[t[0].toUpperCase()]||+t[0])*16+(kT[t[1].toUpperCase()]||+t[1]):kT[t[1].toUpperCase()]||+t[1]},Q$e=function(t,e,n){e=e/100,n=n/100;let r=e;const i=Math.max(n,.01);n*=2,e*=n<=1?n:2-n,r*=i<=1?i:2-i;const o=(n+e)/2,a=n===0?2*r/(i+r):2*e/(n+e);return{h:t,s:a*100,v:o*100}},C8=(t,e,n)=>{t=Mg(t,255),e=Mg(e,255),n=Mg(n,255);const r=Math.max(t,e,n),i=Math.min(t,e,n);let o;const a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:{o=(e-n)/s+(e<n?6:0);break}case e:{o=(n-t)/s+2;break}case n:{o=(t-e)/s+4;break}}o/=6}return{h:o*360,s:l*100,v:a*100}},Dv=function(t,e,n){t=Mg(t,360)*6,e=Mg(e,100),n=Mg(n,100);const r=Math.floor(t),i=t-r,o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),l=r%6,u=[n,a,o,o,s,n][l],c=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:Math.round(u*255),g:Math.round(c*255),b:Math.round(d*255)}};class Ey{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in e)Dn(e,n)&&(this[n]=e[n]);e.value?this.fromString(e.value):this.doOnChange()}set(e,n){if(arguments.length===1&&typeof e=="object"){for(const r in e)Dn(e,r)&&this.set(r,e[r]);return}this[`_${e}`]=n,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return Dv(this._hue,this._saturation,this._value)}fromString(e){if(!e){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const n=(r,i,o)=>{this._hue=Math.max(0,Math.min(360,r)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(e.includes("hsl")){const r=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:i,s:o,v:a}=Q$e(r[0],r[1],r[2]);n(i,o,a)}}else if(e.includes("hsv")){const r=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3&&n(r[0],r[1],r[2])}else if(e.includes("rgb")){const r=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:i,s:o,v:a}=C8(r[0],r[1],r[2]);n(i,o,a)}}else if(e.includes("#")){const r=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))return;let i,o,a;r.length===3?(i=lh(r[0]+r[0]),o=lh(r[1]+r[1]),a=lh(r[2]+r[2])):(r.length===6||r.length===8)&&(i=lh(r.slice(0,2)),o=lh(r.slice(2,4)),a=lh(r.slice(4,6))),r.length===8?this._alpha=lh(r.slice(6))/255*100:(r.length===3||r.length===6)&&(this._alpha=100);const{h:s,s:l,v:u}=C8(i,o,a);n(s,l,u)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:n,_value:r,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=w8(e,n/100,r/100);this.value=`hsla(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${x8(Dv(e,n,r))}${C1(i*255/100)}`;break}default:{const{r:a,g:s,b:l}=Dv(e,n,r);this.value=`rgba(${a}, ${s}, ${l}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=w8(e,n/100,r/100);this.value=`hsl(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;break}case"rgb":{const{r:a,g:s,b:l}=Dv(e,n,r);this.value=`rgb(${a}, ${s}, ${l})`;break}default:this.value=x8(Dv(e,n,r))}}}const H$e=ue({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=Qe("color-predefine"),{currentColor:n}=ht(IW),r=F(o(t.colors,t.color));Ve(()=>n.value,a=>{const s=new Ey;s.fromString(a),r.value.forEach(l=>{l.selected=s.compare(l)})}),Bo(()=>{r.value=o(t.colors,t.color)});function i(a){t.color.fromString(t.colors[a])}function o(a,s){return a.map(l=>{const u=new Ey;return u.enableAlpha=t.enableAlpha,u.format="rgba",u.fromString(l),u.selected=u.value===s.value,u})}return{rgbaColors:r,handleSelect:i,ns:e}}});function W$e(t,e,n,r,i,o){return R(),G("div",{class:j(t.ns.b())},[J("div",{class:j(t.ns.e("colors"))},[(R(!0),G(ct,null,Wt(t.rgbaColors,(a,s)=>(R(),G("div",{key:t.colors[s],class:j([t.ns.e("color-selector"),t.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:l=>t.handleSelect(s)},[J("div",{style:mt({backgroundColor:a.value})},null,4)],10,["onClick"]))),128))],2)],2)}var U$e=Ge(H$e,[["render",W$e],["__file","predefine.vue"]]);const q$e=ue({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=Qe("color-svpanel"),n=en(),r=F(0),i=F(0),o=F("hsl(0, 100%, 50%)"),a=M(()=>{const u=t.color.get("hue"),c=t.color.get("value");return{hue:u,value:c}});function s(){const u=t.color.get("saturation"),c=t.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:h}=d;i.value=u*f/100,r.value=(100-c)*h/100,o.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function l(u){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:h}=rR(u);let m=f-d.left,g=h-d.top;m=Math.max(0,m),m=Math.min(m,d.width),g=Math.max(0,g),g=Math.min(g,d.height),i.value=m,r.value=g,t.color.set({saturation:m/d.width*100,value:100-g/d.height*100})}return Ve(()=>a.value,()=>{s()}),Bt(()=>{y0(n.vnode.el,{drag:u=>{l(u)},end:u=>{l(u)}}),s()}),{cursorTop:r,cursorLeft:i,background:o,colorValue:a,handleDrag:l,update:s,ns:e}}});function Y$e(t,e,n,r,i,o){return R(),G("div",{class:j(t.ns.b()),style:mt({backgroundColor:t.background})},[J("div",{class:j(t.ns.e("white"))},null,2),J("div",{class:j(t.ns.e("black"))},null,2),J("div",{class:j(t.ns.e("cursor")),style:mt({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[J("div")],6)],6)}var X$e=Ge(q$e,[["render",Y$e],["__file","sv-panel.vue"]]);const Z$e=ue({name:"ElColorPicker"}),G$e=ue({...Z$e,props:F$e,emits:V$e,setup(t,{expose:e,emit:n}){const r=t,{t:i}=kn(),o=Qe("color"),{formItem:a}=ua(),s=Ni(),l=la(),{inputId:u,isLabeledByFormItem:c}=gu(r,{formItemContext:a}),d=F(),f=F(),h=F(),m=F(),g=F(),y=F(),{isFocused:b,handleFocus:w,handleBlur:O}=Pb(g,{beforeFocus(){return l.value},beforeBlur(ge){var Re;return(Re=m.value)==null?void 0:Re.isFocusInsideContent(ge)},afterBlur(){L(!1),V()}});let S=!0;const x=Sn(new Ey({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),C=F(!1),E=F(!1),T=F(""),P=M(()=>!r.modelValue&&!E.value?"transparent":W(x,r.showAlpha)),A=M(()=>!r.modelValue&&!E.value?"":x.value),D=M(()=>c.value?void 0:r.ariaLabel||i("el.colorpicker.defaultLabel")),N=M(()=>c.value?a==null?void 0:a.labelId:void 0),$=M(()=>[o.b("picker"),o.is("disabled",l.value),o.bm("picker",s.value),o.is("focused",b.value)]);function W(ge,Re){if(!(ge instanceof Ey))throw new TypeError("color should be instance of _color Class");const{r:$e,g:Z,b:ce}=ge.toRgb();return Re?`rgba(${$e}, ${Z}, ${ce}, ${ge.get("alpha")/100})`:`rgb(${$e}, ${Z}, ${ce})`}function L(ge){C.value=ge}const I=jo(L,100,{leading:!0});function U(){l.value||L(!0)}function Q(){I(!1),V()}function V(){Ot(()=>{r.modelValue?x.fromString(r.modelValue):(x.value="",Ot(()=>{E.value=!1}))})}function q(){l.value||I(!C.value)}function K(){x.fromString(T.value)}function ie(){const ge=x.value;n(Zt,ge),n("change",ge),r.validateEvent&&(a==null||a.validate("change").catch(Re=>void 0)),I(!1),Ot(()=>{const Re=new Ey({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});x.compare(Re)||V()})}function oe(){I(!1),n(Zt,null),n("change",null),r.modelValue!==null&&r.validateEvent&&(a==null||a.validate("change").catch(ge=>void 0)),V()}function Se(){!C.value||(Q(),b.value&&re())}function ke(ge){ge.preventDefault(),ge.stopPropagation(),L(!1),V()}function Y(ge){switch(ge.code){case St.enter:case St.space:ge.preventDefault(),ge.stopPropagation(),U(),y.value.focus();break;case St.esc:ke(ge);break}}function re(){g.value.focus()}function te(){g.value.blur()}return Bt(()=>{r.modelValue&&(T.value=A.value)}),Ve(()=>r.modelValue,ge=>{ge?ge&&ge!==x.value&&(S=!1,x.fromString(ge)):E.value=!1}),Ve(()=>[r.colorFormat,r.showAlpha],()=>{x.enableAlpha=r.showAlpha,x.format=r.colorFormat||x.format,x.doOnChange(),n(Zt,x.value)}),Ve(()=>A.value,ge=>{T.value=ge,S&&n("activeChange",ge),S=!0}),Ve(()=>x.value,()=>{!r.modelValue&&!E.value&&(E.value=!0)}),Ve(()=>C.value,()=>{Ot(()=>{var ge,Re,$e;(ge=d.value)==null||ge.update(),(Re=f.value)==null||Re.update(),($e=h.value)==null||$e.update()})}),_n(IW,{currentColor:A}),e({color:x,show:U,hide:Q,focus:re,blur:te}),(ge,Re)=>(R(),we(p(Ui),{ref_key:"popper",ref:m,visible:C.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[p(o).be("picker","panel"),p(o).b("dropdown"),ge.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:ge.teleported,transition:`${p(o).namespace.value}-zoom-in-top`,persistent:"",onHide:$e=>L(!1)},{content:z(()=>[Ht((R(),G("div",{onKeydown:br(ke,["esc"])},[J("div",{class:j(p(o).be("dropdown","main-wrapper"))},[B(B$e,{ref_key:"hue",ref:d,class:"hue-slider",color:p(x),vertical:""},null,8,["color"]),B(X$e,{ref_key:"sv",ref:f,color:p(x)},null,8,["color"])],2),ge.showAlpha?(R(),we(D$e,{key:0,ref_key:"alpha",ref:h,color:p(x)},null,8,["color"])):_e("v-if",!0),ge.predefine?(R(),we(U$e,{key:1,ref:"predefine","enable-alpha":ge.showAlpha,color:p(x),colors:ge.predefine},null,8,["enable-alpha","color","colors"])):_e("v-if",!0),J("div",{class:j(p(o).be("dropdown","btns"))},[J("span",{class:j(p(o).be("dropdown","value"))},[B(p(hi),{ref_key:"inputRef",ref:y,modelValue:T.value,"onUpdate:modelValue":$e=>T.value=$e,"validate-event":!1,size:"small",onKeyup:br(K,["enter"]),onBlur:K},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),B(p(lr),{class:j(p(o).be("dropdown","link-btn")),text:"",size:"small",onClick:oe},{default:z(()=>[qe(je(p(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),B(p(lr),{plain:"",size:"small",class:j(p(o).be("dropdown","btn")),onClick:ie},{default:z(()=>[qe(je(p(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[p(qc),Se]])]),default:z(()=>[J("div",gn({id:p(u),ref_key:"triggerRef",ref:g},ge.$attrs,{class:p($),role:"button","aria-label":p(D),"aria-labelledby":p(N),"aria-description":p(i)("el.colorpicker.description",{color:ge.modelValue||""}),"aria-disabled":p(l),tabindex:p(l)?-1:ge.tabindex,onKeydown:Y,onFocus:p(w),onBlur:p(O)}),[p(l)?(R(),G("div",{key:0,class:j(p(o).be("picker","mask"))},null,2)):_e("v-if",!0),J("div",{class:j(p(o).be("picker","trigger")),onClick:q},[J("span",{class:j([p(o).be("picker","color"),p(o).is("alpha",ge.showAlpha)])},[J("span",{class:j(p(o).be("picker","color-inner")),style:mt({backgroundColor:p(P)})},[Ht(B(p(gt),{class:j([p(o).be("picker","icon"),p(o).is("icon-arrow-down")])},{default:z(()=>[B(p(ld))]),_:1},8,["class"]),[[zn,ge.modelValue||E.value]]),Ht(B(p(gt),{class:j([p(o).be("picker","empty"),p(o).is("icon-close")])},{default:z(()=>[B(p(_a))]),_:1},8,["class"]),[[zn,!ge.modelValue&&!E.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var K$e=Ge(G$e,[["__file","color-picker.vue"]]);const J$e=Vt(K$e),eNe=ue({name:"ElContainer"}),tNe=ue({...eNe,props:{direction:{type:String}},setup(t){const e=t,n=Ji(),r=Qe("container"),i=M(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(R(),G("section",{class:j([p(r).b(),p(r).is("vertical",p(i))])},[xe(o.$slots,"default")],2))}});var nNe=Ge(tNe,[["__file","container.vue"]]);const rNe=ue({name:"ElAside"}),iNe=ue({...rNe,props:{width:{type:String,default:null}},setup(t){const e=t,n=Qe("aside"),r=M(()=>e.width?n.cssVarBlock({width:e.width}):{});return(i,o)=>(R(),G("aside",{class:j(p(n).b()),style:mt(p(r))},[xe(i.$slots,"default")],6))}});var BW=Ge(iNe,[["__file","aside.vue"]]);const oNe=ue({name:"ElFooter"}),aNe=ue({...oNe,props:{height:{type:String,default:null}},setup(t){const e=t,n=Qe("footer"),r=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(R(),G("footer",{class:j(p(n).b()),style:mt(p(r))},[xe(i.$slots,"default")],6))}});var FW=Ge(aNe,[["__file","footer.vue"]]);const sNe=ue({name:"ElHeader"}),lNe=ue({...sNe,props:{height:{type:String,default:null}},setup(t){const e=t,n=Qe("header"),r=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(R(),G("header",{class:j(p(n).b()),style:mt(p(r))},[xe(i.$slots,"default")],6))}});var VW=Ge(lNe,[["__file","header.vue"]]);const uNe=ue({name:"ElMain"}),cNe=ue({...uNe,setup(t){const e=Qe("main");return(n,r)=>(R(),G("main",{class:j(p(e).b())},[xe(n.$slots,"default")],2))}});var jW=Ge(cNe,[["__file","main.vue"]]);const dNe=Vt(nNe,{Aside:BW,Footer:FW,Header:VW,Main:jW}),fNe=ti(BW),hNe=ti(FW),pNe=ti(VW),gNe=ti(jW);var zW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){var i=r.prototype,o=i.format;i.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return o.bind(this)(a);var u=this.$utils(),c=(a||"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((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}});return o.bind(this)(c)}}})})(zW);var mNe=zW.exports,QW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){var n="week",r="year";return function(i,o,a){var s=o.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=a(this).startOf(r).add(1,r).date(u),d=a(this).endOf(n);if(c.isBefore(d))return 1}var f=a(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(QW);var vNe=QW.exports,HW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){r.prototype.weekYear=function(){var i=this.month(),o=this.week(),a=this.year();return o===1&&i===11?a+1:i===0&&o>=52?a-1:a}}})})(HW);var yNe=HW.exports,WW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r,i){r.prototype.dayOfYear=function(o){var a=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return o==null?a:this.add(o-a,"day")}}})})(WW);var bNe=WW.exports,UW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){r.prototype.isSameOrAfter=function(i,o){return this.isSame(i,o)||this.isAfter(i,o)}}})})(UW);var _Ne=UW.exports,qW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){r.prototype.isSameOrBefore=function(i,o){return this.isSame(i,o)||this.isBefore(i,o)}}})})(qW);var ONe=qW.exports;const Kx=Symbol(),wNe=Ye({...Q$,type:{type:Oe(String),default:"date"}}),SNe=["date","dates","year","years","month","months","week","range"],W$=Ye({disabledDate:{type:Oe(Function)},date:{type:Oe(Object),required:!0},minDate:{type:Oe(Object)},maxDate:{type:Oe(Object)},parsedValue:{type:Oe([Object,Array])},rangeState:{type:Oe(Object),default:()=>({endDate:null,selecting:!1})}}),YW=Ye({type:{type:Oe(String),required:!0,values:GCe},dateFormat:String,timeFormat:String}),U$=Ye({unlinkPanels:Boolean,parsedValue:{type:Oe(Array)}}),q$=t=>({type:String,values:SNe,default:t}),xNe=Ye({...YW,parsedValue:{type:Oe([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),im=t=>{if(!ut(t))return!1;const[e,n]=t;return It.isDayjs(e)&&It.isDayjs(n)&&e.isSameOrBefore(n)},Y$=(t,{lang:e,unit:n,unlinkPanels:r})=>{let i;if(ut(t)){let[o,a]=t.map(s=>It(s).locale(e));return r||(a=o.add(1,n)),[o,a]}else t?i=It(t):i=It();return i=i.locale(e),[i,i.add(1,n)]},CNe=(t,e,{columnIndexOffset:n,startDate:r,nextEndDate:i,now:o,unit:a,relativeDateGetter:s,setCellMetadata:l,setRowMetadata:u})=>{for(let c=0;c<t.row;c++){const d=e[c];for(let f=0;f<t.column;f++){let h=d[f+n];h||(h={row:c,column:f,type:"normal",inRange:!1,start:!1,end:!1});const m=c*t.column+f,g=s(m);h.dayjs=g,h.date=g.toDate(),h.timestamp=g.valueOf(),h.type="normal",h.inRange=!!(r&&g.isSameOrAfter(r,a)&&i&&g.isSameOrBefore(i,a))||!!(r&&g.isSameOrBefore(r,a)&&i&&g.isSameOrAfter(i,a)),r!=null&&r.isSameOrAfter(i)?(h.start=!!i&&g.isSame(i,a),h.end=r&&g.isSame(r,a)):(h.start=!!r&&g.isSame(r,a),h.end=!!i&&g.isSame(i,a)),g.isSame(o,a)&&(h.type="today"),l==null||l(h,{rowIndex:c,columnIndex:f}),d[f+n]=h}u==null||u(d)}},ww=(t,e,n)=>{const r=It().locale(n).startOf("month").month(e).year(t),i=r.daysInMonth();return ef(i).map(o=>r.add(o,"day").toDate())},b0=(t,e,n,r)=>{const i=It().year(t).month(e).startOf("month"),o=ww(t,e,n).find(a=>!(r!=null&&r(a)));return o?It(o).locale(n):i.locale(n)},qk=(t,e,n)=>{const r=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!ww(r,i,e).every(n))return b0(r,i,e,n);for(let o=0;o<12;o++)if(!ww(r,o,e).every(n))return b0(r,o,e,n);return t},ENe=Ye({...W$,cellClassName:{type:Oe(Function)},showWeekNumber:Boolean,selectionMode:q$("date")}),TNe=["changerange","pick","select"],Yk=(t="")=>["normal","today"].includes(t),kNe=(t,e)=>{const{lang:n}=kn(),r=F(),i=F(),o=F(),a=F(),s=F([[],[],[],[],[],[]]);let l=!1;const u=t.date.$locale().weekStart||7,c=t.date.locale("en").localeData().weekdaysShort().map(V=>V.toLowerCase()),d=M(()=>u>3?7-u:-u),f=M(()=>{const V=t.date.startOf("month");return V.subtract(V.day()||7,"day")}),h=M(()=>c.concat(c).slice(u,u+7)),m=M(()=>fR(p(S)).some(V=>V.isCurrent)),g=M(()=>{const V=t.date.startOf("month"),q=V.day()||7,K=V.daysInMonth(),ie=V.subtract(1,"month").daysInMonth();return{startOfMonthDay:q,dateCountOfMonth:K,dateCountOfLastMonth:ie}}),y=M(()=>t.selectionMode==="dates"?ya(t.parsedValue):[]),b=(V,{count:q,rowIndex:K,columnIndex:ie})=>{const{startOfMonthDay:oe,dateCountOfMonth:Se,dateCountOfLastMonth:ke}=p(g),Y=p(d);if(K>=0&&K<=1){const re=oe+Y<0?7+oe+Y:oe+Y;if(ie+K*7>=re)return V.text=q,!0;V.text=ke-(re-ie%7)+1+K*7,V.type="prev-month"}else return q<=Se?V.text=q:(V.text=q-Se,V.type="next-month"),!0;return!1},w=(V,{columnIndex:q,rowIndex:K},ie)=>{const{disabledDate:oe,cellClassName:Se}=t,ke=p(y),Y=b(V,{count:ie,rowIndex:K,columnIndex:q}),re=V.dayjs.toDate();return V.selected=ke.find(te=>te.isSame(V.dayjs,"day")),V.isSelected=!!V.selected,V.isCurrent=C(V),V.disabled=oe==null?void 0:oe(re),V.customClass=Se==null?void 0:Se(re),Y},O=V=>{if(t.selectionMode==="week"){const[q,K]=t.showWeekNumber?[1,7]:[0,6],ie=Q(V[q+1]);V[q].inRange=ie,V[q].start=ie,V[K].inRange=ie,V[K].end=ie}},S=M(()=>{const{minDate:V,maxDate:q,rangeState:K,showWeekNumber:ie}=t,oe=p(d),Se=p(s),ke="day";let Y=1;if(ie)for(let re=0;re<6;re++)Se[re][0]||(Se[re][0]={type:"week",text:p(f).add(re*7+1,ke).week()});return CNe({row:6,column:7},Se,{startDate:V,columnIndexOffset:ie?1:0,nextEndDate:K.endDate||q||K.selecting&&V||null,now:It().locale(p(n)).startOf(ke),unit:ke,relativeDateGetter:re=>p(f).add(re-oe,ke),setCellMetadata:(...re)=>{w(...re,Y)&&(Y+=1)},setRowMetadata:O}),Se});Ve(()=>t.date,async()=>{var V;(V=p(r))!=null&&V.contains(document.activeElement)&&(await Ot(),await x())});const x=async()=>{var V;return(V=p(i))==null?void 0:V.focus()},C=V=>t.selectionMode==="date"&&Yk(V.type)&&E(V,t.parsedValue),E=(V,q)=>q?It(q).locale(p(n)).isSame(t.date.date(Number(V.text)),"day"):!1,T=(V,q)=>{const K=V*7+(q-(t.showWeekNumber?1:0))-p(d);return p(f).add(K,"day")},P=V=>{var q;if(!t.rangeState.selecting)return;let K=V.target;if(K.tagName==="SPAN"&&(K=(q=K.parentNode)==null?void 0:q.parentNode),K.tagName==="DIV"&&(K=K.parentNode),K.tagName!=="TD")return;const ie=K.parentNode.rowIndex-1,oe=K.cellIndex;p(S)[ie][oe].disabled||(ie!==p(o)||oe!==p(a))&&(o.value=ie,a.value=oe,e("changerange",{selecting:!0,endDate:T(ie,oe)}))},A=V=>!p(m)&&(V==null?void 0:V.text)===1&&V.type==="normal"||V.isCurrent,D=V=>{l||p(m)||t.selectionMode!=="date"||U(V,!0)},N=V=>{!V.target.closest("td")||(l=!0)},$=V=>{!V.target.closest("td")||(l=!1)},W=V=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:V,maxDate:null}),e("select",!0)):(V>=t.minDate?e("pick",{minDate:t.minDate,maxDate:V}):e("pick",{minDate:V,maxDate:t.minDate}),e("select",!1))},L=V=>{const q=V.week(),K=`${V.year()}w${q}`;e("pick",{year:V.year(),week:q,value:K,date:V.startOf("week")})},I=(V,q)=>{const K=q?ya(t.parsedValue).filter(ie=>(ie==null?void 0:ie.valueOf())!==V.valueOf()):ya(t.parsedValue).concat([V]);e("pick",K)},U=(V,q=!1)=>{const K=V.target.closest("td");if(!K)return;const ie=K.parentNode.rowIndex-1,oe=K.cellIndex,Se=p(S)[ie][oe];if(Se.disabled||Se.type==="week")return;const ke=T(ie,oe);switch(t.selectionMode){case"range":{W(ke);break}case"date":{e("pick",ke,q);break}case"week":{L(ke);break}case"dates":{I(ke,!!Se.selected);break}}},Q=V=>{if(t.selectionMode!=="week")return!1;let q=t.date.startOf("day");if(V.type==="prev-month"&&(q=q.subtract(1,"month")),V.type==="next-month"&&(q=q.add(1,"month")),q=q.date(Number.parseInt(V.text,10)),t.parsedValue&&!Array.isArray(t.parsedValue)){const K=(t.parsedValue.day()-u+7)%7-1;return t.parsedValue.subtract(K,"day").isSame(q,"day")}return!1};return{WEEKS:h,rows:S,tbodyRef:r,currentCellRef:i,focus:x,isCurrent:C,isWeekActive:Q,isSelectedCell:A,handlePickDate:U,handleMouseUp:$,handleMouseDown:N,handleMouseMove:P,handleFocus:D}},PNe=(t,{isCurrent:e,isWeekActive:n})=>{const r=Qe("date-table"),{t:i}=kn(),o=M(()=>[r.b(),{"is-week-mode":t.selectionMode==="week"}]),a=M(()=>i("el.datepicker.dateTablePrompt")),s=M(()=>i("el.datepicker.week"));return{tableKls:o,tableLabel:a,weekLabel:s,getCellClasses:c=>{const d=[];return Yk(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),e(c)&&d.push("current"),c.inRange&&(Yk(c.type)||t.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),c.disabled&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},getRowKls:c=>[r.e("row"),{current:n(c)}],t:i}},ANe=Ye({cell:{type:Oe(Object)}});var X$=ue({name:"ElDatePickerCell",props:ANe,setup(t){const e=Qe("date-table-cell"),{slots:n}=ht(Kx);return()=>{const{cell:r}=t;return xe(n,"default",{...r},()=>{var i;return[B("div",{class:e.b()},[B("span",{class:e.e("text")},[(i=r==null?void 0:r.renderText)!=null?i:r==null?void 0:r.text])])]})}}});const MNe=ue({__name:"basic-date-table",props:ENe,emits:TNe,setup(t,{expose:e,emit:n}){const r=t,{WEEKS:i,rows:o,tbodyRef:a,currentCellRef:s,focus:l,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:h,handleMouseDown:m,handleMouseMove:g,handleFocus:y}=kNe(r,n),{tableLabel:b,tableKls:w,weekLabel:O,getCellClasses:S,getRowKls:x,t:C}=PNe(r,{isCurrent:u,isWeekActive:c});return e({focus:l}),(E,T)=>(R(),G("table",{"aria-label":p(b),class:j(p(w)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:p(f),onMousemove:p(g),onMousedown:Pt(p(m),["prevent"]),onMouseup:p(h)},[J("tbody",{ref_key:"tbodyRef",ref:a},[J("tr",null,[E.showWeekNumber?(R(),G("th",{key:0,scope:"col"},je(p(O)),1)):_e("v-if",!0),(R(!0),G(ct,null,Wt(p(i),(P,A)=>(R(),G("th",{key:A,"aria-label":p(C)("el.datepicker.weeksFull."+P),scope:"col"},je(p(C)("el.datepicker.weeks."+P)),9,["aria-label"]))),128))]),(R(!0),G(ct,null,Wt(p(o),(P,A)=>(R(),G("tr",{key:A,class:j(p(x)(P[1]))},[(R(!0),G(ct,null,Wt(P,(D,N)=>(R(),G("td",{key:`${A}.${N}`,ref_for:!0,ref:$=>p(d)(D)&&(s.value=$),class:j(p(S)(D)),"aria-current":D.isCurrent?"date":void 0,"aria-selected":D.isCurrent,tabindex:p(d)(D)?0:-1,onFocus:p(y)},[B(p(X$),{cell:D},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var Xk=Ge(MNe,[["__file","basic-date-table.vue"]]);const RNe=Ye({...W$,selectionMode:q$("month")}),$Ne=ue({__name:"basic-month-table",props:RNe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=Qe("month-table"),{t:o,lang:a}=kn(),s=F(),l=F(),u=F(r.date.locale("en").localeData().monthsShort().map(O=>O.toLowerCase())),c=F([[],[],[]]),d=F(),f=F(),h=M(()=>{var O,S;const x=c.value,C=It().locale(a.value).startOf("month");for(let E=0;E<3;E++){const T=x[E];for(let P=0;P<4;P++){const A=T[P]||(T[P]={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});A.type="normal";const D=E*4+P,N=r.date.startOf("year").month(D),$=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;A.inRange=!!(r.minDate&&N.isSameOrAfter(r.minDate,"month")&&$&&N.isSameOrBefore($,"month"))||!!(r.minDate&&N.isSameOrBefore(r.minDate,"month")&&$&&N.isSameOrAfter($,"month")),(O=r.minDate)!=null&&O.isSameOrAfter($)?(A.start=!!($&&N.isSame($,"month")),A.end=r.minDate&&N.isSame(r.minDate,"month")):(A.start=!!(r.minDate&&N.isSame(r.minDate,"month")),A.end=!!($&&N.isSame($,"month"))),C.isSame(N)&&(A.type="today"),A.text=D,A.disabled=((S=r.disabledDate)==null?void 0:S.call(r,N.toDate()))||!1}}return x}),m=()=>{var O;(O=l.value)==null||O.focus()},g=O=>{const S={},x=r.date.year(),C=new Date,E=O.text;return S.disabled=r.disabledDate?ww(x,E,a.value).every(r.disabledDate):!1,S.current=ya(r.parsedValue).findIndex(T=>It.isDayjs(T)&&T.year()===x&&T.month()===E)>=0,S.today=C.getFullYear()===x&&C.getMonth()===E,O.inRange&&(S["in-range"]=!0,O.start&&(S["start-date"]=!0),O.end&&(S["end-date"]=!0)),S},y=O=>{const S=r.date.year(),x=O.text;return ya(r.date).findIndex(C=>C.year()===S&&C.month()===x)>=0},b=O=>{var S;if(!r.rangeState.selecting)return;let x=O.target;if(x.tagName==="SPAN"&&(x=(S=x.parentNode)==null?void 0:S.parentNode),x.tagName==="DIV"&&(x=x.parentNode),x.tagName!=="TD")return;const C=x.parentNode.rowIndex,E=x.cellIndex;h.value[C][E].disabled||(C!==d.value||E!==f.value)&&(d.value=C,f.value=E,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(C*4+E)}))},w=O=>{var S;const x=(S=O.target)==null?void 0:S.closest("td");if((x==null?void 0:x.tagName)!=="TD"||Ua(x,"disabled"))return;const C=x.cellIndex,T=x.parentNode.rowIndex*4+C,P=r.date.startOf("year").month(T);if(r.selectionMode==="months"){if(O.type==="keydown"){n("pick",ya(r.parsedValue),!1);return}const A=b0(r.date.year(),T,a.value,r.disabledDate),D=Ua(x,"current")?ya(r.parsedValue).filter(N=>(N==null?void 0:N.month())!==A.month()):ya(r.parsedValue).concat([It(A)]);n("pick",D)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&P>=r.minDate?n("pick",{minDate:r.minDate,maxDate:P}):n("pick",{minDate:P,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:P,maxDate:null}),n("select",!0)):n("pick",T)};return Ve(()=>r.date,async()=>{var O,S;(O=s.value)!=null&&O.contains(document.activeElement)&&(await Ot(),(S=l.value)==null||S.focus())}),e({focus:m}),(O,S)=>(R(),G("table",{role:"grid","aria-label":p(o)("el.datepicker.monthTablePrompt"),class:j(p(i).b()),onClick:w,onMousemove:b},[J("tbody",{ref_key:"tbodyRef",ref:s},[(R(!0),G(ct,null,Wt(p(h),(x,C)=>(R(),G("tr",{key:C},[(R(!0),G(ct,null,Wt(x,(E,T)=>(R(),G("td",{key:T,ref_for:!0,ref:P=>y(E)&&(l.value=P),class:j(g(E)),"aria-selected":`${y(E)}`,"aria-label":p(o)(`el.datepicker.month${+E.text+1}`),tabindex:y(E)?0:-1,onKeydown:[br(Pt(w,["prevent","stop"]),["space"]),br(Pt(w,["prevent","stop"]),["enter"])]},[B(p(X$),{cell:{...E,renderText:p(o)("el.datepicker.months."+u.value[E.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var Zk=Ge($Ne,[["__file","basic-month-table.vue"]]);const NNe=Ye({...W$,selectionMode:q$("year")}),DNe=ue({__name:"basic-year-table",props:NNe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=(S,x)=>{const C=It(String(S)).locale(x).startOf("year"),T=C.endOf("year").dayOfYear();return ef(T).map(P=>C.add(P,"day").toDate())},o=Qe("year-table"),{t:a,lang:s}=kn(),l=F(),u=F(),c=M(()=>Math.floor(r.date.year()/10)*10),d=F([[],[],[]]),f=F(),h=F(),m=M(()=>{var S;const x=d.value,C=It().locale(s.value).startOf("year");for(let E=0;E<3;E++){const T=x[E];for(let P=0;P<4&&!(E*4+P>=10);P++){let A=T[P];A||(A={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),A.type="normal";const D=E*4+P+c.value,N=It().year(D),$=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;A.inRange=!!(r.minDate&&N.isSameOrAfter(r.minDate,"year")&&$&&N.isSameOrBefore($,"year"))||!!(r.minDate&&N.isSameOrBefore(r.minDate,"year")&&$&&N.isSameOrAfter($,"year")),(S=r.minDate)!=null&&S.isSameOrAfter($)?(A.start=!!($&&N.isSame($,"year")),A.end=!!(r.minDate&&N.isSame(r.minDate,"year"))):(A.start=!!(r.minDate&&N.isSame(r.minDate,"year")),A.end=!!($&&N.isSame($,"year"))),C.isSame(N)&&(A.type="today"),A.text=D;const L=N.toDate();A.disabled=r.disabledDate&&r.disabledDate(L)||!1,T[P]=A}}return x}),g=()=>{var S;(S=u.value)==null||S.focus()},y=S=>{const x={},C=It().locale(s.value),E=S.text;return x.disabled=r.disabledDate?i(E,s.value).every(r.disabledDate):!1,x.today=C.year()===E,x.current=ya(r.parsedValue).findIndex(T=>T.year()===E)>=0,S.inRange&&(x["in-range"]=!0,S.start&&(x["start-date"]=!0),S.end&&(x["end-date"]=!0)),x},b=S=>{const x=S.text;return ya(r.date).findIndex(C=>C.year()===x)>=0},w=S=>{var x;const C=(x=S.target)==null?void 0:x.closest("td");if(!C||!C.textContent||Ua(C,"disabled"))return;const E=C.cellIndex,P=C.parentNode.rowIndex*4+E+c.value,A=It().year(P);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&A>=r.minDate?n("pick",{minDate:r.minDate,maxDate:A}):n("pick",{minDate:A,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:A,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(S.type==="keydown"){n("pick",ya(r.parsedValue),!1);return}const D=qk(A.startOf("year"),s.value,r.disabledDate),N=Ua(C,"current")?ya(r.parsedValue).filter($=>($==null?void 0:$.year())!==P):ya(r.parsedValue).concat([D]);n("pick",N)}else n("pick",P)},O=S=>{var x;if(!r.rangeState.selecting)return;const C=(x=S.target)==null?void 0:x.closest("td");if(!C)return;const E=C.parentNode.rowIndex,T=C.cellIndex;m.value[E][T].disabled||(E!==f.value||T!==h.value)&&(f.value=E,h.value=T,n("changerange",{selecting:!0,endDate:It().year(c.value).add(E*4+T,"year")}))};return Ve(()=>r.date,async()=>{var S,x;(S=l.value)!=null&&S.contains(document.activeElement)&&(await Ot(),(x=u.value)==null||x.focus())}),e({focus:g}),(S,x)=>(R(),G("table",{role:"grid","aria-label":p(a)("el.datepicker.yearTablePrompt"),class:j(p(o).b()),onClick:w,onMousemove:O},[J("tbody",{ref_key:"tbodyRef",ref:l},[(R(!0),G(ct,null,Wt(p(m),(C,E)=>(R(),G("tr",{key:E},[(R(!0),G(ct,null,Wt(C,(T,P)=>(R(),G("td",{key:`${E}_${P}`,ref_for:!0,ref:A=>b(T)&&(u.value=A),class:j(["available",y(T)]),"aria-selected":b(T),"aria-label":String(T.text),tabindex:b(T)?0:-1,onKeydown:[br(Pt(w,["prevent","stop"]),["space"]),br(Pt(w,["prevent","stop"]),["enter"])]},[B(p(X$),{cell:T},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var Gk=Ge(DNe,[["__file","basic-year-table.vue"]]);const LNe=ue({__name:"panel-date-pick",props:xNe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=t,r=(Me,nt,de)=>!0,i=Qe("picker-panel"),o=Qe("date-picker"),a=mp(),s=Ji(),{t:l,lang:u}=kn(),c=ht("EP_PICKER_BASE"),d=ht(Yx),{shortcuts:f,disabledDate:h,cellClassName:m,defaultTime:g}=c.props,y=er(c.props,"defaultValue"),b=F(),w=F(It().locale(u.value)),O=F(!1);let S=!1;const x=M(()=>It(g).locale(u.value)),C=M(()=>w.value.month()),E=M(()=>w.value.year()),T=F([]),P=F(null),A=F(null),D=Me=>T.value.length>0?r(Me,T.value,n.format||"HH:mm:ss"):!0,N=Me=>g&&!Ie.value&&!O.value&&!S?x.value.year(Me.year()).month(Me.month()).date(Me.date()):re.value?Me.millisecond(0):Me.startOf("day"),$=(Me,...nt)=>{if(!Me)e("pick",Me,...nt);else if(ut(Me)){const de=Me.map(N);e("pick",de,...nt)}else e("pick",N(Me),...nt);P.value=null,A.value=null,O.value=!1,S=!1},W=async(Me,nt)=>{if(q.value==="date"){Me=Me;let de=n.parsedValue?n.parsedValue.year(Me.year()).month(Me.month()).date(Me.date()):Me;D(de)||(de=T.value[0][0].year(Me.year()).month(Me.month()).date(Me.date())),w.value=de,$(de,re.value||nt),n.type==="datetime"&&(await Ot(),Ke())}else q.value==="week"?$(Me.date):q.value==="dates"&&$(Me,!0)},L=Me=>{const nt=Me?"add":"subtract";w.value=w.value[nt](1,"month"),jt("month")},I=Me=>{const nt=w.value,de=Me?"add":"subtract";w.value=U.value==="year"?nt[de](10,"year"):nt[de](1,"year"),jt("year")},U=F("date"),Q=M(()=>{const Me=l("el.datepicker.year");if(U.value==="year"){const nt=Math.floor(E.value/10)*10;return Me?`${nt} ${Me} - ${nt+9} ${Me}`:`${nt} - ${nt+9}`}return`${E.value} ${Me}`}),V=Me=>{const nt=$t(Me.value)?Me.value():Me.value;if(nt){S=!0,$(It(nt).locale(u.value));return}Me.onClick&&Me.onClick({attrs:a,slots:s,emit:e})},q=M(()=>{const{type:Me}=n;return["week","month","months","year","years","dates"].includes(Me)?Me:"date"}),K=M(()=>q.value==="dates"||q.value==="months"||q.value==="years"),ie=M(()=>q.value==="date"?U.value:q.value),oe=M(()=>!!f.length),Se=async(Me,nt)=>{q.value==="month"?(w.value=b0(w.value.year(),Me,u.value,h),$(w.value,!1)):q.value==="months"?$(Me,nt!=null?nt:!0):(w.value=b0(w.value.year(),Me,u.value,h),U.value="date",["month","year","date","week"].includes(q.value)&&($(w.value,!0),await Ot(),Ke())),jt("month")},ke=async(Me,nt)=>{if(q.value==="year"){const de=w.value.startOf("year").year(Me);w.value=qk(de,u.value,h),$(w.value,!1)}else if(q.value==="years")$(Me,nt!=null?nt:!0);else{const de=w.value.year(Me);w.value=qk(de,u.value,h),U.value="month",["month","year","date","week"].includes(q.value)&&($(w.value,!0),await Ot(),Ke())}jt("year")},Y=async Me=>{U.value=Me,await Ot(),Ke()},re=M(()=>n.type==="datetime"||n.type==="datetimerange"),te=M(()=>{const Me=re.value||q.value==="dates",nt=q.value==="years",de=q.value==="months",Pe=U.value==="date",Le=U.value==="year",wt=U.value==="month";return Me&&Pe||nt&&Le||de&&wt}),ge=M(()=>h?n.parsedValue?ut(n.parsedValue)?h(n.parsedValue[0].toDate()):h(n.parsedValue.toDate()):!0:!1),Re=()=>{if(K.value)$(n.parsedValue);else{let Me=n.parsedValue;if(!Me){const nt=It(g).locale(u.value),de=Xe();Me=nt.year(de.year()).month(de.month()).date(de.date())}w.value=Me,$(Me)}},$e=M(()=>h?h(It().locale(u.value).toDate()):!1),Z=()=>{const nt=It().locale(u.value).toDate();O.value=!0,(!h||!h(nt))&&D(nt)&&(w.value=It().locale(u.value),$(w.value))},ce=M(()=>n.timeFormat||eW(n.format)),Te=M(()=>n.dateFormat||JH(n.format)),Ie=M(()=>{if(A.value)return A.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(ce.value)}),ae=M(()=>{if(P.value)return P.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(Te.value)}),me=F(!1),Ae=()=>{me.value=!0},X=()=>{me.value=!1},ee=Me=>({hour:Me.hour(),minute:Me.minute(),second:Me.second(),year:Me.year(),month:Me.month(),date:Me.date()}),le=(Me,nt,de)=>{const{hour:Pe,minute:Le,second:wt}=ee(Me),tn=n.parsedValue?n.parsedValue.hour(Pe).minute(Le).second(wt):Me;w.value=tn,$(w.value,!0),de||(me.value=nt)},Ce=Me=>{const nt=It(Me,ce.value).locale(u.value);if(nt.isValid()&&D(nt)){const{year:de,month:Pe,date:Le}=ee(w.value);w.value=nt.year(de).month(Pe).date(Le),A.value=null,me.value=!1,$(w.value,!0)}},fe=Me=>{const nt=It(Me,Te.value).locale(u.value);if(nt.isValid()){if(h&&h(nt.toDate()))return;const{hour:de,minute:Pe,second:Le}=ee(w.value);w.value=nt.hour(de).minute(Pe).second(Le),P.value=null,$(w.value,!0)}},Ee=Me=>It.isDayjs(Me)&&Me.isValid()&&(h?!h(Me.toDate()):!0),be=Me=>ut(Me)?Me.map(nt=>nt.format(n.format)):Me.format(n.format),Be=Me=>It(Me,n.format).locale(u.value),Xe=()=>{const Me=It(y.value).locale(u.value);if(!y.value){const nt=x.value;return It().hour(nt.hour()).minute(nt.minute()).second(nt.second()).locale(u.value)}return Me},Ke=async()=>{var Me;["week","month","year","date"].includes(q.value)&&((Me=b.value)==null||Me.focus(),q.value==="week"&&Dt(St.down))},tt=Me=>{const{code:nt}=Me;[St.up,St.down,St.left,St.right,St.home,St.end,St.pageUp,St.pageDown].includes(nt)&&(Dt(nt),Me.stopPropagation(),Me.preventDefault()),[St.enter,St.space,St.numpadEnter].includes(nt)&&P.value===null&&A.value===null&&(Me.preventDefault(),$(w.value,!1))},Dt=Me=>{var nt;const{up:de,down:Pe,left:Le,right:wt,home:tn,end:De,pageUp:xt,pageDown:qt}=St,ln={year:{[de]:-4,[Pe]:4,[Le]:-1,[wt]:1,offset:(bn,Ze)=>bn.setFullYear(bn.getFullYear()+Ze)},month:{[de]:-4,[Pe]:4,[Le]:-1,[wt]:1,offset:(bn,Ze)=>bn.setMonth(bn.getMonth()+Ze)},week:{[de]:-1,[Pe]:1,[Le]:-1,[wt]:1,offset:(bn,Ze)=>bn.setDate(bn.getDate()+Ze*7)},date:{[de]:-7,[Pe]:7,[Le]:-1,[wt]:1,[tn]:bn=>-bn.getDay(),[De]:bn=>-bn.getDay()+6,[xt]:bn=>-new Date(bn.getFullYear(),bn.getMonth(),0).getDate(),[qt]:bn=>new Date(bn.getFullYear(),bn.getMonth()+1,0).getDate(),offset:(bn,Ze)=>bn.setDate(bn.getDate()+Ze)}},nn=w.value.toDate();for(;Math.abs(w.value.diff(nn,"year",!0))<1;){const bn=ln[ie.value];if(!bn)return;if(bn.offset(nn,$t(bn[Me])?bn[Me](nn):(nt=bn[Me])!=null?nt:0),h&&h(nn))break;const Ze=It(nn).locale(u.value);w.value=Ze,e("pick",Ze,!0);break}},jt=Me=>{e("panel-change",w.value.toDate(),Me,U.value)};return Ve(()=>q.value,Me=>{if(["month","year"].includes(Me)){U.value=Me;return}else if(Me==="years"){U.value="year";return}else if(Me==="months"){U.value="month";return}U.value="date"},{immediate:!0}),Ve(()=>U.value,()=>{d==null||d.updatePopper()}),Ve(()=>y.value,Me=>{Me&&(w.value=Xe())},{immediate:!0}),Ve(()=>n.parsedValue,Me=>{if(Me){if(K.value||Array.isArray(Me))return;w.value=Me}else w.value=Xe()},{immediate:!0}),e("set-picker-option",["isValidValue",Ee]),e("set-picker-option",["formatToString",be]),e("set-picker-option",["parseUserInput",Be]),e("set-picker-option",["handleFocusPicker",Ke]),(Me,nt)=>(R(),G("div",{class:j([p(i).b(),p(o).b(),{"has-sidebar":Me.$slots.sidebar||p(oe),"has-time":p(re)}])},[J("div",{class:j(p(i).e("body-wrapper"))},[xe(Me.$slots,"sidebar",{class:j(p(i).e("sidebar"))}),p(oe)?(R(),G("div",{key:0,class:j(p(i).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(f),(de,Pe)=>(R(),G("button",{key:Pe,type:"button",class:j(p(i).e("shortcut")),onClick:Le=>V(de)},je(de.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(i).e("body"))},[p(re)?(R(),G("div",{key:0,class:j(p(o).e("time-header"))},[J("span",{class:j(p(o).e("editor-wrap"))},[B(p(hi),{placeholder:p(l)("el.datepicker.selectDate"),"model-value":p(ae),size:"small","validate-event":!1,onInput:de=>P.value=de,onChange:fe},null,8,["placeholder","model-value","onInput"])],2),Ht((R(),G("span",{class:j(p(o).e("editor-wrap"))},[B(p(hi),{placeholder:p(l)("el.datepicker.selectTime"),"model-value":p(Ie),size:"small","validate-event":!1,onFocus:Ae,onInput:de=>A.value=de,onChange:Ce},null,8,["placeholder","model-value","onInput"]),B(p(Ow),{visible:me.value,format:p(ce),"parsed-value":w.value,onPick:le},null,8,["visible","format","parsed-value"])],2)),[[p(qc),X]])],2)):_e("v-if",!0),Ht(J("div",{class:j([p(o).e("header"),(U.value==="year"||U.value==="month")&&p(o).e("header--bordered")])},[J("span",{class:j(p(o).e("prev-btn"))},[J("button",{type:"button","aria-label":p(l)("el.datepicker.prevYear"),class:j(["d-arrow-left",p(i).e("icon-btn")]),onClick:de=>I(!1)},[xe(Me.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["aria-label","onClick"]),Ht(J("button",{type:"button","aria-label":p(l)("el.datepicker.prevMonth"),class:j([p(i).e("icon-btn"),"arrow-left"]),onClick:de=>L(!1)},[xe(Me.$slots,"prev-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})])],10,["aria-label","onClick"]),[[zn,U.value==="date"]])],2),J("span",{role:"button",class:j(p(o).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:br(de=>Y("year"),["enter"]),onClick:de=>Y("year")},je(p(Q)),43,["onKeydown","onClick"]),Ht(J("span",{role:"button","aria-live":"polite",tabindex:"0",class:j([p(o).e("header-label"),{active:U.value==="month"}]),onKeydown:br(de=>Y("month"),["enter"]),onClick:de=>Y("month")},je(p(l)(`el.datepicker.month${p(C)+1}`)),43,["onKeydown","onClick"]),[[zn,U.value==="date"]]),J("span",{class:j(p(o).e("next-btn"))},[Ht(J("button",{type:"button","aria-label":p(l)("el.datepicker.nextMonth"),class:j([p(i).e("icon-btn"),"arrow-right"]),onClick:de=>L(!0)},[xe(Me.$slots,"next-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})])],10,["aria-label","onClick"]),[[zn,U.value==="date"]]),J("button",{type:"button","aria-label":p(l)("el.datepicker.nextYear"),class:j([p(i).e("icon-btn"),"d-arrow-right"]),onClick:de=>I(!0)},[xe(Me.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[zn,U.value!=="time"]]),J("div",{class:j(p(i).e("content")),onKeydown:tt},[U.value==="date"?(R(),we(Xk,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":p(q),date:w.value,"parsed-value":Me.parsedValue,"disabled-date":p(h),"cell-class-name":p(m),onPick:W},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):_e("v-if",!0),U.value==="year"?(R(),we(Gk,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":p(q),date:w.value,"disabled-date":p(h),"parsed-value":Me.parsedValue,onPick:ke},null,8,["selection-mode","date","disabled-date","parsed-value"])):_e("v-if",!0),U.value==="month"?(R(),we(Zk,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":p(q),date:w.value,"parsed-value":Me.parsedValue,"disabled-date":p(h),onPick:Se},null,8,["selection-mode","date","parsed-value","disabled-date"])):_e("v-if",!0)],34)],2)],2),Ht(J("div",{class:j(p(i).e("footer"))},[Ht(B(p(lr),{text:"",size:"small",class:j(p(i).e("link-btn")),disabled:p($e),onClick:Z},{default:z(()=>[qe(je(p(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[zn,!p(K)]]),B(p(lr),{plain:"",size:"small",class:j(p(i).e("link-btn")),disabled:p(ge),onClick:Re},{default:z(()=>[qe(je(p(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[zn,p(te)]])],2))}});var INe=Ge(LNe,[["__file","panel-date-pick.vue"]]);const BNe=Ye({...YW,...U$,visible:Boolean}),XW=t=>{const{emit:e}=en(),n=mp(),r=Ji();return o=>{const a=$t(o.value)?o.value():o.value;if(a){e("pick",[It(a[0]).locale(t.value),It(a[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:r,emit:e})}},ZW=(t,{defaultValue:e,leftDate:n,rightDate:r,unit:i,onParsedValueChanged:o})=>{const{emit:a}=en(),{pickerNs:s}=ht(Kx),l=Qe("date-range-picker"),{t:u,lang:c}=kn(),d=XW(c),f=F(),h=F(),m=F({endDate:null,selecting:!1}),g=S=>{m.value=S},y=(S=!1)=>{const x=p(f),C=p(h);im([x,C])&&a("pick",[x,C],S)},b=S=>{m.value.selecting=S,S||(m.value.endDate=null)},w=S=>{if(ut(S)&&S.length===2){const[x,C]=S;f.value=x,n.value=x,h.value=C,o(p(f),p(h))}else O()},O=()=>{const[S,x]=Y$(p(e),{lang:p(c),unit:i,unlinkPanels:t.unlinkPanels});f.value=void 0,h.value=void 0,n.value=S,r.value=x};return Ve(e,S=>{S&&O()},{immediate:!0}),Ve(()=>t.parsedValue,w,{immediate:!0}),{minDate:f,maxDate:h,rangeState:m,lang:c,ppNs:s,drpNs:l,handleChangeRange:g,handleRangeConfirm:y,handleShortcutClick:d,onSelect:b,onReset:w,t:u}},cO="month",FNe=ue({__name:"panel-date-range",props:BNe,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{disabledDate:i,cellClassName:o,defaultTime:a,clearable:s}=r.props,l=er(r.props,"format"),u=er(r.props,"shortcuts"),c=er(r.props,"defaultValue"),{lang:d}=kn(),f=F(It().locale(d.value)),h=F(It().locale(d.value).add(1,cO)),{minDate:m,maxDate:g,rangeState:y,ppNs:b,drpNs:w,handleChangeRange:O,handleRangeConfirm:S,handleShortcutClick:x,onSelect:C,onReset:E,t:T}=ZW(n,{defaultValue:c,leftDate:f,rightDate:h,unit:cO,onParsedValueChanged:nt});Ve(()=>n.visible,de=>{!de&&y.value.selecting&&(E(n.parsedValue),C(!1))});const P=F({min:null,max:null}),A=F({min:null,max:null}),D=M(()=>`${f.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${f.value.month()+1}`)}`),N=M(()=>`${h.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${h.value.month()+1}`)}`),$=M(()=>f.value.year()),W=M(()=>f.value.month()),L=M(()=>h.value.year()),I=M(()=>h.value.month()),U=M(()=>!!u.value.length),Q=M(()=>P.value.min!==null?P.value.min:m.value?m.value.format(oe.value):""),V=M(()=>P.value.max!==null?P.value.max:g.value||m.value?(g.value||m.value).format(oe.value):""),q=M(()=>A.value.min!==null?A.value.min:m.value?m.value.format(ie.value):""),K=M(()=>A.value.max!==null?A.value.max:g.value||m.value?(g.value||m.value).format(ie.value):""),ie=M(()=>n.timeFormat||eW(l.value)),oe=M(()=>n.dateFormat||JH(l.value)),Se=de=>im(de)&&(i?!i(de[0].toDate())&&!i(de[1].toDate()):!0),ke=()=>{f.value=f.value.subtract(1,"year"),n.unlinkPanels||(h.value=f.value.add(1,"month")),ce("year")},Y=()=>{f.value=f.value.subtract(1,"month"),n.unlinkPanels||(h.value=f.value.add(1,"month")),ce("month")},re=()=>{n.unlinkPanels?h.value=h.value.add(1,"year"):(f.value=f.value.add(1,"year"),h.value=f.value.add(1,"month")),ce("year")},te=()=>{n.unlinkPanels?h.value=h.value.add(1,"month"):(f.value=f.value.add(1,"month"),h.value=f.value.add(1,"month")),ce("month")},ge=()=>{f.value=f.value.add(1,"year"),ce("year")},Re=()=>{f.value=f.value.add(1,"month"),ce("month")},$e=()=>{h.value=h.value.subtract(1,"year"),ce("year")},Z=()=>{h.value=h.value.subtract(1,"month"),ce("month")},ce=de=>{e("panel-change",[f.value.toDate(),h.value.toDate()],de)},Te=M(()=>{const de=(W.value+1)%12,Pe=W.value+1>=12?1:0;return n.unlinkPanels&&new Date($.value+Pe,de)<new Date(L.value,I.value)}),Ie=M(()=>n.unlinkPanels&&L.value*12+I.value-($.value*12+W.value+1)>=12),ae=M(()=>!(m.value&&g.value&&!y.value.selecting&&im([m.value,g.value]))),me=M(()=>n.type==="datetime"||n.type==="datetimerange"),Ae=(de,Pe)=>{if(!!de)return a?It(a[Pe]||a).locale(d.value).year(de.year()).month(de.month()).date(de.date()):de},X=(de,Pe=!0)=>{const Le=de.minDate,wt=de.maxDate,tn=Ae(Le,0),De=Ae(wt,1);g.value===De&&m.value===tn||(e("calendar-change",[Le.toDate(),wt&&wt.toDate()]),g.value=De,m.value=tn,!(!Pe||me.value)&&S())},ee=F(!1),le=F(!1),Ce=()=>{ee.value=!1},fe=()=>{le.value=!1},Ee=(de,Pe)=>{P.value[Pe]=de;const Le=It(de,oe.value).locale(d.value);if(Le.isValid()){if(i&&i(Le.toDate()))return;Pe==="min"?(f.value=Le,m.value=(m.value||f.value).year(Le.year()).month(Le.month()).date(Le.date()),!n.unlinkPanels&&(!g.value||g.value.isBefore(m.value))&&(h.value=Le.add(1,"month"),g.value=m.value.add(1,"month"))):(h.value=Le,g.value=(g.value||h.value).year(Le.year()).month(Le.month()).date(Le.date()),!n.unlinkPanels&&(!m.value||m.value.isAfter(g.value))&&(f.value=Le.subtract(1,"month"),m.value=g.value.subtract(1,"month")))}},be=(de,Pe)=>{P.value[Pe]=null},Be=(de,Pe)=>{A.value[Pe]=de;const Le=It(de,ie.value).locale(d.value);Le.isValid()&&(Pe==="min"?(ee.value=!0,m.value=(m.value||f.value).hour(Le.hour()).minute(Le.minute()).second(Le.second())):(le.value=!0,g.value=(g.value||h.value).hour(Le.hour()).minute(Le.minute()).second(Le.second()),h.value=g.value))},Xe=(de,Pe)=>{A.value[Pe]=null,Pe==="min"?(f.value=m.value,ee.value=!1,(!g.value||g.value.isBefore(m.value))&&(g.value=m.value)):(h.value=g.value,le.value=!1,g.value&&g.value.isBefore(m.value)&&(m.value=g.value))},Ke=(de,Pe,Le)=>{A.value.min||(de&&(f.value=de,m.value=(m.value||f.value).hour(de.hour()).minute(de.minute()).second(de.second())),Le||(ee.value=Pe),(!g.value||g.value.isBefore(m.value))&&(g.value=m.value,h.value=de))},tt=(de,Pe,Le)=>{A.value.max||(de&&(h.value=de,g.value=(g.value||h.value).hour(de.hour()).minute(de.minute()).second(de.second())),Le||(le.value=Pe),g.value&&g.value.isBefore(m.value)&&(m.value=g.value))},Dt=()=>{f.value=Y$(p(c),{lang:p(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],h.value=f.value.add(1,"month"),g.value=void 0,m.value=void 0,e("pick",null)},jt=de=>ut(de)?de.map(Pe=>Pe.format(l.value)):de.format(l.value),Me=de=>ut(de)?de.map(Pe=>It(Pe,l.value).locale(d.value)):It(de,l.value).locale(d.value);function nt(de,Pe){if(n.unlinkPanels&&Pe){const Le=(de==null?void 0:de.year())||0,wt=(de==null?void 0:de.month())||0,tn=Pe.year(),De=Pe.month();h.value=Le===tn&&wt===De?Pe.add(1,cO):Pe}else h.value=f.value.add(1,cO),Pe&&(h.value=h.value.hour(Pe.hour()).minute(Pe.minute()).second(Pe.second()))}return e("set-picker-option",["isValidValue",Se]),e("set-picker-option",["parseUserInput",Me]),e("set-picker-option",["formatToString",jt]),e("set-picker-option",["handleClear",Dt]),(de,Pe)=>(R(),G("div",{class:j([p(b).b(),p(w).b(),{"has-sidebar":de.$slots.sidebar||p(U),"has-time":p(me)}])},[J("div",{class:j(p(b).e("body-wrapper"))},[xe(de.$slots,"sidebar",{class:j(p(b).e("sidebar"))}),p(U)?(R(),G("div",{key:0,class:j(p(b).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(u),(Le,wt)=>(R(),G("button",{key:wt,type:"button",class:j(p(b).e("shortcut")),onClick:tn=>p(x)(Le)},je(Le.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(b).e("body"))},[p(me)?(R(),G("div",{key:0,class:j(p(w).e("time-header"))},[J("span",{class:j(p(w).e("editors-wrap"))},[J("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",disabled:p(y).selecting,placeholder:p(T)("el.datepicker.startDate"),class:j(p(w).e("editor")),"model-value":p(Q),"validate-event":!1,onInput:Le=>Ee(Le,"min"),onChange:Le=>be(Le,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),Ht((R(),G("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:j(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.startTime"),"model-value":p(q),"validate-event":!1,onFocus:Le=>ee.value=!0,onInput:Le=>Be(Le,"min"),onChange:Le=>Xe(Le,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),B(p(Ow),{visible:ee.value,format:p(ie),"datetime-role":"start","parsed-value":f.value,onPick:Ke},null,8,["visible","format","parsed-value"])],2)),[[p(qc),Ce]])],2),J("span",null,[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})]),J("span",{class:j([p(w).e("editors-wrap"),"is-right"])},[J("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:j(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.endDate"),"model-value":p(V),readonly:!p(m),"validate-event":!1,onInput:Le=>Ee(Le,"max"),onChange:Le=>be(Le,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),Ht((R(),G("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:j(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.endTime"),"model-value":p(K),readonly:!p(m),"validate-event":!1,onFocus:Le=>p(m)&&(le.value=!0),onInput:Le=>Be(Le,"max"),onChange:Le=>Xe(Le,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),B(p(Ow),{"datetime-role":"end",visible:le.value,format:p(ie),"parsed-value":h.value,onPick:tt},null,8,["visible","format","parsed-value"])],2)),[[p(qc),fe]])],2)],2)):_e("v-if",!0),J("div",{class:j([[p(b).e("content"),p(w).e("content")],"is-left"])},[J("div",{class:j(p(w).e("header"))},[J("button",{type:"button",class:j([p(b).e("icon-btn"),"d-arrow-left"]),"aria-label":p(T)("el.datepicker.prevYear"),onClick:ke},[xe(de.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["aria-label"]),J("button",{type:"button",class:j([p(b).e("icon-btn"),"arrow-left"]),"aria-label":p(T)("el.datepicker.prevMonth"),onClick:Y},[xe(de.$slots,"prev-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})])],10,["aria-label"]),de.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(Ie),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Ie)}],"d-arrow-right"]),"aria-label":p(T)("el.datepicker.nextYear"),onClick:ge},[xe(de.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),de.unlinkPanels?(R(),G("button",{key:1,type:"button",disabled:!p(Te),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Te)}],"arrow-right"]),"aria-label":p(T)("el.datepicker.nextMonth"),onClick:Re},[xe(de.$slots,"next-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),J("div",null,je(p(D)),1)],2),B(Xk,{"selection-mode":"range",date:f.value,"min-date":p(m),"max-date":p(g),"range-state":p(y),"disabled-date":p(i),"cell-class-name":p(o),onChangerange:p(O),onPick:X,onSelect:p(C)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),J("div",{class:j([[p(b).e("content"),p(w).e("content")],"is-right"])},[J("div",{class:j(p(w).e("header"))},[de.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(Ie),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Ie)}],"d-arrow-left"]),"aria-label":p(T)("el.datepicker.prevYear"),onClick:$e},[xe(de.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),de.unlinkPanels?(R(),G("button",{key:1,type:"button",disabled:!p(Te),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Te)}],"arrow-left"]),"aria-label":p(T)("el.datepicker.prevMonth"),onClick:Z},[xe(de.$slots,"prev-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),J("button",{type:"button","aria-label":p(T)("el.datepicker.nextYear"),class:j([p(b).e("icon-btn"),"d-arrow-right"]),onClick:re},[xe(de.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["aria-label"]),J("button",{type:"button",class:j([p(b).e("icon-btn"),"arrow-right"]),"aria-label":p(T)("el.datepicker.nextMonth"),onClick:te},[xe(de.$slots,"next-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})])],10,["aria-label"]),J("div",null,je(p(N)),1)],2),B(Xk,{"selection-mode":"range",date:h.value,"min-date":p(m),"max-date":p(g),"range-state":p(y),"disabled-date":p(i),"cell-class-name":p(o),onChangerange:p(O),onPick:X,onSelect:p(C)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),p(me)?(R(),G("div",{key:0,class:j(p(b).e("footer"))},[p(s)?(R(),we(p(lr),{key:0,text:"",size:"small",class:j(p(b).e("link-btn")),onClick:Dt},{default:z(()=>[qe(je(p(T)("el.datepicker.clear")),1)]),_:1},8,["class"])):_e("v-if",!0),B(p(lr),{plain:"",size:"small",class:j(p(b).e("link-btn")),disabled:p(ae),onClick:Le=>p(S)(!1)},{default:z(()=>[qe(je(p(T)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):_e("v-if",!0)],2))}});var VNe=Ge(FNe,[["__file","panel-date-range.vue"]]);const jNe=Ye({...U$}),zNe=["pick","set-picker-option","calendar-change"],QNe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:r}=kn(),i=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},o=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},a=()=>{e.value=e.value.add(1,"year")},s=()=>{n.value=n.value.subtract(1,"year")},l=M(()=>`${e.value.year()} ${r("el.datepicker.year")}`),u=M(()=>`${n.value.year()} ${r("el.datepicker.year")}`),c=M(()=>e.value.year()),d=M(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:o,leftNextYear:a,rightPrevYear:s,leftLabel:l,rightLabel:u,leftYear:c,rightYear:d}},dO="year",HNe=ue({name:"DatePickerMonthRange"}),WNe=ue({...HNe,props:jNe,emits:zNe,setup(t,{emit:e}){const n=t,{lang:r}=kn(),i=ht("EP_PICKER_BASE"),{shortcuts:o,disabledDate:a}=i.props,s=er(i.props,"format"),l=er(i.props,"defaultValue"),u=F(It().locale(r.value)),c=F(It().locale(r.value).add(1,dO)),{minDate:d,maxDate:f,rangeState:h,ppNs:m,drpNs:g,handleChangeRange:y,handleRangeConfirm:b,handleShortcutClick:w,onSelect:O}=ZW(n,{defaultValue:l,leftDate:u,rightDate:c,unit:dO,onParsedValueChanged:Q}),S=M(()=>!!o.length),{leftPrevYear:x,rightNextYear:C,leftNextYear:E,rightPrevYear:T,leftLabel:P,rightLabel:A,leftYear:D,rightYear:N}=QNe({unlinkPanels:er(n,"unlinkPanels"),leftDate:u,rightDate:c}),$=M(()=>n.unlinkPanels&&N.value>D.value+1),W=(V,q=!0)=>{const K=V.minDate,ie=V.maxDate;f.value===ie&&d.value===K||(e("calendar-change",[K.toDate(),ie&&ie.toDate()]),f.value=ie,d.value=K,q&&b())},L=()=>{u.value=Y$(p(l),{lang:p(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],c.value=u.value.add(1,"year"),e("pick",null)},I=V=>ut(V)?V.map(q=>q.format(s.value)):V.format(s.value),U=V=>ut(V)?V.map(q=>It(q,s.value).locale(r.value)):It(V,s.value).locale(r.value);function Q(V,q){if(n.unlinkPanels&&q){const K=(V==null?void 0:V.year())||0,ie=q.year();c.value=K===ie?q.add(1,dO):q}else c.value=u.value.add(1,dO)}return e("set-picker-option",["isValidValue",im]),e("set-picker-option",["formatToString",I]),e("set-picker-option",["parseUserInput",U]),e("set-picker-option",["handleClear",L]),(V,q)=>(R(),G("div",{class:j([p(m).b(),p(g).b(),{"has-sidebar":Boolean(V.$slots.sidebar)||p(S)}])},[J("div",{class:j(p(m).e("body-wrapper"))},[xe(V.$slots,"sidebar",{class:j(p(m).e("sidebar"))}),p(S)?(R(),G("div",{key:0,class:j(p(m).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(o),(K,ie)=>(R(),G("button",{key:ie,type:"button",class:j(p(m).e("shortcut")),onClick:oe=>p(w)(K)},je(K.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(m).e("body"))},[J("div",{class:j([[p(m).e("content"),p(g).e("content")],"is-left"])},[J("div",{class:j(p(g).e("header"))},[J("button",{type:"button",class:j([p(m).e("icon-btn"),"d-arrow-left"]),onClick:p(x)},[xe(V.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["onClick"]),V.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p($),class:j([[p(m).e("icon-btn"),{[p(m).is("disabled")]:!p($)}],"d-arrow-right"]),onClick:p(E)},[xe(V.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("div",null,je(p(P)),1)],2),B(Zk,{"selection-mode":"range",date:u.value,"min-date":p(d),"max-date":p(f),"range-state":p(h),"disabled-date":p(a),onChangerange:p(y),onPick:W,onSelect:p(O)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),J("div",{class:j([[p(m).e("content"),p(g).e("content")],"is-right"])},[J("div",{class:j(p(g).e("header"))},[V.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p($),class:j([[p(m).e("icon-btn"),{"is-disabled":!p($)}],"d-arrow-left"]),onClick:p(T)},[xe(V.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("button",{type:"button",class:j([p(m).e("icon-btn"),"d-arrow-right"]),onClick:p(C)},[xe(V.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["onClick"]),J("div",null,je(p(A)),1)],2),B(Zk,{"selection-mode":"range",date:c.value,"min-date":p(d),"max-date":p(f),"range-state":p(h),"disabled-date":p(a),onChangerange:p(y),onPick:W,onSelect:p(O)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var UNe=Ge(WNe,[["__file","panel-month-range.vue"]]);const qNe=Ye({...U$}),YNe=["pick","set-picker-option","calendar-change"],XNe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const r=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},i=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},o=()=>{e.value=e.value.add(10,"year")},a=()=>{n.value=n.value.subtract(10,"year")},s=M(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=M(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),u=M(()=>Math.floor(e.value.year()/10)*10+9),c=M(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:i,leftNextYear:o,rightPrevYear:a,leftLabel:s,rightLabel:l,leftYear:u,rightYear:c}},E8="year",ZNe=ue({name:"DatePickerYearRange"}),GNe=ue({...ZNe,props:qNe,emits:YNe,setup(t,{emit:e}){const n=t,{lang:r}=kn(),i=F(It().locale(r.value)),o=F(i.value.add(10,"year")),{pickerNs:a}=ht(Kx),s=Qe("date-range-picker"),l=M(()=>!!W.length),u=M(()=>[a.b(),s.b(),{"has-sidebar":Boolean(Ji().sidebar)||l.value}]),c=M(()=>({content:[a.e("content"),s.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!x.value},"d-arrow-right"]})),d=M(()=>({content:[a.e("content"),s.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!x.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]})),f=XW(r),{leftPrevYear:h,rightNextYear:m,leftNextYear:g,rightPrevYear:y,leftLabel:b,rightLabel:w,leftYear:O,rightYear:S}=XNe({unlinkPanels:er(n,"unlinkPanels"),leftDate:i,rightDate:o}),x=M(()=>n.unlinkPanels&&S.value>O.value+1),C=F(),E=F(),T=F({endDate:null,selecting:!1}),P=oe=>{T.value=oe},A=(oe,Se=!0)=>{const ke=oe.minDate,Y=oe.maxDate;E.value===Y&&C.value===ke||(e("calendar-change",[ke.toDate(),Y&&Y.toDate()]),E.value=Y,C.value=ke,Se&&D())},D=(oe=!1)=>{im([C.value,E.value])&&e("pick",[C.value,E.value],oe)},N=oe=>{T.value.selecting=oe,oe||(T.value.endDate=null)},$=ht("EP_PICKER_BASE"),{shortcuts:W,disabledDate:L}=$.props,I=er($.props,"format"),U=er($.props,"defaultValue"),Q=()=>{let oe;if(ut(U.value)){const Se=It(U.value[0]);let ke=It(U.value[1]);return n.unlinkPanels||(ke=Se.add(10,E8)),[Se,ke]}else U.value?oe=It(U.value):oe=It();return oe=oe.locale(r.value),[oe,oe.add(10,E8)]};Ve(()=>U.value,oe=>{if(oe){const Se=Q();i.value=Se[0],o.value=Se[1]}},{immediate:!0}),Ve(()=>n.parsedValue,oe=>{if(oe&&oe.length===2)if(C.value=oe[0],E.value=oe[1],i.value=C.value,n.unlinkPanels&&E.value){const Se=C.value.year(),ke=E.value.year();o.value=Se===ke?E.value.add(10,"year"):E.value}else o.value=i.value.add(10,"year");else{const Se=Q();C.value=void 0,E.value=void 0,i.value=Se[0],o.value=Se[1]}},{immediate:!0});const V=oe=>ut(oe)?oe.map(Se=>It(Se,I.value).locale(r.value)):It(oe,I.value).locale(r.value),q=oe=>ut(oe)?oe.map(Se=>Se.format(I.value)):oe.format(I.value),K=oe=>im(oe)&&(L?!L(oe[0].toDate())&&!L(oe[1].toDate()):!0),ie=()=>{const oe=Q();i.value=oe[0],o.value=oe[1],E.value=void 0,C.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",K]),e("set-picker-option",["parseUserInput",V]),e("set-picker-option",["formatToString",q]),e("set-picker-option",["handleClear",ie]),(oe,Se)=>(R(),G("div",{class:j(p(u))},[J("div",{class:j(p(a).e("body-wrapper"))},[xe(oe.$slots,"sidebar",{class:j(p(a).e("sidebar"))}),p(l)?(R(),G("div",{key:0,class:j(p(a).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(W),(ke,Y)=>(R(),G("button",{key:Y,type:"button",class:j(p(a).e("shortcut")),onClick:re=>p(f)(ke)},je(ke.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(a).e("body"))},[J("div",{class:j(p(c).content)},[J("div",{class:j(p(s).e("header"))},[J("button",{type:"button",class:j(p(c).arrowLeftBtn),onClick:p(h)},[xe(oe.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["onClick"]),oe.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(x),class:j(p(c).arrowRightBtn),onClick:p(g)},[xe(oe.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("div",null,je(p(b)),1)],2),B(Gk,{"selection-mode":"range",date:i.value,"min-date":C.value,"max-date":E.value,"range-state":T.value,"disabled-date":p(L),onChangerange:P,onPick:A,onSelect:N},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),J("div",{class:j(p(d).content)},[J("div",{class:j(p(s).e("header"))},[oe.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(x),class:j(p(d).arrowLeftBtn),onClick:p(y)},[xe(oe.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("button",{type:"button",class:j(p(d).arrowRightBtn),onClick:p(m)},[xe(oe.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["onClick"]),J("div",null,je(p(w)),1)],2),B(Gk,{"selection-mode":"range",date:o.value,"min-date":C.value,"max-date":E.value,"range-state":T.value,"disabled-date":p(L),onChangerange:P,onPick:A,onSelect:N},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var KNe=Ge(GNe,[["__file","panel-year-range.vue"]]);const JNe=function(t){switch(t){case"daterange":case"datetimerange":return VNe;case"monthrange":return UNe;case"yearrange":return KNe;default:return INe}};It.extend(mW);It.extend(mNe);It.extend(z$);It.extend(vNe);It.extend(yNe);It.extend(bNe);It.extend(_Ne);It.extend(ONe);var eDe=ue({name:"ElDatePicker",install:null,props:wNe,emits:["update:modelValue"],setup(t,{expose:e,emit:n,slots:r}){const i=Qe("picker-panel");_n("ElPopperOptions",Sn(er(t,"popperOptions"))),_n(Kx,{slots:r,pickerNs:i});const o=F();e({focus:(l=!0)=>{var u;(u=o.value)==null||u.focus(l)},handleOpen:()=>{var l;(l=o.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=o.value)==null||l.handleClose()}});const s=l=>{n("update:modelValue",l)};return()=>{var l;const u=(l=t.format)!=null?l:qAe[t.type]||ag,c=JNe(t.type);return B(rW,gn(t,{format:u,type:t.type,ref:o,"onUpdate:modelValue":s}),{default:d=>B(c,d,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const tDe=Vt(eDe),Z$=Symbol("elDescriptions");var Lv=ue({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:ht(Z$,{})}},render(){var t;const e=eEe(this.cell),n=(((t=this.cell)==null?void 0:t.dirs)||[]).map(y=>{const{dir:b,arg:w,modifiers:O,value:S}=y;return[b,S,w,O]}),{border:r,direction:i}=this.descriptions,o=i==="vertical",a=()=>{var y,b,w;return((w=(b=(y=this.cell)==null?void 0:y.children)==null?void 0:b.label)==null?void 0:w.call(b))||e.label},s=()=>{var y,b,w;return(w=(b=(y=this.cell)==null?void 0:y.children)==null?void 0:b.default)==null?void 0:w.call(b)},l=e.span,u=e.rowspan,c=e.align?`is-${e.align}`:"",d=e.labelAlign?`is-${e.labelAlign}`:c,f=e.className,h=e.labelClassName,m={width:pi(e.width),minWidth:pi(e.minWidth)},g=Qe("descriptions");switch(this.type){case"label":return Ht(Et(this.tag,{style:m,class:[g.e("cell"),g.e("label"),g.is("bordered-label",r),g.is("vertical-label",o),d,h],colSpan:o?l:1,rowspan:o?1:u},a()),n);case"content":return Ht(Et(this.tag,{style:m,class:[g.e("cell"),g.e("content"),g.is("bordered-content",r),g.is("vertical-content",o),c,f],colSpan:o?l:l*2-1,rowspan:o?u*2-1:u},s()),n);default:{const y=a();return Ht(Et("td",{style:m,class:[g.e("cell"),c],colSpan:l,rowspan:u},[Dr(y)?void 0:Et("span",{class:[g.e("label"),h]},y),Et("span",{class:[g.e("content"),f]},s())]),n)}}}});const nDe=Ye({row:{type:Oe(Array),default:()=>[]}}),rDe=ue({name:"ElDescriptionsRow"}),iDe=ue({...rDe,props:nDe,setup(t){const e=ht(Z$,{});return(n,r)=>p(e).direction==="vertical"?(R(),G(ct,{key:0},[J("tr",null,[(R(!0),G(ct,null,Wt(n.row,(i,o)=>(R(),we(p(Lv),{key:`tr1-${o}`,cell:i,tag:"th",type:"label"},null,8,["cell"]))),128))]),J("tr",null,[(R(!0),G(ct,null,Wt(n.row,(i,o)=>(R(),we(p(Lv),{key:`tr2-${o}`,cell:i,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(R(),G("tr",{key:1},[(R(!0),G(ct,null,Wt(n.row,(i,o)=>(R(),G(ct,{key:`tr3-${o}`},[p(e).border?(R(),G(ct,{key:0},[B(p(Lv),{cell:i,tag:"td",type:"label"},null,8,["cell"]),B(p(Lv),{cell:i,tag:"td",type:"content"},null,8,["cell"])],64)):(R(),we(p(Lv),{key:1,cell:i,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var oDe=Ge(iDe,[["__file","descriptions-row.vue"]]);const aDe=Ye({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Wi,title:{type:String,default:""},extra:{type:String,default:""}}),sDe=ue({name:"ElDescriptions"}),lDe=ue({...sDe,props:aDe,setup(t){const e=t,n=Qe("descriptions"),r=Ni(),i=Ji();_n(Z$,e);const o=M(()=>[n.b(),n.m(r.value)]),a=(l,u,c,d=!1)=>(l.props||(l.props={}),u>c&&(l.props.span=c),d&&(l.props.span=u),l),s=()=>{if(!i.default)return[];const l=Kd(i.default()).filter(m=>{var g;return((g=m==null?void 0:m.type)==null?void 0:g.name)==="ElDescriptionsItem"}),u=[];let c=[],d=e.column,f=0;const h=[];return l.forEach((m,g)=>{var y,b,w;const O=((y=m.props)==null?void 0:y.span)||1,S=((b=m.props)==null?void 0:b.rowspan)||1,x=u.length;if(h[x]||(h[x]=0),S>1)for(let C=1;C<S;C++)h[w=x+C]||(h[w]=0),h[x+C]++,f++;if(h[x]>0&&(d-=h[x],h[x]=0),g<l.length-1&&(f+=O>d?d:O),g===l.length-1){const C=e.column-f%e.column;c.push(a(m,C,d,!0)),u.push(c);return}O<d?(d-=O,c.push(m)):(c.push(a(m,O,d)),u.push(c),d=e.column,c=[])}),u};return(l,u)=>(R(),G("div",{class:j(p(o))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(R(),G("div",{key:0,class:j(p(n).e("header"))},[J("div",{class:j(p(n).e("title"))},[xe(l.$slots,"title",{},()=>[qe(je(l.title),1)])],2),J("div",{class:j(p(n).e("extra"))},[xe(l.$slots,"extra",{},()=>[qe(je(l.extra),1)])],2)],2)):_e("v-if",!0),J("div",{class:j(p(n).e("body"))},[J("table",{class:j([p(n).e("table"),p(n).is("bordered",l.border)])},[J("tbody",null,[(R(!0),G(ct,null,Wt(s(),(c,d)=>(R(),we(oDe,{key:d,row:c},null,8,["row"]))),128))])],2)],2)],2))}});var uDe=Ge(lDe,[["__file","description.vue"]]);const cDe=Ye({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}}),GW=ue({name:"ElDescriptionsItem",props:cDe}),KW=Vt(uDe,{DescriptionsItem:GW}),JW=ti(GW),dDe=Ye({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:Oe([String,Array,Object])},zIndex:{type:Oe([String,Number])}}),fDe={click:t=>t instanceof MouseEvent},hDe="overlay";var pDe=ue({name:"ElOverlay",props:dDe,emits:fDe,setup(t,{slots:e,emit:n}){const r=Qe(hDe),i=l=>{n("click",l)},{onClick:o,onMousedown:a,onMouseup:s}=E$(t.customMaskEvent?void 0:i);return()=>t.mask?B("div",{class:[r.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:a,onMouseup:s},[xe(e,"default")],Ks.STYLE|Ks.CLASS|Ks.PROPS,["onClick","onMouseup","onMousedown"]):Et("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[xe(e,"default")])}});const G$=pDe,eU=Symbol("dialogInjectionKey"),tU=Ye({center:Boolean,alignCenter:Boolean,closeIcon:{type:fr},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),gDe={close:()=>!0},mDe=ue({name:"ElDialogContent"}),vDe=ue({...mDe,props:tU,emits:gDe,setup(t,{expose:e}){const n=t,{t:r}=kn(),{Close:i}=f$,{dialogRef:o,headerRef:a,bodyId:s,ns:l,style:u}=ht(eU),{focusTrapRef:c}=ht(F$),d=M(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),f=Bx(c,o),h=M(()=>n.draggable),m=M(()=>n.overflow),{resetPosition:g}=UQ(o,a,h,m);return e({resetPosition:g}),(y,b)=>(R(),G("div",{ref:p(f),class:j(p(d)),style:mt(p(u)),tabindex:"-1"},[J("header",{ref_key:"headerRef",ref:a,class:j([p(l).e("header"),{"show-close":y.showClose}])},[xe(y.$slots,"header",{},()=>[J("span",{role:"heading","aria-level":y.ariaLevel,class:j(p(l).e("title"))},je(y.title),11,["aria-level"])]),y.showClose?(R(),G("button",{key:0,"aria-label":p(r)("el.dialog.close"),class:j(p(l).e("headerbtn")),type:"button",onClick:w=>y.$emit("close")},[B(p(gt),{class:j(p(l).e("close"))},{default:z(()=>[(R(),we(un(y.closeIcon||p(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):_e("v-if",!0)],2),J("div",{id:p(s),class:j(p(l).e("body"))},[xe(y.$slots,"default")],10,["id"]),y.$slots.footer?(R(),G("footer",{key:0,class:j(p(l).e("footer"))},[xe(y.$slots,"footer")],2)):_e("v-if",!0)],6))}});var yDe=Ge(vDe,[["__file","dialog-content.vue"]]);const nU=Ye({...tU,appendToBody:Boolean,appendTo:{type:Oe([String,Object]),default:"body"},beforeClose:{type:Oe(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),rU={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Zt]:t=>si(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},iU=(t,e)=>{var n;const i=en().emit,{nextZIndex:o}=Qm();let a="";const s=bo(),l=bo(),u=F(!1),c=F(!1),d=F(!1),f=F((n=t.zIndex)!=null?n:o());let h,m;const g=Wx("namespace",wy),y=M(()=>{const L={},I=`--${g.value}-dialog`;return t.fullscreen||(t.top&&(L[`${I}-margin-top`]=t.top),t.width&&(L[`${I}-width`]=pi(t.width))),L}),b=M(()=>t.alignCenter?{display:"flex"}:{});function w(){i("opened")}function O(){i("closed"),i(Zt,!1),t.destroyOnClose&&(d.value=!1)}function S(){i("close")}function x(){m==null||m(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=Xh(()=>P(),t.openDelay):P()}function C(){h==null||h(),m==null||m(),t.closeDelay&&t.closeDelay>0?{stop:m}=Xh(()=>A(),t.closeDelay):A()}function E(){function L(I){I||(c.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(L):C()}function T(){t.closeOnClickModal&&E()}function P(){!Tn||(u.value=!0)}function A(){u.value=!1}function D(){i("openAutoFocus")}function N(){i("closeAutoFocus")}function $(L){var I;((I=L.detail)==null?void 0:I.focusReason)==="pointer"&&L.preventDefault()}t.lockScroll&&v$(u);function W(){t.closeOnPressEscape&&E()}return Ve(()=>t.modelValue,L=>{L?(c.value=!1,x(),d.value=!0,f.value=Wc(t.zIndex)?o():f.value++,Ot(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):u.value&&C()}),Ve(()=>t.fullscreen,L=>{!e.value||(L?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),Bt(()=>{t.modelValue&&(u.value=!0,d.value=!0,x())}),{afterEnter:w,afterLeave:O,beforeLeave:S,handleClose:E,onModalClick:T,close:C,doClose:A,onOpenAutoFocus:D,onCloseAutoFocus:N,onCloseRequested:W,onFocusoutPrevented:$,titleId:s,bodyId:l,closed:c,style:y,overlayDialogStyle:b,rendered:d,visible:u,zIndex:f}},bDe=ue({name:"ElDialog",inheritAttrs:!1}),_De=ue({...bDe,props:nU,emits:rU,setup(t,{expose:e}){const n=t,r=Ji();Jd({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"},M(()=>!!r.title));const i=Qe("dialog"),o=F(),a=F(),s=F(),{visible:l,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:h,zIndex:m,afterEnter:g,afterLeave:y,beforeLeave:b,handleClose:w,onModalClick:O,onOpenAutoFocus:S,onCloseAutoFocus:x,onCloseRequested:C,onFocusoutPrevented:E}=iU(n,o);_n(eU,{dialogRef:o,headerRef:a,bodyId:c,ns:i,rendered:h,style:d});const T=E$(O),P=M(()=>n.draggable&&!n.fullscreen);return e({visible:l,dialogContentRef:s,resetPosition:()=>{var D;(D=s.value)==null||D.resetPosition()}}),(D,N)=>(R(),we(p(Um),{to:D.appendTo,disabled:D.appendTo!=="body"?!1:!D.appendToBody},{default:z(()=>[B(Qi,{name:"dialog-fade",onAfterEnter:p(g),onAfterLeave:p(y),onBeforeLeave:p(b),persisted:""},{default:z(()=>[Ht(B(p(G$),{"custom-mask-event":"",mask:D.modal,"overlay-class":D.modalClass,"z-index":p(m)},{default:z(()=>[J("div",{role:"dialog","aria-modal":"true","aria-label":D.title||void 0,"aria-labelledby":D.title?void 0:p(u),"aria-describedby":p(c),class:j(`${p(i).namespace.value}-overlay-dialog`),style:mt(p(f)),onClick:p(T).onClick,onMousedown:p(T).onMousedown,onMouseup:p(T).onMouseup},[B(p(Mb),{loop:"",trapped:p(l),"focus-start-el":"container",onFocusAfterTrapped:p(S),onFocusAfterReleased:p(x),onFocusoutPrevented:p(E),onReleaseRequested:p(C)},{default:z(()=>[p(h)?(R(),we(yDe,gn({key:0,ref_key:"dialogContentRef",ref:s},D.$attrs,{center:D.center,"align-center":D.alignCenter,"close-icon":D.closeIcon,draggable:p(P),overflow:D.overflow,fullscreen:D.fullscreen,"show-close":D.showClose,title:D.title,"aria-level":D.headerAriaLevel,onClose:p(w)}),ts({header:z(()=>[D.$slots.title?xe(D.$slots,"title",{key:1}):xe(D.$slots,"header",{key:0,close:p(w),titleId:p(u),titleClass:p(i).e("title")})]),default:z(()=>[xe(D.$slots,"default")]),_:2},[D.$slots.footer?{name:"footer",fn:z(()=>[xe(D.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):_e("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[zn,p(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ODe=Ge(_De,[["__file","dialog.vue"]]);const Ma=Vt(ODe),wDe=Ye({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:Oe(String),default:"solid"}}),SDe=ue({name:"ElDivider"}),xDe=ue({...SDe,props:wDe,setup(t){const e=t,n=Qe("divider"),r=M(()=>n.cssVar({"border-style":e.borderStyle}));return(i,o)=>(R(),G("div",{class:j([p(n).b(),p(n).m(i.direction)]),style:mt(p(r)),role:"separator"},[i.$slots.default&&i.direction!=="vertical"?(R(),G("div",{key:0,class:j([p(n).e("text"),p(n).is(i.contentPosition)])},[xe(i.$slots,"default")],2)):_e("v-if",!0)],6))}});var CDe=Ge(xDe,[["__file","divider.vue"]]);const oU=Vt(CDe),EDe=Ye({...nU,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),TDe=rU,kDe=ue({name:"ElDrawer",inheritAttrs:!1}),PDe=ue({...kDe,props:EDe,emits:TDe,setup(t,{expose:e}){const n=t,r=Ji();Jd({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"},M(()=>!!r.title));const i=F(),o=F(),a=Qe("drawer"),{t:s}=kn(),{afterEnter:l,afterLeave:u,beforeLeave:c,visible:d,rendered:f,titleId:h,bodyId:m,zIndex:g,onModalClick:y,onOpenAutoFocus:b,onCloseAutoFocus:w,onFocusoutPrevented:O,onCloseRequested:S,handleClose:x}=iU(n,i),C=M(()=>n.direction==="rtl"||n.direction==="ltr"),E=M(()=>pi(n.size));return e({handleClose:x,afterEnter:l,afterLeave:u}),(T,P)=>(R(),we(p(Um),{to:T.appendTo,disabled:T.appendTo!=="body"?!1:!T.appendToBody},{default:z(()=>[B(Qi,{name:p(a).b("fade"),onAfterEnter:p(l),onAfterLeave:p(u),onBeforeLeave:p(c),persisted:""},{default:z(()=>[Ht(B(p(G$),{mask:T.modal,"overlay-class":T.modalClass,"z-index":p(g),onClick:p(y)},{default:z(()=>[B(p(Mb),{loop:"",trapped:p(d),"focus-trap-el":i.value,"focus-start-el":o.value,onFocusAfterTrapped:p(b),onFocusAfterReleased:p(w),onFocusoutPrevented:p(O),onReleaseRequested:p(S)},{default:z(()=>[J("div",gn({ref_key:"drawerRef",ref:i,"aria-modal":"true","aria-label":T.title||void 0,"aria-labelledby":T.title?void 0:p(h),"aria-describedby":p(m)},T.$attrs,{class:[p(a).b(),T.direction,p(d)&&"open"],style:p(C)?"width: "+p(E):"height: "+p(E),role:"dialog",onClick:Pt(()=>{},["stop"])}),[J("span",{ref_key:"focusStartRef",ref:o,class:j(p(a).e("sr-focus")),tabindex:"-1"},null,2),T.withHeader?(R(),G("header",{key:0,class:j(p(a).e("header"))},[T.$slots.title?xe(T.$slots,"title",{key:1},()=>[_e(" DEPRECATED SLOT ")]):xe(T.$slots,"header",{key:0,close:p(x),titleId:p(h),titleClass:p(a).e("title")},()=>[T.$slots.title?_e("v-if",!0):(R(),G("span",{key:0,id:p(h),role:"heading","aria-level":T.headerAriaLevel,class:j(p(a).e("title"))},je(T.title),11,["id","aria-level"]))]),T.showClose?(R(),G("button",{key:2,"aria-label":p(s)("el.drawer.close"),class:j(p(a).e("close-btn")),type:"button",onClick:p(x)},[B(p(gt),{class:j(p(a).e("close"))},{default:z(()=>[B(p(_a))]),_:1},8,["class"])],10,["aria-label","onClick"])):_e("v-if",!0)],2)):_e("v-if",!0),p(f)?(R(),G("div",{key:1,id:p(m),class:j(p(a).e("body"))},[xe(T.$slots,"default")],10,["id"])):_e("v-if",!0),T.$slots.footer?(R(),G("div",{key:2,class:j(p(a).e("footer"))},[xe(T.$slots,"footer")],2)):_e("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[zn,p(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ADe=Ge(PDe,[["__file","drawer.vue"]]);const K$=Vt(ADe),MDe=ue({inheritAttrs:!1});function RDe(t,e,n,r,i,o){return xe(t.$slots,"default")}var $De=Ge(MDe,[["render",RDe],["__file","collection.vue"]]);const NDe=ue({name:"ElCollectionItem",inheritAttrs:!1});function DDe(t,e,n,r,i,o){return xe(t.$slots,"default")}var LDe=Ge(NDe,[["render",DDe],["__file","collection-item.vue"]]);const aU="data-el-collection-item",sU=t=>{const e=`El${t}Collection`,n=`${e}Item`,r=Symbol(e),i=Symbol(n),o={...$De,name:e,setup(){const s=F(null),l=new Map;_n(r,{itemMap:l,getItems:()=>{const c=p(s);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${aU}]`));return[...l.values()].sort((h,m)=>d.indexOf(h.ref)-d.indexOf(m.ref))},collectionRef:s})}},a={...LDe,name:n,setup(s,{attrs:l}){const u=F(null),c=ht(r,void 0);_n(i,{collectionItemRef:u}),Bt(()=>{const d=p(u);d&&c.itemMap.set(d,{ref:d,...l})}),pr(()=>{const d=p(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},IDe=Ye({style:{type:Oe([String,Array,Object])},currentTabId:{type:Oe(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Oe(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:BDe,ElCollectionItem:FDe,COLLECTION_INJECTION_KEY:J$,COLLECTION_ITEM_INJECTION_KEY:VDe}=sU("RovingFocusGroup"),eN=Symbol("elRovingFocusGroup"),lU=Symbol("elRovingFocusGroupItem"),jDe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},zDe=(t,e)=>{if(e!=="rtl")return t;switch(t){case St.right:return St.left;case St.left:return St.right;default:return t}},QDe=(t,e,n)=>{const r=zDe(t.key,n);if(!(e==="vertical"&&[St.left,St.right].includes(r))&&!(e==="horizontal"&&[St.up,St.down].includes(r)))return jDe[r]},HDe=(t,e)=>t.map((n,r)=>t[(r+e)%t.length]),tN=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},T8="currentTabIdChange",k8="rovingFocusGroup.entryFocus",WDe={bubbles:!1,cancelable:!0},UDe=ue({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:IDe,emits:[T8,"entryFocus"],setup(t,{emit:e}){var n;const r=F((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),i=F(!1),o=F(!1),a=F(null),{getItems:s}=ht(J$,void 0),l=M(()=>[{outline:"none"},t.style]),u=g=>{e(T8,g)},c=()=>{i.value=!0},d=fi(g=>{var y;(y=t.onMousedown)==null||y.call(t,g)},()=>{o.value=!0}),f=fi(g=>{var y;(y=t.onFocus)==null||y.call(t,g)},g=>{const y=!p(o),{target:b,currentTarget:w}=g;if(b===w&&y&&!p(i)){const O=new Event(k8,WDe);if(w==null||w.dispatchEvent(O),!O.defaultPrevented){const S=s().filter(P=>P.focusable),x=S.find(P=>P.active),C=S.find(P=>P.id===p(r)),T=[x,C,...S].filter(Boolean).map(P=>P.ref);tN(T)}}o.value=!1}),h=fi(g=>{var y;(y=t.onBlur)==null||y.call(t,g)},()=>{i.value=!1}),m=(...g)=>{e("entryFocus",...g)};_n(eN,{currentTabbedId:Mm(r),loop:er(t,"loop"),tabIndex:M(()=>p(i)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:l,orientation:er(t,"orientation"),dir:er(t,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:h,onFocus:f,onMousedown:d}),Ve(()=>t.currentTabId,g=>{r.value=g!=null?g:null}),sr(a,k8,m)}});function qDe(t,e,n,r,i,o){return xe(t.$slots,"default")}var YDe=Ge(UDe,[["render",qDe],["__file","roving-focus-group-impl.vue"]]);const XDe=ue({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:BDe,ElRovingFocusGroupImpl:YDe}});function ZDe(t,e,n,r,i,o){const a=an("el-roving-focus-group-impl"),s=an("el-focus-group-collection");return R(),we(s,null,{default:z(()=>[B(a,Xl(lf(t.$attrs)),{default:z(()=>[xe(t.$slots,"default")]),_:3},16)]),_:3})}var GDe=Ge(XDe,[["render",ZDe],["__file","roving-focus-group.vue"]]);const KDe=ue({components:{ElRovingFocusCollectionItem:FDe},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,loop:r,onItemFocus:i,onItemShiftTab:o}=ht(eN,void 0),{getItems:a}=ht(J$,void 0),s=bo(),l=F(null),u=fi(h=>{e("mousedown",h)},h=>{t.focusable?i(p(s)):h.preventDefault()}),c=fi(h=>{e("focus",h)},()=>{i(p(s))}),d=fi(h=>{e("keydown",h)},h=>{const{key:m,shiftKey:g,target:y,currentTarget:b}=h;if(m===St.tab&&g){o();return}if(y!==b)return;const w=QDe(h);if(w){h.preventDefault();let S=a().filter(x=>x.focusable).map(x=>x.ref);switch(w){case"last":{S.reverse();break}case"prev":case"next":{w==="prev"&&S.reverse();const x=S.indexOf(b);S=r.value?HDe(S,x+1):S.slice(x+1);break}}Ot(()=>{tN(S)})}}),f=M(()=>n.value===p(s));return _n(lU,{rovingFocusGroupItemRef:l,tabIndex:M(()=>p(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:s,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function JDe(t,e,n,r,i,o){const a=an("el-roving-focus-collection-item");return R(),we(a,{id:t.id,focusable:t.focusable,active:t.active},{default:z(()=>[xe(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var eLe=Ge(KDe,[["render",JDe],["__file","roving-focus-item.vue"]]);const E1=Ye({trigger:v0.trigger,effect:{...io.effect,default:"light"},type:{type:Oe(String)},placement:{type:Oe(String),default:"bottom"},popperOptions:{type:Oe(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Oe([Number,String]),default:0},maxHeight:{type:Oe([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:Oe(Object)},teleported:io.teleported}),uU=Ye({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:fr}}),tLe=Ye({onKeydown:{type:Oe(Function)}}),nLe=[St.down,St.pageDown,St.home],cU=[St.up,St.pageUp,St.end],rLe=[...nLe,...cU],{ElCollection:iLe,ElCollectionItem:oLe,COLLECTION_INJECTION_KEY:aLe,COLLECTION_ITEM_INJECTION_KEY:sLe}=sU("Dropdown"),Jx=Symbol("elDropdown"),{ButtonGroup:lLe}=lr,uLe=ue({name:"ElDropdown",components:{ElButton:lr,ElButtonGroup:lLe,ElScrollbar:mu,ElDropdownCollection:iLe,ElTooltip:Ui,ElRovingFocusGroup:GDe,ElOnlyChild:DH,ElIcon:gt,ArrowDown:ld},props:E1,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=en(),r=Qe("dropdown"),{t:i}=kn(),o=F(),a=F(),s=F(null),l=F(null),u=F(null),c=F(null),d=F(!1),f=[St.enter,St.space,St.down],h=M(()=>({maxHeight:pi(t.maxHeight)})),m=M(()=>[r.m(x.value)]),g=M(()=>$o(t.trigger)),y=bo().value,b=M(()=>t.id||y);Ve([o,g],([U,Q],[V])=>{var q,K,ie;(q=V==null?void 0:V.$el)!=null&&q.removeEventListener&&V.$el.removeEventListener("pointerenter",E),(K=U==null?void 0:U.$el)!=null&&K.removeEventListener&&U.$el.removeEventListener("pointerenter",E),((ie=U==null?void 0:U.$el)==null?void 0:ie.addEventListener)&&Q.includes("hover")&&U.$el.addEventListener("pointerenter",E)},{immediate:!0}),pr(()=>{var U,Q;(Q=(U=o.value)==null?void 0:U.$el)!=null&&Q.removeEventListener&&o.value.$el.removeEventListener("pointerenter",E)});function w(){O()}function O(){var U;(U=s.value)==null||U.onClose()}function S(){var U;(U=s.value)==null||U.onOpen()}const x=Ni();function C(...U){e("command",...U)}function E(){var U,Q;(Q=(U=o.value)==null?void 0:U.$el)==null||Q.focus()}function T(){}function P(){const U=p(l);g.value.includes("hover")&&(U==null||U.focus()),c.value=null}function A(U){c.value=U}function D(U){d.value||(U.preventDefault(),U.stopImmediatePropagation())}function N(){e("visible-change",!0)}function $(U){(U==null?void 0:U.type)==="keydown"&&l.value.focus()}function W(){e("visible-change",!1)}return _n(Jx,{contentRef:l,role:M(()=>t.role),triggerId:b,isUsingKeyboard:d,onItemEnter:T,onItemLeave:P}),_n("elDropdown",{instance:n,dropdownSize:x,handleClick:w,commandHandler:C,trigger:er(t,"trigger"),hideOnClick:er(t,"hideOnClick")}),{t:i,ns:r,scrollbar:u,wrapStyle:h,dropdownTriggerKls:m,dropdownSize:x,triggerId:b,triggerKeys:f,currentTabId:c,handleCurrentTabIdChange:A,handlerMainButtonClick:U=>{e("click",U)},handleEntryFocus:D,handleClose:O,handleOpen:S,handleBeforeShowTooltip:N,handleShowTooltip:$,handleBeforeHideTooltip:W,onFocusAfterTrapped:U=>{var Q,V;U.preventDefault(),(V=(Q=l.value)==null?void 0:Q.focus)==null||V.call(Q,{preventScroll:!0})},popperRef:s,contentRef:l,triggeringElementRef:o,referenceElementRef:a}}});function cLe(t,e,n,r,i,o){var a;const s=an("el-dropdown-collection"),l=an("el-roving-focus-group"),u=an("el-scrollbar"),c=an("el-only-child"),d=an("el-tooltip"),f=an("el-button"),h=an("arrow-down"),m=an("el-icon"),g=an("el-button-group");return R(),G("div",{class:j([t.ns.b(),t.ns.is("disabled",t.disabled)])},[B(d,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"manual-mode":!0,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"reference-element":(a=t.referenceElementRef)==null?void 0:a.$el,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-after":t.trigger==="hover"?t.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":t.triggeringElementRef,"virtual-triggering":t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,pure:"",persistent:"",onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},ts({content:z(()=>[B(u,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:z(()=>[B(l,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange,onEntryFocus:t.handleEntryFocus},{default:z(()=>[B(s,null,{default:z(()=>[xe(t.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:z(()=>[B(c,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:z(()=>[xe(t.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(R(),we(g,{key:0},{default:z(()=>[B(f,gn({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:z(()=>[xe(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),B(f,gn({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:z(()=>[B(m,{class:j(t.ns.e("icon"))},{default:z(()=>[B(h)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):_e("v-if",!0)],2)}var dLe=Ge(uLe,[["render",cLe],["__file","dropdown.vue"]]);const fLe=ue({name:"DropdownItemImpl",components:{ElIcon:gt},props:uU,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Qe("dropdown"),{role:r}=ht(Jx,void 0),{collectionItemRef:i}=ht(sLe,void 0),{collectionItemRef:o}=ht(VDe,void 0),{rovingFocusGroupItemRef:a,tabIndex:s,handleFocus:l,handleKeydown:u,handleMousedown:c}=ht(lU,void 0),d=Bx(i,o,a),f=M(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),h=fi(m=>{const{code:g}=m;if(g===St.enter||g===St.space)return m.preventDefault(),m.stopImmediatePropagation(),e("clickimpl",m),!0},u);return{ns:n,itemRef:d,dataset:{[aU]:""},role:f,tabIndex:s,handleFocus:l,handleKeydown:h,handleMousedown:c}}});function hLe(t,e,n,r,i,o){const a=an("el-icon");return R(),G(ct,null,[t.divided?(R(),G("li",{key:0,role:"separator",class:j(t.ns.bem("menu","item","divided"))},null,2)):_e("v-if",!0),J("li",gn({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:s=>t.$emit("clickimpl",s),onFocus:t.handleFocus,onKeydown:Pt(t.handleKeydown,["self"]),onMousedown:t.handleMousedown,onPointermove:s=>t.$emit("pointermove",s),onPointerleave:s=>t.$emit("pointerleave",s)}),[t.icon?(R(),we(a,{key:0},{default:z(()=>[(R(),we(un(t.icon)))]),_:1})):_e("v-if",!0),xe(t.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var pLe=Ge(fLe,[["render",hLe],["__file","dropdown-item-impl.vue"]]);const dU=()=>{const t=ht("elDropdown",{}),e=M(()=>t==null?void 0:t.dropdownSize);return{elDropdown:t,_elDropdownSize:e}},gLe=ue({name:"ElDropdownItem",components:{ElDropdownCollectionItem:oLe,ElRovingFocusItem:eLe,ElDropdownItemImpl:pLe},inheritAttrs:!1,props:uU,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:r}=dU(),i=en(),o=F(null),a=M(()=>{var h,m;return(m=(h=p(o))==null?void 0:h.textContent)!=null?m:""}),{onItemEnter:s,onItemLeave:l}=ht(Jx,void 0),u=fi(h=>(e("pointermove",h),h.defaultPrevented),J3(h=>{if(t.disabled){l(h);return}const m=h.currentTarget;m===document.activeElement||m.contains(document.activeElement)||(s(h),h.defaultPrevented||m==null||m.focus())})),c=fi(h=>(e("pointerleave",h),h.defaultPrevented),J3(l)),d=fi(h=>{if(!t.disabled)return e("click",h),h.type!=="keydown"&&h.defaultPrevented},h=>{var m,g,y;if(t.disabled){h.stopImmediatePropagation();return}(m=r==null?void 0:r.hideOnClick)!=null&&m.value&&((g=r.handleClick)==null||g.call(r)),(y=r.commandHandler)==null||y.call(r,t.command,i,h)}),f=M(()=>({...t,...n}));return{handleClick:d,handlePointerMove:u,handlePointerLeave:c,textContent:a,propsAndAttrs:f}}});function mLe(t,e,n,r,i,o){var a;const s=an("el-dropdown-item-impl"),l=an("el-roving-focus-item"),u=an("el-dropdown-collection-item");return R(),we(u,{disabled:t.disabled,"text-value":(a=t.textValue)!=null?a:t.textContent},{default:z(()=>[B(l,{focusable:!t.disabled},{default:z(()=>[B(s,gn(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),{default:z(()=>[xe(t.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var fU=Ge(gLe,[["render",mLe],["__file","dropdown-item.vue"]]);const vLe=ue({name:"ElDropdownMenu",props:tLe,setup(t){const e=Qe("dropdown"),{_elDropdownSize:n}=dU(),r=n.value,{focusTrapRef:i,onKeydown:o}=ht(F$,void 0),{contentRef:a,role:s,triggerId:l}=ht(Jx,void 0),{collectionRef:u,getItems:c}=ht(aLe,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:h,onBlur:m,onFocus:g,onMousedown:y}=ht(eN,void 0),{collectionRef:b}=ht(J$,void 0),w=M(()=>[e.b("menu"),e.bm("menu",r==null?void 0:r.value)]),O=Bx(a,u,i,d,b),S=fi(C=>{var E;(E=t.onKeydown)==null||E.call(t,C)},C=>{const{currentTarget:E,code:T,target:P}=C;if(E.contains(P),St.tab===T&&C.stopImmediatePropagation(),C.preventDefault(),P!==p(a)||!rLe.includes(T))return;const D=c().filter(N=>!N.disabled).map(N=>N.ref);cU.includes(T)&&D.reverse(),tN(D)});return{size:r,rovingFocusGroupRootStyle:f,tabIndex:h,dropdownKls:w,role:s,triggerId:l,dropdownListWrapperRef:O,handleKeydown:C=>{S(C),o(C)},onBlur:m,onFocus:g,onMousedown:y}}});function yLe(t,e,n,r,i,o){return R(),G("ul",{ref:t.dropdownListWrapperRef,class:j(t.dropdownKls),style:mt(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onBlur:t.onBlur,onFocus:t.onFocus,onKeydown:Pt(t.handleKeydown,["self"]),onMousedown:Pt(t.onMousedown,["self"])},[xe(t.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var hU=Ge(vLe,[["render",yLe],["__file","dropdown-menu.vue"]]);const bLe=Vt(dLe,{DropdownItem:fU,DropdownMenu:hU}),_Le=ti(fU),OLe=ti(hU),wLe=ue({name:"ImgEmpty"}),SLe=ue({...wLe,setup(t){const e=Qe("empty"),n=bo();return(r,i)=>(R(),G("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[J("defs",null,[J("linearGradient",{id:`linearGradient-1-${p(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),J("linearGradient",{id:`linearGradient-2-${p(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),J("rect",{id:`path-3-${p(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),J("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[J("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[J("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[J("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${p(e).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-14",fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),J("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[J("polygon",{id:"Rectangle-Copy-10",fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-11",fill:`var(${p(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),J("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${p(n)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-13",fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),J("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${p(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),J("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[J("use",{id:"Mask",fill:`var(${p(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${p(n)}`},null,8,["fill","xlink:href"]),J("polygon",{id:"Rectangle-Copy",fill:`var(${p(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${p(n)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),J("polygon",{id:"Rectangle-Copy-18",fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var xLe=Ge(SLe,[["__file","img-empty.vue"]]);const CLe=Ye({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),ELe=ue({name:"ElEmpty"}),TLe=ue({...ELe,props:CLe,setup(t){const e=t,{t:n}=kn(),r=Qe("empty"),i=M(()=>e.description||n("el.table.emptyText")),o=M(()=>({width:pi(e.imageSize)}));return(a,s)=>(R(),G("div",{class:j(p(r).b())},[J("div",{class:j(p(r).e("image")),style:mt(p(o))},[a.image?(R(),G("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):xe(a.$slots,"image",{key:1},()=>[B(xLe)])],6),J("div",{class:j(p(r).e("description"))},[a.$slots.description?xe(a.$slots,"description",{key:0}):(R(),G("p",{key:1},je(p(i)),1))],2),a.$slots.default?(R(),G("div",{key:0,class:j(p(r).e("bottom"))},[xe(a.$slots,"default")],2)):_e("v-if",!0)],2))}});var kLe=Ge(TLe,[["__file","empty.vue"]]);const pU=Vt(kLe),PLe=Ye({urlList:{type:Oe(Array),default:()=>Jr([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Oe(String)}}),ALe={close:()=>!0,switch:t=>kt(t),rotate:t=>kt(t)},MLe=ue({name:"ElImageViewer"}),RLe=ue({...MLe,props:PLe,emits:ALe,setup(t,{expose:e,emit:n}){var r;const i=t,o={CONTAIN:{name:"contain",icon:Bc(zm)},ORIGINAL:{name:"original",icon:Bc(MCe)}},{t:a}=kn(),s=Qe("image-viewer"),{nextZIndex:l}=Qm(),u=F(),c=F([]),d=cse(),f=F(!0),h=F(i.initialIndex),m=Tr(o.CONTAIN),g=F({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),y=F((r=i.zIndex)!=null?r:l()),b=M(()=>{const{urlList:q}=i;return q.length<=1}),w=M(()=>h.value===0),O=M(()=>h.value===i.urlList.length-1),S=M(()=>i.urlList[h.value]),x=M(()=>[s.e("btn"),s.e("prev"),s.is("disabled",!i.infinite&&w.value)]),C=M(()=>[s.e("btn"),s.e("next"),s.is("disabled",!i.infinite&&O.value)]),E=M(()=>{const{scale:q,deg:K,offsetX:ie,offsetY:oe,enableTransition:Se}=g.value;let ke=ie/q,Y=oe/q;const re=K*Math.PI/180,te=Math.cos(re),ge=Math.sin(re);ke=ke*te+Y*ge,Y=Y*te-ie/q*ge;const Re={transform:`scale(${q}) rotate(${K}deg) translate(${ke}px, ${Y}px)`,transition:Se?"transform .3s":""};return m.value.name===o.CONTAIN.name&&(Re.maxWidth=Re.maxHeight="100%"),Re});function T(){A(),n("close")}function P(){const q=Vc(ie=>{switch(ie.code){case St.esc:i.closeOnPressEscape&&T();break;case St.space:L();break;case St.left:U();break;case St.up:V("zoomIn");break;case St.right:Q();break;case St.down:V("zoomOut");break}}),K=Vc(ie=>{const oe=ie.deltaY||ie.deltaX;V(oe<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});d.run(()=>{sr(document,"keydown",q),sr(document,"wheel",K)})}function A(){d.stop()}function D(){f.value=!1}function N(q){f.value=!1,q.target.alt=a("el.image.error")}function $(q){if(f.value||q.button!==0||!u.value)return;g.value.enableTransition=!1;const{offsetX:K,offsetY:ie}=g.value,oe=q.pageX,Se=q.pageY,ke=Vc(re=>{g.value={...g.value,offsetX:K+re.pageX-oe,offsetY:ie+re.pageY-Se}}),Y=sr(document,"mousemove",ke);sr(document,"mouseup",()=>{Y()}),q.preventDefault()}function W(){g.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function L(){if(f.value)return;const q=Yg(o),K=Object.values(o),ie=m.value.name,Se=(K.findIndex(ke=>ke.name===ie)+1)%q.length;m.value=o[q[Se]],W()}function I(q){const K=i.urlList.length;h.value=(q+K)%K}function U(){w.value&&!i.infinite||I(h.value-1)}function Q(){O.value&&!i.infinite||I(h.value+1)}function V(q,K={}){if(f.value)return;const{minScale:ie,maxScale:oe}=i,{zoomRate:Se,rotateDeg:ke,enableTransition:Y}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...K};switch(q){case"zoomOut":g.value.scale>ie&&(g.value.scale=Number.parseFloat((g.value.scale/Se).toFixed(3)));break;case"zoomIn":g.value.scale<oe&&(g.value.scale=Number.parseFloat((g.value.scale*Se).toFixed(3)));break;case"clockwise":g.value.deg+=ke,n("rotate",g.value.deg);break;case"anticlockwise":g.value.deg-=ke,n("rotate",g.value.deg);break}g.value.enableTransition=Y}return Ve(S,()=>{Ot(()=>{const q=c.value[0];q!=null&&q.complete||(f.value=!0)})}),Ve(h,q=>{W(),n("switch",q)}),Bt(()=>{var q,K;P(),(K=(q=u.value)==null?void 0:q.focus)==null||K.call(q)}),e({setActiveItem:I}),(q,K)=>(R(),we(p(Um),{to:"body",disabled:!q.teleported},{default:z(()=>[B(Qi,{name:"viewer-fade",appear:""},{default:z(()=>[J("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:j(p(s).e("wrapper")),style:mt({zIndex:y.value})},[J("div",{class:j(p(s).e("mask")),onClick:Pt(ie=>q.hideOnClickModal&&T(),["self"])},null,10,["onClick"]),_e(" CLOSE "),J("span",{class:j([p(s).e("btn"),p(s).e("close")]),onClick:T},[B(p(gt),null,{default:z(()=>[B(p(_a))]),_:1})],2),_e(" ARROW "),p(b)?_e("v-if",!0):(R(),G(ct,{key:0},[J("span",{class:j(p(x)),onClick:U},[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})],2),J("span",{class:j(p(C)),onClick:Q},[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})],2)],64)),_e(" ACTIONS "),J("div",{class:j([p(s).e("btn"),p(s).e("actions")])},[J("div",{class:j(p(s).e("actions__inner"))},[B(p(gt),{onClick:ie=>V("zoomOut")},{default:z(()=>[B(p(YCe))]),_:1},8,["onClick"]),B(p(gt),{onClick:ie=>V("zoomIn")},{default:z(()=>[B(p(zQ))]),_:1},8,["onClick"]),J("i",{class:j(p(s).e("actions__divider"))},null,2),B(p(gt),{onClick:L},{default:z(()=>[(R(),we(un(p(m).icon)))]),_:1}),J("i",{class:j(p(s).e("actions__divider"))},null,2),B(p(gt),{onClick:ie=>V("anticlockwise")},{default:z(()=>[B(p(ECe))]),_:1},8,["onClick"]),B(p(gt),{onClick:ie=>V("clockwise")},{default:z(()=>[B(p(jQ))]),_:1},8,["onClick"])],2)],2),_e(" CANVAS "),J("div",{class:j(p(s).e("canvas"))},[(R(!0),G(ct,null,Wt(q.urlList,(ie,oe)=>Ht((R(),G("img",{ref_for:!0,ref:Se=>c.value[oe]=Se,key:ie,src:ie,style:mt(p(E)),class:j(p(s).e("img")),crossorigin:q.crossorigin,onLoad:D,onError:N,onMousedown:$},null,46,["src","crossorigin"])),[[zn,oe===h.value]])),128))],2),xe(q.$slots,"default")],6)]),_:3})]),_:3},8,["disabled"]))}});var $Le=Ge(RLe,[["__file","image-viewer.vue"]]);const gU=Vt($Le),NLe=Ye({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:Oe([String,Object])},previewSrcList:{type:Oe(Array),default:()=>Jr([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Oe(String)}}),DLe={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>kt(t),close:()=>!0,show:()=>!0},LLe=ue({name:"ElImage",inheritAttrs:!1}),ILe=ue({...LLe,props:NLe,emits:DLe,setup(t,{emit:e}){const n=t;let r="";const{t:i}=kn(),o=Qe("image"),a=mp(),s=M(()=>Ug(Object.entries(a).filter(([Q])=>/^(data-|on[A-Z])/i.test(Q)||["id","style"].includes(Q)))),l=g$({excludeListeners:!0,excludeKeys:M(()=>Object.keys(s.value))}),u=F(),c=F(!1),d=F(!0),f=F(!1),h=F(),m=F(),g=Tn&&"loading"in HTMLImageElement.prototype;let y,b;const w=M(()=>[o.e("inner"),S.value&&o.e("preview"),d.value&&o.is("loading")]),O=M(()=>{const{fit:Q}=n;return Tn&&Q?{objectFit:Q}:{}}),S=M(()=>{const{previewSrcList:Q}=n;return Array.isArray(Q)&&Q.length>0}),x=M(()=>{const{previewSrcList:Q,initialIndex:V}=n;let q=V;return V>Q.length-1&&(q=0),q}),C=M(()=>n.loading==="eager"?!1:!g&&n.loading==="lazy"||n.lazy),E=()=>{!Tn||(d.value=!0,c.value=!1,u.value=n.src)};function T(Q){d.value=!1,c.value=!1,e("load",Q)}function P(Q){d.value=!1,c.value=!0,e("error",Q)}function A(){sce(h.value,m.value)&&(E(),$())}const D=a7(A,200,!0);async function N(){var Q;if(!Tn)return;await Ot();const{scrollContainer:V}=n;As(V)?m.value=V:At(V)&&V!==""?m.value=(Q=document.querySelector(V))!=null?Q:void 0:h.value&&(m.value=r$(h.value)),m.value&&(y=sr(m,"scroll",D),setTimeout(()=>A(),100))}function $(){!Tn||!m.value||!D||(y==null||y(),m.value=void 0)}function W(Q){if(!!Q.ctrlKey){if(Q.deltaY<0)return Q.preventDefault(),!1;if(Q.deltaY>0)return Q.preventDefault(),!1}}function L(){!S.value||(b=sr("wheel",W,{passive:!1}),r=document.body.style.overflow,document.body.style.overflow="hidden",f.value=!0,e("show"))}function I(){b==null||b(),document.body.style.overflow=r,f.value=!1,e("close")}function U(Q){e("switch",Q)}return Ve(()=>n.src,()=>{C.value?(d.value=!0,c.value=!1,$(),N()):E()}),Bt(()=>{C.value?N():E()}),(Q,V)=>(R(),G("div",gn({ref_key:"container",ref:h},p(s),{class:[p(o).b(),Q.$attrs.class]}),[c.value?xe(Q.$slots,"error",{key:0},()=>[J("div",{class:j(p(o).e("error"))},je(p(i)("el.image.error")),3)]):(R(),G(ct,{key:1},[u.value!==void 0?(R(),G("img",gn({key:0},p(l),{src:u.value,loading:Q.loading,style:p(O),class:p(w),crossorigin:Q.crossorigin,onClick:L,onLoad:T,onError:P}),null,16,["src","loading","crossorigin"])):_e("v-if",!0),d.value?(R(),G("div",{key:1,class:j(p(o).e("wrapper"))},[xe(Q.$slots,"placeholder",{},()=>[J("div",{class:j(p(o).e("placeholder"))},null,2)])],2)):_e("v-if",!0)],64)),p(S)?(R(),G(ct,{key:2},[f.value?(R(),we(p(gU),{key:0,"z-index":Q.zIndex,"initial-index":p(x),infinite:Q.infinite,"zoom-rate":Q.zoomRate,"min-scale":Q.minScale,"max-scale":Q.maxScale,"url-list":Q.previewSrcList,crossorigin:Q.crossorigin,"hide-on-click-modal":Q.hideOnClickModal,teleported:Q.previewTeleported,"close-on-press-escape":Q.closeOnPressEscape,onClose:I,onSwitch:U},{default:z(()=>[Q.$slots.viewer?(R(),G("div",{key:0},[xe(Q.$slots,"viewer")])):_e("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):_e("v-if",!0)],64)):_e("v-if",!0)],16))}});var BLe=Ge(ILe,[["__file","image.vue"]]);const mU=Vt(BLe),FLe=Ye({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Wi,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:t=>t===null||kt(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},...wo(["ariaLabel"])}),VLe={[Lr]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Oa]:t=>kt(t)||Dr(t),[Zt]:t=>kt(t)||Dr(t)},jLe=ue({name:"ElInputNumber"}),zLe=ue({...jLe,props:FLe,emits:VLe,setup(t,{expose:e,emit:n}){const r=t,{t:i}=kn(),o=Qe("input-number"),a=F(),s=Sn({currentValue:r.modelValue,userInput:null}),{formItem:l}=ua(),u=M(()=>kt(r.modelValue)&&r.modelValue<=r.min),c=M(()=>kt(r.modelValue)&&r.modelValue>=r.max),d=M(()=>{const L=b(r.step);return ai(r.precision)?Math.max(b(r.modelValue),L):(L>r.precision,r.precision)}),f=M(()=>r.controls&&r.controlsPosition==="right"),h=Ni(),m=la(),g=M(()=>{if(s.userInput!==null)return s.userInput;let L=s.currentValue;if(Dr(L))return"";if(kt(L)){if(Number.isNaN(L))return"";ai(r.precision)||(L=L.toFixed(r.precision))}return L}),y=(L,I)=>{if(ai(I)&&(I=d.value),I===0)return Math.round(L);let U=String(L);const Q=U.indexOf(".");if(Q===-1||!U.replace(".","").split("")[Q+I])return L;const K=U.length;return U.charAt(K-1)==="5"&&(U=`${U.slice(0,Math.max(0,K-1))}6`),Number.parseFloat(Number(U).toFixed(I))},b=L=>{if(Dr(L))return 0;const I=L.toString(),U=I.indexOf(".");let Q=0;return U!==-1&&(Q=I.length-U-1),Q},w=(L,I=1)=>kt(L)?y(L+r.step*I):s.currentValue,O=()=>{if(r.readonly||m.value||c.value)return;const L=Number(g.value)||0,I=w(L);C(I),n(Oa,s.currentValue),$()},S=()=>{if(r.readonly||m.value||u.value)return;const L=Number(g.value)||0,I=w(L,-1);C(I),n(Oa,s.currentValue),$()},x=(L,I)=>{const{max:U,min:Q,step:V,precision:q,stepStrictly:K,valueOnClear:ie}=r;U<Q&&Hi("InputNumber","min should not be greater than max.");let oe=Number(L);if(Dr(L)||Number.isNaN(oe))return null;if(L===""){if(ie===null)return null;oe=At(ie)?{min:Q,max:U}[ie]:ie}return K&&(oe=y(Math.round(oe/V)*V,q),oe!==L&&I&&n(Zt,oe)),ai(q)||(oe=y(oe,q)),(oe>U||oe<Q)&&(oe=oe>U?U:Q,I&&n(Zt,oe)),oe},C=(L,I=!0)=>{var U;const Q=s.currentValue,V=x(L);if(!I){n(Zt,V);return}Q===V&&L||(s.userInput=null,n(Zt,V),Q!==V&&n(Lr,V,Q),r.validateEvent&&((U=l==null?void 0:l.validate)==null||U.call(l,"change").catch(q=>void 0)),s.currentValue=V)},E=L=>{s.userInput=L;const I=L===""?null:Number(L);n(Oa,I),C(I,!1)},T=L=>{const I=L!==""?Number(L):"";(kt(I)&&!Number.isNaN(I)||L==="")&&C(I),$(),s.userInput=null},P=()=>{var L,I;(I=(L=a.value)==null?void 0:L.focus)==null||I.call(L)},A=()=>{var L,I;(I=(L=a.value)==null?void 0:L.blur)==null||I.call(L)},D=L=>{n("focus",L)},N=L=>{var I;s.userInput=null,n("blur",L),r.validateEvent&&((I=l==null?void 0:l.validate)==null||I.call(l,"blur").catch(U=>void 0))},$=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},W=L=>{document.activeElement===L.target&&L.preventDefault()};return Ve(()=>r.modelValue,(L,I)=>{const U=x(L,!0);s.userInput===null&&U!==I&&(s.currentValue=U)},{immediate:!0}),Bt(()=>{var L;const{min:I,max:U,modelValue:Q}=r,V=(L=a.value)==null?void 0:L.input;if(V.setAttribute("role","spinbutton"),Number.isFinite(U)?V.setAttribute("aria-valuemax",String(U)):V.removeAttribute("aria-valuemax"),Number.isFinite(I)?V.setAttribute("aria-valuemin",String(I)):V.removeAttribute("aria-valuemin"),V.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),V.setAttribute("aria-disabled",String(m.value)),!kt(Q)&&Q!=null){let q=Number(Q);Number.isNaN(q)&&(q=null),n(Zt,q)}V.addEventListener("wheel",W,{passive:!1})}),Jc(()=>{var L,I;const U=(L=a.value)==null?void 0:L.input;U==null||U.setAttribute("aria-valuenow",`${(I=s.currentValue)!=null?I:""}`)}),e({focus:P,blur:A}),(L,I)=>(R(),G("div",{class:j([p(o).b(),p(o).m(p(h)),p(o).is("disabled",p(m)),p(o).is("without-controls",!L.controls),p(o).is("controls-right",p(f))]),onDragstart:Pt(()=>{},["prevent"])},[L.controls?Ht((R(),G("span",{key:0,role:"button","aria-label":p(i)("el.inputNumber.decrease"),class:j([p(o).e("decrease"),p(o).is("disabled",p(u))]),onKeydown:br(S,["enter"])},[xe(L.$slots,"decrease-icon",{},()=>[B(p(gt),null,{default:z(()=>[p(f)?(R(),we(p(ld),{key:0})):(R(),we(p(mCe),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(_w),S]]):_e("v-if",!0),L.controls?Ht((R(),G("span",{key:1,role:"button","aria-label":p(i)("el.inputNumber.increase"),class:j([p(o).e("increase"),p(o).is("disabled",p(c))]),onKeydown:br(O,["enter"])},[xe(L.$slots,"increase-icon",{},()=>[B(p(gt),null,{default:z(()=>[p(f)?(R(),we(p(o$),{key:0})):(R(),we(p(pw),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(_w),O]]):_e("v-if",!0),B(p(hi),{id:L.id,ref_key:"input",ref:a,type:"number",step:L.step,"model-value":p(g),placeholder:L.placeholder,readonly:L.readonly,disabled:p(m),size:p(h),max:L.max,min:L.min,name:L.name,"aria-label":L.ariaLabel,"validate-event":!1,onKeydown:[br(Pt(O,["prevent"]),["up"]),br(Pt(S,["prevent"]),["down"])],onBlur:N,onFocus:D,onInput:E,onChange:T},ts({_:2},[L.$slots.prefix?{name:"prefix",fn:z(()=>[xe(L.$slots,"prefix")])}:void 0,L.$slots.suffix?{name:"suffix",fn:z(()=>[xe(L.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var QLe=Ge(zLe,[["__file","input-number.vue"]]);const vU=Vt(QLe),HLe=Ye({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fr}}),WLe={click:t=>t instanceof MouseEvent},ULe=ue({name:"ElLink"}),qLe=ue({...ULe,props:HLe,emits:WLe,setup(t,{emit:e}){const n=t,r=Qe("link"),i=M(()=>[r.b(),r.m(n.type),r.is("disabled",n.disabled),r.is("underline",n.underline&&!n.disabled)]);function o(a){n.disabled||e("click",a)}return(a,s)=>(R(),G("a",{class:j(p(i)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:o},[a.icon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(a.icon)))]),_:1})):_e("v-if",!0),a.$slots.default?(R(),G("span",{key:1,class:j(p(r).e("inner"))},[xe(a.$slots,"default")],2)):_e("v-if",!0),a.$slots.icon?xe(a.$slots,"icon",{key:2}):_e("v-if",!0)],10,["href","target"]))}});var YLe=Ge(qLe,[["__file","link.vue"]]);const XLe=Vt(YLe);class ZLe{constructor(e,n){this.parent=e,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",r=>{let i=!1;switch(r.code){case St.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case St.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case St.tab:{h1(e,"mouseleave");break}case St.enter:case St.space:{i=!0,r.currentTarget.click();break}}return i&&(r.preventDefault(),r.stopPropagation()),!1})})}}class GLe{constructor(e,n){this.domNode=e,this.submenu=null,this.submenu=null,this.init(n)}init(e){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(`.${e}-menu`);n&&(this.submenu=new ZLe(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let n=!1;switch(e.code){case St.down:{h1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case St.up:{h1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case St.tab:{h1(e.currentTarget,"mouseleave");break}case St.enter:case St.space:{n=!0,e.currentTarget.click();break}}n&&e.preventDefault()})}}class KLe{constructor(e,n){this.domNode=e,this.init(n)}init(e){const n=this.domNode.childNodes;Array.from(n).forEach(r=>{r.nodeType===1&&new GLe(r,e)})}}const JLe=ue({name:"ElMenuCollapseTransition",setup(){const t=Qe("menu");return{listeners:{onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,r){rl(n,`${t.namespace.value}-opacity-transition`),n.style.opacity="1",r()},onAfterEnter(n){aa(n,`${t.namespace.value}-opacity-transition`),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),Ua(n,t.m("collapse"))?(aa(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),rl(n,t.m("collapse"))):(rl(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),aa(n,t.m("collapse"))),n.style.width=`${n.scrollWidth}px`,n.style.overflow="hidden"},onLeave(n){rl(n,"horizontal-collapse-transition"),n.style.width=`${n.dataset.scrollWidth}px`}}}}});function eIe(t,e,n,r,i,o){return R(),we(Qi,gn({mode:"out-in"},t.listeners),{default:z(()=>[xe(t.$slots,"default")]),_:3},16)}var tIe=Ge(JLe,[["render",eIe],["__file","menu-collapse-transition.vue"]]);function yU(t,e){const n=M(()=>{let i=t.parent;const o=[e.value];for(;i.type.name!=="ElMenu";)i.props.index&&o.unshift(i.props.index),i=i.parent;return o});return{parentMenu:M(()=>{let i=t.parent;for(;i&&!["ElMenu","ElSubMenu"].includes(i.type.name);)i=i.parent;return i}),indexPath:n}}function nIe(t){return M(()=>{const n=t.backgroundColor;return n?new YH(n).shade(20).toString():""})}const bU=(t,e)=>{const n=Qe("menu");return M(()=>n.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":nIe(t).value||"","active-color":t.activeTextColor||"",level:`${e}`}))},rIe=Ye({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:fr},expandOpenIcon:{type:fr},collapseCloseIcon:{type:fr},collapseOpenIcon:{type:fr}}),PT="ElSubMenu";var nN=ue({name:PT,props:rIe,setup(t,{slots:e,expose:n}){const r=en(),{indexPath:i,parentMenu:o}=yU(r,M(()=>t.index)),a=Qe("menu"),s=Qe("sub-menu"),l=ht("rootMenu");l||Hi(PT,"can not inject root menu");const u=ht(`subMenu:${o.value.uid}`);u||Hi(PT,"can not inject sub menu");const c=F({}),d=F({});let f;const h=F(!1),m=F(),g=F(null),y=M(()=>T.value==="horizontal"&&w.value?"bottom-start":"right-start"),b=M(()=>T.value==="horizontal"&&w.value||T.value==="vertical"&&!l.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?C.value?t.expandOpenIcon:t.expandCloseIcon:ld:t.collapseCloseIcon&&t.collapseOpenIcon?C.value?t.collapseOpenIcon:t.collapseCloseIcon:ba),w=M(()=>u.level===0),O=M(()=>{const q=t.teleported;return q===void 0?w.value:q}),S=M(()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),x=M(()=>T.value==="horizontal"&&w.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),C=M(()=>l.openedMenus.includes(t.index)),E=M(()=>{let q=!1;return Object.values(c.value).forEach(K=>{K.active&&(q=!0)}),Object.values(d.value).forEach(K=>{K.active&&(q=!0)}),q}),T=M(()=>l.props.mode),P=Sn({index:t.index,indexPath:i,active:E}),A=bU(l.props,u.level+1),D=M(()=>{var q;return(q=t.popperOffset)!=null?q:l.props.popperOffset}),N=M(()=>{var q;return(q=t.popperClass)!=null?q:l.props.popperClass}),$=M(()=>{var q;return(q=t.showTimeout)!=null?q:l.props.showTimeout}),W=M(()=>{var q;return(q=t.hideTimeout)!=null?q:l.props.hideTimeout}),L=()=>{var q,K,ie;return(ie=(K=(q=g.value)==null?void 0:q.popperRef)==null?void 0:K.popperInstanceRef)==null?void 0:ie.destroy()},I=q=>{q||L()},U=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||t.disabled||l.handleSubMenuClick({index:t.index,indexPath:i.value,active:E.value})},Q=(q,K=$.value)=>{var ie;if(q.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||t.disabled){u.mouseInChild.value=!0;return}u.mouseInChild.value=!0,f==null||f(),{stop:f}=Xh(()=>{l.openMenu(t.index,i.value)},K),O.value&&((ie=o.value.vnode.el)==null||ie.dispatchEvent(new MouseEvent("mouseenter")))}},V=(q=!1)=>{var K;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){u.mouseInChild.value=!1;return}f==null||f(),u.mouseInChild.value=!1,{stop:f}=Xh(()=>!h.value&&l.closeMenu(t.index,i.value),W.value),O.value&&q&&((K=u.handleMouseleave)==null||K.call(u,!0))};Ve(()=>l.props.collapse,q=>I(Boolean(q)));{const q=ie=>{d.value[ie.index]=ie},K=ie=>{delete d.value[ie.index]};_n(`subMenu:${r.uid}`,{addSubMenu:q,removeSubMenu:K,handleMouseleave:V,mouseInChild:h,level:u.level+1})}return n({opened:C}),Bt(()=>{l.addSubMenu(P),u.addSubMenu(P)}),pr(()=>{u.removeSubMenu(P),l.removeSubMenu(P)}),()=>{var q;const K=[(q=e.title)==null?void 0:q.call(e),Et(gt,{class:s.e("icon-arrow"),style:{transform:C.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>At(b.value)?Et(r.appContext.components[b.value]):Et(b.value)})],ie=l.isMenuPopup?Et(Ui,{ref:g,visible:C.value,effect:"light",pure:!0,offset:D.value,showArrow:!1,persistent:!0,popperClass:N.value,placement:y.value,teleported:O.value,fallbackPlacements:x.value,transition:S.value,gpuAcceleration:!1},{content:()=>{var oe;return Et("div",{class:[a.m(T.value),a.m("popup-container"),N.value],onMouseenter:Se=>Q(Se,100),onMouseleave:()=>V(!0),onFocus:Se=>Q(Se,100)},[Et("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${y.value}`)],style:A.value},[(oe=e.default)==null?void 0:oe.call(e)])])},default:()=>Et("div",{class:s.e("title"),onClick:U},K)}):Et(ct,{},[Et("div",{class:s.e("title"),ref:m,onClick:U},K),Et(Xx,{},{default:()=>{var oe;return Ht(Et("ul",{role:"menu",class:[a.b(),a.m("inline")],style:A.value},[(oe=e.default)==null?void 0:oe.call(e)]),[[zn,C.value]])}})]);return Et("li",{class:[s.b(),s.is("active",E.value),s.is("opened",C.value),s.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:C.value,onMouseenter:Q,onMouseleave:()=>V(),onFocus:Q},[ie])}}});const iIe=Ye({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Oe(Array),default:()=>Jr([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:fr,default:()=>bCe},popperEffect:{type:Oe(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),AT=t=>Array.isArray(t)&&t.every(e=>At(e)),oIe={close:(t,e)=>At(t)&&AT(e),open:(t,e)=>At(t)&&AT(e),select:(t,e,n,r)=>At(t)&&AT(e)&&sn(n)&&(r===void 0||r instanceof Promise)};var aIe=ue({name:"ElMenu",props:iIe,emits:oIe,setup(t,{emit:e,slots:n,expose:r}){const i=en(),o=i.appContext.config.globalProperties.$router,a=F(),s=Qe("menu"),l=Qe("sub-menu"),u=F(-1),c=F(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),d=F(t.defaultActive),f=F({}),h=F({}),m=M(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),g=()=>{const L=d.value&&f.value[d.value];if(!L||t.mode==="horizontal"||t.collapse)return;L.indexPath.forEach(U=>{const Q=h.value[U];Q&&y(U,Q.indexPath)})},y=(L,I)=>{c.value.includes(L)||(t.uniqueOpened&&(c.value=c.value.filter(U=>I.includes(U))),c.value.push(L),e("open",L,I))},b=L=>{const I=c.value.indexOf(L);I!==-1&&c.value.splice(I,1)},w=(L,I)=>{b(L),e("close",L,I)},O=({index:L,indexPath:I})=>{c.value.includes(L)?w(L,I):y(L,I)},S=L=>{(t.mode==="horizontal"||t.collapse)&&(c.value=[]);const{index:I,indexPath:U}=L;if(!(Dr(I)||Dr(U)))if(t.router&&o){const Q=L.route||I,V=o.push(Q).then(q=>(q||(d.value=I),q));e("select",I,U,{index:I,indexPath:U,route:Q},V)}else d.value=I,e("select",I,U,{index:I,indexPath:U})},x=L=>{const I=f.value,U=I[L]||d.value&&I[d.value]||I[t.defaultActive];U?d.value=U.index:d.value=L},C=L=>{const I=getComputedStyle(L),U=Number.parseInt(I.marginLeft,10),Q=Number.parseInt(I.marginRight,10);return L.offsetWidth+U+Q||0},E=()=>{var L,I;if(!a.value)return-1;const U=Array.from((I=(L=a.value)==null?void 0:L.childNodes)!=null?I:[]).filter(ke=>ke.nodeName!=="#comment"&&(ke.nodeName!=="#text"||ke.nodeValue)),Q=64,V=getComputedStyle(a.value),q=Number.parseInt(V.paddingLeft,10),K=Number.parseInt(V.paddingRight,10),ie=a.value.clientWidth-q-K;let oe=0,Se=0;return U.forEach((ke,Y)=>{oe+=C(ke),oe<=ie-Q&&(Se=Y+1)}),Se===U.length?-1:Se},T=L=>h.value[L].indexPath,P=(L,I=33.34)=>{let U;return()=>{U&&clearTimeout(U),U=setTimeout(()=>{L()},I)}};let A=!0;const D=()=>{if(u.value===E())return;const L=()=>{u.value=-1,Ot(()=>{u.value=E()})};A?L():P(L)(),A=!1};Ve(()=>t.defaultActive,L=>{f.value[L]||(d.value=""),x(L)}),Ve(()=>t.collapse,L=>{L&&(c.value=[])}),Ve(f.value,g);let N;Bo(()=>{t.mode==="horizontal"&&t.ellipsis?N=Zr(a,D).stop:N==null||N()});const $=F(!1);{const L=V=>{h.value[V.index]=V},I=V=>{delete h.value[V.index]};_n("rootMenu",Sn({props:t,openedMenus:c,items:f,subMenus:h,activeIndex:d,isMenuPopup:m,addMenuItem:V=>{f.value[V.index]=V},removeMenuItem:V=>{delete f.value[V.index]},addSubMenu:L,removeSubMenu:I,openMenu:y,closeMenu:w,handleMenuItemClick:S,handleSubMenuClick:O})),_n(`subMenu:${i.uid}`,{addSubMenu:L,removeSubMenu:I,mouseInChild:$,level:0})}Bt(()=>{t.mode==="horizontal"&&new KLe(i.vnode.el,s.namespace.value)}),r({open:I=>{const{indexPath:U}=h.value[I];U.forEach(Q=>y(Q,U))},close:b,handleResize:D});const W=bU(t,0);return()=>{var L,I;let U=(I=(L=n.default)==null?void 0:L.call(n))!=null?I:[];const Q=[];if(t.mode==="horizontal"&&a.value){const K=Kd(U),ie=u.value===-1?K:K.slice(0,u.value),oe=u.value===-1?[]:K.slice(u.value);(oe==null?void 0:oe.length)&&t.ellipsis&&(U=ie,Q.push(Et(nN,{index:"sub-menu-more",class:l.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>Et(gt,{class:l.e("icon-more")},{default:()=>Et(t.ellipsisIcon)}),default:()=>oe})))}const V=t.closeOnClickOutside?[[qc,()=>{!c.value.length||$.value||(c.value.forEach(K=>e("close",K,T(K))),c.value=[])}]]:[],q=Ht(Et("ul",{key:String(t.collapse),role:"menubar",ref:a,style:W.value,class:{[s.b()]:!0,[s.m(t.mode)]:!0,[s.m("collapse")]:t.collapse}},[...U,...Q]),V);return t.collapseTransition&&t.mode==="vertical"?Et(tIe,()=>q):q}}});const sIe=Ye({index:{type:Oe([String,null]),default:null},route:{type:Oe([String,Object])},disabled:Boolean}),lIe={click:t=>At(t.index)&&Array.isArray(t.indexPath)},MT="ElMenuItem",uIe=ue({name:MT,components:{ElTooltip:Ui},props:sIe,emits:lIe,setup(t,{emit:e}){const n=en(),r=ht("rootMenu"),i=Qe("menu"),o=Qe("menu-item");r||Hi(MT,"can not inject root menu");const{parentMenu:a,indexPath:s}=yU(n,er(t,"index")),l=ht(`subMenu:${a.value.uid}`);l||Hi(MT,"can not inject sub menu");const u=M(()=>t.index===r.activeIndex),c=Sn({index:t.index,indexPath:s,active:u}),d=()=>{t.disabled||(r.handleMenuItemClick({index:t.index,indexPath:s.value,route:t.route}),e("click",c))};return Bt(()=>{l.addSubMenu(c),r.addMenuItem(c)}),pr(()=>{l.removeSubMenu(c),r.removeMenuItem(c)}),{parentMenu:a,rootMenu:r,active:u,nsMenu:i,nsMenuItem:o,handleClick:d}}});function cIe(t,e,n,r,i,o){const a=an("el-tooltip");return R(),G("li",{class:j([t.nsMenuItem.b(),t.nsMenuItem.is("active",t.active),t.nsMenuItem.is("disabled",t.disabled)]),role:"menuitem",tabindex:"-1",onClick:t.handleClick},[t.parentMenu.type.name==="ElMenu"&&t.rootMenu.props.collapse&&t.$slots.title?(R(),we(a,{key:0,effect:t.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:z(()=>[xe(t.$slots,"title")]),default:z(()=>[J("div",{class:j(t.nsMenu.be("tooltip","trigger"))},[xe(t.$slots,"default")],2)]),_:3},8,["effect"])):(R(),G(ct,{key:1},[xe(t.$slots,"default"),xe(t.$slots,"title")],64))],10,["onClick"])}var _U=Ge(uIe,[["render",cIe],["__file","menu-item.vue"]]);const dIe={title:String},fIe="ElMenuItemGroup",hIe=ue({name:fIe,props:dIe,setup(){return{ns:Qe("menu-item-group")}}});function pIe(t,e,n,r,i,o){return R(),G("li",{class:j(t.ns.b())},[J("div",{class:j(t.ns.e("title"))},[t.$slots.title?xe(t.$slots,"title",{key:1}):(R(),G(ct,{key:0},[qe(je(t.title),1)],64))],2),J("ul",null,[xe(t.$slots,"default")])],2)}var OU=Ge(hIe,[["render",pIe],["__file","menu-item-group.vue"]]);const gIe=Vt(aIe,{MenuItem:_U,MenuItemGroup:OU,SubMenu:nN}),mIe=ti(_U),vIe=ti(OU),yIe=ti(nN),bIe=Ye({icon:{type:fr,default:()=>jxe},title:String,content:{type:String,default:""}}),_Ie={back:()=>!0},OIe=ue({name:"ElPageHeader"}),wIe=ue({...OIe,props:bIe,emits:_Ie,setup(t,{emit:e}){const n=Ji(),{t:r}=kn(),i=Qe("page-header"),o=M(()=>[i.b(),{[i.m("has-breadcrumb")]:!!n.breadcrumb,[i.m("has-extra")]:!!n.extra,[i.is("contentful")]:!!n.default}]);function a(){e("back")}return(s,l)=>(R(),G("div",{class:j(p(o))},[s.$slots.breadcrumb?(R(),G("div",{key:0,class:j(p(i).e("breadcrumb"))},[xe(s.$slots,"breadcrumb")],2)):_e("v-if",!0),J("div",{class:j(p(i).e("header"))},[J("div",{class:j(p(i).e("left"))},[J("div",{class:j(p(i).e("back")),role:"button",tabindex:"0",onClick:a},[s.icon||s.$slots.icon?(R(),G("div",{key:0,"aria-label":s.title||p(r)("el.pageHeader.title"),class:j(p(i).e("icon"))},[xe(s.$slots,"icon",{},()=>[s.icon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(s.icon)))]),_:1})):_e("v-if",!0)])],10,["aria-label"])):_e("v-if",!0),J("div",{class:j(p(i).e("title"))},[xe(s.$slots,"title",{},()=>[qe(je(s.title||p(r)("el.pageHeader.title")),1)])],2)],2),B(p(oU),{direction:"vertical"}),J("div",{class:j(p(i).e("content"))},[xe(s.$slots,"content",{},()=>[qe(je(s.content),1)])],2)],2),s.$slots.extra?(R(),G("div",{key:0,class:j(p(i).e("extra"))},[xe(s.$slots,"extra")],2)):_e("v-if",!0)],2),s.$slots.default?(R(),G("div",{key:1,class:j(p(i).e("main"))},[xe(s.$slots,"default")],2)):_e("v-if",!0)],2))}});var SIe=Ge(wIe,[["__file","page-header.vue"]]);const xIe=Vt(SIe),wU=Symbol("elPaginationKey"),CIe=Ye({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:fr}}),EIe={click:t=>t instanceof MouseEvent},TIe=ue({name:"ElPaginationPrev"}),kIe=ue({...TIe,props:CIe,emits:EIe,setup(t){const e=t,{t:n}=kn(),r=M(()=>e.disabled||e.currentPage<=1);return(i,o)=>(R(),G("button",{type:"button",class:"btn-prev",disabled:p(r),"aria-label":i.prevText||p(n)("el.pagination.prev"),"aria-disabled":p(r),onClick:a=>i.$emit("click",a)},[i.prevText?(R(),G("span",{key:0},je(i.prevText),1)):(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(i.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var PIe=Ge(kIe,[["__file","prev.vue"]]);const AIe=Ye({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:fr}}),MIe=ue({name:"ElPaginationNext"}),RIe=ue({...MIe,props:AIe,emits:["click"],setup(t){const e=t,{t:n}=kn(),r=M(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(i,o)=>(R(),G("button",{type:"button",class:"btn-next",disabled:p(r),"aria-label":i.nextText||p(n)("el.pagination.next"),"aria-disabled":p(r),onClick:a=>i.$emit("click",a)},[i.nextText?(R(),G("span",{key:0},je(i.nextText),1)):(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(i.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var $Ie=Ge(RIe,[["__file","next.vue"]]);const SU=Symbol("ElSelectGroup"),Ym=Symbol("ElSelect");function NIe(t,e){const n=ht(Ym),r=ht(SU,{disabled:!1}),i=M(()=>c($o(n.props.modelValue),t.value)),o=M(()=>{var h;if(n.props.multiple){const m=$o((h=n.props.modelValue)!=null?h:[]);return!i.value&&m.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),a=M(()=>t.label||(sn(t.value)?"":t.value)),s=M(()=>t.value||t.label||""),l=M(()=>t.disabled||e.groupDisabled||o.value),u=en(),c=(h=[],m)=>{if(sn(t.value)){const g=n.props.valueKey;return h&&h.some(y=>Bn(Wr(y,g))===Wr(m,g))}else return h&&h.includes(m)},d=()=>{!t.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=h=>{const m=new RegExp(n$(h),"i");e.visible=m.test(a.value)||t.created};return Ve(()=>a.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Ve(()=>t.value,(h,m)=>{const{remote:g,valueKey:y}=n.props;if(h!==m&&(n.onOptionDestroy(m,u.proxy),n.onOptionCreate(u.proxy)),!t.created&&!g){if(y&&sn(h)&&sn(m)&&h[y]===m[y])return;n.setSelected()}}),Ve(()=>r.disabled,()=>{e.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:f}}const DIe=ue({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=Qe("select"),n=bo(),r=M(()=>[e.be("dropdown","item"),e.is("disabled",p(s)),e.is("selected",p(a)),e.is("hovering",p(f))]),i=Sn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c}=NIe(t,i),{visible:d,hover:f}=Ri(i),h=en().proxy;l.onOptionCreate(h),pr(()=>{const g=h.value,{selected:y}=l.states,w=(l.props.multiple?y:[y]).some(O=>O.value===h.value);Ot(()=>{l.states.cachedOptions.get(g)===h&&!w&&l.states.cachedOptions.delete(g)}),l.onOptionDestroy(g,h)});function m(){s.value||l.handleOptionSelect(h)}return{ns:e,id:n,containerKls:r,currentLabel:o,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c,visible:d,hover:f,selectOptionClick:m,states:i}}});function LIe(t,e,n,r,i,o){return Ht((R(),G("li",{id:t.id,class:j(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:t.hoverItem,onClick:Pt(t.selectOptionClick,["stop"])},[xe(t.$slots,"default",{},()=>[J("span",null,je(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[zn,t.visible]])}var rN=Ge(DIe,[["render",LIe],["__file","option.vue"]]);const IIe=ue({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=ht(Ym),e=Qe("select"),n=M(()=>t.props.popperClass),r=M(()=>t.props.multiple),i=M(()=>t.props.fitInputWidth),o=F("");function a(){var s;o.value=`${(s=t.selectRef)==null?void 0:s.offsetWidth}px`}return Bt(()=>{a(),Zr(t.selectRef,a)}),{ns:e,minWidth:o,popperClass:n,isMultiple:r,isFitInputWidth:i}}});function BIe(t,e,n,r,i,o){return R(),G("div",{class:j([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:mt({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(R(),G("div",{key:0,class:j(t.ns.be("dropdown","header"))},[xe(t.$slots,"header")],2)):_e("v-if",!0),xe(t.$slots,"default"),t.$slots.footer?(R(),G("div",{key:1,class:j(t.ns.be("dropdown","footer"))},[xe(t.$slots,"footer")],2)):_e("v-if",!0)],6)}var FIe=Ge(IIe,[["render",BIe],["__file","select-dropdown.vue"]]);const VIe=11,jIe=(t,e)=>{const{t:n}=kn(),r=bo(),i=Qe("select"),o=Qe("input"),a=Sn({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),s=F(null),l=F(null),u=F(null),c=F(null),d=F(null),f=F(null),h=F(null),m=F(null),g=F(null),y=F(null),b=F(null),w=F(null),{isComposing:O,handleCompositionStart:S,handleCompositionUpdate:x,handleCompositionEnd:C}=Qx({afterComposition:et=>Ke(et)}),{wrapperRef:E,isFocused:T,handleBlur:P}=Pb(d,{beforeFocus(){return U.value},afterFocus(){t.automaticDropdown&&!A.value&&(A.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(et){var Mt,Vn;return((Mt=u.value)==null?void 0:Mt.isFocusInsideContent(et))||((Vn=c.value)==null?void 0:Vn.isFocusInsideContent(et))},afterBlur(){A.value=!1,a.menuVisibleOnFocus=!1}}),A=F(!1),D=F(),{form:N,formItem:$}=ua(),{inputId:W}=gu(t,{formItemContext:$}),{valueOnClear:L,isEmptyValue:I}=Hx(t),U=M(()=>t.disabled||(N==null?void 0:N.disabled)),Q=M(()=>ut(t.modelValue)?t.modelValue.length>0:!I(t.modelValue)),V=M(()=>t.clearable&&!U.value&&a.inputHovering&&Q.value),q=M(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),K=M(()=>i.is("reverse",q.value&&A.value)),ie=M(()=>($==null?void 0:$.validateState)||""),oe=M(()=>p$[ie.value]),Se=M(()=>t.remote?300:0),ke=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!a.inputValue&&a.options.size===0?!1:t.filterable&&a.inputValue&&a.options.size>0&&Y.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),Y=M(()=>re.value.filter(et=>et.visible).length),re=M(()=>{const et=Array.from(a.options.values()),Mt=[];return a.optionValues.forEach(Vn=>{const zt=et.findIndex(Li=>Li.value===Vn);zt>-1&&Mt.push(et[zt])}),Mt.length>=et.length?Mt:et}),te=M(()=>Array.from(a.cachedOptions.values())),ge=M(()=>{const et=re.value.filter(Mt=>!Mt.created).some(Mt=>Mt.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!et}),Re=()=>{t.filterable&&$t(t.filterMethod)||t.filterable&&t.remote&&$t(t.remoteMethod)||re.value.forEach(et=>{var Mt;(Mt=et.updateOption)==null||Mt.call(et,a.inputValue)})},$e=Ni(),Z=M(()=>["small"].includes($e.value)?"small":"default"),ce=M({get(){return A.value&&ke.value!==!1},set(et){A.value=et}}),Te=M(()=>{if(t.multiple&&!ai(t.modelValue))return $o(t.modelValue).length===0&&!a.inputValue;const et=ut(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||ai(et)?!a.inputValue:!0}),Ie=M(()=>{var et;const Mt=(et=t.placeholder)!=null?et:n("el.select.placeholder");return t.multiple||!Q.value?Mt:a.selectedLabel}),ae=M(()=>nk?null:"mouseenter");Ve(()=>t.modelValue,(et,Mt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",me("")),X(),!so(et,Mt)&&t.validateEvent&&($==null||$.validate("change").catch(Vn=>void 0))},{flush:"post",deep:!0}),Ve(()=>A.value,et=>{et?me(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",et)}),Ve(()=>a.options.entries(),()=>{var et;if(!Tn)return;const Mt=((et=s.value)==null?void 0:et.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!ai(t.modelValue)||!Array.from(Mt).includes(document.activeElement))&&X(),t.defaultFirstOption&&(t.filterable||t.remote)&&Y.value&&Ae()},{flush:"post"}),Ve(()=>a.hoveringIndex,et=>{kt(et)&&et>-1?D.value=re.value[et]||{}:D.value={},re.value.forEach(Mt=>{Mt.hover=D.value===Mt})}),Bo(()=>{a.isBeforeHide||Re()});const me=et=>{a.previousQuery===et||O.value||(a.previousQuery=et,t.filterable&&$t(t.filterMethod)?t.filterMethod(et):t.filterable&&t.remote&&$t(t.remoteMethod)&&t.remoteMethod(et),t.defaultFirstOption&&(t.filterable||t.remote)&&Y.value?Ot(Ae):Ot(le))},Ae=()=>{const et=re.value.filter(zt=>zt.visible&&!zt.disabled&&!zt.states.groupDisabled),Mt=et.find(zt=>zt.created),Vn=et[0];a.hoveringIndex=Le(re.value,Mt||Vn)},X=()=>{if(t.multiple)a.selectedLabel="";else{const Mt=ut(t.modelValue)?t.modelValue[0]:t.modelValue,Vn=ee(Mt);a.selectedLabel=Vn.currentLabel,a.selected=[Vn];return}const et=[];ai(t.modelValue)||$o(t.modelValue).forEach(Mt=>{et.push(ee(Mt))}),a.selected=et},ee=et=>{let Mt;const Vn=u1(et).toLowerCase()==="object",zt=u1(et).toLowerCase()==="null",Li=u1(et).toLowerCase()==="undefined";for(let po=a.cachedOptions.size-1;po>=0;po--){const Ei=te.value[po];if(Vn?Wr(Ei.value,t.valueKey)===Wr(et,t.valueKey):Ei.value===et){Mt={value:et,currentLabel:Ei.currentLabel,get isDisabled(){return Ei.isDisabled}};break}}if(Mt)return Mt;const Eo=Vn?et.label:!zt&&!Li?et:"";return{value:et,currentLabel:Eo}},le=()=>{a.hoveringIndex=re.value.findIndex(et=>a.selected.some(Mt=>Er(Mt)===Er(et)))},Ce=()=>{a.selectionWidth=l.value.getBoundingClientRect().width},fe=()=>{a.calculatorWidth=f.value.getBoundingClientRect().width},Ee=()=>{a.collapseItemWidth=b.value.getBoundingClientRect().width},be=()=>{var et,Mt;(Mt=(et=u.value)==null?void 0:et.updatePopper)==null||Mt.call(et)},Be=()=>{var et,Mt;(Mt=(et=c.value)==null?void 0:et.updatePopper)==null||Mt.call(et)},Xe=()=>{a.inputValue.length>0&&!A.value&&(A.value=!0),me(a.inputValue)},Ke=et=>{if(a.inputValue=et.target.value,t.remote)tt();else return Xe()},tt=jo(()=>{Xe()},Se.value),Dt=et=>{so(t.modelValue,et)||e(Lr,et)},jt=et=>kx(et,Mt=>!a.disabledOptions.has(Mt)),Me=et=>{if(!!t.multiple&&et.code!==St.delete&&et.target.value.length<=0){const Mt=$o(t.modelValue).slice(),Vn=jt(Mt);if(Vn<0)return;const zt=Mt[Vn];Mt.splice(Vn,1),e(Zt,Mt),Dt(Mt),e("remove-tag",zt)}},nt=(et,Mt)=>{const Vn=a.selected.indexOf(Mt);if(Vn>-1&&!U.value){const zt=$o(t.modelValue).slice();zt.splice(Vn,1),e(Zt,zt),Dt(zt),e("remove-tag",Mt.value)}et.stopPropagation(),ln()},de=et=>{et.stopPropagation();const Mt=t.multiple?[]:L.value;if(t.multiple)for(const Vn of a.selected)Vn.isDisabled&&Mt.push(Vn.value);e(Zt,Mt),Dt(Mt),a.hoveringIndex=-1,A.value=!1,e("clear"),ln()},Pe=et=>{var Mt;if(t.multiple){const Vn=$o((Mt=t.modelValue)!=null?Mt:[]).slice(),zt=Le(Vn,et.value);zt>-1?Vn.splice(zt,1):(t.multipleLimit<=0||Vn.length<t.multipleLimit)&&Vn.push(et.value),e(Zt,Vn),Dt(Vn),et.created&&me(""),t.filterable&&!t.reserveKeyword&&(a.inputValue="")}else e(Zt,et.value),Dt(et.value),A.value=!1;ln(),!A.value&&Ot(()=>{wt(et)})},Le=(et=[],Mt)=>{if(!sn(Mt))return et.indexOf(Mt);const Vn=t.valueKey;let zt=-1;return et.some((Li,Eo)=>Bn(Wr(Li,Vn))===Wr(Mt,Vn)?(zt=Eo,!0):!1),zt},wt=et=>{var Mt,Vn,zt,Li,Eo;const Wo=ut(et)?et[0]:et;let po=null;if(Wo!=null&&Wo.value){const Ei=re.value.filter(Uo=>Uo.value===Wo.value);Ei.length>0&&(po=Ei[0].$el)}if(u.value&&po){const Ei=(Li=(zt=(Vn=(Mt=u.value)==null?void 0:Mt.popperRef)==null?void 0:Vn.contentRef)==null?void 0:zt.querySelector)==null?void 0:Li.call(zt,`.${i.be("dropdown","wrap")}`);Ei&&i$(Ei,po)}(Eo=w.value)==null||Eo.handleScroll()},tn=et=>{a.options.set(et.value,et),a.cachedOptions.set(et.value,et),et.disabled&&a.disabledOptions.set(et.value,et)},De=(et,Mt)=>{a.options.get(et)===Mt&&a.options.delete(et)},xt=M(()=>{var et,Mt;return(Mt=(et=u.value)==null?void 0:et.popperRef)==null?void 0:Mt.contentRef}),qt=()=>{a.isBeforeHide=!1,Ot(()=>wt(a.selected))},ln=()=>{var et;(et=d.value)==null||et.focus()},nn=()=>{var et;if(A.value){A.value=!1,Ot(()=>{var Mt;return(Mt=d.value)==null?void 0:Mt.blur()});return}(et=d.value)==null||et.blur()},bn=et=>{de(et)},Ze=et=>{if(A.value=!1,T.value){const Mt=new FocusEvent("focus",et);Ot(()=>P(Mt))}},Rt=()=>{a.inputValue.length>0?a.inputValue="":A.value=!1},xn=()=>{U.value||(nk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:A.value=!A.value)},fn=()=>{A.value?re.value[a.hoveringIndex]&&Pe(re.value[a.hoveringIndex]):xn()},Er=et=>sn(et.value)?Wr(et.value,t.valueKey):et.value,dr=M(()=>re.value.filter(et=>et.visible).every(et=>et.disabled)),eo=M(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),Pi=M(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Oi=et=>{if(!A.value){A.value=!0;return}if(!(a.options.size===0||a.filteredOptionsCount===0||O.value)&&!dr.value){et==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):et==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Mt=re.value[a.hoveringIndex];(Mt.disabled===!0||Mt.states.groupDisabled===!0||!Mt.visible)&&Oi(et),Ot(()=>wt(D.value))}},Ml=()=>{if(!l.value)return 0;const et=window.getComputedStyle(l.value);return Number.parseFloat(et.gap||"6px")},cs=M(()=>{const et=Ml();return{maxWidth:`${b.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-et:a.selectionWidth}px`}}),_r=M(()=>({maxWidth:`${a.selectionWidth}px`})),Rl=M(()=>({width:`${Math.max(a.calculatorWidth,VIe)}px`}));return Zr(l,Ce),Zr(f,fe),Zr(g,be),Zr(E,be),Zr(y,Be),Zr(b,Ee),Bt(()=>{X()}),{inputId:W,contentId:r,nsSelect:i,nsInput:o,states:a,isFocused:T,expanded:A,optionsArray:re,hoverOption:D,selectSize:$e,filteredOptionsCount:Y,resetCalculatorWidth:fe,updateTooltip:be,updateTagTooltip:Be,debouncedOnInputChange:tt,onInput:Ke,deletePrevTag:Me,deleteTag:nt,deleteSelected:de,handleOptionSelect:Pe,scrollToOption:wt,hasModelValue:Q,shouldShowPlaceholder:Te,currentPlaceholder:Ie,mouseEnterEventName:ae,showClose:V,iconComponent:q,iconReverse:K,validateState:ie,validateIcon:oe,showNewOption:ge,updateOptions:Re,collapseTagSize:Z,setSelected:X,selectDisabled:U,emptyText:ke,handleCompositionStart:S,handleCompositionUpdate:x,handleCompositionEnd:C,onOptionCreate:tn,onOptionDestroy:De,handleMenuEnter:qt,focus:ln,blur:nn,handleClearClick:bn,handleClickOutside:Ze,handleEsc:Rt,toggleMenu:xn,selectOption:fn,getValueKey:Er,navigateOptions:Oi,dropdownMenuVisible:ce,showTagList:eo,collapseTagList:Pi,tagStyle:cs,collapseTagStyle:_r,inputStyle:Rl,popperRef:xt,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:f,prefixRef:h,suffixRef:m,selectRef:s,wrapperRef:E,selectionRef:l,scrollbarRef:w,menuRef:g,tagMenuRef:y,collapseItemRef:b}};var zIe=ue({name:"ElOptions",setup(t,{slots:e}){const n=ht(Ym);let r=[];return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];function l(u){!ut(u)||u.forEach(c=>{var d,f,h,m;const g=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;g==="ElOptionGroup"?l(!At(c.children)&&!ut(c.children)&&$t((f=c.children)==null?void 0:f.default)?(h=c.children)==null?void 0:h.default():c.children):g==="ElOption"?s.push((m=c.props)==null?void 0:m.value):ut(c.children)&&l(c.children)})}return a.length&&l((o=a[0])==null?void 0:o.children),so(s,r)||(r=s,n&&(n.states.optionValues=s)),a}}});const QIe=Ye({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Wi,effect:{type:Oe(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:io.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:fr,default:Bf},fitInputWidth:Boolean,suffixIcon:{type:fr,default:ld},tagType:{...ip.type,default:"info"},tagEffect:{...ip.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:Oe(String),values:ud,default:"bottom-start"},fallbackPlacements:{type:Oe(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Wm,...wo(["ariaLabel"])}),P8="ElSelect",HIe=ue({name:P8,componentName:P8,components:{ElSelectMenu:FIe,ElOption:rN,ElOptions:zIe,ElTag:Bs,ElScrollbar:mu,ElTooltip:Ui,ElIcon:gt},directives:{ClickOutside:qc},props:QIe,emits:[Zt,Lr,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const n=M(()=>{const{modelValue:a,multiple:s}=t,l=s?[]:void 0;return ut(a)?s?a:l:s?l:a}),r=Sn({...Ri(t),modelValue:n}),i=jIe(r,e);_n(Ym,Sn({props:r,states:i.states,optionsArray:i.optionsArray,handleOptionSelect:i.handleOptionSelect,onOptionCreate:i.onOptionCreate,onOptionDestroy:i.onOptionDestroy,selectRef:i.selectRef,setSelected:i.setSelected}));const o=M(()=>t.multiple?i.states.selected.map(a=>a.currentLabel):i.states.selectedLabel);return{...i,modelValue:n,selectedLabel:o}}});function WIe(t,e,n,r,i,o){const a=an("el-tag"),s=an("el-tooltip"),l=an("el-icon"),u=an("el-option"),c=an("el-options"),d=an("el-scrollbar"),f=an("el-select-menu"),h=dx("click-outside");return Ht((R(),G("div",{ref:"selectRef",class:j([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[gy(t.mouseEnterEventName)]:m=>t.states.inputHovering=!0,onMouseleave:m=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"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,onBeforeShow:t.handleMenuEnter,onHide:m=>t.states.isBeforeHide=!1},{default:z(()=>{var m;return[J("div",{ref:"wrapperRef",class:j([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:Pt(t.toggleMenu,["prevent"])},[t.$slots.prefix?(R(),G("div",{key:0,ref:"prefixRef",class:j(t.nsSelect.e("prefix"))},[xe(t.$slots,"prefix")],2)):_e("v-if",!0),J("div",{ref:"selectionRef",class:j([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?xe(t.$slots,"tag",{key:0},()=>[(R(!0),G(ct,null,Wt(t.showTagList,g=>(R(),G("div",{key:t.getValueKey(g),class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.tagStyle),onClose:y=>t.deleteTag(y,g)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[qe(je(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(R(),we(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:z(()=>[J("div",{ref:"collapseItemRef",class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.collapseTagStyle)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))}," + "+je(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:z(()=>[J("div",{ref:"tagMenuRef",class:j(t.nsSelect.e("selection"))},[(R(!0),G(ct,null,Wt(t.collapseTagList,g=>(R(),G("div",{key:t.getValueKey(g),class:j(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:y=>t.deleteTag(y,g)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[qe(je(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):_e("v-if",!0)]):_e("v-if",!0),t.selectDisabled?_e("v-if",!0):(R(),G("div",{key:1,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Ht(J("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":g=>t.states.inputValue=g,type:"text",name:t.name,class:j([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:mt(t.inputStyle),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:[br(Pt(g=>t.navigateOptions("next"),["stop","prevent"]),["down"]),br(Pt(g=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),br(Pt(t.handleEsc,["stop","prevent"]),["esc"]),br(Pt(t.selectOption,["stop","prevent"]),["enter"]),br(Pt(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:Pt(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[JM,t.states.inputValue]]),t.filterable?(R(),G("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:j(t.nsSelect.e("input-calculator")),textContent:je(t.states.inputValue)},null,10,["textContent"])):_e("v-if",!0)],2)),t.shouldShowPlaceholder?(R(),G("div",{key:2,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?xe(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[J("span",null,je(t.currentPlaceholder),1)]):(R(),G("span",{key:1},je(t.currentPlaceholder),1))],2)):_e("v-if",!0)],2),J("div",{ref:"suffixRef",class:j(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(R(),we(l,{key:0,class:j([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])):_e("v-if",!0),t.showClose&&t.clearIcon?(R(),we(l,{key:1,class:j([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:z(()=>[(R(),we(un(t.clearIcon)))]),_:1},8,["class","onClick"])):_e("v-if",!0),t.validateState&&t.validateIcon?(R(),we(l,{key:2,class:j([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:z(()=>[(R(),we(un(t.validateIcon)))]),_:1},8,["class"])):_e("v-if",!0)],2)],10,["onClick"])]}),content:z(()=>[B(f,{ref:"menuRef"},{default:z(()=>[t.$slots.header?(R(),G("div",{key:0,class:j(t.nsSelect.be("dropdown","header")),onClick:Pt(()=>{},["stop"])},[xe(t.$slots,"header")],10,["onClick"])):_e("v-if",!0),Ht(B(d,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:j([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:z(()=>[t.showNewOption?(R(),we(u,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):_e("v-if",!0),B(c,null,{default:z(()=>[xe(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[zn,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(R(),G("div",{key:1,class:j(t.nsSelect.be("dropdown","loading"))},[xe(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(R(),G("div",{key:2,class:j(t.nsSelect.be("dropdown","empty"))},[xe(t.$slots,"empty",{},()=>[J("span",null,je(t.emptyText),1)])],2)):_e("v-if",!0),t.$slots.footer?(R(),G("div",{key:3,class:j(t.nsSelect.be("dropdown","footer")),onClick:Pt(()=>{},["stop"])},[xe(t.$slots,"footer")],10,["onClick"])):_e("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[h,t.handleClickOutside,t.popperRef]])}var UIe=Ge(HIe,[["render",WIe],["__file","select.vue"]]);const qIe=ue({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Qe("select"),n=F(null),r=en(),i=F([]);_n(SU,Sn({...Ri(t)}));const o=M(()=>i.value.some(u=>u.visible===!0)),a=u=>{var c,d;return((c=u.type)==null?void 0:c.name)==="ElOption"&&!!((d=u.component)!=null&&d.proxy)},s=u=>{const c=$o(u),d=[];return c.forEach(f=>{var h,m;a(f)?d.push(f.component.proxy):(h=f.children)!=null&&h.length?d.push(...s(f.children)):(m=f.component)!=null&&m.subTree&&d.push(...s(f.component.subTree))}),d},l=()=>{i.value=s(r.subTree)};return Bt(()=>{l()}),l7(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function YIe(t,e,n,r,i,o){return Ht((R(),G("ul",{ref:"groupRef",class:j(t.ns.be("group","wrap"))},[J("li",{class:j(t.ns.be("group","title"))},je(t.label),3),J("li",null,[J("ul",{class:j(t.ns.b("group"))},[xe(t.$slots,"default")],2)])],2)),[[zn,t.visible]])}var xU=Ge(qIe,[["render",YIe],["__file","option-group.vue"]]);const Ol=Vt(UIe,{Option:rN,OptionGroup:xU}),Yc=ti(rN),XIe=ti(xU),iN=()=>ht(wU,{}),ZIe=Ye({pageSize:{type:Number,required:!0},pageSizes:{type:Oe(Array),default:()=>Jr([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:cc},appendSizeTo:String}),GIe=ue({name:"ElPaginationSizes"}),KIe=ue({...GIe,props:ZIe,emits:["page-size-change"],setup(t,{emit:e}){const n=t,{t:r}=kn(),i=Qe("pagination"),o=iN(),a=F(n.pageSize);Ve(()=>n.pageSizes,(u,c)=>{if(!so(u,c)&&Array.isArray(u)){const d=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];e("page-size-change",d)}}),Ve(()=>n.pageSize,u=>{a.value=u});const s=M(()=>n.pageSizes);function l(u){var c;u!==a.value&&(a.value=u,(c=o.handleSizeChange)==null||c.call(o,Number(u)))}return(u,c)=>(R(),G("span",{class:j(p(i).e("sizes"))},[B(p(Ol),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:l},{default:z(()=>[(R(!0),G(ct,null,Wt(p(s),d=>(R(),we(p(Yc),{key:d,value:d,label:d+p(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var JIe=Ge(KIe,[["__file","sizes.vue"]]);const e3e=Ye({size:{type:String,values:cc}}),t3e=ue({name:"ElPaginationJumper"}),n3e=ue({...t3e,props:e3e,setup(t){const{t:e}=kn(),n=Qe("pagination"),{pageCount:r,disabled:i,currentPage:o,changeEvent:a}=iN(),s=F(),l=M(()=>{var d;return(d=s.value)!=null?d:o==null?void 0:o.value});function u(d){s.value=d?+d:""}function c(d){d=Math.trunc(+d),a==null||a(d),s.value=void 0}return(d,f)=>(R(),G("span",{class:j(p(n).e("jump")),disabled:p(i)},[J("span",{class:j([p(n).e("goto")])},je(p(e)("el.pagination.goto")),3),B(p(hi),{size:d.size,class:j([p(n).e("editor"),p(n).is("in-pagination")]),min:1,max:p(r),disabled:p(i),"model-value":p(l),"validate-event":!1,"aria-label":p(e)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","aria-label"]),J("span",{class:j([p(n).e("classifier")])},je(p(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var r3e=Ge(n3e,[["__file","jumper.vue"]]);const i3e=Ye({total:{type:Number,default:1e3}}),o3e=ue({name:"ElPaginationTotal"}),a3e=ue({...o3e,props:i3e,setup(t){const{t:e}=kn(),n=Qe("pagination"),{disabled:r}=iN();return(i,o)=>(R(),G("span",{class:j(p(n).e("total")),disabled:p(r)},je(p(e)("el.pagination.total",{total:i.total})),11,["disabled"]))}});var s3e=Ge(a3e,[["__file","total.vue"]]);const l3e=Ye({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),u3e=ue({name:"ElPaginationPager"}),c3e=ue({...u3e,props:l3e,emits:["change"],setup(t,{emit:e}){const n=t,r=Qe("pager"),i=Qe("icon"),{t:o}=kn(),a=F(!1),s=F(!1),l=F(!1),u=F(!1),c=F(!1),d=F(!1),f=M(()=>{const S=n.pagerCount,x=(S-1)/2,C=Number(n.currentPage),E=Number(n.pageCount);let T=!1,P=!1;E>S&&(C>S-x&&(T=!0),C<E-x&&(P=!0));const A=[];if(T&&!P){const D=E-(S-2);for(let N=D;N<E;N++)A.push(N)}else if(!T&&P)for(let D=2;D<S;D++)A.push(D);else if(T&&P){const D=Math.floor(S/2)-1;for(let N=C-D;N<=C+D;N++)A.push(N)}else for(let D=2;D<E;D++)A.push(D);return A}),h=M(()=>["more","btn-quickprev",i.b(),r.is("disabled",n.disabled)]),m=M(()=>["more","btn-quicknext",i.b(),r.is("disabled",n.disabled)]),g=M(()=>n.disabled?-1:0);Bo(()=>{const S=(n.pagerCount-1)/2;a.value=!1,s.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-S&&(a.value=!0),n.currentPage<n.pageCount-S&&(s.value=!0))});function y(S=!1){n.disabled||(S?l.value=!0:u.value=!0)}function b(S=!1){S?c.value=!0:d.value=!0}function w(S){const x=S.target;if(x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("number")){const C=Number(x.textContent);C!==n.currentPage&&e("change",C)}else x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("more")&&O(S)}function O(S){const x=S.target;if(x.tagName.toLowerCase()==="ul"||n.disabled)return;let C=Number(x.textContent);const E=n.pageCount,T=n.currentPage,P=n.pagerCount-2;x.className.includes("more")&&(x.className.includes("quickprev")?C=T-P:x.className.includes("quicknext")&&(C=T+P)),Number.isNaN(+C)||(C<1&&(C=1),C>E&&(C=E)),C!==T&&e("change",C)}return(S,x)=>(R(),G("ul",{class:j(p(r).b()),onClick:O,onKeyup:br(w,["enter"])},[S.pageCount>0?(R(),G("li",{key:0,class:j([[p(r).is("active",S.currentPage===1),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":p(o)("el.pagination.currentPage",{pager:1}),tabindex:p(g)}," 1 ",10,["aria-current","aria-label","tabindex"])):_e("v-if",!0),a.value?(R(),G("li",{key:1,class:j(p(h)),tabindex:p(g),"aria-label":p(o)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:C=>y(!0),onMouseleave:C=>l.value=!1,onFocus:C=>b(!0),onBlur:C=>c.value=!1},[(l.value||c.value)&&!S.disabled?(R(),we(p(vf),{key:0})):(R(),we(p(Oy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):_e("v-if",!0),(R(!0),G(ct,null,Wt(p(f),C=>(R(),G("li",{key:C,class:j([[p(r).is("active",S.currentPage===C),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===C,"aria-label":p(o)("el.pagination.currentPage",{pager:C}),tabindex:p(g)},je(C),11,["aria-current","aria-label","tabindex"]))),128)),s.value?(R(),G("li",{key:2,class:j(p(m)),tabindex:p(g),"aria-label":p(o)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:C=>y(),onMouseleave:C=>u.value=!1,onFocus:C=>b(),onBlur:C=>d.value=!1},[(u.value||d.value)&&!S.disabled?(R(),we(p(yf),{key:0})):(R(),we(p(Oy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):_e("v-if",!0),S.pageCount>1?(R(),G("li",{key:3,class:j([[p(r).is("active",S.currentPage===S.pageCount),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":p(o)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:p(g)},je(S.pageCount),11,["aria-current","aria-label","tabindex"])):_e("v-if",!0)],42,["onKeyup"]))}});var d3e=Ge(c3e,[["__file","pager.vue"]]);const ga=t=>typeof t!="number",f3e=Ye({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>kt(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:Oe(Array),default:()=>Jr([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:fr,default:()=>mf},nextText:{type:String,default:""},nextIcon:{type:fr,default:()=>ba},teleported:{type:Boolean,default:!0},small:Boolean,size:Wi,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),h3e={"update:current-page":t=>kt(t),"update:page-size":t=>kt(t),"size-change":t=>kt(t),change:(t,e)=>kt(t)&&kt(e),"current-change":t=>kt(t),"prev-click":t=>kt(t),"next-click":t=>kt(t)},A8="ElPagination";var p3e=ue({name:A8,props:f3e,emits:h3e,setup(t,{emit:e,slots:n}){const{t:r}=kn(),i=Qe("pagination"),o=en().vnode.props||{},a=SH(),s=M(()=>{var x;return t.small?"small":(x=t.size)!=null?x:a.value});Jd({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},M(()=>!!t.small));const l="onUpdate:currentPage"in o||"onUpdate:current-page"in o||"onCurrentChange"in o,u="onUpdate:pageSize"in o||"onUpdate:page-size"in o||"onSizeChange"in o,c=M(()=>{if(ga(t.total)&&ga(t.pageCount)||!ga(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(ga(t.pageCount)){if(!ga(t.total)&&!ga(t.pageSize)&&!u)return!1}else if(!u)return!1}return!0}),d=F(ga(t.defaultPageSize)?10:t.defaultPageSize),f=F(ga(t.defaultCurrentPage)?1:t.defaultCurrentPage),h=M({get(){return ga(t.pageSize)?d.value:t.pageSize},set(x){ga(t.pageSize)&&(d.value=x),u&&(e("update:page-size",x),e("size-change",x))}}),m=M(()=>{let x=0;return ga(t.pageCount)?ga(t.total)||(x=Math.max(1,Math.ceil(t.total/h.value))):x=t.pageCount,x}),g=M({get(){return ga(t.currentPage)?f.value:t.currentPage},set(x){let C=x;x<1?C=1:x>m.value&&(C=m.value),ga(t.currentPage)&&(f.value=C),l&&(e("update:current-page",C),e("current-change",C))}});Ve(m,x=>{g.value>x&&(g.value=x)}),Ve([g,h],x=>{e("change",...x)},{flush:"post"});function y(x){g.value=x}function b(x){h.value=x;const C=m.value;g.value>C&&(g.value=C)}function w(){t.disabled||(g.value-=1,e("prev-click",g.value))}function O(){t.disabled||(g.value+=1,e("next-click",g.value))}function S(x,C){x&&(x.props||(x.props={}),x.props.class=[x.props.class,C].join(" "))}return _n(wU,{pageCount:m,disabled:M(()=>t.disabled),currentPage:g,changeEvent:y,handleSizeChange:b}),()=>{var x,C;if(!c.value)return r("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&m.value<=1)return null;const E=[],T=[],P=Et("div",{class:i.e("rightwrapper")},T),A={prev:Et(PIe,{disabled:t.disabled,currentPage:g.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:w}),jumper:Et(r3e,{size:s.value}),pager:Et(d3e,{currentPage:g.value,pageCount:m.value,pagerCount:t.pagerCount,onChange:y,disabled:t.disabled}),next:Et($Ie,{disabled:t.disabled,currentPage:g.value,pageCount:m.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:O}),sizes:Et(JIe,{pageSize:h.value,pageSizes:t.pageSizes,popperClass:t.popperClass,disabled:t.disabled,teleported:t.teleported,size:s.value,appendSizeTo:t.appendSizeTo}),slot:(C=(x=n==null?void 0:n.default)==null?void 0:x.call(n))!=null?C:null,total:Et(s3e,{total:ga(t.total)?0:t.total})},D=t.layout.split(",").map($=>$.trim());let N=!1;return D.forEach($=>{if($==="->"){N=!0;return}N?T.push(A[$]):E.push(A[$])}),S(E[0],i.is("first")),S(E[E.length-1],i.is("last")),N&&T.length>0&&(S(T[0],i.is("first")),S(T[T.length-1],i.is("last")),E.push(P)),Et("div",{class:[i.b(),i.is("background",t.background),i.m(s.value)]},E)}}});const eC=Vt(p3e),g3e=Ye({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Mk,default:"primary"},cancelButtonType:{type:String,values:Mk,default:"text"},icon:{type:fr,default:()=>xCe},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:io.teleported,persistent:io.persistent,width:{type:[String,Number],default:150}}),m3e={confirm:t=>t instanceof MouseEvent,cancel:t=>t instanceof MouseEvent},v3e=ue({name:"ElPopconfirm"}),y3e=ue({...v3e,props:g3e,emits:m3e,setup(t,{emit:e}){const n=t,{t:r}=kn(),i=Qe("popconfirm"),o=F(),a=()=>{var f,h;(h=(f=o.value)==null?void 0:f.onClose)==null||h.call(f)},s=M(()=>({width:pi(n.width)})),l=f=>{e("confirm",f),a()},u=f=>{e("cancel",f),a()},c=M(()=>n.confirmButtonText||r("el.popconfirm.confirmButtonText")),d=M(()=>n.cancelButtonText||r("el.popconfirm.cancelButtonText"));return(f,h)=>(R(),we(p(Ui),gn({ref_key:"tooltipRef",ref:o,trigger:"click",effect:"light"},f.$attrs,{"popper-class":`${p(i).namespace.value}-popover`,"popper-style":p(s),teleported:f.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":f.hideAfter,persistent:f.persistent}),{content:z(()=>[J("div",{class:j(p(i).b())},[J("div",{class:j(p(i).e("main"))},[!f.hideIcon&&f.icon?(R(),we(p(gt),{key:0,class:j(p(i).e("icon")),style:mt({color:f.iconColor})},{default:z(()=>[(R(),we(un(f.icon)))]),_:1},8,["class","style"])):_e("v-if",!0),qe(" "+je(f.title),1)],2),J("div",{class:j(p(i).e("action"))},[xe(f.$slots,"actions",{confirm:l,cancel:u},()=>[B(p(lr),{size:"small",type:f.cancelButtonType==="text"?"":f.cancelButtonType,text:f.cancelButtonType==="text",onClick:u},{default:z(()=>[qe(je(p(d)),1)]),_:1},8,["type","text"]),B(p(lr),{size:"small",type:f.confirmButtonType==="text"?"":f.confirmButtonType,text:f.confirmButtonType==="text",onClick:l},{default:z(()=>[qe(je(p(c)),1)]),_:1},8,["type","text"])])],2)],2)]),default:z(()=>[f.$slots.reference?xe(f.$slots,"reference",{key:0}):_e("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var b3e=Ge(y3e,[["__file","popconfirm.vue"]]);const _3e=Vt(b3e),O3e=Ye({trigger:v0.trigger,placement:E1.placement,disabled:v0.disabled,visible:io.visible,transition:io.transition,popperOptions:E1.popperOptions,tabindex:E1.tabindex,content:io.content,popperStyle:io.popperStyle,popperClass:io.popperClass,enterable:{...io.enterable,default:!0},effect:{...io.effect,default:"light"},teleported:io.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),w3e={"update:visible":t=>si(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},S3e="onUpdate:visible",x3e=ue({name:"ElPopover"}),C3e=ue({...x3e,props:O3e,emits:w3e,setup(t,{expose:e,emit:n}){const r=t,i=M(()=>r[S3e]),o=Qe("popover"),a=F(),s=M(()=>{var y;return(y=p(a))==null?void 0:y.popperRef}),l=M(()=>[{width:pi(r.width)},r.popperStyle]),u=M(()=>[o.b(),r.popperClass,{[o.m("plain")]:!!r.content}]),c=M(()=>r.transition===`${o.namespace.value}-fade-in-linear`),d=()=>{var y;(y=a.value)==null||y.hide()},f=()=>{n("before-enter")},h=()=>{n("before-leave")},m=()=>{n("after-enter")},g=()=>{n("update:visible",!1),n("after-leave")};return e({popperRef:s,hide:d}),(y,b)=>(R(),we(p(Ui),gn({ref_key:"tooltipRef",ref:a},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":p(u),"popper-style":p(l),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":p(c),"onUpdate:visible":p(i),onBeforeShow:f,onBeforeHide:h,onShow:m,onHide:g}),{content:z(()=>[y.title?(R(),G("div",{key:0,class:j(p(o).e("title")),role:"title"},je(y.title),3)):_e("v-if",!0),xe(y.$slots,"default",{},()=>[qe(je(y.content),1)])]),default:z(()=>[y.$slots.reference?xe(y.$slots,"reference",{key:0}):_e("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var E3e=Ge(C3e,[["__file","popover.vue"]]);const M8=(t,e)=>{const n=e.arg||e.value,r=n==null?void 0:n.popperRef;r&&(r.triggerRef=t)};var T3e={mounted(t,e){M8(t,e)},updated(t,e){M8(t,e)}};const k3e="popover",CU=ZCe(T3e,k3e),P3e=Vt(E3e,{directive:CU}),A3e=Ye({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:Oe(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Oe([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Oe(Function),default:t=>`${t}%`}}),M3e=ue({name:"ElProgress"}),R3e=ue({...M3e,props:A3e,setup(t){const e=t,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=Qe("progress"),i=M(()=>{const O={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},S=w(e.percentage);return S.includes("gradient")?O.background=S:O.backgroundColor=S,O}),o=M(()=>(e.strokeWidth/e.width*100).toFixed(1)),a=M(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),s=M(()=>{const O=a.value,S=e.type==="dashboard";return`
  67. M 50 50
  68. m 0 ${S?"":"-"}${O}
  69. a ${O} ${O} 0 1 1 0 ${S?"-":""}${O*2}
  70. a ${O} ${O} 0 1 1 0 ${S?"":"-"}${O*2}
  71. `}),l=M(()=>2*Math.PI*a.value),u=M(()=>e.type==="dashboard"?.75:1),c=M(()=>`${-1*l.value*(1-u.value)/2}px`),d=M(()=>({strokeDasharray:`${l.value*u.value}px, ${l.value}px`,strokeDashoffset:c.value})),f=M(()=>({strokeDasharray:`${l.value*u.value*(e.percentage/100)}px, ${l.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),h=M(()=>{let O;return e.color?O=w(e.percentage):O=n[e.status]||n.default,O}),m=M(()=>e.status==="warning"?Ix:e.type==="line"?e.status==="success"?a$:Bf:e.status==="success"?Sb:_a),g=M(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),y=M(()=>e.format(e.percentage));function b(O){const S=100/O.length;return O.map((C,E)=>At(C)?{color:C,percentage:(E+1)*S}:C).sort((C,E)=>C.percentage-E.percentage)}const w=O=>{var S;const{color:x}=e;if($t(x))return x(O);if(At(x))return x;{const C=b(x);for(const E of C)if(E.percentage>O)return E.color;return(S=C[C.length-1])==null?void 0:S.color}};return(O,S)=>(R(),G("div",{class:j([p(r).b(),p(r).m(O.type),p(r).is(O.status),{[p(r).m("without-text")]:!O.showText,[p(r).m("text-inside")]:O.textInside}]),role:"progressbar","aria-valuenow":O.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[O.type==="line"?(R(),G("div",{key:0,class:j(p(r).b("bar"))},[J("div",{class:j(p(r).be("bar","outer")),style:mt({height:`${O.strokeWidth}px`})},[J("div",{class:j([p(r).be("bar","inner"),{[p(r).bem("bar","inner","indeterminate")]:O.indeterminate},{[p(r).bem("bar","inner","striped")]:O.striped},{[p(r).bem("bar","inner","striped-flow")]:O.stripedFlow}]),style:mt(p(i))},[(O.showText||O.$slots.default)&&O.textInside?(R(),G("div",{key:0,class:j(p(r).be("bar","innerText"))},[xe(O.$slots,"default",{percentage:O.percentage},()=>[J("span",null,je(p(y)),1)])],2)):_e("v-if",!0)],6)],6)],2)):(R(),G("div",{key:1,class:j(p(r).b("circle")),style:mt({height:`${O.width}px`,width:`${O.width}px`})},[(R(),G("svg",{viewBox:"0 0 100 100"},[J("path",{class:j(p(r).be("circle","track")),d:p(s),stroke:`var(${p(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":O.strokeLinecap,"stroke-width":p(o),fill:"none",style:mt(p(d))},null,14,["d","stroke","stroke-linecap","stroke-width"]),J("path",{class:j(p(r).be("circle","path")),d:p(s),stroke:p(h),fill:"none",opacity:O.percentage?1:0,"stroke-linecap":O.strokeLinecap,"stroke-width":p(o),style:mt(p(f))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(O.showText||O.$slots.default)&&!O.textInside?(R(),G("div",{key:2,class:j(p(r).e("text")),style:mt({fontSize:`${p(g)}px`})},[xe(O.$slots,"default",{percentage:O.percentage},()=>[O.status?(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(p(m))))]),_:1})):(R(),G("span",{key:0},je(p(y)),1))])],6)):_e("v-if",!0)],10,["aria-valuenow"]))}});var $3e=Ge(R3e,[["__file","progress.vue"]]);const EU=Vt($3e),N3e=Ye({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:Oe([Array,Object]),default:()=>Jr(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:Oe([Array,Object]),default:()=>[J_,J_,J_]},voidIcon:{type:fr,default:()=>FCe},disabledVoidIcon:{type:fr,default:()=>J_},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:Oe(Array),default:()=>Jr(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Wi,clearable:Boolean,...wo(["ariaLabel"])}),D3e={[Lr]:t=>kt(t),[Zt]:t=>kt(t)},L3e=ue({name:"ElRate"}),I3e=ue({...L3e,props:N3e,emits:D3e,setup(t,{expose:e,emit:n}){const r=t;function i(I,U){const Q=K=>sn(K),V=Object.keys(U).map(K=>+K).filter(K=>{const ie=U[K];return(Q(ie)?ie.excluded:!1)?I<K:I<=K}).sort((K,ie)=>K-ie),q=U[V[0]];return Q(q)&&q.value||q}const o=ht(Op,void 0),a=ht(tc,void 0),s=Ni(),l=Qe("rate"),{inputId:u,isLabeledByFormItem:c}=gu(r,{formItemContext:a}),d=F(r.modelValue),f=F(-1),h=F(!0),m=M(()=>[l.b(),l.m(s.value)]),g=M(()=>r.disabled||(o==null?void 0:o.disabled)),y=M(()=>l.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":S.value})),b=M(()=>{let I="";return r.showScore?I=r.scoreTemplate.replace(/\{\s*value\s*\}/,g.value?`${r.modelValue}`:`${d.value}`):r.showText&&(I=r.texts[Math.ceil(d.value)-1]),I}),w=M(()=>r.modelValue*100-Math.floor(r.modelValue)*100),O=M(()=>ut(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),S=M(()=>{const I=i(d.value,O.value);return sn(I)?"":I}),x=M(()=>{let I="";return g.value?I=`${w.value}%`:r.allowHalf&&(I="50%"),{color:S.value,width:I}}),C=M(()=>{let I=ut(r.icons)?[...r.icons]:{...r.icons};return I=Bc(I),ut(I)?{[r.lowThreshold]:I[0],[r.highThreshold]:{value:I[1],excluded:!0},[r.max]:I[2]}:I}),E=M(()=>i(r.modelValue,C.value)),T=M(()=>g.value?At(r.disabledVoidIcon)?r.disabledVoidIcon:Bc(r.disabledVoidIcon):At(r.voidIcon)?r.voidIcon:Bc(r.voidIcon)),P=M(()=>i(d.value,C.value));function A(I){const U=g.value&&w.value>0&&I-1<r.modelValue&&I>r.modelValue,Q=r.allowHalf&&h.value&&I-.5<=d.value&&I>d.value;return U||Q}function D(I){r.clearable&&I===r.modelValue&&(I=0),n(Zt,I),r.modelValue!==I&&n("change",I)}function N(I){g.value||(r.allowHalf&&h.value?D(d.value):D(I))}function $(I){if(g.value)return;let U=d.value;const Q=I.code;return Q===St.up||Q===St.right?(r.allowHalf?U+=.5:U+=1,I.stopPropagation(),I.preventDefault()):(Q===St.left||Q===St.down)&&(r.allowHalf?U-=.5:U-=1,I.stopPropagation(),I.preventDefault()),U=U<0?0:U,U=U>r.max?r.max:U,n(Zt,U),n("change",U),U}function W(I,U){if(!g.value){if(r.allowHalf&&U){let Q=U.target;Ua(Q,l.e("item"))&&(Q=Q.querySelector(`.${l.e("icon")}`)),(Q.clientWidth===0||Ua(Q,l.e("decimal")))&&(Q=Q.parentNode),h.value=U.offsetX*2<=Q.clientWidth,d.value=h.value?I-.5:I}else d.value=I;f.value=I}}function L(){g.value||(r.allowHalf&&(h.value=r.modelValue!==Math.floor(r.modelValue)),d.value=r.modelValue,f.value=-1)}return Ve(()=>r.modelValue,I=>{d.value=I,h.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||n(Zt,0),e({setCurrentValue:W,resetCurrentValue:L}),(I,U)=>{var Q;return R(),G("div",{id:p(u),class:j([p(m),p(l).is("disabled",p(g))]),role:"slider","aria-label":p(c)?void 0:I.ariaLabel||"rating","aria-labelledby":p(c)?(Q=p(a))==null?void 0:Q.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":p(b)||void 0,"aria-valuemin":"0","aria-valuemax":I.max,tabindex:"0",style:mt(p(y)),onKeydown:$},[(R(!0),G(ct,null,Wt(I.max,(V,q)=>(R(),G("span",{key:q,class:j(p(l).e("item")),onMousemove:K=>W(V,K),onMouseleave:L,onClick:K=>N(V)},[B(p(gt),{class:j([p(l).e("icon"),{hover:f.value===V},p(l).is("active",V<=d.value)])},{default:z(()=>[A(V)?_e("v-if",!0):(R(),G(ct,{key:0},[Ht((R(),we(un(p(P)),null,null,512)),[[zn,V<=d.value]]),Ht((R(),we(un(p(T)),null,null,512)),[[zn,!(V<=d.value)]])],64)),A(V)?(R(),G(ct,{key:1},[(R(),we(un(p(T)),{class:j([p(l).em("decimal","box")])},null,8,["class"])),B(p(gt),{style:mt(p(x)),class:j([p(l).e("icon"),p(l).e("decimal")])},{default:z(()=>[(R(),we(un(p(E))))]),_:1},8,["style","class"])],64)):_e("v-if",!0)]),_:2},1032,["class"])],42,["onMousemove","onClick"]))),128)),I.showText||I.showScore?(R(),G("span",{key:0,class:j(p(l).e("text")),style:mt({color:I.textColor})},je(p(b)),7)):_e("v-if",!0)],46,["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"])}}});var B3e=Ge(I3e,[["__file","rate.vue"]]);const F3e=Vt(B3e),hg={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},R8={[hg.success]:Zxe,[hg.warning]:Ix,[hg.error]:s$,[hg.info]:u$},V3e=Ye({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),j3e=ue({name:"ElResult"}),z3e=ue({...j3e,props:V3e,setup(t){const e=t,n=Qe("result"),r=M(()=>{const i=e.icon,o=i&&hg[i]?hg[i]:"icon-info",a=R8[o]||R8["icon-info"];return{class:o,component:a}});return(i,o)=>(R(),G("div",{class:j(p(n).b())},[J("div",{class:j(p(n).e("icon"))},[xe(i.$slots,"icon",{},()=>[p(r).component?(R(),we(un(p(r).component),{key:0,class:j(p(r).class)},null,8,["class"])):_e("v-if",!0)])],2),i.title||i.$slots.title?(R(),G("div",{key:0,class:j(p(n).e("title"))},[xe(i.$slots,"title",{},()=>[J("p",null,je(i.title),1)])],2)):_e("v-if",!0),i.subTitle||i.$slots["sub-title"]?(R(),G("div",{key:1,class:j(p(n).e("subtitle"))},[xe(i.$slots,"sub-title",{},()=>[J("p",null,je(i.subTitle),1)])],2)):_e("v-if",!0),i.$slots.extra?(R(),G("div",{key:2,class:j(p(n).e("extra"))},[xe(i.$slots,"extra")],2)):_e("v-if",!0)],2))}});var Q3e=Ge(z3e,[["__file","result.vue"]]);const H3e=Vt(Q3e);var $8=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function W3e(t,e){return!!(t===e||$8(t)&&$8(e))}function U3e(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!W3e(t[n],e[n]))return!1;return!0}function q3e(t,e){e===void 0&&(e=U3e);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var a=t.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}const TU=()=>{const e=en().proxy.$props;return M(()=>{const n=(r,i,o)=>({});return e.perfMode?gb(n):q3e(n)})},Kk=50,Sw="itemRendered",xw="scroll",pg="forward",Cw="backward",il="auto",tC="smart",_0="start",ju="center",O0="end",om="horizontal",oN="vertical",Y3e="ltr",Rg="rtl",w0="negative",aN="positive-ascending",sN="positive-descending",X3e={[om]:"left",[oN]:"top"},Z3e=20,G3e={[om]:"deltaX",[oN]:"deltaY"},K3e=({atEndEdge:t,atStartEdge:e,layout:n},r)=>{let i,o=0;const a=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:a,onWheel:l=>{tp(i);const u=l[G3e[n.value]];a(o)&&a(o+u)||(o+=u,nR()||l.preventDefault(),i=gf(()=>{r(o),o=0}))}}},Jk=hu({type:Oe([Number,Function]),required:!0}),eP=hu({type:Number}),tP=hu({type:Number,default:2}),J3e=hu({type:String,values:["ltr","rtl"],default:"ltr"}),nP=hu({type:Number,default:0}),Ew=hu({type:Number,required:!0}),kU=hu({type:String,values:["horizontal","vertical"],default:oN}),PU=Ye({className:{type:String,default:""},containerElement:{type:Oe([String,Object]),default:"div"},data:{type:Oe(Array),default:()=>Jr([])},direction:J3e,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:Oe([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),AU=Ye({cache:tP,estimatedItemSize:eP,layout:kU,initScrollOffset:nP,total:Ew,itemSize:Jk,...PU}),rP={type:Number,default:6},MU={type:Number,default:0},RU={type:Number,default:2},zh=Ye({columnCache:tP,columnWidth:Jk,estimatedColumnWidth:eP,estimatedRowHeight:eP,initScrollLeft:nP,initScrollTop:nP,itemKey:{type:Oe(Function),default:({columnIndex:t,rowIndex:e})=>`${e}:${t}`},rowCache:tP,rowHeight:Jk,totalColumn:Ew,totalRow:Ew,hScrollbarSize:rP,vScrollbarSize:rP,scrollbarStartGap:MU,scrollbarEndGap:RU,role:String,...PU}),$U=Ye({alwaysOn:Boolean,class:String,layout:kU,total:Ew,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:rP,startGap:MU,endGap:RU,visible:Boolean}),Rh=(t,e)=>t<e?pg:Cw,S0=t=>t===Y3e||t===Rg||t===om,N8=t=>t===Rg;let Wp=null;function Tw(t=!1){if(Wp===null||t){const e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Wp=sN:(e.scrollLeft=1,e.scrollLeft===0?Wp=w0:Wp=aN),document.body.removeChild(e),Wp}return Wp}function e4e({move:t,size:e,bar:n},r){const i={},o=`translate${n.axis}(${t}px)`;return i[n.size]=e,i.transform=o,i.msTransform=o,i.webkitTransform=o,r==="horizontal"?i.height="100%":i.width="100%",i}const iP=ue({name:"ElVirtualScrollBar",props:$U,emits:["scroll","start-move","stop-move"],setup(t,{emit:e}){const n=M(()=>t.startGap+t.endGap),r=Qe("virtual-scrollbar"),i=Qe("scrollbar"),o=F(),a=F();let s=null,l=null;const u=Sn({isDragging:!1,traveled:0}),c=M(()=>MH[t.layout]),d=M(()=>t.clientSize-p(n)),f=M(()=>({position:"absolute",width:`${om===t.layout?d.value:t.scrollbarSize}px`,height:`${om===t.layout?t.scrollbarSize:d.value}px`,[X3e[t.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),h=M(()=>{const C=t.ratio,E=t.clientSize;if(C>=100)return Number.POSITIVE_INFINITY;if(C>=50)return C*E/100;const T=E/3;return Math.floor(Math.min(Math.max(C*E,Z3e),T))}),m=M(()=>{if(!Number.isFinite(h.value))return{display:"none"};const C=`${h.value}px`;return e4e({bar:c.value,size:C,move:u.traveled},t.layout)}),g=M(()=>Math.floor(t.clientSize-h.value-p(n))),y=()=>{window.addEventListener("mousemove",S),window.addEventListener("mouseup",O);const C=p(a);!C||(l=document.onselectstart,document.onselectstart=()=>!1,C.addEventListener("touchmove",S,{passive:!0}),C.addEventListener("touchend",O))},b=()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",O),document.onselectstart=l,l=null;const C=p(a);!C||(C.removeEventListener("touchmove",S),C.removeEventListener("touchend",O))},w=C=>{C.stopImmediatePropagation(),!(C.ctrlKey||[1,2].includes(C.button))&&(u.isDragging=!0,u[c.value.axis]=C.currentTarget[c.value.offset]-(C[c.value.client]-C.currentTarget.getBoundingClientRect()[c.value.direction]),e("start-move"),y())},O=()=>{u.isDragging=!1,u[c.value.axis]=0,e("stop-move"),b()},S=C=>{const{isDragging:E}=u;if(!E||!a.value||!o.value)return;const T=u[c.value.axis];if(!T)return;tp(s);const P=(o.value.getBoundingClientRect()[c.value.direction]-C[c.value.client])*-1,A=a.value[c.value.offset]-T,D=P-A;s=gf(()=>{u.traveled=Math.max(t.startGap,Math.min(D,g.value)),e("scroll",D,g.value)})},x=C=>{const E=Math.abs(C.target.getBoundingClientRect()[c.value.direction]-C[c.value.client]),T=a.value[c.value.offset]/2,P=E-T;u.traveled=Math.max(0,Math.min(P,g.value)),e("scroll",P,g.value)};return Ve(()=>t.scrollFrom,C=>{u.isDragging||(u.traveled=Math.ceil(C*g.value))}),pr(()=>{b()}),()=>Et("div",{role:"presentation",ref:o,class:[r.b(),t.class,(t.alwaysOn||u.isDragging)&&"always-on"],style:f.value,onMousedown:Pt(x,["stop","prevent"]),onTouchstartPrevent:w},Et("div",{ref:a,class:i.e("thumb"),style:m.value,onMousedown:w},[]))}}),NU=({name:t,getOffset:e,getItemSize:n,getItemOffset:r,getEstimatedTotalSize:i,getStartIndexForOffset:o,getStopIndexForStartIndex:a,initCache:s,clearCache:l,validateProps:u})=>ue({name:t!=null?t:"ElVirtualList",props:AU,emits:[Sw,xw],setup(c,{emit:d,expose:f}){u(c);const h=en(),m=Qe("vl"),g=F(s(c,h)),y=TU(),b=F(),w=F(),O=F(),S=F({isScrolling:!1,scrollDir:"forward",scrollOffset:kt(c.initScrollOffset)?c.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:c.scrollbarAlwaysOn}),x=M(()=>{const{total:oe,cache:Se}=c,{isScrolling:ke,scrollDir:Y,scrollOffset:re}=p(S);if(oe===0)return[0,0,0,0];const te=o(c,re,p(g)),ge=a(c,te,re,p(g)),Re=!ke||Y===Cw?Math.max(1,Se):1,$e=!ke||Y===pg?Math.max(1,Se):1;return[Math.max(0,te-Re),Math.max(0,Math.min(oe-1,ge+$e)),te,ge]}),C=M(()=>i(c,p(g))),E=M(()=>S0(c.layout)),T=M(()=>[{position:"relative",[`overflow-${E.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:c.direction,height:kt(c.height)?`${c.height}px`:c.height,width:kt(c.width)?`${c.width}px`:c.width},c.style]),P=M(()=>{const oe=p(C),Se=p(E);return{height:Se?"100%":`${oe}px`,pointerEvents:p(S).isScrolling?"none":void 0,width:Se?`${oe}px`:"100%"}}),A=M(()=>E.value?c.width:c.height),{onWheel:D}=K3e({atStartEdge:M(()=>S.value.scrollOffset<=0),atEndEdge:M(()=>S.value.scrollOffset>=C.value),layout:M(()=>c.layout)},oe=>{var Se,ke;(ke=(Se=O.value).onMouseUp)==null||ke.call(Se),U(Math.min(S.value.scrollOffset+oe,C.value-A.value))});sr(b,"wheel",D,{passive:!1});const N=()=>{const{total:oe}=c;if(oe>0){const[re,te,ge,Re]=p(x);d(Sw,re,te,ge,Re)}const{scrollDir:Se,scrollOffset:ke,updateRequested:Y}=p(S);d(xw,Se,ke,Y)},$=oe=>{const{clientHeight:Se,scrollHeight:ke,scrollTop:Y}=oe.currentTarget,re=p(S);if(re.scrollOffset===Y)return;const te=Math.max(0,Math.min(Y,ke-Se));S.value={...re,isScrolling:!0,scrollDir:Rh(re.scrollOffset,te),scrollOffset:te,updateRequested:!1},Ot(q)},W=oe=>{const{clientWidth:Se,scrollLeft:ke,scrollWidth:Y}=oe.currentTarget,re=p(S);if(re.scrollOffset===ke)return;const{direction:te}=c;let ge=ke;if(te===Rg)switch(Tw()){case w0:{ge=-ke;break}case sN:{ge=Y-Se-ke;break}}ge=Math.max(0,Math.min(ge,Y-Se)),S.value={...re,isScrolling:!0,scrollDir:Rh(re.scrollOffset,ge),scrollOffset:ge,updateRequested:!1},Ot(q)},L=oe=>{p(E)?W(oe):$(oe),N()},I=(oe,Se)=>{const ke=(C.value-A.value)/Se*oe;U(Math.min(C.value-A.value,ke))},U=oe=>{oe=Math.max(oe,0),oe!==p(S).scrollOffset&&(S.value={...p(S),scrollOffset:oe,scrollDir:Rh(p(S).scrollOffset,oe),updateRequested:!0},Ot(q))},Q=(oe,Se=il)=>{const{scrollOffset:ke}=p(S);oe=Math.max(0,Math.min(oe,c.total-1)),U(e(c,oe,Se,ke,p(g)))},V=oe=>{const{direction:Se,itemSize:ke,layout:Y}=c,re=y.value(l&&ke,l&&Y,l&&Se);let te;if(Dn(re,String(oe)))te=re[oe];else{const ge=r(c,oe,p(g)),Re=n(c,oe,p(g)),$e=p(E),Z=Se===Rg,ce=$e?ge:0;re[oe]=te={position:"absolute",left:Z?void 0:`${ce}px`,right:Z?`${ce}px`:void 0,top:$e?0:`${ge}px`,height:$e?"100%":`${Re}px`,width:$e?`${Re}px`:"100%"}}return te},q=()=>{S.value.isScrolling=!1,Ot(()=>{y.value(-1,null,null)})},K=()=>{const oe=b.value;oe&&(oe.scrollTop=0)};Bt(()=>{if(!Tn)return;const{initScrollOffset:oe}=c,Se=p(b);kt(oe)&&Se&&(p(E)?Se.scrollLeft=oe:Se.scrollTop=oe),N()}),Jc(()=>{const{direction:oe,layout:Se}=c,{scrollOffset:ke,updateRequested:Y}=p(S),re=p(b);if(Y&&re)if(Se===om)if(oe===Rg)switch(Tw()){case w0:{re.scrollLeft=-ke;break}case aN:{re.scrollLeft=ke;break}default:{const{clientWidth:te,scrollWidth:ge}=re;re.scrollLeft=ge-te-ke;break}}else re.scrollLeft=ke;else re.scrollTop=ke}),UM(()=>{p(b).scrollTop=p(S).scrollOffset});const ie={ns:m,clientSize:A,estimatedTotalSize:C,windowStyle:T,windowRef:b,innerRef:w,innerStyle:P,itemsToRender:x,scrollbarRef:O,states:S,getItemStyle:V,onScroll:L,onScrollbarScroll:I,onWheel:D,scrollTo:U,scrollToItem:Q,resetScrollTop:K};return f({windowRef:b,innerRef:w,getItemStyleCache:y,scrollTo:U,scrollToItem:Q,resetScrollTop:K,states:S}),ie},render(c){var d;const{$slots:f,className:h,clientSize:m,containerElement:g,data:y,getItemStyle:b,innerElement:w,itemsToRender:O,innerStyle:S,layout:x,total:C,onScroll:E,onScrollbarScroll:T,states:P,useIsScrolling:A,windowStyle:D,ns:N}=c,[$,W]=O,L=un(g),I=un(w),U=[];if(C>0)for(let K=$;K<=W;K++)U.push(Et(ct,{key:K},(d=f.default)==null?void 0:d.call(f,{data:y,index:K,isScrolling:A?P.isScrolling:void 0,style:b(K)})));const Q=[Et(I,{style:S,ref:"innerRef"},At(I)?U:{default:()=>U})],V=Et(iP,{ref:"scrollbarRef",clientSize:m,layout:x,onScroll:T,ratio:m*100/this.estimatedTotalSize,scrollFrom:P.scrollOffset/(this.estimatedTotalSize-m),total:C}),q=Et(L,{class:[N.e("window"),h],style:D,onScroll:E,ref:"windowRef",key:0},At(L)?[Q]:{default:()=>[Q]});return Et("div",{key:0,class:[N.e("wrapper"),P.scrollbarAlwaysOn?"always-on":""]},[q,V])}}),DU=NU({name:"ElFixedSizeList",getItemOffset:({itemSize:t},e)=>e*t,getItemSize:({itemSize:t})=>t,getEstimatedTotalSize:({total:t,itemSize:e})=>e*t,getOffset:({height:t,total:e,itemSize:n,layout:r,width:i},o,a,s)=>{const l=S0(r)?i:t,u=Math.max(0,e*n-l),c=Math.min(u,o*n),d=Math.max(0,(o+1)*n-l);switch(a===tC&&(s>=d-l&&s<=c+l?a=il:a=ju),a){case _0:return c;case O0:return d;case ju:{const f=Math.round(d+(c-d)/2);return f<Math.ceil(l/2)?0:f>u+Math.floor(l/2)?u:f}case il:default:return s>=d&&s<=c?s:s<d?d:c}},getStartIndexForOffset:({total:t,itemSize:e},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getStopIndexForStartIndex:({height:t,total:e,itemSize:n,layout:r,width:i},o,a)=>{const s=o*n,l=S0(r)?i:t,u=Math.ceil((l+a-s)/n);return Math.max(0,Math.min(e-1,o+u-1))},initCache(){},clearCache:!0,validateProps(){}}),gg=(t,e,n)=>{const{itemSize:r}=t,{items:i,lastVisitedIndex:o}=n;if(e>o){let a=0;if(o>=0){const s=i[o];a=s.offset+s.size}for(let s=o+1;s<=e;s++){const l=r(s);i[s]={offset:a,size:l},a+=l}n.lastVisitedIndex=e}return i[e]},t4e=(t,e,n)=>{const{items:r,lastVisitedIndex:i}=e;return(i>0?r[i].offset:0)>=n?LU(t,e,0,i,n):n4e(t,e,Math.max(0,i),n)},LU=(t,e,n,r,i)=>{for(;n<=r;){const o=n+Math.floor((r-n)/2),a=gg(t,o,e).offset;if(a===i)return o;a<i?n=o+1:a>i&&(r=o-1)}return Math.max(0,n-1)},n4e=(t,e,n,r)=>{const{total:i}=t;let o=1;for(;n<i&&gg(t,n,e).offset<r;)n+=o,o*=2;return LU(t,e,Math.floor(n/2),Math.min(n,i-1),r)},D8=({total:t},{items:e,estimatedItemSize:n,lastVisitedIndex:r})=>{let i=0;if(r>=t&&(r=t-1),r>=0){const s=e[r];i=s.offset+s.size}const a=(t-r-1)*n;return i+a},r4e=NU({name:"ElDynamicSizeList",getItemOffset:(t,e,n)=>gg(t,e,n).offset,getItemSize:(t,e,{items:n})=>n[e].size,getEstimatedTotalSize:D8,getOffset:(t,e,n,r,i)=>{const{height:o,layout:a,width:s}=t,l=S0(a)?s:o,u=gg(t,e,i),c=D8(t,i),d=Math.max(0,Math.min(c-l,u.offset)),f=Math.max(0,u.offset-l+u.size);switch(n===tC&&(r>=f-l&&r<=d+l?n=il:n=ju),n){case _0:return d;case O0:return f;case ju:return Math.round(f+(d-f)/2);case il:default:return r>=f&&r<=d?r:r<f?f:d}},getStartIndexForOffset:(t,e,n)=>t4e(t,n,e),getStopIndexForStartIndex:(t,e,n,r)=>{const{height:i,total:o,layout:a,width:s}=t,l=S0(a)?s:i,u=gg(t,e,r),c=n+l;let d=u.offset+u.size,f=e;for(;f<o-1&&d<c;)f++,d+=gg(t,f,r).size;return f},initCache({estimatedItemSize:t=Kk},e){const n={items:{},estimatedItemSize:t,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(r,i=!0)=>{var o,a;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,r-1),(o=e.exposed)==null||o.getItemStyleCache(-1),i&&((a=e.proxy)==null||a.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:t})=>{}}),i4e=({atXEndEdge:t,atXStartEdge:e,atYEndEdge:n,atYStartEdge:r},i)=>{let o=null,a=0,s=0;const l=(c,d)=>{const f=c<=0&&e.value||c>=0&&t.value,h=d<=0&&r.value||d>=0&&n.value;return f&&h};return{hasReachedEdge:l,onWheel:c=>{tp(o);let d=c.deltaX,f=c.deltaY;Math.abs(d)>Math.abs(f)?f=0:d=0,c.shiftKey&&f!==0&&(d=f,f=0),!(l(a,s)&&l(a+d,s+f))&&(a+=d,s+=f,c.preventDefault(),o=gf(()=>{i(a,s),a=0,s=0}))}}},IU=({name:t,clearCache:e,getColumnPosition:n,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:i,getEstimatedTotalHeight:o,getEstimatedTotalWidth:a,getColumnOffset:s,getRowOffset:l,getRowPosition:u,getRowStartIndexForOffset:c,getRowStopIndexForStartIndex:d,initCache:f,injectToInstance:h,validateProps:m})=>ue({name:t!=null?t:"ElVirtualList",props:zh,emits:[Sw,xw],setup(g,{emit:y,expose:b,slots:w}){const O=Qe("vl");m(g);const S=en(),x=F(f(g,S));h==null||h(S,x);const C=F(),E=F(),T=F(),P=F(null),A=F({isScrolling:!1,scrollLeft:kt(g.initScrollLeft)?g.initScrollLeft:0,scrollTop:kt(g.initScrollTop)?g.initScrollTop:0,updateRequested:!1,xAxisScrollDir:pg,yAxisScrollDir:pg}),D=TU(),N=M(()=>Number.parseInt(`${g.height}`,10)),$=M(()=>Number.parseInt(`${g.width}`,10)),W=M(()=>{const{totalColumn:me,totalRow:Ae,columnCache:X}=g,{isScrolling:ee,xAxisScrollDir:le,scrollLeft:Ce}=p(A);if(me===0||Ae===0)return[0,0,0,0];const fe=r(g,Ce,p(x)),Ee=i(g,fe,Ce,p(x)),be=!ee||le===Cw?Math.max(1,X):1,Be=!ee||le===pg?Math.max(1,X):1;return[Math.max(0,fe-be),Math.max(0,Math.min(me-1,Ee+Be)),fe,Ee]}),L=M(()=>{const{totalColumn:me,totalRow:Ae,rowCache:X}=g,{isScrolling:ee,yAxisScrollDir:le,scrollTop:Ce}=p(A);if(me===0||Ae===0)return[0,0,0,0];const fe=c(g,Ce,p(x)),Ee=d(g,fe,Ce,p(x)),be=!ee||le===Cw?Math.max(1,X):1,Be=!ee||le===pg?Math.max(1,X):1;return[Math.max(0,fe-be),Math.max(0,Math.min(Ae-1,Ee+Be)),fe,Ee]}),I=M(()=>o(g,p(x))),U=M(()=>a(g,p(x))),Q=M(()=>{var me;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:g.direction,height:kt(g.height)?`${g.height}px`:g.height,width:kt(g.width)?`${g.width}px`:g.width},(me=g.style)!=null?me:{}]}),V=M(()=>{const me=`${p(U)}px`;return{height:`${p(I)}px`,pointerEvents:p(A).isScrolling?"none":void 0,width:me}}),q=()=>{const{totalColumn:me,totalRow:Ae}=g;if(me>0&&Ae>0){const[Ee,be,Be,Xe]=p(W),[Ke,tt,Dt,jt]=p(L);y(Sw,{columnCacheStart:Ee,columnCacheEnd:be,rowCacheStart:Ke,rowCacheEnd:tt,columnVisibleStart:Be,columnVisibleEnd:Xe,rowVisibleStart:Dt,rowVisibleEnd:jt})}const{scrollLeft:X,scrollTop:ee,updateRequested:le,xAxisScrollDir:Ce,yAxisScrollDir:fe}=p(A);y(xw,{xAxisScrollDir:Ce,scrollLeft:X,yAxisScrollDir:fe,scrollTop:ee,updateRequested:le})},K=me=>{const{clientHeight:Ae,clientWidth:X,scrollHeight:ee,scrollLeft:le,scrollTop:Ce,scrollWidth:fe}=me.currentTarget,Ee=p(A);if(Ee.scrollTop===Ce&&Ee.scrollLeft===le)return;let be=le;if(N8(g.direction))switch(Tw()){case w0:be=-le;break;case sN:be=fe-X-le;break}A.value={...Ee,isScrolling:!0,scrollLeft:be,scrollTop:Math.max(0,Math.min(Ce,ee-Ae)),updateRequested:!0,xAxisScrollDir:Rh(Ee.scrollLeft,be),yAxisScrollDir:Rh(Ee.scrollTop,Ce)},Ot(()=>te()),ge(),q()},ie=(me,Ae)=>{const X=p(N),ee=(I.value-X)/Ae*me;ke({scrollTop:Math.min(I.value-X,ee)})},oe=(me,Ae)=>{const X=p($),ee=(U.value-X)/Ae*me;ke({scrollLeft:Math.min(U.value-X,ee)})},{onWheel:Se}=i4e({atXStartEdge:M(()=>A.value.scrollLeft<=0),atXEndEdge:M(()=>A.value.scrollLeft>=U.value-p($)),atYStartEdge:M(()=>A.value.scrollTop<=0),atYEndEdge:M(()=>A.value.scrollTop>=I.value-p(N))},(me,Ae)=>{var X,ee,le,Ce;(ee=(X=E.value)==null?void 0:X.onMouseUp)==null||ee.call(X),(Ce=(le=T.value)==null?void 0:le.onMouseUp)==null||Ce.call(le);const fe=p($),Ee=p(N);ke({scrollLeft:Math.min(A.value.scrollLeft+me,U.value-fe),scrollTop:Math.min(A.value.scrollTop+Ae,I.value-Ee)})});sr(C,"wheel",Se,{passive:!1});const ke=({scrollLeft:me=A.value.scrollLeft,scrollTop:Ae=A.value.scrollTop})=>{me=Math.max(me,0),Ae=Math.max(Ae,0);const X=p(A);Ae===X.scrollTop&&me===X.scrollLeft||(A.value={...X,xAxisScrollDir:Rh(X.scrollLeft,me),yAxisScrollDir:Rh(X.scrollTop,Ae),scrollLeft:me,scrollTop:Ae,updateRequested:!0},Ot(()=>te()),ge(),q())},Y=(me=0,Ae=0,X=il)=>{const ee=p(A);Ae=Math.max(0,Math.min(Ae,g.totalColumn-1)),me=Math.max(0,Math.min(me,g.totalRow-1));const le=IQ(O.namespace.value),Ce=p(x),fe=o(g,Ce),Ee=a(g,Ce);ke({scrollLeft:s(g,Ae,X,ee.scrollLeft,Ce,Ee>g.width?le:0),scrollTop:l(g,me,X,ee.scrollTop,Ce,fe>g.height?le:0)})},re=(me,Ae)=>{const{columnWidth:X,direction:ee,rowHeight:le}=g,Ce=D.value(e&&X,e&&le,e&&ee),fe=`${me},${Ae}`;if(Dn(Ce,fe))return Ce[fe];{const[,Ee]=n(g,Ae,p(x)),be=p(x),Be=N8(ee),[Xe,Ke]=u(g,me,be),[tt]=n(g,Ae,be);return Ce[fe]={position:"absolute",left:Be?void 0:`${Ee}px`,right:Be?`${Ee}px`:void 0,top:`${Ke}px`,height:`${Xe}px`,width:`${tt}px`},Ce[fe]}},te=()=>{A.value.isScrolling=!1,Ot(()=>{D.value(-1,null,null)})};Bt(()=>{if(!Tn)return;const{initScrollLeft:me,initScrollTop:Ae}=g,X=p(C);X&&(kt(me)&&(X.scrollLeft=me),kt(Ae)&&(X.scrollTop=Ae)),q()});const ge=()=>{const{direction:me}=g,{scrollLeft:Ae,scrollTop:X,updateRequested:ee}=p(A),le=p(C);if(ee&&le){if(me===Rg)switch(Tw()){case w0:{le.scrollLeft=-Ae;break}case aN:{le.scrollLeft=Ae;break}default:{const{clientWidth:Ce,scrollWidth:fe}=le;le.scrollLeft=fe-Ce-Ae;break}}else le.scrollLeft=Math.max(0,Ae);le.scrollTop=Math.max(0,X)}},{resetAfterColumnIndex:Re,resetAfterRowIndex:$e,resetAfter:Z}=S.proxy;b({windowRef:C,innerRef:P,getItemStyleCache:D,scrollTo:ke,scrollToItem:Y,states:A,resetAfterColumnIndex:Re,resetAfterRowIndex:$e,resetAfter:Z});const ce=()=>{const{scrollbarAlwaysOn:me,scrollbarStartGap:Ae,scrollbarEndGap:X,totalColumn:ee,totalRow:le}=g,Ce=p($),fe=p(N),Ee=p(U),be=p(I),{scrollLeft:Be,scrollTop:Xe}=p(A),Ke=Et(iP,{ref:E,alwaysOn:me,startGap:Ae,endGap:X,class:O.e("horizontal"),clientSize:Ce,layout:"horizontal",onScroll:oe,ratio:Ce*100/Ee,scrollFrom:Be/(Ee-Ce),total:le,visible:!0}),tt=Et(iP,{ref:T,alwaysOn:me,startGap:Ae,endGap:X,class:O.e("vertical"),clientSize:fe,layout:"vertical",onScroll:ie,ratio:fe*100/be,scrollFrom:Xe/(be-fe),total:ee,visible:!0});return{horizontalScrollbar:Ke,verticalScrollbar:tt}},Te=()=>{var me;const[Ae,X]=p(W),[ee,le]=p(L),{data:Ce,totalColumn:fe,totalRow:Ee,useIsScrolling:be,itemKey:Be}=g,Xe=[];if(Ee>0&&fe>0)for(let Ke=ee;Ke<=le;Ke++)for(let tt=Ae;tt<=X;tt++){const Dt=Be({columnIndex:tt,data:Ce,rowIndex:Ke});Xe.push(Et(ct,{key:Dt},(me=w.default)==null?void 0:me.call(w,{columnIndex:tt,data:Ce,isScrolling:be?p(A).isScrolling:void 0,style:re(Ke,tt),rowIndex:Ke})))}return Xe},Ie=()=>{const me=un(g.innerElement),Ae=Te();return[Et(me,{style:p(V),ref:P},At(me)?Ae:{default:()=>Ae})]};return()=>{const me=un(g.containerElement),{horizontalScrollbar:Ae,verticalScrollbar:X}=ce(),ee=Ie();return Et("div",{key:0,class:O.e("wrapper"),role:g.role},[Et(me,{class:g.className,style:p(Q),onScroll:K,ref:C},At(me)?ee:{default:()=>ee}),Ae,X])}}}),o4e=IU({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},e)=>[t,e*t],getRowPosition:({rowHeight:t},e)=>[t,e*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:e})=>e*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:e})=>e*t,getColumnOffset:({totalColumn:t,columnWidth:e,width:n},r,i,o,a,s)=>{n=Number(n);const l=Math.max(0,t*e-n),u=Math.min(l,r*e),c=Math.max(0,r*e-n+s+e);switch(i==="smart"&&(o>=c-n&&o<=u+n?i=il:i=ju),i){case _0:return u;case O0:return c;case ju:{const d=Math.round(c+(u-c)/2);return d<Math.ceil(n/2)?0:d>l+Math.floor(n/2)?l:d}case il:default:return o>=c&&o<=u?o:c>u||o<c?c:u}},getRowOffset:({rowHeight:t,height:e,totalRow:n},r,i,o,a,s)=>{e=Number(e);const l=Math.max(0,n*t-e),u=Math.min(l,r*t),c=Math.max(0,r*t-e+s+t);switch(i===tC&&(o>=c-e&&o<=u+e?i=il:i=ju),i){case _0:return u;case O0:return c;case ju:{const d=Math.round(c+(u-c)/2);return d<Math.ceil(e/2)?0:d>l+Math.floor(e/2)?l:d}case il:default:return o>=c&&o<=u?o:c>u||o<c?c:u}},getColumnStartIndexForOffset:({columnWidth:t,totalColumn:e},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:e,width:n},r,i)=>{const o=r*t,a=Math.ceil((n+i-o)/t);return Math.max(0,Math.min(e-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:e},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:e,height:n},r,i)=>{const o=r*t,a=Math.ceil((n+i-o)/t);return Math.max(0,Math.min(e-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:e})=>{}}),{max:kw,min:BU,floor:FU}=Math,a4e={column:"columnWidth",row:"rowHeight"},oP={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Nc=(t,e,n,r)=>{const[i,o,a]=[n[r],t[a4e[r]],n[oP[r]]];if(e>a){let s=0;if(a>=0){const l=i[a];s=l.offset+l.size}for(let l=a+1;l<=e;l++){const u=o(l);i[l]={offset:s,size:u},s+=u}n[oP[r]]=e}return i[e]},VU=(t,e,n,r,i,o)=>{for(;n<=r;){const a=n+FU((r-n)/2),s=Nc(t,a,e,o).offset;if(s===i)return a;s<i?n=a+1:r=a-1}return kw(0,n-1)},s4e=(t,e,n,r,i)=>{const o=i==="column"?t.totalColumn:t.totalRow;let a=1;for(;n<o&&Nc(t,n,e,i).offset<r;)n+=a,a*=2;return VU(t,e,FU(n/2),BU(n,o-1),r,i)},L8=(t,e,n,r)=>{const[i,o]=[e[r],e[oP[r]]];return(o>0?i[o].offset:0)>=n?VU(t,e,0,o,n,r):s4e(t,e,kw(0,o),n,r)},jU=({totalRow:t},{estimatedRowHeight:e,lastVisitedRowIndex:n,row:r})=>{let i=0;if(n>=t&&(n=t-1),n>=0){const s=r[n];i=s.offset+s.size}const a=(t-n-1)*e;return i+a},zU=({totalColumn:t},{column:e,estimatedColumnWidth:n,lastVisitedColumnIndex:r})=>{let i=0;if(r>t&&(r=t-1),r>=0){const s=e[r];i=s.offset+s.size}const a=(t-r-1)*n;return i+a},l4e={column:zU,row:jU},I8=(t,e,n,r,i,o,a)=>{const[s,l]=[o==="row"?t.height:t.width,l4e[o]],u=Nc(t,e,i,o),c=l(t,i),d=kw(0,BU(c-s,u.offset)),f=kw(0,u.offset-s+a+u.size);switch(n===tC&&(r>=f-s&&r<=d+s?n=il:n=ju),n){case _0:return d;case O0:return f;case ju:return Math.round(f+(d-f)/2);case il:default:return r>=f&&r<=d?r:f>d||r<f?f:d}},u4e=IU({name:"ElDynamicSizeGrid",getColumnPosition:(t,e,n)=>{const r=Nc(t,e,n,"column");return[r.size,r.offset]},getRowPosition:(t,e,n)=>{const r=Nc(t,e,n,"row");return[r.size,r.offset]},getColumnOffset:(t,e,n,r,i,o)=>I8(t,e,n,r,i,"column",o),getRowOffset:(t,e,n,r,i,o)=>I8(t,e,n,r,i,"row",o),getColumnStartIndexForOffset:(t,e,n)=>L8(t,n,e,"column"),getColumnStopIndexForStartIndex:(t,e,n,r)=>{const i=Nc(t,e,r,"column"),o=n+t.width;let a=i.offset+i.size,s=e;for(;s<t.totalColumn-1&&a<o;)s++,a+=Nc(t,e,r,"column").size;return s},getEstimatedTotalHeight:jU,getEstimatedTotalWidth:zU,getRowStartIndexForOffset:(t,e,n)=>L8(t,n,e,"row"),getRowStopIndexForStartIndex:(t,e,n,r)=>{const{totalRow:i,height:o}=t,a=Nc(t,e,r,"row"),s=n+o;let l=a.size+a.offset,u=e;for(;u<i-1&&l<s;)u++,l+=Nc(t,u,r,"row").size;return u},injectToInstance:(t,e)=>{const n=({columnIndex:o,rowIndex:a},s)=>{var l,u;s=ai(s)?!0:s,kt(o)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,o-1)),kt(a)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,a-1)),(l=t.exposed)==null||l.getItemStyleCache.value(-1,null,null),s&&((u=t.proxy)==null||u.$forceUpdate())},r=(o,a)=>{n({columnIndex:o},a)},i=(o,a)=>{n({rowIndex:o},a)};Object.assign(t.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:i,resetAfter:n})},initCache:({estimatedColumnWidth:t=Kk,estimatedRowHeight:e=Kk})=>({column:{},estimatedColumnWidth:t,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:t,rowHeight:e})=>{}}),c4e=ue({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:Qe("select")}}});function d4e(t,e,n,r,i,o){return R(),G("div",{class:j(t.ns.be("group","title")),style:mt({...t.style,lineHeight:`${t.height}px`})},je(t.item.label),7)}var f4e=Ge(c4e,[["render",d4e],["__file","group-item.vue"]]);function h4e(t,{emit:e}){return{hoverItem:()=>{t.disabled||e("hover",t.index)},selectOptionClick:()=>{t.disabled||e("select",t.item,t.index)}}}const QU={label:"label",value:"value",disabled:"disabled",options:"options"};function nC(t){const e=M(()=>({...QU,...t.props}));return{aliasProps:e,getLabel:a=>Wr(a,e.value.label),getValue:a=>Wr(a,e.value.value),getDisabled:a=>Wr(a,e.value.disabled),getOptions:a=>Wr(a,e.value.options)}}const p4e=Ye({allowCreate:Boolean,autocomplete:{type:Oe(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:fr,default:Bf},effect:{type:Oe(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:Oe([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:Oe(Array),required:!0},placeholder:{type:String},teleported:io.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})},remote:Boolean,size:Wi,props:{type:Oe(Object),default:()=>QU},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},placement:{type:Oe(String),values:ud,default:"bottom-start"},fallbackPlacements:{type:Oe(Array),default:["bottom-start","top-start","right","left"]},tagType:{...ip.type,default:"info"},tagEffect:{...ip.effect,default:"light"},...Wm,...wo(["ariaLabel"])}),g4e=Ye({data:Array,disabled:Boolean,hovering:Boolean,item:{type:Oe(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),m4e={[Zt]:t=>!0,[Lr]:t=>!0,"remove-tag":t=>!0,"visible-change":t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},v4e={hover:t=>kt(t),select:(t,e)=>!0},lN=Symbol("ElSelectV2Injection"),y4e=ue({props:g4e,emits:v4e,setup(t,{emit:e}){const n=ht(lN),r=Qe("select"),{hoverItem:i,selectOptionClick:o}=h4e(t,{emit:e}),{getLabel:a}=nC(n.props);return{ns:r,hoverItem:i,selectOptionClick:o,getLabel:a}}});function b4e(t,e,n,r,i,o){return R(),G("li",{"aria-selected":t.selected,style:mt(t.style),class:j([t.ns.be("dropdown","item"),t.ns.is("selected",t.selected),t.ns.is("disabled",t.disabled),t.ns.is("created",t.created),t.ns.is("hovering",t.hovering)]),onMouseenter:t.hoverItem,onClick:Pt(t.selectOptionClick,["stop"])},[xe(t.$slots,"default",{item:t.item,index:t.index,disabled:t.disabled},()=>[J("span",null,je(t.getLabel(t.item)),1)])],46,["aria-selected","onMouseenter","onClick"])}var _4e=Ge(y4e,[["render",b4e],["__file","option-item.vue"]]);const O4e={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number};var w4e=ue({name:"ElSelectDropdown",props:O4e,setup(t,{slots:e,expose:n}){const r=ht(lN),i=Qe("select"),{getLabel:o,getValue:a,getDisabled:s}=nC(r.props),l=F([]),u=F(),c=M(()=>t.data.length);Ve(()=>c.value,()=>{var D,N;(N=(D=r.tooltipRef.value).updatePopper)==null||N.call(D)});const d=M(()=>ai(r.props.estimatedOptionHeight)),f=M(()=>d.value?{itemSize:r.props.itemHeight}:{estimatedSize:r.props.estimatedOptionHeight,itemSize:D=>l.value[D]}),h=(D=[],N)=>{const{props:{valueKey:$}}=r;return sn(N)?D&&D.some(W=>Bn(Wr(W,$))===Wr(N,$)):D.includes(N)},m=(D,N)=>{if(sn(N)){const{valueKey:$}=r.props;return Wr(D,$)===Wr(N,$)}else return D===N},g=(D,N)=>r.props.multiple?h(D,a(N)):m(D,a(N)),y=(D,N)=>{const{disabled:$,multiple:W,multipleLimit:L}=r.props;return $||!N&&(W?L>0&&D.length>=L:!1)},b=D=>t.hoveringIndex===D;n({listRef:u,isSized:d,isItemDisabled:y,isItemHovering:b,isItemSelected:g,scrollToItem:D=>{const N=u.value;N&&N.scrollToItem(D)},resetScrollTop:()=>{const D=u.value;D&&D.resetScrollTop()}});const x=D=>{const{index:N,data:$,style:W}=D,L=p(d),{itemSize:I,estimatedSize:U}=p(f),{modelValue:Q}=r.props,{onSelect:V,onHover:q}=r,K=$[N];if(K.type==="Group")return B(f4e,{item:K,style:W,height:L?I:U},null);const ie=g(Q,K),oe=y(Q,ie),Se=b(N);return B(_4e,gn(D,{selected:ie,disabled:s(K)||oe,created:!!K.created,hovering:Se,item:K,onSelect:V,onHover:q}),{default:ke=>{var Y;return((Y=e.default)==null?void 0:Y.call(e,ke))||B("span",null,[o(K)])}})},{onKeyboardNavigate:C,onKeyboardSelect:E}=r,T=()=>{C("forward")},P=()=>{C("backward")},A=D=>{const{code:N}=D,{tab:$,esc:W,down:L,up:I,enter:U}=St;switch(N!==$&&(D.preventDefault(),D.stopPropagation()),N){case $:case W:break;case L:{T();break}case I:{P();break}case U:{E();break}}};return()=>{var D,N,$,W;const{data:L,width:I}=t,{height:U,multiple:Q,scrollbarAlwaysOn:V}=r.props,q=p(d)?DU:r4e;return B("div",{class:[i.b("dropdown"),i.is("multiple",Q)],style:{width:`${I}px`}},[(D=e.header)==null?void 0:D.call(e),((N=e.loading)==null?void 0:N.call(e))||(($=e.empty)==null?void 0:$.call(e))||B(q,gn({ref:u},p(f),{className:i.be("dropdown","list"),scrollbarAlwaysOn:V,data:L,height:U,width:I,total:L.length,onKeydown:A}),{default:K=>B(x,K,null)}),(W=e.footer)==null?void 0:W.call(e)])}}});function S4e(t,e){const{aliasProps:n,getLabel:r,getValue:i}=nC(t),o=F(0),a=F(),s=M(()=>t.allowCreate&&t.filterable);function l(h){const m=g=>r(g)===h;return t.options&&t.options.some(m)||e.createdOptions.some(m)}function u(h){!s.value||(t.multiple&&h.created?o.value++:a.value=h)}function c(h){if(s.value)if(h&&h.length>0){if(l(h))return;const m={[n.value.value]:h,[n.value.label]:h,created:!0,[n.value.disabled]:!1};e.createdOptions.length>=o.value?e.createdOptions[o.value]=m:e.createdOptions.push(m)}else if(t.multiple)e.createdOptions.length=o.value;else{const m=a.value;e.createdOptions.length=0,m&&m.created&&e.createdOptions.push(m)}}function d(h){if(!s.value||!h||!h.created||h.created&&t.reserveKeyword&&e.inputValue===r(h))return;const m=e.createdOptions.findIndex(g=>i(g)===i(h));~m&&(e.createdOptions.splice(m,1),o.value--)}function f(){s.value&&(e.createdOptions.length=0,o.value=0)}return{createNewOption:c,removeNewOption:d,selectNewOption:u,clearAllNewOption:f}}const x4e=11,C4e=(t,e)=>{const{t:n}=kn(),r=Qe("select"),i=Qe("input"),{form:o,formItem:a}=ua(),{inputId:s}=gu(t,{formItemContext:a}),{aliasProps:l,getLabel:u,getValue:c,getDisabled:d,getOptions:f}=nC(t),{valueOnClear:h,isEmptyValue:m}=Hx(t),g=Sn({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),y=F(-1),b=F(),w=F(),O=F(),S=F(),x=F(),C=F(),E=F(),T=F(),P=F(),A=F(),D=F(),{isComposing:N,handleCompositionStart:$,handleCompositionEnd:W,handleCompositionUpdate:L}=Qx({afterComposition:ot=>Li(ot)}),{wrapperRef:I,isFocused:U,handleBlur:Q}=Pb(x,{beforeFocus(){return ie.value},afterFocus(){t.automaticDropdown&&!K.value&&(K.value=!0,g.menuVisibleOnFocus=!0)},beforeBlur(ot){var Nt,rn;return((Nt=O.value)==null?void 0:Nt.isFocusInsideContent(ot))||((rn=S.value)==null?void 0:rn.isFocusInsideContent(ot))},afterBlur(){K.value=!1,g.menuVisibleOnFocus=!1}}),V=F([]),q=F([]),K=F(!1),ie=M(()=>t.disabled||(o==null?void 0:o.disabled)),oe=M(()=>{const ot=q.value.length*t.itemHeight;return ot>t.height?t.height:ot}),Se=M(()=>t.multiple?ut(t.modelValue)&&t.modelValue.length>0:!m(t.modelValue)),ke=M(()=>t.clearable&&!ie.value&&g.inputHovering&&Se.value),Y=M(()=>t.remote&&t.filterable?"":ld),re=M(()=>Y.value&&r.is("reverse",K.value)),te=M(()=>(a==null?void 0:a.validateState)||""),ge=M(()=>{if(!!te.value)return p$[te.value]}),Re=M(()=>t.remote?300:0),$e=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!g.inputValue&&V.value.length===0?!1:t.filterable&&g.inputValue&&V.value.length>0&&q.value.length===0?t.noMatchText||n("el.select.noMatch"):V.value.length===0?t.noDataText||n("el.select.noData"):null),Z=ot=>{const Nt=rn=>{if(t.filterable&&$t(t.filterMethod)||t.filterable&&t.remote&&$t(t.remoteMethod))return!0;const se=new RegExp(n$(ot),"i");return ot?se.test(u(rn)||""):!0};return t.loading?[]:[...g.createdOptions,...t.options].reduce((rn,se)=>{const ze=f(se);if(ut(ze)){const pt=ze.filter(Nt);pt.length>0&&rn.push({label:u(se),type:"Group"},...pt)}else(t.remote||Nt(se))&&rn.push(se);return rn},[])},ce=()=>{V.value=Z(""),q.value=Z(g.inputValue)},Te=M(()=>{const ot=new Map;return V.value.forEach((Nt,rn)=>{ot.set(nn(c(Nt)),{option:Nt,index:rn})}),ot}),Ie=M(()=>{const ot=new Map;return q.value.forEach((Nt,rn)=>{ot.set(nn(c(Nt)),{option:Nt,index:rn})}),ot}),ae=M(()=>q.value.every(ot=>d(ot))),me=Ni(),Ae=M(()=>me.value==="small"?"small":"default"),X=()=>{var ot;y.value=((ot=b.value)==null?void 0:ot.offsetWidth)||200},ee=()=>{if(!w.value)return 0;const ot=window.getComputedStyle(w.value);return Number.parseFloat(ot.gap||"6px")},le=M(()=>{const ot=ee();return{maxWidth:`${D.value&&t.maxCollapseTags===1?g.selectionWidth-g.collapseItemWidth-ot:g.selectionWidth}px`}}),Ce=M(()=>({maxWidth:`${g.selectionWidth}px`})),fe=M(()=>({width:`${Math.max(g.calculatorWidth,x4e)}px`})),Ee=M(()=>ut(t.modelValue)?t.modelValue.length===0&&!g.inputValue:t.filterable?!g.inputValue:!0),be=M(()=>{var ot;const Nt=(ot=t.placeholder)!=null?ot:n("el.select.placeholder");return t.multiple||!Se.value?Nt:g.selectedLabel}),Be=M(()=>{var ot,Nt;return(Nt=(ot=O.value)==null?void 0:ot.popperRef)==null?void 0:Nt.contentRef}),Xe=M(()=>{if(t.multiple){const ot=t.modelValue.length;if(t.modelValue.length>0&&Ie.value.has(t.modelValue[ot-1])){const{index:Nt}=Ie.value.get(t.modelValue[ot-1]);return Nt}}else if(t.modelValue&&Ie.value.has(t.modelValue)){const{index:ot}=Ie.value.get(t.modelValue);return ot}return-1}),Ke=M({get(){return K.value&&$e.value!==!1},set(ot){K.value=ot}}),tt=M(()=>t.multiple?t.collapseTags?g.cachedOptions.slice(0,t.maxCollapseTags):g.cachedOptions:[]),Dt=M(()=>t.multiple?t.collapseTags?g.cachedOptions.slice(t.maxCollapseTags):[]:[]),{createNewOption:jt,removeNewOption:Me,selectNewOption:nt,clearAllNewOption:de}=S4e(t,g),Pe=()=>{ie.value||(g.menuVisibleOnFocus?g.menuVisibleOnFocus=!1:K.value=!K.value)},Le=()=>{g.inputValue.length>0&&!K.value&&(K.value=!0),jt(g.inputValue),tn(g.inputValue)},wt=jo(Le,Re.value),tn=ot=>{g.previousQuery===ot||N.value||(g.previousQuery=ot,t.filterable&&$t(t.filterMethod)?t.filterMethod(ot):t.filterable&&t.remote&&$t(t.remoteMethod)&&t.remoteMethod(ot),t.defaultFirstOption&&(t.filterable||t.remote)&&q.value.length?Ot(De):Ot(zt))},De=()=>{const ot=q.value.filter(se=>!se.disabled&&se.type!=="Group"),Nt=ot.find(se=>se.created),rn=ot[0];g.hoveringIndex=ln(q.value,Nt||rn)},xt=ot=>{so(t.modelValue,ot)||e(Lr,ot)},qt=ot=>{e(Zt,ot),xt(ot),g.previousValue=t.multiple?String(ot):ot},ln=(ot=[],Nt)=>{if(!sn(Nt))return ot.indexOf(Nt);const rn=t.valueKey;let se=-1;return ot.some((ze,pt)=>Wr(ze,rn)===Wr(Nt,rn)?(se=pt,!0):!1),se},nn=ot=>sn(ot)?Wr(ot,t.valueKey):ot,bn=()=>{X()},Ze=()=>{g.selectionWidth=w.value.getBoundingClientRect().width},Rt=()=>{g.calculatorWidth=C.value.getBoundingClientRect().width},xn=()=>{g.collapseItemWidth=D.value.getBoundingClientRect().width},fn=()=>{var ot,Nt;(Nt=(ot=O.value)==null?void 0:ot.updatePopper)==null||Nt.call(ot)},Er=()=>{var ot,Nt;(Nt=(ot=S.value)==null?void 0:ot.updatePopper)==null||Nt.call(ot)},dr=ot=>{if(t.multiple){let Nt=t.modelValue.slice();const rn=ln(Nt,c(ot));rn>-1?(Nt=[...Nt.slice(0,rn),...Nt.slice(rn+1)],g.cachedOptions.splice(rn,1),Me(ot)):(t.multipleLimit<=0||Nt.length<t.multipleLimit)&&(Nt=[...Nt,c(ot)],g.cachedOptions.push(ot),nt(ot)),qt(Nt),ot.created&&tn(""),t.filterable&&!t.reserveKeyword&&(g.inputValue="")}else g.selectedLabel=u(ot),qt(c(ot)),K.value=!1,nt(ot),ot.created||de();Pi()},eo=(ot,Nt)=>{let rn=t.modelValue.slice();const se=ln(rn,c(Nt));se>-1&&!ie.value&&(rn=[...t.modelValue.slice(0,se),...t.modelValue.slice(se+1)],g.cachedOptions.splice(se,1),qt(rn),e("remove-tag",c(Nt)),Me(Nt)),ot.stopPropagation(),Pi()},Pi=()=>{var ot;(ot=x.value)==null||ot.focus()},Oi=()=>{var ot;if(K.value){K.value=!1,Ot(()=>{var Nt;return(Nt=x.value)==null?void 0:Nt.blur()});return}(ot=x.value)==null||ot.blur()},Ml=()=>{g.inputValue.length>0?g.inputValue="":K.value=!1},cs=ot=>kx(ot,Nt=>!g.cachedOptions.some(rn=>c(rn)===Nt&&d(rn))),_r=ot=>{if(!!t.multiple&&ot.code!==St.delete&&g.inputValue.length===0){ot.preventDefault();const Nt=t.modelValue.slice(),rn=cs(Nt);if(rn<0)return;const se=Nt[rn];Nt.splice(rn,1);const ze=g.cachedOptions[rn];g.cachedOptions.splice(rn,1),Me(ze),qt(Nt),e("remove-tag",se)}},Rl=()=>{let ot;ut(t.modelValue)?ot=[]:ot=h.value,t.multiple?g.cachedOptions=[]:g.selectedLabel="",K.value=!1,qt(ot),e("clear"),de(),Pi()},et=(ot,Nt=void 0)=>{const rn=q.value;if(!["forward","backward"].includes(ot)||ie.value||rn.length<=0||ae.value||N.value)return;if(!K.value)return Pe();Nt===void 0&&(Nt=g.hoveringIndex);let se=-1;ot==="forward"?(se=Nt+1,se>=rn.length&&(se=0)):ot==="backward"&&(se=Nt-1,(se<0||se>=rn.length)&&(se=rn.length-1));const ze=rn[se];if(d(ze)||ze.type==="Group")return et(ot,se);g.hoveringIndex=se,po(se)},Mt=()=>{if(K.value)~g.hoveringIndex&&q.value[g.hoveringIndex]&&dr(q.value[g.hoveringIndex]);else return Pe()},Vn=ot=>{g.hoveringIndex=ot!=null?ot:-1},zt=()=>{t.multiple?g.hoveringIndex=q.value.findIndex(ot=>t.modelValue.some(Nt=>nn(Nt)===nn(ot))):g.hoveringIndex=q.value.findIndex(ot=>nn(ot)===nn(t.modelValue))},Li=ot=>{if(g.inputValue=ot.target.value,t.remote)wt();else return Le()},Eo=ot=>{if(K.value=!1,U.value){const Nt=new FocusEvent("focus",ot);Q(Nt)}},Wo=()=>(g.isBeforeHide=!1,Ot(()=>{~Xe.value&&po(g.hoveringIndex)})),po=ot=>{P.value.scrollToItem(ot)},Ei=(ot,Nt)=>{const rn=nn(ot);if(Te.value.has(rn)){const{option:se}=Te.value.get(rn);return se}if(Nt&&Nt.length){const se=Nt.find(ze=>nn(c(ze))===rn);if(se)return se}return{[l.value.value]:ot,[l.value.label]:ot}},Uo=(ot=!1)=>{if(t.multiple)if(t.modelValue.length>0){const Nt=g.cachedOptions.slice();g.cachedOptions.length=0,g.previousValue=t.modelValue.toString();for(const rn of t.modelValue){const se=Ei(rn,Nt);g.cachedOptions.push(se)}}else g.cachedOptions=[],g.previousValue=void 0;else if(Se.value){g.previousValue=t.modelValue;const Nt=q.value,rn=Nt.findIndex(se=>nn(c(se))===nn(t.modelValue));~rn?g.selectedLabel=u(Nt[rn]):(!g.selectedLabel||ot)&&(g.selectedLabel=nn(t.modelValue))}else g.selectedLabel="",g.previousValue=void 0;de(),X()};return Ve(K,ot=>{ot?tn(""):(g.inputValue="",g.previousQuery=null,g.isBeforeHide=!0,jt("")),e("visible-change",ot)}),Ve(()=>t.modelValue,(ot,Nt)=>{var rn;(!ot||t.multiple&&ot.toString()!==g.previousValue||!t.multiple&&nn(ot)!==nn(g.previousValue))&&Uo(!0),!so(ot,Nt)&&t.validateEvent&&((rn=a==null?void 0:a.validate)==null||rn.call(a,"change").catch(se=>void 0))},{deep:!0}),Ve(()=>t.options,()=>{const ot=x.value;(!ot||ot&&document.activeElement!==ot)&&Uo()},{deep:!0,flush:"post"}),Ve(()=>q.value,()=>P.value&&Ot(P.value.resetScrollTop)),Bo(()=>{g.isBeforeHide||ce()}),Bo(()=>{const{valueKey:ot,options:Nt}=t,rn=new Map;for(const se of Nt){const ze=c(se);let pt=ze;if(sn(pt)&&(pt=Wr(ze,ot)),rn.get(pt))break;rn.set(pt,!0)}}),Bt(()=>{Uo()}),Zr(b,bn),Zr(w,Ze),Zr(C,Rt),Zr(P,fn),Zr(I,fn),Zr(A,Er),Zr(D,xn),{inputId:s,collapseTagSize:Ae,currentPlaceholder:be,expanded:K,emptyText:$e,popupHeight:oe,debounce:Re,allOptions:V,filteredOptions:q,iconComponent:Y,iconReverse:re,tagStyle:le,collapseTagStyle:Ce,inputStyle:fe,popperSize:y,dropdownMenuVisible:Ke,hasModelValue:Se,shouldShowPlaceholder:Ee,selectDisabled:ie,selectSize:me,showClearBtn:ke,states:g,isFocused:U,nsSelect:r,nsInput:i,calculatorRef:C,inputRef:x,menuRef:P,tagMenuRef:A,tooltipRef:O,tagTooltipRef:S,selectRef:b,wrapperRef:I,selectionRef:w,prefixRef:E,suffixRef:T,collapseItemRef:D,popperRef:Be,validateState:te,validateIcon:ge,showTagList:tt,collapseTagList:Dt,debouncedOnInputChange:wt,deleteTag:eo,getLabel:u,getValue:c,getDisabled:d,getValueKey:nn,handleClear:Rl,handleClickOutside:Eo,handleDel:_r,handleEsc:Ml,focus:Pi,blur:Oi,handleMenuEnter:Wo,handleResize:bn,resetSelectionWidth:Ze,resetCalculatorWidth:Rt,updateTooltip:fn,updateTagTooltip:Er,updateOptions:ce,toggleMenu:Pe,scrollTo:po,onInput:Li,onKeyboardNavigate:et,onKeyboardSelect:Mt,onSelect:dr,onHover:Vn,handleCompositionStart:$,handleCompositionEnd:W,handleCompositionUpdate:L}},E4e=ue({name:"ElSelectV2",components:{ElSelectMenu:w4e,ElTag:Bs,ElTooltip:Ui,ElIcon:gt},directives:{ClickOutside:qc},props:p4e,emits:m4e,setup(t,{emit:e}){const n=M(()=>{const{modelValue:o,multiple:a}=t,s=a?[]:void 0;return ut(o)?a?o:s:a?s:o}),r=C4e(Sn({...Ri(t),modelValue:n}),e);_n(lN,{props:Sn({...Ri(t),height:r.popupHeight,modelValue:n}),expanded:r.expanded,tooltipRef:r.tooltipRef,onSelect:r.onSelect,onHover:r.onHover,onKeyboardNavigate:r.onKeyboardNavigate,onKeyboardSelect:r.onKeyboardSelect});const i=M(()=>t.multiple?r.states.cachedOptions.map(o=>o.label):r.states.selectedLabel);return{...r,modelValue:n,selectedLabel:i}}});function T4e(t,e,n,r,i,o){const a=an("el-tag"),s=an("el-tooltip"),l=an("el-icon"),u=an("el-select-menu"),c=dx("click-outside");return Ht((R(),G("div",{ref:"selectRef",class:j([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:d=>t.states.inputHovering=!0,onMouseleave:d=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,placement:t.placement,pure:"",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:t.persistent,onBeforeShow:t.handleMenuEnter,onHide:d=>t.states.isBeforeHide=!1},{default:z(()=>[J("div",{ref:"wrapperRef",class:j([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:Pt(t.toggleMenu,["prevent"])},[t.$slots.prefix?(R(),G("div",{key:0,ref:"prefixRef",class:j(t.nsSelect.e("prefix"))},[xe(t.$slots,"prefix")],2)):_e("v-if",!0),J("div",{ref:"selectionRef",class:j([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.modelValue.length)])},[t.multiple?xe(t.$slots,"tag",{key:0},()=>[(R(!0),G(ct,null,Wt(t.showTagList,d=>(R(),G("div",{key:t.getValueKey(t.getValue(d)),class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.tagStyle),onClose:f=>t.deleteTag(f,d)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[qe(je(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.modelValue.length>t.maxCollapseTags?(R(),we(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:z(()=>[J("div",{ref:"collapseItemRef",class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,style:mt(t.collapseTagStyle),"disable-transitions":""},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))}," + "+je(t.modelValue.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:z(()=>[J("div",{ref:"tagMenuRef",class:j(t.nsSelect.e("selection"))},[(R(!0),G(ct,null,Wt(t.collapseTagList,d=>(R(),G("div",{key:t.getValueKey(t.getValue(d)),class:j(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:f=>t.deleteTag(f,d)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[qe(je(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):_e("v-if",!0)]):_e("v-if",!0),t.selectDisabled?_e("v-if",!0):(R(),G("div",{key:1,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Ht(J("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":d=>t.states.inputValue=d,style:mt(t.inputStyle),autocomplete:t.autocomplete,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":t.expanded,"aria-label":t.ariaLabel,class:j([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,role:"combobox",readonly:!t.filterable,spellcheck:"false",type:"text",name:t.name,onInput:t.onInput,onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onKeydown:[br(Pt(d=>t.onKeyboardNavigate("backward"),["stop","prevent"]),["up"]),br(Pt(d=>t.onKeyboardNavigate("forward"),["stop","prevent"]),["down"]),br(Pt(t.onKeyboardSelect,["stop","prevent"]),["enter"]),br(Pt(t.handleEsc,["stop","prevent"]),["esc"]),br(Pt(t.handleDel,["stop"]),["delete"])],onClick:Pt(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","autocomplete","aria-expanded","aria-label","disabled","readonly","name","onInput","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown","onClick"]),[[JM,t.states.inputValue]]),t.filterable?(R(),G("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:j(t.nsSelect.e("input-calculator")),textContent:je(t.states.inputValue)},null,10,["textContent"])):_e("v-if",!0)],2)),t.shouldShowPlaceholder?(R(),G("div",{key:2,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?xe(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[J("span",null,je(t.currentPlaceholder),1)]):(R(),G("span",{key:1},je(t.currentPlaceholder),1))],2)):_e("v-if",!0)],2),J("div",{ref:"suffixRef",class:j(t.nsSelect.e("suffix"))},[t.iconComponent?Ht((R(),we(l,{key:0,class:j([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.iconReverse])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])),[[zn,!t.showClearBtn]]):_e("v-if",!0),t.showClearBtn&&t.clearIcon?(R(),we(l,{key:1,class:j([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.nsSelect.e("clear")]),onClick:Pt(t.handleClear,["prevent","stop"])},{default:z(()=>[(R(),we(un(t.clearIcon)))]),_:1},8,["class","onClick"])):_e("v-if",!0),t.validateState&&t.validateIcon?(R(),we(l,{key:2,class:j([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:z(()=>[(R(),we(un(t.validateIcon)))]),_:1},8,["class"])):_e("v-if",!0)],2)],10,["onClick"])]),content:z(()=>[B(u,{ref:"menuRef",data:t.filteredOptions,width:t.popperSize,"hovering-index":t.states.hoveringIndex,"scrollbar-always-on":t.scrollbarAlwaysOn},ts({default:z(d=>[xe(t.$slots,"default",Xl(lf(d)))]),_:2},[t.$slots.header?{name:"header",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","header"))},[xe(t.$slots,"header")],2)])}:void 0,t.$slots.loading&&t.loading?{name:"loading",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","loading"))},[xe(t.$slots,"loading")],2)])}:t.loading||t.filteredOptions.length===0?{name:"empty",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","empty"))},[xe(t.$slots,"empty",{},()=>[J("span",null,je(t.emptyText),1)])],2)])}:void 0,t.$slots.footer?{name:"footer",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","footer"))},[xe(t.$slots,"footer")],2)])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","onBeforeShow","onHide"])],42,["onMouseenter","onMouseleave"])),[[c,t.handleClickOutside,t.popperRef]])}var k4e=Ge(E4e,[["render",T4e],["__file","select.vue"]]);const P4e=Vt(k4e),A4e=Ye({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),M4e=Ye({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),R4e=ue({name:"ElSkeletonItem"}),$4e=ue({...R4e,props:M4e,setup(t){const e=Qe("skeleton");return(n,r)=>(R(),G("div",{class:j([p(e).e("item"),p(e).e(n.variant)])},[n.variant==="image"?(R(),we(p(OCe),{key:0})):_e("v-if",!0)],2))}});var Pw=Ge($4e,[["__file","skeleton-item.vue"]]);const N4e=ue({name:"ElSkeleton"}),D4e=ue({...N4e,props:A4e,setup(t,{expose:e}){const n=t,r=Qe("skeleton"),i=yTe(er(n,"loading"),n.throttle);return e({uiLoading:i}),(o,a)=>p(i)?(R(),G("div",gn({key:0,class:[p(r).b(),p(r).is("animated",o.animated)]},o.$attrs),[(R(!0),G(ct,null,Wt(o.count,s=>(R(),G(ct,{key:s},[o.loading?xe(o.$slots,"template",{key:s},()=>[B(Pw,{class:j(p(r).is("first")),variant:"p"},null,8,["class"]),(R(!0),G(ct,null,Wt(o.rows,l=>(R(),we(Pw,{key:l,class:j([p(r).e("paragraph"),p(r).is("last",l===o.rows&&o.rows>1)]),variant:"p"},null,8,["class"]))),128))]):_e("v-if",!0)],64))),128))],16)):xe(o.$slots,"default",Xl(gn({key:1},o.$attrs)))}});var L4e=Ge(D4e,[["__file","skeleton.vue"]]);const I4e=Vt(L4e,{SkeletonItem:Pw}),B4e=ti(Pw),HU=Symbol("sliderContextKey"),F4e=Ye({modelValue:{type:Oe([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Wi,inputSize:Wi,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Oe(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Oe(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:ud,default:"top"},marks:{type:Oe(Object)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),RT=t=>kt(t)||ut(t)&&t.every(kt),V4e={[Zt]:RT,[Oa]:RT,[Lr]:RT},j4e=(t,e,n)=>{const r=F();return Bt(async()=>{t.range?(Array.isArray(t.modelValue)?(e.firstValue=Math.max(t.min,t.modelValue[0]),e.secondValue=Math.min(t.max,t.modelValue[1])):(e.firstValue=t.min,e.secondValue=t.max),e.oldValue=[e.firstValue,e.secondValue]):(typeof t.modelValue!="number"||Number.isNaN(t.modelValue)?e.firstValue=t.min:e.firstValue=Math.min(t.max,Math.max(t.min,t.modelValue)),e.oldValue=e.firstValue),sr(window,"resize",n),await Ot(),n()}),{sliderWrapper:r}},z4e=t=>M(()=>t.marks?Object.keys(t.marks).map(Number.parseFloat).sort((n,r)=>n-r).filter(n=>n<=t.max&&n>=t.min).map(n=>({point:n,position:(n-t.min)*100/(t.max-t.min),mark:t.marks[n]})):[]),Q4e=(t,e,n)=>{const{form:r,formItem:i}=ua(),o=Tr(),a=F(),s=F(),l={firstButton:a,secondButton:s},u=M(()=>t.disabled||(r==null?void 0:r.disabled)||!1),c=M(()=>Math.min(e.firstValue,e.secondValue)),d=M(()=>Math.max(e.firstValue,e.secondValue)),f=M(()=>t.range?`${100*(d.value-c.value)/(t.max-t.min)}%`:`${100*(e.firstValue-t.min)/(t.max-t.min)}%`),h=M(()=>t.range?`${100*(c.value-t.min)/(t.max-t.min)}%`:"0%"),m=M(()=>t.vertical?{height:t.height}:{}),g=M(()=>t.vertical?{height:f.value,bottom:h.value}:{width:f.value,left:h.value}),y=()=>{o.value&&(e.sliderSize=o.value[`client${t.vertical?"Height":"Width"}`])},b=N=>{const $=t.min+N*(t.max-t.min)/100;if(!t.range)return a;let W;return Math.abs(c.value-$)<Math.abs(d.value-$)?W=e.firstValue<e.secondValue?"firstButton":"secondButton":W=e.firstValue>e.secondValue?"firstButton":"secondButton",l[W]},w=N=>{const $=b(N);return $.value.setPosition(N),$},O=N=>{e.firstValue=N!=null?N:t.min,x(t.range?[c.value,d.value]:N!=null?N:t.min)},S=N=>{e.secondValue=N,t.range&&x([c.value,d.value])},x=N=>{n(Zt,N),n(Oa,N)},C=async()=>{await Ot(),n(Lr,t.range?[c.value,d.value]:t.modelValue)},E=N=>{var $,W,L,I,U,Q;if(u.value||e.dragging)return;y();let V=0;if(t.vertical){const q=(L=(W=($=N.touches)==null?void 0:$.item(0))==null?void 0:W.clientY)!=null?L:N.clientY;V=(o.value.getBoundingClientRect().bottom-q)/e.sliderSize*100}else{const q=(Q=(U=(I=N.touches)==null?void 0:I.item(0))==null?void 0:U.clientX)!=null?Q:N.clientX,K=o.value.getBoundingClientRect().left;V=(q-K)/e.sliderSize*100}if(!(V<0||V>100))return w(V)};return{elFormItem:i,slider:o,firstButton:a,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:m,barStyle:g,resetSize:y,setPosition:w,emitChange:C,onSliderWrapperPrevent:N=>{var $,W;((($=l.firstButton.value)==null?void 0:$.dragging)||((W=l.secondButton.value)==null?void 0:W.dragging))&&N.preventDefault()},onSliderClick:N=>{E(N)&&C()},onSliderDown:async N=>{const $=E(N);$&&(await Ot(),$.value.onButtonDown(N))},onSliderMarkerDown:N=>{u.value||e.dragging||w(N)},setFirstValue:O,setSecondValue:S}},{left:H4e,down:W4e,right:U4e,up:q4e,home:Y4e,end:X4e,pageUp:Z4e,pageDown:G4e}=St,K4e=(t,e,n)=>{const r=F(),i=F(!1),o=M(()=>e.value instanceof Function),a=M(()=>o.value&&e.value(t.modelValue)||t.modelValue),s=jo(()=>{n.value&&(i.value=!0)},50),l=jo(()=>{n.value&&(i.value=!1)},50);return{tooltip:r,tooltipVisible:i,formatValue:a,displayTooltip:s,hideTooltip:l}},J4e=(t,e,n)=>{const{disabled:r,min:i,max:o,step:a,showTooltip:s,precision:l,sliderSize:u,formatTooltip:c,emitChange:d,resetSize:f,updateDragging:h}=ht(HU),{tooltip:m,tooltipVisible:g,formatValue:y,displayTooltip:b,hideTooltip:w}=K4e(t,c,s),O=F(),S=M(()=>`${(t.modelValue-i.value)/(o.value-i.value)*100}%`),x=M(()=>t.vertical?{bottom:S.value}:{left:S.value}),C=()=>{e.hovering=!0,b()},E=()=>{e.hovering=!1,e.dragging||w()},T=ie=>{r.value||(ie.preventDefault(),Q(ie),window.addEventListener("mousemove",V),window.addEventListener("touchmove",V),window.addEventListener("mouseup",q),window.addEventListener("touchend",q),window.addEventListener("contextmenu",q),O.value.focus())},P=ie=>{r.value||(e.newPosition=Number.parseFloat(S.value)+ie/(o.value-i.value)*100,K(e.newPosition),d())},A=()=>{P(-a.value)},D=()=>{P(a.value)},N=()=>{P(-a.value*4)},$=()=>{P(a.value*4)},W=()=>{r.value||(K(0),d())},L=()=>{r.value||(K(100),d())},I=ie=>{let oe=!0;[H4e,W4e].includes(ie.key)?A():[U4e,q4e].includes(ie.key)?D():ie.key===Y4e?W():ie.key===X4e?L():ie.key===G4e?N():ie.key===Z4e?$():oe=!1,oe&&ie.preventDefault()},U=ie=>{let oe,Se;return ie.type.startsWith("touch")?(Se=ie.touches[0].clientY,oe=ie.touches[0].clientX):(Se=ie.clientY,oe=ie.clientX),{clientX:oe,clientY:Se}},Q=ie=>{e.dragging=!0,e.isClick=!0;const{clientX:oe,clientY:Se}=U(ie);t.vertical?e.startY=Se:e.startX=oe,e.startPosition=Number.parseFloat(S.value),e.newPosition=e.startPosition},V=ie=>{if(e.dragging){e.isClick=!1,b(),f();let oe;const{clientX:Se,clientY:ke}=U(ie);t.vertical?(e.currentY=ke,oe=(e.startY-e.currentY)/u.value*100):(e.currentX=Se,oe=(e.currentX-e.startX)/u.value*100),e.newPosition=e.startPosition+oe,K(e.newPosition)}},q=()=>{e.dragging&&(setTimeout(()=>{e.dragging=!1,e.hovering||w(),e.isClick||K(e.newPosition),d()},0),window.removeEventListener("mousemove",V),window.removeEventListener("touchmove",V),window.removeEventListener("mouseup",q),window.removeEventListener("touchend",q),window.removeEventListener("contextmenu",q))},K=async ie=>{if(ie===null||Number.isNaN(+ie))return;ie<0?ie=0:ie>100&&(ie=100);const oe=100/((o.value-i.value)/a.value);let ke=Math.round(ie/oe)*oe*(o.value-i.value)*.01+i.value;ke=Number.parseFloat(ke.toFixed(l.value)),ke!==t.modelValue&&n(Zt,ke),!e.dragging&&t.modelValue!==e.oldValue&&(e.oldValue=t.modelValue),await Ot(),e.dragging&&b(),m.value.updatePopper()};return Ve(()=>e.dragging,ie=>{h(ie)}),sr(O,"touchstart",T,{passive:!1}),{disabled:r,button:O,tooltip:m,tooltipVisible:g,showTooltip:s,wrapperStyle:x,formatValue:y,handleMouseEnter:C,handleMouseLeave:E,onButtonDown:T,onKeyDown:I,setPosition:K}},e5e=(t,e,n,r)=>({stops:M(()=>{if(!t.showStops||t.min>t.max)return[];if(t.step===0)return[];const a=(t.max-t.min)/t.step,s=100*t.step/(t.max-t.min),l=Array.from({length:a-1}).map((u,c)=>(c+1)*s);return t.range?l.filter(u=>u<100*(n.value-t.min)/(t.max-t.min)||u>100*(r.value-t.min)/(t.max-t.min)):l.filter(u=>u>100*(e.firstValue-t.min)/(t.max-t.min))}),getStopStyle:a=>t.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),t5e=(t,e,n,r,i,o)=>{const a=u=>{i(Zt,u),i(Oa,u)},s=()=>t.range?![n.value,r.value].every((u,c)=>u===e.oldValue[c]):t.modelValue!==e.oldValue,l=()=>{var u,c;t.min>t.max&&Hi("Slider","min should not be greater than max.");const d=t.modelValue;t.range&&Array.isArray(d)?d[1]<t.min?a([t.min,t.min]):d[0]>t.max?a([t.max,t.max]):d[0]<t.min?a([t.min,d[1]]):d[1]>t.max?a([d[0],t.max]):(e.firstValue=d[0],e.secondValue=d[1],s()&&(t.validateEvent&&((u=o==null?void 0:o.validate)==null||u.call(o,"change").catch(f=>void 0)),e.oldValue=d.slice())):!t.range&&typeof d=="number"&&!Number.isNaN(d)&&(d<t.min?a(t.min):d>t.max?a(t.max):(e.firstValue=d,s()&&(t.validateEvent&&((c=o==null?void 0:o.validate)==null||c.call(o,"change").catch(f=>void 0)),e.oldValue=d)))};l(),Ve(()=>e.dragging,u=>{u||l()}),Ve(()=>t.modelValue,(u,c)=>{e.dragging||Array.isArray(u)&&Array.isArray(c)&&u.every((d,f)=>d===c[f])&&e.firstValue===u[0]&&e.secondValue===u[1]||l()},{deep:!0}),Ve(()=>[t.min,t.max],()=>{l()})},n5e=Ye({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:ud,default:"top"}}),r5e={[Zt]:t=>kt(t)},i5e=ue({name:"ElSliderButton"}),o5e=ue({...i5e,props:n5e,emits:r5e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("slider"),o=Sn({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),{disabled:a,button:s,tooltip:l,showTooltip:u,tooltipVisible:c,wrapperStyle:d,formatValue:f,handleMouseEnter:h,handleMouseLeave:m,onButtonDown:g,onKeyDown:y,setPosition:b}=J4e(r,o,n),{hovering:w,dragging:O}=Ri(o);return e({onButtonDown:g,onKeyDown:y,setPosition:b,hovering:w,dragging:O}),(S,x)=>(R(),G("div",{ref_key:"button",ref:s,class:j([p(i).e("button-wrapper"),{hover:p(w),dragging:p(O)}]),style:mt(p(d)),tabindex:p(a)?-1:0,onMouseenter:p(h),onMouseleave:p(m),onMousedown:p(g),onFocus:p(h),onBlur:p(m),onKeydown:p(y)},[B(p(Ui),{ref_key:"tooltip",ref:l,visible:p(c),placement:S.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":S.tooltipClass,disabled:!p(u),persistent:""},{content:z(()=>[J("span",null,je(p(f)),1)]),default:z(()=>[J("div",{class:j([p(i).e("button"),{hover:p(w),dragging:p(O)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var B8=Ge(o5e,[["__file","button.vue"]]);const a5e=Ye({mark:{type:Oe([String,Object]),default:void 0}});var s5e=ue({name:"ElSliderMarker",props:a5e,setup(t){const e=Qe("slider"),n=M(()=>At(t.mark)?t.mark:t.mark.label),r=M(()=>At(t.mark)?void 0:t.mark.style);return()=>Et("div",{class:e.e("marks-text"),style:r.value},n.value)}});const l5e=ue({name:"ElSlider"}),u5e=ue({...l5e,props:F4e,emits:V4e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("slider"),{t:o}=kn(),a=Sn({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:s,slider:l,firstButton:u,secondButton:c,sliderDisabled:d,minValue:f,maxValue:h,runwayStyle:m,barStyle:g,resetSize:y,emitChange:b,onSliderWrapperPrevent:w,onSliderClick:O,onSliderDown:S,onSliderMarkerDown:x,setFirstValue:C,setSecondValue:E}=Q4e(r,a,n),{stops:T,getStopStyle:P}=e5e(r,a,f,h),{inputId:A,isLabeledByFormItem:D}=gu(r,{formItemContext:s}),N=Ni(),$=M(()=>r.inputSize||N.value),W=M(()=>r.ariaLabel||o("el.slider.defaultLabel",{min:r.min,max:r.max})),L=M(()=>r.range?r.rangeStartLabel||o("el.slider.defaultRangeStartLabel"):W.value),I=M(()=>r.formatValueText?r.formatValueText(oe.value):`${oe.value}`),U=M(()=>r.rangeEndLabel||o("el.slider.defaultRangeEndLabel")),Q=M(()=>r.formatValueText?r.formatValueText(Se.value):`${Se.value}`),V=M(()=>[i.b(),i.m(N.value),i.is("vertical",r.vertical),{[i.m("with-input")]:r.showInput}]),q=z4e(r);t5e(r,a,f,h,n,s);const K=M(()=>{const re=[r.min,r.max,r.step].map(te=>{const ge=`${te}`.split(".")[1];return ge?ge.length:0});return Math.max.apply(null,re)}),{sliderWrapper:ie}=j4e(r,a,y),{firstValue:oe,secondValue:Se,sliderSize:ke}=Ri(a),Y=re=>{a.dragging=re};return sr(ie,"touchstart",w,{passive:!1}),sr(ie,"touchmove",w,{passive:!1}),_n(HU,{...Ri(r),sliderSize:ke,disabled:d,precision:K,emitChange:b,resetSize:y,updateDragging:Y}),e({onSliderClick:O}),(re,te)=>{var ge,Re;return R(),G("div",{id:re.range?p(A):void 0,ref_key:"sliderWrapper",ref:ie,class:j(p(V)),role:re.range?"group":void 0,"aria-label":re.range&&!p(D)?p(W):void 0,"aria-labelledby":re.range&&p(D)?(ge=p(s))==null?void 0:ge.labelId:void 0},[J("div",{ref_key:"slider",ref:l,class:j([p(i).e("runway"),{"show-input":re.showInput&&!re.range},p(i).is("disabled",p(d))]),style:mt(p(m)),onMousedown:p(S),onTouchstartPassive:p(S)},[J("div",{class:j(p(i).e("bar")),style:mt(p(g))},null,6),B(B8,{id:re.range?void 0:p(A),ref_key:"firstButton",ref:u,"model-value":p(oe),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":re.range||!p(D)?p(L):void 0,"aria-labelledby":!re.range&&p(D)?(Re=p(s))==null?void 0:Re.labelId:void 0,"aria-valuemin":re.min,"aria-valuemax":re.range?p(Se):re.max,"aria-valuenow":p(oe),"aria-valuetext":p(I),"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),re.range?(R(),we(B8,{key:0,ref_key:"secondButton",ref:c,"model-value":p(Se),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":p(U),"aria-valuemin":p(oe),"aria-valuemax":re.max,"aria-valuenow":p(Se),"aria-valuetext":p(Q),"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(E)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):_e("v-if",!0),re.showStops?(R(),G("div",{key:1},[(R(!0),G(ct,null,Wt(p(T),($e,Z)=>(R(),G("div",{key:Z,class:j(p(i).e("stop")),style:mt(p(P)($e))},null,6))),128))])):_e("v-if",!0),p(q).length>0?(R(),G(ct,{key:2},[J("div",null,[(R(!0),G(ct,null,Wt(p(q),($e,Z)=>(R(),G("div",{key:Z,style:mt(p(P)($e.position)),class:j([p(i).e("stop"),p(i).e("marks-stop")])},null,6))),128))]),J("div",{class:j(p(i).e("marks"))},[(R(!0),G(ct,null,Wt(p(q),($e,Z)=>(R(),we(p(s5e),{key:Z,mark:$e.mark,style:mt(p(P)($e.position)),onMousedown:Pt(ce=>p(x)($e.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):_e("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),re.showInput&&!re.range?(R(),we(p(vU),{key:0,ref:"input","model-value":p(oe),class:j(p(i).e("input")),step:re.step,disabled:p(d),controls:re.showInputControls,min:re.min,max:re.max,precision:p(K),debounce:re.debounce,size:p($),"onUpdate:modelValue":p(C),onChange:p(b)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):_e("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var c5e=Ge(u5e,[["__file","slider.vue"]]);const d5e=Vt(c5e),f5e=Ye({prefixCls:{type:String}}),F8=ue({name:"ElSpaceItem",props:f5e,setup(t,{slots:e}){const n=Qe("space"),r=M(()=>`${t.prefixCls||n.b()}__item`);return()=>Et("div",{class:r.value},xe(e,"default"))}}),V8={small:8,default:12,large:16};function h5e(t){const e=Qe("space"),n=M(()=>[e.b(),e.m(t.direction),t.class]),r=F(0),i=F(0),o=M(()=>{const s=t.wrap||t.fill?{flexWrap:"wrap"}:{},l={alignItems:t.alignment},u={rowGap:`${i.value}px`,columnGap:`${r.value}px`};return[s,l,u,t.style]}),a=M(()=>t.fill?{flexGrow:1,minWidth:`${t.fillRatio}%`}:{});return Bo(()=>{const{size:s="small",wrap:l,direction:u,fill:c}=t;if(ut(s)){const[d=0,f=0]=s;r.value=d,i.value=f}else{let d;kt(s)?d=s:d=V8[s||"small"]||V8.small,(l||c)&&u==="horizontal"?r.value=i.value=d:u==="horizontal"?(r.value=d,i.value=0):(i.value=d,r.value=0)}}),{classes:n,containerStyle:o,itemStyle:a}}const p5e=Ye({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:Oe([String,Object,Array]),default:""},style:{type:Oe([String,Array,Object]),default:""},alignment:{type:Oe(String),default:"center"},prefixCls:{type:String},spacer:{type:Oe([Object,String,Number,Array]),default:null,validator:t=>Kr(t)||kt(t)||At(t)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:cc,validator:t=>kt(t)||ut(t)&&t.length===2&&t.every(kt)}}),g5e=ue({name:"ElSpace",props:p5e,setup(t,{slots:e}){const{classes:n,containerStyle:r,itemStyle:i}=h5e(t);function o(a,s="",l=[]){const{prefixCls:u}=t;return a.forEach((c,d)=>{_k(c)?ut(c.children)&&c.children.forEach((f,h)=>{_k(f)&&ut(f.children)?o(f.children,`${s+h}-`,l):l.push(B(F8,{style:i.value,prefixCls:u,key:`nested-${s+h}`},{default:()=>[f]},Ks.PROPS|Ks.STYLE,["style","prefixCls"]))}):JCe(c)&&l.push(B(F8,{style:i.value,prefixCls:u,key:`LoopKey${s+d}`},{default:()=>[c]},Ks.PROPS|Ks.STYLE,["style","prefixCls"]))}),l}return()=>{var a;const{spacer:s,direction:l}=t,u=xe(e,"default",{key:0},()=>[]);if(((a=u.children)!=null?a:[]).length===0)return null;if(ut(u.children)){let c=o(u.children);if(s){const d=c.length-1;c=c.reduce((f,h,m)=>{const g=[...f,h];return m!==d&&g.push(B("span",{style:[i.value,l==="vertical"?"width: 100%":null],key:m},[Kr(s)?s:qe(s,Ks.TEXT)],Ks.STYLE)),g},[])}return B("div",{class:n.value,style:r.value},c,Ks.STYLE|Ks.CLASS)}return u.children}}}),m5e=Vt(g5e),v5e=Ye({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:Oe([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:Oe([String,Object,Array])}}),y5e=ue({name:"ElStatistic"}),b5e=ue({...y5e,props:v5e,setup(t,{expose:e}){const n=t,r=Qe("statistic"),i=M(()=>{const{value:o,formatter:a,precision:s,decimalSeparator:l,groupSeparator:u}=n;if($t(a))return a(o);if(!kt(o)||Number.isNaN(o))return o;let[c,d=""]=String(o).split(".");return d=d.padEnd(s,"0").slice(0,s>0?s:0),c=c.replace(/\B(?=(\d{3})+(?!\d))/g,u),[c,d].join(d?l:"")});return e({displayValue:i}),(o,a)=>(R(),G("div",{class:j(p(r).b())},[o.$slots.title||o.title?(R(),G("div",{key:0,class:j(p(r).e("head"))},[xe(o.$slots,"title",{},()=>[qe(je(o.title),1)])],2)):_e("v-if",!0),J("div",{class:j(p(r).e("content"))},[o.$slots.prefix||o.prefix?(R(),G("div",{key:0,class:j(p(r).e("prefix"))},[xe(o.$slots,"prefix",{},()=>[J("span",null,je(o.prefix),1)])],2)):_e("v-if",!0),J("span",{class:j(p(r).e("number")),style:mt(o.valueStyle)},je(p(i)),7),o.$slots.suffix||o.suffix?(R(),G("div",{key:1,class:j(p(r).e("suffix"))},[xe(o.$slots,"suffix",{},()=>[J("span",null,je(o.suffix),1)])],2)):_e("v-if",!0)],2)],2))}});var _5e=Ge(b5e,[["__file","statistic.vue"]]);const WU=Vt(_5e),O5e=Ye({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:Oe([Number,Object]),default:0},valueStyle:{type:Oe([String,Object,Array])}}),w5e={finish:()=>!0,[Lr]:t=>kt(t)},S5e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],j8=t=>kt(t)?new Date(t).getTime():t.valueOf(),z8=(t,e)=>{let n=t;const r=/\[([^\]]*)]/g;return S5e.reduce((o,[a,s])=>{const l=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(l.test(o)){const u=Math.floor(n/s);return n-=u*s,o.replace(l,c=>String(u).padStart(c.length,"0"))}return o},e).replace(r,"$1")},x5e=ue({name:"ElCountdown"}),C5e=ue({...x5e,props:O5e,emits:w5e,setup(t,{expose:e,emit:n}){const r=t;let i;const o=F(0),a=M(()=>z8(o.value,r.format)),s=c=>z8(c,r.format),l=()=>{i&&(tp(i),i=void 0)},u=()=>{const c=j8(r.value),d=()=>{let f=c-Date.now();n("change",f),f<=0?(f=0,l(),n("finish")):i=gf(d),o.value=f};i=gf(d)};return Bt(()=>{o.value=j8(r.value)-Date.now(),Ve(()=>[r.value,r.format],()=>{l(),u()},{immediate:!0})}),pr(()=>{l()}),e({displayValue:a}),(c,d)=>(R(),we(p(WU),{value:o.value,title:c.title,prefix:c.prefix,suffix:c.suffix,"value-style":c.valueStyle,formatter:s},ts({_:2},[Wt(c.$slots,(f,h)=>({name:h,fn:z(()=>[xe(c.$slots,h)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var E5e=Ge(C5e,[["__file","countdown.vue"]]);const T5e=Vt(E5e),k5e=Ye({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),P5e={[Lr]:(t,e)=>[t,e].every(kt)},A5e=ue({name:"ElSteps"}),M5e=ue({...A5e,props:k5e,emits:P5e,setup(t,{emit:e}){const n=t,r=Qe("steps"),{children:i,addChild:o,removeChild:a}=N$(en(),"ElStep");return Ve(i,()=>{i.value.forEach((s,l)=>{s.setIndex(l)})}),_n("ElSteps",{props:n,steps:i,addStep:o,removeStep:a}),Ve(()=>n.active,(s,l)=>{e(Lr,s,l)}),(s,l)=>(R(),G("div",{class:j([p(r).b(),p(r).m(s.simple?"simple":s.direction)])},[xe(s.$slots,"default")],2))}});var R5e=Ge(M5e,[["__file","steps.vue"]]);const $5e=Ye({title:{type:String,default:""},icon:{type:fr},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),N5e=ue({name:"ElStep"}),D5e=ue({...N5e,props:$5e,setup(t){const e=t,n=Qe("step"),r=F(-1),i=F({}),o=F(""),a=ht("ElSteps"),s=en();Bt(()=>{Ve([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([C])=>{S(C)},{immediate:!0})}),pr(()=>{a.removeStep(x.uid)});const l=M(()=>e.status||o.value),u=M(()=>{const C=a.steps.value[r.value-1];return C?C.currentStatus:"wait"}),c=M(()=>a.props.alignCenter),d=M(()=>a.props.direction==="vertical"),f=M(()=>a.props.simple),h=M(()=>a.steps.value.length),m=M(()=>{var C;return((C=a.steps.value[h.value-1])==null?void 0:C.uid)===(s==null?void 0:s.uid)}),g=M(()=>f.value?"":a.props.space),y=M(()=>[n.b(),n.is(f.value?"simple":a.props.direction),n.is("flex",m.value&&!g.value&&!c.value),n.is("center",c.value&&!d.value&&!f.value)]),b=M(()=>{const C={flexBasis:kt(g.value)?`${g.value}px`:g.value?g.value:`${100/(h.value-(c.value?0:1))}%`};return d.value||m.value&&(C.maxWidth=`${100/h.value}%`),C}),w=C=>{r.value=C},O=C=>{const E=C==="wait",T={transitionDelay:`${E?"-":""}${150*r.value}ms`},P=C===a.props.processStatus||E?0:100;T.borderWidth=P&&!f.value?"1px":0,T[a.props.direction==="vertical"?"height":"width"]=`${P}%`,i.value=T},S=C=>{C>r.value?o.value=a.props.finishStatus:C===r.value&&u.value!=="error"?o.value=a.props.processStatus:o.value="wait";const E=a.steps.value[r.value-1];E&&E.calcProgress(o.value)},x=Sn({uid:s.uid,currentStatus:l,setIndex:w,calcProgress:O});return a.addStep(x),(C,E)=>(R(),G("div",{style:mt(p(b)),class:j(p(y))},[_e(" icon & line "),J("div",{class:j([p(n).e("head"),p(n).is(p(l))])},[p(f)?_e("v-if",!0):(R(),G("div",{key:0,class:j(p(n).e("line"))},[J("i",{class:j(p(n).e("line-inner")),style:mt(i.value)},null,6)],2)),J("div",{class:j([p(n).e("icon"),p(n).is(C.icon||C.$slots.icon?"icon":"text")])},[xe(C.$slots,"icon",{},()=>[C.icon?(R(),we(p(gt),{key:0,class:j(p(n).e("icon-inner"))},{default:z(()=>[(R(),we(un(C.icon)))]),_:1},8,["class"])):p(l)==="success"?(R(),we(p(gt),{key:1,class:j([p(n).e("icon-inner"),p(n).is("status")])},{default:z(()=>[B(p(Sb))]),_:1},8,["class"])):p(l)==="error"?(R(),we(p(gt),{key:2,class:j([p(n).e("icon-inner"),p(n).is("status")])},{default:z(()=>[B(p(_a))]),_:1},8,["class"])):p(f)?_e("v-if",!0):(R(),G("div",{key:3,class:j(p(n).e("icon-inner"))},je(r.value+1),3))])],2)],2),_e(" title & description "),J("div",{class:j(p(n).e("main"))},[J("div",{class:j([p(n).e("title"),p(n).is(p(l))])},[xe(C.$slots,"title",{},()=>[qe(je(C.title),1)])],2),p(f)?(R(),G("div",{key:0,class:j(p(n).e("arrow"))},null,2)):(R(),G("div",{key:1,class:j([p(n).e("description"),p(n).is(p(l))])},[xe(C.$slots,"description",{},()=>[qe(je(C.description),1)])],2))],2)],6))}});var UU=Ge(D5e,[["__file","item.vue"]]);const L5e=Vt(R5e,{Step:UU}),I5e=ti(UU),B5e=Ye({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:WQ},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:fr},activeActionIcon:{type:fr},activeIcon:{type:fr},inactiveIcon:{type:fr},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:Oe(Function)},id:String,tabindex:{type:[String,Number]},...wo(["ariaLabel"])}),F5e={[Zt]:t=>si(t)||At(t)||kt(t),[Lr]:t=>si(t)||At(t)||kt(t),[Oa]:t=>si(t)||At(t)||kt(t)},qU="ElSwitch",V5e=ue({name:qU}),j5e=ue({...V5e,props:B5e,emits:F5e,setup(t,{expose:e,emit:n}){const r=t,{formItem:i}=ua(),o=Ni(),a=Qe("switch"),{inputId:s}=gu(r,{formItemContext:i}),l=la(M(()=>r.loading)),u=F(r.modelValue!==!1),c=F(),d=F(),f=M(()=>[a.b(),a.m(o.value),a.is("disabled",l.value),a.is("checked",b.value)]),h=M(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),m=M(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),g=M(()=>({width:pi(r.width)}));Ve(()=>r.modelValue,()=>{u.value=!0});const y=M(()=>u.value?r.modelValue:!1),b=M(()=>y.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(y.value)||(n(Zt,r.inactiveValue),n(Lr,r.inactiveValue),n(Oa,r.inactiveValue)),Ve(b,x=>{var C;c.value.checked=x,r.validateEvent&&((C=i==null?void 0:i.validate)==null||C.call(i,"change").catch(E=>void 0))});const w=()=>{const x=b.value?r.inactiveValue:r.activeValue;n(Zt,x),n(Lr,x),n(Oa,x),Ot(()=>{c.value.checked=b.value})},O=()=>{if(l.value)return;const{beforeChange:x}=r;if(!x){w();return}const C=x();[Jy(C),si(C)].includes(!0)||Hi(qU,"beforeChange must return type `Promise<boolean>` or `boolean`"),Jy(C)?C.then(T=>{T&&w()}).catch(T=>{}):C&&w()},S=()=>{var x,C;(C=(x=c.value)==null?void 0:x.focus)==null||C.call(x)};return Bt(()=>{c.value.checked=b.value}),e({focus:S,checked:b}),(x,C)=>(R(),G("div",{class:j(p(f)),onClick:Pt(O,["prevent"])},[J("input",{id:p(s),ref_key:"input",ref:c,class:j(p(a).e("input")),type:"checkbox",role:"switch","aria-checked":p(b),"aria-disabled":p(l),"aria-label":x.ariaLabel,name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:p(l),tabindex:x.tabindex,onChange:w,onKeydown:br(O,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!x.inlinePrompt&&(x.inactiveIcon||x.inactiveText)?(R(),G("span",{key:0,class:j(p(h))},[x.inactiveIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.inactiveIcon)))]),_:1})):_e("v-if",!0),!x.inactiveIcon&&x.inactiveText?(R(),G("span",{key:1,"aria-hidden":p(b)},je(x.inactiveText),9,["aria-hidden"])):_e("v-if",!0)],2)):_e("v-if",!0),J("span",{ref_key:"core",ref:d,class:j(p(a).e("core")),style:mt(p(g))},[x.inlinePrompt?(R(),G("div",{key:0,class:j(p(a).e("inner"))},[x.activeIcon||x.inactiveIcon?(R(),we(p(gt),{key:0,class:j(p(a).is("icon"))},{default:z(()=>[(R(),we(un(p(b)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(R(),G("span",{key:1,class:j(p(a).is("text")),"aria-hidden":!p(b)},je(p(b)?x.activeText:x.inactiveText),11,["aria-hidden"])):_e("v-if",!0)],2)):_e("v-if",!0),J("div",{class:j(p(a).e("action"))},[x.loading?(R(),we(p(gt),{key:0,class:j(p(a).is("loading"))},{default:z(()=>[B(p(Ku))]),_:1},8,["class"])):p(b)?xe(x.$slots,"active-action",{key:1},()=>[x.activeActionIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.activeActionIcon)))]),_:1})):_e("v-if",!0)]):p(b)?_e("v-if",!0):xe(x.$slots,"inactive-action",{key:2},()=>[x.inactiveActionIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.inactiveActionIcon)))]),_:1})):_e("v-if",!0)])],2)],6),!x.inlinePrompt&&(x.activeIcon||x.activeText)?(R(),G("span",{key:1,class:j(p(m))},[x.activeIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.activeIcon)))]),_:1})):_e("v-if",!0),!x.activeIcon&&x.activeText?(R(),G("span",{key:1,"aria-hidden":!p(b)},je(x.activeText),9,["aria-hidden"])):_e("v-if",!0)],2)):_e("v-if",!0)],10,["onClick"]))}});var z5e=Ge(j5e,[["__file","switch.vue"]]);const Xm=Vt(z5e),$T=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Q5e=function(t,e,n,r,i){if(!e&&!r&&(!i||Array.isArray(i)&&!i.length))return t;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=r?null:function(s,l){return i?(Array.isArray(i)||(i=[i]),i.map(u=>typeof u=="string"?Wr(s,u):u(s,l,t))):(e!=="$key"&&sn(s)&&"$value"in s&&(s=s.$value),[sn(s)?Wr(s,e):s])},a=function(s,l){if(r)return r(s.value,l.value);for(let u=0,c=s.key.length;u<c;u++){if(s.key[u]<l.key[u])return-1;if(s.key[u]>l.key[u])return 1}return 0};return t.map((s,l)=>({value:s,index:l,key:o?o(s,l):null})).sort((s,l)=>{let u=a(s,l);return u||(u=s.index-l.index),u*+n}).map(s=>s.value)},YU=function(t,e){let n=null;return t.columns.forEach(r=>{r.id===e&&(n=r)}),n},H5e=function(t,e){let n=null;for(let r=0;r<t.columns.length;r++){const i=t.columns[r];if(i.columnKey===e){n=i;break}}return n||Hi("ElTable",`No column matching with column-key: ${e}`),n},Q8=function(t,e,n){const r=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return r?YU(t,r[0]):null},ta=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(typeof e=="string"){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let r=t;for(const i of n)r=r[i];return`${r}`}else if(typeof e=="function")return e.call(null,t)},$h=function(t,e){const n={};return(t||[]).forEach((r,i)=>{n[ta(r,e)]={row:r,index:i}}),n};function W5e(t,e){const n={};let r;for(r in t)n[r]=t[r];for(r in e)if(Dn(e,r)){const i=e[r];typeof i!="undefined"&&(n[r]=i)}return n}function uN(t){return t===""||t!==void 0&&(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function XU(t){return t===""||t!==void 0&&(t=uN(t),Number.isNaN(t)&&(t=80)),t}function U5e(t){return typeof t=="number"?t:typeof t=="string"?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function q5e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function Aw(t,e,n,r,i,o){let a=o!=null?o:0,s=!1;const l=t.indexOf(e),u=l!==-1,c=i==null?void 0:i.call(null,e,o),d=h=>{h==="add"?t.push(e):t.splice(l,1),s=!0},f=h=>{let m=0;const g=(r==null?void 0:r.children)&&h[r.children];return g&&ut(g)&&(m+=g.length,g.forEach(y=>{m+=f(y)})),m};return(!i||c)&&(si(n)?n&&!u?d("add"):!n&&u&&d("remove"):d(u?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r==null?void 0:r.children)&&ut(e[r.children])&&e[r.children].forEach(h=>{Aw(t,h,n!=null?n:!u,r,i,a+1),a+=f(h)+1}),s}function Y5e(t,e,n="children",r="hasChildren"){const i=a=>!(Array.isArray(a)&&a.length);function o(a,s,l){e(a,s,l),s.forEach(u=>{if(u[r]){e(u,null,l+1);return}const c=u[n];i(c)||o(u,c,l+1)})}t.forEach(a=>{if(a[r]){e(a,null,0);return}const s=a[n];i(s)||o(a,s,0)})}let Gs=null;function X5e(t,e,n,r){if((Gs==null?void 0:Gs.trigger)===n)return;Gs==null||Gs();const i=r==null?void 0:r.refs.tableWrapper,o=i==null?void 0:i.dataset.prefix,a={strategy:"fixed",...t.popperOptions},s=B(Ui,{content:e,virtualTriggering:!0,virtualRef:n,appendTo:i,placement:"top",transition:"none",offset:0,hideAfter:0,...t,popperOptions:a,onHide:()=>{Gs==null||Gs()}});s.appContext={...r.appContext,...r};const l=document.createElement("div");uf(s,l),s.component.exposed.onOpen();const u=i==null?void 0:i.querySelector(`.${o}-scrollbar__wrap`);Gs=()=>{uf(null,l),u==null||u.removeEventListener("scroll",Gs),Gs=null},Gs.trigger=n,u==null||u.addEventListener("scroll",Gs)}function ZU(t){return t.children?W9(t.children,ZU):[t]}function H8(t,e){return t+e.colSpan}const GU=(t,e,n,r)=>{let i=0,o=t;const a=n.states.columns.value;if(r){const l=ZU(r[t]);i=a.slice(0,a.indexOf(l[0])).reduce(H8,0),o=i+l.reduce(H8,0)-1}else i=t;let s;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(s="left");break;case"right":i>=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:o<n.states.fixedLeafColumnsLength.value?s="left":i>=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:i,after:o}:{}},cN=(t,e,n,r,i,o=0)=>{const a=[],{direction:s,start:l,after:u}=GU(e,n,r,i);if(s){const c=s==="left";a.push(`${t}-fixed-column--${s}`),c&&u+o===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!c&&l-o===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function W8(t,e){return t+(e.realWidth===null||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const dN=(t,e,n,r)=>{const{direction:i,start:o=0,after:a=0}=GU(t,e,n,r);if(!i)return;const s={},l=i==="left",u=n.states.columns.value;return l?s.left=u.slice(0,o).reduce(W8,0):s.right=u.slice(a+1).reverse().reduce(W8,0),s},am=(t,e)=>{!t||Number.isNaN(t[e])||(t[e]=`${t[e]}px`)};function Z5e(t){const e=en(),n=F(!1),r=F([]);return{updateExpandRows:()=>{const l=t.data.value||[],u=t.rowKey.value;if(n.value)r.value=l.slice();else if(u){const c=$h(r.value,u);r.value=l.reduce((d,f)=>{const h=ta(f,u);return c[h]&&d.push(f),d},[])}else r.value=[]},toggleRowExpansion:(l,u)=>{Aw(r.value,l,u)&&e.emit("expand-change",l,r.value.slice())},setExpandRowKeys:l=>{e.store.assertRowKey();const u=t.data.value||[],c=t.rowKey.value,d=$h(u,c);r.value=l.reduce((f,h)=>{const m=d[h];return m&&f.push(m.row),f},[])},isRowExpanded:l=>{const u=t.rowKey.value;return u?!!$h(r.value,u)[ta(l,u)]:r.value.includes(l)},states:{expandRows:r,defaultExpandAll:n}}}function G5e(t){const e=en(),n=F(null),r=F(null),i=u=>{e.store.assertRowKey(),n.value=u,a(u)},o=()=>{n.value=null},a=u=>{const{data:c,rowKey:d}=t;let f=null;d.value&&(f=(p(c)||[]).find(h=>ta(h,d.value)===u)),r.value=f,e.emit("current-change",r.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:o,setCurrentRowByKey:a,updateCurrentRow:u=>{const c=r.value;if(u&&u!==c){r.value=u,e.emit("current-change",r.value,c);return}!u&&c&&(r.value=null,e.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=t.rowKey.value,c=t.data.value||[],d=r.value;if(!c.includes(d)&&d){if(u){const f=ta(d,u);a(f)}else r.value=null;r.value===null&&e.emit("current-change",null,d)}else n.value&&(a(n.value),o())},states:{_currentRowKey:n,currentRow:r}}}function K5e(t){const e=F([]),n=F({}),r=F(16),i=F(!1),o=F({}),a=F("hasChildren"),s=F("children"),l=F(!1),u=en(),c=M(()=>{if(!t.rowKey.value)return{};const O=t.data.value||[];return f(O)}),d=M(()=>{const O=t.rowKey.value,S=Object.keys(o.value),x={};return S.length&&S.forEach(C=>{if(o.value[C].length){const E={children:[]};o.value[C].forEach(T=>{const P=ta(T,O);E.children.push(P),T[a.value]&&!x[P]&&(x[P]={children:[]})}),x[C]=E}}),x}),f=O=>{const S=t.rowKey.value,x={};return Y5e(O,(C,E,T)=>{const P=ta(C,S);Array.isArray(E)?x[P]={children:E.map(A=>ta(A,S)),level:T}:i.value&&(x[P]={children:[],lazy:!0,level:T})},s.value,a.value),x},h=(O=!1,S=(x=>(x=u.store)==null?void 0:x.states.defaultExpandAll.value)())=>{var x;const C=c.value,E=d.value,T=Object.keys(C),P={};if(T.length){const A=p(n),D=[],N=(W,L)=>{if(O)return e.value?S||e.value.includes(L):!!(S||(W==null?void 0:W.expanded));{const I=S||e.value&&e.value.includes(L);return!!((W==null?void 0:W.expanded)||I)}};T.forEach(W=>{const L=A[W],I={...C[W]};if(I.expanded=N(L,W),I.lazy){const{loaded:U=!1,loading:Q=!1}=L||{};I.loaded=!!U,I.loading=!!Q,D.push(W)}P[W]=I});const $=Object.keys(E);i.value&&$.length&&D.length&&$.forEach(W=>{const L=A[W],I=E[W].children;if(D.includes(W)){if(P[W].children.length!==0)throw new Error("[ElTable]children must be an empty array.");P[W].children=I}else{const{loaded:U=!1,loading:Q=!1}=L||{};P[W]={lazy:!0,loaded:!!U,loading:!!Q,expanded:N(L,W),children:I,level:""}}})}n.value=P,(x=u.store)==null||x.updateTableScrollY()};Ve(()=>e.value,()=>{h(!0)}),Ve(()=>c.value,()=>{h()}),Ve(()=>d.value,()=>{h()});const m=O=>{e.value=O,h()},g=(O,S)=>{u.store.assertRowKey();const x=t.rowKey.value,C=ta(O,x),E=C&&n.value[C];if(C&&E&&"expanded"in E){const T=E.expanded;S=typeof S=="undefined"?!E.expanded:S,n.value[C].expanded=S,T!==S&&u.emit("expand-change",O,S),u.store.updateTableScrollY()}},y=O=>{u.store.assertRowKey();const S=t.rowKey.value,x=ta(O,S),C=n.value[x];i.value&&C&&"loaded"in C&&!C.loaded?b(O,x,C):g(O,void 0)},b=(O,S,x)=>{const{load:C}=u.props;C&&!n.value[S].loaded&&(n.value[S].loading=!0,C(O,x,E=>{if(!Array.isArray(E))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,E.length&&(o.value[S]=E),u.emit("expand-change",O,!0)}))};return{loadData:b,loadOrToggle:y,toggleTreeExpansion:g,updateTreeExpandKeys:m,updateTreeData:h,updateKeyChildren:(O,S)=>{const{lazy:x,rowKey:C}=u.props;if(!!x){if(!C)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[O]&&(o.value[O]=S)}},normalize:f,states:{expandRowKeys:e,treeData:n,indent:r,lazy:i,lazyTreeNodeMap:o,lazyColumnIdentifier:a,childrenColumnName:s,checkStrictly:l}}}const J5e=(t,e)=>{const n=e.sortingColumn;return!n||typeof n.sortable=="string"?t:Q5e(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},T1=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,T1(n.children)):e.push(n)}),e};function e8e(){var t;const e=en(),{size:n}=Ri((t=e.proxy)==null?void 0:t.$props),r=F(null),i=F([]),o=F([]),a=F(!1),s=F([]),l=F([]),u=F([]),c=F([]),d=F([]),f=F([]),h=F([]),m=F([]),g=[],y=F(0),b=F(0),w=F(0),O=F(!1),S=F([]),x=F(!1),C=F(!1),E=F(null),T=F({}),P=F(null),A=F(null),D=F(null),N=F(null),$=F(null);Ve(i,()=>e.state&&Q(!1),{deep:!0});const W=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},L=Me=>{var nt;(nt=Me.children)==null||nt.forEach(de=>{de.fixed=Me.fixed,L(de)})};let I;const U=()=>{s.value.forEach(Le=>{L(Le)}),c.value=s.value.filter(Le=>Le.fixed===!0||Le.fixed==="left"),d.value=s.value.filter(Le=>Le.fixed==="right"),ai(I)&&s.value[0]&&s.value[0].type==="selection"&&(I=Boolean(s.value[0].fixed)),c.value.length>0&&s.value[0]&&s.value[0].type==="selection"&&(s.value[0].fixed?c.value.some(wt=>wt.type!=="selection")?I=void 0:(s.value[0].fixed=I,I||c.value.shift()):(s.value[0].fixed=!0,c.value.unshift(s.value[0])));const Me=s.value.filter(Le=>!Le.fixed);l.value=[].concat(c.value).concat(Me).concat(d.value);const nt=T1(Me),de=T1(c.value),Pe=T1(d.value);y.value=nt.length,b.value=de.length,w.value=Pe.length,u.value=[].concat(de).concat(nt).concat(Pe),a.value=c.value.length>0||d.value.length>0},Q=(Me,nt=!1)=>{Me&&U(),nt?e.state.doLayout():e.state.debouncedUpdateLayout()},V=Me=>S.value.some(nt=>so(nt,Me)),q=()=>{O.value=!1;const Me=S.value;S.value=[],Me.length&&e.emit("selection-change",[])},K=()=>{let Me;if(r.value){Me=[];const nt=$h(S.value,r.value),de=$h(i.value,r.value);for(const Pe in nt)Dn(nt,Pe)&&!de[Pe]&&Me.push(nt[Pe].row)}else Me=S.value.filter(nt=>!i.value.includes(nt));if(Me.length){const nt=S.value.filter(de=>!Me.includes(de));S.value=nt,e.emit("selection-change",nt.slice())}},ie=()=>(S.value||[]).slice(),oe=(Me,nt,de=!0,Pe=!1)=>{var Le,wt,tn,De;const xt={children:(wt=(Le=e==null?void 0:e.store)==null?void 0:Le.states)==null?void 0:wt.childrenColumnName.value,checkStrictly:(De=(tn=e==null?void 0:e.store)==null?void 0:tn.states)==null?void 0:De.checkStrictly.value};if(Aw(S.value,Me,nt,xt,Pe?void 0:E.value)){const ln=(S.value||[]).slice();de&&e.emit("select",ln,Me),e.emit("selection-change",ln)}},Se=()=>{var Me,nt;const de=C.value?!O.value:!(O.value||S.value.length);O.value=de;let Pe=!1,Le=0;const wt=(nt=(Me=e==null?void 0:e.store)==null?void 0:Me.states)==null?void 0:nt.rowKey.value,{childrenColumnName:tn}=e.store.states,De={children:tn.value,checkStrictly:!1};i.value.forEach((xt,qt)=>{const ln=qt+Le;Aw(S.value,xt,de,De,E.value,ln)&&(Pe=!0),Le+=re(ta(xt,wt))}),Pe&&e.emit("selection-change",S.value?S.value.slice():[]),e.emit("select-all",(S.value||[]).slice())},ke=()=>{const Me=$h(S.value,r.value);i.value.forEach(nt=>{const de=ta(nt,r.value),Pe=Me[de];Pe&&(S.value[Pe.index]=nt)})},Y=()=>{var Me;if(((Me=i.value)==null?void 0:Me.length)===0){O.value=!1;return}const{childrenColumnName:nt}=e.store.states,de=r.value?$h(S.value,r.value):void 0;let Pe=0,Le=0;const wt=xt=>de?!!de[ta(xt,r.value)]:S.value.includes(xt),tn=xt=>{var qt;for(const ln of xt){const nn=E.value&&E.value.call(null,ln,Pe);if(wt(ln))Le++;else if(!E.value||nn)return!1;if(Pe++,((qt=ln[nt.value])==null?void 0:qt.length)&&!tn(ln[nt.value]))return!1}return!0},De=tn(i.value||[]);O.value=Le===0?!1:De},re=Me=>{var nt;if(!e||!e.store)return 0;const{treeData:de}=e.store.states;let Pe=0;const Le=(nt=de.value[Me])==null?void 0:nt.children;return Le&&(Pe+=Le.length,Le.forEach(wt=>{Pe+=re(wt)})),Pe},te=(Me,nt)=>{Array.isArray(Me)||(Me=[Me]);const de={};return Me.forEach(Pe=>{T.value[Pe.id]=nt,de[Pe.columnKey||Pe.id]=nt}),de},ge=(Me,nt,de)=>{A.value&&A.value!==Me&&(A.value.order=null),A.value=Me,D.value=nt,N.value=de},Re=()=>{let Me=p(o);Object.keys(T.value).forEach(nt=>{const de=T.value[nt];if(!de||de.length===0)return;const Pe=YU({columns:u.value},nt);Pe&&Pe.filterMethod&&(Me=Me.filter(Le=>de.some(wt=>Pe.filterMethod.call(null,wt,Le,Pe))))}),P.value=Me},$e=()=>{i.value=J5e(P.value,{sortingColumn:A.value,sortProp:D.value,sortOrder:N.value})},Z=(Me=void 0)=>{Me&&Me.filter||Re(),$e()},ce=Me=>{const{tableHeaderRef:nt}=e.refs;if(!nt)return;const de=Object.assign({},nt.filterPanels),Pe=Object.keys(de);if(!!Pe.length)if(typeof Me=="string"&&(Me=[Me]),Array.isArray(Me)){const Le=Me.map(wt=>H5e({columns:u.value},wt));Pe.forEach(wt=>{const tn=Le.find(De=>De.id===wt);tn&&(tn.filteredValue=[])}),e.store.commit("filterChange",{column:Le,values:[],silent:!0,multi:!0})}else Pe.forEach(Le=>{const wt=u.value.find(tn=>tn.id===Le);wt&&(wt.filteredValue=[])}),T.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Te=()=>{!A.value||(ge(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Ie,toggleRowExpansion:ae,updateExpandRows:me,states:Ae,isRowExpanded:X}=Z5e({data:i,rowKey:r}),{updateTreeExpandKeys:ee,toggleTreeExpansion:le,updateTreeData:Ce,updateKeyChildren:fe,loadOrToggle:Ee,states:be}=K5e({data:i,rowKey:r}),{updateCurrentRowData:Be,updateCurrentRow:Xe,setCurrentRowKey:Ke,states:tt}=G5e({data:i,rowKey:r});return{assertRowKey:W,updateColumns:U,scheduleLayout:Q,isSelected:V,clearSelection:q,cleanSelection:K,getSelectionRows:ie,toggleRowSelection:oe,_toggleAllSelection:Se,toggleAllSelection:null,updateSelectionByRowKey:ke,updateAllSelected:Y,updateFilters:te,updateCurrentRow:Xe,updateSort:ge,execFilter:Re,execSort:$e,execQuery:Z,clearFilter:ce,clearSort:Te,toggleRowExpansion:ae,setExpandRowKeysAdapter:Me=>{Ie(Me),ee(Me)},setCurrentRowKey:Ke,toggleRowExpansionAdapter:(Me,nt)=>{u.value.some(({type:Pe})=>Pe==="expand")?ae(Me,nt):le(Me,nt)},isRowExpanded:X,updateExpandRows:me,updateCurrentRowData:Be,loadOrToggle:Ee,updateTreeData:Ce,updateKeyChildren:fe,states:{tableSize:n,rowKey:r,data:i,_data:o,isComplex:a,_columns:s,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:h,rightFixedLeafColumns:m,updateOrderFns:g,leafColumnsLength:y,fixedLeafColumnsLength:b,rightFixedLeafColumnsLength:w,isAllSelected:O,selection:S,reserveSelection:x,selectOnIndeterminate:C,selectable:E,filters:T,filteredData:P,sortingColumn:A,sortProp:D,sortOrder:N,hoverRow:$,...Ae,...be,...tt}}}function aP(t,e){return t.map(n=>{var r;return n.id===e.id?e:((r=n.children)!=null&&r.length&&(n.children=aP(n.children,e)),n)})}function sP(t){t.forEach(e=>{var n,r;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(r=e.children)!=null&&r.length&&sP(e.children)}),t.sort((e,n)=>e.no-n.no)}function t8e(){const t=en(),e=e8e();return{ns:Qe("table"),...e,mutations:{setData(a,s){const l=p(a._data)!==s;a.data.value=s,a._data.value=s,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),p(a.reserveSelection)?(t.store.assertRowKey(),t.store.updateSelectionByRowKey()):l?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,s,l,u){const c=p(a._columns);let d=[];l?(l&&!l.children&&(l.children=[]),l.children.push(s),d=aP(c,l)):(c.push(s),d=c),sP(d),a._columns.value=d,a.updateOrderFns.push(u),s.type==="selection"&&(a.selectable.value=s.selectable,a.reserveSelection.value=s.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,s){var l;((l=s.getColumnIndex)==null?void 0:l.call(s))!==s.no&&(sP(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,s,l,u){const c=p(a._columns)||[];if(l)l.children.splice(l.children.findIndex(f=>f.id===s.id),1),Ot(()=>{var f;((f=l.children)==null?void 0:f.length)===0&&delete l.children}),a._columns.value=aP(c,l);else{const f=c.indexOf(s);f>-1&&(c.splice(f,1),a._columns.value=c)}const d=a.updateOrderFns.indexOf(u);d>-1&&a.updateOrderFns.splice(d,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,s){const{prop:l,order:u,init:c}=s;if(l){const d=p(a.columns).find(f=>f.property===l);d&&(d.order=u,t.store.updateSort(d,l,u),t.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(a,s){const{sortingColumn:l,sortProp:u,sortOrder:c}=a,d=p(l),f=p(u),h=p(c);h===null&&(a.sortingColumn.value=null,a.sortProp.value=null);const m={filter:!0};t.store.execQuery(m),(!s||!(s.silent||s.init))&&t.emit("sort-change",{column:d,prop:f,order:h}),t.store.updateTableScrollY()},filterChange(a,s){const{column:l,values:u,silent:c}=s,d=t.store.updateFilters(l,u);t.store.execQuery(),c||t.emit("filter-change",d),t.store.updateTableScrollY()},toggleAllSelection(){t.store.toggleAllSelection()},rowSelectedChanged(a,s){t.store.toggleRowSelection(s),t.store.updateAllSelected()},setHoverRow(a,s){a.hoverRow.value=s},setCurrentRow(a,s){t.store.updateCurrentRow(s)}},commit:function(a,...s){const l=t.store.mutations;if(l[a])l[a].apply(t,[t.store.states].concat(s));else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){Ot(()=>t.layout.updateScrollY.apply(t.layout))}}}const Ty={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"},["treeProps.checkStrictly"]:{key:"checkStrictly",default:!1}};function n8e(t,e){if(!t)throw new Error("Table is required.");const n=t8e();return n.toggleAllSelection=jo(n._toggleAllSelection,10),Object.keys(Ty).forEach(r=>{KU(JU(e,r),r,n)}),r8e(n,e),n}function r8e(t,e){Object.keys(Ty).forEach(n=>{Ve(()=>JU(e,n),r=>{KU(r,n,t)})})}function KU(t,e,n){let r=t,i=Ty[e];typeof Ty[e]=="object"&&(i=i.key,r=r||Ty[e].default),n.states[i].value=r}function JU(t,e){if(e.includes(".")){const n=e.split(".");let r=t;return n.forEach(i=>{r=r[i]}),r}else return t[e]}class i8e{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=F(null),this.scrollX=F(!1),this.scrollY=F(!1),this.bodyWidth=F(null),this.fixedWidth=F(null),this.rightFixedWidth=F(null),this.gutterWidth=0;for(const n in e)Dn(e,n)&&(kr(this[n])?this[n].value=e[n]:this[n]=e[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n==null?void 0:n.wrapRef)){let r=!0;const i=this.scrollY.value;return r=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=r,i!==r}return!1}setHeight(e,n="height"){if(!Tn)return;const r=this.table.vnode.el;if(e=U5e(e),this.height.value=Number(e),!r&&(e||e===0))return Ot(()=>this.setHeight(e,n));typeof e=="number"?(r.style[n]=`${e}px`,this.updateElsHeight()):typeof e=="string"&&(r.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?e.push.apply(e,r.columns):e.push(r)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let n=e;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!Tn)return;const e=this.fit,n=this.table.vnode.el.clientWidth;let r=0;const i=this.getFlattenColumns(),o=i.filter(l=>typeof l.width!="number");if(i.forEach(l=>{typeof l.width=="number"&&l.realWidth&&(l.realWidth=null)}),o.length>0&&e){if(i.forEach(l=>{r+=Number(l.width||l.minWidth||80)}),r<=n){this.scrollX.value=!1;const l=n-r;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+l;else{const u=o.reduce((f,h)=>f+Number(h.minWidth||80),0),c=l/u;let d=0;o.forEach((f,h)=>{if(h===0)return;const m=Math.floor(Number(f.minWidth||80)*c);d+=m,f.realWidth=Number(f.minWidth||80)+m}),o[0].realWidth=Number(o[0].minWidth||80)+l-d}}else this.scrollX.value=!0,o.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(r,n),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),r+=l.realWidth}),this.scrollX.value=r>n,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let l=0;a.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.fixedWidth.value=l}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let l=0;s.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}notifyObservers(e){this.observers.forEach(r=>{var i,o;switch(e){case"columns":(i=r.state)==null||i.onColumnsChange(this);break;case"scrollable":(o=r.state)==null||o.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}const{CheckboxGroup:o8e}=Is,a8e=ue({name:"ElTableFilterPanel",components:{ElCheckbox:Is,ElCheckboxGroup:o8e,ElScrollbar:mu,ElTooltip:Ui,ElIcon:gt,ArrowDown:ld,ArrowUp:o$},directives:{ClickOutside:qc},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:{type:String}},setup(t){const e=en(),{t:n}=kn(),r=Qe("table-filter"),i=e==null?void 0:e.parent;i.filterPanels.value[t.column.id]||(i.filterPanels.value[t.column.id]=e);const o=F(!1),a=F(null),s=M(()=>t.column&&t.column.filters),l=M(()=>t.column.filterClassName?`${r.b()} ${t.column.filterClassName}`:r.b()),u=M({get:()=>{var x;return(((x=t.column)==null?void 0:x.filteredValue)||[])[0]},set:x=>{c.value&&(typeof x!="undefined"&&x!==null?c.value.splice(0,1,x):c.value.splice(0,1))}}),c=M({get(){return t.column?t.column.filteredValue||[]:[]},set(x){t.column&&t.upDataColumn("filteredValue",x)}}),d=M(()=>t.column?t.column.filterMultiple:!0),f=x=>x.value===u.value,h=()=>{o.value=!1},m=x=>{x.stopPropagation(),o.value=!o.value},g=()=>{o.value=!1},y=()=>{O(c.value),h()},b=()=>{c.value=[],O(c.value),h()},w=x=>{u.value=x,O(typeof x!="undefined"&&x!==null?c.value:[]),h()},O=x=>{t.store.commit("filterChange",{column:t.column,values:x}),t.store.updateAllSelected()};Ve(o,x=>{t.column&&t.upDataColumn("filterOpened",x)},{immediate:!0});const S=M(()=>{var x,C;return(C=(x=a.value)==null?void 0:x.popperRef)==null?void 0:C.contentRef});return{tooltipVisible:o,multiple:d,filterClassName:l,filteredValue:c,filterValue:u,filters:s,handleConfirm:y,handleReset:b,handleSelect:w,isActive:f,t:n,ns:r,showFilterPanel:m,hideFilterPanel:g,popperPaneRef:S,tooltip:a}}});function s8e(t,e,n,r,i,o){const a=an("el-checkbox"),s=an("el-checkbox-group"),l=an("el-scrollbar"),u=an("arrow-up"),c=an("arrow-down"),d=an("el-icon"),f=an("el-tooltip"),h=dx("click-outside");return R(),we(f,{ref:"tooltip",visible:t.tooltipVisible,offset:0,placement:t.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo},{content:z(()=>[t.multiple?(R(),G("div",{key:0},[J("div",{class:j(t.ns.e("content"))},[B(l,{"wrap-class":t.ns.e("wrap")},{default:z(()=>[B(s,{modelValue:t.filteredValue,"onUpdate:modelValue":m=>t.filteredValue=m,class:j(t.ns.e("checkbox-group"))},{default:z(()=>[(R(!0),G(ct,null,Wt(t.filters,m=>(R(),we(a,{key:m.value,value:m.value},{default:z(()=>[qe(je(m.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),J("div",{class:j(t.ns.e("bottom"))},[J("button",{class:j({[t.ns.is("disabled")]:t.filteredValue.length===0}),disabled:t.filteredValue.length===0,type:"button",onClick:t.handleConfirm},je(t.t("el.table.confirmFilter")),11,["disabled","onClick"]),J("button",{type:"button",onClick:t.handleReset},je(t.t("el.table.resetFilter")),9,["onClick"])],2)])):(R(),G("ul",{key:1,class:j(t.ns.e("list"))},[J("li",{class:j([t.ns.e("list-item"),{[t.ns.is("active")]:t.filterValue===void 0||t.filterValue===null}]),onClick:m=>t.handleSelect(null)},je(t.t("el.table.clearFilter")),11,["onClick"]),(R(!0),G(ct,null,Wt(t.filters,m=>(R(),G("li",{key:m.value,class:j([t.ns.e("list-item"),t.ns.is("active",t.isActive(m))]),label:m.value,onClick:g=>t.handleSelect(m.value)},je(m.text),11,["label","onClick"]))),128))],2))]),default:z(()=>[Ht((R(),G("span",{class:j([`${t.ns.namespace.value}-table__column-filter-trigger`,`${t.ns.namespace.value}-none-outline`]),onClick:t.showFilterPanel},[B(d,null,{default:z(()=>[xe(t.$slots,"filter-icon",{},()=>[t.column.filterOpened?(R(),we(u,{key:0})):(R(),we(c,{key:1}))])]),_:3})],10,["onClick"])),[[h,t.hideFilterPanel,t.popperPaneRef]])]),_:3},8,["visible","placement","popper-class","append-to"])}var l8e=Ge(a8e,[["render",s8e],["__file","filter-panel.vue"]]);function eq(t){const e=en();cx(()=>{n.value.addObserver(e)}),Bt(()=>{r(n.value),i(n.value)}),Jc(()=>{r(n.value),i(n.value)}),ed(()=>{n.value.removeObserver(e)});const n=M(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),r=o=>{var a;const s=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const l=o.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,d=s.length;c<d;c++){const f=s[c],h=f.getAttribute("name"),m=u[h];m&&f.setAttribute("width",m.realWidth||m.width)}},i=o=>{var a,s;const l=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=l.length;c<d;c++)l[c].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const u=((s=t.vnode.el)==null?void 0:s.querySelectorAll("th.gutter"))||[];for(let c=0,d=u.length;c<d;c++){const f=u[c];f.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",f.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:r,onScrollableChange:i}}const fc=Symbol("ElTable");function u8e(t,e){const n=en(),r=ht(fc),i=g=>{g.stopPropagation()},o=(g,y)=>{!y.filters&&y.sortable?m(g,y,!1):y.filterable&&!y.sortable&&i(g),r==null||r.emit("header-click",y,g)},a=(g,y)=>{r==null||r.emit("header-contextmenu",y,g)},s=F(null),l=F(!1),u=F({}),c=(g,y)=>{if(!!Tn&&!(y.children&&y.children.length>0)&&s.value&&t.border){l.value=!0;const b=r;e("set-drag-visible",!0);const O=(b==null?void 0:b.vnode.el).getBoundingClientRect().left,S=n.vnode.el.querySelector(`th.${y.id}`),x=S.getBoundingClientRect(),C=x.left-O+30;rl(S,"noclick"),u.value={startMouseLeft:g.clientX,startLeft:x.right-O,startColumnLeft:x.left-O,tableLeft:O};const E=b==null?void 0:b.refs.resizeProxy;E.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const T=A=>{const D=A.clientX-u.value.startMouseLeft,N=u.value.startLeft+D;E.style.left=`${Math.max(C,N)}px`},P=()=>{if(l.value){const{startColumnLeft:A,startLeft:D}=u.value,$=Number.parseInt(E.style.left,10)-A;y.width=y.realWidth=$,b==null||b.emit("header-dragend",y.width,D-A,y,g),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,s.value=null,u.value={},e("set-drag-visible",!1)}document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{aa(S,"noclick")},0)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}},d=(g,y)=>{var b;if(y.children&&y.children.length>0)return;const w=g.target;if(!As(w))return;const O=w==null?void 0:w.closest("th");if(!(!y||!y.resizable||!O)&&!l.value&&t.border){const S=O.getBoundingClientRect(),x=document.body.style,C=((b=O.parentNode)==null?void 0:b.lastElementChild)===O;S.width>12&&S.right-g.pageX<8&&!C?(x.cursor="col-resize",Ua(O,"is-sortable")&&(O.style.cursor="col-resize"),s.value=y):l.value||(x.cursor="",Ua(O,"is-sortable")&&(O.style.cursor="pointer"),s.value=null)}},f=()=>{!Tn||(document.body.style.cursor="")},h=({order:g,sortOrders:y})=>{if(g==="")return y[0];const b=y.indexOf(g||null);return y[b>y.length-2?0:b+1]},m=(g,y,b)=>{var w;g.stopPropagation();const O=y.order===b?null:b||h(y),S=(w=g.target)==null?void 0:w.closest("th");if(S&&Ua(S,"noclick")){aa(S,"noclick");return}if(!y.sortable)return;const x=g.currentTarget;if(["ascending","descending"].some(A=>Ua(x,A)&&!y.sortOrders.includes(A)))return;const C=t.store.states;let E=C.sortProp.value,T;const P=C.sortingColumn.value;(P!==y||P===y&&P.order===null)&&(P&&(P.order=null),C.sortingColumn.value=y,E=y.property),O?T=y.order=O:T=y.order=null,C.sortProp.value=E,C.sortOrder.value=T,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:a,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:m,handleFilterClick:i}}function c8e(t){const e=ht(fc),n=Qe("table");return{getHeaderRowStyle:s=>{const l=e==null?void 0:e.props.headerRowStyle;return typeof l=="function"?l.call(null,{rowIndex:s}):l},getHeaderRowClass:s=>{const l=[],u=e==null?void 0:e.props.headerRowClassName;return typeof u=="string"?l.push(u):typeof u=="function"&&l.push(u.call(null,{rowIndex:s})),l.join(" ")},getHeaderCellStyle:(s,l,u,c)=>{var d;let f=(d=e==null?void 0:e.props.headerCellStyle)!=null?d:{};typeof f=="function"&&(f=f.call(null,{rowIndex:s,columnIndex:l,row:u,column:c}));const h=dN(l,c.fixed,t.store,u);return am(h,"left"),am(h,"right"),Object.assign({},f,h)},getHeaderCellClass:(s,l,u,c)=>{const d=cN(n.b(),l,c.fixed,t.store,u),f=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...d];c.children||f.push("is-leaf"),c.sortable&&f.push("is-sortable");const h=e==null?void 0:e.props.headerCellClassName;return typeof h=="string"?f.push(h):typeof h=="function"&&f.push(h.call(null,{rowIndex:s,columnIndex:l,row:u,column:c})),f.push(n.e("cell")),f.filter(m=>Boolean(m)).join(" ")}}}const tq=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,tq(n.children))):e.push(n)}),e},nq=t=>{let e=1;const n=(o,a)=>{if(a&&(o.level=a.level+1,e<o.level&&(e=o.level)),o.children){let s=0;o.children.forEach(l=>{n(l,o),s+=l.colSpan}),o.colSpan=s}else o.colSpan=1};t.forEach(o=>{o.level=1,n(o,void 0)});const r=[];for(let o=0;o<e;o++)r.push([]);return tq(t).forEach(o=>{o.children?(o.rowSpan=1,o.children.forEach(a=>a.isSubColumn=!0)):o.rowSpan=e-o.level+1,r[o.level-1].push(o)}),r};function d8e(t){const e=ht(fc),n=M(()=>nq(t.store.states.originColumns.value));return{isGroup:M(()=>{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 f8e=ue({name:"ElTableHeader",components:{ElCheckbox:Is},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String}},setup(t,{emit:e}){const n=en(),r=ht(fc),i=Qe("table"),o=F({}),{onColumnsChange:a,onScrollableChange:s}=eq(r);Bt(async()=>{await Ot(),await Ot();const{prop:C,order:E}=t.defaultSort;r==null||r.store.commit("sort",{prop:C,order:E,init:!0})});const{handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:m}=u8e(t,e),{getHeaderRowStyle:g,getHeaderRowClass:y,getHeaderCellStyle:b,getHeaderCellClass:w}=c8e(t),{isGroup:O,toggleAllSelection:S,columnRows:x}=d8e(t);return n.state={onColumnsChange:a,onScrollableChange:s},n.filterPanels=o,{ns:i,filterPanels:o,onColumnsChange:a,onScrollableChange:s,columnRows:x,getHeaderRowClass:y,getHeaderRowStyle:g,getHeaderCellClass:w,getHeaderCellStyle:b,handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:m,isGroup:O,toggleAllSelection:S}},render(){const{ns:t,isGroup:e,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:i,getHeaderRowClass:o,getHeaderRowStyle:a,handleHeaderClick:s,handleHeaderContextMenu:l,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:h,$parent:m}=this;let g=1;return Et("thead",{class:{[t.is("group")]:e}},n.map((y,b)=>Et("tr",{class:o(b),key:b,style:a(b)},y.map((w,O)=>(w.rowSpan>g&&(g=w.rowSpan),Et("th",{class:i(b,O,y,w),colspan:w.colSpan,key:`${w.id}-thead`,rowspan:w.rowSpan,style:r(b,O,y,w),onClick:S=>{S.currentTarget.classList.contains("noclick")||s(S,w)},onContextmenu:S=>l(S,w),onMousedown:S=>u(S,w),onMousemove:S=>c(S,w),onMouseout:f},[Et("div",{class:["cell",w.filteredValue&&w.filteredValue.length>0?"highlight":""]},[w.renderHeader?w.renderHeader({column:w,$index:O,store:h,_self:m}):w.label,w.sortable&&Et("span",{onClick:S=>d(S,w),class:"caret-wrapper"},[Et("i",{onClick:S=>d(S,w,"ascending"),class:"sort-caret ascending"}),Et("i",{onClick:S=>d(S,w,"descending"),class:"sort-caret descending"})]),w.filterable&&Et(l8e,{store:h,placement:w.filterPlacement||"bottom-start",appendTo:m.appendFilterPanelTo,column:w,upDataColumn:(S,x)=>{w[S]=x}},{"filter-icon":()=>w.renderFilterIcon?w.renderFilterIcon({filterOpened:w.filterOpened}):null})])]))))))}});function NT(t,e,n=.03){return t-e>n}function h8e(t){const e=ht(fc),n=F(""),r=F(Et("div")),i=(m,g,y)=>{var b;const w=e,O=$T(m);let S;const x=(b=w==null?void 0:w.vnode.el)==null?void 0:b.dataset.prefix;O&&(S=Q8({columns:t.store.states.columns.value},O,x),S&&(w==null||w.emit(`cell-${y}`,g,S,O,m))),w==null||w.emit(`row-${y}`,g,S,m)},o=(m,g)=>{i(m,g,"dblclick")},a=(m,g)=>{t.store.commit("setCurrentRow",g),i(m,g,"click")},s=(m,g)=>{i(m,g,"contextmenu")},l=jo(m=>{t.store.commit("setHoverRow",m)},30),u=jo(()=>{t.store.commit("setHoverRow",null)},30),c=m=>{const g=window.getComputedStyle(m,null),y=Number.parseInt(g.paddingLeft,10)||0,b=Number.parseInt(g.paddingRight,10)||0,w=Number.parseInt(g.paddingTop,10)||0,O=Number.parseInt(g.paddingBottom,10)||0;return{left:y,right:b,top:w,bottom:O}},d=(m,g,y)=>{let b=g.target.parentNode;for(;m>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)y(b,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:o,handleClick:a,handleContextMenu:s,handleMouseEnter:l,handleMouseLeave:u,handleCellMouseEnter:(m,g,y)=>{var b;const w=e,O=$T(m),S=(b=w==null?void 0:w.vnode.el)==null?void 0:b.dataset.prefix;if(O){const U=Q8({columns:t.store.states.columns.value},O,S);O.rowSpan>1&&d(O.rowSpan,m,rl);const Q=w.hoverState={cell:O,column:U,row:g};w==null||w.emit("cell-mouse-enter",Q.row,Q.column,Q.cell,m)}if(!y)return;const x=m.target.querySelector(".cell");if(!(Ua(x,`${S}-tooltip`)&&x.childNodes.length))return;const C=document.createRange();C.setStart(x,0),C.setEnd(x,x.childNodes.length);const{width:E,height:T}=C.getBoundingClientRect(),{width:P,height:A}=x.getBoundingClientRect(),{top:D,left:N,right:$,bottom:W}=c(x),L=N+$,I=D+W;(NT(E+L,P)||NT(T+I,A)||NT(x.scrollWidth,P))&&X5e(y,O.innerText||O.textContent,O,w)},handleCellMouseLeave:m=>{const g=$T(m);if(!g)return;g.rowSpan>1&&d(g.rowSpan,m,aa);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,m)},tooltipContent:n,tooltipTrigger:r}}function p8e(t){const e=ht(fc),n=Qe("table");return{getRowStyle:(u,c)=>{const d=e==null?void 0:e.props.rowStyle;return typeof d=="function"?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c)=>{const d=[n.e("row")];(e==null?void 0:e.props.highlightCurrentRow)&&u===t.store.states.currentRow.value&&d.push("current-row"),t.stripe&&c%2===1&&d.push(n.em("row","striped"));const f=e==null?void 0:e.props.rowClassName;return typeof f=="string"?d.push(f):typeof f=="function"&&d.push(f.call(null,{row:u,rowIndex:c})),d},getCellStyle:(u,c,d,f)=>{const h=e==null?void 0:e.props.cellStyle;let m=h!=null?h:{};typeof h=="function"&&(m=h.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const g=dN(c,t==null?void 0:t.fixed,t.store);return am(g,"left"),am(g,"right"),Object.assign({},m,g)},getCellClass:(u,c,d,f,h)=>{const m=cN(n.b(),c,t==null?void 0:t.fixed,t.store,void 0,h),g=[f.id,f.align,f.className,...m],y=e==null?void 0:e.props.cellClassName;return typeof y=="string"?g.push(y):typeof y=="function"&&g.push(y.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),g.push(n.e("cell")),g.filter(b=>Boolean(b)).join(" ")},getSpan:(u,c,d,f)=>{let h=1,m=1;const g=e==null?void 0:e.props.spanMethod;if(typeof g=="function"){const y=g({row:u,column:c,rowIndex:d,columnIndex:f});Array.isArray(y)?(h=y[0],m=y[1]):typeof y=="object"&&(h=y.rowspan,m=y.colspan)}return{rowspan:h,colspan:m}},getColspanRealWidth:(u,c,d)=>{if(c<1)return u[d].realWidth;const f=u.map(({realWidth:h,width:m})=>h||m).slice(d,d+c);return Number(f.reduce((h,m)=>Number(h)+Number(m),-1))}}}const g8e=ue({name:"TableTdWrapper"}),m8e=ue({...g8e,props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(R(),G("td",{colspan:t.colspan,rowspan:t.rowspan},[xe(e.$slots,"default")],8,["colspan","rowspan"]))}});var v8e=Ge(m8e,[["__file","td-wrapper.vue"]]);function y8e(t){const e=ht(fc),n=Qe("table"),{handleDoubleClick:r,handleClick:i,handleContextMenu:o,handleMouseEnter:a,handleMouseLeave:s,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=h8e(t),{getRowStyle:f,getRowClass:h,getCellStyle:m,getCellClass:g,getSpan:y,getColspanRealWidth:b}=p8e(t),w=M(()=>t.store.states.columns.value.findIndex(({type:E})=>E==="default")),O=(E,T)=>{const P=e.props.rowKey;return P?ta(E,P):T},S=(E,T,P,A=!1)=>{const{tooltipEffect:D,tooltipOptions:N,store:$}=t,{indent:W,columns:L}=$.states,I=h(E,T);let U=!0;return P&&(I.push(n.em("row",`level-${P.level}`)),U=P.display),Et("tr",{style:[U?null:{display:"none"},f(E,T)],class:I,key:O(E,T),onDblclick:V=>r(V,E),onClick:V=>i(V,E),onContextmenu:V=>o(V,E),onMouseenter:()=>a(T),onMouseleave:s},L.value.map((V,q)=>{const{rowspan:K,colspan:ie}=y(E,V,T,q);if(!K||!ie)return null;const oe=Object.assign({},V);oe.realWidth=b(L.value,ie,q);const Se={store:t.store,_self:t.context||e,column:oe,row:E,$index:T,cellIndex:q,expanded:A};q===w.value&&P&&(Se.treeNode={indent:P.level*W.value,level:P.level},typeof P.expanded=="boolean"&&(Se.treeNode.expanded=P.expanded,"loading"in P&&(Se.treeNode.loading=P.loading),"noLazyChildren"in P&&(Se.treeNode.noLazyChildren=P.noLazyChildren)));const ke=`${O(E,T)},${q}`,Y=oe.columnKey||oe.rawColumnKey||"",re=V.showOverflowTooltip&&Jh({effect:D},N,V.showOverflowTooltip);return Et(v8e,{style:m(T,q,E,V),class:g(T,q,E,V,ie-1),key:`${Y}${ke}`,rowspan:K,colspan:ie,onMouseenter:te=>l(te,E,re),onMouseleave:u},{default:()=>x(q,V,Se)})}))},x=(E,T,P)=>T.renderCell(P);return{wrappedRowRender:(E,T)=>{const P=t.store,{isRowExpanded:A,assertRowKey:D}=P,{treeData:N,lazyTreeNodeMap:$,childrenColumnName:W,rowKey:L}=P.states,I=P.states.columns.value;if(I.some(({type:Q})=>Q==="expand")){const Q=A(E),V=S(E,T,void 0,Q),q=e.renderExpanded;return Q?q?[[V,Et("tr",{key:`expanded-row__${V.key}`},[Et("td",{colspan:I.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[q({row:E,$index:T,store:P,expanded:Q})])])]]:(console.error("[Element Error]renderExpanded is required."),V):[[V]]}else if(Object.keys(N.value).length){D();const Q=ta(E,L.value);let V=N.value[Q],q=null;V&&(q={expanded:V.expanded,level:V.level,display:!0},typeof V.lazy=="boolean"&&(typeof V.loaded=="boolean"&&V.loaded&&(q.noLazyChildren=!(V.children&&V.children.length)),q.loading=V.loading));const K=[S(E,T,q)];if(V){let ie=0;const oe=(ke,Y)=>{!(ke&&ke.length&&Y)||ke.forEach(re=>{const te={display:Y.display&&Y.expanded,level:Y.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ge=ta(re,L.value);if(ge==null)throw new Error("For nested data item, row-key is required.");if(V={...N.value[ge]},V&&(te.expanded=V.expanded,V.level=V.level||te.level,V.display=!!(V.expanded&&te.display),typeof V.lazy=="boolean"&&(typeof V.loaded=="boolean"&&V.loaded&&(te.noLazyChildren=!(V.children&&V.children.length)),te.loading=V.loading)),ie++,K.push(S(re,T+ie,te)),V){const Re=$.value[ge]||re[W.value];oe(Re,V)}})};V.display=!0;const Se=$.value[Q]||E[W.value];oe(Se,V)}return K}else return S(E,T,void 0)},tooltipContent:c,tooltipTrigger:d}}const b8e={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 _8e=ue({name:"ElTableBody",props:b8e,setup(t){const e=en(),n=ht(fc),r=Qe("table"),{wrappedRowRender:i,tooltipContent:o,tooltipTrigger:a}=y8e(t),{onColumnsChange:s,onScrollableChange:l}=eq(n),u=[];return Ve(t.store.states.hoverRow,(c,d)=>{var f;const h=e==null?void 0:e.vnode.el,m=Array.from((h==null?void 0:h.children)||[]).filter(b=>b==null?void 0:b.classList.contains(`${r.e("row")}`));let g=c;const y=(f=m[g])==null?void 0:f.childNodes;if(y!=null&&y.length){let b=0;Array.from(y).reduce((O,S,x)=>{var C,E;return((C=y[x])==null?void 0:C.colSpan)>1&&(b=(E=y[x])==null?void 0:E.colSpan),S.nodeName!=="TD"&&b===0&&O.push(x),b>0&&b--,O},[]).forEach(O=>{var S;for(g=c;g>0;){const x=(S=m[g-1])==null?void 0:S.childNodes;if(x[O]&&x[O].nodeName==="TD"&&x[O].rowSpan>1){rl(x[O],"hover-cell"),u.push(x[O]);break}g--}})}else u.forEach(b=>aa(b,"hover-cell")),u.length=0;!t.store.states.isComplex.value||!Tn||gf(()=>{const b=m[d],w=m[c];b&&!b.classList.contains("hover-fixed-row")&&aa(b,"hover-row"),w&&rl(w,"hover-row")})}),ed(()=>{var c;(c=Gs)==null||c()}),{ns:r,onColumnsChange:s,onScrollableChange:l,wrappedRowRender:i,tooltipContent:o,tooltipTrigger:a}},render(){const{wrappedRowRender:t,store:e}=this,n=e.states.data.value||[];return Et("tbody",{tabIndex:-1},[n.reduce((r,i)=>r.concat(t(i,r.length)),[])])}});function O8e(){const t=ht(fc),e=t==null?void 0:t.store,n=M(()=>e.states.fixedLeafColumnsLength.value),r=M(()=>e.states.rightFixedColumns.value.length),i=M(()=>e.states.columns.value.length),o=M(()=>e.states.fixedColumns.value.length),a=M(()=>e.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:r,columnsCount:i,leftFixedCount:o,rightFixedCount:a,columns:e.states.columns}}function w8e(t){const{columns:e}=O8e(),n=Qe("table");return{getCellClasses:(o,a)=>{const s=o[a],l=[n.e("cell"),s.id,s.align,s.labelClassName,...cN(n.b(),a,s.fixed,t.store)];return s.className&&l.push(s.className),s.children||l.push(n.is("leaf")),l},getCellStyles:(o,a)=>{const s=dN(a,o.fixed,t.store);return am(s,"left"),am(s,"right"),s},columns:e}}var S8e=ue({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{getCellClasses:e,getCellStyles:n,columns:r}=w8e(t);return{ns:Qe("table"),getCellClasses:e,getCellStyles:n,columns:r}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:r,sumText:i}=this,o=this.store.states.data.value;let a=[];return r?a=r({columns:t,data:o}):t.forEach((s,l)=>{if(l===0){a[l]=i;return}const u=o.map(h=>Number(h[s.property])),c=[];let d=!0;u.forEach(h=>{if(!Number.isNaN(+h)){d=!1;const m=`${h}`.split(".")[1];c.push(m?m.length:0)}});const f=Math.max.apply(null,c);d?a[l]="":a[l]=u.reduce((h,m)=>{const g=Number(m);return Number.isNaN(+g)?h:Number.parseFloat((h+m).toFixed(Math.min(f,20)))},0)}),Et(Et("tfoot",[Et("tr",{},[...t.map((s,l)=>Et("td",{key:l,colspan:s.colSpan,rowspan:s.rowSpan,class:n(t,l),style:e(s,l)},[Et("div",{class:["cell",s.labelClassName]},[a[l]])]))])]))}});function x8e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,f,h=!0)=>{t.toggleRowSelection(d,f,!1,h),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,f)=>{t.toggleRowExpansionAdapter(d,f)},clearSort:()=>{t.clearSort()},sort:(d,f)=>{t.commit("sort",{prop:d,order:f})},updateKeyChildren:(d,f)=>{t.updateKeyChildren(d,f)}}}function C8e(t,e,n,r){const i=F(!1),o=F(null),a=F(!1),s=V=>{a.value=V},l=F({width:null,height:null,headerHeight:null}),u=F(!1),c={display:"inline-block",verticalAlign:"middle"},d=F(),f=F(0),h=F(0),m=F(0),g=F(0),y=F(0);Bo(()=>{e.setHeight(t.height)}),Bo(()=>{e.setMaxHeight(t.maxHeight)}),Ve(()=>[t.currentRowKey,n.states.rowKey],([V,q])=>{!p(q)||!p(V)||n.setCurrentRowKey(`${V}`)},{immediate:!0}),Ve(()=>t.data,V=>{r.store.commit("setData",V)},{immediate:!0,deep:!0}),Bo(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},w=(V,q)=>{const{pixelX:K,pixelY:ie}=q;Math.abs(K)>=Math.abs(ie)&&(r.refs.bodyWrapper.scrollLeft+=q.pixelX/5)},O=M(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=M(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),x=()=>{O.value&&e.updateElsHeight(),e.updateColumnsWidth(),requestAnimationFrame(P)};Bt(async()=>{await Ot(),n.updateColumns(),A(),requestAnimationFrame(x);const V=r.vnode.el,q=r.refs.headerWrapper;t.flexible&&V&&V.parentElement&&(V.parentElement.style.minWidth="0"),l.value={width:d.value=V.offsetWidth,height:V.offsetHeight,headerHeight:t.showHeader&&q?q.offsetHeight:null},n.states.columns.value.forEach(K=>{K.filteredValue&&K.filteredValue.length&&r.store.commit("filterChange",{column:K,values:K.filteredValue,silent:!0})}),r.$ready=!0});const C=(V,q)=>{if(!V)return;const K=Array.from(V.classList).filter(ie=>!ie.startsWith("is-scrolling-"));K.push(e.scrollX.value?q:"is-scrolling-none"),V.className=K.join(" ")},E=V=>{const{tableWrapper:q}=r.refs;C(q,V)},T=V=>{const{tableWrapper:q}=r.refs;return!!(q&&q.classList.contains(V))},P=function(){if(!r.refs.scrollBarRef)return;if(!e.scrollX.value){const Y="is-scrolling-none";T(Y)||E(Y);return}const V=r.refs.scrollBarRef.wrapRef;if(!V)return;const{scrollLeft:q,offsetWidth:K,scrollWidth:ie}=V,{headerWrapper:oe,footerWrapper:Se}=r.refs;oe&&(oe.scrollLeft=q),Se&&(Se.scrollLeft=q);const ke=ie-K-1;q>=ke?E("is-scrolling-right"):E(q===0?"is-scrolling-left":"is-scrolling-middle")},A=()=>{!r.refs.scrollBarRef||(r.refs.scrollBarRef.wrapRef&&sr(r.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),t.fit?Zr(r.vnode.el,D):sr(window,"resize",D),Zr(r.refs.bodyWrapper,()=>{var V,q;D(),(q=(V=r.refs)==null?void 0:V.scrollBarRef)==null||q.update()}))},D=()=>{var V,q,K,ie;const oe=r.vnode.el;if(!r.$ready||!oe)return;let Se=!1;const{width:ke,height:Y,headerHeight:re}=l.value,te=d.value=oe.offsetWidth;ke!==te&&(Se=!0);const ge=oe.offsetHeight;(t.height||O.value)&&Y!==ge&&(Se=!0);const Re=t.tableLayout==="fixed"?r.refs.headerWrapper:(V=r.refs.tableHeaderRef)==null?void 0:V.$el;t.showHeader&&(Re==null?void 0:Re.offsetHeight)!==re&&(Se=!0),f.value=((q=r.refs.tableWrapper)==null?void 0:q.scrollHeight)||0,m.value=(Re==null?void 0:Re.scrollHeight)||0,g.value=((K=r.refs.footerWrapper)==null?void 0:K.offsetHeight)||0,y.value=((ie=r.refs.appendWrapper)==null?void 0:ie.offsetHeight)||0,h.value=f.value-m.value-g.value-y.value,Se&&(l.value={width:te,height:ge,headerHeight:t.showHeader&&(Re==null?void 0:Re.offsetHeight)||0},x())},N=Ni(),$=M(()=>{const{bodyWidth:V,scrollY:q,gutterWidth:K}=e;return V.value?`${V.value-(q.value?K:0)}px`:""}),W=M(()=>t.maxHeight?"fixed":t.tableLayout),L=M(()=>{if(t.data&&t.data.length)return null;let V="100%";t.height&&h.value&&(V=`${h.value}px`);const q=d.value;return{width:q?`${q}px`:"",height:V}}),I=M(()=>t.height?{height:Number.isNaN(Number(t.height))?t.height:`${t.height}px`}:t.maxHeight?{maxHeight:Number.isNaN(Number(t.maxHeight))?t.maxHeight:`${t.maxHeight}px`}:{}),U=M(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${m.value+g.value}px)`}:{maxHeight:`${t.maxHeight-m.value-g.value}px`}:{});return{isHidden:i,renderExpanded:o,setDragVisible:s,isGroup:u,handleMouseLeave:b,handleHeaderFooterMousewheel:w,tableSize:N,emptyBlockStyle:L,handleFixedMousewheel:(V,q)=>{const K=r.refs.bodyWrapper;if(Math.abs(q.spinY)>0){const ie=K.scrollTop;q.pixelY<0&&ie!==0&&V.preventDefault(),q.pixelY>0&&K.scrollHeight-K.clientHeight>ie&&V.preventDefault(),K.scrollTop+=Math.ceil(q.pixelY/5)}else K.scrollLeft+=Math.ceil(q.pixelX/5)},resizeProxyVisible:a,bodyWidth:$,resizeState:l,doLayout:x,tableBodyStyles:S,tableLayout:W,scrollbarViewStyle:c,tableInnerStyle:I,scrollbarStyle:U}}function E8e(t){const e=F(),n=()=>{const i=t.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},a=t.store.states.updateOrderFns;e.value=new MutationObserver(()=>{a.forEach(s=>s())}),e.value.observe(i,o)};Bt(()=>{n()}),ed(()=>{var r;(r=e.value)==null||r.disconnect()})}var T8e={data:{type:Array,default:()=>[]},size:Wi,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0}};function rq(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(i=>i.width===void 0)&&(n=[]);const r=i=>{const o={key:`${t.tableLayout}_${i.id}`,style:{},name:void 0};return e?o.style={width:`${i.width}px`}:o.name=i.id,o};return Et("colgroup",{},n.map(i=>Et("col",r(i))))}rq.props=["columns","tableLayout"];const k8e=()=>{const t=F(),e=(o,a)=>{const s=t.value;s&&s.scrollTo(o,a)},n=(o,a)=>{const s=t.value;s&&kt(a)&&["Top","Left"].includes(o)&&s[`setScroll${o}`](a)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};let P8e=1;const A8e=ue({name:"ElTable",directives:{Mousewheel:aMe},components:{TableHeader:f8e,TableBody:_8e,TableFooter:S8e,ElScrollbar:mu,hColgroup:rq},props:T8e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(t){const{t:e}=kn(),n=Qe("table"),r=en();_n(fc,r);const i=n8e(r,t);r.store=i;const o=new i8e({store:r.store,table:r,fit:t.fit,showHeader:t.showHeader});r.layout=o;const a=M(()=>(i.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:m,sort:g,updateKeyChildren:y}=x8e(i),{isHidden:b,renderExpanded:w,setDragVisible:O,isGroup:S,handleMouseLeave:x,handleHeaderFooterMousewheel:C,tableSize:E,emptyBlockStyle:T,handleFixedMousewheel:P,resizeProxyVisible:A,bodyWidth:D,resizeState:N,doLayout:$,tableBodyStyles:W,tableLayout:L,scrollbarViewStyle:I,tableInnerStyle:U,scrollbarStyle:Q}=C8e(t,o,i,r),{scrollBarRef:V,scrollTo:q,setScrollLeft:K,setScrollTop:ie}=k8e(),oe=jo($,50),Se=`${n.namespace.value}-table_${P8e++}`;r.tableId=Se,r.state={isGroup:S,resizeState:N,doLayout:$,debouncedUpdateLayout:oe};const ke=M(()=>{var te;return(te=t.sumText)!=null?te:e("el.table.sumText")}),Y=M(()=>{var te;return(te=t.emptyText)!=null?te:e("el.table.emptyText")}),re=M(()=>nq(i.states.originColumns.value)[0]);return E8e(r),pr(()=>{oe.cancel()}),{ns:n,layout:o,store:i,columns:re,handleHeaderFooterMousewheel:C,handleMouseLeave:x,tableId:Se,tableSize:E,isHidden:b,isEmpty:a,renderExpanded:w,resizeProxyVisible:A,resizeState:N,isGroup:S,bodyWidth:D,tableBodyStyles:W,emptyBlockStyle:T,debouncedUpdateLayout:oe,handleFixedMousewheel:P,setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:m,doLayout:$,sort:g,updateKeyChildren:y,t:e,setDragVisible:O,context:r,computedSumText:ke,computedEmptyText:Y,tableLayout:L,scrollbarViewStyle:I,tableInnerStyle:U,scrollbarStyle:Q,scrollBarRef:V,scrollTo:q,setScrollLeft:K,setScrollTop:ie}}});function M8e(t,e,n,r,i,o){const a=an("hColgroup"),s=an("table-header"),l=an("table-body"),u=an("table-footer"),c=an("el-scrollbar"),d=dx("mousewheel");return R(),G("div",{ref:"tableWrapper",class:j([{[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:mt(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:t.handleMouseLeave},[J("div",{class:j(t.ns.e("inner-wrapper")),style:mt(t.tableInnerStyle)},[J("div",{ref:"hiddenColumns",class:"hidden-columns"},[xe(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Ht((R(),G("div",{key:0,ref:"headerWrapper",class:j(t.ns.e("header-wrapper"))},[J("table",{ref:"tableHeader",class:j(t.ns.e("header")),style:mt(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(s,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):_e("v-if",!0),J("div",{ref:"bodyWrapper",class:j(t.ns.e("body-wrapper"))},[B(c,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex},{default:z(()=>[J("table",{ref:"tableBody",class:j(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:mt({width:t.bodyWidth,tableLayout:t.tableLayout})},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(R(),we(s,{key:0,ref:"tableHeaderRef",class:j(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"])):_e("v-if",!0),B(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"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"?(R(),we(u,{key:1,class:j(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"])):_e("v-if",!0)],6),t.isEmpty?(R(),G("div",{key:0,ref:"emptyBlock",style:mt(t.emptyBlockStyle),class:j(t.ns.e("empty-block"))},[J("span",{class:j(t.ns.e("empty-text"))},[xe(t.$slots,"empty",{},()=>[qe(je(t.computedEmptyText),1)])],2)],6)):_e("v-if",!0),t.$slots.append?(R(),G("div",{key:1,ref:"appendWrapper",class:j(t.ns.e("append-wrapper"))},[xe(t.$slots,"append")],2)):_e("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex"])],2),t.showSummary&&t.tableLayout==="fixed"?Ht((R(),G("div",{key:1,ref:"footerWrapper",class:j(t.ns.e("footer-wrapper"))},[J("table",{class:j(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:mt(t.tableBodyStyles)},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(u,{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)),[[zn,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):_e("v-if",!0),t.border||t.isGroup?(R(),G("div",{key:2,class:j(t.ns.e("border-left-patch"))},null,2)):_e("v-if",!0)],6),Ht(J("div",{ref:"resizeProxy",class:j(t.ns.e("column-resize-proxy"))},null,2),[[zn,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var R8e=Ge(A8e,[["render",M8e],["__file","table.vue"]]);const $8e={selection:"table-column--selection",expand:"table__expand-column"},N8e={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:""}},D8e=t=>$8e[t]||"",L8e={selection:{renderHeader({store:t,column:e}){function n(){return t.states.data.value&&t.states.data.value.length===0}return Et(Is,{disabled:n(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection,modelValue:t.states.isAllSelected.value,ariaLabel:e.label})},renderCell({row:t,column:e,store:n,$index:r}){return Et(Is,{disabled:e.selectable?!e.selectable.call(null,t,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:i=>i.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:e.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const r=t.index;return typeof r=="number"?n=e+r:typeof r=="function"&&(n=r(e)),Et("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({row:t,store:e,expanded:n}){const{ns:r}=e,i=[r.e("expand-icon")];return n&&i.push(r.em("expand-icon","expanded")),Et("div",{class:i,onClick:function(a){a.stopPropagation(),e.toggleRowExpansion(t)}},{default:()=>[Et(gt,null,{default:()=>[Et(ba)]})]})},sortable:!1,resizable:!1}};function I8e({row:t,column:e,$index:n}){var r;const i=e.property,o=i&&b1(t,i).value;return e&&e.formatter?e.formatter(t,e,o,n):((r=o==null?void 0:o.toString)==null?void 0:r.call(o))||""}function B8e({row:t,treeNode:e,store:n},r=!1){const{ns:i}=n;if(!e)return r?[Et("span",{class:i.e("placeholder")})]:null;const o=[],a=function(s){s.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(Et("span",{class:i.e("indent"),style:{"padding-left":`${e.indent}px`}})),typeof e.expanded=="boolean"&&!e.noLazyChildren){const s=[i.e("expand-icon"),e.expanded?i.em("expand-icon","expanded"):""];let l=ba;e.loading&&(l=Ku),o.push(Et("div",{class:s,onClick:a},{default:()=>[Et(gt,{class:{[i.is("loading")]:e.loading}},{default:()=>[Et(l)]})]}))}else o.push(Et("span",{class:i.e("placeholder")}));return o}function U8(t,e){return t.reduce((n,r)=>(n[r]=r,n),e)}function F8e(t,e){const n=en();return{registerComplexWatchers:()=>{const o=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},s=U8(o,a);Object.keys(s).forEach(l=>{const u=a[l];Dn(e,u)&&Ve(()=>e[u],c=>{let d=c;u==="width"&&l==="realWidth"&&(d=uN(c)),u==="minWidth"&&l==="realMinWidth"&&(d=XU(c)),n.columnConfig.value[u]=d,n.columnConfig.value[l]=d;const f=u==="fixed";t.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=U8(o,a);Object.keys(s).forEach(l=>{const u=a[l];Dn(e,u)&&Ve(()=>e[u],c=>{n.columnConfig.value[l]=c})})}}}function V8e(t,e,n){const r=en(),i=F(""),o=F(!1),a=F(),s=F(),l=Qe("table");Bo(()=>{a.value=t.align?`is-${t.align}`:null,a.value}),Bo(()=>{s.value=t.headerAlign?`is-${t.headerAlign}`:a.value,s.value});const u=M(()=>{let S=r.vnode.vParent||r.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),c=M(()=>{const{store:S}=r.parent;if(!S)return!1;const{treeData:x}=S.states,C=x.value;return C&&Object.keys(C).length>0}),d=F(uN(t.width)),f=F(XU(t.minWidth)),h=S=>(d.value&&(S.width=d.value),f.value&&(S.minWidth=f.value),!d.value&&f.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(S.width===void 0?S.minWidth:S.width),S),m=S=>{const x=S.type,C=L8e[x]||{};Object.keys(C).forEach(T=>{const P=C[T];T!=="className"&&P!==void 0&&(S[T]=P)});const E=D8e(x);if(E){const T=`${p(l.namespace)}-${E}`;S.className=S.className?`${S.className} ${T}`:T}return S},g=S=>{Array.isArray(S)?S.forEach(C=>x(C)):x(S);function x(C){var E;((E=C==null?void 0:C.type)==null?void 0:E.name)==="ElTableColumn"&&(C.vParent=r)}};return{columnId:i,realAlign:a,isSubColumn:o,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:m,setColumnRenders:S=>{t.renderHeader||S.type!=="selection"&&(S.renderHeader=C=>(r.columnConfig.value.label,xe(e,"header",C,()=>[S.label]))),e["filter-icon"]&&(S.renderFilterIcon=C=>xe(e,"filter-icon",C));let x=S.renderCell;return S.type==="expand"?(S.renderCell=C=>Et("div",{class:"cell"},[x(C)]),n.value.renderExpanded=C=>e.default?e.default(C):e.default):(x=x||I8e,S.renderCell=C=>{let E=null;if(e.default){const $=e.default(C);E=$.some(W=>W.type!==oa)?$:x(C)}else E=x(C);const{columns:T}=n.value.store.states,P=T.value.findIndex($=>$.type==="default"),A=c.value&&C.cellIndex===P,D=B8e(C,A),N={class:"cell",style:{}};return S.showOverflowTooltip&&(N.class=`${N.class} ${p(l.namespace)}-tooltip`,N.style={width:`${(C.column.realWidth||Number(C.column.width))-1}px`}),g(E),Et("div",N,[D,E])}),S},getPropsData:(...S)=>S.reduce((x,C)=>(Array.isArray(C)&&C.forEach(E=>{x[E]=t[E]}),x),{}),getColumnElIndex:(S,x)=>Array.prototype.indexOf.call(S,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var j8e={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let z8e=1;var iq=ue({name:"ElTableColumn",components:{ElCheckbox:Is},props:j8e,setup(t,{slots:e}){const n=en(),r=F({}),i=M(()=>{let O=n.parent;for(;O&&!O.tableId;)O=O.parent;return O}),{registerNormalWatchers:o,registerComplexWatchers:a}=F8e(i,t),{columnId:s,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:h,getPropsData:m,getColumnElIndex:g,realAlign:y,updateColumnOrder:b}=V8e(t,e,i),w=c.value;s.value=`${w.tableId||w.columnId}_column_${z8e++}`,cx(()=>{l.value=i.value!==w;const O=t.type||"default",S=t.sortable===""?!0:t.sortable,x=ai(t.showOverflowTooltip)?w.props.showOverflowTooltip:t.showOverflowTooltip,C={...N8e[O],id:s.value,type:O,property:t.prop||t.property,align:y,headerAlign:u,showOverflowTooltip:x,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:S,index:t.index,rawColumnKey:n.vnode.key};let D=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);D=W5e(C,D),D=q5e(h,d,f)(D),r.value=D,o(),a()}),Bt(()=>{var O;const S=c.value,x=l.value?S.vnode.el.children:(O=S.refs.hiddenColumns)==null?void 0:O.children,C=()=>g(x||[],n.vnode.el);r.value.getColumnIndex=C,C()>-1&&i.value.store.commit("insertColumn",r.value,l.value?S.columnConfig.value:null,b)}),pr(()=>{const O=r.value.getColumnIndex;(O?O():-1)>-1&&i.value.store.commit("removeColumn",r.value,l.value?w.columnConfig.value:null,b)}),n.columnId=s.value,n.columnConfig=r},render(){var t,e,n;try{const r=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),i=[];if(Array.isArray(r))for(const a of r)((n=a.type)==null?void 0:n.name)==="ElTableColumn"||a.shapeFlag&2?i.push(a):a.type===ct&&Array.isArray(a.children)&&a.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!At(s==null?void 0:s.children)&&i.push(s)});return Et("div",i)}catch{return Et("div",[])}}});const Rb=Vt(R8e,{TableColumn:iq}),$b=ti(iq);var x0=(t=>(t.ASC="asc",t.DESC="desc",t))(x0||{}),C0=(t=>(t.CENTER="center",t.RIGHT="right",t))(C0||{}),oq=(t=>(t.LEFT="left",t.RIGHT="right",t))(oq||{});const lP={asc:"desc",desc:"asc"},E0=Symbol("placeholder"),Q8e=(t,e,n)=>{var r;const i={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:t.flexGrow||0,flexShrink:t.flexShrink||1}};n||(i.flexShrink=1);const o={...(r=t.style)!=null?r:{},...i,flexBasis:"auto",width:t.width};return e||(t.maxWidth&&(o.maxWidth=t.maxWidth),t.minWidth&&(o.minWidth=t.minWidth)),o};function H8e(t,e,n){const r=M(()=>p(e).map((y,b)=>{var w,O;return{...y,key:(O=(w=y.key)!=null?w:y.dataKey)!=null?O:b}})),i=M(()=>p(r).filter(y=>!y.hidden)),o=M(()=>p(i).filter(y=>y.fixed==="left"||y.fixed===!0)),a=M(()=>p(i).filter(y=>y.fixed==="right")),s=M(()=>p(i).filter(y=>!y.fixed)),l=M(()=>{const y=[];return p(o).forEach(b=>{y.push({...b,placeholderSign:E0})}),p(s).forEach(b=>{y.push(b)}),p(a).forEach(b=>{y.push({...b,placeholderSign:E0})}),y}),u=M(()=>p(o).length||p(a).length),c=M(()=>p(r).reduce((y,b)=>(y[b.key]=Q8e(b,p(n),t.fixed),y),{})),d=M(()=>p(i).reduce((y,b)=>y+b.width,0)),f=y=>p(r).find(b=>b.key===y),h=y=>p(c)[y],m=(y,b)=>{y.width=b};function g(y){var b;const{key:w}=y.currentTarget.dataset;if(!w)return;const{sortState:O,sortBy:S}=t;let x=x0.ASC;sn(O)?x=lP[O[w]]:x=lP[S.order],(b=t.onColumnSort)==null||b.call(t,{column:f(w),key:w,order:x})}return{columns:r,columnsStyles:c,columnsTotalWidth:d,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,hasFixedColumns:u,mainColumns:l,normalColumns:s,visibleColumns:i,getColumn:f,getColumnStyle:h,updateColumnWidth:m,onColumnSorted:g}}const W8e=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:i})=>{const o=F({scrollLeft:0,scrollTop:0});function a(h){var m,g,y;const{scrollTop:b}=h;(m=e.value)==null||m.scrollTo(h),(g=n.value)==null||g.scrollToTop(b),(y=r.value)==null||y.scrollToTop(b)}function s(h){o.value=h,a(h)}function l(h){o.value.scrollTop=h,a(p(o))}function u(h){var m,g;o.value.scrollLeft=h,(g=(m=e.value)==null?void 0:m.scrollTo)==null||g.call(m,p(o))}function c(h){var m;s(h),(m=t.onScroll)==null||m.call(t,h)}function d({scrollTop:h}){const{scrollTop:m}=p(o);h!==m&&l(h)}function f(h,m="auto"){var g;(g=e.value)==null||g.scrollToRow(h,m)}return Ve(()=>p(o).scrollTop,(h,m)=>{h>m&&i()}),{scrollPos:o,scrollTo:s,scrollToLeft:u,scrollToTop:l,scrollToRow:f,onScroll:c,onVerticalScroll:d}},U8e=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:i,ns:o,isScrolling:a})=>{const s=en(),{emit:l}=s,u=Tr(!1),c=F(t.defaultExpandedRowKeys||[]),d=F(-1),f=Tr(null),h=F({}),m=F({}),g=Tr({}),y=Tr({}),b=Tr({}),w=M(()=>kt(t.estimatedRowHeight));function O(A){var D;(D=t.onRowsRendered)==null||D.call(t,A),A.rowCacheEnd>p(d)&&(d.value=A.rowCacheEnd)}function S({hovered:A,rowKey:D}){if(a.value)return;i.vnode.el.querySelectorAll(`[rowkey="${String(D)}"]`).forEach(W=>{A?W.classList.add(o.is("hovered")):W.classList.remove(o.is("hovered"))})}function x({expanded:A,rowData:D,rowIndex:N,rowKey:$}){var W,L;const I=[...p(c)],U=I.indexOf($);A?U===-1&&I.push($):U>-1&&I.splice(U,1),c.value=I,l("update:expandedRowKeys",I),(W=t.onRowExpand)==null||W.call(t,{expanded:A,rowData:D,rowIndex:N,rowKey:$}),(L=t.onExpandedRowsChange)==null||L.call(t,I)}const C=jo(()=>{var A,D,N,$;u.value=!0,h.value={...p(h),...p(m)},E(p(f),!1),m.value={},f.value=null,(A=e.value)==null||A.forceUpdate(),(D=n.value)==null||D.forceUpdate(),(N=r.value)==null||N.forceUpdate(),($=s.proxy)==null||$.$forceUpdate(),u.value=!1},0);function E(A,D=!1){!p(w)||[e,n,r].forEach(N=>{const $=p(N);$&&$.resetAfterRowIndex(A,D)})}function T(A,D,N){const $=p(f);($===null||$>N)&&(f.value=N),m.value[A]=D}function P({rowKey:A,height:D,rowIndex:N},$){$?$===oq.RIGHT?b.value[A]=D:g.value[A]=D:y.value[A]=D;const W=Math.max(...[g,b,y].map(L=>L.value[A]||0));p(h)[A]!==W&&(T(A,W,N),C())}return{expandedRowKeys:c,lastRenderedRowIndex:d,isDynamic:w,isResetting:u,rowHeights:h,resetAfterIndex:E,onRowExpanded:x,onRowHovered:S,onRowsRendered:O,onRowHeightChange:P}},q8e=(t,{expandedRowKeys:e,lastRenderedRowIndex:n,resetAfterIndex:r})=>{const i=F({}),o=M(()=>{const s={},{data:l,rowKey:u}=t,c=p(e);if(!c||!c.length)return l;const d=[],f=new Set;c.forEach(m=>f.add(m));let h=l.slice();for(h.forEach(m=>s[m[u]]=0);h.length>0;){const m=h.shift();d.push(m),f.has(m[u])&&Array.isArray(m.children)&&m.children.length>0&&(h=[...m.children,...h],m.children.forEach(g=>s[g[u]]=s[m[u]]+1))}return i.value=s,d}),a=M(()=>{const{data:s,expandColumnKey:l}=t;return l?p(o):s});return Ve(a,(s,l)=>{s!==l&&(n.value=-1,r(0,!0))}),{data:a,depthMap:i}},Y8e=(t,e)=>t+e,k1=t=>ut(t)?t.reduce(Y8e,0):t,op=(t,e,n={})=>$t(t)?t(e):t!=null?t:n,jd=t=>(["width","maxWidth","minWidth","height"].forEach(e=>{t[e]=pi(t[e])}),t),aq=t=>Kr(t)?e=>Et(t,e):t,X8e=(t,{columnsTotalWidth:e,data:n,fixedColumnsOnLeft:r,fixedColumnsOnRight:i})=>{const o=M(()=>{const{fixed:O,width:S,vScrollbarSize:x}=t,C=S-x;return O?Math.max(Math.round(p(e)),C):C}),a=M(()=>p(o)+t.vScrollbarSize),s=M(()=>{const{height:O=0,maxHeight:S=0,footerHeight:x,hScrollbarSize:C}=t;if(S>0){const E=p(m),T=p(l),A=p(h)+E+T+C;return Math.min(A,S-x)}return O-x}),l=M(()=>{const{rowHeight:O,estimatedRowHeight:S}=t,x=p(n);return kt(S)?x.length*S:x.length*O}),u=M(()=>{const{maxHeight:O}=t,S=p(s);if(kt(O)&&O>0)return S;const x=p(l)+p(h)+p(m);return Math.min(S,x)}),c=O=>O.width,d=M(()=>k1(p(r).map(c))),f=M(()=>k1(p(i).map(c))),h=M(()=>k1(t.headerHeight)),m=M(()=>{var O;return(((O=t.fixedData)==null?void 0:O.length)||0)*t.rowHeight}),g=M(()=>p(s)-p(h)-p(m)),y=M(()=>{const{style:O={},height:S,width:x}=t;return jd({...O,height:S,width:x})}),b=M(()=>jd({height:t.footerHeight})),w=M(()=>({top:pi(p(h)),bottom:pi(t.footerHeight),width:pi(t.width)}));return{bodyWidth:o,fixedTableHeight:u,mainTableHeight:s,leftTableWidth:d,rightTableWidth:f,headerWidth:a,rowsHeight:l,windowHeight:g,footerHeight:b,emptyStyle:w,rootStyle:y,headerHeight:h}},Z8e=t=>{const e=F(),n=F(0),r=F(0);let i;return Bt(()=>{i=Zr(e,([o])=>{const{width:a,height:s}=o.contentRect,{paddingLeft:l,paddingRight:u,paddingTop:c,paddingBottom:d}=getComputedStyle(o.target),f=Number.parseInt(l)||0,h=Number.parseInt(u)||0,m=Number.parseInt(c)||0,g=Number.parseInt(d)||0;n.value=a-f-h,r.value=s-m-g}).stop}),pr(()=>{i==null||i()}),Ve([n,r],([o,a])=>{var s;(s=t.onResize)==null||s.call(t,{width:o,height:a})}),{sizer:e,width:n,height:r}};function G8e(t){const e=F(),n=F(),r=F(),{columns:i,columnsStyles:o,columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,hasFixedColumns:u,mainColumns:c,onColumnSorted:d}=H8e(t,er(t,"columns"),er(t,"fixed")),{scrollTo:f,scrollToLeft:h,scrollToTop:m,scrollToRow:g,onScroll:y,onVerticalScroll:b,scrollPos:w}=W8e(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:ce}),O=Qe("table-v2"),S=en(),x=Tr(!1),{expandedRowKeys:C,lastRenderedRowIndex:E,isDynamic:T,isResetting:P,rowHeights:A,resetAfterIndex:D,onRowExpanded:N,onRowHeightChange:$,onRowHovered:W,onRowsRendered:L}=U8e(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:S,ns:O,isScrolling:x}),{data:I,depthMap:U}=q8e(t,{expandedRowKeys:C,lastRenderedRowIndex:E,resetAfterIndex:D}),{bodyWidth:Q,fixedTableHeight:V,mainTableHeight:q,leftTableWidth:K,rightTableWidth:ie,headerWidth:oe,rowsHeight:Se,windowHeight:ke,footerHeight:Y,emptyStyle:re,rootStyle:te,headerHeight:ge}=X8e(t,{columnsTotalWidth:a,data:I,fixedColumnsOnLeft:s,fixedColumnsOnRight:l}),Re=F(),$e=M(()=>{const Te=p(I).length===0;return ut(t.fixedData)?t.fixedData.length===0&&Te:Te});function Z(Te){const{estimatedRowHeight:Ie,rowHeight:ae,rowKey:me}=t;return Ie?p(A)[p(I)[Te][me]]||Ie:ae}function ce(){const{onEndReached:Te}=t;if(!Te)return;const{scrollTop:Ie}=p(w),ae=p(Se),me=p(ke),Ae=ae-(Ie+me)+t.hScrollbarSize;p(E)>=0&&ae===Ie+p(q)-p(ge)&&Te(Ae)}return Ve(()=>t.expandedRowKeys,Te=>C.value=Te,{deep:!0}),{columns:i,containerRef:Re,mainTableRef:e,leftTableRef:n,rightTableRef:r,isDynamic:T,isResetting:P,isScrolling:x,hasFixedColumns:u,columnsStyles:o,columnsTotalWidth:a,data:I,expandedRowKeys:C,depthMap:U,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,mainColumns:c,bodyWidth:Q,emptyStyle:re,rootStyle:te,headerWidth:oe,footerHeight:Y,mainTableHeight:q,fixedTableHeight:V,leftTableWidth:K,rightTableWidth:ie,showEmpty:$e,getRowHeight:Z,onColumnSorted:d,onRowHovered:W,onRowExpanded:N,onRowsRendered:L,onRowHeightChange:$,scrollTo:f,scrollToLeft:h,scrollToTop:m,scrollToRow:g,onScroll:y,onVerticalScroll:b}}const fN=Symbol("tableV2"),sq=String,Nb={type:Oe(Array),required:!0},hN={type:Oe(Array)},lq={...hN,required:!0},K8e=String,q8={type:Oe(Array),default:()=>Jr([])},bh={type:Number,required:!0},uq={type:Oe([String,Number,Symbol]),default:"id"},Y8={type:Oe(Object)},Nh=Ye({class:String,columns:Nb,columnsStyles:{type:Oe(Object),required:!0},depth:Number,expandColumnKey:K8e,estimatedRowHeight:{...zh.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:Oe(Function)},onRowHover:{type:Oe(Function)},onRowHeightChange:{type:Oe(Function)},rowData:{type:Oe(Object),required:!0},rowEventHandlers:{type:Oe(Object)},rowIndex:{type:Number,required:!0},rowKey:uq,style:{type:Oe(Object)}}),DT={type:Number,required:!0},pN=Ye({class:String,columns:Nb,fixedHeaderData:{type:Oe(Array)},headerData:{type:Oe(Array),required:!0},headerHeight:{type:Oe([Number,Array]),default:50},rowWidth:DT,rowHeight:{type:Number,default:50},height:DT,width:DT}),P1=Ye({columns:Nb,data:lq,fixedData:hN,estimatedRowHeight:Nh.estimatedRowHeight,width:bh,height:bh,headerWidth:bh,headerHeight:pN.headerHeight,bodyWidth:bh,rowHeight:bh,cache:AU.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:zh.scrollbarAlwaysOn,scrollbarStartGap:zh.scrollbarStartGap,scrollbarEndGap:zh.scrollbarEndGap,class:sq,style:Y8,containerStyle:Y8,getRowHeight:{type:Oe(Function),required:!0},rowKey:Nh.rowKey,onRowsRendered:{type:Oe(Function)},onScroll:{type:Oe(Function)}}),J8e=Ye({cache:P1.cache,estimatedRowHeight:Nh.estimatedRowHeight,rowKey:uq,headerClass:{type:Oe([String,Function])},headerProps:{type:Oe([Object,Function])},headerCellProps:{type:Oe([Object,Function])},headerHeight:pN.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:Oe([String,Function])},rowProps:{type:Oe([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:Oe([Object,Function])},columns:Nb,data:lq,dataGetter:{type:Oe(Function)},fixedData:hN,expandColumnKey:Nh.expandColumnKey,expandedRowKeys:q8,defaultExpandedRowKeys:q8,class:sq,fixed:Boolean,style:{type:Oe(Object)},width:bh,height:bh,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:zh.hScrollbarSize,vScrollbarSize:zh.vScrollbarSize,scrollbarAlwaysOn:$U.alwaysOn,sortBy:{type:Oe(Object),default:()=>({})},sortState:{type:Oe(Object),default:void 0},onColumnSort:{type:Oe(Function)},onExpandedRowsChange:{type:Oe(Function)},onEndReached:{type:Oe(Function)},onRowExpand:Nh.onRowExpand,onScroll:P1.onScroll,onRowsRendered:P1.onRowsRendered,rowEventHandlers:Nh.rowEventHandlers}),gN=(t,{slots:e})=>{var n;const{cellData:r,style:i}=t,o=((n=r==null?void 0:r.toString)==null?void 0:n.call(r))||"",a=xe(e,"default",t,()=>[o]);return B("div",{class:t.class,title:o,style:i},[a])};gN.displayName="ElTableV2Cell";gN.inheritAttrs=!1;const mN=(t,{slots:e})=>xe(e,"default",t,()=>{var n,r;return[B("div",{class:t.class,title:(n=t.column)==null?void 0:n.title},[(r=t.column)==null?void 0:r.title])]});mN.displayName="ElTableV2HeaderCell";mN.inheritAttrs=!1;const eBe=Ye({class:String,columns:Nb,columnsStyles:{type:Oe(Object),required:!0},headerIndex:Number,style:{type:Oe(Object)}}),tBe=ue({name:"ElTableV2HeaderRow",props:eBe,setup(t,{slots:e}){return()=>{const{columns:n,columnsStyles:r,headerIndex:i,style:o}=t;let a=n.map((s,l)=>e.cell({columns:n,column:s,columnIndex:l,headerIndex:i,style:r[s.key]}));return e.header&&(a=e.header({cells:a.map(s=>ut(s)&&s.length===1?s[0]:s),columns:n,headerIndex:i})),B("div",{class:t.class,style:o,role:"row"},[a])}}}),nBe="ElTableV2Header",rBe=ue({name:nBe,props:pN,setup(t,{slots:e,expose:n}){const r=Qe("table-v2"),i=F(),o=M(()=>jd({width:t.width,height:t.height})),a=M(()=>jd({width:t.rowWidth,height:t.height})),s=M(()=>$o(p(t.headerHeight))),l=d=>{const f=p(i);Ot(()=>{f!=null&&f.scroll&&f.scroll({left:d})})},u=()=>{const d=r.e("fixed-header-row"),{columns:f,fixedHeaderData:h,rowHeight:m}=t;return h==null?void 0:h.map((g,y)=>{var b;const w=jd({height:m,width:"100%"});return(b=e.fixed)==null?void 0:b.call(e,{class:d,columns:f,rowData:g,rowIndex:-(y+1),style:w})})},c=()=>{const d=r.e("dynamic-header-row"),{columns:f}=t;return p(s).map((h,m)=>{var g;const y=jd({width:"100%",height:h});return(g=e.dynamic)==null?void 0:g.call(e,{class:d,columns:f,headerIndex:m,style:y})})};return n({scrollToLeft:l}),()=>{if(!(t.height<=0))return B("div",{ref:i,class:t.class,style:p(o),role:"rowgroup"},[B("div",{style:p(a),class:r.e("header")},[c(),u()])])}}}),iBe=t=>{const{isScrolling:e}=ht(fN),n=F(!1),r=F(),i=M(()=>kt(t.estimatedRowHeight)&&t.rowIndex>=0),o=(l=!1)=>{const u=p(r);if(!u)return;const{columns:c,onRowHeightChange:d,rowKey:f,rowIndex:h,style:m}=t,{height:g}=u.getBoundingClientRect();n.value=!0,Ot(()=>{if(l||g!==Number.parseInt(m.height)){const y=c[0],b=(y==null?void 0:y.placeholderSign)===E0;d==null||d({rowKey:f,height:g,rowIndex:h},y&&!b&&y.fixed)}})},a=M(()=>{const{rowData:l,rowIndex:u,rowKey:c,onRowHover:d}=t,f=t.rowEventHandlers||{},h={};return Object.entries(f).forEach(([m,g])=>{$t(g)&&(h[m]=y=>{g({event:y,rowData:l,rowIndex:u,rowKey:c})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:g})=>{const y=h[m];h[m]=b=>{d({event:b,hovered:g,rowData:l,rowIndex:u,rowKey:c}),y==null||y(b)}}),h}),s=l=>{const{onRowExpand:u,rowData:c,rowIndex:d,rowKey:f}=t;u==null||u({expanded:l,rowData:c,rowIndex:d,rowKey:f})};return Bt(()=>{p(i)&&o(!0)}),{isScrolling:e,measurable:i,measured:n,rowRef:r,eventHandlers:a,onExpand:s}},oBe="ElTableV2TableRow",aBe=ue({name:oBe,props:Nh,setup(t,{expose:e,slots:n,attrs:r}){const{eventHandlers:i,isScrolling:o,measurable:a,measured:s,rowRef:l,onExpand:u}=iBe(t);return e({onExpand:u}),()=>{const{columns:c,columnsStyles:d,expandColumnKey:f,depth:h,rowData:m,rowIndex:g,style:y}=t;let b=c.map((w,O)=>{const S=ut(m.children)&&m.children.length>0&&w.key===f;return n.cell({column:w,columns:c,columnIndex:O,depth:h,style:d[w.key],rowData:m,rowIndex:g,isScrolling:p(o),expandIconProps:S?{rowData:m,rowIndex:g,onExpand:u}:void 0})});if(n.row&&(b=n.row({cells:b.map(w=>ut(w)&&w.length===1?w[0]:w),style:y,columns:c,depth:h,rowData:m,rowIndex:g,isScrolling:p(o)})),p(a)){const{height:w,...O}=y||{},S=p(s);return B("div",gn({ref:l,class:t.class,style:S?y:O,role:"row"},r,p(i)),[b])}return B("div",gn(r,{ref:l,class:t.class,style:y,role:"row"},p(i)),[b])}}}),sBe=t=>{const{sortOrder:e}=t;return B(gt,{size:14,class:t.class},{default:()=>[e===x0.ASC?B(LCe,null,null):B(NCe,null,null)]})},lBe=t=>{const{expanded:e,expandable:n,onExpand:r,style:i,size:o}=t,a={onClick:n?()=>r(!e):void 0,class:t.class};return B(gt,gn(a,{size:o,style:i}),{default:()=>[B(ba,null,null)]})},uBe="ElTableV2Grid",cBe=t=>{const e=F(),n=F(),r=M(()=>{const{data:g,rowHeight:y,estimatedRowHeight:b}=t;if(!b)return g.length*y}),i=M(()=>{const{fixedData:g,rowHeight:y}=t;return((g==null?void 0:g.length)||0)*y}),o=M(()=>k1(t.headerHeight)),a=M(()=>{const{height:g}=t;return Math.max(0,g-p(o)-p(i))}),s=M(()=>p(o)+p(i)>0),l=({data:g,rowIndex:y})=>g[y][t.rowKey];function u({rowCacheStart:g,rowCacheEnd:y,rowVisibleStart:b,rowVisibleEnd:w}){var O;(O=t.onRowsRendered)==null||O.call(t,{rowCacheStart:g,rowCacheEnd:y,rowVisibleStart:b,rowVisibleEnd:w})}function c(g,y){var b;(b=n.value)==null||b.resetAfterRowIndex(g,y)}function d(g,y){const b=p(e),w=p(n);sn(g)?(b==null||b.scrollToLeft(g.scrollLeft),w==null||w.scrollTo(g)):(b==null||b.scrollToLeft(g),w==null||w.scrollTo({scrollLeft:g,scrollTop:y}))}function f(g){var y;(y=p(n))==null||y.scrollTo({scrollTop:g})}function h(g,y){var b;(b=p(n))==null||b.scrollToItem(g,1,y)}function m(){var g,y;(g=p(n))==null||g.$forceUpdate(),(y=p(e))==null||y.$forceUpdate()}return{bodyRef:n,forceUpdate:m,fixedRowHeight:i,gridHeight:a,hasHeader:s,headerHeight:o,headerRef:e,totalHeight:r,itemKey:l,onItemRendered:u,resetAfterRowIndex:c,scrollTo:d,scrollToTop:f,scrollToRow:h}},vN=ue({name:uBe,props:P1,setup(t,{slots:e,expose:n}){const{ns:r}=ht(fN),{bodyRef:i,fixedRowHeight:o,gridHeight:a,hasHeader:s,headerRef:l,headerHeight:u,totalHeight:c,forceUpdate:d,itemKey:f,onItemRendered:h,resetAfterRowIndex:m,scrollTo:g,scrollToTop:y,scrollToRow:b}=cBe(t);n({forceUpdate:d,totalHeight:c,scrollTo:g,scrollToTop:y,scrollToRow:b,resetAfterRowIndex:m});const w=()=>t.bodyWidth;return()=>{const{cache:O,columns:S,data:x,fixedData:C,useIsScrolling:E,scrollbarAlwaysOn:T,scrollbarEndGap:P,scrollbarStartGap:A,style:D,rowHeight:N,bodyWidth:$,estimatedRowHeight:W,headerWidth:L,height:I,width:U,getRowHeight:Q,onScroll:V}=t,q=kt(W),K=q?u4e:o4e,ie=p(u);return B("div",{role:"table",class:[r.e("table"),t.class],style:D},[B(K,{ref:i,data:x,useIsScrolling:E,itemKey:f,columnCache:0,columnWidth:q?w:$,totalColumn:1,totalRow:x.length,rowCache:O,rowHeight:q?Q:N,width:U,height:p(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:A,scrollbarEndGap:P,scrollbarAlwaysOn:T,onScroll:V,onItemRendered:h,perfMode:!1},{default:oe=>{var Se;const ke=x[oe.rowIndex];return(Se=e.row)==null?void 0:Se.call(e,{...oe,columns:S,rowData:ke})}}),p(s)&&B(rBe,{ref:l,class:r.e("header-wrapper"),columns:S,headerData:x,headerHeight:t.headerHeight,fixedHeaderData:C,rowWidth:L,rowHeight:N,width:U,height:Math.min(ie+p(o),I)},{dynamic:e.header,fixed:e.row})])}}});function dBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const fBe=(t,{slots:e})=>{const{mainTableRef:n,...r}=t;return B(vN,gn({ref:n},r),dBe(e)?e:{default:()=>[e]})};function hBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const pBe=(t,{slots:e})=>{if(!t.columns.length)return;const{leftTableRef:n,...r}=t;return B(vN,gn({ref:n},r),hBe(e)?e:{default:()=>[e]})};function gBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const mBe=(t,{slots:e})=>{if(!t.columns.length)return;const{rightTableRef:n,...r}=t;return B(vN,gn({ref:n},r),gBe(e)?e:{default:()=>[e]})};function vBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const yBe=(t,{slots:e})=>{const{columns:n,columnsStyles:r,depthMap:i,expandColumnKey:o,expandedRowKeys:a,estimatedRowHeight:s,hasFixedColumns:l,rowData:u,rowIndex:c,style:d,isScrolling:f,rowProps:h,rowClass:m,rowKey:g,rowEventHandlers:y,ns:b,onRowHovered:w,onRowExpanded:O}=t,S=op(m,{columns:n,rowData:u,rowIndex:c},""),x=op(h,{columns:n,rowData:u,rowIndex:c}),C=u[g],E=i[C]||0,T=Boolean(o),P=c<0,A=[b.e("row"),S,{[b.e(`row-depth-${E}`)]:T&&c>=0,[b.is("expanded")]:T&&a.includes(C),[b.is("fixed")]:!E&&P,[b.is("customized")]:Boolean(e.row)}],D=l?w:void 0,N={...x,columns:n,columnsStyles:r,class:A,depth:E,expandColumnKey:o,estimatedRowHeight:P?void 0:s,isScrolling:f,rowIndex:c,rowData:u,rowKey:C,rowEventHandlers:y,style:d};return B(aBe,gn(N,{onRowExpand:O,onMouseenter:L=>{D==null||D({hovered:!0,rowKey:C,event:L,rowData:u,rowIndex:c})},onMouseleave:L=>{D==null||D({hovered:!1,rowKey:C,event:L,rowData:u,rowIndex:c})},rowkey:C}),vBe(e)?e:{default:()=>[e]})},uP=({columns:t,column:e,columnIndex:n,depth:r,expandIconProps:i,isScrolling:o,rowData:a,rowIndex:s,style:l,expandedRowKeys:u,ns:c,cellProps:d,expandColumnKey:f,indentSize:h,iconSize:m,rowKey:g},{slots:y})=>{const b=jd(l);if(e.placeholderSign===E0)return B("div",{class:c.em("row-cell","placeholder"),style:b},null);const{cellRenderer:w,dataKey:O,dataGetter:S}=e,x=$t(S)?S({columns:t,column:e,columnIndex:n,rowData:a,rowIndex:s}):Wr(a,O!=null?O:""),C=op(d,{cellData:x,columns:t,column:e,columnIndex:n,rowIndex:s,rowData:a}),E={class:c.e("cell-text"),columns:t,column:e,columnIndex:n,cellData:x,isScrolling:o,rowData:a,rowIndex:s},T=aq(w),P=T?T(E):xe(y,"default",E,()=>[B(gN,E,null)]),A=[c.e("row-cell"),e.class,e.align===C0.CENTER&&c.is("align-center"),e.align===C0.RIGHT&&c.is("align-right")],D=s>=0&&f&&e.key===f,N=s>=0&&u.includes(a[g]);let $;const W=`margin-inline-start: ${r*h}px;`;return D&&(sn(i)?$=B(lBe,gn(i,{class:[c.e("expand-icon"),c.is("expanded",N)],size:m,expanded:N,style:W,expandable:!0}),null):$=B("div",{style:[W,`width: ${m}px; height: ${m}px;`].join(" ")},null)),B("div",gn({class:A,style:b},C,{role:"cell"}),[$,P])};uP.inheritAttrs=!1;function bBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const _Be=({columns:t,columnsStyles:e,headerIndex:n,style:r,headerClass:i,headerProps:o,ns:a},{slots:s})=>{const l={columns:t,headerIndex:n},u=[a.e("header-row"),op(i,l,""),{[a.is("customized")]:Boolean(s.header)}],c={...op(o,l),columnsStyles:e,class:u,columns:t,headerIndex:n,style:r};return B(tBe,c,bBe(s)?s:{default:()=>[s]})},X8=(t,{slots:e})=>{const{column:n,ns:r,style:i,onColumnSorted:o}=t,a=jd(i);if(n.placeholderSign===E0)return B("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:s,headerClass:l,sortable:u}=n,c={...t,class:r.e("header-cell-text")},d=aq(s),f=d?d(c):xe(e,"default",c,()=>[B(mN,c,null)]),{sortBy:h,sortState:m,headerCellProps:g}=t;let y,b;if(m){const S=m[n.key];y=Boolean(lP[S]),b=y?S:x0.ASC}else y=n.key===h.key,b=y?h.order:x0.ASC;const w=[r.e("header-cell"),op(l,t,""),n.align===C0.CENTER&&r.is("align-center"),n.align===C0.RIGHT&&r.is("align-right"),u&&r.is("sortable")],O={...op(g,t),onClick:n.sortable?o:void 0,class:w,style:a,["data-key"]:n.key};return B("div",gn(O,{role:"columnheader"}),[f,u&&B(sBe,{class:[r.e("sort-icon"),y&&r.is("sorting")],sortOrder:b},null)])},cq=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};cq.displayName="ElTableV2Footer";const dq=(t,{slots:e})=>{const n=xe(e,"default",{},()=>[B(pU,null,null)]);return B("div",{class:t.class,style:t.style},[n])};dq.displayName="ElTableV2Empty";const fq=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};fq.displayName="ElTableV2Overlay";function Iv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const OBe="ElTableV2",wBe=ue({name:OBe,props:J8e,setup(t,{slots:e,expose:n}){const r=Qe("table-v2"),{columnsStyles:i,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,mainColumns:s,mainTableHeight:l,fixedTableHeight:u,leftTableWidth:c,rightTableWidth:d,data:f,depthMap:h,expandedRowKeys:m,hasFixedColumns:g,mainTableRef:y,leftTableRef:b,rightTableRef:w,isDynamic:O,isResetting:S,isScrolling:x,bodyWidth:C,emptyStyle:E,rootStyle:T,headerWidth:P,footerHeight:A,showEmpty:D,scrollTo:N,scrollToLeft:$,scrollToTop:W,scrollToRow:L,getRowHeight:I,onColumnSorted:U,onRowHeightChange:Q,onRowHovered:V,onRowExpanded:q,onRowsRendered:K,onScroll:ie,onVerticalScroll:oe}=G8e(t);return n({scrollTo:N,scrollToLeft:$,scrollToTop:W,scrollToRow:L}),_n(fN,{ns:r,isResetting:S,isScrolling:x}),()=>{const{cache:Se,cellProps:ke,estimatedRowHeight:Y,expandColumnKey:re,fixedData:te,headerHeight:ge,headerClass:Re,headerProps:$e,headerCellProps:Z,sortBy:ce,sortState:Te,rowHeight:Ie,rowClass:ae,rowEventHandlers:me,rowKey:Ae,rowProps:X,scrollbarAlwaysOn:ee,indentSize:le,iconSize:Ce,useIsScrolling:fe,vScrollbarSize:Ee,width:be}=t,Be=p(f),Xe={cache:Se,class:r.e("main"),columns:p(s),data:Be,fixedData:te,estimatedRowHeight:Y,bodyWidth:p(C)+Ee,headerHeight:ge,headerWidth:p(P),height:p(l),mainTableRef:y,rowKey:Ae,rowHeight:Ie,scrollbarAlwaysOn:ee,scrollbarStartGap:2,scrollbarEndGap:Ee,useIsScrolling:fe,width:be,getRowHeight:I,onRowsRendered:K,onScroll:ie},Ke=p(c),tt=p(u),Dt={cache:Se,class:r.e("left"),columns:p(o),data:Be,estimatedRowHeight:Y,leftTableRef:b,rowHeight:Ie,bodyWidth:Ke,headerWidth:Ke,headerHeight:ge,height:tt,rowKey:Ae,scrollbarAlwaysOn:ee,scrollbarStartGap:2,scrollbarEndGap:Ee,useIsScrolling:fe,width:Ke,getRowHeight:I,onScroll:oe},Me=p(d)+Ee,nt={cache:Se,class:r.e("right"),columns:p(a),data:Be,estimatedRowHeight:Y,rightTableRef:w,rowHeight:Ie,bodyWidth:Me,headerWidth:Me,headerHeight:ge,height:tt,rowKey:Ae,scrollbarAlwaysOn:ee,scrollbarStartGap:2,scrollbarEndGap:Ee,width:Me,style:`--${p(r.namespace)}-table-scrollbar-size: ${Ee}px`,useIsScrolling:fe,getRowHeight:I,onScroll:oe},de=p(i),Pe={ns:r,depthMap:p(h),columnsStyles:de,expandColumnKey:re,expandedRowKeys:p(m),estimatedRowHeight:Y,hasFixedColumns:p(g),rowProps:X,rowClass:ae,rowKey:Ae,rowEventHandlers:me,onRowHovered:V,onRowExpanded:q,onRowHeightChange:Q},Le={cellProps:ke,expandColumnKey:re,indentSize:le,iconSize:Ce,rowKey:Ae,expandedRowKeys:p(m),ns:r},wt={ns:r,headerClass:Re,headerProps:$e,columnsStyles:de},tn={ns:r,sortBy:ce,sortState:Te,headerCellProps:Z,onColumnSorted:U},De={row:ln=>B(yBe,gn(ln,Pe),{row:e.row,cell:nn=>{let bn;return e.cell?B(uP,gn(nn,Le,{style:de[nn.column.key]}),Iv(bn=e.cell(nn))?bn:{default:()=>[bn]}):B(uP,gn(nn,Le,{style:de[nn.column.key]}),null)}}),header:ln=>B(_Be,gn(ln,wt),{header:e.header,cell:nn=>{let bn;return e["header-cell"]?B(X8,gn(nn,tn,{style:de[nn.column.key]}),Iv(bn=e["header-cell"](nn))?bn:{default:()=>[bn]}):B(X8,gn(nn,tn,{style:de[nn.column.key]}),null)}})},xt=[t.class,r.b(),r.e("root"),{[r.is("dynamic")]:p(O)}],qt={class:r.e("footer"),style:p(A)};return B("div",{class:xt,style:p(T)},[B(fBe,Xe,Iv(De)?De:{default:()=>[De]}),B(pBe,Dt,Iv(De)?De:{default:()=>[De]}),B(mBe,nt,Iv(De)?De:{default:()=>[De]}),e.footer&&B(cq,qt,{default:e.footer}),p(D)&&B(dq,{class:r.e("empty"),style:p(E)},{default:e.empty}),e.overlay&&B(fq,{class:r.e("overlay")},{default:e.overlay})])}}}),SBe=Ye({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:Oe(Function)}}),xBe=ue({name:"ElAutoResizer",props:SBe,setup(t,{slots:e}){const n=Qe("auto-resizer"),{height:r,width:i,sizer:o}=Z8e(t),a={width:"100%",height:"100%"};return()=>{var s;return B("div",{ref:o,class:n.b(),style:a},[(s=e.default)==null?void 0:s.call(e,{height:r.value,width:i.value})])}}}),CBe=Vt(wBe),EBe=Vt(xBe),rC=Symbol("tabsRootContextKey"),TBe=Ye({tabs:{type:Oe(Array),default:()=>Jr([])}}),hq="ElTabBar",kBe=ue({name:hq}),PBe=ue({...kBe,props:TBe,setup(t,{expose:e}){const n=t,r=en(),i=ht(rC);i||Hi(hq,"<el-tabs><el-tab-bar /></el-tabs>");const o=Qe("tabs"),a=F(),s=F(),l=()=>{let h=0,m=0;const g=["top","bottom"].includes(i.props.tabPosition)?"width":"height",y=g==="width"?"x":"y",b=y==="x"?"left":"top";return n.tabs.every(w=>{var O,S;const x=(S=(O=r.parent)==null?void 0:O.refs)==null?void 0:S[`tab-${w.uid}`];if(!x)return!1;if(!w.active)return!0;h=x[`offset${Du(b)}`],m=x[`client${Du(g)}`];const C=window.getComputedStyle(x);return g==="width"&&(m-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),h+=Number.parseFloat(C.paddingLeft)),!1}),{[g]:`${m}px`,transform:`translate${Du(y)}(${h}px)`}},u=()=>s.value=l(),c=[],d=()=>{var h;c.forEach(g=>g.stop()),c.length=0;const m=(h=r.parent)==null?void 0:h.refs;if(!!m){for(const g in m)if(g.startsWith("tab-")){const y=m[g];y&&c.push(Zr(y,u))}}};Ve(()=>n.tabs,async()=>{await Ot(),u(),d()},{immediate:!0});const f=Zr(a,()=>u());return pr(()=>{c.forEach(h=>h.stop()),c.length=0,f.stop()}),e({ref:a,update:u}),(h,m)=>(R(),G("div",{ref_key:"barRef",ref:a,class:j([p(o).e("active-bar"),p(o).is(p(i).props.tabPosition)]),style:mt(s.value)},null,6))}});var ABe=Ge(PBe,[["__file","tab-bar.vue"]]);const MBe=Ye({panes:{type:Oe(Array),default:()=>Jr([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),RBe={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},Z8="ElTabNav",$Be=ue({name:Z8,props:MBe,emits:RBe,setup(t,{expose:e,emit:n}){const r=ht(rC);r||Hi(Z8,"<el-tabs><tab-nav /></el-tabs>");const i=Qe("tabs"),o=que(),a=oce(),s=F(),l=F(),u=F(),c=F(),d=F(!1),f=F(0),h=F(!1),m=F(!0),g=M(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),y=M(()=>({transform:`translate${g.value==="width"?"X":"Y"}(-${f.value}px)`})),b=()=>{if(!s.value)return;const T=s.value[`offset${Du(g.value)}`],P=f.value;if(!P)return;const A=P>T?P-T:0;f.value=A},w=()=>{if(!s.value||!l.value)return;const T=l.value[`offset${Du(g.value)}`],P=s.value[`offset${Du(g.value)}`],A=f.value;if(T-A<=P)return;const D=T-A>P*2?A+P:T-P;f.value=D},O=async()=>{const T=l.value;if(!d.value||!u.value||!s.value||!T)return;await Ot();const P=u.value.querySelector(".is-active");if(!P)return;const A=s.value,D=["top","bottom"].includes(r.props.tabPosition),N=P.getBoundingClientRect(),$=A.getBoundingClientRect(),W=D?T.offsetWidth-$.width:T.offsetHeight-$.height,L=f.value;let I=L;D?(N.left<$.left&&(I=L-($.left-N.left)),N.right>$.right&&(I=L+N.right-$.right)):(N.top<$.top&&(I=L-($.top-N.top)),N.bottom>$.bottom&&(I=L+(N.bottom-$.bottom))),I=Math.max(I,0),f.value=Math.min(I,W)},S=()=>{var T;if(!l.value||!s.value)return;t.stretch&&((T=c.value)==null||T.update());const P=l.value[`offset${Du(g.value)}`],A=s.value[`offset${Du(g.value)}`],D=f.value;A<P?(d.value=d.value||{},d.value.prev=D,d.value.next=D+A<P,P-D<A&&(f.value=P-A)):(d.value=!1,D>0&&(f.value=0))},x=T=>{const P=T.code,{up:A,down:D,left:N,right:$}=St;if(![A,D,N,$].includes(P))return;const W=Array.from(T.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),L=W.indexOf(T.target);let I;P===N||P===A?L===0?I=W.length-1:I=L-1:L<W.length-1?I=L+1:I=0,W[I].focus({preventScroll:!0}),W[I].click(),C()},C=()=>{m.value&&(h.value=!0)},E=()=>h.value=!1;return Ve(o,T=>{T==="hidden"?m.value=!1:T==="visible"&&setTimeout(()=>m.value=!0,50)}),Ve(a,T=>{T?setTimeout(()=>m.value=!0,50):m.value=!1}),Zr(u,S),Bt(()=>setTimeout(()=>O(),0)),Jc(()=>S()),e({scrollToActiveTab:O,removeFocus:E}),()=>{const T=d.value?[B("span",{class:[i.e("nav-prev"),i.is("disabled",!d.value.prev)],onClick:b},[B(gt,null,{default:()=>[B(mf,null,null)]})]),B("span",{class:[i.e("nav-next"),i.is("disabled",!d.value.next)],onClick:w},[B(gt,null,{default:()=>[B(ba,null,null)]})])]:null,P=t.panes.map((A,D)=>{var N,$,W,L;const I=A.uid,U=A.props.disabled,Q=($=(N=A.props.name)!=null?N:A.index)!=null?$:`${D}`,V=!U&&(A.isClosable||t.editable);A.index=`${D}`;const q=V?B(gt,{class:"is-icon-close",onClick:oe=>n("tabRemove",A,oe)},{default:()=>[B(_a,null,null)]}):null,K=((L=(W=A.slots).label)==null?void 0:L.call(W))||A.props.label,ie=!U&&A.active?0:-1;return B("div",{ref:`tab-${I}`,class:[i.e("item"),i.is(r.props.tabPosition),i.is("active",A.active),i.is("disabled",U),i.is("closable",V),i.is("focus",h.value)],id:`tab-${Q}`,key:`tab-${I}`,"aria-controls":`pane-${Q}`,role:"tab","aria-selected":A.active,tabindex:ie,onFocus:()=>C(),onBlur:()=>E(),onClick:oe=>{E(),n("tabClick",A,Q,oe)},onKeydown:oe=>{V&&(oe.code===St.delete||oe.code===St.backspace)&&n("tabRemove",A,oe)}},[K,q])});return B("div",{ref:u,class:[i.e("nav-wrap"),i.is("scrollable",!!d.value),i.is(r.props.tabPosition)]},[T,B("div",{class:i.e("nav-scroll"),ref:s},[B("div",{class:[i.e("nav"),i.is(r.props.tabPosition),i.is("stretch",t.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:l,style:y.value,role:"tablist",onKeydown:x},[t.type?null:B(ABe,{ref:c,tabs:[...t.panes]},null),P])])])}}}),NBe=Ye({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Oe(Function),default:()=>!0},stretch:Boolean}),LT=t=>At(t)||kt(t),DBe={[Zt]:t=>LT(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>LT(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>LT(t),tabAdd:()=>!0},LBe=ue({name:"ElTabs",props:NBe,emits:DBe,setup(t,{emit:e,slots:n,expose:r}){var i;const o=Qe("tabs"),a=M(()=>["left","right"].includes(t.tabPosition)),{children:s,addChild:l,removeChild:u}=N$(en(),"ElTabPane"),c=F(),d=F((i=t.modelValue)!=null?i:"0"),f=async(b,w=!1)=>{var O,S,x;if(!(d.value===b||ai(b)))try{await((O=t.beforeLeave)==null?void 0:O.call(t,b,d.value))!==!1&&(d.value=b,w&&(e(Zt,b),e("tabChange",b)),(x=(S=c.value)==null?void 0:S.removeFocus)==null||x.call(S))}catch{}},h=(b,w,O)=>{b.props.disabled||(f(w,!0),e("tabClick",b,O))},m=(b,w)=>{b.props.disabled||ai(b.props.name)||(w.stopPropagation(),e("edit",b.props.name,"remove"),e("tabRemove",b.props.name))},g=()=>{e("edit",void 0,"add"),e("tabAdd")};Ve(()=>t.modelValue,b=>f(b)),Ve(d,async()=>{var b;await Ot(),(b=c.value)==null||b.scrollToActiveTab()}),_n(rC,{props:t,currentName:d,registerPane:b=>{s.value.push(b)},sortPane:l,unregisterPane:u}),r({currentName:d});const y=({render:b})=>b();return()=>{const b=n["add-icon"],w=t.editable||t.addable?B("div",{class:[o.e("new-tab"),a.value&&o.e("new-tab-vertical")],tabindex:"0",onClick:g,onKeydown:x=>{x.code===St.enter&&g()}},[b?xe(n,"add-icon"):B(gt,{class:o.is("icon-plus")},{default:()=>[B(pw,null,null)]})]):null,O=B("div",{class:[o.e("header"),a.value&&o.e("header-vertical"),o.is(t.tabPosition)]},[B(y,{render:()=>{const x=s.value.some(C=>C.slots.label);return B($Be,{ref:c,currentName:d.value,editable:t.editable,type:t.type,panes:s.value,stretch:t.stretch,onTabClick:h,onTabRemove:m},{$stable:!x})}},null),w]),S=B("div",{class:o.e("content")},[xe(n,"default")]);return B("div",{class:[o.b(),o.m(t.tabPosition),{[o.m("card")]:t.type==="card",[o.m("border-card")]:t.type==="border-card"}]},[S,O])}}}),IBe=Ye({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),pq="ElTabPane",BBe=ue({name:pq}),FBe=ue({...BBe,props:IBe,setup(t){const e=t,n=en(),r=Ji(),i=ht(rC);i||Hi(pq,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Qe("tab-pane"),a=F(),s=M(()=>e.closable||i.props.closable),l=n4(()=>{var h;return i.currentName.value===((h=e.name)!=null?h:a.value)}),u=F(l.value),c=M(()=>{var h;return(h=e.name)!=null?h:a.value}),d=n4(()=>!e.lazy||u.value||l.value);Ve(l,h=>{h&&(u.value=!0)});const f=Sn({uid:n.uid,slots:r,props:e,paneName:c,active:l,index:a,isClosable:s});return i.registerPane(f),Bt(()=>{i.sortPane(f)}),ed(()=>{i.unregisterPane(f.uid)}),(h,m)=>p(d)?Ht((R(),G("div",{key:0,id:`pane-${p(c)}`,class:j(p(o).b()),role:"tabpanel","aria-hidden":!p(l),"aria-labelledby":`tab-${p(c)}`},[xe(h.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[zn,p(l)]]):_e("v-if",!0)}});var gq=Ge(FBe,[["__file","tab-pane.vue"]]);const wp=Vt(LBe,{TabPane:gq}),Sp=ti(gq),VBe=Ye({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:cc,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),jBe=ue({name:"ElText"}),zBe=ue({...jBe,props:VBe,setup(t){const e=t,n=Ni(),r=Qe("text"),i=M(()=>[r.b(),r.m(e.type),r.m(n.value),r.is("truncated",e.truncated),r.is("line-clamp",!ai(e.lineClamp))]);return(o,a)=>(R(),we(un(o.tag),{class:j(p(i)),style:mt({"-webkit-line-clamp":o.lineClamp})},{default:z(()=>[xe(o.$slots,"default")]),_:3},8,["class","style"]))}});var QBe=Ge(zBe,[["__file","text.vue"]]);const iC=Vt(QBe),HBe=Ye({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:Oe(String),default:"light"},clearable:{type:Boolean,default:!0},size:Wi,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:Oe([String,Object]),default:()=>FQ},clearIcon:{type:Oe([String,Object]),default:()=>Bf},...Wm}),Ic=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const r=Number.parseInt(e[1],10),i=t.toUpperCase();return i.includes("AM")&&n===12?n=0:i.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:r}}return null},IT=(t,e)=>{const n=Ic(t);if(!n)return-1;const r=Ic(e);if(!r)return-1;const i=n.minutes+n.hours*60,o=r.minutes+r.hours*60;return i===o?0:i>o?1:-1},G8=t=>`${t}`.padStart(2,"0"),sg=t=>`${G8(t.hours)}:${G8(t.minutes)}`,WBe=(t,e)=>{const n=Ic(t);if(!n)return"";const r=Ic(e);if(!r)return"";const i={hours:n.hours,minutes:n.minutes};return i.minutes+=r.minutes,i.hours+=r.hours,i.hours+=Math.floor(i.minutes/60),i.minutes=i.minutes%60,sg(i)},UBe=ue({name:"ElTimeSelect"}),qBe=ue({...UBe,props:HBe,emits:["change","blur","focus","clear","update:modelValue"],setup(t,{expose:e}){const n=t;It.extend(z$);const{Option:r}=Ol,i=Qe("input"),o=F(),a=la(),{lang:s}=kn(),l=M(()=>n.modelValue),u=M(()=>{const b=Ic(n.start);return b?sg(b):null}),c=M(()=>{const b=Ic(n.end);return b?sg(b):null}),d=M(()=>{const b=Ic(n.step);return b?sg(b):null}),f=M(()=>{const b=Ic(n.minTime||"");return b?sg(b):null}),h=M(()=>{const b=Ic(n.maxTime||"");return b?sg(b):null}),m=M(()=>{const b=[];if(n.start&&n.end&&n.step){let w=u.value,O;for(;w&&c.value&&IT(w,c.value)<=0;)O=It(w,"HH:mm").locale(s.value).format(n.format),b.push({value:O,disabled:IT(w,f.value||"-1:-1")<=0||IT(w,h.value||"100:100")>=0}),w=WBe(w,d.value)}return b});return e({blur:()=>{var b,w;(w=(b=o.value)==null?void 0:b.blur)==null||w.call(b)},focus:()=>{var b,w;(w=(b=o.value)==null?void 0:b.focus)==null||w.call(b)}}),(b,w)=>(R(),we(p(Ol),{ref_key:"select",ref:o,"model-value":p(l),disabled:p(a),clearable:b.clearable,"clear-icon":b.clearIcon,size:b.size,effect:b.effect,placeholder:b.placeholder,"default-first-option":"",filterable:b.editable,"empty-values":b.emptyValues,"value-on-clear":b.valueOnClear,"onUpdate:modelValue":O=>b.$emit("update:modelValue",O),onChange:O=>b.$emit("change",O),onBlur:O=>b.$emit("blur",O),onFocus:O=>b.$emit("focus",O),onClear:()=>b.$emit("clear")},{prefix:z(()=>[b.prefixIcon?(R(),we(p(gt),{key:0,class:j(p(i).e("prefix-icon"))},{default:z(()=>[(R(),we(un(b.prefixIcon)))]),_:1},8,["class"])):_e("v-if",!0)]),default:z(()=>[(R(!0),G(ct,null,Wt(p(m),O=>(R(),we(p(r),{key:O.value,label:O.value,value:O.value,disabled:O.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var YBe=Ge(qBe,[["__file","time-select.vue"]]);const XBe=Vt(YBe),ZBe=ue({name:"ElTimeline",setup(t,{slots:e}){const n=Qe("timeline");return _n("timeline",e),()=>Et("ul",{class:[n.b()]},[xe(e,"default")])}}),GBe=Ye({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:fr},hollow:Boolean}),KBe=ue({name:"ElTimelineItem"}),JBe=ue({...KBe,props:GBe,setup(t){const e=t,n=Qe("timeline-item"),r=M(()=>[n.e("node"),n.em("node",e.size||""),n.em("node",e.type||""),n.is("hollow",e.hollow)]);return(i,o)=>(R(),G("li",{class:j([p(n).b(),{[p(n).e("center")]:i.center}])},[J("div",{class:j(p(n).e("tail"))},null,2),i.$slots.dot?_e("v-if",!0):(R(),G("div",{key:0,class:j(p(r)),style:mt({backgroundColor:i.color})},[i.icon?(R(),we(p(gt),{key:0,class:j(p(n).e("icon"))},{default:z(()=>[(R(),we(un(i.icon)))]),_:1},8,["class"])):_e("v-if",!0)],6)),i.$slots.dot?(R(),G("div",{key:1,class:j(p(n).e("dot"))},[xe(i.$slots,"dot")],2)):_e("v-if",!0),J("div",{class:j(p(n).e("wrapper"))},[!i.hideTimestamp&&i.placement==="top"?(R(),G("div",{key:0,class:j([p(n).e("timestamp"),p(n).is("top")])},je(i.timestamp),3)):_e("v-if",!0),J("div",{class:j(p(n).e("content"))},[xe(i.$slots,"default")],2),!i.hideTimestamp&&i.placement==="bottom"?(R(),G("div",{key:1,class:j([p(n).e("timestamp"),p(n).is("bottom")])},je(i.timestamp),3)):_e("v-if",!0)],2)],2))}});var mq=Ge(JBe,[["__file","timeline-item.vue"]]);const e6e=Vt(ZBe,{TimelineItem:mq}),t6e=ti(mq),vq=Ye({nowrap:Boolean});var yq=(t=>(t.top="top",t.bottom="bottom",t.left="left",t.right="right",t))(yq||{});const n6e=Object.values(yq),yN=Ye({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:Oe(Object),default:null}}),r6e=Ye({side:{type:Oe(String),values:n6e,required:!0}}),i6e=["absolute","fixed"],o6e=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],bN=Ye({arrowPadding:{type:Oe(Number),default:5},effect:{type:Oe(String),default:"light"},contentClass:String,placement:{type:Oe(String),values:o6e,default:"bottom"},reference:{type:Oe(Object),default:null},offset:{type:Number,default:8},strategy:{type:Oe(String),values:i6e,default:"absolute"},showArrow:Boolean,...wo(["ariaLabel"])}),_N=Ye({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:Oe(Function)},"onUpdate:open":{type:Oe(Function)}}),Up={type:Oe(Function)},ON=Ye({onBlur:Up,onClick:Up,onFocus:Up,onMouseDown:Up,onMouseEnter:Up,onMouseLeave:Up}),a6e=Ye({..._N,...yN,...ON,...bN,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:Oe(Object),default:null},teleported:Boolean,to:{type:Oe(String),default:"body"}}),oC=Symbol("tooltipV2"),bq=Symbol("tooltipV2Content"),BT="tooltip_v2.open",s6e=ue({name:"ElTooltipV2Root"}),l6e=ue({...s6e,props:_N,setup(t,{expose:e}){const n=t,r=F(n.defaultOpen),i=F(null),o=M({get:()=>ep(n.open)?r.value:n.open,set:y=>{var b;r.value=y,(b=n["onUpdate:open"])==null||b.call(n,y)}}),a=M(()=>kt(n.delayDuration)&&n.delayDuration>0),{start:s,stop:l}=Xh(()=>{o.value=!0},M(()=>n.delayDuration),{immediate:!1}),u=Qe("tooltip-v2"),c=bo(),d=()=>{l(),o.value=!0},f=()=>{p(a)?s():d()},h=d,m=()=>{l(),o.value=!1};return Ve(o,y=>{var b;y&&(document.dispatchEvent(new CustomEvent(BT)),h()),(b=n.onOpenChange)==null||b.call(n,y)}),Bt(()=>{document.addEventListener(BT,m)}),pr(()=>{l(),document.removeEventListener(BT,m)}),_n(oC,{contentId:c,triggerRef:i,ns:u,onClose:m,onDelayOpen:f,onOpen:h}),e({onOpen:h,onClose:m}),(y,b)=>xe(y.$slots,"default",{open:p(o)})}});var u6e=Ge(l6e,[["__file","root.vue"]]);const c6e=ue({name:"ElTooltipV2Arrow"}),d6e=ue({...c6e,props:{...yN,...r6e},setup(t){const e=t,{ns:n}=ht(oC),{arrowRef:r}=ht(bq),i=M(()=>{const{style:o,width:a,height:s}=e,l=n.namespace.value;return{[`--${l}-tooltip-v2-arrow-width`]:`${a}px`,[`--${l}-tooltip-v2-arrow-height`]:`${s}px`,[`--${l}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${l}-tooltip-v2-arrow-cover-width`]:a/2-1,...o||{}}});return(o,a)=>(R(),G("span",{ref_key:"arrowRef",ref:r,style:mt(p(i)),class:j(p(n).e("arrow"))},null,6))}});var K8=Ge(d6e,[["__file","arrow.vue"]]);const f6e=Ye({style:{type:Oe([String,Object,Array]),default:()=>({})}}),h6e=ue({name:"ElVisuallyHidden"}),p6e=ue({...h6e,props:f6e,setup(t){const e=t,n=M(()=>[e.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(r,i)=>(R(),G("span",gn(r.$attrs,{style:p(n)}),[xe(r.$slots,"default")],16))}});var g6e=Ge(p6e,[["__file","visual-hidden.vue"]]);const m6e=ue({name:"ElTooltipV2Content"}),v6e=ue({...m6e,props:{...bN,...vq},setup(t){const e=t,{triggerRef:n,contentId:r}=ht(oC),i=F(e.placement),o=F(e.strategy),a=F(null),{referenceRef:s,contentRef:l,middlewareData:u,x:c,y:d,update:f}=l2e({placement:i,strategy:o,middleware:M(()=>{const O=[bH(e.offset)];return e.showArrow&&O.push(u2e({arrowRef:a})),O})}),h=Qm().nextZIndex(),m=Qe("tooltip-v2"),g=M(()=>i.value.split("-")[0]),y=M(()=>({position:p(o),top:`${p(d)||0}px`,left:`${p(c)||0}px`,zIndex:h})),b=M(()=>{if(!e.showArrow)return{};const{arrow:O}=p(u);return{[`--${m.namespace.value}-tooltip-v2-arrow-x`]:`${O==null?void 0:O.x}px`||"",[`--${m.namespace.value}-tooltip-v2-arrow-y`]:`${O==null?void 0:O.y}px`||""}}),w=M(()=>[m.e("content"),m.is("dark",e.effect==="dark"),m.is(p(o)),e.contentClass]);return Ve(a,()=>f()),Ve(()=>e.placement,O=>i.value=O),Bt(()=>{Ve(()=>e.reference||n.value,O=>{s.value=O||void 0},{immediate:!0})}),_n(bq,{arrowRef:a}),(O,S)=>(R(),G("div",{ref_key:"contentRef",ref:l,style:mt(p(y)),"data-tooltip-v2-root":""},[O.nowrap?_e("v-if",!0):(R(),G("div",{key:0,"data-side":p(g),class:j(p(w))},[xe(O.$slots,"default",{contentStyle:p(y),contentClass:p(w)}),B(p(g6e),{id:p(r),role:"tooltip"},{default:z(()=>[O.ariaLabel?(R(),G(ct,{key:0},[qe(je(O.ariaLabel),1)],64)):xe(O.$slots,"default",{key:1})]),_:3},8,["id"]),xe(O.$slots,"arrow",{style:mt(p(b)),side:p(g)})],10,["data-side"]))],4))}});var J8=Ge(v6e,[["__file","content.vue"]]);const y6e=Ye({setRef:{type:Oe(Function),required:!0},onlyChild:Boolean});var b6e=ue({props:y6e,setup(t,{slots:e}){const n=F(),r=Bx(n,i=>{i?t.setRef(i.nextElementSibling):t.setRef(null)});return()=>{var i;const[o]=((i=e.default)==null?void 0:i.call(e))||[],a=t.onlyChild?tEe(o.children):o.children;return B(ct,{ref:r},[a])}}});const _6e=ue({name:"ElTooltipV2Trigger"}),O6e=ue({..._6e,props:{...vq,...ON},setup(t){const e=t,{onClose:n,onOpen:r,onDelayOpen:i,triggerRef:o,contentId:a}=ht(oC);let s=!1;const l=w=>{o.value=w},u=()=>{s=!1},c=fi(e.onMouseEnter,i),d=fi(e.onMouseLeave,n),f=fi(e.onMouseDown,()=>{n(),s=!0,document.addEventListener("mouseup",u,{once:!0})}),h=fi(e.onFocus,()=>{s||r()}),m=fi(e.onBlur,n),g=fi(e.onClick,w=>{w.detail===0&&n()}),y={blur:m,click:g,focus:h,mousedown:f,mouseenter:c,mouseleave:d},b=(w,O,S)=>{w&&Object.entries(O).forEach(([x,C])=>{w[S](x,C)})};return Ve(o,(w,O)=>{b(w,y,"addEventListener"),b(O,y,"removeEventListener"),w&&w.setAttribute("aria-describedby",a.value)}),pr(()=>{b(o.value,y,"removeEventListener"),document.removeEventListener("mouseup",u)}),(w,O)=>w.nowrap?(R(),we(p(b6e),{key:0,"set-ref":l,"only-child":""},{default:z(()=>[xe(w.$slots,"default")]),_:3})):(R(),G("button",gn({key:1,ref_key:"triggerRef",ref:o},w.$attrs),[xe(w.$slots,"default")],16))}});var w6e=Ge(O6e,[["__file","trigger.vue"]]);const S6e=ue({name:"ElTooltipV2"}),x6e=ue({...S6e,props:a6e,setup(t){const n=Ri(t),r=Sn(vo(n,Object.keys(yN))),i=Sn(vo(n,Object.keys(bN))),o=Sn(vo(n,Object.keys(_N))),a=Sn(vo(n,Object.keys(ON)));return(s,l)=>(R(),we(u6e,Xl(lf(o)),{default:z(({open:u})=>[B(w6e,gn(a,{nowrap:""}),{default:z(()=>[xe(s.$slots,"trigger")]),_:3},16),B(p(Um),{to:s.to,disabled:!s.teleported},{default:z(()=>[s.fullTransition?(R(),we(Qi,Xl(gn({key:0},s.transitionProps)),{default:z(()=>[s.alwaysOn||u?(R(),we(J8,Xl(gn({key:0},i)),{arrow:z(({style:c,side:d})=>[s.showArrow?(R(),we(K8,gn({key:0},r,{style:c,side:d}),null,16,["style","side"])):_e("v-if",!0)]),default:z(()=>[xe(s.$slots,"default")]),_:3},16)):_e("v-if",!0)]),_:2},1040)):(R(),G(ct,{key:1},[s.alwaysOn||u?(R(),we(J8,Xl(gn({key:0},i)),{arrow:z(({style:c,side:d})=>[s.showArrow?(R(),we(K8,gn({key:0},r,{style:c,side:d}),null,16,["style","side"])):_e("v-if",!0)]),default:z(()=>[xe(s.$slots,"default")]),_:3},16)):_e("v-if",!0)],64))]),_:2},1032,["to","disabled"])]),_:3},16))}});var C6e=Ge(x6e,[["__file","tooltip.vue"]]);const E6e=Vt(C6e),_q="left-check-change",Oq="right-check-change",lg=Ye({data:{type:Oe(Array),default:()=>[]},titles:{type:Oe(Array),default:()=>[]},buttonTexts:{type:Oe(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:Oe(Function)},leftDefaultChecked:{type:Oe(Array),default:()=>[]},rightDefaultChecked:{type:Oe(Array),default:()=>[]},renderContent:{type:Oe(Function)},modelValue:{type:Oe(Array),default:()=>[]},format:{type:Oe(Object),default:()=>({})},filterable:Boolean,props:{type:Oe(Object),default:()=>Jr({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),cP=(t,e)=>[t,e].every(ut)||ut(t)&&Dr(e),T6e={[Lr]:(t,e,n)=>[t,n].every(ut)&&["left","right"].includes(e),[Zt]:t=>ut(t),[_q]:cP,[Oq]:cP},dP="checked-change",k6e=Ye({data:lg.data,optionRender:{type:Oe(Function)},placeholder:String,title:String,filterable:Boolean,format:lg.format,filterMethod:lg.filterMethod,defaultChecked:lg.leftDefaultChecked,props:lg.props}),P6e={[dP]:cP},Db=t=>{const e={label:"label",key:"key",disabled:"disabled"};return M(()=>({...e,...t.props}))},A6e=(t,e,n)=>{const r=Db(t),i=M(()=>t.data.filter(c=>$t(t.filterMethod)?t.filterMethod(e.query,c):String(c[r.value.label]||c[r.value.key]).toLowerCase().includes(e.query.toLowerCase()))),o=M(()=>i.value.filter(c=>!c[r.value.disabled])),a=M(()=>{const c=e.checked.length,d=t.data.length,{noChecked:f,hasChecked:h}=t.format;return f&&h?c>0?h.replace(/\${checked}/g,c.toString()).replace(/\${total}/g,d.toString()):f.replace(/\${total}/g,d.toString()):`${c}/${d}`}),s=M(()=>{const c=e.checked.length;return c>0&&c<o.value.length}),l=()=>{const c=o.value.map(d=>d[r.value.key]);e.allChecked=c.length>0&&c.every(d=>e.checked.includes(d))},u=c=>{e.checked=c?o.value.map(d=>d[r.value.key]):[]};return Ve(()=>e.checked,(c,d)=>{if(l(),e.checkChangeByUser){const f=c.concat(d).filter(h=>!c.includes(h)||!d.includes(h));n(dP,c,f)}else n(dP,c),e.checkChangeByUser=!0}),Ve(o,()=>{l()}),Ve(()=>t.data,()=>{const c=[],d=i.value.map(f=>f[r.value.key]);e.checked.forEach(f=>{d.includes(f)&&c.push(f)}),e.checkChangeByUser=!1,e.checked=c}),Ve(()=>t.defaultChecked,(c,d)=>{if(d&&c.length===d.length&&c.every(m=>d.includes(m)))return;const f=[],h=o.value.map(m=>m[r.value.key]);c.forEach(m=>{h.includes(m)&&f.push(m)}),e.checkChangeByUser=!1,e.checked=f},{immediate:!0}),{filteredData:i,checkableData:o,checkedSummary:a,isIndeterminate:s,updateAllChecked:l,handleAllCheckedChange:u}},M6e=(t,e)=>({onSourceCheckedChange:(i,o)=>{t.leftChecked=i,o&&e(_q,i,o)},onTargetCheckedChange:(i,o)=>{t.rightChecked=i,o&&e(Oq,i,o)}}),R6e=t=>{const e=Db(t),n=M(()=>t.data.reduce((o,a)=>(o[a[e.value.key]]=a)&&o,{})),r=M(()=>t.data.filter(o=>!t.modelValue.includes(o[e.value.key]))),i=M(()=>t.targetOrder==="original"?t.data.filter(o=>t.modelValue.includes(o[e.value.key])):t.modelValue.reduce((o,a)=>{const s=n.value[a];return s&&o.push(s),o},[]));return{sourceData:r,targetData:i}},$6e=(t,e,n)=>{const r=Db(t),i=(s,l,u)=>{n(Zt,s),n(Lr,s,l,u)};return{addToLeft:()=>{const s=t.modelValue.slice();e.rightChecked.forEach(l=>{const u=s.indexOf(l);u>-1&&s.splice(u,1)}),i(s,"left",e.rightChecked)},addToRight:()=>{let s=t.modelValue.slice();const l=t.data.filter(u=>{const c=u[r.value.key];return e.leftChecked.includes(c)&&!t.modelValue.includes(c)}).map(u=>u[r.value.key]);s=t.targetOrder==="unshift"?l.concat(s):s.concat(l),t.targetOrder==="original"&&(s=t.data.filter(u=>s.includes(u[r.value.key])).map(u=>u[r.value.key])),i(s,"right",e.leftChecked)}}},N6e=ue({name:"ElTransferPanel"}),D6e=ue({...N6e,props:k6e,emits:P6e,setup(t,{expose:e,emit:n}){const r=t,i=Ji(),o=({option:O})=>O,{t:a}=kn(),s=Qe("transfer"),l=Sn({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),u=Db(r),{filteredData:c,checkedSummary:d,isIndeterminate:f,handleAllCheckedChange:h}=A6e(r,l,n),m=M(()=>!xs(l.query)&&xs(c.value)),g=M(()=>!xs(i.default()[0].children)),{checked:y,allChecked:b,query:w}=Ri(l);return e({query:w}),(O,S)=>(R(),G("div",{class:j(p(s).b("panel"))},[J("p",{class:j(p(s).be("panel","header"))},[B(p(Is),{modelValue:p(b),"onUpdate:modelValue":x=>kr(b)?b.value=x:null,indeterminate:p(f),"validate-event":!1,onChange:p(h)},{default:z(()=>[qe(je(O.title)+" ",1),J("span",null,je(p(d)),1)]),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),J("div",{class:j([p(s).be("panel","body"),p(s).is("with-footer",p(g))])},[O.filterable?(R(),we(p(hi),{key:0,modelValue:p(w),"onUpdate:modelValue":x=>kr(w)?w.value=x:null,class:j(p(s).be("panel","filter")),size:"default",placeholder:O.placeholder,"prefix-icon":p(c$),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):_e("v-if",!0),Ht(B(p(xW),{modelValue:p(y),"onUpdate:modelValue":x=>kr(y)?y.value=x:null,"validate-event":!1,class:j([p(s).is("filterable",O.filterable),p(s).be("panel","list")])},{default:z(()=>[(R(!0),G(ct,null,Wt(p(c),x=>(R(),we(p(Is),{key:x[p(u).key],class:j(p(s).be("panel","item")),value:x[p(u).key],disabled:x[p(u).disabled],"validate-event":!1},{default:z(()=>{var C;return[B(o,{option:(C=O.optionRender)==null?void 0:C.call(O,x)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[zn,!p(m)&&!p(xs)(O.data)]]),Ht(J("p",{class:j(p(s).be("panel","empty"))},je(p(m)?p(a)("el.transfer.noMatch"):p(a)("el.transfer.noData")),3),[[zn,p(m)||p(xs)(O.data)]])],2),p(g)?(R(),G("p",{key:0,class:j(p(s).be("panel","footer"))},[xe(O.$slots,"default")],2)):_e("v-if",!0)],2))}});var eB=Ge(D6e,[["__file","transfer-panel.vue"]]);const L6e=ue({name:"ElTransfer"}),I6e=ue({...L6e,props:lg,emits:T6e,setup(t,{expose:e,emit:n}){const r=t,i=Ji(),{t:o}=kn(),a=Qe("transfer"),{formItem:s}=ua(),l=Sn({leftChecked:[],rightChecked:[]}),u=Db(r),{sourceData:c,targetData:d}=R6e(r),{onSourceCheckedChange:f,onTargetCheckedChange:h}=M6e(l,n),{addToLeft:m,addToRight:g}=$6e(r,l,n),y=F(),b=F(),w=T=>{switch(T){case"left":y.value.query="";break;case"right":b.value.query="";break}},O=M(()=>r.buttonTexts.length===2),S=M(()=>r.titles[0]||o("el.transfer.titles.0")),x=M(()=>r.titles[1]||o("el.transfer.titles.1")),C=M(()=>r.filterPlaceholder||o("el.transfer.filterPlaceholder"));Ve(()=>r.modelValue,()=>{var T;r.validateEvent&&((T=s==null?void 0:s.validate)==null||T.call(s,"change").catch(P=>void 0))});const E=M(()=>T=>{var P;if(r.renderContent)return r.renderContent(Et,T);const A=(((P=i.default)==null?void 0:P.call(i,{option:T}))||[]).filter(D=>D.type!==oa);return A.length?A:Et("span",T[u.value.label]||T[u.value.key])});return e({clearQuery:w,leftPanel:y,rightPanel:b}),(T,P)=>(R(),G("div",{class:j(p(a).b())},[B(eB,{ref_key:"leftPanel",ref:y,data:p(c),"option-render":p(E),placeholder:p(C),title:p(S),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,"default-checked":T.leftDefaultChecked,props:r.props,onCheckedChange:p(f)},{default:z(()=>[xe(T.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),J("div",{class:j(p(a).e("buttons"))},[B(p(lr),{type:"primary",class:j([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p(xs)(l.rightChecked),onClick:p(m)},{default:z(()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1}),p(ai)(T.buttonTexts[0])?_e("v-if",!0):(R(),G("span",{key:0},je(T.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),B(p(lr),{type:"primary",class:j([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p(xs)(l.leftChecked),onClick:p(g)},{default:z(()=>[p(ai)(T.buttonTexts[1])?_e("v-if",!0):(R(),G("span",{key:0},je(T.buttonTexts[1]),1)),B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),B(eB,{ref_key:"rightPanel",ref:b,data:p(d),"option-render":p(E),placeholder:p(C),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,title:p(x),"default-checked":T.rightDefaultChecked,props:r.props,onCheckedChange:p(h)},{default:z(()=>[xe(T.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var B6e=Ge(I6e,[["__file","transfer.vue"]]);const F6e=Vt(B6e),$g="$treeNodeId",tB=function(t,e){!e||e[$g]||Object.defineProperty(e,$g,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},wN=function(t,e){return t?e[t]:e[$g]},fP=(t,e,n)=>{const r=t.value.currentNode;n();const i=t.value.currentNode;r!==i&&e("current-change",i?i.data:null,i)},hP=t=>{let e=!0,n=!0,r=!0;for(let i=0,o=t.length;i<o;i++){const a=t[i];(a.checked!==!0||a.indeterminate)&&(e=!1,a.disabled||(r=!1)),(a.checked!==!1||a.indeterminate)&&(n=!1)}return{all:e,none:n,allWithoutDisable:r,half:!e&&!n}},ty=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:n,half:r}=hP(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):r?(t.checked=!1,t.indeterminate=!0):n&&(t.checked=!1,t.indeterminate=!1);const i=t.parent;!i||i.level===0||t.store.checkStrictly||ty(i)},fO=function(t,e){const n=t.store.props,r=t.data||{},i=n[e];if(typeof i=="function")return i(r,t);if(typeof i=="string")return r[i];if(typeof i=="undefined"){const o=r[e];return o===void 0?"":o}};let V6e=0;class Qh{constructor(e){this.id=V6e++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in e)Dn(e,n)&&(this[n]=e[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const n=e.props;if(n&&typeof n.isLeaf!="undefined"){const o=fO(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Array.isArray(this.data)||tB(this,this.data),!this.data)return;const r=e.defaultExpandedKeys,i=e.key;i&&r&&r.includes(this.key)&&this.expand(null,e.autoExpandParent),i&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Array.isArray(e)||tB(this,e),this.data=e,this.childNodes=[];let n;this.level===0&&Array.isArray(this.data)?n=this.data:n=fO(this,"children")||[];for(let r=0,i=n.length;r<i;r++)this.insertChild({data:n[r]})}get label(){return fO(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return fO(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const n=e.childNodes.indexOf(this);if(n>-1)return e.childNodes[n+1]}return null}get previousSibling(){const e=this.parent;if(e){const n=e.childNodes.indexOf(this);if(n>-1)return n>0?e.childNodes[n-1]:null}return null}contains(e,n=!0){return(this.childNodes||[]).some(r=>r===e||n&&r.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,n,r){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof Qh)){if(!r){const i=this.getChildren(!0);i.includes(e.data)||(typeof n=="undefined"||n<0?i.push(e.data):i.splice(n,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=Sn(new Qh(e)),e instanceof Qh&&e.initialize()}e.level=this.level+1,typeof n=="undefined"||n<0?this.childNodes.push(e):this.childNodes.splice(n,0,e),this.updateLeafState()}insertBefore(e,n){let r;n&&(r=this.childNodes.indexOf(n)),this.insertChild(e,r)}insertAfter(e,n){let r;n&&(r=this.childNodes.indexOf(n),r!==-1&&(r+=1)),this.insertChild(e,r)}removeChild(e){const n=this.getChildren()||[],r=n.indexOf(e.data);r>-1&&n.splice(r,1);const i=this.childNodes.indexOf(e);i>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(e){let n=null;for(let r=0;r<this.childNodes.length;r++)if(this.childNodes[r].data===e){n=this.childNodes[r];break}n&&this.removeChild(n)}expand(e,n){const r=()=>{if(n){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||ty(this),r())}):r()}doCreateChildren(e,n={}){e.forEach(r=>{this.insertChild(Object.assign({data:r},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser!="undefined"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,n,r,i){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=hP(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,e=!1);const l=()=>{if(n){const u=this.childNodes;for(let f=0,h=u.length;f<h;f++){const m=u[f];i=i||e!==!1;const g=m.disabled?m.checked:i;m.setChecked(g,n,!0,i)}const{half:c,all:d}=hP(u);d||(this.checked=d,this.indeterminate=c)}};if(this.shouldLoadData()){this.loadData(()=>{l(),ty(this)},{checked:e!==!1});return}else l()}const o=this.parent;!o||o.level===0||r||ty(o)}getChildren(e=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const r=this.store.props;let i="children";return r&&(i=r.children||"children"),n[i]===void 0&&(n[i]=null),e&&!n[i]&&(n[i]=[]),n[i]}updateChildren(){const e=this.getChildren()||[],n=this.childNodes.map(o=>o.data),r={},i=[];e.forEach((o,a)=>{const s=o[$g];!!s&&n.findIndex(u=>u[$g]===s)>=0?r[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||n.forEach(o=>{r[o[$g]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(e,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const r=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,o)},i=()=>{this.loading=!1};this.store.load(this,r,i)}else e&&e.call(this)}eachNode(e){const n=[this];for(;n.length;){const r=n.shift();n.unshift(...r.childNodes),e(r)}}reInitChecked(){this.store.checkStrictly||ty(this)}}class j6e{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const n in e)Dn(e,n)&&(this[n]=e[n]);this.nodesMap={}}initialize(){if(this.root=new Qh({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){const n=this.filterNodeMethod,r=this.lazy,i=function(o){const a=o.root?o.root.childNodes:o.childNodes;if(a.forEach(s=>{s.visible=n.call(s,e,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(l=>l.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}!e||o.visible&&!o.isLeaf&&(!r||o.loaded)&&o.expand()};i(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof Qh)return e;const n=sn(e)?wN(this.key,e):e;return this.nodesMap[n]||null}insertBefore(e,n){const r=this.getNode(n);r.parent.insertBefore({data:e},r)}insertAfter(e,n){const r=this.getNode(n);r.parent.insertAfter({data:e},r)}remove(e){const n=this.getNode(e);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(e,n){const r=ep(n)?this.root:this.getNode(n);r&&r.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],n=this.nodesMap;e.forEach(r=>{const i=n[r];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const n=this.key;!e||!e.data||(n?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,n=!1){const r=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||n&&s.indeterminate)&&(!e||e&&s.isLeaf)&&r.push(s.data),i(s)})};return i(this),r}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const e=[],n=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(o=>{o.indeterminate&&e.push(o.data),n(o)})};return n(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],n=this.nodesMap;for(const r in n)Dn(n,r)&&e.push(n[r]);return e}updateChildren(e,n){const r=this.nodesMap[e];if(!r)return;const i=r.childNodes;for(let o=i.length-1;o>=0;o--){const a=i[o];this.remove(a.data)}for(let o=0,a=n.length;o<a;o++){const s=n[o];this.append(s,r.data)}}_setCheckedKeys(e,n=!1,r){const i=this._getAllNodes().sort((l,u)=>l.level-u.level),o=Object.create(null),a=Object.keys(r);i.forEach(l=>l.setChecked(!1,!1));const s=l=>{l.childNodes.forEach(u=>{var c;o[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let l=0,u=i.length;l<u;l++){const c=i[l],d=c.data[e].toString();if(!a.includes(d)){c.checked&&!o[d]&&c.setChecked(!1,!1);continue}if(c.childNodes.length&&s(c),c.isLeaf||this.checkStrictly){c.setChecked(!0,!1);continue}if(c.setChecked(!0,!0),n){c.setChecked(!1,!1);const h=function(m){m.childNodes.forEach(y=>{y.isLeaf||y.setChecked(!1,!1),h(y)})};h(c)}}}setCheckedNodes(e,n=!1){const r=this.key,i={};e.forEach(o=>{i[(o||{})[r]]=!0}),this._setCheckedKeys(r,n,i)}setCheckedKeys(e,n=!1){this.defaultCheckedKeys=e;const r=this.key,i={};e.forEach(o=>{i[o]=!0}),this._setCheckedKeys(r,n,i)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(n=>{const r=this.getNode(n);r&&r.expand(null,this.autoExpandParent)})}setChecked(e,n,r){const i=this.getNode(e);i&&i.setChecked(!!n,r)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,n=!0){const r=e[this.key],i=this.nodesMap[r];this.setCurrentNode(i),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,n=!0){if(e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const r=this.getNode(e);r&&(this.setCurrentNode(r),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const z6e=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Qe("tree"),n=ht("NodeInstance"),r=ht("RootTree");return()=>{const i=t.node,{data:o,store:a}=i;return t.renderContent?t.renderContent(Et,{_self:n,node:i,data:o,store:a}):xe(r.ctx.slots,"default",{node:i,data:o},()=>[Et("span",{class:e.be("node","label")},[i.label])])}}});var Q6e=Ge(z6e,[["__file","tree-node-content.vue"]]);function wq(t){const e=ht("TreeNodeMap",null),n={treeNodeExpand:r=>{t.node!==r&&t.node.collapse()},children:[]};return e&&e.children.push(n),_n("TreeNodeMap",n),{broadcastExpanded:r=>{if(!!t.accordion)for(const i of n.children)i.treeNodeExpand(r)}}}const Sq=Symbol("dragEvents");function H6e({props:t,ctx:e,el$:n,dropIndicator$:r,store:i}){const o=Qe("tree"),a=F({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return _n(Sq,{treeNodeDragStart:({event:c,treeNode:d})=>{if(typeof t.allowDrag=="function"&&!t.allowDrag(d.node))return c.preventDefault(),!1;c.dataTransfer.effectAllowed="move";try{c.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=d,e.emit("node-drag-start",d.node,c)},treeNodeDragOver:({event:c,treeNode:d})=>{const f=d,h=a.value.dropNode;h&&h.node.id!==f.node.id&&aa(h.$el,o.is("drop-inner"));const m=a.value.draggingNode;if(!m||!f)return;let g=!0,y=!0,b=!0,w=!0;typeof t.allowDrop=="function"&&(g=t.allowDrop(m.node,f.node,"prev"),w=y=t.allowDrop(m.node,f.node,"inner"),b=t.allowDrop(m.node,f.node,"next")),c.dataTransfer.dropEffect=y||g||b?"move":"none",(g||y||b)&&(h==null?void 0:h.node.id)!==f.node.id&&(h&&e.emit("node-drag-leave",m.node,h.node,c),e.emit("node-drag-enter",m.node,f.node,c)),g||y||b?a.value.dropNode=f:a.value.dropNode=null,f.node.nextSibling===m.node&&(b=!1),f.node.previousSibling===m.node&&(g=!1),f.node.contains(m.node,!1)&&(y=!1),(m.node===f.node||m.node.contains(f.node))&&(g=!1,y=!1,b=!1);const O=f.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),S=n.value.getBoundingClientRect();let x;const C=g?y?.25:b?.45:1:-1,E=b?y?.75:g?.55:0:1;let T=-9999;const P=c.clientY-O.top;P<O.height*C?x="before":P>O.height*E?x="after":y?x="inner":x="none";const A=f.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),D=r.value;x==="before"?T=A.top-S.top:x==="after"&&(T=A.bottom-S.top),D.style.top=`${T}px`,D.style.left=`${A.right-S.left}px`,x==="inner"?rl(f.$el,o.is("drop-inner")):aa(f.$el,o.is("drop-inner")),a.value.showDropIndicator=x==="before"||x==="after",a.value.allowDrop=a.value.showDropIndicator||w,a.value.dropType=x,e.emit("node-drag-over",m.node,f.node,c)},treeNodeDragEnd:c=>{const{draggingNode:d,dropType:f,dropNode:h}=a.value;if(c.preventDefault(),c.dataTransfer&&(c.dataTransfer.dropEffect="move"),d&&h){const m={data:d.node.data};f!=="none"&&d.node.remove(),f==="before"?h.node.parent.insertBefore(m,h.node):f==="after"?h.node.parent.insertAfter(m,h.node):f==="inner"&&h.node.insertChild(m),f!=="none"&&(i.value.registerNode(m),i.value.key&&d.node.eachNode(g=>{var y;(y=i.value.nodesMap[g.data[i.value.key]])==null||y.setChecked(g.checked,!i.value.checkStrictly)})),aa(h.$el,o.is("drop-inner")),e.emit("node-drag-end",d.node,h.node,f,c),f!=="none"&&e.emit("node-drop",d.node,h.node,f,c)}d&&!h&&e.emit("node-drag-end",d.node,null,f,c),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const W6e=ue({name:"ElTreeNode",components:{ElCollapseTransition:Xx,ElCheckbox:Is,NodeContent:Q6e,ElIcon:gt,Loading:Ku},props:{node:{type:Qh,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const n=Qe("tree"),{broadcastExpanded:r}=wq(t),i=ht("RootTree"),o=F(!1),a=F(!1),s=F(null),l=F(null),u=F(null),c=ht(Sq),d=en();_n("NodeInstance",d),t.node.expanded&&(o.value=!0,a.value=!0);const f=i.props.props.children||"children";Ve(()=>{const P=t.node.data[f];return P&&[...P]},()=>{t.node.updateChildren()}),Ve(()=>t.node.indeterminate,P=>{g(t.node.checked,P)}),Ve(()=>t.node.checked,P=>{g(P,t.node.indeterminate)}),Ve(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),Ve(()=>t.node.expanded,P=>{Ot(()=>o.value=P),P&&(a.value=!0)});const h=P=>wN(i.props.nodeKey,P.data),m=P=>{const A=t.props.class;if(!A)return{};let D;if($t(A)){const{data:N}=P;D=A(N,P)}else D=A;return At(D)?{[D]:!0}:D},g=(P,A)=>{(s.value!==P||l.value!==A)&&i.ctx.emit("check-change",t.node.data,P,A),s.value=P,l.value=A},y=P=>{fP(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(t.node)),i.currentNode.value=t.node,i.props.expandOnClickNode&&w(),i.props.checkOnClickNode&&!t.node.disabled&&O(null,{target:{checked:!t.node.checked}}),i.ctx.emit("node-click",t.node.data,t.node,d,P)},b=P=>{i.instance.vnode.props.onNodeContextmenu&&(P.stopPropagation(),P.preventDefault()),i.ctx.emit("node-contextmenu",P,t.node.data,t.node,d)},w=()=>{t.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",t.node.data,t.node,d),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,d)}))},O=(P,A)=>{t.node.setChecked(A.target.checked,!i.props.checkStrictly),Ot(()=>{const D=i.store.value;i.ctx.emit("check",t.node.data,{checkedNodes:D.getCheckedNodes(),checkedKeys:D.getCheckedKeys(),halfCheckedNodes:D.getHalfCheckedNodes(),halfCheckedKeys:D.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:l,getNodeKey:h,getNodeClass:m,handleSelectChange:g,handleClick:y,handleContextMenu:b,handleExpandIconClick:w,handleCheckChange:O,handleChildNodeExpand:(P,A,D)=>{r(A),i.ctx.emit("node-expand",P,A,D)},handleDragStart:P=>{!i.props.draggable||c.treeNodeDragStart({event:P,treeNode:t})},handleDragOver:P=>{P.preventDefault(),i.props.draggable&&c.treeNodeDragOver({event:P,treeNode:{$el:u.value,node:t.node}})},handleDrop:P=>{P.preventDefault()},handleDragEnd:P=>{!i.props.draggable||c.treeNodeDragEnd(P)},CaretRight:BQ}}});function U6e(t,e,n,r,i,o){const a=an("el-icon"),s=an("el-checkbox"),l=an("loading"),u=an("node-content"),c=an("el-tree-node"),d=an("el-collapse-transition");return Ht((R(),G("div",{ref:"node$",class:j([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:Pt(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:Pt(t.handleDragStart,["stop"]),onDragover:Pt(t.handleDragOver,["stop"]),onDragend:Pt(t.handleDragEnd,["stop"]),onDrop:Pt(t.handleDrop,["stop"])},[J("div",{class:j(t.ns.be("node","content")),style:mt({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(R(),we(a,{key:0,class:j([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:Pt(t.handleExpandIconClick,["stop"])},{default:z(()=>[(R(),we(un(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):_e("v-if",!0),t.showCheckbox?(R(),we(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:Pt(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):_e("v-if",!0),t.node.loading?(R(),we(a,{key:2,class:j([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:z(()=>[B(l)]),_:1},8,["class"])):_e("v-if",!0),B(u,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),B(d,null,{default:z(()=>[!t.renderAfterExpand||t.childNodeRendered?Ht((R(),G("div",{key:0,class:j(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(R(!0),G(ct,null,Wt(t.node.childNodes,f=>(R(),we(c,{key:t.getNodeKey(f),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:f,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[zn,t.expanded]]):_e("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[zn,t.node.visible]])}var q6e=Ge(W6e,[["render",U6e],["__file","tree-node.vue"]]);function Y6e({el$:t},e){const n=Qe("tree"),r=Tr([]),i=Tr([]);Bt(()=>{a()}),Jc(()=>{r.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),Ve(i,s=>{s.forEach(l=>{l.setAttribute("tabindex","-1")})}),sr(t,"keydown",s=>{const l=s.target;if(!l.className.includes(n.b("node")))return;const u=s.code;r.value=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));const c=r.value.indexOf(l);let d;if([St.up,St.down].includes(u)){if(s.preventDefault(),u===St.up){d=c===-1?0:c!==0?c-1:r.value.length-1;const h=d;for(;!e.value.getNode(r.value[d].dataset.key).canFocus;){if(d--,d===h){d=-1;break}d<0&&(d=r.value.length-1)}}else{d=c===-1?0:c<r.value.length-1?c+1:0;const h=d;for(;!e.value.getNode(r.value[d].dataset.key).canFocus;){if(d++,d===h){d=-1;break}d>=r.value.length&&(d=0)}}d!==-1&&r.value[d].focus()}[St.left,St.right].includes(u)&&(s.preventDefault(),l.click());const f=l.querySelector('[type="checkbox"]');[St.enter,St.space].includes(u)&&f&&(s.preventDefault(),f.click())});const a=()=>{var s;r.value=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const l=t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(l.length){l[0].setAttribute("tabindex","0");return}(s=r.value[0])==null||s.setAttribute("tabindex","0")}}const X6e=ue({name:"ElTree",components:{ElTreeNode:q6e},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:fr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:n}=kn(),r=Qe("tree"),i=ht(Ym,null),o=F(new j6e({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));o.value.initialize();const a=F(o.value.root),s=F(null),l=F(null),u=F(null),{broadcastExpanded:c}=wq(t),{dragState:d}=H6e({props:t,ctx:e,el$:l,dropIndicator$:u,store:o});Y6e({el$:l},o);const f=M(()=>{const{childNodes:Q}=a.value,V=i?i.hasFilteredOptions!==0:!1;return(!Q||Q.length===0||Q.every(({visible:q})=>!q))&&!V});Ve(()=>t.currentNodeKey,Q=>{o.value.setCurrentNodeKey(Q)}),Ve(()=>t.defaultCheckedKeys,Q=>{o.value.setDefaultCheckedKey(Q)}),Ve(()=>t.defaultExpandedKeys,Q=>{o.value.setDefaultExpandedKeys(Q)}),Ve(()=>t.data,Q=>{o.value.setData(Q)},{deep:!0}),Ve(()=>t.checkStrictly,Q=>{o.value.checkStrictly=Q});const h=Q=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(Q)},m=Q=>wN(t.nodeKey,Q.data),g=Q=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const V=o.value.getNode(Q);if(!V)return[];const q=[V.data];let K=V.parent;for(;K&&K!==a.value;)q.push(K.data),K=K.parent;return q.reverse()},y=(Q,V)=>o.value.getCheckedNodes(Q,V),b=Q=>o.value.getCheckedKeys(Q),w=()=>{const Q=o.value.getCurrentNode();return Q?Q.data:null},O=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Q=w();return Q?Q[t.nodeKey]:null},S=(Q,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");o.value.setCheckedNodes(Q,V)},x=(Q,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");o.value.setCheckedKeys(Q,V)},C=(Q,V,q)=>{o.value.setChecked(Q,V,q)},E=()=>o.value.getHalfCheckedNodes(),T=()=>o.value.getHalfCheckedKeys(),P=(Q,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");fP(o,e.emit,()=>{c(Q),o.value.setUserCurrentNode(Q,V)})},A=(Q,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");fP(o,e.emit,()=>{c(),o.value.setCurrentNodeKey(Q,V)})},D=Q=>o.value.getNode(Q),N=Q=>{o.value.remove(Q)},$=(Q,V)=>{o.value.append(Q,V)},W=(Q,V)=>{o.value.insertBefore(Q,V)},L=(Q,V)=>{o.value.insertAfter(Q,V)},I=(Q,V,q)=>{c(V),e.emit("node-expand",Q,V,q)},U=(Q,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");o.value.updateChildren(Q,V)};return _n("RootTree",{ctx:e,props:t,store:o,root:a,currentNode:s,instance:en()}),_n(tc,void 0),{ns:r,store:o,root:a,currentNode:s,dragState:d,el$:l,dropIndicator$:u,isEmpty:f,filter:h,getNodeKey:m,getNodePath:g,getCheckedNodes:y,getCheckedKeys:b,getCurrentNode:w,getCurrentKey:O,setCheckedNodes:S,setCheckedKeys:x,setChecked:C,getHalfCheckedNodes:E,getHalfCheckedKeys:T,setCurrentNode:P,setCurrentKey:A,t:n,getNode:D,remove:N,append:$,insertBefore:W,insertAfter:L,handleNodeExpand:I,updateKeyChildren:U}}});function Z6e(t,e,n,r,i,o){const a=an("el-tree-node");return R(),G("div",{ref:"el$",class:j([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(R(!0),G(ct,null,Wt(t.root.childNodes,s=>(R(),we(a,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(R(),G("div",{key:0,class:j(t.ns.e("empty-block"))},[xe(t.$slots,"empty",{},()=>{var s;return[J("span",{class:j(t.ns.e("empty-text"))},je((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):_e("v-if",!0),Ht(J("div",{ref:"dropIndicator$",class:j(t.ns.e("drop-indicator"))},null,2),[[zn,t.dragState.showDropIndicator]])],2)}var G6e=Ge(X6e,[["render",Z6e],["__file","tree.vue"]]);const T0=Vt(G6e),K6e=(t,{attrs:e,emit:n},{select:r,tree:i,key:o})=>{const a=Qe("tree-select");return Ve(()=>t.data,()=>{t.filterable&&Ot(()=>{var l,u;(u=i.value)==null||u.filter((l=r.value)==null?void 0:l.states.inputValue)})},{flush:"post"}),{...vo(Ri(t),Object.keys(Ol.props)),...e,"onUpdate:modelValue":l=>n(Zt,l),valueKey:o,popperClass:M(()=>{const l=[a.e("popper")];return t.popperClass&&l.push(t.popperClass),l.join(" ")}),filterMethod:(l="")=>{var u;t.filterMethod?t.filterMethod(l):t.remoteMethod?t.remoteMethod(l):(u=i.value)==null||u.filter(l)}}},J6e=ue({extends:Yc,setup(t,e){const n=Yc.setup(t,e);delete n.selectOptionClick;const r=en().proxy;return Ot(()=>{n.select.states.cachedOptions.get(r.value)||n.select.onOptionCreate(r)}),Ve(()=>e.attrs.visible,i=>{n.states.visible=i},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function pP(t){return t||t===0}function SN(t){return Array.isArray(t)&&t.length}function qp(t){return Array.isArray(t)?t:pP(t)?[t]:[]}function A1(t,e,n,r,i){for(let o=0;o<t.length;o++){const a=t[o];if(e(a,o,t,i))return r?r(a,o,t,i):a;{const s=n(a);if(SN(s)){const l=A1(s,e,n,r,a);if(l)return l}}}}function M1(t,e,n,r){for(let i=0;i<t.length;i++){const o=t[i];e(o,i,t,r);const a=n(o);SN(a)&&M1(a,e,n,o)}}const eFe=(t,{attrs:e,slots:n,emit:r},{select:i,tree:o,key:a})=>{Ve(()=>t.modelValue,()=>{t.showCheckbox&&Ot(()=>{const f=o.value;f&&!so(f.getCheckedKeys(),qp(t.modelValue))&&f.setCheckedKeys(qp(t.modelValue))})},{immediate:!0,deep:!0});const s=M(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...t.props})),l=(f,h)=>{var m;const g=s.value[f];return $t(g)?g(h,(m=o.value)==null?void 0:m.getNode(l("value",h))):h[g]},u=qp(t.modelValue).map(f=>A1(t.data||[],h=>l("value",h)===f,h=>l("children",h),(h,m,g,y)=>y&&l("value",y))).filter(f=>pP(f)),c=M(()=>{if(!t.renderAfterExpand&&!t.lazy)return[];const f=[];return M1(t.data.concat(t.cacheData),h=>{const m=l("value",h);f.push({value:m,currentLabel:l("label",h),isDisabled:l("disabled",h)})},h=>l("children",h)),f}),d=()=>{var f;return(f=o.value)==null?void 0:f.getCheckedKeys().filter(h=>{var m;const g=(m=o.value)==null?void 0:m.getNode(h);return!Dr(g)&&xs(g.childNodes)})};return{...vo(Ri(t),Object.keys(T0.props)),...e,nodeKey:a,expandOnClickNode:M(()=>!t.checkStrictly&&t.expandOnClickNode),defaultExpandedKeys:M(()=>t.defaultExpandedKeys?t.defaultExpandedKeys.concat(u):u),renderContent:(f,{node:h,data:m,store:g})=>f(J6e,{value:l("value",m),label:l("label",m),disabled:l("disabled",m),visible:h.visible},t.renderContent?()=>t.renderContent(f,{node:h,data:m,store:g}):n.default?()=>n.default({node:h,data:m,store:g}):void 0),filterNodeMethod:(f,h,m)=>t.filterNodeMethod?t.filterNodeMethod(f,h,m):f?new RegExp(n$(f),"i").test(l("label",h)||""):!0,onNodeClick:(f,h,m)=>{var g,y,b,w;if((g=e.onNodeClick)==null||g.call(e,f,h,m),!(t.showCheckbox&&t.checkOnClickNode)){if(!t.showCheckbox&&(t.checkStrictly||h.isLeaf)){if(!l("disabled",f)){const O=(y=i.value)==null?void 0:y.states.options.get(l("value",f));(b=i.value)==null||b.handleOptionSelect(O)}}else t.expandOnClickNode&&m.proxy.handleExpandIconClick();(w=i.value)==null||w.focus()}},onCheck:(f,h)=>{var m;if(!t.showCheckbox)return;const g=l("value",f),y={};M1([o.value.store.root],S=>y[S.key]=S,S=>S.childNodes);const b=h.checkedKeys,w=t.multiple?qp(t.modelValue).filter(S=>!(S in y)&&!b.includes(S)):[],O=w.concat(b);if(t.checkStrictly)r(Zt,t.multiple?O:O.includes(g)?g:void 0);else if(t.multiple){const S=d();r(Zt,w.concat(S))}else{const S=A1([f],E=>!SN(l("children",E))&&!l("disabled",E),E=>l("children",E)),x=S?l("value",S):void 0,C=pP(t.modelValue)&&!!A1([f],E=>l("value",E)===t.modelValue,E=>l("children",E));r(Zt,x===t.modelValue||C?void 0:x)}Ot(()=>{var S;const x=qp(t.modelValue);o.value.setCheckedKeys(x),(S=e.onCheck)==null||S.call(e,f,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(m=i.value)==null||m.focus()},onNodeExpand:(f,h,m)=>{var g;(g=e.onNodeExpand)==null||g.call(e,f,h,m),Ot(()=>{if(!t.checkStrictly&&t.lazy&&t.multiple&&h.checked){const y={},b=o.value.getCheckedKeys();M1([o.value.store.root],S=>y[S.key]=S,S=>S.childNodes);const w=qp(t.modelValue).filter(S=>!(S in y)&&!b.includes(S)),O=d();r(Zt,w.concat(O))}})},cacheOptions:c}};var tFe=ue({props:{data:{type:Array,default:()=>[]}},setup(t){const e=ht(Ym);return Ve(()=>t.data,()=>{var n;t.data.forEach(i=>{e.states.cachedOptions.has(i.value)||e.states.cachedOptions.set(i.value,i)});const r=((n=e.selectRef)==null?void 0:n.querySelectorAll("input"))||[];Tn&&!Array.from(r).includes(document.activeElement)&&e.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const nFe=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...Ol.props,...T0.props,cacheData:{type:Array,default:()=>[]}},setup(t,e){const{slots:n,expose:r}=e,i=F(),o=F(),a=M(()=>t.nodeKey||t.valueKey||"value"),s=K6e(t,e,{select:i,tree:o,key:a}),{cacheOptions:l,...u}=eFe(t,e,{select:i,tree:o,key:a}),c=Sn({});return r(c),Bt(()=>{Object.assign(c,{...vo(o.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...vo(i.value,["focus","blur"])})}),()=>Et(Ol,Sn({...s,ref:d=>i.value=d}),{...n,default:()=>[Et(tFe,{data:l.value}),Et(T0,Sn({...u,ref:d=>o.value=d}))]})}});var rFe=Ge(nFe,[["__file","tree-select.vue"]]);const iFe=Vt(rFe),xN=Symbol(),oFe={key:-1,level:-1,data:{}};var ny=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t))(ny||{}),gP=(t=>(t.ADD="add",t.DELETE="delete",t))(gP||{});const xq={type:Number,default:26},aFe=Ye({data:{type:Oe(Array),default:()=>Jr([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:Oe(Object),default:()=>Jr({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:Oe(Array),default:()=>Jr([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:Oe(Array),default:()=>Jr([])},indent:{type:Number,default:16},itemSize:xq,icon:{type:fr},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:Oe([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:Oe(Function)},perfMode:{type:Boolean,default:!0}}),sFe=Ye({node:{type:Oe(Object),default:()=>Jr(oFe)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:xq}),lFe=Ye({node:{type:Oe(Object),required:!0}}),Cq="node-click",Eq="node-drop",Tq="node-expand",kq="node-collapse",Pq="current-change",Aq="check",Mq="check-change",Rq="node-contextmenu",uFe={[Cq]:(t,e,n)=>t&&e&&n,[Eq]:(t,e,n)=>t&&e&&n,[Tq]:(t,e)=>t&&e,[kq]:(t,e)=>t&&e,[Pq]:(t,e)=>t&&e,[Aq]:(t,e)=>t&&e,[Mq]:(t,e)=>t&&typeof e=="boolean",[Rq]:(t,e,n)=>t&&e&&n},cFe={click:(t,e)=>!!(t&&e),drop:(t,e)=>!!(t&&e),toggle:t=>!!t,check:(t,e)=>t&&typeof e=="boolean"};function dFe(t,e){const n=F(new Set),r=F(new Set),{emit:i}=en();Ve([()=>e.value,()=>t.defaultCheckedKeys],()=>Ot(()=>{w(t.defaultCheckedKeys)}),{immediate:!0});const o=()=>{if(!e.value||!t.showCheckbox||t.checkStrictly)return;const{levelTreeNodeMap:O,maxLevel:S}=e.value,x=n.value,C=new Set;for(let E=S-1;E>=1;--E){const T=O.get(E);!T||T.forEach(P=>{const A=P.children;if(A){let D=!0,N=!1;for(const $ of A){const W=$.key;if(x.has(W))N=!0;else if(C.has(W)){D=!1,N=!0;break}else D=!1}D?x.add(P.key):N?(C.add(P.key),x.delete(P.key)):(x.delete(P.key),C.delete(P.key))}})}r.value=C},a=O=>n.value.has(O.key),s=O=>r.value.has(O.key),l=(O,S,x=!0)=>{const C=n.value,E=(T,P)=>{C[P?gP.ADD:gP.DELETE](T.key);const A=T.children;!t.checkStrictly&&A&&A.forEach(D=>{D.disabled||E(D,P)})};E(O,S),o(),x&&u(O,S)},u=(O,S)=>{const{checkedNodes:x,checkedKeys:C}=m(),{halfCheckedNodes:E,halfCheckedKeys:T}=g();i(Aq,O.data,{checkedKeys:C,checkedNodes:x,halfCheckedKeys:T,halfCheckedNodes:E}),i(Mq,O.data,S)};function c(O=!1){return m(O).checkedKeys}function d(O=!1){return m(O).checkedNodes}function f(){return g().halfCheckedKeys}function h(){return g().halfCheckedNodes}function m(O=!1){const S=[],x=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:C}=e.value;n.value.forEach(E=>{const T=C.get(E);T&&(!O||O&&T.isLeaf)&&(x.push(E),S.push(T.data))})}return{checkedKeys:x,checkedNodes:S}}function g(){const O=[],S=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:x}=e.value;r.value.forEach(C=>{const E=x.get(C);E&&(S.push(C),O.push(E.data))})}return{halfCheckedNodes:O,halfCheckedKeys:S}}function y(O){n.value.clear(),r.value.clear(),Ot(()=>{w(O)})}function b(O,S){if((e==null?void 0:e.value)&&t.showCheckbox){const x=e.value.treeNodeMap.get(O);x&&l(x,S,!1)}}function w(O){if(e!=null&&e.value){const{treeNodeMap:S}=e.value;if(t.showCheckbox&&S&&O)for(const x of O){const C=S.get(x);C&&!a(C)&&l(C,!0,!1)}}}return{updateCheckedKeys:o,toggleCheckbox:l,isChecked:a,isIndeterminate:s,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:h,setChecked:b,setCheckedKeys:y}}function fFe(t,e){const n=F(new Set([])),r=F(new Set([])),i=M(()=>$t(t.filterMethod));function o(s){var l;if(!i.value)return;const u=new Set,c=r.value,d=n.value,f=[],h=((l=e.value)==null?void 0:l.treeNodes)||[],m=t.filterMethod;d.clear();function g(y){y.forEach(b=>{f.push(b),m!=null&&m(s,b.data)?f.forEach(O=>{u.add(O.key)}):b.isLeaf&&d.add(b.key);const w=b.children;if(w&&g(w),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(w){let O=!0;for(const S of w)if(!d.has(S.key)){O=!1;break}O?c.add(b.key):c.delete(b.key)}}f.pop()})}return g(h),u}function a(s){return r.value.has(s.key)}return{hiddenExpandIconKeySet:r,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:a}}function hFe(t,e){const n=F(new Set(t.defaultExpandedKeys)),r=F(),i=Tr(),o=F();Ve(()=>t.currentNodeKey,Z=>{r.value=Z},{immediate:!0}),Ve(()=>t.data,Z=>{te(Z)},{immediate:!0});const{isIndeterminate:a,isChecked:s,toggleCheckbox:l,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:m}=dFe(t,i),{doFilter:g,hiddenNodeKeySet:y,isForceHiddenExpandIcon:b}=fFe(t,i),w=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.value)||ny.KEY}),O=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.children)||ny.CHILDREN}),S=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.disabled)||ny.DISABLED}),x=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.label)||ny.LABEL}),C=M(()=>{var Z;const ce=n.value,Te=y.value,Ie=[],ae=((Z=i.value)==null?void 0:Z.treeNodes)||[],me=[];for(let Ae=ae.length-1;Ae>=0;--Ae)me.push(ae[Ae]);for(;me.length;){const Ae=me.pop();if(!Te.has(Ae.key)&&(Ie.push(Ae),Ae.children&&ce.has(Ae.key)))for(let X=Ae.children.length-1;X>=0;--X)me.push(Ae.children[X])}return Ie}),E=M(()=>C.value.length>0);function T(Z){const ce=new Map,Te=new Map;let Ie=1;function ae(Ae,X=1,ee=void 0){var le;const Ce=[];for(const fe of Ae){const Ee=D(fe),be={level:X,key:Ee,data:fe};be.label=$(fe),be.parent=ee;const Be=A(fe);be.disabled=N(fe),be.isLeaf=!Be||Be.length===0,Be&&Be.length&&(be.children=ae(Be,X+1,be)),Ce.push(be),ce.set(Ee,be),Te.has(X)||Te.set(X,[]),(le=Te.get(X))==null||le.push(be)}return X>Ie&&(Ie=X),Ce}const me=ae(Z);return{treeNodeMap:ce,levelTreeNodeMap:Te,maxLevel:Ie,treeNodes:me}}function P(Z){const ce=g(Z);ce&&(n.value=ce)}function A(Z){return Z[O.value]}function D(Z){return Z?Z[w.value]:""}function N(Z){return Z[S.value]}function $(Z){return Z[x.value]}function W(Z){n.value.has(Z.key)?K(Z):q(Z)}function L(Z){const ce=new Set,Te=i.value.treeNodeMap;Z.forEach(Ie=>{let ae=Te.get(Ie);for(;ae&&!ce.has(ae.key);)ce.add(ae.key),ae=ae.parent}),n.value=ce}function I(Z,ce){e(Cq,Z.data,Z,ce),Q(Z),t.expandOnClickNode&&W(Z),t.showCheckbox&&t.checkOnClickNode&&!Z.disabled&&l(Z,!s(Z),!0)}function U(Z,ce){e(Eq,Z.data,Z,ce)}function Q(Z){Se(Z)||(r.value=Z.key,e(Pq,Z.data,Z))}function V(Z,ce){l(Z,ce)}function q(Z){const ce=n.value;if(i.value&&t.accordion){const{treeNodeMap:Te}=i.value;ce.forEach(Ie=>{const ae=Te.get(Ie);Z&&Z.level===(ae==null?void 0:ae.level)&&ce.delete(Ie)})}ce.add(Z.key),e(Tq,Z.data,Z)}function K(Z){n.value.delete(Z.key),e(kq,Z.data,Z)}function ie(Z){return n.value.has(Z.key)}function oe(Z){return!!Z.disabled}function Se(Z){const ce=r.value;return ce!==void 0&&ce===Z.key}function ke(){var Z,ce;if(!!r.value)return(ce=(Z=i.value)==null?void 0:Z.treeNodeMap.get(r.value))==null?void 0:ce.data}function Y(){return r.value}function re(Z){r.value=Z}function te(Z){Ot(()=>i.value=T(Z))}function ge(Z){var ce;const Te=sn(Z)?D(Z):Z;return(ce=i.value)==null?void 0:ce.treeNodeMap.get(Te)}function Re(Z,ce="auto"){const Te=ge(Z);Te&&o.value&&o.value.scrollToItem(C.value.indexOf(Te),ce)}function $e(Z){var ce;(ce=o.value)==null||ce.scrollTo(Z)}return{tree:i,flattenTree:C,isNotEmpty:E,listRef:o,getKey:D,getChildren:A,toggleExpand:W,toggleCheckbox:l,isExpanded:ie,isChecked:s,isIndeterminate:a,isDisabled:oe,isCurrent:Se,isForceHiddenExpandIcon:b,handleNodeClick:I,handleNodeDrop:U,handleNodeCheck:V,getCurrentNode:ke,getCurrentKey:Y,setCurrentKey:re,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:m,filter:P,setData:te,getNode:ge,expandNode:q,collapseNode:K,setExpandedKeys:L,scrollToNode:Re,scrollTo:$e}}var pFe=ue({name:"ElTreeNodeContent",props:lFe,setup(t){const e=ht(xN),n=Qe("tree");return()=>{const r=t.node,{data:i}=r;return e!=null&&e.ctx.slots.default?e.ctx.slots.default({node:r,data:i}):Et("span",{class:n.be("node","label")},[r==null?void 0:r.label])}}});const gFe=ue({name:"ElTreeNode"}),mFe=ue({...gFe,props:sFe,emits:cFe,setup(t,{emit:e}){const n=t,r=ht(xN),i=Qe("tree"),o=M(()=>{var f;return(f=r==null?void 0:r.props.indent)!=null?f:16}),a=M(()=>{var f;return(f=r==null?void 0:r.props.icon)!=null?f:BQ}),s=f=>{e("click",n.node,f)},l=f=>{e("drop",n.node,f)},u=()=>{e("toggle",n.node)},c=f=>{e("check",n.node,f)},d=f=>{var h,m,g,y;(g=(m=(h=r==null?void 0:r.instance)==null?void 0:h.vnode)==null?void 0:m.props)!=null&&g.onNodeContextmenu&&(f.stopPropagation(),f.preventDefault()),r==null||r.ctx.emit(Rq,f,(y=n.node)==null?void 0:y.data,n.node)};return(f,h)=>{var m,g,y;return R(),G("div",{ref:"node$",class:j([p(i).b("node"),p(i).is("expanded",f.expanded),p(i).is("current",f.current),p(i).is("focusable",!f.disabled),p(i).is("checked",!f.disabled&&f.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":f.expanded,"aria-disabled":f.disabled,"aria-checked":f.checked,"data-key":(m=f.node)==null?void 0:m.key,onClick:Pt(s,["stop"]),onContextmenu:d,onDragover:Pt(()=>{},["prevent"]),onDragenter:Pt(()=>{},["prevent"]),onDrop:Pt(l,["stop"])},[J("div",{class:j(p(i).be("node","content")),style:mt({paddingLeft:`${(f.node.level-1)*p(o)}px`,height:f.itemSize+"px"})},[p(a)?(R(),we(p(gt),{key:0,class:j([p(i).is("leaf",!!((g=f.node)!=null&&g.isLeaf)),p(i).is("hidden",f.hiddenExpandIcon),{expanded:!((y=f.node)!=null&&y.isLeaf)&&f.expanded},p(i).be("node","expand-icon")]),onClick:Pt(u,["stop"])},{default:z(()=>[(R(),we(un(p(a))))]),_:1},8,["class","onClick"])):_e("v-if",!0),f.showCheckbox?(R(),we(p(Is),{key:1,"model-value":f.checked,indeterminate:f.indeterminate,disabled:f.disabled,onChange:c,onClick:Pt(()=>{},["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):_e("v-if",!0),B(p(pFe),{node:f.node},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var vFe=Ge(mFe,[["__file","tree-node.vue"]]);const yFe=ue({name:"ElTreeV2"}),bFe=ue({...yFe,props:aFe,emits:uFe,setup(t,{expose:e,emit:n}){const r=t,i=Ji(),o=M(()=>r.itemSize);_n(xN,{ctx:{emit:n,slots:i},props:r,instance:en()}),_n(tc,void 0);const{t:a}=kn(),s=Qe("tree"),{flattenTree:l,isNotEmpty:u,listRef:c,toggleExpand:d,isExpanded:f,isIndeterminate:h,isChecked:m,isDisabled:g,isCurrent:y,isForceHiddenExpandIcon:b,handleNodeClick:w,handleNodeDrop:O,handleNodeCheck:S,toggleCheckbox:x,getCurrentNode:C,getCurrentKey:E,setCurrentKey:T,getCheckedKeys:P,getCheckedNodes:A,getHalfCheckedKeys:D,getHalfCheckedNodes:N,setChecked:$,setCheckedKeys:W,filter:L,setData:I,getNode:U,expandNode:Q,collapseNode:V,setExpandedKeys:q,scrollToNode:K,scrollTo:ie}=hFe(r,n);return e({toggleCheckbox:x,getCurrentNode:C,getCurrentKey:E,setCurrentKey:T,getCheckedKeys:P,getCheckedNodes:A,getHalfCheckedKeys:D,getHalfCheckedNodes:N,setChecked:$,setCheckedKeys:W,filter:L,setData:I,getNode:U,expandNode:Q,collapseNode:V,setExpandedKeys:q,scrollToNode:K,scrollTo:ie}),(oe,Se)=>{var ke;return R(),G("div",{class:j([p(s).b(),{[p(s).m("highlight-current")]:oe.highlightCurrent}]),role:"tree"},[p(u)?(R(),we(p(DU),{key:0,ref_key:"listRef",ref:c,"class-name":p(s).b("virtual-list"),data:p(l),total:p(l).length,height:oe.height,"item-size":p(o),"perf-mode":oe.perfMode},{default:z(({data:Y,index:re,style:te})=>[(R(),we(vFe,{key:Y[re].key,style:mt(te),node:Y[re],expanded:p(f)(Y[re]),"show-checkbox":oe.showCheckbox,checked:p(m)(Y[re]),indeterminate:p(h)(Y[re]),"item-size":p(o),disabled:p(g)(Y[re]),current:p(y)(Y[re]),"hidden-expand-icon":p(b)(Y[re]),onClick:p(w),onToggle:p(d),onCheck:p(S),onDrop:p(O)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(R(),G("div",{key:1,class:j(p(s).e("empty-block"))},[J("span",{class:j(p(s).e("empty-text"))},je((ke=oe.emptyText)!=null?ke:p(a)("el.tree.emptyText")),3)],2))],2)}}});var _Fe=Ge(bFe,[["__file","tree.vue"]]);const OFe=Vt(_Fe),$q=Symbol("uploadContextKey"),wFe="ElUpload";class SFe extends Error{constructor(e,n,r,i){super(e),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=i}}function nB(t,e,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${e.method} ${t} ${n.status}`,new SFe(r,n.status,e.method,t)}function xFe(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const CFe=t=>{typeof XMLHttpRequest=="undefined"&&Hi(wFe,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const a=o;a.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(a)});const r=new FormData;if(t.data)for(const[o,a]of Object.entries(t.data))ut(a)&&a.length?r.append(o,...a):r.append(o,a);r.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(nB(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(nB(n,t,e));t.onSuccess(xFe(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};if(i instanceof Headers)i.forEach((o,a)=>e.setRequestHeader(a,o));else for(const[o,a]of Object.entries(i))Dr(a)||e.setRequestHeader(o,String(a));return e.send(r),e},Nq=["text","picture","picture-card"];let EFe=1;const mP=()=>Date.now()+EFe++,Dq=Ye({action:{type:String,default:"#"},headers:{type:Oe(Object)},method:{type:String,default:"post"},data:{type:Oe([Object,Function,Promise]),default:()=>Jr({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Oe(Array),default:()=>Jr([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Nq,default:"text"},httpRequest:{type:Oe(Function),default:CFe},disabled:Boolean,limit:Number}),TFe=Ye({...Dq,beforeUpload:{type:Oe(Function),default:yr},beforeRemove:{type:Oe(Function)},onRemove:{type:Oe(Function),default:yr},onChange:{type:Oe(Function),default:yr},onPreview:{type:Oe(Function),default:yr},onSuccess:{type:Oe(Function),default:yr},onProgress:{type:Oe(Function),default:yr},onError:{type:Oe(Function),default:yr},onExceed:{type:Oe(Function),default:yr},crossorigin:{type:Oe(String)}}),kFe=Ye({files:{type:Oe(Array),default:()=>Jr([])},disabled:{type:Boolean,default:!1},handlePreview:{type:Oe(Function),default:yr},listType:{type:String,values:Nq,default:"text"},crossorigin:{type:Oe(String)}}),PFe={remove:t=>!!t},AFe=ue({name:"ElUploadList"}),MFe=ue({...AFe,props:kFe,emits:PFe,setup(t,{emit:e}){const n=t,{t:r}=kn(),i=Qe("upload"),o=Qe("icon"),a=Qe("list"),s=la(),l=F(!1),u=M(()=>[i.b("list"),i.bm("list",n.listType),i.is("disabled",n.disabled)]),c=d=>{e("remove",d)};return(d,f)=>(R(),we(Kz,{tag:"ul",class:j(p(u)),name:p(a).b()},{default:z(()=>[(R(!0),G(ct,null,Wt(d.files,(h,m)=>(R(),G("li",{key:h.uid||h.name,class:j([p(i).be("list","item"),p(i).is(h.status),{focusing:l.value}]),tabindex:"0",onKeydown:br(g=>!p(s)&&c(h),["delete"]),onFocus:g=>l.value=!0,onBlur:g=>l.value=!1,onClick:g=>l.value=!1},[xe(d.$slots,"default",{file:h,index:m},()=>[d.listType==="picture"||h.status!=="uploading"&&d.listType==="picture-card"?(R(),G("img",{key:0,class:j(p(i).be("list","item-thumbnail")),src:h.url,crossorigin:d.crossorigin,alt:""},null,10,["src","crossorigin"])):_e("v-if",!0),h.status==="uploading"||d.listType!=="picture-card"?(R(),G("div",{key:1,class:j(p(i).be("list","item-info"))},[J("a",{class:j(p(i).be("list","item-name")),onClick:Pt(g=>d.handlePreview(h),["prevent"])},[B(p(gt),{class:j(p(o).m("document"))},{default:z(()=>[B(p(aCe))]),_:1},8,["class"]),J("span",{class:j(p(i).be("list","item-file-name")),title:h.name},je(h.name),11,["title"])],10,["onClick"]),h.status==="uploading"?(R(),we(p(EU),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(h.percentage),style:mt(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):_e("v-if",!0)],2)):_e("v-if",!0),J("label",{class:j(p(i).be("list","item-status-label"))},[d.listType==="text"?(R(),we(p(gt),{key:0,class:j([p(o).m("upload-success"),p(o).m("circle-check")])},{default:z(()=>[B(p(a$))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(R(),we(p(gt),{key:1,class:j([p(o).m("upload-success"),p(o).m("check")])},{default:z(()=>[B(p(Sb))]),_:1},8,["class"])):_e("v-if",!0)],2),p(s)?_e("v-if",!0):(R(),we(p(gt),{key:2,class:j(p(o).m("close")),onClick:g=>c(h)},{default:z(()=>[B(p(_a))]),_:2},1032,["class","onClick"])),_e(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),_e(" This is a bug which needs to be fixed "),_e(" TODO: Fix the incorrect navigation interaction "),p(s)?_e("v-if",!0):(R(),G("i",{key:3,class:j(p(o).m("close-tip"))},je(p(r)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(R(),G("span",{key:4,class:j(p(i).be("list","item-actions"))},[J("span",{class:j(p(i).be("list","item-preview")),onClick:g=>d.handlePreview(h)},[B(p(gt),{class:j(p(o).m("zoom-in"))},{default:z(()=>[B(p(zQ))]),_:1},8,["class"])],10,["onClick"]),p(s)?_e("v-if",!0):(R(),G("span",{key:0,class:j(p(i).be("list","item-delete")),onClick:g=>c(h)},[B(p(gt),{class:j(p(o).m("delete"))},{default:z(()=>[B(p(l$))]),_:1},8,["class"])],10,["onClick"]))],2)):_e("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),xe(d.$slots,"append")]),_:3},8,["class","name"]))}});var rB=Ge(MFe,[["__file","upload-list.vue"]]);const RFe=Ye({disabled:{type:Boolean,default:!1}}),$Fe={file:t=>ut(t)},Lq="ElUploadDrag",NFe=ue({name:Lq}),DFe=ue({...NFe,props:RFe,emits:$Fe,setup(t,{emit:e}){ht($q)||Hi(Lq,"usage: <el-upload><el-upload-dragger /></el-upload>");const r=Qe("upload"),i=F(!1),o=la(),a=l=>{if(o.value)return;i.value=!1,l.stopPropagation();const u=Array.from(l.dataTransfer.files);e("file",u)},s=()=>{o.value||(i.value=!0)};return(l,u)=>(R(),G("div",{class:j([p(r).b("dragger"),p(r).is("dragover",i.value)]),onDrop:Pt(a,["prevent"]),onDragover:Pt(s,["prevent"]),onDragleave:Pt(c=>i.value=!1,["prevent"])},[xe(l.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var LFe=Ge(DFe,[["__file","upload-dragger.vue"]]);const IFe=Ye({...Dq,beforeUpload:{type:Oe(Function),default:yr},onRemove:{type:Oe(Function),default:yr},onStart:{type:Oe(Function),default:yr},onSuccess:{type:Oe(Function),default:yr},onProgress:{type:Oe(Function),default:yr},onError:{type:Oe(Function),default:yr},onExceed:{type:Oe(Function),default:yr}}),BFe=ue({name:"ElUploadContent",inheritAttrs:!1}),FFe=ue({...BFe,props:IFe,setup(t,{expose:e}){const n=t,r=Qe("upload"),i=la(),o=Tr({}),a=Tr(),s=g=>{if(g.length===0)return;const{autoUpload:y,limit:b,fileList:w,multiple:O,onStart:S,onExceed:x}=n;if(b&&w.length+g.length>b){x(g,w);return}O||(g=g.slice(0,1));for(const C of g){const E=C;E.uid=mP(),S(E),y&&l(E)}},l=async g=>{if(a.value.value="",!n.beforeUpload)return c(g);let y,b={};try{const O=n.data,S=n.beforeUpload(g);b=tw(n.data)?Fn(n.data):n.data,y=await S,tw(n.data)&&so(O,b)&&(b=Fn(n.data))}catch{y=!1}if(y===!1){n.onRemove(g);return}let w=g;y instanceof Blob&&(y instanceof File?w=y:w=new File([y],g.name,{type:g.type})),c(Object.assign(w,{uid:g.uid}),b)},u=async(g,y)=>$t(g)?g(y):g,c=async(g,y)=>{const{headers:b,data:w,method:O,withCredentials:S,name:x,action:C,onProgress:E,onSuccess:T,onError:P,httpRequest:A}=n;try{y=await u(y!=null?y:w,g)}catch{n.onRemove(g);return}const{uid:D}=g,N={headers:b||{},withCredentials:S,file:g,data:y,method:O,filename:x,action:C,onProgress:W=>{E(W,g)},onSuccess:W=>{T(W,g),delete o.value[D]},onError:W=>{P(W,g),delete o.value[D]}},$=A(N);o.value[D]=$,$ instanceof Promise&&$.then(N.onSuccess,N.onError)},d=g=>{const y=g.target.files;!y||s(Array.from(y))},f=()=>{i.value||(a.value.value="",a.value.click())},h=()=>{f()};return e({abort:g=>{Rxe(o.value).filter(g?([b])=>String(g.uid)===b:()=>!0).forEach(([b,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete o.value[b]})},upload:l}),(g,y)=>(R(),G("div",{class:j([p(r).b(),p(r).m(g.listType),p(r).is("drag",g.drag),p(r).is("disabled",p(i))]),tabindex:p(i)?"-1":"0",onClick:f,onKeydown:br(Pt(h,["self"]),["enter","space"])},[g.drag?(R(),we(LFe,{key:0,disabled:p(i),onFile:s},{default:z(()=>[xe(g.$slots,"default")]),_:3},8,["disabled"])):xe(g.$slots,"default",{key:1}),J("input",{ref_key:"inputRef",ref:a,class:j(p(r).e("input")),name:g.name,disabled:p(i),multiple:g.multiple,accept:g.accept,type:"file",onChange:d,onClick:Pt(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var iB=Ge(FFe,[["__file","upload-content.vue"]]);const oB="ElUpload",aB=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},VFe=(t,e)=>{const n=u7(t,"fileList",void 0,{passive:!0}),r=h=>n.value.find(m=>m.uid===h.uid);function i(h){var m;(m=e.value)==null||m.abort(h)}function o(h=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!h.includes(m.status))}function a(h){n.value=n.value.filter(m=>m!==h)}const s=(h,m)=>{const g=r(m);!g||(console.error(h),g.status="fail",a(g),t.onError(h,g,n.value),t.onChange(g,n.value))},l=(h,m)=>{const g=r(m);!g||(t.onProgress(h,g,n.value),g.status="uploading",g.percentage=Math.round(h.percent))},u=(h,m)=>{const g=r(m);!g||(g.status="success",g.response=h,t.onSuccess(h,g,n.value),t.onChange(g,n.value))},c=h=>{Dr(h.uid)&&(h.uid=mP());const m={name:h.name,percentage:0,status:"ready",size:h.size,raw:h,uid:h.uid};if(t.listType==="picture-card"||t.listType==="picture")try{m.url=URL.createObjectURL(h)}catch(g){g.message,t.onError(g,m,n.value)}n.value=[...n.value,m],t.onChange(m,n.value)},d=async h=>{const m=h instanceof File?r(h):h;m||Hi(oB,"file to be removed not found");const g=y=>{i(y),a(y),t.onRemove(y,n.value),aB(y)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&g(m):g(m)};function f(){n.value.filter(({status:h})=>h==="ready").forEach(({raw:h})=>{var m;return h&&((m=e.value)==null?void 0:m.upload(h))})}return Ve(()=>t.listType,h=>{h!=="picture-card"&&h!=="picture"||(n.value=n.value.map(m=>{const{raw:g,url:y}=m;if(!y&&g)try{m.url=URL.createObjectURL(g)}catch(b){t.onError(b,m,n.value)}return m}))}),Ve(n,h=>{for(const m of h)m.uid||(m.uid=mP()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:i,clearFiles:o,handleError:s,handleProgress:l,handleStart:c,handleSuccess:u,handleRemove:d,submit:f,revokeFileObjectURL:aB}},jFe=ue({name:"ElUpload"}),zFe=ue({...jFe,props:TFe,setup(t,{expose:e}){const n=t,r=la(),i=Tr(),{abort:o,submit:a,clearFiles:s,uploadFiles:l,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:h,revokeFileObjectURL:m}=VFe(n,i),g=M(()=>n.listType==="picture-card"),y=M(()=>({...n,fileList:l.value,onStart:u,onProgress:h,onSuccess:f,onError:c,onRemove:d}));return pr(()=>{l.value.forEach(m)}),_n($q,{accept:er(n,"accept")}),e({abort:o,submit:a,clearFiles:s,handleStart:u,handleRemove:d}),(b,w)=>(R(),G("div",null,[p(g)&&b.showFileList?(R(),we(rB,{key:0,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},ts({append:z(()=>[B(iB,gn({ref_key:"uploadRef",ref:i},p(y)),{default:z(()=>[b.$slots.trigger?xe(b.$slots,"trigger",{key:0}):_e("v-if",!0),!b.$slots.trigger&&b.$slots.default?xe(b.$slots,"default",{key:1}):_e("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:z(({file:O,index:S})=>[xe(b.$slots,"file",{file:O,index:S})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):_e("v-if",!0),!p(g)||p(g)&&!b.showFileList?(R(),we(iB,gn({key:1,ref_key:"uploadRef",ref:i},p(y)),{default:z(()=>[b.$slots.trigger?xe(b.$slots,"trigger",{key:0}):_e("v-if",!0),!b.$slots.trigger&&b.$slots.default?xe(b.$slots,"default",{key:1}):_e("v-if",!0)]),_:3},16)):_e("v-if",!0),b.$slots.trigger?xe(b.$slots,"default",{key:2}):_e("v-if",!0),xe(b.$slots,"tip"),!p(g)&&b.showFileList?(R(),we(rB,{key:3,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},ts({_:2},[b.$slots.file?{name:"default",fn:z(({file:O,index:S})=>[xe(b.$slots,"file",{file:O,index:S})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):_e("v-if",!0)]))}});var QFe=Ge(zFe,[["__file","upload.vue"]]);const Iq=Vt(QFe),HFe=Ye({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:Oe([String,Array]),default:"Element Plus"},font:{type:Oe(Object)},gap:{type:Oe(Array),default:()=>[100,100]},offset:{type:Oe(Array)}});function WFe(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function UFe(t){return Object.keys(t).map(e=>`${WFe(e)}: ${t[e]};`).join(" ")}function qFe(){return window.devicePixelRatio||1}const YFe=(t,e)=>{let n=!1;return t.removedNodes.length&&e&&(n=Array.from(t.removedNodes).includes(e)),t.type==="attributes"&&t.target===e&&(n=!0),n},Bq=3;function FT(t,e,n=1){const r=document.createElement("canvas"),i=r.getContext("2d"),o=t*n,a=e*n;return r.setAttribute("width",`${o}px`),r.setAttribute("height",`${a}px`),i.save(),[i,r,o,a]}function XFe(){function t(e,n,r,i,o,a,s,l){const[u,c,d,f]=FT(i,o,r);if(e instanceof HTMLImageElement)u.drawImage(e,0,0,d,f);else{const{color:K,fontSize:ie,fontStyle:oe,fontWeight:Se,fontFamily:ke,textAlign:Y,textBaseline:re}=a,te=Number(ie)*r;u.font=`${oe} normal ${Se} ${te}px/${o}px ${ke}`,u.fillStyle=K,u.textAlign=Y,u.textBaseline=re;const ge=Array.isArray(e)?e:[e];ge==null||ge.forEach((Re,$e)=>{u.fillText(Re!=null?Re:"",d/2,$e*(te+Bq*r))})}const h=Math.PI/180*Number(n),m=Math.max(i,o),[g,y,b]=FT(m,m,r);g.translate(b/2,b/2),g.rotate(h),d>0&&f>0&&g.drawImage(c,-d/2,-f/2);function w(K,ie){const oe=K*Math.cos(h)-ie*Math.sin(h),Se=K*Math.sin(h)+ie*Math.cos(h);return[oe,Se]}let O=0,S=0,x=0,C=0;const E=d/2,T=f/2;[[0-E,0-T],[0+E,0-T],[0+E,0+T],[0-E,0+T]].forEach(([K,ie])=>{const[oe,Se]=w(K,ie);O=Math.min(O,oe),S=Math.max(S,oe),x=Math.min(x,Se),C=Math.max(C,Se)});const A=O+b/2,D=x+b/2,N=S-O,$=C-x,W=s*r,L=l*r,I=(N+W)*2,U=$+L,[Q,V]=FT(I,U);function q(K=0,ie=0){Q.drawImage(y,A,D,N,$,K,ie,N,$)}return q(),q(N+W,-$/2-L/2),q(N+W,+$/2+L/2),[V.toDataURL(),I/r,U/r]}return t}const ZFe=ue({name:"ElWatermark"}),GFe=ue({...ZFe,props:HFe,setup(t){const e=t,n={position:"relative"},r=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.color)!=null?D:"rgba(0,0,0,.15)"}),i=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontSize)!=null?D:16}),o=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontWeight)!=null?D:"normal"}),a=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontStyle)!=null?D:"normal"}),s=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontFamily)!=null?D:"sans-serif"}),l=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.textAlign)!=null?D:"center"}),u=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.textBaseline)!=null?D:"hanging"}),c=M(()=>e.gap[0]),d=M(()=>e.gap[1]),f=M(()=>c.value/2),h=M(()=>d.value/2),m=M(()=>{var A,D;return(D=(A=e.offset)==null?void 0:A[0])!=null?D:f.value}),g=M(()=>{var A,D;return(D=(A=e.offset)==null?void 0:A[1])!=null?D:h.value}),y=()=>{const A={zIndex:e.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let D=m.value-f.value,N=g.value-h.value;return D>0&&(A.left=`${D}px`,A.width=`calc(100% - ${D}px)`,D=0),N>0&&(A.top=`${N}px`,A.height=`calc(100% - ${N}px)`,N=0),A.backgroundPosition=`${D}px ${N}px`,A},b=Tr(null),w=Tr(),O=F(!1),S=()=>{w.value&&(w.value.remove(),w.value=void 0)},x=(A,D)=>{var N;b.value&&w.value&&(O.value=!0,w.value.setAttribute("style",UFe({...y(),backgroundImage:`url('${A}')`,backgroundSize:`${Math.floor(D)}px`})),(N=b.value)==null||N.append(w.value),setTimeout(()=>{O.value=!1}))},C=A=>{let D=120,N=64;const $=e.image,W=e.content,L=e.width,I=e.height;if(!$&&A.measureText){A.font=`${Number(i.value)}px ${s.value}`;const U=Array.isArray(W)?W:[W],Q=U.map(V=>{const q=A.measureText(V);return[q.width,q.fontBoundingBoxAscent!==void 0?q.fontBoundingBoxAscent+q.fontBoundingBoxDescent:q.actualBoundingBoxAscent+q.actualBoundingBoxDescent]});D=Math.ceil(Math.max(...Q.map(V=>V[0]))),N=Math.ceil(Math.max(...Q.map(V=>V[1])))*U.length+(U.length-1)*Bq}return[L!=null?L:D,I!=null?I:N]},E=XFe(),T=()=>{const D=document.createElement("canvas").getContext("2d"),N=e.image,$=e.content,W=e.rotate;if(D){w.value||(w.value=document.createElement("div"));const L=qFe(),[I,U]=C(D),Q=V=>{const[q,K]=E(V||"",W,L,I,U,{color:r.value,fontSize:i.value,fontStyle:a.value,fontWeight:o.value,fontFamily:s.value,textAlign:l.value,textBaseline:u.value},c.value,d.value);x(q,K)};if(N){const V=new Image;V.onload=()=>{Q(V)},V.onerror=()=>{Q($)},V.crossOrigin="anonymous",V.referrerPolicy="no-referrer",V.src=N}else Q($)}};return Bt(()=>{T()}),Ve(()=>e,()=>{T()},{deep:!0,flush:"post"}),pr(()=>{S()}),l7(b,A=>{O.value||A.forEach(D=>{YFe(D,w.value)&&(S(),T())})},{attributes:!0,subtree:!0,childList:!0}),(A,D)=>(R(),G("div",{ref_key:"containerRef",ref:b,style:mt([n])},[xe(A.$slots,"default")],4))}});var KFe=Ge(GFe,[["__file","watermark.vue"]]);const JFe=Vt(KFe),eVe=Ye({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:Oe(Object)},targetAreaClickable:{type:Boolean,default:!0}}),tVe=(t,e,n,r,i)=>{const o=F(null),a=()=>{let d;return At(t.value)?d=document.querySelector(t.value):$t(t.value)?d=t.value():d=t.value,d},s=()=>{const d=a();if(!d||!e.value){o.value=null;return}!nVe(d)&&e.value&&d.scrollIntoView(i.value);const{left:f,top:h,width:m,height:g}=d.getBoundingClientRect();o.value={left:f,top:h,width:m,height:g,radius:0}};Bt(()=>{Ve([e,t],()=>{s()},{immediate:!0}),window.addEventListener("resize",s)}),pr(()=>{window.removeEventListener("resize",s)});const l=d=>{var f;return(f=ut(n.value.offset)?n.value.offset[d]:n.value.offset)!=null?f:6},u=M(()=>{var d;if(!o.value)return o.value;const f=l(0),h=l(1),m=((d=n.value)==null?void 0:d.radius)||2;return{left:o.value.left-f,top:o.value.top-h,width:o.value.width+f*2,height:o.value.height+h*2,radius:m}}),c=M(()=>{const d=a();return!r.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,h,m,g;return window.DOMRect.fromRect({width:((f=u.value)==null?void 0:f.width)||0,height:((h=u.value)==null?void 0:h.height)||0,x:((m=u.value)==null?void 0:m.left)||0,y:((g=u.value)==null?void 0:g.top)||0})}}});return{mergedPosInfo:u,triggerTarget:c}},aC=Symbol("ElTour");function nVe(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:r,right:i,bottom:o,left:a}=t.getBoundingClientRect();return r>=0&&a>=0&&i<=e&&o<=n}const rVe=(t,e,n,r,i,o,a,s)=>{const l=F(),u=F(),c=F({}),d={x:l,y:u,placement:r,strategy:i,middlewareData:c},f=M(()=>{const b=[bH(p(o)),a2e(),o2e(),iVe()];return p(s)&&p(n)&&b.push(_H({element:p(n)})),b}),h=async()=>{if(!Tn)return;const b=p(t),w=p(e);if(!b||!w)return;const O=await OH(b,w,{placement:p(r),strategy:p(i),middleware:p(f)});Yg(d).forEach(S=>{d[S].value=O[S]})},m=M(()=>{if(!p(t))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:p(a)};const{overflow:b}=p(c);return{position:p(i),zIndex:p(a),top:p(u)!=null?`${p(u)}px`:"",left:p(l)!=null?`${p(l)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),g=M(()=>{if(!p(s))return{};const{arrow:b}=p(c);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let y;return Bt(()=>{const b=p(t),w=p(e);b&&w&&(y=r2e(b,w,h)),Bo(()=>{h()})}),pr(()=>{y&&y()}),{update:h,contentStyle:m,arrowStyle:g}},iVe=()=>({name:"overflow",async fn(t){const e=await i2e(t);let n=0;return e.left>0&&(n=e.left),e.right>0&&(n=e.right),{data:{maxWidth:t.rects.floating.width-n}}}}),oVe=ue({name:"ElTourMask",inheritAttrs:!1}),aVe=ue({...oVe,props:eVe,setup(t){const e=t,{ns:n}=ht(aC),r=M(()=>{var s,l;return(l=(s=e.pos)==null?void 0:s.radius)!=null?l:2}),i=M(()=>{const s=r.value,l=`a${s},${s} 0 0 1`;return{topRight:`${l} ${s},${s}`,bottomRight:`${l} ${-s},${s}`,bottomLeft:`${l} ${-s},${-s}`,topLeft:`${l} ${s},${-s}`}}),o=M(()=>{const s=window.innerWidth,l=window.innerHeight,u=i.value,c=`M${s},0 L0,0 L0,${l} L${s},${l} L${s},0 Z`,d=r.value;return e.pos?`${c} M${e.pos.left+d},${e.pos.top} h${e.pos.width-d*2} ${u.topRight} v${e.pos.height-d*2} ${u.bottomRight} h${-e.pos.width+d*2} ${u.bottomLeft} v${-e.pos.height+d*2} ${u.topLeft} z`:c}),a=M(()=>({fill:e.fill,pointerEvents:"auto",cursor:"auto"}));return v$(er(e,"visible"),{ns:n}),(s,l)=>s.visible?(R(),G("div",gn({key:0,class:p(n).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:s.zIndex,pointerEvents:s.pos&&s.targetAreaClickable?"none":"auto"}},s.$attrs),[(R(),G("svg",{style:{width:"100%",height:"100%"}},[J("path",{class:j(p(n).e("hollow")),style:mt(p(a)),d:p(o)},null,14,["d"])]))],16)):_e("v-if",!0)}});var sVe=Ge(aVe,[["__file","mask.vue"]]);const lVe=["absolute","fixed"],uVe=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],CN=Ye({placement:{type:Oe(String),values:uVe,default:"bottom"},reference:{type:Oe(Object),default:null},strategy:{type:Oe(String),values:lVe,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),cVe={close:()=>!0},dVe=ue({name:"ElTourContent"}),fVe=ue({...dVe,props:CN,emits:cVe,setup(t,{emit:e}){const n=t,r=F(n.placement),i=F(n.strategy),o=F(null),a=F(null);Ve(()=>n.placement,()=>{r.value=n.placement});const{contentStyle:s,arrowStyle:l}=rVe(er(n,"reference"),o,a,r,i,er(n,"offset"),er(n,"zIndex"),er(n,"showArrow")),u=M(()=>r.value.split("-")[0]),{ns:c}=ht(aC),d=()=>{e("close")},f=h=>{h.detail.focusReason==="pointer"&&h.preventDefault()};return(h,m)=>(R(),G("div",{ref_key:"contentRef",ref:o,style:mt(p(s)),class:j(p(c).e("content")),"data-side":p(u),tabindex:"-1"},[B(p(Mb),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":o.value||void 0,onReleaseRequested:d,onFocusoutPrevented:f},{default:z(()=>[xe(h.$slots,"default")]),_:3},8,["focus-trap-el"]),h.showArrow?(R(),G("span",{key:0,ref_key:"arrowRef",ref:a,style:mt(p(l)),class:j(p(c).e("arrow"))},null,6)):_e("v-if",!0)],14,["data-side"]))}});var hVe=Ge(fVe,[["__file","content.vue"]]),pVe=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(t,{slots:e,emit:n}){let r=0;return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];let l=0;function u(c){!ut(c)||c.forEach(d=>{var f;((f=(d==null?void 0:d.type)||{})==null?void 0:f.name)==="ElTourStep"&&(s.push(d),l+=1)})}return a.length&&u(Kd((o=a[0])==null?void 0:o.children)),r!==l&&(r=l,n("update-total",l)),s.length?s[t.current]:null}}});const gVe=Ye({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:fr},placement:CN.placement,contentStyle:{type:Oe([Object])},mask:{type:Oe([Boolean,Object]),default:!0},gap:{type:Oe(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:Oe([Boolean,Object]),default:()=>({block:"center"})},type:{type:Oe(String)},appendTo:{type:Oe([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),mVe={[Zt]:t=>si(t),["update:current"]:t=>kt(t),close:t=>kt(t),finish:()=>!0,change:t=>kt(t)},vVe=ue({name:"ElTour"}),yVe=ue({...vVe,props:gVe,emits:mVe,setup(t,{emit:e}){const n=t,r=Qe("tour"),i=F(0),o=F(),a=u7(n,"current",e,{passive:!0}),s=M(()=>{var P;return(P=o.value)==null?void 0:P.target}),l=M(()=>[r.b(),y.value==="primary"?r.m("primary"):""]),u=M(()=>{var P;return((P=o.value)==null?void 0:P.placement)||n.placement}),c=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.contentStyle)!=null?A:n.contentStyle}),d=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.mask)!=null?A:n.mask}),f=M(()=>!!d.value&&n.modelValue),h=M(()=>si(d.value)?void 0:d.value),m=M(()=>{var P,A;return!!s.value&&((A=(P=o.value)==null?void 0:P.showArrow)!=null?A:n.showArrow)}),g=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.scrollIntoViewOptions)!=null?A:n.scrollIntoViewOptions}),y=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.type)!=null?A:n.type}),{nextZIndex:b}=Qm(),w=b(),O=M(()=>{var P;return(P=n.zIndex)!=null?P:w}),{mergedPosInfo:S,triggerTarget:x}=tVe(s,er(n,"modelValue"),er(n,"gap"),d,g);Ve(()=>n.modelValue,P=>{P||(a.value=0)});const C=()=>{n.closeOnPressEscape&&(e("update:modelValue",!1),e("close",a.value))},E=P=>{i.value=P},T=Ji();return _n(aC,{currentStep:o,current:a,total:i,showClose:er(n,"showClose"),closeIcon:er(n,"closeIcon"),mergedType:y,ns:r,slots:T,updateModelValue(P){e("update:modelValue",P)},onClose(){e("close",a.value)},onFinish(){e("finish")},onChange(){e("change",a.value)}}),(P,A)=>(R(),G(ct,null,[B(p(Um),{to:P.appendTo},{default:z(()=>{var D,N;return[J("div",gn({class:p(l)},P.$attrs),[B(sVe,{visible:p(f),fill:(D=p(h))==null?void 0:D.color,style:mt((N=p(h))==null?void 0:N.style),pos:p(S),"z-index":p(O),"target-area-clickable":P.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),P.modelValue?(R(),we(hVe,{key:p(a),reference:p(x),placement:p(u),"show-arrow":p(m),"z-index":p(O),style:mt(p(c)),onClose:C},{default:z(()=>[B(p(pVe),{current:p(a),onUpdateTotal:E},{default:z(()=>[xe(P.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):_e("v-if",!0)],16)]}),_:3},8,["to"]),_e(" just for IDE "),_e("v-if",!0)],64))}});var bVe=Ge(yVe,[["__file","tour.vue"]]);const _Ve=Ye({target:{type:Oe([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:fr},showArrow:{type:Boolean,default:void 0},placement:CN.placement,mask:{type:Oe([Boolean,Object]),default:void 0},contentStyle:{type:Oe([Object])},prevButtonProps:{type:Oe(Object)},nextButtonProps:{type:Oe(Object)},scrollIntoViewOptions:{type:Oe([Boolean,Object]),default:void 0},type:{type:Oe(String)}}),OVe={close:()=>!0},wVe=ue({name:"ElTourStep"}),SVe=ue({...wVe,props:_Ve,emits:OVe,setup(t,{emit:e}){const n=t,{Close:r}=f$,{t:i}=kn(),{currentStep:o,current:a,total:s,showClose:l,closeIcon:u,mergedType:c,ns:d,slots:f,updateModelValue:h,onClose:m,onFinish:g,onChange:y}=ht(aC);Ve(n,T=>{o.value=T},{immediate:!0});const b=M(()=>{var T;return(T=n.showClose)!=null?T:l.value}),w=M(()=>{var T,P;return(P=(T=n.closeIcon)!=null?T:u.value)!=null?P:r}),O=T=>{if(!!T)return oQ(T,["children","onClick"])},S=()=>{var T,P;a.value-=1,(T=n.prevButtonProps)!=null&&T.onClick&&((P=n.prevButtonProps)==null||P.onClick()),y()},x=()=>{var T;a.value>=s.value-1?C():a.value+=1,(T=n.nextButtonProps)!=null&&T.onClick&&n.nextButtonProps.onClick(),y()},C=()=>{E(),g()},E=()=>{h(!1),m(),e("close")};return(T,P)=>(R(),G(ct,null,[p(b)?(R(),G("button",{key:0,"aria-label":"Close",class:j(p(d).e("closebtn")),type:"button",onClick:E},[B(p(gt),{class:j(p(d).e("close"))},{default:z(()=>[(R(),we(un(p(w))))]),_:1},8,["class"])],2)):_e("v-if",!0),J("header",{class:j([p(d).e("header"),{"show-close":p(l)}])},[xe(T.$slots,"header",{},()=>[J("span",{role:"heading",class:j(p(d).e("title"))},je(T.title),3)])],2),J("div",{class:j(p(d).e("body"))},[xe(T.$slots,"default",{},()=>[J("span",null,je(T.description),1)])],2),J("footer",{class:j(p(d).e("footer"))},[J("div",{class:j(p(d).b("indicators"))},[p(f).indicators?(R(),we(un(p(f).indicators),{key:0,current:p(a),total:p(s)},null,8,["current","total"])):(R(!0),G(ct,{key:1},Wt(p(s),(A,D)=>(R(),G("span",{key:A,class:j([p(d).b("indicator"),D===p(a)?"is-active":""])},null,2))),128))],2),J("div",{class:j(p(d).b("buttons"))},[p(a)>0?(R(),we(p(lr),gn({key:0,size:"small",type:p(c)},O(T.prevButtonProps),{onClick:S}),{default:z(()=>{var A,D;return[qe(je((D=(A=T.prevButtonProps)==null?void 0:A.children)!=null?D:p(i)("el.tour.previous")),1)]}),_:1},16,["type"])):_e("v-if",!0),p(a)<=p(s)-1?(R(),we(p(lr),gn({key:1,size:"small",type:p(c)==="primary"?"default":"primary"},O(T.nextButtonProps),{onClick:x}),{default:z(()=>{var A,D;return[qe(je((D=(A=T.nextButtonProps)==null?void 0:A.children)!=null?D:p(a)===p(s)-1?p(i)("el.tour.finish"):p(i)("el.tour.next")),1)]}),_:1},16,["type"])):_e("v-if",!0)],2)],2)],64))}});var Fq=Ge(SVe,[["__file","step.vue"]]);const xVe=Vt(bVe,{TourStep:Fq}),CVe=ti(Fq),EVe=Ye({container:{type:Oe([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:Oe(String),default:"default"},direction:{type:Oe(String),default:"vertical"}}),TVe={change:t=>At(t),click:(t,e)=>t instanceof MouseEvent&&(At(e)||ai(e))},Vq=Symbol("anchor"),kVe=ue({name:"ElAnchor"}),PVe=ue({...kVe,props:EVe,emits:TVe,setup(t,{expose:e,emit:n}){const r=t,i=F(""),o=F(null),a=F(null),s=F(),l={};let u=!1,c=0;const d=Qe("anchor"),f=M(()=>[d.b(),r.type==="underline"?d.m("underline"):"",d.m(r.direction)]),h=T=>{l[T.href]=T.el},m=T=>{delete l[T]},g=T=>{i.value!==T&&(i.value=T,n("change",T))};let y=null;const b=T=>{if(!s.value)return;const P=K_(T);if(!P)return;y&&y(),u=!0;const A=v5(P,s.value),D=ok(P,A),N=A.scrollHeight-A.clientHeight,$=Math.min(D-r.offset,N);y=Dxe(s.value,c,$,r.duration,()=>{setTimeout(()=>{u=!1},20)})},w=T=>{T&&(g(T),b(T))},O=(T,P)=>{n("click",T,P),w(P)},S=rEe(()=>{s.value&&(c=y5(s.value));const T=x();u||ai(T)||g(T)}),x=()=>{if(!s.value)return;const T=y5(s.value),P=[];for(const A of Object.keys(l)){const D=K_(A);if(!D)continue;const N=v5(D,s.value),$=ok(D,N);P.push({top:$-r.offset-r.bound,href:A})}P.sort((A,D)=>A.top-D.top);for(let A=0;A<P.length;A++){const D=P[A],N=P[A+1];if(A===0&&T===0)return"";if(D.top<=T&&(!N||N.top>T))return D.href}},C=()=>{const T=K_(r.container);!T||Dx(T)?s.value=window:s.value=T};sr(s,"scroll",S);const E=M(()=>{if(!o.value||!a.value||!i.value)return{};const T=l[i.value];if(!T)return{};const P=o.value.getBoundingClientRect(),A=a.value.getBoundingClientRect(),D=T.getBoundingClientRect();return r.direction==="horizontal"?{left:`${D.left-P.left}px`,width:`${D.width}px`,opacity:1}:{top:`${D.top-P.top+(D.height-A.height)/2}px`,opacity:1}});return Bt(()=>{C();const T=decodeURIComponent(window.location.hash);K_(T)?w(T):S()}),Ve(()=>r.container,()=>{C()}),_n(Vq,{ns:d,direction:r.direction,currentAnchor:i,addLink:h,removeLink:m,handleClick:O}),e({scrollTo:w}),(T,P)=>(R(),G("div",{ref_key:"anchorRef",ref:o,class:j(p(f))},[T.marker?(R(),G("div",{key:0,ref_key:"markerRef",ref:a,class:j(p(d).e("marker")),style:mt(p(E))},null,6)):_e("v-if",!0),J("div",{class:j(p(d).e("list"))},[xe(T.$slots,"default")],2)],2))}});var AVe=Ge(PVe,[["__file","anchor.vue"]]);const MVe=Ye({title:String,href:String}),RVe=ue({name:"ElAnchorLink"}),$Ve=ue({...RVe,props:MVe,setup(t){const e=t,n=F(null),{ns:r,direction:i,currentAnchor:o,addLink:a,removeLink:s,handleClick:l}=ht(Vq),u=M(()=>[r.e("link"),r.is("active",o.value===e.href)]),c=d=>{l(d,e.href)};return Ve(()=>e.href,(d,f)=>{Ot(()=>{f&&s(f),d&&a({href:d,el:n.value})})}),Bt(()=>{const{href:d}=e;d&&a({href:d,el:n.value})}),pr(()=>{const{href:d}=e;d&&s(d)}),(d,f)=>(R(),G("div",{class:j(p(r).e("item"))},[J("a",{ref_key:"linkRef",ref:n,class:j(p(u)),href:d.href,onClick:c},[xe(d.$slots,"default",{},()=>[qe(je(d.title),1)])],10,["href"]),d.$slots["sub-link"]&&p(i)==="vertical"?(R(),G("div",{key:0,class:j(p(r).e("list"))},[xe(d.$slots,"sub-link")],2)):_e("v-if",!0)],2))}});var jq=Ge($Ve,[["__file","anchor-link.vue"]]);const NVe=Vt(AVe,{AnchorLink:jq}),DVe=ti(jq),LVe=Ye({options:{type:Oe(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:Wi,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...wo(["ariaLabel"])}),IVe={[Zt]:t=>At(t)||kt(t)||si(t),[Lr]:t=>At(t)||kt(t)||si(t)},BVe=ue({name:"ElSegmented"}),FVe=ue({...BVe,props:LVe,emits:IVe,setup(t,{emit:e}){const n=t,r=Qe("segmented"),i=bo(),o=Ni(),a=la(),{formItem:s}=ua(),{inputId:l,isLabeledByFormItem:u}=gu(n,{formItemContext:s}),c=F(null),d=Hue(),f=Sn({isInit:!1,width:0,translateX:0,focusVisible:!1}),h=P=>{const A=m(P);e(Zt,A),e(Lr,A)},m=P=>sn(P)?P.value:P,g=P=>sn(P)?P.label:P,y=P=>!!(a.value||(sn(P)?P.disabled:!1)),b=P=>n.modelValue===m(P),w=P=>n.options.find(A=>m(A)===P),O=P=>[r.e("item"),r.is("selected",b(P)),r.is("disabled",y(P))],S=()=>{if(!c.value)return;const P=c.value.querySelector(".is-selected"),A=c.value.querySelector(".is-selected input");if(!P||!A){f.width=0,f.translateX=0,f.focusVisible=!1;return}const D=P.getBoundingClientRect();f.isInit=!0,f.width=D.width,f.translateX=P.offsetLeft;try{f.focusVisible=A.matches(":focus-visible")}catch{}},x=M(()=>[r.b(),r.m(o.value),r.is("block",n.block)]),C=M(()=>({width:`${f.width}px`,transform:`translateX(${f.translateX}px)`,display:f.isInit?"block":"none"})),E=M(()=>[r.e("item-selected"),r.is("disabled",y(w(n.modelValue))),r.is("focus-visible",f.focusVisible)]),T=M(()=>n.name||i.value);return Zr(c,S),Ve(d,S),Ve(()=>n.modelValue,()=>{var P;S(),n.validateEvent&&((P=s==null?void 0:s.validate)==null||P.call(s,"change").catch(A=>void 0))},{flush:"post"}),(P,A)=>P.options.length?(R(),G("div",{key:0,id:p(l),ref_key:"segmentedRef",ref:c,class:j(p(x)),role:"radiogroup","aria-label":p(u)?void 0:P.ariaLabel||"segmented","aria-labelledby":p(u)?p(s).labelId:void 0},[J("div",{class:j(p(r).e("group"))},[J("div",{style:mt(p(C)),class:j(p(E))},null,6),(R(!0),G(ct,null,Wt(P.options,(D,N)=>(R(),G("label",{key:N,class:j(O(D))},[J("input",{class:j(p(r).e("item-input")),type:"radio",name:p(T),disabled:y(D),checked:b(D),onChange:$=>h(D)},null,42,["name","disabled","checked","onChange"]),J("div",{class:j(p(r).e("item-label"))},[xe(P.$slots,"default",{item:D},()=>[qe(je(g(D)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):_e("v-if",!0)}});var VVe=Ge(FVe,[["__file","segmented.vue"]]);const jVe=Vt(VVe),zVe=(t,e)=>{const n=t.toLowerCase();return(e.label||e.value).toLowerCase().includes(n)},QVe=(t,e,n)=>{const{selectionEnd:r}=t;if(r===null)return;const i=t.value,o=$o(e);let a=-1,s;for(let l=r-1;l>=0;--l){const u=i[l];if(u===n||u===`
  72. `||u==="\r"){a=l;continue}if(o.includes(u)){const c=a===-1?r:a;s={pattern:i.slice(l+1,c),start:l+1,end:c,prefix:u,prefixIndex:l,splitIndex:a,selectionEnd:r};break}}return s},HVe=(t,e={debug:!1,useSelectionEnd:!1})=>{const n=t.selectionStart!==null?t.selectionStart:0,r=t.selectionEnd!==null?t.selectionEnd:0,i=e.useSelectionEnd?r:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(e.debug){const f=document.querySelector("#input-textarea-caret-position-mirror-div");f!=null&&f.parentNode&&f.parentNode.removeChild(f)}const a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);const s=a.style,l=window.getComputedStyle(t),u=t.nodeName==="INPUT";s.whiteSpace=u?"nowrap":"pre-wrap",u||(s.wordWrap="break-word"),s.position="absolute",e.debug||(s.visibility="hidden"),o.forEach(f=>{if(u&&f==="lineHeight")if(l.boxSizing==="border-box"){const h=Number.parseInt(l.height),m=Number.parseInt(l.paddingTop)+Number.parseInt(l.paddingBottom)+Number.parseInt(l.borderTopWidth)+Number.parseInt(l.borderBottomWidth),g=m+Number.parseInt(l.lineHeight);h>g?s.lineHeight=`${h-m}px`:h===g?s.lineHeight=l.lineHeight:s.lineHeight="0"}else s.lineHeight=l.height;else s[f]=l[f]}),nR()?t.scrollHeight>Number.parseInt(l.height)&&(s.overflowY="scroll"):s.overflow="hidden",a.textContent=t.value.slice(0,Math.max(0,i)),u&&a.textContent&&(a.textContent=a.textContent.replace(/\s/g,"\xA0"));const c=document.createElement("span");c.textContent=t.value.slice(Math.max(0,i))||".",c.style.position="relative",c.style.left=`${-t.scrollLeft}px`,c.style.top=`${-t.scrollTop}px`,a.appendChild(c);const d={top:c.offsetTop+Number.parseInt(l.borderTopWidth),left:c.offsetLeft+Number.parseInt(l.borderLeftWidth),height:Number.parseInt(l.fontSize)*1.5};return e.debug?c.style.backgroundColor="#aaa":document.body.removeChild(a),d.left>=t.clientWidth&&(d.left=t.clientWidth),d},WVe=Ye({...L$,options:{type:Oe(Array),default:()=>[]},prefix:{type:Oe([String,Array]),default:"@",validator:t=>At(t)?t.length===1:t.every(e=>At(e)&&e.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:Oe([Boolean,Function]),default:()=>zVe,validator:t=>t===!1?!0:$t(t)},placement:{type:Oe(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:Oe(Function)},modelValue:String,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})}}),UVe={[Zt]:t=>At(t),search:(t,e)=>At(t)&&At(e),select:(t,e)=>At(t.value)&&At(e),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},qVe=Ye({options:{type:Oe(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),YVe={select:t=>At(t.value)},XVe=ue({name:"ElMentionDropdown"}),ZVe=ue({...XVe,props:qVe,emits:YVe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("mention"),{t:o}=kn(),a=F(-1),s=F(),l=F(),u=F(),c=(O,S)=>[i.be("dropdown","item"),i.is("hovering",a.value===S),i.is("disabled",O.disabled||r.disabled)],d=O=>{O.disabled||r.disabled||n("select",O)},f=O=>{a.value=O},h=M(()=>r.disabled||r.options.every(O=>O.disabled)),m=M(()=>r.options[a.value]),g=()=>{!m.value||n("select",m.value)},y=O=>{const{options:S}=r;if(S.length===0||h.value)return;O==="next"?(a.value++,a.value===S.length&&(a.value=0)):O==="prev"&&(a.value--,a.value<0&&(a.value=S.length-1));const x=S[a.value];if(x.disabled){y(O);return}Ot(()=>b(x))},b=O=>{var S,x,C,E;const{options:T}=r,P=T.findIndex(D=>D.value===O.value),A=(S=l.value)==null?void 0:S[P];if(A){const D=(C=(x=u.value)==null?void 0:x.querySelector)==null?void 0:C.call(x,`.${i.be("dropdown","wrap")}`);D&&i$(D,A)}(E=s.value)==null||E.handleScroll()};return Ve(()=>r.options,()=>{h.value||r.options.length===0?a.value=-1:a.value=0},{immediate:!0}),e({hoveringIndex:a,navigateOptions:y,selectHoverOption:g,hoverOption:m}),(O,S)=>(R(),G("div",{ref_key:"dropdownRef",ref:u,class:j(p(i).b("dropdown"))},[O.$slots.header?(R(),G("div",{key:0,class:j(p(i).be("dropdown","header"))},[xe(O.$slots,"header")],2)):_e("v-if",!0),Ht(B(p(mu),{id:O.contentId,ref_key:"scrollbarRef",ref:s,tag:"ul","wrap-class":p(i).be("dropdown","wrap"),"view-class":p(i).be("dropdown","list"),role:"listbox","aria-label":O.ariaLabel,"aria-orientation":"vertical"},{default:z(()=>[(R(!0),G(ct,null,Wt(O.options,(x,C)=>(R(),G("li",{id:`${O.contentId}-${C}`,ref_for:!0,ref_key:"optionRefs",ref:l,key:x.value,class:j(c(x,C)),role:"option","aria-disabled":x.disabled||O.disabled||void 0,"aria-selected":a.value===C,onMouseenter:E=>f(C),onClick:Pt(E=>d(x),["stop"])},[xe(O.$slots,"label",{item:x,index:C},()=>{var E;return[J("span",null,je((E=x.label)!=null?E:x.value),1)]})],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[zn,O.options.length>0&&!O.loading]]),O.loading?(R(),G("div",{key:1,class:j(p(i).be("dropdown","loading"))},[xe(O.$slots,"loading",{},()=>[qe(je(p(o)("el.mention.loading")),1)])],2)):_e("v-if",!0),O.$slots.footer?(R(),G("div",{key:2,class:j(p(i).be("dropdown","footer"))},[xe(O.$slots,"footer")],2)):_e("v-if",!0)],2))}});var GVe=Ge(ZVe,[["__file","mention-dropdown.vue"]]);const KVe=ue({name:"ElMention",inheritAttrs:!1}),JVe=ue({...KVe,props:WVe,emits:UVe,setup(t,{expose:e,emit:n}){const r=t,i=M(()=>vo(r,Object.keys(L$))),o=Qe("mention"),a=la(),s=bo(),l=F(),u=F(),c=F(),d=F(!1),f=F(),h=F(),m=M(()=>r.showArrow?r.placement:`${r.placement}-start`),g=M(()=>r.showArrow?["bottom","top"]:["bottom-start","top-start"]),y=M(()=>{const{filterOption:N,options:$}=r;return!h.value||!N?$:$.filter(W=>N(h.value.pattern,W))}),b=M(()=>d.value&&(!!y.value.length||r.loading)),w=M(()=>{var N;return`${s.value}-${(N=c.value)==null?void 0:N.hoveringIndex}`}),O=N=>{n("update:modelValue",N),P()},S=N=>{var $,W,L,I;if("key"in N&&!(($=l.value)!=null&&$.isComposing)){if(["ArrowLeft","ArrowRight"].includes(N.key))P();else if(["ArrowUp","ArrowDown"].includes(N.key)){if(!d.value)return;N.preventDefault();const U=N.key==="ArrowUp"?"prev":"next";(W=c.value)==null||W.navigateOptions(U)}else if(["Enter"].includes(N.key)){if(!d.value)return;N.preventDefault(),(L=c.value)!=null&&L.hoverOption?(I=c.value)==null||I.selectHoverOption():d.value=!1}else if(["Escape"].includes(N.key)){if(!d.value)return;N.preventDefault(),d.value=!1}else if(["Backspace"].includes(N.key)&&r.whole&&h.value){const{splitIndex:U,selectionEnd:Q,pattern:V,prefixIndex:q,prefix:K}=h.value,ie=T();if(!ie)return;const oe=ie.value,Se=r.options.find(Y=>Y.value===V);if(($t(r.checkIsWhole)?r.checkIsWhole(V,K):Se)&&U!==-1&&U+1===Q){N.preventDefault();const Y=oe.slice(0,q)+oe.slice(U+1);n(Zt,Y);const re=q;Ot(()=>{ie.selectionStart=re,ie.selectionEnd=re,D()})}}}},{wrapperRef:x}=Pb(l,{beforeFocus(){return a.value},afterFocus(){P()},beforeBlur(N){var $;return($=u.value)==null?void 0:$.isFocusInsideContent(N)},afterBlur(){d.value=!1}}),C=()=>{P()},E=N=>{if(!h.value)return;const $=T();if(!$)return;const W=$.value,{split:L}=r,I=W.slice(h.value.end),U=I.startsWith(L),Q=`${N.value}${U?"":L}`,V=W.slice(0,h.value.start)+Q+I;n(Zt,V),n("select",N,h.value.prefix);const q=h.value.start+Q.length+(U?1:0);Ot(()=>{$.selectionStart=q,$.selectionEnd=q,$.focus(),D()})},T=()=>{var N,$;return r.type==="textarea"?(N=l.value)==null?void 0:N.textarea:($=l.value)==null?void 0:$.input},P=()=>{setTimeout(()=>{A(),D(),Ot(()=>{var N;return(N=u.value)==null?void 0:N.updatePopper()})},0)},A=()=>{const N=T();if(!N)return;const $=HVe(N),W=N.getBoundingClientRect(),L=l.value.$el.getBoundingClientRect();f.value={position:"absolute",width:0,height:`${$.height}px`,left:`${$.left+W.left-L.left}px`,top:`${$.top+W.top-L.top}px`}},D=()=>{const N=T();if(document.activeElement!==N){d.value=!1;return}const{prefix:$,split:W}=r;if(h.value=QVe(N,$,W),h.value&&h.value.splitIndex===-1){d.value=!0,n("search",h.value.pattern,h.value.prefix);return}d.value=!1};return e({input:l,tooltip:u,dropdownVisible:b}),(N,$)=>(R(),G("div",{ref_key:"wrapperRef",ref:x,class:j(p(o).b())},[B(p(hi),gn(gn(p(i),N.$attrs),{ref_key:"elInputRef",ref:l,"model-value":N.modelValue,disabled:p(a),role:p(b)?"combobox":void 0,"aria-activedescendant":p(b)?p(w)||"":void 0,"aria-controls":p(b)?p(s):void 0,"aria-expanded":p(b)||void 0,"aria-label":N.ariaLabel,"aria-autocomplete":p(b)?"none":void 0,"aria-haspopup":p(b)?"listbox":void 0,onInput:O,onKeydown:S,onMousedown:C}),ts({_:2},[Wt(N.$slots,(W,L)=>({name:L,fn:z(I=>[xe(N.$slots,L,Xl(lf(I)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),B(p(Ui),{ref_key:"tooltipRef",ref:u,visible:p(b),"popper-class":[p(o).e("popper"),N.popperClass],"popper-options":N.popperOptions,placement:p(m),"fallback-placements":p(g),effect:"light",pure:"",offset:N.offset,"show-arrow":N.showArrow},{default:z(()=>[J("div",{style:mt(f.value)},null,4)]),content:z(()=>{var W;return[B(GVe,{ref_key:"dropdownRef",ref:c,options:p(y),disabled:p(a),loading:N.loading,"content-id":p(s),"aria-label":N.ariaLabel,onSelect:E,onClick:Pt((W=l.value)==null?void 0:W.focus,["stop"])},ts({_:2},[Wt(N.$slots,(L,I)=>({name:I,fn:z(U=>[xe(N.$slots,I,Xl(lf(U)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var eje=Ge(JVe,[["__file","mention.vue"]]);const tje=Vt(eje);var nje=[C2e,kH,KPe,EBe,iAe,dAe,QH,SAe,xAe,lr,ZH,$Me,BMe,ZMe,GMe,GRe,$W,r$e,Is,dRe,xW,ho,Zx,Gx,Xx,J$e,EH,dNe,fNe,hNe,pNe,gNe,tDe,KW,JW,Ma,oU,K$,bLe,_Le,OLe,pU,El,Tl,gt,mU,gU,hi,vU,XLe,gIe,mIe,vIe,yIe,xIe,eC,_3e,P3e,VH,EU,MW,xRe,SRe,F3e,H3e,fo,mu,Ol,Yc,XIe,P4e,I4e,B4e,d5e,m5e,WU,T5e,L5e,I5e,Xm,Rb,$b,CBe,wp,Sp,Bs,iC,pMe,XBe,e6e,t6e,Ui,E6e,F6e,T0,iFe,OFe,Iq,JFe,xVe,CVe,NVe,DVe,jVe,tje];const Js="ElInfiniteScroll",rje=50,ije=200,oje=0,aje={delay:{type:Number,default:ije},distance:{type:Number,default:oje},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},EN=(t,e)=>Object.entries(aje).reduce((n,[r,i])=>{var o,a;const{type:s,default:l}=i,u=t.getAttribute(`infinite-scroll-${r}`);let c=(a=(o=e[u])!=null?o:u)!=null?a:l;return c=c==="false"?!1:c,c=s(c),n[r]=Number.isNaN(c)?l:c,n},{}),zq=t=>{const{observer:e}=t[Js];e&&(e.disconnect(),delete t[Js].observer)},sje=(t,e)=>{const{container:n,containerEl:r,instance:i,observer:o,lastScrollTop:a}=t[Js],{disabled:s,distance:l}=EN(t,i),{clientHeight:u,scrollHeight:c,scrollTop:d}=r,f=d-a;if(t[Js].lastScrollTop=d,o||s||f<0)return;let h=!1;if(n===t)h=c-(u+d)<=l;else{const{clientTop:m,scrollHeight:g}=t,y=ok(t,r);h=d+u>=y+m+g-l}h&&e.call(i)};function VT(t,e){const{containerEl:n,instance:r}=t[Js],{disabled:i}=EN(t,r);i||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?e.call(r):zq(t))}const lje={async mounted(t,e){const{instance:n,value:r}=e;$t(r)||Hi(Js,"'v-infinite-scroll' binding value must be a function"),await Ot();const{delay:i,immediate:o}=EN(t,n),a=r$(t,!0),s=a===window?document.documentElement:a,l=Vc(sje.bind(null,t,r),i);if(!!a){if(t[Js]={instance:n,container:a,containerEl:s,delay:i,cb:r,onScroll:l,lastScrollTop:s.scrollTop},o){const u=new MutationObserver(Vc(VT.bind(null,t,r),rje));t[Js].observer=u,u.observe(t,{childList:!0,subtree:!0}),VT(t,r)}a.addEventListener("scroll",l)}},unmounted(t){if(!t[Js])return;const{container:e,onScroll:n}=t[Js];e==null||e.removeEventListener("scroll",n),zq(t)},async updated(t){if(!t[Js])await Ot();else{const{containerEl:e,cb:n,observer:r}=t[Js];e.clientHeight&&r&&VT(t,n)}}},vP=lje;vP.install=t=>{t.directive("InfiniteScroll",vP)};const uje=vP;function cje(t){let e;const n=F(!1),r=Sn({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(f){r.text=f}function o(){const f=r.parent,h=d.ns;if(!f.vLoadingAddClassList){let m=f.getAttribute("loading-number");m=Number.parseInt(m)-1,m?f.setAttribute("loading-number",m.toString()):(aa(f,h.bm("parent","relative")),f.removeAttribute("loading-number")),aa(f,h.bm("parent","hidden"))}a(),c.unmount()}function a(){var f,h;(h=(f=d.$el)==null?void 0:f.parentNode)==null||h.removeChild(d.$el)}function s(){var f;t.beforeClose&&!t.beforeClose()||(n.value=!0,clearTimeout(e),e=setTimeout(l,400),r.visible=!1,(f=t.closed)==null||f.call(t))}function l(){if(!n.value)return;const f=r.parent;n.value=!1,f.vLoadingAddClassList=void 0,o()}const u=ue({name:"ElLoading",setup(f,{expose:h}){const{ns:m,zIndex:g}=Ux("loading");return h({ns:m,zIndex:g}),()=>{const y=r.spinner||r.svg,b=Et("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[Et("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),w=r.text?Et("p",{class:m.b("text")},[r.text]):void 0;return Et(Qi,{name:m.b("fade"),onAfterLeave:l},{default:z(()=>[Ht(B("div",{style:{backgroundColor:r.background||""},class:[m.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[Et("div",{class:m.b("spinner")},[b,w])]),[[zn,r.visible]])])})}}}),c=px(u),d=c.mount(document.createElement("div"));return{...Ri(r),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:l,vm:d,get $el(){return d.$el}}}let hO;const yP=function(t={}){if(!Tn)return;const e=dje(t);if(e.fullscreen&&hO)return hO;const n=cje({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(hO=void 0)}});fje(e,e.parent,n),sB(e,e.parent,n),e.parent.vLoadingAddClassList=()=>sB(e,e.parent,n);let r=e.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",e.parent.setAttribute("loading-number",r),e.parent.appendChild(n.$el),Ot(()=>n.visible.value=e.visible),e.fullscreen&&(hO=n),n},dje=t=>{var e,n,r,i;let o;return At(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((n=t.fullscreen)!=null?n:!0),lock:(r=t.lock)!=null?r:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,beforeClose:t.beforeClose,closed:t.closed,target:o}},fje=async(t,e,n)=>{const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(t.fullscreen)n.originalPosition.value=Id(document.body,"position"),n.originalOverflow.value=Id(document.body,"overflow"),i.zIndex=r();else if(t.parent===document.body){n.originalPosition.value=Id(document.body,"position"),await Ot();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(Id(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Id(e,"position");for(const[o,a]of Object.entries(i))n.$el.style[o]=a},sB=(t,e,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?aa(e,r.bm("parent","relative")):rl(e,r.bm("parent","relative")),t.fullscreen&&t.lock?rl(e,r.bm("parent","hidden")):aa(e,r.bm("parent","hidden"))},R1=Symbol("ElLoading"),lB=(t,e)=>{var n,r,i,o;const a=e.instance,s=f=>sn(e.value)?e.value[f]:void 0,l=f=>{const h=At(f)&&(a==null?void 0:a[f])||f;return h&&F(h)},u=f=>l(s(f)||t.getAttribute(`element-loading-${Mf(f)}`)),c=(n=s("fullscreen"))!=null?n:e.modifiers.fullscreen,d={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:c,target:(r=s("target"))!=null?r:c?void 0:t,body:(i=s("body"))!=null?i:e.modifiers.body,lock:(o=s("lock"))!=null?o:e.modifiers.lock};t[R1]={options:d,instance:yP(d)}},hje=(t,e)=>{for(const n of Object.keys(e))kr(e[n])&&(e[n].value=t[n])},bP={mounted(t,e){e.value&&lB(t,e)},updated(t,e){const n=t[R1];e.oldValue!==e.value&&(e.value&&!e.oldValue?lB(t,e):e.value&&e.oldValue?sn(e.value)&&hje(e.value,n.options):n==null||n.instance.close())},unmounted(t){var e;(e=t[R1])==null||e.instance.close(),t[R1]=null}},pje={install(t){t.directive("loading",bP),t.config.globalProperties.$loading=yP},directive:bP,service:yP},Qq=["success","info","warning","error"],Go=Jr({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Tn?document.body:void 0}),gje=Ye({customClass:{type:String,default:Go.customClass},center:{type:Boolean,default:Go.center},dangerouslyUseHTMLString:{type:Boolean,default:Go.dangerouslyUseHTMLString},duration:{type:Number,default:Go.duration},icon:{type:fr,default:Go.icon},id:{type:String,default:Go.id},message:{type:Oe([String,Object,Function]),default:Go.message},onClose:{type:Oe(Function),default:Go.onClose},showClose:{type:Boolean,default:Go.showClose},type:{type:String,values:Qq,default:Go.type},plain:{type:Boolean,default:Go.plain},offset:{type:Number,default:Go.offset},zIndex:{type:Number,default:Go.zIndex},grouping:{type:Boolean,default:Go.grouping},repeatNum:{type:Number,default:Go.repeatNum}}),mje={destroy:()=>!0},Gl=fz([]),vje=t=>{const e=Gl.findIndex(i=>i.id===t),n=Gl[e];let r;return e>0&&(r=Gl[e-1]),{current:n,prev:r}},yje=t=>{const{prev:e}=vje(t);return e?e.vm.exposed.bottom.value:0},bje=(t,e)=>Gl.findIndex(r=>r.id===t)>0?16:e,_je=ue({name:"ElMessage"}),Oje=ue({..._je,props:gje,emits:mje,setup(t,{expose:e}){const n=t,{Close:r}=h$,{ns:i,zIndex:o}=Ux("message"),{currentZIndex:a,nextZIndex:s}=o,l=F(),u=F(!1),c=F(0);let d;const f=M(()=>n.type?n.type==="error"?"danger":n.type:"info"),h=M(()=>{const E=n.type;return{[i.bm("icon",E)]:E&&bf[E]}}),m=M(()=>n.icon||bf[n.type]||""),g=M(()=>yje(n.id)),y=M(()=>bje(n.id,n.offset)+g.value),b=M(()=>c.value+y.value),w=M(()=>({top:`${y.value}px`,zIndex:a.value}));function O(){n.duration!==0&&({stop:d}=Xh(()=>{x()},n.duration))}function S(){d==null||d()}function x(){u.value=!1}function C({code:E}){E===St.esc&&x()}return Bt(()=>{O(),s(),u.value=!0}),Ve(()=>n.repeatNum,()=>{S(),O()}),sr(document,"keydown",C),Zr(l,()=>{c.value=l.value.getBoundingClientRect().height}),e({visible:u,bottom:b,close:x}),(E,T)=>(R(),we(Qi,{name:p(i).b("fade"),onBeforeLeave:E.onClose,onAfterLeave:P=>E.$emit("destroy"),persisted:""},{default:z(()=>[Ht(J("div",{id:E.id,ref_key:"messageRef",ref:l,class:j([p(i).b(),{[p(i).m(E.type)]:E.type},p(i).is("center",E.center),p(i).is("closable",E.showClose),p(i).is("plain",E.plain),E.customClass]),style:mt(p(w)),role:"alert",onMouseenter:S,onMouseleave:O},[E.repeatNum>1?(R(),we(p(QH),{key:0,value:E.repeatNum,type:p(f),class:j(p(i).e("badge"))},null,8,["value","type","class"])):_e("v-if",!0),p(m)?(R(),we(p(gt),{key:1,class:j([p(i).e("icon"),p(h)])},{default:z(()=>[(R(),we(un(p(m))))]),_:1},8,["class"])):_e("v-if",!0),xe(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(R(),G(ct,{key:1},[_e(" Caution here, message could've been compromised, never use user's input as message "),J("p",{class:j(p(i).e("content")),innerHTML:E.message},null,10,["innerHTML"])],2112)):(R(),G("p",{key:0,class:j(p(i).e("content"))},je(E.message),3))]),E.showClose?(R(),we(p(gt),{key:2,class:j(p(i).e("closeBtn")),onClick:Pt(x,["stop"])},{default:z(()=>[B(p(r))]),_:1},8,["class","onClick"])):_e("v-if",!0)],46,["id"]),[[zn,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var wje=Ge(Oje,[["__file","message.vue"]]);let Sje=1;const Hq=t=>{const e=!t||At(t)||Kr(t)||$t(t)?{message:t}:t,n={...Go,...e};if(!n.appendTo)n.appendTo=document.body;else if(At(n.appendTo)){let r=document.querySelector(n.appendTo);As(r)||(r=document.body),n.appendTo=r}return si(Ql.grouping)&&!n.grouping&&(n.grouping=Ql.grouping),kt(Ql.duration)&&n.duration===3e3&&(n.duration=Ql.duration),kt(Ql.offset)&&n.offset===16&&(n.offset=Ql.offset),si(Ql.showClose)&&!n.showClose&&(n.showClose=Ql.showClose),n},xje=t=>{const e=Gl.indexOf(t);if(e===-1)return;Gl.splice(e,1);const{handler:n}=t;n.close()},Cje=({appendTo:t,...e},n)=>{const r=`message_${Sje++}`,i=e.onClose,o=document.createElement("div"),a={...e,id:r,onClose:()=>{i==null||i(),xje(c)},onDestroy:()=>{uf(null,o)}},s=B(wje,a,$t(a.message)||Kr(a.message)?{default:$t(a.message)?a.message:()=>a.message}:null);s.appContext=n||sm._context,uf(s,o),t.appendChild(o.firstElementChild);const l=s.component,c={id:r,vnode:s,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:s.component.props};return c},sm=(t={},e)=>{if(!Tn)return{close:()=>{}};const n=Hq(t);if(n.grouping&&Gl.length){const i=Gl.find(({vnode:o})=>{var a;return((a=o.props)==null?void 0:a.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(kt(Ql.max)&&Gl.length>=Ql.max)return{close:()=>{}};const r=Cje(n,e);return Gl.push(r),r.handler};Qq.forEach(t=>{sm[t]=(e={},n)=>{const r=Hq(e);return sm({...r,type:t},n)}});function Eje(t){for(const e of Gl)(!t||t===e.props.type)&&e.handler.close()}sm.closeAll=Eje;sm._context=null;const Vr=HQ(sm,"$message"),Tje=ue({name:"ElMessageBox",directives:{TrapFocus:JAe},components:{ElButton:lr,ElFocusTrap:Mb,ElInput:hi,ElOverlay:G$,ElIcon:gt,...h$},inheritAttrs:!1,props:{buttonSize:{type:String,validator:WQ},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:r,ns:i,size:o}=Ux("message-box",M(()=>t.buttonSize)),{t:a}=n,{nextZIndex:s}=r,l=F(!1),u=Sn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Bc(Ku),cancelButtonLoadingIcon:Bc(Ku),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),c=M(()=>{const I=u.type;return{[i.bm("icon",I)]:I&&bf[I]}}),d=bo(),f=bo(),h=M(()=>u.icon||bf[u.type]||""),m=M(()=>!!u.message),g=F(),y=F(),b=F(),w=F(),O=F(),S=M(()=>u.confirmButtonClass);Ve(()=>u.inputValue,async I=>{await Ot(),t.boxType==="prompt"&&I!==null&&N()},{immediate:!0}),Ve(()=>l.value,I=>{var U,Q;I&&(t.boxType!=="prompt"&&(u.autofocus?b.value=(Q=(U=O.value)==null?void 0:U.$el)!=null?Q:g.value:b.value=g.value),u.zIndex=s()),t.boxType==="prompt"&&(I?Ot().then(()=>{var V;w.value&&w.value.$el&&(u.autofocus?b.value=(V=$())!=null?V:g.value:b.value=g.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=M(()=>t.draggable),C=M(()=>t.overflow);UQ(g,y,x,C),Bt(async()=>{await Ot(),t.closeOnHashChange&&window.addEventListener("hashchange",E)}),pr(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){!l.value||(l.value=!1,Ot(()=>{u.action&&e("action",u.action)}))}const T=()=>{t.closeOnClickModal&&D(u.distinguishCancelAndClose?"close":"cancel")},P=E$(T),A=I=>{if(u.inputType!=="textarea")return I.preventDefault(),D("confirm")},D=I=>{var U;t.boxType==="prompt"&&I==="confirm"&&!N()||(u.action=I,u.beforeClose?(U=u.beforeClose)==null||U.call(u,I,u,E):E())},N=()=>{if(t.boxType==="prompt"){const I=u.inputPattern;if(I&&!I.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const U=u.inputValidator;if(typeof U=="function"){const Q=U(u.inputValue);if(Q===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(typeof Q=="string")return u.editorErrorMessage=Q,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},$=()=>{const I=w.value.$refs;return I.input||I.textarea},W=()=>{D("close")},L=()=>{t.closeOnPressEscape&&W()};return t.lockScroll&&v$(l),{...Ri(u),ns:i,overlayEvent:P,visible:l,hasMessage:m,typeClass:c,contentId:d,inputId:f,btnSize:o,iconComponent:h,confirmButtonClasses:S,rootRef:g,focusStartRef:b,headerRef:y,inputRef:w,confirmRef:O,doClose:E,handleClose:W,onCloseRequested:L,handleWrapperClick:T,handleInputEnter:A,handleAction:D,t:a}}});function kje(t,e,n,r,i,o){const a=an("el-icon"),s=an("close"),l=an("el-input"),u=an("el-button"),c=an("el-focus-trap"),d=an("el-overlay");return R(),we(Qi,{name:"fade-in-linear",onAfterLeave:f=>t.$emit("vanish"),persisted:""},{default:z(()=>[Ht(B(d,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:z(()=>[J("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:j(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[B(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:z(()=>[J("div",{ref:"rootRef",class:j([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:mt(t.customStyle),tabindex:"-1",onClick:Pt(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(R(),G("div",{key:0,ref:"headerRef",class:j([t.ns.e("header"),{"show-close":t.showClose}])},[J("div",{class:j(t.ns.e("title"))},[t.iconComponent&&t.center?(R(),we(a,{key:0,class:j([t.ns.e("status"),t.typeClass])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])):_e("v-if",!0),J("span",null,je(t.title),1)],2),t.showClose?(R(),G("button",{key:0,type:"button",class:j(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:f=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:br(Pt(f=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[B(a,{class:j(t.ns.e("close"))},{default:z(()=>[B(s)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):_e("v-if",!0)],2)):_e("v-if",!0),J("div",{id:t.contentId,class:j(t.ns.e("content"))},[J("div",{class:j(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(R(),we(a,{key:0,class:j([t.ns.e("status"),t.typeClass])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])):_e("v-if",!0),t.hasMessage?(R(),G("div",{key:1,class:j(t.ns.e("message"))},[xe(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(R(),we(un(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(R(),we(un(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0},{default:z(()=>[qe(je(t.dangerouslyUseHTMLString?"":t.message),1)]),_:1},8,["for"]))])],2)):_e("v-if",!0)],2),Ht(J("div",{class:j(t.ns.e("input"))},[B(l,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":f=>t.inputValue=f,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:j({invalid:t.validateError}),onKeydown:br(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),J("div",{class:j(t.ns.e("errormsg")),style:mt({visibility:t.editorErrorMessage?"visible":"hidden"})},je(t.editorErrorMessage),7)],2),[[zn,t.showInput]])],10,["id"]),J("div",{class:j(t.ns.e("btns"))},[t.showCancelButton?(R(),we(u,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:j([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:f=>t.handleAction("cancel"),onKeydown:br(Pt(f=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:z(()=>[qe(je(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):_e("v-if",!0),Ht(B(u,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:j([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:f=>t.handleAction("confirm"),onKeydown:br(Pt(f=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:z(()=>[qe(je(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[zn,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[zn,t.visible]])]),_:3},8,["onAfterLeave"])}var Pje=Ge(Tje,[["render",kje],["__file","index.vue"]]);const k0=new Map,Aje=t=>{let e=document.body;return t.appendTo&&(At(t.appendTo)&&(e=document.querySelector(t.appendTo)),As(t.appendTo)&&(e=t.appendTo),As(e)||(e=document.body)),e},Mje=(t,e,n=null)=>{const r=B(Pje,t,$t(t.message)||Kr(t.message)?{default:$t(t.message)?t.message:()=>t.message}:null);return r.appContext=n,uf(r,e),Aje(t).appendChild(e.firstElementChild),r.component},Rje=()=>document.createElement("div"),$je=(t,e)=>{const n=Rje();t.onVanish=()=>{uf(null,n),k0.delete(i)},t.onAction=o=>{const a=k0.get(i);let s;t.showInput?s={value:i.inputValue,action:o}:s=o,t.callback?t.callback(s,r.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=Mje(t,n,e),i=r.proxy;for(const o in t)Dn(t,o)&&!Dn(i.$props,o)&&(i[o]=t[o]);return i.visible=!0,i};function Zm(t,e=null){if(!Tn)return Promise.reject();let n;return At(t)||Kr(t)?t={message:t}:n=t.callback,new Promise((r,i)=>{const o=$je(t,e!=null?e:Zm._context);k0.set(o,{options:t,callback:n,resolve:r,reject:i})})}const Nje=["alert","confirm","prompt"],Dje={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Nje.forEach(t=>{Zm[t]=Lje(t)});function Lje(t){return(e,n,r,i)=>{let o="";return sn(n)?(r=n,o=""):ai(n)?o="":o=n,Zm(Object.assign({title:o,message:e,type:"",...Dje[t]},r,{boxType:t}),i)}}Zm.close=()=>{k0.forEach((t,e)=>{e.doClose()}),k0.clear()};Zm._context=null;const Td=Zm;Td.install=t=>{Td._context=t._context,t.config.globalProperties.$msgbox=Td,t.config.globalProperties.$messageBox=Td,t.config.globalProperties.$alert=Td.alert,t.config.globalProperties.$confirm=Td.confirm,t.config.globalProperties.$prompt=Td.prompt};const Mw=Td,Wq=["success","info","warning","error"],Ije=Ye({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:fr},id:{type:String,default:""},message:{type:Oe([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:Oe(Function),default:()=>{}},onClose:{type:Oe(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:[...Wq,""],default:""},zIndex:Number}),Bje={destroy:()=>!0},Fje=ue({name:"ElNotification"}),Vje=ue({...Fje,props:Ije,emits:Bje,setup(t,{expose:e}){const n=t,{ns:r,zIndex:i}=Ux("notification"),{nextZIndex:o,currentZIndex:a}=i,{Close:s}=f$,l=F(!1);let u;const c=M(()=>{const O=n.type;return O&&bf[n.type]?r.m(O):""}),d=M(()=>n.type&&bf[n.type]||n.icon),f=M(()=>n.position.endsWith("right")?"right":"left"),h=M(()=>n.position.startsWith("top")?"top":"bottom"),m=M(()=>{var O;return{[h.value]:`${n.offset}px`,zIndex:(O=n.zIndex)!=null?O:a.value}});function g(){n.duration>0&&({stop:u}=Xh(()=>{l.value&&b()},n.duration))}function y(){u==null||u()}function b(){l.value=!1}function w({code:O}){O===St.delete||O===St.backspace?y():O===St.esc?l.value&&b():g()}return Bt(()=>{g(),o(),l.value=!0}),sr(document,"keydown",w),e({visible:l,close:b}),(O,S)=>(R(),we(Qi,{name:p(r).b("fade"),onBeforeLeave:O.onClose,onAfterLeave:x=>O.$emit("destroy"),persisted:""},{default:z(()=>[Ht(J("div",{id:O.id,class:j([p(r).b(),O.customClass,p(f)]),style:mt(p(m)),role:"alert",onMouseenter:y,onMouseleave:g,onClick:O.onClick},[p(d)?(R(),we(p(gt),{key:0,class:j([p(r).e("icon"),p(c)])},{default:z(()=>[(R(),we(un(p(d))))]),_:1},8,["class"])):_e("v-if",!0),J("div",{class:j(p(r).e("group"))},[J("h2",{class:j(p(r).e("title")),textContent:je(O.title)},null,10,["textContent"]),Ht(J("div",{class:j(p(r).e("content")),style:mt(O.title?void 0:{margin:0})},[xe(O.$slots,"default",{},()=>[O.dangerouslyUseHTMLString?(R(),G(ct,{key:1},[_e(" Caution here, message could've been compromised, never use user's input as message "),J("p",{innerHTML:O.message},null,8,["innerHTML"])],2112)):(R(),G("p",{key:0},je(O.message),1))])],6),[[zn,O.message]]),O.showClose?(R(),we(p(gt),{key:0,class:j(p(r).e("closeBtn")),onClick:Pt(b,["stop"])},{default:z(()=>[B(p(s))]),_:1},8,["class","onClick"])):_e("v-if",!0)],2)],46,["id","onClick"]),[[zn,l.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var jje=Ge(Vje,[["__file","notification.vue"]]);const Rw={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},_P=16;let zje=1;const lm=function(t={},e=null){if(!Tn)return{close:()=>{}};(typeof t=="string"||Kr(t))&&(t={message:t});const n=t.position||"top-right";let r=t.offset||0;Rw[n].forEach(({vm:c})=>{var d;r+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+_P}),r+=_P;const i=`notification_${zje++}`,o=t.onClose,a={...t,offset:r,id:i,onClose:()=>{Qje(i,n,o)}};let s=document.body;As(t.appendTo)?s=t.appendTo:At(t.appendTo)&&(s=document.querySelector(t.appendTo)),As(s)||(s=document.body);const l=document.createElement("div"),u=B(jje,a,Kr(a.message)?{default:()=>a.message}:null);return u.appContext=e!=null?e:lm._context,u.props.onDestroy=()=>{uf(null,l)},uf(u,l),Rw[n].push({vm:u}),s.appendChild(l.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};Wq.forEach(t=>{lm[t]=(e={})=>((typeof e=="string"||Kr(e))&&(e={message:e}),lm({...e,type:t}))});function Qje(t,e,n){const r=Rw[e],i=r.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===t});if(i===-1)return;const{vm:o}=r[i];if(!o)return;n==null||n(o);const a=o.el.offsetHeight,s=e.split("-")[0];r.splice(i,1);const l=r.length;if(!(l<1))for(let u=i;u<l;u++){const{el:c,component:d}=r[u].vm,f=Number.parseInt(c.style[s],10)-a-_P;d.props.offset=f}}function Hje(){for(const t of Object.values(Rw))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}lm.closeAll=Hje;lm._context=null;const Wje=HQ(lm,"$notify");var Uje=[uje,pje,Vr,Mw,Wje,CU],qje=b2e([...nje,...Uje]),Uq={name:"zh-cn",el:{breadcrumb:{label:"\u9762\u5305\u5C51"},colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A",defaultLabel:"\u989C\u8272\u9009\u62E9\u5668",description:"\u5F53\u524D\u989C\u8272 {color}\uFF0C\u6309 Enter \u952E\u9009\u62E9\u65B0\u989C\u8272",alphaLabel:"\u9009\u62E9\u900F\u660E\u5EA6\u7684\u503C"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",dateTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u65E5\u671F",monthTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u6708\u4EFD",yearTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u5E74\u4EFD",selectedDate:"\u5DF2\u9009\u65E5\u671F",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},weeksFull:{sun:"\u661F\u671F\u65E5",mon:"\u661F\u671F\u4E00",tue:"\u661F\u671F\u4E8C",wed:"\u661F\u671F\u4E09",thu:"\u661F\u671F\u56DB",fri:"\u661F\u671F\u4E94",sat:"\u661F\u671F\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},inputNumber:{decrease:"\u51CF\u5C11\u6570\u503C",increase:"\u589E\u52A0\u6570\u503C"},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},dropdown:{toggleDropdown:"\u5207\u6362\u4E0B\u62C9\u9009\u9879"},mention:{loading:"\u52A0\u8F7D\u4E2D"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},dialog:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},drawer:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!",close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},slider:{defaultLabel:"\u6ED1\u5757\u4ECB\u4E8E {min} \u81F3 {max}",defaultRangeStartLabel:"\u9009\u62E9\u8D77\u59CB\u503C",defaultRangeEndLabel:"\u9009\u62E9\u7ED3\u675F\u503C"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tour:{next:"\u4E0B\u4E00\u6B65",previous:"\u4E0A\u4E00\u6B65",finish:"\u7ED3\u675F\u5BFC\u89C8"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"},carousel:{leftArrow:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",rightArrow:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247",indicator:"\u5E7B\u706F\u7247\u5207\u6362\u81F3\u7D22\u5F15 {index}"}}},sC,rr,qq,_h,uB,Yq,OP,TN,wP,SP,P0={},Xq=[],Yje=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lC=Array.isArray;function zd(t,e){for(var n in e)t[n]=e[n];return t}function Zq(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Gt(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?sC.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return $1(t,a,r,i,null)}function $1(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i==null?++qq:i,__i:-1,__u:0};return i==null&&rr.vnode!=null&&rr.vnode(o),o}function uC(){return{current:null}}function um(t){return t.children}function ur(t,e){this.props=t,this.context=e}function cm(t,e){if(e==null)return t.__?cm(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?cm(t):null}function Gq(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Gq(t)}}function cB(t){(!t.__d&&(t.__d=!0)&&_h.push(t)&&!$w.__r++||uB!==rr.debounceRendering)&&((uB=rr.debounceRendering)||Yq)($w)}function $w(){var t,e,n,r,i,o,a,s;for(_h.sort(OP);t=_h.shift();)t.__d&&(e=_h.length,r=void 0,o=(i=(n=t).__v).__e,a=[],s=[],n.__P&&((r=zd({},i)).__v=i.__v+1,rr.vnode&&rr.vnode(r),kN(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,a,o==null?cm(i):o,!!(32&i.__u),s),r.__v=i.__v,r.__.__k[r.__i]=r,eY(a,r,s),r.__e!=o&&Gq(r)),_h.length>e&&_h.sort(OP));$w.__r=0}function Kq(t,e,n,r,i,o,a,s,l,u,c){var d,f,h,m,g,y=r&&r.__k||Xq,b=e.length;for(n.__d=l,Xje(n,e,y),l=n.__d,d=0;d<b;d++)(h=n.__k[d])!=null&&(f=h.__i===-1?P0:y[h.__i]||P0,h.__i=d,kN(t,h,f,i,o,a,s,l,u,c),m=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&PN(f.ref,null,h),c.push(h.ref,h.__c||m,h)),g==null&&m!=null&&(g=m),65536&h.__u||f.__k===h.__k?l=Jq(h,l,t):typeof h.type=="function"&&h.__d!==void 0?l=h.__d:m&&(l=m.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=g}function Xje(t,e,n){var r,i,o,a,s,l=e.length,u=n.length,c=u,d=0;for(t.__k=[],r=0;r<l;r++)(i=e[r])!=null&&typeof i!="boolean"&&typeof i!="function"?(a=r+d,(i=t.__k[r]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?$1(null,i,null,null,null):lC(i)?$1(um,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,o=null,(s=i.__i=Zje(i,n,a,c))!==-1&&(c--,(o=n[s])&&(o.__u|=131072)),o==null||o.__v===null?(s==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):s!==a&&(s==a-1?d--:s==a+1?d++:(s>a?d--:d++,i.__u|=65536))):i=t.__k[r]=null;if(c)for(r=0;r<u;r++)(o=n[r])!=null&&(131072&o.__u)==0&&(o.__e==t.__d&&(t.__d=cm(o)),tY(o,o))}function Jq(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Jq(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=cm(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function Nw(t,e){return e=e||[],t==null||typeof t=="boolean"||(lC(t)?t.some(function(n){Nw(n,e)}):e.push(t)),e}function Zje(t,e,n,r){var i=t.key,o=t.type,a=n-1,s=n+1,l=e[n];if(l===null||l&&i==l.key&&o===l.type&&(131072&l.__u)==0)return n;if(r>(l!=null&&(131072&l.__u)==0?1:0))for(;a>=0||s<e.length;){if(a>=0){if((l=e[a])&&(131072&l.__u)==0&&i==l.key&&o===l.type)return a;a--}if(s<e.length){if((l=e[s])&&(131072&l.__u)==0&&i==l.key&&o===l.type)return s;s++}}return-1}function dB(t,e,n){e[0]==="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||Yje.test(e)?n:n+"px"}function pO(t,e,n,r,i){var o;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||dB(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||dB(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=TN,t.addEventListener(e,o?SP:wP,o)):t.removeEventListener(e,o?SP:wP,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function fB(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=TN++;else if(e.t<n.u)return;return n(rr.event?rr.event(e):e)}}}function kN(t,e,n,r,i,o,a,s,l,u){var c,d,f,h,m,g,y,b,w,O,S,x,C,E,T,P,A=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[s=e.__e=n.__e]),(c=rr.__b)&&c(e);e:if(typeof A=="function")try{if(b=e.props,w="prototype"in A&&A.prototype.render,O=(c=A.contextType)&&r[c.__c],S=c?O?O.props.value:c.__:r,n.__c?y=(d=e.__c=n.__c).__=d.__E:(w?e.__c=d=new A(b,S):(e.__c=d=new ur(b,S),d.constructor=A,d.render=Kje),O&&O.sub(d),d.props=b,d.state||(d.state={}),d.context=S,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&A.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=zd({},d.__s)),zd(d.__s,A.getDerivedStateFromProps(b,d.__s))),h=d.props,m=d.state,d.__v=e,f)w&&A.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&A.getDerivedStateFromProps==null&&b!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(b,S),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(b,d.__s,S)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(d.props=b,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(D){D&&(D.__=e)}),x=0;x<d._sb.length;x++)d.__h.push(d._sb[x]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(b,d.__s,S),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,m,g)})}if(d.context=S,d.props=b,d.__P=t,d.__e=!1,C=rr.__r,E=0,w){for(d.state=d.__s,d.__d=!1,C&&C(e),c=d.render(d.props,d.state,d.context),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[]}else do d.__d=!1,C&&C(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(r=zd(zd({},r),d.getChildContext())),w&&!f&&d.getSnapshotBeforeUpdate!=null&&(g=d.getSnapshotBeforeUpdate(h,m)),Kq(t,lC(P=c!=null&&c.type===um&&c.key==null?c.props.children:c)?P:[P],e,n,r,i,o,a,s,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&a.push(d),y&&(d.__E=d.__=null)}catch(D){if(e.__v=null,l||o!=null){for(e.__u|=l?160:128;s&&s.nodeType===8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,e.__e=s}else e.__e=n.__e,e.__k=n.__k;rr.__e(D,e,n)}else o==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Gje(n.__e,e,n,r,i,o,a,l,u);(c=rr.diffed)&&c(e)}function eY(t,e,n){e.__d=void 0;for(var r=0;r<n.length;r++)PN(n[r],n[++r],n[++r]);rr.__c&&rr.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){rr.__e(o,i.__v)}})}function Gje(t,e,n,r,i,o,a,s,l){var u,c,d,f,h,m,g,y=n.props,b=e.props,w=e.type;if(w==="svg"?i="http://www.w3.org/2000/svg":w==="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((h=o[u])&&"setAttribute"in h==!!w&&(w?h.localName===w:h.nodeType===3)){t=h,o[u]=null;break}}if(t==null){if(w===null)return document.createTextNode(b);t=document.createElementNS(i,w,b.is&&b),s&&(rr.__m&&rr.__m(e,o),s=!1),o=null}if(w===null)y===b||s&&t.data===b||(t.data=b);else{if(o=o&&sC.call(t.childNodes),y=n.props||P0,!s&&o!=null)for(y={},u=0;u<t.attributes.length;u++)y[(h=t.attributes[u]).name]=h.value;for(u in y)if(h=y[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=h;else if(!(u in b)){if(u=="value"&&"defaultValue"in b||u=="checked"&&"defaultChecked"in b)continue;pO(t,u,null,h,i)}}for(u in b)h=b[u],u=="children"?f=h:u=="dangerouslySetInnerHTML"?c=h:u=="value"?m=h:u=="checked"?g=h:s&&typeof h!="function"||y[u]===h||pO(t,u,h,y[u],i);if(c)s||d&&(c.__html===d.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(d&&(t.innerHTML=""),Kq(t,lC(f)?f:[f],e,n,r,w==="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&cm(n,0),s,l),o!=null)for(u=o.length;u--;)Zq(o[u]);s||(u="value",w==="progress"&&m==null?t.removeAttribute("value"):m!==void 0&&(m!==t[u]||w==="progress"&&!m||w==="option"&&m!==y[u])&&pO(t,u,m,y[u],i),u="checked",g!==void 0&&g!==t[u]&&pO(t,u,g,y[u],i))}return t}function PN(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){rr.__e(i,n)}}function tY(t,e,n){var r,i;if(rr.unmount&&rr.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||PN(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){rr.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&tY(r[i],e,n||typeof t.type!="function");n||Zq(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function Kje(t,e,n){return this.constructor(t,n)}function Jje(t,e,n){var r,i,o,a;rr.__&&rr.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],a=[],kN(e,t=(!r&&n||e).__k=Gt(um,null,[t]),i||P0,P0,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?sC.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,a),eY(o,t,a)}sC=Xq.slice,rr={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},qq=0,ur.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=zd({},this.state),typeof t=="function"&&(t=t(zd({},n),this.props)),t&&zd(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),cB(this))},ur.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),cB(this))},ur.prototype.render=um,_h=[],Yq=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,OP=function(t,e){return t.__v.__b-e.__v.__b},$w.__r=0,TN=0,wP=fB(!1),SP=fB(!0);var eze="An invariant failed, however the error is obfuscated because this is a production build.",Dw=[];Object.freeze(Dw);var AN={};Object.freeze(AN);function rs(){return++dn.mobxGuid}function Rr(t){throw Hh(!1,t),"X"}function Hh(t,e){if(!t)throw new Error("[mobx] "+(e||eze))}function nY(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var gO=function(){};function tze(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function MN(t){return t!==null&&typeof t=="object"}function Gm(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function nze(t){if(Jm(t)||ls(t))return t;if(Array.isArray(t))return new Map(t);if(Gm(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return Rr("Cannot convert to map from '"+t+"'")}function Km(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function rze(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ize(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!n||n.configurable!==!1&&n.writable!==!1}function Vf(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(r){return MN(r)&&r[n]===!0}}function Jm(t){return t instanceof Map}function Lb(t){return t instanceof Set}function rY(t){var e=new Set;for(var n in t)e.add(n);return Object.getOwnPropertySymbols(t).forEach(function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)}),Array.from(e)}function Qd(t){return t&&t.toString?t.toString():new String(t).toString()}function iY(t){return t===null?null:typeof t=="object"?""+t:t}var oze=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ln=Symbol("mobx administration"),ev=function(){function t(e){e===void 0&&(e="Atom@"+rs()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Nr.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return gY(this)},t.prototype.reportChanged=function(){tu(),Pze(this),nu()},t.prototype.toString=function(){return this.name},t}(),RN=Vf("Atom",ev);function $N(t,e,n){e===void 0&&(e=gO),n===void 0&&(n=gO);var r=new ev(t);return e!==gO&&zze(r,e),n!==gO&&OY(r,n),r}function aze(t,e){return t===e}function sze(t,e){return VN(t,e)}function lze(t,e){return VN(t,e,1)}function uze(t,e){return Object.is(t,e)}var dm={identity:aze,structural:sze,default:uze,shallow:lze};/*! *****************************************************************************
  73. Copyright (c) Microsoft Corporation. All rights reserved.
  74. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  75. this file except in compliance with the License. You may obtain a copy of the
  76. License at http://www.apache.org/licenses/LICENSE-2.0
  77. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  78. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  79. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  80. MERCHANTABLITY OR NON-INFRINGEMENT.
  81. See the Apache Version 2.0 License for specific language governing permissions
  82. and limitations under the License.
  83. ***************************************************************************** */var xP=function(t,e){return xP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},xP(t,e)};function cze(t,e){xP(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Lw=function(){return Lw=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Lw.apply(this,arguments)};function Lu(t){var e=typeof Symbol=="function"&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function mg(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function NN(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(mg(arguments[e]));return t}var Iw=Symbol("mobx did run lazy initializers"),ry=Symbol("mobx pending decorators"),dze={},fze={};function hze(t,e){var n=e?dze:fze;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return ap(this),this[t]},set:function(r){ap(this),this[t]=r}})}function ap(t){var e,n;if(t[Iw]!==!0){var r=t[ry];if(r){Km(t,Iw,!0);var i=NN(Object.getOwnPropertySymbols(r),Object.keys(r));try{for(var o=Lu(i),a=o.next();!a.done;a=o.next()){var s=a.value,l=r[s];l.propertyCreator(t,l.prop,l.descriptor,l.decoratorTarget,l.decoratorArguments)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}}}function oY(t,e){return function(){var r,i=function(a,s,l,u){if(u===!0)return e(a,s,l,a,r),null;if(!Object.prototype.hasOwnProperty.call(a,ry)){var c=a[ry];Km(a,ry,Lw({},c))}return a[ry][s]={prop:s,propertyCreator:e,descriptor:l,decoratorTarget:a,decoratorArguments:r},hze(s,t)};return pze(arguments)?(r=Dw,i.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),i)}}function pze(t){return(t.length===2||t.length===3)&&(typeof t[1]=="string"||typeof t[1]=="symbol")||t.length===4&&t[3]===!0}function Ib(t,e,n){return gm(t)?t:Array.isArray(t)?at.array(t,{name:n}):Gm(t)?at.object(t,void 0,{name:n}):Jm(t)?at.map(t,{name:n}):Lb(t)?at.set(t,{name:n}):t}function gze(t,e,n){return t==null||Sl(t)||hc(t)||ls(t)||wl(t)?t:Array.isArray(t)?at.array(t,{name:n,deep:!1}):Gm(t)?at.object(t,void 0,{name:n,deep:!1}):Jm(t)?at.map(t,{name:n,deep:!1}):Lb(t)?at.set(t,{name:n,deep:!1}):Rr(!1)}function cC(t){return t}function mze(t,e,n){return VN(t,e)?e:t}function dC(t){Hh(t);var e=oY(!0,function(r,i,o,a,s){var l=o?o.initializer?o.initializer.call(r):o.value:void 0;FN(r).addObservableProp(i,l,t)}),n=(typeof process!="undefined"&&process.env,e);return n.enhancer=t,n}var aY={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(aY);function ug(t){return t==null?aY:typeof t=="string"?{name:t,deep:!0,proxy:!0}:t}var DN=dC(Ib),vze=dC(gze),sY=dC(cC),yze=dC(mze);function mO(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?cC:Ib}function bze(t,e,n){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return DN.apply(null,arguments);if(gm(t))return t;var r=Gm(t)?at.object(t,e,n):Array.isArray(t)?at.array(t,e):Jm(t)?at.map(t,e):Lb(t)?at.set(t,e):t;if(r!==t)return r;Rr(!1)}var hB={box:function(t,e){arguments.length>2&&Bv("box");var n=ug(e);return new Uh(t,mO(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&Bv("array");var n=ug(e);return i7e(t,mO(n),n.name)},map:function(t,e){arguments.length>2&&Bv("map");var n=ug(e);return new BN(t,mO(n),n.name)},set:function(t,e){arguments.length>2&&Bv("set");var n=ug(e);return new PY(t,mO(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&Bv("object");var r=ug(n);if(r.proxy===!1)return AP({},t,e,r);var i=SY(r),o=AP({},void 0,void 0,r),a=t7e(o);return xY(a,t,e,i),a},ref:sY,shallow:vze,deep:DN,struct:yze},at=bze;Object.keys(hB).forEach(function(t){return at[t]=hB[t]});function Bv(t){Rr("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var Bw=oY(!1,function(t,e,n,r,i){var o=n.get,a=n.set,s=i[0]||{};FN(t).addComputedProp(t,e,Lw({get:o,set:a,context:t},s))}),_ze=Bw({equals:dm.structural}),Gr=function(e,n,r){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return Bw.apply(null,arguments);var i=typeof n=="object"?n:{};return i.get=e,i.set=typeof n=="function"?n:i.set,i.name=i.name||e.name||"",new hm(i)};Gr.struct=_ze;var Nr;(function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"})(Nr||(Nr={}));var Uu;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Uu||(Uu={}));var Fw=function(){function t(e){this.cause=e}return t}();function iy(t){return t instanceof Fw}function CP(t){switch(t.dependenciesState){case Nr.UP_TO_DATE:return!1;case Nr.NOT_TRACKING:case Nr.STALE:return!0;case Nr.POSSIBLY_STALE:{for(var e=LN(!0),n=tv(),r=t.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(pm(a)){if(dn.disableErrorBoundaries)a.get();else try{a.get()}catch{return tf(n),ky(e),!0}if(t.dependenciesState===Nr.STALE)return tf(n),ky(e),!0}}return cY(t),tf(n),ky(e),!1}}}function fm(t){var e=t.observers.size>0;dn.computationDepth>0&&e&&Rr(!1),!dn.allowStateChanges&&(e||dn.enforceActions==="strict")&&Rr(!1)}function lY(t,e,n){var r=LN(!0);cY(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++dn.runId;var i=dn.trackingDerivation;dn.trackingDerivation=t;var o;if(dn.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new Fw(a)}return dn.trackingDerivation=i,Oze(t),ky(r),o}function Oze(t){for(var e=t.observing,n=t.observing=t.newObserving,r=Nr.UP_TO_DATE,i=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState)}for(n.length=i,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&hY(s,t),s.diffValue=0}for(;i--;){var s=n[i];s.diffValue===1&&(s.diffValue=0,kze(s,t))}r!==Nr.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}function EP(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)hY(e[n],t);t.dependenciesState=Nr.NOT_TRACKING}function uY(t){var e=tv();try{return t()}finally{tf(e)}}function tv(){var t=dn.trackingDerivation;return dn.trackingDerivation=null,t}function tf(t){dn.trackingDerivation=t}function LN(t){var e=dn.allowStateReads;return dn.allowStateReads=t,e}function ky(t){dn.allowStateReads=t}function cY(t){if(t.dependenciesState!==Nr.UP_TO_DATE){t.dependenciesState=Nr.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=Nr.UP_TO_DATE}}var Vw=0,wze=1,pB=Object.getOwnPropertyDescriptor(function(){},"name");pB&&pB.configurable;function Wh(t,e,n){var r=function(){return dY(t,e,n||this,arguments)};return r.isMobxAction=!0,r}function dY(t,e,n,r){var i=Sze();try{return e.apply(n,r)}catch(o){throw i.error=o,o}finally{xze(i)}}function Sze(t,e,n){var r=Ka(),i=0,o=tv();tu();var a=fC(!0),s=LN(!0),l={prevDerivation:o,prevAllowStateChanges:a,prevAllowStateReads:s,notifySpy:r,startTime:i,actionId:wze++,parentActionId:Vw};return Vw=l.actionId,l}function xze(t){Vw!==t.actionId&&Rr("invalid action stack. did you forget to finish an action?"),Vw=t.parentActionId,t.error!==void 0&&(dn.suppressReactionErrors=!0),hC(t.prevAllowStateChanges),ky(t.prevAllowStateReads),nu(),tf(t.prevDerivation),t.notifySpy,dn.suppressReactionErrors=!1}function fC(t){var e=dn.allowStateChanges;return dn.allowStateChanges=t,e}function hC(t){dn.allowStateChanges=t}var Uh=function(t){cze(e,t);function e(n,r,i,o,a){i===void 0&&(i="ObservableValue@"+rs()),o===void 0&&(o=!0),a===void 0&&(a=dm.default);var s=t.call(this,i)||this;return s.enhancer=r,s.name=i,s.equals=a,s.hasUnreportedChange=!1,s.value=r(n,void 0,i),o&&Ka(),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var r=this.value;if(n=this.prepareNewValue(n),n!==dn.UNCHANGED){var i=Ka();this.setNewValue(n)}},e.prototype.prepareNewValue=function(n){if(fm(this),qu(this)){var r=Yu(this,{object:this,type:"update",newValue:n});if(!r)return dn.UNCHANGED;n=r.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?dn.UNCHANGED:n},e.prototype.setNewValue=function(n){var r=this.value;this.value=n,this.reportChanged(),ru(this)&&iu(this,{type:"update",object:this,newValue:n,oldValue:r})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return Bb(this,n)},e.prototype.observe=function(n,r){return r&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Fb(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return iY(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(ev),Cze=Vf("ObservableValue",Uh),hm=function(){function t(e){this.dependenciesState=Nr.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Nr.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+rs(),this.value=new Fw(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Uu.NONE,Hh(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+rs(),e.set&&(this.setter=Wh(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?dm.structural:dm.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){Mze(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&Rr("Cycle detected in computation "+this.name+": "+this.derivation),dn.inBatch===0&&this.observers.size===0&&!this.keepAlive?CP(this)&&(this.warnAboutUntrackedRead(),tu(),this.value=this.computeValue(!1),nu()):(gY(this),CP(this)&&this.trackAndCompute()&&Aze(this));var e=this.value;if(iy(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(iy(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Hh(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Hh(!1,!1)},t.prototype.trackAndCompute=function(){var e=this.value,n=this.dependenciesState===Nr.NOT_TRACKING,r=this.computeValue(!0),i=n||iy(e)||iy(r)||!this.equals(e,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){this.isComputing=!0,dn.computationDepth++;var n;if(e)n=lY(this,this.derivation,this.scope);else if(dn.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(r){n=new Fw(r)}return dn.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(EP(this),this.value=void 0)},t.prototype.observe=function(e,n){var r=this,i=!0,o=void 0;return Fze(function(){var a=r.get();if(!i||n){var s=tv();e({type:"update",object:r,newValue:a,oldValue:o}),tf(s)}i=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return iY(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),pm=Vf("ComputedValue",hm),N1=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Eze={};function TP(){return typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Eze}var D1=!0,fY=!1,dn=function(){var t=TP();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(D1=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new N1().version&&(D1=!1),D1?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new N1):(setTimeout(function(){fY||Rr("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new N1)}();function Tze(){(dn.pendingReactions.length||dn.inBatch||dn.isRunningReactions)&&Rr("isolateGlobalState should be called before MobX is running any reactions"),fY=!0,D1&&(--TP().__mobxInstanceCount===0&&(TP().__mobxGlobals=void 0),dn=new N1)}function kP(){return dn}function kze(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function hY(t,e){t.observers.delete(e),t.observers.size===0&&pY(t)}function pY(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,dn.pendingUnobservations.push(t))}function tu(){dn.inBatch++}function nu(){if(--dn.inBatch===0){yY();for(var t=dn.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof hm&&n.suspend())}dn.pendingUnobservations=[]}}function gY(t){var e=dn.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.size===0&&dn.inBatch>0&&pY(t),!1)}function Pze(t){t.lowestObserverState!==Nr.STALE&&(t.lowestObserverState=Nr.STALE,t.observers.forEach(function(e){e.dependenciesState===Nr.UP_TO_DATE&&(e.isTracing!==Uu.NONE&&mY(e,t),e.onBecomeStale()),e.dependenciesState=Nr.STALE}))}function Aze(t){t.lowestObserverState!==Nr.STALE&&(t.lowestObserverState=Nr.STALE,t.observers.forEach(function(e){e.dependenciesState===Nr.POSSIBLY_STALE?e.dependenciesState=Nr.STALE:e.dependenciesState===Nr.UP_TO_DATE&&(t.lowestObserverState=Nr.UP_TO_DATE)}))}function Mze(t){t.lowestObserverState===Nr.UP_TO_DATE&&(t.lowestObserverState=Nr.POSSIBLY_STALE,t.observers.forEach(function(e){e.dependenciesState===Nr.UP_TO_DATE&&(e.dependenciesState=Nr.POSSIBLY_STALE,e.isTracing!==Uu.NONE&&mY(e,t),e.onBecomeStale())}))}function mY(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Uu.BREAK){var n=[];vY(Hze(t),n,1),new Function(`debugger;
  84. /*
  85. Tracing '`+t.name+`'
  86. You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.name+`' is now forcing it to update.
  87. Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
  88. The stackframe you are looking for is at least ~6-8 stack-frames up.
  89. `+(t instanceof hm?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
  90. The dependencies for this derivation are:
  91. `+n.join(`
  92. `)+`
  93. */
  94. `)()}}function vY(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(r){return vY(r,e,n+1)})}var A0=function(){function t(e,n,r,i){e===void 0&&(e="Reaction@"+rs()),i===void 0&&(i=!1),this.name=e,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=Nr.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+rs(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Uu.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,dn.pendingReactions.push(this),yY())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(tu(),this._isScheduled=!1,CP(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ka()}catch(e){this.reportExceptionInDerivation(e)}}nu()}},t.prototype.track=function(e){if(!this.isDisposed){tu(),this._isRunning=!0;var n=lY(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&EP(this),iy(n)&&this.reportExceptionInDerivation(n.cause),nu()}},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(dn.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";dn.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),dn.globalReactionErrorHandlers.forEach(function(i){return i(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(tu(),EP(this),nu()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[Ln]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),Kze(this,e)},t}(),gB=100,PP=function(t){return t()};function yY(){dn.inBatch>0||dn.isRunningReactions||PP(Rze)}function Rze(){dn.isRunningReactions=!0;for(var t=dn.pendingReactions,e=0;t.length>0;){++e===gB&&(console.error("Reaction doesn't converge to a stable state after "+gB+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}dn.isRunningReactions=!1}var jw=Vf("Reaction",A0);function $ze(t){var e=PP;PP=function(n){return t(function(){return e(n)})}}function Ka(){return!1}function Nze(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Dze(){Rr(!1)}function mB(t){return function(e,n,r){if(r){if(r.value)return{value:Wh(t,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Wh(t,i.call(this))}}}return Lze(t).apply(this,arguments)}}function Lze(t){return function(e,n,r){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(i){Km(this,n,it(t,i))}})}}function Ize(t,e,n,r){return r===!0?(jT(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return jT(this,e,n.value||n.initializer.call(this)),this[e]},set:Dze}:{enumerable:!1,configurable:!0,set:function(i){jT(this,e,i)},get:function(){}}}var it=function(e,n,r,i){if(arguments.length===1&&typeof e=="function")return Wh(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof n=="function")return Wh(e,n);if(arguments.length===1&&typeof e=="string")return mB(e);if(i===!0)Km(e,n,Wh(e.name||n,r.value,this));else return mB(n).apply(null,arguments)};it.bound=Ize;function Bze(t,e){var n=typeof t=="string"?t:t.name||"<unnamed action>",r=typeof t=="function"?t:e;return dY(n,r,this,void 0)}function jT(t,e,n){Km(t,e,Wh(e,n.bind(t)))}function Fze(t,e){e===void 0&&(e=AN);var n=e&&e.name||t.name||"Autorun@"+rs(),r=!e.scheduler&&!e.delay,i;if(r)i=new A0(n,function(){this.track(s)},e.onError,e.requiresObservable);else{var o=bY(e),a=!1;i=new A0(n,function(){a||(a=!0,o(function(){a=!1,i.isDisposed||i.track(s)}))},e.onError,e.requiresObservable)}function s(){t(i)}return i.schedule(),i.getDisposer()}var Vze=function(t){return t()};function bY(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Vze}function _Y(t,e,n){n===void 0&&(n=AN);var r=n.name||"Reaction@"+rs(),i=it(r,n.onError?jze(n.onError,e):e),o=!n.scheduler&&!n.delay,a=bY(n),s=!0,l=!1,u,c=n.compareStructural?dm.structural:n.equals||dm.default,d=new A0(r,function(){s||o?f():l||(l=!0,a(f))},n.onError,n.requiresObservable);function f(){if(l=!1,!d.isDisposed){var h=!1;d.track(function(){var m=t(d);h=s||!c(u,m),u=m}),s&&n.fireImmediately&&i(u,d),!s&&h===!0&&i(u,d),s&&(s=!1)}}return d.schedule(),d.getDisposer()}function jze(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function zze(t,e,n){return wY("onBecomeObserved",t,e,n)}function OY(t,e,n){return wY("onBecomeUnobserved",t,e,n)}function wY(t,e,n,r){var i=typeof r=="function"?Xc(e,n):Xc(e),o=typeof r=="function"?r:n,a=t+"Listeners";i[a]?i[a].add(o):i[a]=new Set([o]);var s=i[t];return typeof s!="function"?Rr(!1):function(){var l=i[a];l&&(l.delete(o),l.size===0&&delete i[a])}}function Qze(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,i=t.disableErrorBoundaries,o=t.reactionScheduler,a=t.reactionRequiresObservable,s=t.observableRequiresReaction;if(t.isolateGlobalState===!0&&Tze(),e!==void 0){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:Rr("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}dn.enforceActions=l,dn.allowStateChanges=!(l===!0||l==="strict")}n!==void 0&&(dn.computedRequiresReaction=!!n),a!==void 0&&(dn.reactionRequiresObservable=!!a),s!==void 0&&(dn.observableRequiresReaction=!!s,dn.allowStateReads=!dn.observableRequiresReaction),r!==void 0&&(dn.computedConfigurable=!!r),i!==void 0&&(i===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),dn.disableErrorBoundaries=!!i),o&&$ze(o)}function AP(t,e,n,r){r=ug(r);var i=SY(r);return ap(t),FN(t,r.name,i.enhancer),e&&xY(t,e,n,i),t}function SY(t){return t.defaultDecorator||(t.deep===!1?sY:DN)}function xY(t,e,n,r){var i,o,a,s;tu();try{var a=oze(e);try{for(var l=Lu(a),u=l.next();!u.done;u=l.next()){var s=u.value,c=Object.getOwnPropertyDescriptor(e,s),d=n&&s in n?n[s]:c.get?Bw:r,f=d(t,s,c,!0);f&&Object.defineProperty(t,s,f)}}catch(m){i={error:m}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}finally{nu()}}function Hze(t,e){return CY(Xc(t,e))}function CY(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=tze(t.observing).map(CY)),e}function EY(t,e){if(t==null)return!1;if(e!==void 0){if(Sl(t)===!1||!t[Ln].values.has(e))return!1;var n=Xc(t,e);return pm(n)}return pm(t)}function Wze(t){return arguments.length>1?Rr(!1):EY(t)}function vB(t,e){return typeof e!="string"?Rr(!1):EY(t,e)}function Uze(t,e){return t==null?!1:e!==void 0?Sl(t)?t[Ln].values.has(e):!1:Sl(t)||!!t[Ln]||RN(t)||jw(t)||pm(t)}function gm(t){return arguments.length!==1&&Rr(!1),Uze(t)}function mm(t){return Sl(t)?t[Ln].getKeys():ls(t)||wl(t)?Array.from(t.keys()):hc(t)?t.map(function(e,n){return n}):Rr(!1)}function qze(t){return Sl(t)?mm(t).map(function(e){return t[e]}):ls(t)?mm(t).map(function(e){return t.get(e)}):wl(t)?Array.from(t.values()):hc(t)?t.slice():Rr(!1)}function Yze(t){return Sl(t)?mm(t).map(function(e){return[e,t[e]]}):ls(t)?mm(t).map(function(e){return[e,t.get(e)]}):wl(t)?Array.from(t.entries()):hc(t)?t.map(function(e,n){return[n,e]}):Rr(!1)}function IN(t,e,n){if(arguments.length===2&&!wl(t)){tu();var r=e;try{for(var i in r)IN(t,i,r[i])}finally{nu()}return}if(Sl(t)){var o=t[Ln],a=o.values.get(e);a?o.write(e,n):o.addObservableProp(e,n,o.defaultEnhancer)}else if(ls(t))t.set(e,n);else if(wl(t))t.add(e);else if(hc(t))typeof e!="number"&&(e=parseInt(e,10)),Hh(e>=0,"Not a valid index: '"+e+"'"),tu(),e>=t.length&&(t.length=e+1),t[e]=n,nu();else return Rr(!1)}function TY(t,e,n,r){return typeof n=="function"?Zze(t,e,n,r):Xze(t,e,n)}function Xze(t,e,n){return Vb(t).observe(e,n)}function Zze(t,e,n,r){return Vb(t,e).observe(n,r)}var Gze={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Yp(t,e,n,r){return r.detectCycles&&t.set(e,n),n}function kd(t,e,n){if(!e.recurseEverything&&!gm(t)||typeof t!="object")return t;if(t===null)return null;if(t instanceof Date)return t;if(Cze(t))return kd(t.get(),e,n);gm(t)&&mm(t);var r=e.detectCycles===!0;if(r&&t!==null&&n.has(t))return n.get(t);if(hc(t)||Array.isArray(t)){var i=Yp(n,t,[],e),o=t.map(function(h){return kd(h,e,n)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(wl(t)||Object.getPrototypeOf(t)===Set.prototype)if(e.exportMapsAsObjects===!1){var l=Yp(n,t,new Set,e);return t.forEach(function(h){l.add(kd(h,e,n))}),l}else{var u=Yp(n,t,[],e);return t.forEach(function(h){u.push(kd(h,e,n))}),u}if(ls(t)||Object.getPrototypeOf(t)===Map.prototype)if(e.exportMapsAsObjects===!1){var c=Yp(n,t,new Map,e);return t.forEach(function(h,m){c.set(m,kd(h,e,n))}),c}else{var d=Yp(n,t,{},e);return t.forEach(function(h,m){d[m]=kd(h,e,n)}),d}var f=Yp(n,t,{},e);return rY(t).forEach(function(h){f[h]=kd(t[h],e,n)}),f}function Hl(t,e){typeof e=="boolean"&&(e={detectCycles:e}),e||(e=Gze),e.detectCycles=e.detectCycles===void 0?e.recurseEverything===!0:e.detectCycles===!0;var n;return e.detectCycles&&(n=new Map),kd(t,e,n)}function Kze(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;typeof t[t.length-1]=="boolean"&&(n=t.pop());var r=Jze(t);if(!r)return Rr(!1);r.isTracing===Uu.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?Uu.BREAK:Uu.LOG}function Jze(t){switch(t.length){case 0:return dn.trackingDerivation;case 1:return Xc(t[0]);case 2:return Xc(t[0],t[1])}}function ql(t,e){e===void 0&&(e=void 0),tu();try{return t.apply(e)}finally{nu()}}function vO(t){return t[Ln]}function yO(t){return typeof t=="string"||typeof t=="number"||typeof t=="symbol"}var e7e={has:function(t,e){if(e===Ln||e==="constructor"||e===Iw)return!0;var n=vO(t);return yO(e)?n.has(e):e in t},get:function(t,e){if(e===Ln||e==="constructor"||e===Iw)return t[e];var n=vO(t),r=n.values.get(e);if(r instanceof ev){var i=r.get();return i===void 0&&n.has(e),i}return yO(e)&&n.has(e),t[e]},set:function(t,e,n){return yO(e)?(IN(t,e,n),!0):!1},deleteProperty:function(t,e){if(!yO(e))return!1;var n=vO(t);return n.remove(e),!0},ownKeys:function(t){var e=vO(t);return e.keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return Rr("Dynamic observable objects cannot be frozen"),!1}};function t7e(t){var e=new Proxy(t,e7e);return t[Ln].proxy=e,e}function qu(t){return t.interceptors!==void 0&&t.interceptors.length>0}function Bb(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),nY(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function Yu(t,e){var n=tv();try{for(var r=NN(t.interceptors||[]),i=0,o=r.length;i<o&&(e=r[i](e),Hh(!e||e.type,"Intercept handlers should return nothing or a change object"),!!e);i++);return e}finally{tf(n)}}function ru(t){return t.changeListeners!==void 0&&t.changeListeners.length>0}function Fb(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),nY(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function iu(t,e){var n=tv(),r=t.changeListeners;if(!!r){r=r.slice();for(var i=0,o=r.length;i<o;i++)r[i](e);tf(n)}}var n7e=1e4,r7e={get:function(t,e){return e===Ln?t[Ln]:e==="length"?t[Ln].getArrayLength():typeof e=="number"?Dc.get.call(t,e):typeof e=="string"&&!isNaN(e)?Dc.get.call(t,parseInt(e)):Dc.hasOwnProperty(e)?Dc[e]:t[e]},set:function(t,e,n){return e==="length"&&t[Ln].setArrayLength(n),typeof e=="number"&&Dc.set.call(t,e,n),typeof e=="symbol"||isNaN(e)?t[e]=n:Dc.set.call(t,parseInt(e),n),!0},preventExtensions:function(t){return Rr("Observable arrays cannot be frozen"),!1}};function i7e(t,e,n,r){n===void 0&&(n="ObservableArray@"+rs()),r===void 0&&(r=!1);var i=new kY(n,e,r);rze(i.values,Ln,i);var o=new Proxy(i.values,r7e);if(i.proxy=o,t&&t.length){var a=fC(!0);i.spliceWithArray(0,0,t),hC(a)}return o}var kY=function(){function t(e,n,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new ev(e||"ObservableArray@"+rs()),this.enhancer=function(i,o){return n(i,o,e+"[..]")}}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.dehanceValues=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.prototype.intercept=function(e){return Bb(this,e)},t.prototype.observe=function(e,n){return n===void 0&&(n=!1),n&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Fb(this,e)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var n=this.values.length;if(e!==n)if(e>n){for(var r=new Array(e-n),i=0;i<e-n;i++)r[i]=void 0;this.spliceWithArray(n,0,r)}else this.spliceWithArray(e,n-e)},t.prototype.updateArrayLength=function(e,n){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=n},t.prototype.spliceWithArray=function(e,n,r){var i=this;fm(this.atom);var o=this.values.length;if(e===void 0?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),arguments.length===1?n=o-e:n==null?n=0:n=Math.max(0,Math.min(n,o-e)),r===void 0&&(r=Dw),qu(this)){var a=Yu(this,{object:this.proxy,type:"splice",index:e,removedCount:n,added:r});if(!a)return Dw;n=a.removedCount,r=a.added}r=r.length===0?r:r.map(function(l){return i.enhancer(l,void 0)});var s=this.spliceItemsIntoValues(e,n,r);return(n!==0||r.length!==0)&&this.notifyArraySplice(e,r,s),this.dehanceValues(s)},t.prototype.spliceItemsIntoValues=function(e,n,r){var i;if(r.length<n7e)return(i=this.values).splice.apply(i,NN([e,n],r));var o=this.values.slice(e,e+n);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+n)),o},t.prototype.notifyArrayChildUpdate=function(e,n,r){var i=!this.owned&&Ka(),o=ru(this),a=o||i?{object:this.proxy,type:"update",index:e,newValue:n,oldValue:r}:null;this.atom.reportChanged(),o&&iu(this,a)},t.prototype.notifyArraySplice=function(e,n,r){var i=!this.owned&&Ka(),o=ru(this),a=o||i?{object:this.proxy,type:"splice",index:e,removed:r,added:n,removedCount:r.length,addedCount:n.length}:null;this.atom.reportChanged(),o&&iu(this,a)},t}(),Dc={intercept:function(t){return this[Ln].intercept(t)},observe:function(t,e){e===void 0&&(e=!1);var n=this[Ln];return n.observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[Ln];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[Ln];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(t);case 2:return i.spliceWithArray(t,e)}return i.spliceWithArray(t,e,n)},spliceWithArray:function(t,e,n){var r=this[Ln];return r.spliceWithArray(t,e,n)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[Ln];return n.spliceWithArray(n.values.length,0,t),n.values.length},pop:function(){return this.splice(Math.max(this[Ln].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[Ln];return n.spliceWithArray(0,0,t),n.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[Ln],n=e.dehanceValues(e.values).indexOf(t);return n>-1?(this.splice(n,1),!0):!1},get:function(t){var e=this[Ln];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var n=this[Ln],r=n.values;if(t<r.length){fm(n.atom);var i=r[t];if(qu(n)){var o=Yu(n,{type:"update",object:n.proxy,index:t,newValue:e});if(!o)return;e=o.newValue}e=n.enhancer(e,i);var a=e!==i;a&&(r[t]=e,n.notifyArrayChildUpdate(t,e,i))}else if(t===r.length)n.spliceWithArray(t,0,[e]);else throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+r.length)}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(t){typeof Array.prototype[t]=="function"&&(Dc[t]=function(){var e=this[Ln];e.atom.reportObserved();var n=e.dehanceValues(e.values);return n[t].apply(n,arguments)})});["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(t){typeof Array.prototype[t]=="function"&&(Dc[t]=function(e,n){var r=this,i=this[Ln];i.atom.reportObserved();var o=i.dehanceValues(i.values);return o[t](function(a,s){return e.call(n,a,s,r)},n)})});["reduce","reduceRight"].forEach(function(t){Dc[t]=function(){var e=this,n=this[Ln];n.atom.reportObserved();var r=arguments[0];return arguments[0]=function(i,o,a){return o=n.dehanceValue(o),r(i,o,a,e)},n.values[t].apply(n.values,arguments)}});var o7e=Vf("ObservableArrayAdministration",kY);function hc(t){return MN(t)&&o7e(t[Ln])}var yB,a7e={},BN=function(){function t(e,n,r){if(n===void 0&&(n=Ib),r===void 0&&(r="ObservableMap@"+rs()),this.enhancer=n,this.name=r,this[yB]=a7e,this._keysAtom=$N(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return t.prototype._has=function(e){return this._data.has(e)},t.prototype.has=function(e){var n=this;if(!dn.trackingDerivation)return this._has(e);var r=this._hasMap.get(e);if(!r){var i=r=new Uh(this._has(e),cC,this.name+"."+Qd(e)+"?",!1);this._hasMap.set(e,i),OY(i,function(){return n._hasMap.delete(e)})}return r.get()},t.prototype.set=function(e,n){var r=this._has(e);if(qu(this)){var i=Yu(this,{type:r?"update":"add",object:this,newValue:n,name:e});if(!i)return this;n=i.newValue}return r?this._updateValue(e,n):this._addValue(e,n),this},t.prototype.delete=function(e){var n=this;if(fm(this._keysAtom),qu(this)){var r=Yu(this,{type:"delete",object:this,name:e});if(!r)return!1}if(this._has(e)){var i=Ka(),o=ru(this),r=o||i?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return ql(function(){n._keysAtom.reportChanged(),n._updateHasMapEntry(e,!1);var s=n._data.get(e);s.setNewValue(void 0),n._data.delete(e)}),o&&iu(this,r),!0}return!1},t.prototype._updateHasMapEntry=function(e,n){var r=this._hasMap.get(e);r&&r.setNewValue(n)},t.prototype._updateValue=function(e,n){var r=this._data.get(e);if(n=r.prepareNewValue(n),n!==dn.UNCHANGED){var i=Ka(),o=ru(this),a=o||i?{type:"update",object:this,oldValue:r.value,name:e,newValue:n}:null;r.setNewValue(n),o&&iu(this,a)}},t.prototype._addValue=function(e,n){var r=this;fm(this._keysAtom),ql(function(){var s=new Uh(n,r.enhancer,r.name+"."+Qd(e),!1);r._data.set(e,s),n=s.value,r._updateHasMapEntry(e,!0),r._keysAtom.reportChanged()});var i=Ka(),o=ru(this),a=o||i?{type:"add",object:this,name:e,newValue:n}:null;o&&iu(this,a)},t.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var e=this,n=this.keys();return zw({next:function(){var r=n.next(),i=r.done,o=r.value;return{done:i,value:i?void 0:e.get(o)}}})},t.prototype.entries=function(){var e=this,n=this.keys();return zw({next:function(){var r=n.next(),i=r.done,o=r.value;return{done:i,value:i?void 0:[o,e.get(o)]}}})},t.prototype[yB=Ln,Symbol.iterator]=function(){return this.entries()},t.prototype.forEach=function(e,n){var r,i;try{for(var o=Lu(this),a=o.next();!a.done;a=o.next()){var s=mg(a.value,2),l=s[0],u=s[1];e.call(n,u,l,this)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(e){var n=this;return ls(e)&&(e=e.toJS()),ql(function(){var r=fC(!0);try{Gm(e)?rY(e).forEach(function(i){return n.set(i,e[i])}):Array.isArray(e)?e.forEach(function(i){var o=mg(i,2),a=o[0],s=o[1];return n.set(a,s)}):Jm(e)?(e.constructor!==Map&&Rr("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(i,o){return n.set(o,i)})):e!=null&&Rr("Cannot initialize map from "+e)}finally{hC(r)}}),this},t.prototype.clear=function(){var e=this;ql(function(){uY(function(){var n,r;try{for(var i=Lu(e.keys()),o=i.next();!o.done;o=i.next()){var a=o.value;e.delete(a)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}})})},t.prototype.replace=function(e){var n=this;return ql(function(){var r,i,o,a,s=nze(e),l=new Map,u=!1;try{for(var c=Lu(n._data.keys()),d=c.next();!d.done;d=c.next()){var f=d.value;if(!s.has(f)){var h=n.delete(f);if(h)u=!0;else{var m=n._data.get(f);l.set(f,m)}}}}catch(T){r={error:T}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}try{for(var g=Lu(s.entries()),y=g.next();!y.done;y=g.next()){var b=mg(y.value,2),f=b[0],m=b[1],w=n._data.has(f);if(n.set(f,m),n._data.has(f)){var O=n._data.get(f);l.set(f,O),w||(u=!0)}}}catch(T){o={error:T}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}if(!u)if(n._data.size!==l.size)n._keysAtom.reportChanged();else for(var S=n._data.keys(),x=l.keys(),C=S.next(),E=x.next();!C.done;){if(C.value!==E.value){n._keysAtom.reportChanged();break}C=S.next(),E=x.next()}n._data=l}),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var e,n,r={};try{for(var i=Lu(this),o=i.next();!o.done;o=i.next()){var a=mg(o.value,2),s=a[0],l=a[1];r[typeof s=="symbol"?s:Qd(s)]=l}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(n){return Qd(n)+": "+(""+e.get(n))}).join(", ")+" }]"},t.prototype.observe=function(e,n){return Fb(this,e)},t.prototype.intercept=function(e){return Bb(this,e)},t}(),ls=Vf("ObservableMap",BN),bB,s7e={},PY=function(){function t(e,n,r){if(n===void 0&&(n=Ib),r===void 0&&(r="ObservableSet@"+rs()),this.name=r,this[bB]=s7e,this._data=new Set,this._atom=$N(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(i,o){return n(i,o,r)},e&&this.replace(e)}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.clear=function(){var e=this;ql(function(){uY(function(){var n,r;try{for(var i=Lu(e._data.values()),o=i.next();!o.done;o=i.next()){var a=o.value;e.delete(a)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}})})},t.prototype.forEach=function(e,n){var r,i;try{for(var o=Lu(this),a=o.next();!a.done;a=o.next()){var s=a.value;e.call(n,s,s,this)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(e){var n=this;if(fm(this._atom),qu(this)){var r=Yu(this,{type:"add",object:this,newValue:e});if(!r)return this}if(!this.has(e)){ql(function(){n._data.add(n.enhancer(e,void 0)),n._atom.reportChanged()});var i=Ka(),o=ru(this),r=o||i?{type:"add",object:this,newValue:e}:null;o&&iu(this,r)}return this},t.prototype.delete=function(e){var n=this;if(qu(this)){var r=Yu(this,{type:"delete",object:this,oldValue:e});if(!r)return!1}if(this.has(e)){var i=Ka(),o=ru(this),r=o||i?{type:"delete",object:this,oldValue:e}:null;return ql(function(){n._atom.reportChanged(),n._data.delete(e)}),o&&iu(this,r),!0}return!1},t.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},t.prototype.entries=function(){var e=0,n=Array.from(this.keys()),r=Array.from(this.values());return zw({next:function(){var i=e;return e+=1,i<r.length?{value:[n[i],r[i]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var e=this,n=0,r=Array.from(this._data.values());return zw({next:function(){return n<r.length?{value:e.dehanceValue(r[n++]),done:!1}:{done:!0}}})},t.prototype.replace=function(e){var n=this;return wl(e)&&(e=e.toJS()),ql(function(){var r=fC(!0);try{Array.isArray(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):Lb(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):e!=null&&Rr("Cannot initialize set from "+e)}finally{hC(r)}}),this},t.prototype.observe=function(e,n){return Fb(this,e)},t.prototype.intercept=function(e){return Bb(this,e)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[bB=Ln,Symbol.iterator]=function(){return this.values()},t}(),wl=Vf("ObservableSet",PY),AY=function(){function t(e,n,r,i){n===void 0&&(n=new Map),this.target=e,this.values=n,this.name=r,this.defaultEnhancer=i,this.keysAtom=new ev(r+".keys")}return t.prototype.read=function(e){return this.values.get(e).get()},t.prototype.write=function(e,n){var r=this.target,i=this.values.get(e);if(i instanceof hm){i.set(n);return}if(qu(this)){var o=Yu(this,{type:"update",object:this.proxy||r,name:e,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==dn.UNCHANGED){var a=ru(this),s=Ka(),o=a||s?{type:"update",object:this.proxy||r,oldValue:i.value,name:e,newValue:n}:null;i.setNewValue(n),a&&iu(this,o)}},t.prototype.has=function(e){var n=this.pendingKeys||(this.pendingKeys=new Map),r=n.get(e);if(r)return r.get();var i=!!this.values.get(e);return r=new Uh(i,cC,this.name+"."+Qd(e)+"?",!1),n.set(e,r),r.get()},t.prototype.addObservableProp=function(e,n,r){r===void 0&&(r=this.defaultEnhancer);var i=this.target;if(qu(this)){var o=Yu(this,{object:this.proxy||i,name:e,type:"add",newValue:n});if(!o)return;n=o.newValue}var a=new Uh(n,r,this.name+"."+Qd(e),!1);this.values.set(e,a),n=a.value,Object.defineProperty(i,e,l7e(e)),this.notifyPropertyAddition(e,n)},t.prototype.addComputedProp=function(e,n,r){var i=this.target;r.name=r.name||this.name+"."+Qd(n),this.values.set(n,new hm(r)),(e===i||ize(e,n))&&Object.defineProperty(e,n,u7e(n))},t.prototype.remove=function(e){if(!!this.values.has(e)){var n=this.target;if(qu(this)){var r=Yu(this,{object:this.proxy||n,name:e,type:"remove"});if(!r)return}try{tu();var i=ru(this),o=Ka(),a=this.values.get(e),s=a&&a.get();if(a&&a.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var l=this.pendingKeys.get(e);l&&l.set(!1)}delete this.target[e];var r=i||o?{type:"remove",object:this.proxy||n,oldValue:s,name:e}:null;i&&iu(this,r)}finally{nu()}}},t.prototype.illegalAccess=function(e,n){console.warn("Property '"+n+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(e,n){return Fb(this,e)},t.prototype.intercept=function(e){return Bb(this,e)},t.prototype.notifyPropertyAddition=function(e,n){var r=ru(this),i=Ka(),o=r||i?{type:"add",object:this.proxy||this.target,name:e,newValue:n}:null;if(r&&iu(this,o),this.pendingKeys){var a=this.pendingKeys.get(e);a&&a.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var e,n;this.keysAtom.reportObserved();var r=[];try{for(var i=Lu(this.values),o=i.next();!o.done;o=i.next()){var a=mg(o.value,2),s=a[0],l=a[1];l instanceof Uh&&r.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},t}();function FN(t,e,n){if(e===void 0&&(e=""),n===void 0&&(n=Ib),Object.prototype.hasOwnProperty.call(t,Ln))return t[Ln];Gm(t)||(e=(t.constructor.name||"ObservableObject")+"@"+rs()),e||(e="ObservableObject@"+rs());var r=new AY(t,new Map,Qd(e),n);return Km(t,Ln,r),r}var _B=Object.create(null),OB=Object.create(null);function l7e(t){return _B[t]||(_B[t]={configurable:!0,enumerable:!0,get:function(){return this[Ln].read(t)},set:function(e){this[Ln].write(t,e)}})}function wB(t){var e=t[Ln];return e||(ap(t),t[Ln])}function u7e(t){return OB[t]||(OB[t]={configurable:dn.computedConfigurable,enumerable:!1,get:function(){return wB(this).read(t)},set:function(e){wB(this).write(t,e)}})}var c7e=Vf("ObservableObjectAdministration",AY);function Sl(t){return MN(t)?(ap(t),c7e(t[Ln])):!1}function Xc(t,e){if(typeof t=="object"&&t!==null){if(hc(t))return e!==void 0&&Rr(!1),t[Ln].atom;if(wl(t))return t[Ln];if(ls(t)){var n=t;if(e===void 0)return n._keysAtom;var r=n._data.get(e)||n._hasMap.get(e);return r||Rr(!1),r}if(ap(t),e&&!t[Ln]&&t[e],Sl(t)){if(!e)return Rr(!1);var r=t[Ln].values.get(e);return r||Rr(!1),r}if(RN(t)||pm(t)||jw(t))return t}else if(typeof t=="function"&&jw(t[Ln]))return t[Ln];return Rr(!1)}function Vb(t,e){if(t||Rr("Expecting some object"),e!==void 0)return Vb(Xc(t,e));if(RN(t)||pm(t)||jw(t)||ls(t)||wl(t))return t;if(ap(t),t[Ln])return t[Ln];Rr(!1)}function d7e(t,e){var n;return e!==void 0?n=Xc(t,e):Sl(t)||ls(t)||wl(t)?n=Vb(t):n=Xc(t),n.name}var SB=Object.prototype.toString;function VN(t,e,n){return n===void 0&&(n=-1),MP(t,e,n)}function MP(t,e,n,r,i){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var o=typeof t;if(o!=="function"&&o!=="object"&&typeof e!="object")return!1;var a=SB.call(t);if(a!==SB.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=xB(t),e=xB(e);var s=a==="[object Array]";if(!s){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(typeof l=="function"&&l instanceof l&&typeof u=="function"&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===t)return i[c]===e;if(r.push(t),i.push(e),s){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!MP(t[c],e[c],n-1,r,i))return!1}else{var d=Object.keys(t),f=void 0;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(f7e(e,f)&&MP(t[f],e[f],n-1,r,i)))return!1}return r.pop(),i.pop(),!0}function xB(t){return hc(t)?t.slice():Jm(t)||ls(t)||Lb(t)||wl(t)?Array.from(t.entries()):t}function f7e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function zw(t){return t[Symbol.iterator]=h7e,t}function h7e(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var e})();typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Nze,extras:{getDebugName:d7e},$mobx:Ln});function p7e(t){return!(t.prototype&&t.prototype.render)&&!ur.isPrototypeOf(t)}function MY(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.prefix,r=n===void 0?"":n,i=e.suffix,o=i===void 0?"":i,a=t.displayName||t.name||t.constructor&&t.constructor.name||"<component>";return r+a+o}var CB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RY=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},$Y=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),NY=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},DY=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t},EB=console;function g7e(t){var e=kP().allowStateChanges;return kP().allowStateChanges=t,e}function m7e(t){kP().allowStateChanges=t}function v7e(t,e,n,r,i){var o=g7e(t),a=void 0;try{a=e(n,r,i)}finally{m7e(o)}return a}function TB(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=t[e],i=LY[e],o=r?n===!0?function(){i.apply(this,arguments),r.apply(this,arguments)}:function(){r.apply(this,arguments),i.apply(this,arguments)}:i;t[e]=o}function kB(t,e){if(t==null||e==null||(typeof t=="undefined"?"undefined":CB(t))!=="object"||(typeof e=="undefined"?"undefined":CB(e))!=="object")return t!==e;var n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(var r=void 0,i=n.length-1;r=n[i];i--)if(e[r]!==t[r])return!0;return!1}var LY={componentWillMount:function(){var e=this,n=MY(this),r=!1,i=!1;function o(d){var f=this[d],h=$N("reactive "+d);Object.defineProperty(this,d,{configurable:!0,enumerable:!0,get:function(){return h.reportObserved(),f},set:function(g){!i&&kB(f,g)?(f=g,r=!0,h.reportChanged(),r=!1):f=g}})}o.call(this,"props"),o.call(this,"state");var a=this.render.bind(this),s=null,l=!1,u=function(){return s=new A0(n+".render()",function(){if(!l&&(l=!0,typeof e.componentWillReact=="function"&&e.componentWillReact(),e.__$mobxIsUnmounted!==!0)){var f=!0;try{i=!0,r||ur.prototype.forceUpdate.call(e),f=!1}finally{i=!1,f&&s.dispose()}}}),s.reactComponent=e,c.$mobx=s,e.render=c,c(e.props,e.state,e.context)},c=function(f,h,m){l=!1;var g=void 0,y=void 0;if(s.track(function(){try{y=v7e(!1,a,f,h,m)}catch(b){g=b}}),g)throw g;return y};this.render=u},componentWillUnmount:function(){this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0},componentDidMount:function(){},componentDidUpdate:function(){},shouldComponentUpdate:function(e,n){return this.state!==n?!0:kB(this.props,e)}};function jN(t){if(arguments.length>1&&EB.warn('Mobx observer: Using observer to inject stores is not supported. Use `@connect(["store1", "store2"]) ComponentClass instead or preferably, use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))``'),t.isMobxInjector===!0&&EB.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),p7e(t)){var e,n;return jN((n=e=function(i){NY(o,i);function o(){return RY(this,o),DY(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return $Y(o,[{key:"render",value:function(){return t.call(this,this.props,this.context)}}]),o}(ur),e.displayName=MY(t),n))}if(!t)throw new Error("Please pass a valid component to 'observer'");var r=t.prototype||t;return y7e(r),t.isMobXReactObserver=!0,t}function y7e(t){TB(t,"componentWillMount",!0),TB(t,"componentDidMount"),t.shouldComponentUpdate||(t.shouldComponentUpdate=LY.shouldComponentUpdate)}var b7e=jN(function(t){var e=t.children;return e[0]()});b7e.displayName="Observer";var _7e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function O7e(t,e){return e={exports:{}},t(e,e.exports),e.exports}O7e(function(t,e){(function(n,r){t.exports=r()})(_7e,function(){var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,o=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,u=l&&l(Object);return function c(d,f,h){if(typeof f!="string"){if(u){var m=l(f);m&&m!==u&&c(d,m,h)}var g=o(f);a&&(g=g.concat(a(f)));for(var y=0;y<g.length;++y){var b=g[y];if(!n[b]&&!r[b]&&(!h||!h[b])){var w=s(f,b);try{i(d,b,w)}catch{}}}return d}return d}})});var PB={children:!0,key:!0,ref:!0},AB=console;(function(t){NY(e,t);function e(){return RY(this,e),DY(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return $Y(e,[{key:"render",value:function(r){var i=r.children;return i.length>1?Gt("div",null," ",i," "):i[0]}},{key:"getChildContext",value:function(){var r={},i=this.context.mobxStores;if(i)for(var o in i)r[o]=i[o];for(var a in this.props)!PB[a]&&a!=="suppressChangedStoreWarning"&&(r[a]=this.props[a]);return{mobxStores:r}}},{key:"componentWillReceiveProps",value:function(r){if(Object.keys(r).length!==Object.keys(this.props).length&&AB.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!r.suppressChangedStoreWarning)for(var i in r)!PB[i]&&this.props[i]!==r[i]&&AB.warn("MobX Provider: Provided store '"+i+"' has changed. Please avoid replacing stores as the change might not propagate to all children")}}]),e})(ur);if(!ur)throw new Error("mobx-preact requires Preact to be available");var Ru,zT,MB,IY=[],Ao=rr,RB=Ao.__b,$B=Ao.__r,NB=Ao.diffed,DB=Ao.__c,LB=Ao.unmount,IB=Ao.__;function w7e(){for(var t;t=IY.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(L1),t.__H.__h.forEach(RP),t.__H.__h=[]}catch(e){t.__H.__h=[],Ao.__e(e,t.__v)}}Ao.__b=function(t){Ru=null,RB&&RB(t)},Ao.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),IB&&IB(t,e)},Ao.__r=function(t){$B&&$B(t);var e=(Ru=t.__c).__H;e&&(zT===Ru?(e.__h=[],Ru.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(L1),e.__h.forEach(RP),e.__h=[])),zT=Ru},Ao.diffed=function(t){NB&&NB(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(IY.push(e)!==1&&MB===Ao.requestAnimationFrame||((MB=Ao.requestAnimationFrame)||S7e)(w7e)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),zT=Ru=null},Ao.__c=function(t,e){e.some(function(n){try{n.__h.forEach(L1),n.__h=n.__h.filter(function(r){return!r.__||RP(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Ao.__e(r,n.__v)}}),DB&&DB(t,e)},Ao.unmount=function(t){LB&&LB(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{L1(r)}catch(i){e=i}}),n.__H=void 0,e&&Ao.__e(e,n.__v))};var BB=typeof requestAnimationFrame=="function";function S7e(t){var e,n=function(){clearTimeout(r),BB&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);BB&&(e=requestAnimationFrame(n))}function L1(t){var e=Ru,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ru=e}function RP(t){var e=Ru;t.__c=t.__(),Ru=e}function FB(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function VB(t,e){this.props=t,this.context=e}(VB.prototype=new ur).isPureReactComponent=!0,VB.prototype.shouldComponentUpdate=function(t,e){return FB(this.props,t)||FB(this.state,e)};var jB=rr.__b;rr.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),jB&&jB(t)};var x7e=rr.__e;rr.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}x7e(t,e,n,r)};var zB=rr.unmount;function BY(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=function(r,i){for(var o in i)r[o]=i[o];return r}({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return BY(r,e,n)})),t}function FY(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return FY(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function QT(){this.__u=0,this.t=null,this.__b=null}function VY(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function bO(){this.u=null,this.o=null}rr.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),zB&&zB(t)},(QT.prototype=new ur).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=VY(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=FY(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},QT.prototype.componentWillUnmount=function(){this.t=[]},QT.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=BY(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Gt(um,null,t.fallback);return i&&(i.__u&=-33),[Gt(um,null,e.__a?null:t.children),i]};var QB=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(bO.prototype=new ur).__a=function(t){var e=this,n=VY(e.__v),r=e.o.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),QB(e,t,r)):i()};n?n(o):o()}},bO.prototype.render=function(t){this.u=null,this.o=new Map;var e=Nw(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},bO.prototype.componentDidUpdate=bO.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){QB(t,n,e)})};var C7e=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,E7e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,T7e=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,k7e=/[A-Z0-9]/g,P7e=typeof document!="undefined",A7e=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function HB(t,e,n){return e.__k==null&&(e.textContent=""),Jje(t,e),typeof n=="function"&&n(),t?t.__c:null}ur.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ur.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var WB=rr.event;function M7e(){}function R7e(){return this.cancelBubble}function $7e(){return this.defaultPrevented}rr.event=function(t){return WB&&(t=WB(t)),t.persist=M7e,t.isPropagationStopped=R7e,t.isDefaultPrevented=$7e,t.nativeEvent=t};var N7e={enumerable:!1,configurable:!0,get:function(){return this.class}},UB=rr.vnode;rr.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||P7e&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||A7e(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":T7e.test(a)&&(a=l):l=a="oninput":o&&E7e.test(a)?a=a.replace(k7e,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Nw(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Nw(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",N7e)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=C7e,UB&&UB(t)};var qB=rr.__r;rr.__r=function(t){qB&&qB(t),t.__c};var YB=rr.diffed;rr.diffed=function(t){YB&&YB(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};var D7e=0;function rt(t,e,n,r,i,o){e||(e={});var a,s,l=e;"ref"in e&&(a=e.ref,delete e.ref);var u={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--D7e,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return rr.vnode&&rr.vnode(u),u}var L7e=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},M0;(function(t){function e(n){var r=L7e(n,[]),i=n.container;if(!i)throw new Error("Ensure the container of LogicFlow is specified and valid.");return $r({},t.defaults,r)}t.get=e})(M0||(M0={}));(function(t){t.defaults={background:!1,grid:!1,textEdit:!0,snapline:!0,outline:!1,disabledTools:[]}})(M0||(M0={}));var XB={node:!1,edge:!1},I7e={node:!0,edge:!0},B7e=function(t){return!t||typeof t=="boolean"?Fn(t===!0?I7e:XB):Jh(Fn(XB),t)},F7e=function(){return Wr(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null};function na(t){try{return JSON.parse(JSON.stringify(t))}catch{return t}}var _O=200,V7e=9999,j7e=10,Cr;(function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"})(Cr||(Cr={}));var Si;(function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"})(Si||(Si={}));var Kn;(function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.CUSTOM_HTML_NODE="custom-html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"})(Kn||(Kn={}));var pn;(function(t){t.ELEMENT_CLICK="element:click",t.NODE_ADD="node:add",t.NODE_DELETE="node:delete",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_GROUP_COPY="node:group-copy-add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.NODE_ROTATE="node:rotate",t.NODE_RESIZE="node:resize",t.NODE_FOCUS="node:focus",t.NODE_BLUR="node:blur",t.NODE_PROPERTIES_CHANGE="node:properties-change",t.NODE_PROPERTIES_DELETE="node:properties-delete",t.EDGE_ADD="edge:add",t.EDGE_DELETE="edge:delete",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_FOCUS="edge:focus",t.EDGE_BLUR="edge:blur",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.TEXT_MOUSEDOWN="text:mousedown",t.TEXT_DRAGSTART="text:dragstart",t.TEXT_DRAG="text:drag",t.TEXT_DROP="text:drop",t.TEXT_CLICK="text:click",t.TEXT_DBCLICK="text:dbclick",t.TEXT_BLUR="text:blur",t.TEXT_MOUSEMOVE="text:mousemove",t.TEXT_MOUSEUP="text:mouseup",t.TEXT_FOCUS="text:focus",t.TEXT_ADD="text:add",t.TEXT_UPDATE="text:update",t.TEXT_CLEAR="text:clear",t.LABEL_MOUSEDOWN="label:mousedown",t.LABEL_DRAGSTART="label:dragstart",t.LABEL_DRAG="label:drag",t.LABEL_DROP="label:drop",t.LABEL_CLICK="label:click",t.LABEL_DBCLICK="label:dbclick",t.LABEL_BLUR="label:blur",t.LABEL_MOUSEMOVE="label:mousemove",t.LABEL_MOUSEUP="label:mouseup",t.LABEL_FOCUS="label:focus",t.LABEL_ADD="label:add",t.LABEL_UPDATE="label:update",t.LABEL_CLEAR="label:clear",t.LABEL_DELETE="label:delete",t.LABEL_SHOULD_ADD="label:should-add",t.LABEL_BATCH_ADD="label:batch-add",t.LABEL_SHOULD_UPDATE="label:should-update",t.LABEL_SHOULD_DELETE="label:should-delete",t.LABEL_BATCH_DELETE="label:batch-delete",t.LABEL_NOT_ALLOWED_ADD="label:not-allowed-add",t.HISTORY_CHANGE="history:change",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered",t.GRAPH_UPDATED="graph:updated"})(pn||(pn={}));var Yl;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"})(Yl||(Yl={}));var di;(function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"})(di||(di={}));var hl;(function(t){t.TEXT="text",t.LABEL="label"})(hl||(hl={}));var z7e=0,kl=function(){function t(e){var n=e.onDragStart,r=n===void 0?Tg:n,i=e.onDragging,o=i===void 0?Tg:i,a=e.onDragEnd,s=a===void 0?Tg:a,l=e.eventType,u=l===void 0?"":l,c=e.eventCenter,d=e.step,f=d===void 0?1:d,h=e.isStopPropagation,m=h===void 0?!0:h,g=e.model,y=e.data,b=this;this.isDragging=!1,this.isStartDragging=!1,this.startX=0,this.startY=0,this.sumDeltaX=0,this.sumDeltaY=0,this.handleMouseDown=function(w){var O,S,x=window==null?void 0:window.document;if(w.button===z7e){b.isStopPropagation&&w.stopPropagation(),b.isStartDragging=!0,b.startX=w.clientX,b.startY=w.clientY,x.addEventListener("mousemove",b.handleMouseMove,!1),x.addEventListener("mouseup",b.handleMouseUp,!1);var C=(O=b.model)===null||O===void 0?void 0:O.getData();(S=b.eventCenter)===null||S===void 0||S.emit(pn["".concat(b.eventType,"_MOUSEDOWN")],{e:w,data:b.data||C}),b.startTime=new Date().getTime()}},this.handleMouseMove=function(w){var O,S;if(b.isStopPropagation&&w.stopPropagation(),!!b.isStartDragging&&(b.sumDeltaX+=w.clientX-b.startX,b.sumDeltaY+=w.clientY-b.startY,b.startX=w.clientX,b.startY=w.clientY,b.step<=1||Math.abs(b.sumDeltaX)>b.step||Math.abs(b.sumDeltaY)>b.step)){var x=b.sumDeltaX%b.step,C=b.sumDeltaY%b.step,E=b.sumDeltaX-x,T=b.sumDeltaY-C;b.sumDeltaX=x,b.sumDeltaY=C;var P=(O=b.model)===null||O===void 0?void 0:O.getData();b.isDragging||((S=b.eventCenter)===null||S===void 0||S.emit(pn["".concat(b.eventType,"_DRAGSTART")],{e:w,data:b.data||P}),b.onDragStart({event:w})),b.isDragging=!0,Promise.resolve().then(function(){var A,D;b.onDragging({deltaX:E,deltaY:T,event:w}),(A=b.eventCenter)===null||A===void 0||A.emit(pn["".concat(b.eventType,"_MOUSEMOVE")],{deltaX:E,deltaY:T,e:w,data:b.data||P}),(D=b.eventCenter)===null||D===void 0||D.emit(pn["".concat(b.eventType,"_DRAG")],{e:w,data:b.data||P})})}},this.handleMouseUp=function(w){var O=window.document;b.isStartDragging=!1,b.isStopPropagation&&w.stopPropagation(),Promise.resolve().then(function(){var S,x,C;O.removeEventListener("mousemove",b.handleMouseMove,!1),O.removeEventListener("mouseup",b.handleMouseUp,!1);var E=(S=b.model)===null||S===void 0?void 0:S.getData();(x=b.eventCenter)===null||x===void 0||x.emit(pn["".concat(b.eventType,"_MOUSEUP")],{e:w,data:b.data||E}),b.isDragging&&(b.isDragging=!1,b.onDragEnd({event:w}),(C=b.eventCenter)===null||C===void 0||C.emit(pn["".concat(b.eventType,"_DROP")],{e:w,data:b.data||E}))})},this.cancelDrag=function(){var w=window==null?void 0:window.document;w.removeEventListener("mousemove",b.handleMouseMove,!1),w.removeEventListener("mouseup",b.handleMouseUp,!1),b.onDragEnd({event:void 0}),b.isDragging=!1},this.destroy=function(){b.isStartDragging&&b.cancelDrag()},this.onDragStart=r,this.onDragging=o,this.onDragEnd=s,this.step=f,this.isStopPropagation=m,this.eventType=u,this.eventCenter=c,this.model=g,this.data=y}return t.prototype.setStep=function(e){this.step=e},t.prototype.setModel=function(e){this.model=e},t}(),Q7e=function(t){var e=t.x,n=t.y,r=t.width,i=t.height;return{x:e-r/2,y:n-i/2,x1:e+r/2,y1:n+i/2}},H7e=function(t){var e=t.startPoint,n=t.endPoint,r=(e.x+n.x)/2,i=(e.y+n.y)/2,o=Math.abs(e.x-n.x)+10,a=Math.abs(e.y-n.y)+10;return{x:r-o/2,y:i-a/2,x1:r+o/2,y1:i+a/2}},W7e=function(t){var e=t.points,n=sp(e),r=N0(n,8),i=r.x,o=r.y,a=r.width,s=r.height;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}},U7e=function(t){var e=t.path,n=zN(e),r=N0(n,8),i=r.x,o=r.y,a=r.width,s=r.height;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}},q7e=function(t){if(t.modelType===Kn.LINE_EDGE)return H7e(t);if(t.modelType===Kn.POLYLINE_EDGE)return W7e(t);if(t.modelType===Kn.BEZIER_EDGE)return U7e(t)},Y7e=function(t,e,n,r){var i=(e.y-t.y)*(r.x-n.x)-(t.x-e.x)*(n.y-r.y);if(i===0)return!1;var o=((e.x-t.x)*(r.x-n.x)*(n.y-t.y)+(e.y-t.y)*(r.x-n.x)*t.x-(r.y-n.y)*(e.x-t.x)*n.x)/i,a=-((e.y-t.y)*(r.y-n.y)*(n.x-t.x)+(e.x-t.x)*(r.y-n.y)*t.y-(r.x-n.x)*(e.y-t.y)*n.y)/i;return(o-t.x)*(o-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(o-n.x)*(o-r.x)<=0&&(a-n.y)*(a-r.y)<=0?{x:o,y:a}:!1},R0=function(t,e,n){var r=t.x,i=t.y,o=e.x,a=e.y,s=n.x,l=n.y,u=(l-a)/(s-o),c=a-u*o;return(r>=o&&r<=s||r<=o&&r>=s)&&(i>=a&&i<=l||i<=a&&i>=l)&&Math.abs(i-u*r-c)<Number.EPSILON},$0=function(t){var e=t.start,n=t.end,r=t.offset,i=t.verticalLength,o=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},s=Math.atan((n.y-e.y)/(n.x-e.x)),l=Math.atan(r/i),u=Math.sqrt(i*i+r*r);return o==="start"?n.x>=e.x?(a.leftX=e.x+u*Math.sin(s+l),a.leftY=e.y-u*Math.cos(s+l),a.rightX=e.x-u*Math.sin(s-l),a.rightY=e.y+u*Math.cos(s-l)):(a.leftX=e.x-u*Math.sin(s+l),a.leftY=e.y+u*Math.cos(s+l),a.rightX=e.x+u*Math.sin(s-l),a.rightY=e.y-u*Math.cos(s-l)):o==="end"&&(n.x>=e.x?(a.leftX=n.x+u*Math.sin(s-l),a.leftY=n.y-u*Math.cos(s-l),a.rightX=n.x-u*Math.sin(s+l),a.rightY=n.y+u*Math.cos(s+l)):(a.leftX=n.x-u*Math.sin(s-l),a.leftY=n.y+u*Math.cos(s-l),a.rightX=n.x+u*Math.sin(s+l),a.rightY=n.y-u*Math.cos(s+l))),a},vg=globalThis&&globalThis.__assign||function(){return vg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},vg.apply(this,arguments)},ol=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Hd=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},X7e=function(t,e){return Math.abs(t.centerX-e.centerX)*2<t.width+e.width&&Math.abs(t.centerY-e.centerY)*2<t.height+e.height},$P=function(t){var e=[],n={};return t.forEach(function(r){var i="".concat(r.x,"-").concat(r.y);r.id=i,n[i]=r}),Object.keys(n).forEach(function(r){e.push(n[r])}),e},Qw=function(t,e){return t.width===0&&t.height===0?t:{x:t.x,y:t.y,centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},Z7e=function(t,e){var n=Math.abs(t.x-e.centerX),r=Math.abs(t.y-e.centerY);return n/e.width>r/e.height?di.HORIZONTAL:di.VERTICAL},Hw=function(t,e,n){var r=Z7e(n,e);return r===di.HORIZONTAL?{x:n.x>t.centerX?t.maxX:t.minX,y:n.y}:{x:n.x,y:n.y>t.centerY?t.maxY:t.minY}},ZB=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),i=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{x:(n+i)/2,y:(r+o)/2,centerX:(n+i)/2,centerY:(r+o)/2,minX:n,minY:r,maxX:i,maxY:o,height:o-r,width:i-n}},N0=function(t,e){t===void 0&&(t=[]);var n=[],r=[];t.forEach(function(c){n.push(c.x),r.push(c.y)});var i=Math.min.apply(Math,Hd([],ol(n),!1)),o=Math.max.apply(Math,Hd([],ol(n),!1)),a=Math.min.apply(Math,Hd([],ol(r),!1)),s=Math.max.apply(Math,Hd([],ol(r),!1)),l=o-i,u=s-a;return e&&(l+=e,u+=e),{centerX:(i+o)/2,centerY:(a+s)/2,maxX:o,maxY:s,minX:i,minY:a,x:(i+o)/2,y:(a+s)/2,height:u,width:l}},Ww=function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:i},{x:e,y:i}]},OO=function(t,e){var n=t.x,r=t.y;return n<e.minX||n>e.maxX||r<e.minY||r>e.maxY},G7e=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},K7e=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},J7e=function(t,e){return Hd(Hd([],ol(G7e(t,e.x)),!1),ol(K7e(t,e.y)),!1)},NP=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},e9e=function(t,e){var n=-2,r=0;return e.forEach(function(i){i&&(t.x===i.x&&(r+=n),t.y===i.y&&(r+=n))}),r},GB=function(t,e,n,r,i){return NP(t,e)+NP(t,n)+e9e(t,[e,n,r,i])},jY=function(t,e,n,r,i){i||(i=0),t.unshift(e[r]),n[r]&&n[r]!==r&&i<=100&&jY(t,e,n,n[r],i+1)},t9e=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},oy=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=r.x-n.x,s=r.y-n.y,l=(-o*(t.x-n.x)+i*(t.y-n.y))/(-a*o+i*s),u=(a*(t.y-n.y)-s*(t.x-n.x))/(-a*o+i*s);return l>=0&&l<=1&&u>=0&&u<=1},KB=function(t,e,n){if(n.width===0&&n.height===0)return!1;var r=ol(Ww(n),4),i=r[0],o=r[1],a=r[2],s=r[3];return oy(t,e,i,o)||oy(t,e,i,s)||oy(t,e,o,a)||oy(t,e,a,s)},n9e=function(t,e,n,r){var i=[];return t.forEach(function(o){o!==e&&(o.x===e.x||o.y===e.y)&&!KB(o,e,n)&&!KB(o,e,r)&&i.push(o)}),$P(i)},r9e=function(t,e,n,r,i,o,a){var s=[],l=[e],u={},c={},d={};e.id&&(c[e.id]=0,d[e.id]=GB(e,n,e));var f={};t.forEach(function(g){g.id&&(f[g.id]=g)});for(var h=function(){var g,y=1/0;if(l.forEach(function(w){w.id&&d[w.id]<y&&(y=d[w.id],g=w)}),g===n&&n.id){var b=[];return jY(b,f,u,n.id),{value:b}}if(!g)return{value:[e,n]};t9e(l,g),s.push(g),n9e(t,g,r,i).forEach(function(w){if(s.indexOf(w)===-1&&(l.indexOf(w)===-1&&l.push(w),(g==null?void 0:g.id)&&(w==null?void 0:w.id))){var O=d[g.id]+NP(g,w);if(c[w.id]&&O>=c[w.id])return;u[w.id]=g.id,c[w.id]=O,d[w.id]=c[w.id]+GB(w,n,e,o,a)}})};l.length;){var m=h();if(typeof m=="object")return m.value}return[e,n]},JB=function(t){return ja(t)},zY=function(t){for(var e=1;e<t.length-1;){var n=t[e-1],r=t[e],i=t[e+1];n.x===r.x&&r.x===i.x||n.y===r.y&&r.y===i.y?t.splice(e,1):e++}return t},e6=function(t,e,n,r,i){var o=JB(n),a=JB(r),s=Qw(o,i),l=Qw(a,i),u=Hw(s,o,t),c=Hw(l,a,e);if(X7e(s,l)){var d=o9e(t,e,u,c);return Hd(Hd([t,u],ol(d),!1),[c,e],!1)}var f=N0([u,c]),h=ZB(s,f),m=ZB(l,f),g=[];g=g.concat(Ww(h)),g=g.concat(Ww(m));var y={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[f,h,m].forEach(function(w){g=g.concat(J7e(w,y).filter(function(O){return OO(O,s)&&OO(O,l)}))}),[{x:u.x,y:c.y},{x:c.x,y:u.y}].forEach(function(w){OO(w,s)&&OO(w,l)&&g.push(w)}),g.unshift(u),g.push(c),g=$P(g);var b=r9e(g,u,c,o,a,t,e);return b.unshift(t),b.push(e),b.length>2&&(b=zY(b)),$P(b)},i9e=function(t){if(t.length===1){var e=ol(t,1),n=e[0];return[n,n]}else{for(var r=t[0],i=t[1],o=Kl(r.x,r.y,i.x,i.y),a=1;a<t.length-1;a++){var s=t[a],l=t[a+1],u=Kl(s.x,s.y,l.x,l.y);u>o&&(o=u,r=s,i=l)}return[r,i]}},t6=function(t,e,n){var r=Wd(t,n),i=Wd(e,n);return r&&i},n6=function(t,e,n){var r=Wd(t,n),i=Wd(e,n),o=r&&i,a=r||i;return!o&&a},r6=function(t,e,n){for(var r=void 0,i=ja(n),o=Ww(i),a=0;a<o.length;a++){var s=oy(t,e,o[a],o[(a+1)%o.length]);s&&(r=[o[a],o[(a+1)%o.length]])}if(r)return Y7e(t,e,r[0],r[1])},Uw=function(t,e){var n=void 0;return t.x===e.x?n=di.VERTICAL:t.y===e.y&&(n=di.HORIZONTAL),n},sp=function(t){var e=t.split(" "),n=[];return e&&e.forEach(function(r){var i=ol(r.split(","),2),o=i[0],a=i[1];n.push({x:Number(o),y:Number(a)})}),n},o9e=function(t,e,n,r){var i=[],o=Uw(t,n),a=Uw(e,r);if(o===a)t.y===n.y?(i.push({x:n.x,y:(n.y+r.y)/2}),i.push({x:r.x,y:(n.y+r.y)/2})):(i.push({x:(n.x+r.x)/2,y:n.y}),i.push({x:(n.x+r.x)/2,y:r.y}));else{var s={x:n.x,y:r.y},l=R0(s,t,n),u=R0(s,e,r);if(l||u)s={x:r.x,y:n.y};else{var c=i6(s,t,n),d=i6(s,e,r);c&&d&&(s={x:r.x,y:n.y})}i.push(s)}return i},i6=function(t,e,n){return t.x===e.x&&t.x===n.x||t.y===e.y&&t.y===n.y},QY=function(t){if(!t)return 0;for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:r>=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=2}return e},a9e=function(t){var e=t.start,n=t.end,r;if(e.x===n.x&&e.y===n.y)r="";else{var i={start:e,end:n,offset:10,verticalLength:5},o=$0(vg(vg({},i),{type:"start"})),a=$0(vg(vg({},i),{type:"end"}));r="M".concat(o.leftX," ").concat(o.leftY,`
  95. L`).concat(o.rightX," ").concat(o.rightY,`
  96. L`).concat(a.rightX," ").concat(a.rightY,`
  97. L`).concat(a.leftX," ").concat(a.leftY," z")}return{d:r,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},o6=function(t){var e=t.start,n=t.end,r=t.sourceNode,i=t.targetNode,o=t.offset,a=ja(r),s=ja(i),l=Qw(a,o),u=Qw(s,o),c=Hw(l,a,e),d=Hw(u,s,n);return{sNext:c,ePre:d}},zN=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(","),n=wO(e[0]),r=wO(e[1]),i=wO(e[2]),o=wO(e[3]);return[n,r,i,o]},wO=function(t){var e=ol(t.replace(/(^\s*)/g,"").split(" "),2),n=e[0],r=e[1];return{x:+n,y:+r}},a6=function(t,e){var n=ol(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=q9e(r,i,o,a,e);return[s,t[3]]},HY=function(t,e){for(var n=t.x,r=t.y,i=sp(e),o=Number.MAX_SAFE_INTEGER,a,s=[],l=0;l<i.length;l++)s.push({start:i[l],end:i[(l+1)%i.length]});if(s.forEach(function(f){var h=f.start,m=f.end;if(h.x===m.x){var g={x:h.x,y:r},y=R0(g,h,m);if(y){var b=Math.abs(h.x-n);b<o&&(o=b,a=g)}}else if(h.y===m.y){var g={x:n,y:h.y},y=R0(g,h,m);if(y){var b=Math.abs(h.y-r);b<o&&(o=b,a=g)}}}),!a){var u=s[0],c=u.start,d=u.end;a={x:c.x+(d.x-c.x)/2,y:c.y+(d.y-c.y)/2}}return a},s9e=function(t){return vo(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},s6=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function l9e(t,e){return typeof e!="function"?function(n,r,i){return Object.assign({type:t.edgeType},i)}:function(n,r,i){var o=e(n,r,i);return o?typeof o=="string"?Object.assign({},i,{type:o}):Object.assign({type:o},i):{type:t.edgeType}}}var u9e=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,i=0;return jn(e,function(o){var a=QY(o);i=a>i?a:i}),{width:Math.ceil(i/2)*r+r/4,height:n*(r+2)+r/4}},Xp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},SO=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function vm(t,e,n){return n&&e*Math.round(t/e)||t}function c9e(t,e,n){if(!t)return[];var r=Math.min.apply(Math,SO([],Xp(t.map(function(g){return g[0]})),!1)),i=Math.max.apply(Math,SO([],Xp(t.map(function(g){return g[0]})),!1)),o=Math.min.apply(Math,SO([],Xp(t.map(function(g){return g[1]})),!1)),a=Math.max.apply(Math,SO([],Xp(t.map(function(g){return g[1]})),!1)),s=-r,l=-o,u=t.map(function(g){var y=Xp(g,2),b=y[0],w=y[1];return[b+s,w+l]}),c=i-r,d=a-o,f=e?e/c:1,h=n?n/d:1,m=Math.min(f,h);return u.map(function(g){var y=Xp(g,2),b=y[0],w=y[1];return[b*m,w*m]})}var HT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},WT=function(t,e,n){var r=HT(t,2),i=r[0],o=r[1],a=HT(e,2),s=a[0],l=a[1],u=HT(n,2),c=u[0],d=u[1];return i>s&&i<c&&o>l&&o<d},WY=function(t,e){var n=e.multipleSelectKey,r=!1;switch(n){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;case"ctrl":r=t.ctrlKey;break;default:r=!1;break}return r},QN=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function l6(t,e){return t instanceof Vo&&e instanceof Vo}var UY=function(t){QN(e,t);function e(n,r,i){var o=t.call(this,3)||this;return o[0]=n,o[1]=r,o[2]=i,o.x=n,o.y=r,o.z=i,Object.setPrototypeOf(o,e.prototype),o}return e.prototype.add=function(n){if(l6(this,n))return new Vo(this.x+n.x,this.y+n.y);var r=this.z+n.z;return new DP((this.x+n.x)/r,(this.y+n.y)/r)},e.prototype.subtract=function(n){if(l6(this,n))return new Vo(this.x-n.x,this.y-n.y);var r=this.z-n.z;return r===0?new Vo(this.x-n.x,this.y-n.y):new DP((this.x-n.x)/r,(this.y-n.y)/r)},e}(Array),Vo=function(t){QN(e,t);function e(n,r,i){var o=t.call(this,n,r,i!=null?i:0)||this;return Object.setPrototypeOf(o,e.prototype),o}return e.prototype.toString=function(){return"Vector"},e.prototype.dot=function(n){var r=this;return n.reduce(function(i,o,a){return i+o*r[a]})},e.prototype.cross=function(n){return new e(this.y*n.z-this.z*n.y,this.z*n.x-this.x*n.z,this.x*n.y-this.y*n.x)},e.prototype.getLength=function(){return Math.hypot(this.x,this.y)},e.prototype.normalize=function(){var n=this.getLength();return new e(this.x/n,this.y/n)},e.prototype.crossZ=function(n){return this.x*n.y-this.y*n.x},e.prototype.angle=function(n){var r=this.crossZ(n),i=Math.acos(this.normalize().dot(n.normalize()));return r>=0?i:-i},e}(UY),DP=function(t){QN(e,t);function e(n,r){var i=t.call(this,n,r,1)||this;return Object.setPrototypeOf(i,e.prototype),i}return e.prototype.toString=function(){return"Point"},e}(UY),pC=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},UT=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},gC=function(t){pC(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.call(this,n.length)||this;return i.fill(new Array(3)),n.forEach(function(o,a){i[a]=o}),i.columns=n[0].length,i.rows=n.length,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.getRow=function(n){return this[n]},e.prototype.getColumn=function(n){return UT([],Zp(this.map(function(r){return r[n]})),!1)},e.prototype.transpose=function(){for(var n=[],r=0;r<this.columns;r++)n.push(this.getColumn(r));return new(e.bind.apply(e,UT([void 0],Zp(n),!1)))},e.prototype.cross=function(n){var r=new Array(this.rows).fill("").map(function(){return[]});if(this.columns===n.rows)for(var i=0;i<this.rows;i++)for(var o=this.getRow(i),a=function(l){var u=n.getColumn(l);r[i][l]=o.reduce(function(c,d,f){return c+d*u[f]},0)},s=0;s<n.columns;s++)a(s);return new(e.bind.apply(e,UT([void 0],Zp(r),!1)))},e.prototype.to2D=function(){return this.map(function(n){return[n[0],n[1]]})},e.prototype.toPoints=function(){return this.map(function(n){return new DP(n[0],n[1])})},e.prototype.toString=function(){var n=Zp(this[0],2),r=n[0],i=n[1],o=Zp(this[1],2),a=o[0],s=o[1],l=Zp(this[2],2),u=l[0],c=l[1];return"matrix(".concat(r," ").concat(i," ").concat(a," ").concat(s," ").concat(u," ").concat(c,")")},e.prototype.translate=function(n,r){return this.cross(new mC(n,r))},e.prototype.rotate=function(n){return this.cross(new d9e(n))},e.prototype.scale=function(n,r){return this.cross(new f9e(n,r))},e}(Array),d9e=function(t){pC(e,t);function e(n){var r=t.call(this,new Vo(+Math.cos(n).toFixed(2),+Math.sin(n).toFixed(2),0),new Vo(-Math.sin(n).toFixed(2),+Math.cos(n).toFixed(2),0),new Vo(0,0,1))||this;return Object.setPrototypeOf(r,e.prototype),r}return e.prototype.inverse=function(){return this.transpose()},e}(gC),f9e=function(t){pC(e,t);function e(n,r){var i=t.call(this,new Vo(n,0,0),new Vo(0,r,0),new Vo(0,0,1))||this;return i.sx=n,i.sy=r,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.inverse=function(){return new e(1/this.sx,1/this.sy)},e}(gC),mC=function(t){pC(e,t);function e(n,r){var i=t.call(this,new Vo(1,0,0),new Vo(0,1,0),new Vo(n,r,1))||this;return i.tx=n,i.ty=r,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.inverse=function(){return new e(-this.tx,-this.ty)},e}(gC);Qze({isolateGlobalState:!0});var qw=globalThis&&globalThis.__assign||function(){return qw=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},qw.apply(this,arguments)},LP=function(t){var e=t.anchors;return e},Yw=function(t,e){for(var n=e.nodes,r,i=n.length-1;i>=0;i--){var o=n[i],a=g9e(t,o);if(a){var s=o.getTargetAnchor(t);if(s){var l={node:o,anchorIndex:s.index,anchor:s.anchor};(!r||h9e(o,r.node,e))&&(r=l)}}}return r},h9e=function(t,e,n){return t.zIndex>e.zIndex?!0:n.nodesMap[t.id].index>n.nodesMap[e.id].index},p9e=function(t,e){for(var n=LP(e),r,i=Number.MAX_SAFE_INTEGER,o=0;o<n.length;o++){var a=Kl(t.x,t.y,n[o].x,n[o].y);a<i&&(i=a,r={index:o,anchor:qw(qw({},n[o]),{x:n[o].x,y:n[o].y,id:n[o].id})})}return r},Kl=function(t,e,n,r){return Math.hypot(t-n,e-r)},Wd=function(t,e){var n=!1,r=0,i=ja(e);return t.x>=i.minX-r&&t.x<=i.maxX+r&&t.y>=i.minY-r&&t.y<=i.maxY+r&&(n=!0),n},g9e=function(t,e){var n=!1,r=5,i=ja(e);return t.x>=i.minX-r&&t.x<=i.maxX+r&&t.y>=i.minY-r&&t.y<=i.maxY+r&&(n=!0),n},ja=function(t){var e=t.x,n=t.y,r=t.width,i=t.height;return{minX:e-r/2,minY:n-i/2,maxX:e+r/2,maxY:n+i/2,x:e,y:n,width:r,height:i,centerX:e,centerY:n}},m9e=function(t){var e=t,n=e.x,r=e.y,i=e.width,o=e.height,a=e.radius;return[{x:n-i/2+a,y:r-o/2+a,r:a},{x:n+i/2-a,y:r-o/2+a,r:a},{x:n-i/2+a,y:r+o/2-a,r:a},{x:n+i/2-a,y:r+o/2-a,r:a}]},u6=function(t,e,n){var r=m9e(n),i,o=Number.MAX_SAFE_INTEGER;return r.forEach(function(a){var s=Kl(t.x,t.y,a.x,a.y);s<o&&(o=s,i=a)}),IP(t,e,i)},IP=function(t,e,n){var r,i=n.x,o=n.y,a=n.r;if(e===di.HORIZONTAL){var s=i-Math.sqrt(a*a-(t.y-o)*(t.y-o)),l=i+Math.sqrt(a*a-(t.y-o)*(t.y-o)),u=Math.abs(s-t.x)<Math.abs(l-t.x)?s:l;r={x:u,y:t.y}}else if(e===di.VERTICAL){var c=o-Math.sqrt(a*a-(t.x-i)*(t.x-i)),d=o+Math.sqrt(a*a-(t.x-i)*(t.x-i)),f=Math.abs(c-t.y)<Math.abs(d-t.y)?c:d;r={x:t.x,y:f}}return r},c6=function(t,e){var n=e,r=!1,i=n.x,o=n.y,a=n.width,s=n.height,l=n.radius,u={minX:i-a/2+l,maxX:i+a/2-l,minY:o-s/2+l,maxY:o+s/2-l};return t.y===o+s/2||t.y===o-s/2?r=t.x>u.minX&&t.x<u.maxX:(t.x===i+a/2||t.x===i-a/2)&&(r=t.y>u.minY&&t.y<u.maxY),r},d6=function(t,e,n){var r,i=n,o=i.x,a=i.y,s=i.rx,l=i.ry;if(e===di.HORIZONTAL){var u=o-Math.sqrt(s*s-(t.y-a)*(t.y-a)*s*s/(l*l)),c=o+Math.sqrt(s*s-(t.y-a)*(t.y-a)*s*s/(l*l)),d=Math.abs(u-t.x)<Math.abs(c-t.x)?u:c;r={x:d,y:t.y}}else if(e===di.VERTICAL){var f=a-Math.sqrt(l*l-(t.x-o)*(t.x-o)*l*l/(s*s)),h=a+Math.sqrt(l*l-(t.x-o)*(t.x-o)*l*l/(s*s)),m=Math.abs(f-t.y)<Math.abs(h-t.y)?f:h;r={x:t.x,y:m}}return r},xO=function(t,e,n){for(var r=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,o,a=[],s=0;s<r.length;s++)a.push({start:r[s],end:r[(s+1)%r.length]});return a.forEach(function(l){var u=l.start,c=l.end,d=u,f=c;u.x>c.x&&(d=c,f=u);var h={x:t.x,y:t.y};if(d.x===f.x&&e===di.HORIZONTAL&&(h={x:d.x,y:t.y}),d.y===f.y&&e===di.VERTICAL&&(h={x:t.x,y:d.y}),d.x!==f.x&&d.y!==f.y){var m=(f.y-d.y)/(f.x-d.x),g=(d.x*f.y-f.x*d.y)/(d.x-f.x);e===di.HORIZONTAL?h={x:(t.y-g)/m,y:t.y}:e===di.VERTICAL&&(h={x:t.x,y:m*t.x+g})}var y=R0(h,u,c);if(y){var b=Kl(h.x,h.y,t.x,t.y);b<i&&(i=b,o=h)}}),o},v9e=function(t){var e=vo(t,["id","type","x","y","text","label","properties","virtual","rotate","resizable","rotatable"]);return e},f6=function(t,e,n,r){var i=t.x,o=t.y;return e.x>t.x?i=t.x+n/2:e.x<t.x&&(i=t.x-n/2),e.y>t.y?o=t.y+r/2:e.y<t.y&&(o=t.y-r/2),{x:i,y:o}},qY=function(t){var e=t.rows,n=t.style,r=t.rowsLength,i=t.className,o=document.createElement("div");o.className=i,o.style.fontSize="".concat(n.fontSize),o.style.width="".concat(n.width),o.style.lineHeight="".concat(n.lineHeight),o.style.padding="".concat(n.padding),n.fontFamily&&(o.style.fontFamily="".concat(n.fontFamily)),r>1?e.forEach(function(s){var l=document.createElement("div");l.textContent=s,o.appendChild(l)}):o.textContent=e[0],document.body.appendChild(o);var a=o.clientHeight;return document.body.removeChild(o),a},h6=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,i=0;return e&&e.forEach(function(o){var a=QY(o);i=a>i?a:i}),{width:Math.ceil(i/2)*r+r/4,height:n*(r+2)+r/4}},Xw=function(t){return typeof t!="object"?{isAllPass:!!t,msg:t?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:t};let CO;const y9e=new Uint8Array(16);function b9e(){if(!CO&&(CO=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!CO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return CO(y9e)}const Po=[];for(let t=0;t<256;++t)Po.push((t+256).toString(16).slice(1));function _9e(t,e=0){return Po[t[e+0]]+Po[t[e+1]]+Po[t[e+2]]+Po[t[e+3]]+"-"+Po[t[e+4]]+Po[t[e+5]]+"-"+Po[t[e+6]]+Po[t[e+7]]+"-"+Po[t[e+8]]+Po[t[e+9]]+"-"+Po[t[e+10]]+Po[t[e+11]]+Po[t[e+12]]+Po[t[e+13]]+Po[t[e+14]]+Po[t[e+15]]}const O9e=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var p6={randomUUID:O9e};function BP(t,e,n){if(p6.randomUUID&&!e&&!t)return p6.randomUUID();t=t||{};const r=t.random||(t.rng||b9e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return _9e(r)}var nf=function(){return BP()},Py=new Map,YY=function(t){var e=nf();function n(){t();var i=Py.get(e);if(i){var o=window.requestAnimationFrame(n);Py.set(e,o)}}var r=window.requestAnimationFrame(n);return Py.set(e,r),e},Zw=function(t){var e=Py.get(t);e&&(window.cancelAnimationFrame(e),Py.delete(t))},D0=globalThis&&globalThis.__assign||function(){return D0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},D0.apply(this,arguments)},w9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function XY(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.value,a=t.fontSize,s=a===void 0?12:a,l=t.fill,u=l===void 0?"currentColor":l,c=t.overflowMode,d=c===void 0?"default":c,f=t.textWidth,h=f===void 0?void 0:f,m=t.model,g={x:n,y:i,fill:u,fontSize:s,textAnchor:"middle",dominantBaseline:"central"};if(jn(Gu(t),function(x){var C=w9e(x,2),E=C[0],T=C[1];typeof T!="object"&&(g[E]=T)}),o){var y=String(o).split(/[\r\n]/g),b=y.length;if(d!=="default"){var w=m.BaseType,O=m.modelType;if(w===Si.NODE&&O!==Kn.TEXT_NODE||w===Si.EDGE&&h)return S9e(t)}if(b>1){var S=y.map(function(x,C){var E=s+2,T=(C-(b-1)/2)*E;return rt("tspan",{className:"lf-text-tspan",x:n,y:i+T,children:x})});return rt("text",D0({},g,{children:S}))}return rt("text",D0({},g,{children:o}))}return null}function S9e(t){var e=t.x,n=t.y,r=t.value,i=t.model,o=t.textWidth,a=t.fontSize,s=a===void 0?12:a,l=t.lineHeight,u=t.fontFamily,c=u===void 0?"":u,d=t.wrapPadding,f=d===void 0?"0, 0":d,h=t.overflowMode,m=i.width,g=i.height,y=i.textHeight,b=o||m,w=String(r).split(/[\r\n]/g),O=w.length,S=qY({rows:w,style:{fontSize:"".concat(s,"px"),width:"".concat(b,"px"),fontFamily:c,lineHeight:l,padding:f},rowsLength:O,className:"lf-get-text-height"}),x=g>S?g:S;y&&(x=y);var C=h==="ellipsis";return C&&(x=s+2),rt("g",{children:rt("foreignObject",{width:b,height:x,x:e-b/2,y:n-x/2,style:{overflow:"visible",textAlign:"left"},children:rt("div",{className:"lf-node-text-auto-wrap",style:{minHeight:x,width:b,padding:f},children:rt("div",{className:C?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:C?w.join(""):"",style:D0({},t),children:w.map(function(E){return rt("div",{className:"lf-node-text--auto-wrap-inner",children:E})})})})})})}var FP=globalThis&&globalThis.__assign||function(){return FP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},FP.apply(this,arguments)},x9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function ym(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return jn(Gu(t),function(n){var r=x9e(n,2),i=r[0],o=r[1];(i==="style"||typeof o!="object")&&(e[i]=o)}),rt("line",FP({},e))}var VP=globalThis&&globalThis.__assign||function(){return VP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},VP.apply(this,arguments)},C9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function al(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.className,a=t.strokeWidth,s=t.radius,l=s===void 0?0:s,u=e-r/2,c=n-i/2,d={};return d["stroke-width"]=a,jn(Gu(t),function(f){var h=C9e(f,2),m=h[0],g=h[1];typeof g!="object"&&(d[m]=g)}),o?d.className="lf-basic-shape ".concat(o):d.className="lf-basic-shape",l&&(d.rx=l,d.ry=l),d.x=u,d.y=c,rt("rect",VP({},d))}var jP=globalThis&&globalThis.__assign||function(){return jP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jP.apply(this,arguments)},E9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function L0(t){var e={d:""};return jn(Gu(t),function(n){var r=E9e(n,2),i=r[0],o=r[1];(i==="style"||typeof o!="object")&&(e[i]=o)}),rt("path",jP({},e))}var zP=globalThis&&globalThis.__assign||function(){return zP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zP.apply(this,arguments)},T9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function bm(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.r,a=o===void 0?4:o,s=t.className,l={cx:n,cy:i,r:a,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return jn(Gu(t),function(u){var c=T9e(u,2),d=c[0],f=c[1];typeof f!="object"&&(l[d]=f)}),s?l.className="lf-basic-shape ".concat(s):l.className="lf-basic-shape",rt("circle",zP({},l))}var QP=globalThis&&globalThis.__assign||function(){return QP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},QP.apply(this,arguments)},k9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function P9e(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.rx,a=o===void 0?4:o,s=t.ry,l=s===void 0?4:s,u=t.className,c={cx:n,cy:i,rx:a,ry:l,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return jn(Gu(t),function(d){var f=k9e(d,2),h=f[0],m=f[1];typeof m!="object"&&(c[h]=m)}),u?c.className="lf-basic-shape ".concat(u):c.className="lf-basic-shape",rt("ellipse",QP({},c))}var HP=globalThis&&globalThis.__assign||function(){return HP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},HP.apply(this,arguments)},A9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function HN(t){var e=t.points,n=e===void 0?[]:e,r=t.className,i={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return jn(Gu(t),function(o){var a=A9e(o,2),s=a[0],l=a[1];typeof l!="object"&&(i[s]=l)}),r?i.classNmae="lf-basic-shape ".concat(r):i.className="lf-basic-shape",i.points=n.map(function(o){return o.join(",")}).join(" "),rt("polygon",HP({},i))}var WP=globalThis&&globalThis.__assign||function(){return WP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},WP.apply(this,arguments)},M9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function R9e(t){var e=t.className,n={points:"",fill:"none"};return jn(Gu(t),function(r){var i=M9e(r,2),o=i[0],a=i[1];(o==="style"||typeof a!="object")&&(n[o]=a)}),e&&(n.className="".concat(e)),rt("polyline",WP({},n))}var ZY=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),I0=globalThis&&globalThis.__assign||function(){return I0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},I0.apply(this,arguments)},$9e=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},N9e=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qr;(function(t){t[t.LEFT_TOP=0]="LEFT_TOP",t[t.RIGHT_TOP=1]="RIGHT_TOP",t[t.RIGHT_BOTTOM=2]="RIGHT_BOTTOM",t[t.LEFT_BOTTOM=3]="LEFT_BOTTOM"})(Qr||(Qr={}));var D9e=function(t){ZY(e,t);function e(n){var r=t.call(this)||this;r.updateEdgePointByAnchors=function(){var s=r.nodeModel,l=s.id,u=s.anchors,c=r.graphModel.getNodeEdges(l);jn(c,function(d){if(d.sourceNodeId===l){var f=hf(u,function(h){return h.id===d.sourceAnchorId});f&&d.updateStartPoint({x:f.x,y:f.y})}else if(d.targetNodeId===l){var f=hf(u,function(m){return m.id===d.targetAnchorId});f&&d.updateEndPoint({x:f.x,y:f.y})}})},r.triggerResizeEvent=function(s,l,u,c,d,f){r.graphModel.eventCenter.emit(pn.NODE_RESIZE,{preData:s,data:l,deltaX:u,deltaY:c,index:d,model:f})},r.recalcResizeInfo=function(s,l,u,c,d){u===void 0&&(u=1),c===void 0&&(c=!1),d===void 0&&(d=!1);var f=Fn(l),h=f.deltaX,m=f.deltaY,g=f.width,y=f.height,b=f.PCTResizeInfo;if(b){var w=4,O=0,S=0;switch(s){case Qr.LEFT_TOP:S=(h*-1-m)/w;break;case Qr.RIGHT_TOP:S=(h-m)/w;break;case Qr.RIGHT_BOTTOM:S=(h+m)/w;break;case Qr.LEFT_BOTTOM:S=(h*-1+m)/w;break}S!==0&&(O=Math.round(S/b.ResizeBasis.basisHeight*1e5)/1e3),b.ResizePCT.widthPCT=Math.max(Math.min(b.ResizePCT.widthPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit),b.ResizePCT.heightPCT=Math.max(Math.min(b.ResizePCT.heightPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit);var x=Math.round(b.ResizePCT.widthPCT*b.ResizeBasis.basisWidth/100),C=Math.round(b.ResizePCT.heightPCT*b.ResizeBasis.basisHeight/100);switch(s){case Qr.LEFT_TOP:h=g-x,m=y-C;break;case Qr.RIGHT_TOP:h=x-g,m=y-C;break;case Qr.RIGHT_BOTTOM:h=x-g,m=C-y;break;case Qr.LEFT_BOTTOM:h=g-x,m=C-y;break}return f}switch(s){case Qr.LEFT_TOP:f.width=c?g:g-h*u,f.height=d?y:y-m*u;break;case Qr.RIGHT_TOP:f.width=c?g:g+h*u,f.height=d?y:y-m*u;break;case Qr.RIGHT_BOTTOM:f.width=c?g:g+h*u,f.height=d?y:y+m*u;break;case Qr.LEFT_BOTTOM:f.width=c?g:g-h*u,f.height=d?y:y+m*u;break}return f},r.resizeNode=function(s){var l=s.deltaX,u=s.deltaY,c=r.index,d=r.props,f=d.model,h=d.graphModel,m=d.x,g=d.y;GY({x:m,y:g,deltaX:l,deltaY:u,index:c,nodeModel:f,graphModel:h,cancelCallback:function(){r.dragHandler.cancelDrag()}})},r.onDragging=function(s){var l=s.deltaX,u=s.deltaY,c=r.graphModel.transformModel,d=N9e(c.fixDeltaXY(l,u),2),f=d[0],h=d[1];r.resizeNode({deltaX:f,deltaY:h})},r.onDragEnd=function(){var s=r.nodeModel.x,l=r.nodeModel.y;r.nodeModel.moveTo(s,l),r.updateEdgePointByAnchors()};var i=n.index,o=n.model,a=n.graphModel;return r.index=i,r.nodeModel=o,r.graphModel=a,r.dragHandler=new kl({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:a.gridSize}),r}return e.prototype.componentWillUnmount=function(){this.dragHandler.destroy()},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.direction,a=n.model,s=a.getResizeControlStyle(),l=s.width,u=s.height,c=$9e(s,["width","height"]);return rt("g",{className:"lf-resize-control lf-resize-control-".concat(o),children:[rt(al,I0({className:"lf-resize-control-content",x:r,y:i,width:l!=null?l:7,height:u!=null?u:7},c)),rt(al,{className:"lf-resize-control-content",x:r,y:i,width:25,height:25,fill:"transparent",stroke:"transparent",onMouseDown:this.dragHandler.handleMouseDown})]})},e}(ur),L9e=function(t){ZY(e,t);function e(){return t.call(this)||this}return e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=ja(r),a=o.minX,s=o.minY,l=o.maxX,u=o.maxY,c=[{index:Qr.LEFT_TOP,direction:"nw",x:a,y:s},{index:Qr.RIGHT_TOP,direction:"ne",x:l,y:s},{index:Qr.RIGHT_BOTTOM,direction:"se",x:l,y:u},{index:Qr.LEFT_BOTTOM,direction:"sw",x:a,y:u}];return Ca(c,function(d){return rt(D9e,I0({},d,{model:r,graphModel:i}))})},e.prototype.getResizeOutline=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getResizeOutlineStyle();return rt(al,I0({},s,{x:r,y:i,width:o,height:a}))},e.prototype.render=function(){return rt("g",{className:"lf-resize-control-group",children:[this.getResizeOutline(),this.getResizeControl()]})},e}(ur);function I9e(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a={x:n+(i-n)/2,y:r+(o-r)/2};return a}function ay(t,e,n){var r=B9e(n),i=t.x-e.x,o=t.y-e.y,a=i*Math.cos(r)-o*Math.sin(r)+e.x,s=i*Math.sin(r)+o*Math.cos(r)+e.y;return{x:a,y:s}}function B9e(t){return t*Math.PI/180}function F9e(t){return t/Math.PI*180}function V9e(t,e,n,r,i,o,a,s,l){s===void 0&&(s=!1),l===void 0&&(l=!1);var u=e.deltaX,c=e.deltaY,d=e.width,f=e.height,h=F9e(n),m={x:r,y:i},g={x:o,y:a},y=ay(m,g,h),b={x:y.x+u,y:y.y+c},w=H9e(y,b,g,h,s,l,d,f),O=w.width,S=w.height,x=w.center;return e.width=O*t,e.height=S*t,e.deltaX=(x.x-g.x)*2,e.deltaY=(x.y-g.y)*2,e}var j9e=function(t,e,n,r,i,o,a,s,l,u){n===void 0&&(n=1),r===void 0&&(r=!1),i===void 0&&(i=!1),o===void 0&&(o=0);var c=Fn(e),d=c.deltaX,f=c.deltaY,h=c.width,m=c.height,g=c.PCTResizeInfo;if(g){var y=4,b=0,w=0;switch(t){case Qr.LEFT_TOP:w=(d*-1-f)/y;break;case Qr.RIGHT_TOP:w=(d-f)/y;break;case Qr.RIGHT_BOTTOM:w=(d+f)/y;break;case Qr.LEFT_BOTTOM:w=(d*-1+f)/y;break}w!==0&&(b=Math.round(w/g.ResizeBasis.basisHeight*1e5)/1e3),g.ResizePCT.widthPCT=Math.max(Math.min(g.ResizePCT.widthPCT+b,g.ScaleLimit.maxScaleLimit),g.ScaleLimit.minScaleLimit),g.ResizePCT.heightPCT=Math.max(Math.min(g.ResizePCT.heightPCT+b,g.ScaleLimit.maxScaleLimit),g.ScaleLimit.minScaleLimit);var O=Math.round(g.ResizePCT.widthPCT*g.ResizeBasis.basisWidth/100),S=Math.round(g.ResizePCT.heightPCT*g.ResizeBasis.basisHeight/100);switch(t){case Qr.LEFT_TOP:d=h-O,f=m-S;break;case Qr.RIGHT_TOP:d=O-h,f=m-S;break;case Qr.RIGHT_BOTTOM:d=O-h,f=S-m;break;case Qr.LEFT_BOTTOM:d=h-O,f=S-m;break}return c}if(o%(2*Math.PI)!==0&&a!==void 0&&s!==void 0)return V9e(n,c,o,a,s,l,u,r,i);switch(t){case Qr.LEFT_TOP:c.width=r?h:h-d*n,c.height=i?m:m-f*n;break;case Qr.RIGHT_TOP:c.width=r?h:h+d*n,c.height=i?m:m-f*n;break;case Qr.RIGHT_BOTTOM:c.width=r?h:h+d*n,c.height=i?m:m+f*n;break;case Qr.LEFT_BOTTOM:c.width=r?h:h-d*n,c.height=i?m:m+f*n;break}return c},z9e=function(t,e){var n=t.id,r=t.anchors,i=e.getNodeEdges(n);jn(i,function(o){if(o.sourceNodeId===n){var a=hf(r,function(s){return s.id===o.sourceAnchorId});a&&o.updateStartPoint({x:a.x,y:a.y})}else if(o.targetNodeId===n){var a=hf(r,function(l){return l.id===o.targetAnchorId});a&&o.updateEndPoint({x:a.x,y:a.y})}})},Q9e=function(t,e,n,r,i,o,a){a.eventCenter.emit(pn.NODE_RESIZE,{preData:t,data:e,deltaX:n,deltaY:r,index:i,model:o})},GY=function(t){var e=t.x,n=t.y,r=t.deltaX,i=t.deltaY,o=t.index,a=t.nodeModel,s=t.graphModel,l=t.cancelCallback,u=a.r,c=a.rx,d=a.ry,f=a.width,h=a.height,m=a.PCTResizeInfo,g=a.minWidth,y=a.minHeight,b=a.maxWidth,w=a.maxHeight,O=a.rotate,S=a.x,x=a.y,C=g===b,E=y===w,T={width:u||c||f,height:u||d||h,deltaX:r,deltaY:i,PCTResizeInfo:m},P=u||c&&d?1/2:1,A=e,D=n,N=j9e(o,T,P,C,E,O,A,D,S,x);if(N.width<g||N.width>b||N.height<y||N.height>w){l==null||l();return}(O%(2*Math.PI)==0||m||A===void 0||D===void 0)&&(N.deltaX=C?0:N.deltaX,N.deltaY=E?0:N.deltaY);var $=a.getData(),W=a.resize(N);$.x===W.x&&$.y===W.y||(z9e(a,s),Q9e($,W,r,i,o,a,s))};function H9e(t,e,n,r,i,o,a,s){i===void 0&&(i=!1),o===void 0&&(o=!1);var l={x:n.x-(t.x-n.x),y:n.y-(t.y-n.y)},u=I9e(l,e),c=ay(e,u,-r),d=ay(l,u,-r);if(i){var f=Math.abs(c.x-d.x),h=f-a;u.x>c.x?u.x=u.x+h/2:u.x=u.x-h/2}if(o){var m=Math.abs(c.y-d.y),g=m-s;u.y>c.y?u.y=u.y+g/2:u.y=u.y-g/2}if(i||o){var y=ay(d,u,r),b=y.x-l.x,w=y.y-l.y;u.x=u.x-b,u.y=u.y-w,d=ay(l,u,-r),c={x:u.x-(d.x-u.x),y:u.y-(d.y-u.y)}}var O=Math.abs(c.x-d.x),S=Math.abs(c.y-d.y);return i&&(O=a),o&&(S=s),{width:O,height:S,center:u}}var W9e=100,U9e={x:1,y:0,z:0};function q9e(t,e,n,r,i){for(var o=function(h){if(h<0||h>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-h,3)+3*e.x*h*Math.pow(1-h,2)+3*n.x*Math.pow(h,2)*(1-h)+r.x*Math.pow(h,3),y:t.y*Math.pow(1-h,3)+3*e.y*h*Math.pow(1-h,2)+3*n.y*Math.pow(h,2)*(1-h)+r.y*Math.pow(h,3)}},a=0,s=2,l=r.x,u=r.y,c=r;a<i&&s<50;){c=o(1-s/W9e);var d=c.x,f=c.y;a=Kl(l,u,d,f),s++}return c}function Y9e(t,e){return t.x*e.y-t.y*e.x}function X9e(t,e){var n=[t.x,t.y,t.z],r=[e.x,e.y,e.z];return r.reduce(function(i,o,a){return i+o*n[a]})}function Z9e(t,e){var n=Y9e(t,e),r=Math.acos(X9e(g6(t),g6(e)));return n>=0?r:-r}function g6(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function G9e(t){return Z9e(U9e,t)}function K9e(t){return t*(180/Math.PI)}var J9e={baseNode:{fill:"#fff",stroke:"#000",strokeWidth:2},baseEdge:{stroke:"#000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000",fill:"#fff",r:4,hover:{r:10,fill:"#949494",fillOpacity:.5,stroke:"#949494"}},anchorLine:{stroke:"#000",strokeWidth:2,strokeDasharray:"3,2"},nodeText:{color:"#000",overflowMode:"default",fontSize:12,lineHeight:1.2},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#fff"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",fillOpacity:1,stroke:"#949494"}},arrow:{offset:10,verticalLength:5},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#fff",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10,10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5},resizeControl:{width:7,height:7,fill:"#fff",stroke:"#000"},resizeOutline:{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},KY=function(t){var e=Fn(J9e);return t&&(e=Jh(e,t)),e},eQe=KY,tQe=1e3,nQe=999,WN=function(){return++tQe},rQe=function(){return--nQe},Fi=globalThis&&globalThis.__assign||function(){return Fi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fi.apply(this,arguments)},On=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vC=function(){function t(e,n){var r;this.BaseType=Si.EDGE,this.id="",this.type="",this.sourceNodeId="",this.targetNodeId="",this.textMode=hl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this.points="",this.pointsList=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.isAnimation=!1,this.isShowAdjustPoint=!1,this.zIndex=0,this.state=Cr.DEFAULT,this.modelType=Kn.EDGE,this.customTextPosition=!1,this.style={},this.arrowConfig={markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")},this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initEdgeData(e),this.setAttributes()}return t.prototype.initEdgeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),i=this.createId();e.id=i||r||nf()}this.arrowConfig.markerEnd="url(#marker-end-".concat(e.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(e.id,")");var o=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=o,$r(this,s9e(e));var a=this.graphModel.overlapMode;a===Yl.INCREASE&&(this.zIndex=e.zIndex||WN()),this.setAnchors(),this.initPoints(),this.formatText(e)},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.getEdgeStyle=function(){return Fi(Fi({},this.graphModel.theme.baseEdge),this.style)},t.prototype.getAdjustPointStyle=function(){return Fi({},this.graphModel.theme.edgeAdjust)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.edgeText;return Fn(e)},t.prototype.getEdgeAnimationStyle=function(){var e=this.graphModel.theme.edgeAnimation;return Fn(e)},t.prototype.getArrowStyle=function(){var e=this.getEdgeStyle(),n=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,i=this.isAnimation?n.stroke:e.stroke;return Fi(Fi(Fi({},e),{fill:i,stroke:i}),r)},t.prototype.getOutlineStyle=function(){var e=this.graphModel,n=e.theme.outline;return Fn(n)},t.prototype.getTextPosition=function(){return{x:0,y:0}},Object.defineProperty(t.prototype,"sourceNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.sourceNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.targetNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textPosition",{get:function(){return this.getTextPosition()},enumerable:!1,configurable:!0}),t.prototype.getBeginAnchor=function(e,n,r){var i,o,a=LP(e);if(r){if(i=hf(a,function(s){return s.id===r}),i)return i;console.warn("\u672A\u5728\u8282\u70B9\u4E0A\u627E\u5230\u6307\u5B9A\u7684\u8D77\u70B9\u951A\u70B9".concat(r,"\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u951A\u70B9\u4F5C\u4E3A\u8D77\u70B9"))}return a.forEach(function(s){var l=s6(s,n);(o===void 0||l<o)&&(o=l,i=s)}),i},t.prototype.getEndAnchor=function(e,n){var r=this,i,o,a=LP(e);if(n){if(i=hf(a,function(s){return s.id===n}),i)return i;console.warn("\u672A\u5728\u8282\u70B9\u4E0A\u627E\u5230\u6307\u5B9A\u7684\u7EC8\u70B9\u951A\u70B9".concat(n,"\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u951A\u70B9\u4F5C\u4E3A\u7EC8\u70B9"))}return a.forEach(function(s){if(!!r.startPoint){var l=s6(s,r.startPoint);(o===void 0||l<o)&&(o=l,i=s)}}),i},t.prototype.getProperties=function(){return Hl(this.properties)},t.prototype.getData=function(){var e=this.properties;gm(e)&&(e=Hl(e));var n={id:this.id,type:this.type,properties:e,sourceNodeId:this.sourceNodeId,targetNodeId:this.targetNodeId,sourceAnchorId:this.sourceAnchorId,targetAnchorId:this.targetAnchorId,startPoint:$r({},this.startPoint),endPoint:$r({},this.endPoint)};this.graphModel.overlapMode===Yl.INCREASE&&(n.zIndex=this.zIndex);var r=this.text,i=r.x,o=r.y,a=r.value;return a&&(n.text={x:i,y:o,value:a}),n},t.prototype.getHistoryData=function(){return this.getData()},t.prototype.setProperty=function(e,n){IN(this.properties,e,na(n)),this.setAttributes()},t.prototype.deleteProperty=function(e){delete this.properties[e],this.setAttributes()},t.prototype.setProperties=function(e){this.properties=Fi(Fi({},Hl(this.properties)),na(e)),this.setAttributes()},t.prototype.changeEdgeId=function(e){var n=this.arrowConfig,r=n.markerEnd,i=n.markerStart;i&&i==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(e,")")),r&&r==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(e,")")),this.id=e},t.prototype.setStyle=function(e,n){var r;this.style=Fi(Fi({},this.style),(r={},r[e]=na(n),r))},t.prototype.setStyles=function(e){this.style=Fi(Fi({},this.style),na(e))},t.prototype.updateStyles=function(e){this.style=Fi({},na(e))},t.prototype.setTextMode=function(e){this.textMode=e},t.prototype.formatText=function(e){var n,r,i,o=this.graphModel.editConfigModel,a=o.edgeTextDraggable,s=o.edgeTextEdit,l=this.textPosition,u=l.x,c=l.y,d=e.text,f={value:"",x:u,y:c,draggable:a,editable:s};d&&(typeof d=="string"?f=Fi(Fi({},f),{value:d}):(f=Fi(Fi({},f),{x:(n=d.x)!==null&&n!==void 0?n:u,y:(r=d.y)!==null&&r!==void 0?r:c,value:(i=d.value)!==null&&i!==void 0?i:""}),Wc(d.draggable)||(f.draggable=d.draggable),Wc(d.editable)||(f.editable=d.editable))),this.text=f},t.prototype.resetTextPosition=function(){var e=this.textPosition,n=e.x,r=e.y;this.text.x=n,this.text.y=r},t.prototype.moveText=function(e,n){var r=this.text,i=r.x,o=r.y,a=r.value,s=r.draggable,l=r.editable;this.text={value:a,editable:l,draggable:s,x:i+e,y:o+n}},t.prototype.setText=function(e){e&&$r(this.text,e)},t.prototype.updateText=function(e){this.text=Fi(Fi({},Hl(this.text)),{value:e})},t.prototype.setAnchors=function(){if(!this.sourceAnchorId||!this.startPoint){var e=this.getBeginAnchor(this.sourceNode,this.targetNode,this.sourceAnchorId);if(!e)throw new Error("\u65E0\u6CD5\u83B7\u53D6beginAnchor\uFF0C\u8BF7\u68C0\u67E5anchors\u76F8\u5173\u903B\u8F91\uFF0Canchors\u4E0D\u80FD\u4E3A\u7A7A");this.startPoint||(this.startPoint={x:e.x,y:e.y}),this.sourceAnchorId||(this.sourceAnchorId=e.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode,this.targetAnchorId);if(!e)throw new Error("\u65E0\u6CD5\u83B7\u53D6endAnchor\uFF0C\u8BF7\u68C0\u67E5anchors\u76F8\u5173\u903B\u8F91\uFF0Canchors\u4E0D\u80FD\u4E3A\u7A7A");this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}},t.prototype.setSelected=function(e){e===void 0&&(e=!0),this.isSelected=e},t.prototype.setHovered=function(e){e===void 0&&(e=!0),this.isHovered=e},t.prototype.setHitable=function(e){e===void 0&&(e=!0),this.isHitable=e},t.prototype.setHittable=function(e){e===void 0&&(e=!0),this.isHittable=e},t.prototype.openEdgeAnimation=function(){this.isAnimation=!0},t.prototype.closeEdgeAnimation=function(){this.isAnimation=!1},t.prototype.setElementState=function(e,n){this.state=e,this.additionStateData=n},t.prototype.updateStartPoint=function(e){this.startPoint=e},t.prototype.moveStartPoint=function(e,n){this.startPoint&&(this.startPoint.x+=e,this.startPoint.y+=n)},t.prototype.updateEndPoint=function(e){this.endPoint=e},t.prototype.moveEndPoint=function(e,n){this.endPoint&&(this.endPoint.x+=e,this.endPoint.y+=n)},t.prototype.setZIndex=function(e){e===void 0&&(e=0),this.zIndex=e},t.prototype.initPoints=function(){},t.prototype.updateAttributes=function(e){$r(this,e)},t.prototype.getAdjustStart=function(){return this.startPoint},t.prototype.getAdjustEnd=function(){return this.endPoint},t.prototype.updateAfterAdjustStartAndEnd=function(e){var n=e.startPoint,r=e.endPoint;this.updateStartPoint({x:n.x,y:n.y}),this.updateEndPoint({x:r.x,y:r.y})},t.BaseType=Si.EDGE,On([at],t.prototype,"type",void 0),On([at],t.prototype,"sourceNodeId",void 0),On([at],t.prototype,"targetNodeId",void 0),On([at],t.prototype,"startPoint",void 0),On([at],t.prototype,"endPoint",void 0),On([at],t.prototype,"textMode",void 0),On([at],t.prototype,"text",void 0),On([at],t.prototype,"properties",void 0),On([at],t.prototype,"points",void 0),On([at],t.prototype,"pointsList",void 0),On([at],t.prototype,"isSelected",void 0),On([at],t.prototype,"isHovered",void 0),On([at],t.prototype,"isHitable",void 0),On([at],t.prototype,"isHittable",void 0),On([at],t.prototype,"draggable",void 0),On([at],t.prototype,"visible",void 0),On([at],t.prototype,"isAnimation",void 0),On([at],t.prototype,"isShowAdjustPoint",void 0),On([at],t.prototype,"zIndex",void 0),On([at],t.prototype,"state",void 0),On([at],t.prototype,"style",void 0),On([at],t.prototype,"arrowConfig",void 0),On([Gr],t.prototype,"sourceNode",null),On([Gr],t.prototype,"targetNode",null),On([Gr],t.prototype,"textPosition",null),On([it],t.prototype,"setProperty",null),On([it],t.prototype,"deleteProperty",null),On([it],t.prototype,"setProperties",null),On([it],t.prototype,"changeEdgeId",null),On([it],t.prototype,"setStyle",null),On([it],t.prototype,"setStyles",null),On([it],t.prototype,"updateStyles",null),On([it],t.prototype,"setTextMode",null),On([it],t.prototype,"formatText",null),On([it],t.prototype,"resetTextPosition",null),On([it],t.prototype,"moveText",null),On([it],t.prototype,"setText",null),On([it],t.prototype,"updateText",null),On([it],t.prototype,"setAnchors",null),On([it],t.prototype,"setSelected",null),On([it],t.prototype,"setHovered",null),On([it],t.prototype,"setHitable",null),On([it],t.prototype,"setHittable",null),On([it],t.prototype,"openEdgeAnimation",null),On([it],t.prototype,"closeEdgeAnimation",null),On([it],t.prototype,"setElementState",null),On([it],t.prototype,"updateStartPoint",null),On([it],t.prototype,"moveStartPoint",null),On([it],t.prototype,"updateEndPoint",null),On([it],t.prototype,"moveEndPoint",null),On([it],t.prototype,"setZIndex",null),On([it],t.prototype,"initPoints",null),On([it],t.prototype,"updateAttributes",null),On([it],t.prototype,"getAdjustStart",null),On([it],t.prototype,"getAdjustEnd",null),On([it],t.prototype,"updateAfterAdjustStartAndEnd",null),t}(),iQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oh=globalThis&&globalThis.__assign||function(){return Oh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Oh.apply(this,arguments)},Bl=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},UP=function(t){iQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.BEZIER_EDGE,i.path="",i.initEdgeData(n),i.setAttributes(),i}return e.prototype.initEdgeData=function(n){this.offset=100,t.prototype.initEdgeData.call(this,n)},e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.bezier,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return Oh(Oh(Oh({},r),Fn(n)),Fn(o))},e.prototype.getTextPosition=function(){if(this.pointsList&&this.pointsList.length>0){var n=0,r=0;return this.pointsList.forEach(function(i){var o=i.x,a=i.y;n+=o,r+=a}),{x:n/this.pointsList.length,y:r/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},e.prototype.getData=function(){var n=t.prototype.getData.call(this),r=this.pointsList.map(function(i){var o=i.x,a=i.y;return{x:o,y:a}});return Oh(Oh({},n),{pointsList:r})},e.prototype.getControls=function(){var n=this.startPoint,r=this.endPoint,i=o6({start:n,end:r,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return i},e.prototype.getPath=function(n){var r=qT(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return"M ".concat(i.x," ").concat(i.y,`
  98. C `).concat(o.x," ").concat(o.y,`,
  99. `).concat(a.x," ").concat(a.y,`,
  100. `).concat(s.x," ").concat(s.y)},e.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=this.getControls(),r=n.sNext,i=n.ePre;this.updatePath(r,i)},e.prototype.updatePath=function(n,r){n=Fn(n),r=Fn(r);var i={x:this.startPoint.x,y:this.startPoint.y},o={x:this.endPoint.x,y:this.endPoint.y};if(!n||!r){var a=this.getControls();n=a.sNext,r=a.ePre}this.pointsList=[i,n,r,o],this.path=this.getPath(this.pointsList)},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r;var i=qT(this.pointsList,3),o=i[1],a=i[2];o.x+=n,o.y+=r,this.updatePath(o,a)},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r;var i=qT(this.pointsList,3),o=i[1],a=i[2];a.x+=n,a.y+=r,this.updatePath(o,a)},e.prototype.updateAdjustAnchor=function(n,r){var i;r==="sNext"?this.pointsList[1]=n:r==="ePre"&&(this.pointsList[2]=n),this.path=this.getPath(this.pointsList),!((i=this.text)===null||i===void 0)&&i.value&&this.setText($r({},this.text,this.textPosition))},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,i=n.endPoint,o=n.sourceNode,a=n.targetNode,s=o6({start:r,end:i,sourceNode:o,targetNode:a,offset:this.offset}),l=s.sNext,u=s.ePre;this.pointsList=[r,l,u,i],this.initPoints()},Bl([at],e.prototype,"path",void 0),Bl([it],e.prototype,"initPoints",null),Bl([it],e.prototype,"updatePoints",null),Bl([it],e.prototype,"updateStartPoint",null),Bl([it],e.prototype,"updateEndPoint",null),Bl([it],e.prototype,"moveStartPoint",null),Bl([it],e.prototype,"moveEndPoint",null),Bl([it],e.prototype,"updateAdjustAnchor",null),Bl([it],e.prototype,"getAdjustStart",null),Bl([it],e.prototype,"getAdjustEnd",null),Bl([it],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(vC),oQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ay=globalThis&&globalThis.__assign||function(){return Ay=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ay.apply(this,arguments)},m6=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},aQe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},v6=function(t){oQe(e,t);function e(){var n=t.apply(this,aQe([],m6(arguments),!1))||this;return n.modelType=Kn.LINE_EDGE,n}return e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.line,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return Ay(Ay(Ay({},r),Fn(n)),Fn(o))},e.prototype.initEdgeData=function(n){t.prototype.initEdgeData.call(this,n),this.points=this.getPath([this.startPoint,this.endPoint])},e.prototype.getPath=function(n){var r=m6(n,2),i=r[0],o=r[1];return"".concat(i.x,",").concat(i.y," ").concat(o.x,",").concat(o.y)},e.prototype.getTextPosition=function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},e}(vC),sQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),My=globalThis&&globalThis.__assign||function(){return My=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},My.apply(this,arguments)},Zo=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},y6=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},lQe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},B0=function(t){sQe(e,t);function e(){var n=t.apply(this,lQe([],y6(arguments),!1))||this;return n.modelType=Kn.POLYLINE_EDGE,n.draggingPointList=[],n}return e.prototype.initEdgeData=function(n){this.offset=30,n.pointsList&&(this.pointsList=n.pointsList),t.prototype.initEdgeData.call(this,n)},e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.polyline,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return My(My(My({},r),Fn(n)),Fn(o))},e.prototype.getTextPosition=function(){var n,r=(n=this.text)===null||n===void 0?void 0:n.value;if(this.dbClickPosition&&!r){var i=this.dbClickPosition,o=i.x,a=i.y;return{x:o,y:a}}var s=sp(this.points),l=y6(i9e(s),2),u=l[0],c=l[1];return{x:(u.x+c.x)/2,y:(u.y+c.y)/2}},e.prototype.getAfterAnchor=function(n,r,i){var o,a;return i.forEach(function(s){var l;n===di.HORIZONTAL?l=Math.abs(r.y-s.y):n===di.VERTICAL&&(l=Math.abs(r.x-s.x)),(!a||a>l)&&(a=l,o=s)}),o},e.prototype.getCrossPoint=function(n,r,i){var o;return n===di.HORIZONTAL?o={x:i.x,y:r.y}:n===di.VERTICAL&&(o={x:r.x,y:i.y}),o},e.prototype.removeCrossPoints=function(n,r,i){var o=i.map(function(b){return b});if(n===1){var a=o[n],s=o[r],l=o[n-1],u=t6(l,a,this.sourceNode);if(u){var c=n6(a,s,this.sourceNode);if(c){var d=r6(a,s,this.sourceNode);d&&(o[n]=d,o.splice(n-1,1),n--,r--)}}else{var f=this.sourceNode.anchors;f.forEach(function(b){if(b.x===l.x&&b.x===a.x||b.y===l.y&&b.y===a.y){var w=Kl(b.x,b.y,a.x,a.y),O=Kl(l.x,l.y,a.x,a.y);w<O&&(o[n-1]=b)}})}}if(r===i.length-2){var h=o[n],m=o[r],g=o[r+1],y=t6(m,g,this.targetNode);if(y){var c=n6(h,m,this.targetNode);if(c){var d=r6(h,m,this.targetNode);d&&(o[r]=d,o.splice(r+1,1))}}else{var f=this.targetNode.anchors;f.forEach(function(w){if(w.x===g.x&&w.x===m.x||w.y===g.y&&w.y===m.y){var O=Kl(w.x,w.y,m.x,m.y),S=Kl(g.x,g.y,m.x,m.y);O<S&&(o[r+1]=w)}})}}return o},e.prototype.getDraggingPoints=function(n,r,i,o,a){var s=a.map(function(c){return c}),l=this.getAfterAnchor(n,i,o),u=this.getCrossPoint(n,i,l);return r==="start"?(s.unshift(u),s.unshift(l)):(s.push(u),s.push(l)),s},e.prototype.updateCrossPoints=function(n){var r=n.map(function(w){return w}),i=n[0],o=n[1],a=n[r.length-2],s=n[r.length-1],l=this,u=l.sourceNode,c=l.targetNode,d=u.modelType,f=c.modelType,h=Uw(i,o),m=r[0];switch(d){case Kn.RECT_NODE:if(u.radius!==0){var g=c6(i,u);g||(m=u6(i,h,u))}break;case Kn.CIRCLE_NODE:m=IP(i,h,u);break;case Kn.ELLIPSE_NODE:m=d6(i,h,u);break;case Kn.DIAMOND_NODE:m=xO(i,h,u);break;case Kn.POLYGON_NODE:m=xO(i,h,u);break}m&&(r[0]=m);var y=Uw(a,s),b=r[r.length-1];switch(f){case Kn.RECT_NODE:if(c.radius!==0){var g=c6(s,c);g||(b=u6(s,y,c))}break;case Kn.CIRCLE_NODE:b=IP(s,y,c);break;case Kn.ELLIPSE_NODE:b=d6(s,y,c);break;case Kn.DIAMOND_NODE:b=xO(s,y,c);break;case Kn.POLYGON_NODE:b=xO(s,y,c);break}return b&&(r[r.length-1]=b),r},e.prototype.updatePath=function(n){this.pointsList=n,this.points=this.getPath(this.pointsList)},e.prototype.getData=function(){var n=t.prototype.getData.call(this),r=this.pointsList.map(function(i){var o=i.x,a=i.y;return{x:o,y:a}});return Object.assign({},n,{pointsList:r})},e.prototype.getPath=function(n){return n.map(function(r){return"".concat(r.x,",").concat(r.y)}).join(" ")},e.prototype.initPoints=function(){this.pointsList.length>0?this.points=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=e6({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=n,this.points=n.map(function(r){return"".concat(r.x,",").concat(r.y)}).join(" ")},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r,this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r,this.updatePoints()},e.prototype.updatePointsList=function(n,r){this.pointsList.forEach(function(a){a.x+=n,a.y+=r});var i=this.pointsList[0];this.startPoint=Object.assign({},i);var o=this.pointsList[this.pointsList.length-1];this.endPoint=Object.assign({},o),this.initPoints()},e.prototype.dragAppendStart=function(){this.draggingPointList=this.pointsList.map(function(n){return n})},e.prototype.dragAppendSimple=function(n,r){var i;this.isDragging=!0;var o=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList,d=c;return u===di.HORIZONTAL?(c[s]={x:o.x,y:o.y+r.y},c[l]={x:a.x,y:a.y+r.y},d=this.pointsList.map(function(f){return f})):u===di.VERTICAL&&(c[s]={x:o.x+r.x,y:o.y},c[l]={x:a.x+r.x,y:a.y},d=this.pointsList.map(function(f){return f})),this.updatePointsAfterDrag(d),this.draggingPointList=d,!((i=this.text)===null||i===void 0)&&i.value&&this.setText($r({},this.text,this.textPosition)),{start:$r({},c[s]),end:$r({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppend=function(n,r){var i;this.isDragging=!0;var o=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList;if(u===di.HORIZONTAL){c[s]={x:o.x,y:o.y+r.y},c[l]={x:a.x,y:a.y+r.y};var d=this.pointsList.map(function(y){return y});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:o.x,y:o.y+r.y},h=Wd(f,this.sourceNode);if(!h){var m=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,m,d)}}if(l===this.pointsList.length-1){var g={x:a.x,y:a.y+r.y},h=Wd(g,this.targetNode);if(!h){var m=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",g,m,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}else if(u===di.VERTICAL){c[s]={x:o.x+r.x,y:o.y},c[l]={x:a.x+r.x,y:a.y};var d=this.pointsList.map(function(b){return b});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:o.x+r.x,y:o.y},h=Wd(f,this.sourceNode);if(!h){var m=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,m,d)}}if(l===this.pointsList.length-1){var g={x:a.x+r.x,y:a.y},h=Wd(g,this.targetNode);if(!h){var m=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",g,m,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}return!((i=this.text)===null||i===void 0)&&i.value&&this.setText($r({},this.text,this.textPosition)),{start:$r({},c[s]),end:$r({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppendEnd=function(){if(this.draggingPointList){var n=zY(sp(this.points));this.pointsList=n.map(function(o){return o}),this.draggingPointList=[];var r=n[0];this.startPoint=$r({},r);var i=n[n.length-1];this.endPoint=$r({},i)}this.isDragging=!1},e.prototype.updatePointsAfterDrag=function(n){var r=this.updateCrossPoints(n);this.points=r.map(function(i){return"".concat(i.x,",").concat(i.y)}).join(" ")},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,i=n.endPoint,o=n.sourceNode,a=n.targetNode;this.pointsList=e6({x:r.x,y:r.y},{x:i.x,y:i.y},o,a,this.offset||0),this.initPoints()},Zo([at],e.prototype,"dbClickPosition",void 0),Zo([it],e.prototype,"initPoints",null),Zo([it],e.prototype,"updatePoints",null),Zo([it],e.prototype,"updateStartPoint",null),Zo([it],e.prototype,"moveStartPoint",null),Zo([it],e.prototype,"updateEndPoint",null),Zo([it],e.prototype,"moveEndPoint",null),Zo([it],e.prototype,"updatePointsList",null),Zo([it],e.prototype,"dragAppendStart",null),Zo([it],e.prototype,"dragAppendSimple",null),Zo([it],e.prototype,"dragAppend",null),Zo([it],e.prototype,"dragAppendEnd",null),Zo([it],e.prototype,"updatePointsAfterDrag",null),Zo([it],e.prototype,"getAdjustStart",null),Zo([it],e.prototype,"getAdjustEnd",null),Zo([it],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(vC),ro=globalThis&&globalThis.__assign||function(){return ro=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ro.apply(this,arguments)},An=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},b6=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uQe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jf=function(){function t(e,n){var r;this.BaseType=Si.NODE,this.id="",this.type="",this.x=0,this.y=0,this.textMode=hl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this._width=100,this._height=80,this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.anchorsOffset=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isShowAnchor=!1,this.isDragging=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.rotatable=!0,this.resizable=!0,this.zIndex=1,this.state=Cr.DEFAULT,this.autoToFront=!0,this.style={},this._rotate=0,this.modelType=Kn.NODE,this.additionStateData={},this.targetRules=[],this.sourceRules=[],this.moveRules=[],this.resizeRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initNodeData(e),this.setAttributes()}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e;var n=this,r=n.x,i=r===void 0?0:r,o=n.y,a=o===void 0?0:o;this.transform=new mC(-i,-a).rotate(e).translate(i,a).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"incoming",{get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outgoing",{get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}},enumerable:!1,configurable:!0}),t.prototype.initNodeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),i=this.createId();e.id=i||r||nf()}this.formatText(e),$r(this,v9e(e));var o=this.graphModel.overlapMode;o===Yl.INCREASE&&(this.zIndex=e.zIndex||WN())},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.setTextMode=function(e){this.textMode=e},t.prototype.formatText=function(e){var n,r,i,o=this.graphModel.editConfigModel,a=o.nodeTextDraggable,s=o.nodeTextEdit,l=e.x,u=e.y,c=e.text,d={value:"",x:l,y:u,draggable:a,editable:s};c&&(typeof c=="string"?d.value=c:(d=ro(ro({},d),{x:(n=c.x)!==null&&n!==void 0?n:l,y:(r=c.y)!==null&&r!==void 0?r:u,value:(i=c.value)!==null&&i!==void 0?i:""}),Wc(c.draggable)||(d.draggable=c.draggable),Wc(c.editable)||(d.editable=c.editable))),e.text=d},t.prototype.resize=function(e){var n=e.width,r=e.height,i=e.deltaX,o=e.deltaY,a=this.isAllowResizeNode(i,o,n,r);return a?(this.move(i/2,o/2),this.width=n,this.height=r,this.setProperties({width:n,height:r}),this.getData()):this.getData()},t.prototype.proportionalResize=function(){},t.prototype.getData=function(){var e=this.text,n=e.x,r=e.y,i=e.value,o=this.properties;gm(o)&&(o=Hl(o)),Dr(o.width)&&(o.width=this.width),Dr(o.height)&&(o.height=this.height);var a={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.rotate&&(a.rotate=this.rotate),this.graphModel.overlapMode===Yl.INCREASE&&(a.zIndex=this.zIndex),i&&(a.text={x:n,y:r,value:i}),a},t.prototype.getHistoryData=function(){return this.getData()},t.prototype.getProperties=function(){return Hl(this.properties)},t.prototype.getOuterGAttributes=function(){return{className:""}},t.prototype.getNodeStyle=function(){return ro(ro({},this.graphModel.theme.baseNode),this.style)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.nodeText,n=this.properties.textStyle,r=n===void 0?{}:n;return ro(ro({},Fn(e)),Fn(r))},t.prototype.getRotateControlStyle=function(){var e=this.graphModel.theme.rotateControl;return Fn(e)},t.prototype.getResizeControlStyle=function(){var e=this.graphModel.theme.resizeControl;return Fn(e)},t.prototype.getResizeOutlineStyle=function(){var e=this.graphModel.theme.resizeOutline;return Fn(e)},t.prototype.getAnchorStyle=function(e){var n=this.graphModel.theme.anchor;return Fn(n)},t.prototype.getAnchorLineStyle=function(e){var n=this.graphModel.theme.anchorLine;return Fn(n)},t.prototype.getOutlineStyle=function(){var e=this.graphModel.theme.outline;return Fn(e)},t.prototype.isAllowConnectedAsSource=function(e,n,r,i){var o=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var a=!0,s="",l=0;l<o.length;l++){var u=o[l];if(!u.validate.call(this,this,e,n,r,i)){a=!1,s=u.message;break}}return{isAllPass:a,msg:s}},t.prototype.getConnectedSourceRules=function(){return this.sourceRules},t.prototype.isAllowConnectedAsTarget=function(e,n,r,i){var o=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var a=!0,s="",l=0;l<o.length;l++){var u=o[l];if(!u.validate.call(this,e,this,n,r,i)){a=!1,s=u.message;break}}return{isAllPass:a,msg:s}},t.prototype.isAllowMoveNode=function(e,n){var r,i,o=!0,a=!0,s=this.moveRules.concat(this.graphModel.nodeMoveRules);try{for(var l=b6(s),u=l.next();!u.done;u=l.next()){var c=u.value,d=c(this,e,n);if(!d)return!1;if(typeof d=="object"){var f=d;if(!f.x&&!f.y)return!1;o=o&&f.x,a=a&&f.y}}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return{x:o,y:a}},t.prototype.getConnectedTargetRules=function(){return this.targetRules},t.prototype.getAnchorsByOffset=function(){var e=this,n=e.anchorsOffset,r=e.id,i=e.x,o=e.y;return n&&n.length>0?n.map(function(a,s){return a.length?(a=a,{id:"".concat(r,"_").concat(s),x:i+a[0],y:o+a[1]}):(a=a,ro(ro({},a),{x:i+a.x,y:o+a.y,id:a.id||"".concat(r,"_").concat(s)}))}):this.getDefaultAnchor()},t.prototype.getDefaultAnchor=function(){return[]},t.prototype.getTargetAnchor=function(e){return p9e(e,this)},t.prototype.getBounds=function(){return{minX:this.x-this.width/2,minY:this.y-this.height/2,maxX:this.x+this.width/2,maxY:this.y+this.height/2}},Object.defineProperty(t.prototype,"anchors",{get:function(){var e=this.getAnchorsByOffset(),n=this,r=n.x,i=n.y,o=n.rotate;return e.forEach(function(a){var s=a.x,l=a.y,u=uQe(new gC([s,l,1]).translate(-r,-i).rotate(o).translate(r,i)[0],2),c=u[0],d=u[1];a.x=c,a.y=d}),e},enumerable:!1,configurable:!0}),t.prototype.getAnchorInfo=function(e){if(!Dr(e))for(var n=0;n<this.anchors.length;n++){var r=this.anchors[n];if(r.id===e)return r}},t.prototype.addNodeMoveRules=function(e){this.moveRules.includes(e)||this.moveRules.push(e)},t.prototype.isAllowMoveByXORY=function(e,n,r){var i,o;if(r)i=!0,o=!0;else{var a=this.isAllowMoveNode(e,n);typeof a=="boolean"?(i=a,o=a):(i=a.x,o=a.y)}return{isAllowMoveX:i,isAllowMoveY:o}},t.prototype.move=function(e,n,r){r===void 0&&(r=!1);var i=this.isAllowMoveByXORY(e,n,r),o=i.isAllowMoveX,a=i.isAllowMoveY;return o&&(this.x=this.x+e,this.text&&this.moveText(e,0)),a&&(this.y=this.y+n,this.text&&this.moveText(0,n)),(o||a)&&(this.rotate=this._rotate),o||a},t.prototype.getMoveDistance=function(e,n,r){r===void 0&&(r=!1);var i=this.isAllowMoveByXORY(e,n,r),o=i.isAllowMoveX,a=i.isAllowMoveY,s=0,l=0;return o&&e&&(this.x=this.x+e,this.text&&this.moveText(e,0),s=e),a&&n&&(this.y=this.y+n,this.text&&this.moveText(0,n),l=n),[s,l]},t.prototype.moveTo=function(e,n,r){r===void 0&&(r=!1);var i=e-this.x,o=n-this.y;return!r&&!this.isAllowMoveNode(i,o)?!1:(this.text&&this.moveText(i,o),this.x=e,this.y=n,!0)},t.prototype.moveText=function(e,n){var r=this.text,i=r.x,o=r.y,a=r.value,s=r.draggable,l=r.editable;this.text={value:a,editable:l,draggable:s,x:i+e,y:o+n}},t.prototype.updateText=function(e){this.text=ro(ro({},Hl(this.text)),{value:e})},t.prototype.addNodeResizeRules=function(e){this.resizeRules.includes(e)||this.resizeRules.push(e)},t.prototype.isAllowResizeNode=function(e,n,r,i){var o,a,s=this.resizeRules.concat(this.graphModel.nodeResizeRules);try{for(var l=b6(s),u=l.next();!u.done;u=l.next()){var c=u.value,d=c(this,e,n,r,i);if(!d)return!1}}catch(f){o={error:f}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return!0},t.prototype.setSelected=function(e){e===void 0&&(e=!0),this.isSelected=e},t.prototype.setHovered=function(e){e===void 0&&(e=!0),this.isHovered=e,this.setIsShowAnchor(e)},t.prototype.setIsShowAnchor=function(e){e===void 0&&(e=!0),this.isShowAnchor=e},t.prototype.setRotatable=function(e){e===void 0&&(e=!0),this.rotatable=e},t.prototype.setResizable=function(e){e===void 0&&(e=!0),this.resizable=e},t.prototype.setHitable=function(e){e===void 0&&(e=!0),this.isHitable=e},t.prototype.setHittable=function(e){e===void 0&&(e=!0),this.isHittable=e},t.prototype.setElementState=function(e,n){this.state=e,this.additionStateData=n},t.prototype.updateProperties=function(e,n){var r=Hl(this.properties);this.properties=e,this.setAttributes(),this.graphModel.eventCenter.emit(pn.NODE_PROPERTIES_CHANGE,{id:this.id,keys:n,preProperties:r,properties:e})},t.prototype.setProperty=function(e,n){var r=Hl(this.properties),i=Fn(r);ZR(i,e,na(n)),this.updateProperties(i,[e])},t.prototype.setProperties=function(e){var n=Hl(this.properties),r=ro(ro({},n),na(e)),i=[];eQ(e,function(o,a){(qg(n,a)&&n[a]!==o||!qg(n,a))&&i.push(a)}),this.updateProperties(r,i)},t.prototype.deleteProperty=function(e){delete this.properties[e],this.setAttributes()},t.prototype.setStyle=function(e,n){var r;this.style=ro(ro({},this.style),(r={},r[e]=na(n),r))},t.prototype.setStyles=function(e){this.style=ro(ro({},this.style),na(e))},t.prototype.updateStyles=function(e){this.style=ro({},na(e))},t.prototype.setZIndex=function(e){e===void 0&&(e=1),this.zIndex=e},t.prototype.updateAttributes=function(e){$r(this,e)},t.BaseType=Si.NODE,An([at],t.prototype,"type",void 0),An([at],t.prototype,"x",void 0),An([at],t.prototype,"y",void 0),An([at],t.prototype,"textMode",void 0),An([at],t.prototype,"text",void 0),An([at],t.prototype,"properties",void 0),An([at],t.prototype,"_width",void 0),An([at],t.prototype,"_height",void 0),An([at],t.prototype,"anchorsOffset",void 0),An([at],t.prototype,"isSelected",void 0),An([at],t.prototype,"isHovered",void 0),An([at],t.prototype,"isShowAnchor",void 0),An([at],t.prototype,"isDragging",void 0),An([at],t.prototype,"isHitable",void 0),An([at],t.prototype,"isHittable",void 0),An([at],t.prototype,"draggable",void 0),An([at],t.prototype,"visible",void 0),An([at],t.prototype,"rotatable",void 0),An([at],t.prototype,"resizable",void 0),An([at],t.prototype,"zIndex",void 0),An([at],t.prototype,"state",void 0),An([at],t.prototype,"autoToFront",void 0),An([at],t.prototype,"style",void 0),An([at],t.prototype,"transform",void 0),An([at],t.prototype,"_rotate",void 0),An([Gr],t.prototype,"incoming",null),An([Gr],t.prototype,"outgoing",null),An([it],t.prototype,"setTextMode",null),An([it],t.prototype,"addNodeMoveRules",null),An([it],t.prototype,"move",null),An([it],t.prototype,"getMoveDistance",null),An([it],t.prototype,"moveTo",null),An([it],t.prototype,"moveText",null),An([it],t.prototype,"updateText",null),An([it],t.prototype,"addNodeResizeRules",null),An([it],t.prototype,"setSelected",null),An([it],t.prototype,"setHovered",null),An([it],t.prototype,"setIsShowAnchor",null),An([it],t.prototype,"setRotatable",null),An([it],t.prototype,"setResizable",null),An([it],t.prototype,"setHitable",null),An([it],t.prototype,"setHittable",null),An([it],t.prototype,"setElementState",null),An([it],t.prototype,"setProperty",null),An([it],t.prototype,"setProperties",null),An([it],t.prototype,"deleteProperty",null),An([it],t.prototype,"setStyle",null),An([it],t.prototype,"setStyles",null),An([it],t.prototype,"updateStyles",null),An([it],t.prototype,"setZIndex",null),An([it],t.prototype,"updateAttributes",null),t}(),cQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ry=globalThis&&globalThis.__assign||function(){return Ry=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ry.apply(this,arguments)},YT=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Gw=function(t){cQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.CIRCLE_NODE,i.r=50,i.initNodeData(n),i.setAttributes(),i}return Object.defineProperty(e.prototype,"width",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties.r;n&&(this.r=n)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.circle,i=this.properties.style,o=i===void 0?{}:i;return Ry(Ry(Ry({},n),Fn(r)),Fn(o))},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.r;return[{x:r,y:i-o,id:"".concat(this.id,"_0")},{x:r+o,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+o,id:"".concat(this.id,"_2")},{x:r-o,y:i,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,i=n.deltaX,o=n.deltaY;return this.move(i/2,o/2),this.r=r,this.setProperties({r}),this.getData()},YT([at],e.prototype,"r",void 0),YT([Gr],e.prototype,"width",null),YT([Gr],e.prototype,"height",null),e}(jf),dQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$y=globalThis&&globalThis.__assign||function(){return $y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},$y.apply(this,arguments)},Gp=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},EO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qP=function(t){dQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.DIAMOND_NODE,i.rx=30,i.ry=50,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,i=n.ry;r&&(this.rx=r),i&&(this.ry=i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.diamond,i=this.properties.style,o=i===void 0?{}:i;return $y($y($y({},n),Fn(r)),Fn(o))},Object.defineProperty(e.prototype,"points",{get:function(){var n=this,r=n.x,i=n.y,o=n.rx,a=n.ry;return[[r,i-a],[r+o,i],[r,i+a],[r-o,i]]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pointsPosition",{get:function(){return Ca(this.points,function(n){var r=EO(n,2),i=r[0],o=r[1];return{x:i,y:o}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return jn(this.points,function(i){var o=EO(i,1),a=o[0];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return jn(this.points,function(i){var o=EO(i,2),a=o[1];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this;return Ca(this.points,function(r,i){var o=EO(r,2),a=o[0],s=o[1];return{x:a,y:s,id:"".concat(n.id,"_").concat(i)}})},e.prototype.resize=function(n){var r=n.width,i=n.height,o=n.deltaX,a=n.deltaY;return this.move(o/2,a/2),this.rx=r,this.ry=i,this.setProperties({rx:r,ry:i}),this.getData()},Gp([at],e.prototype,"rx",void 0),Gp([at],e.prototype,"ry",void 0),Gp([Gr],e.prototype,"points",null),Gp([Gr],e.prototype,"pointsPosition",null),Gp([Gr],e.prototype,"width",null),Gp([Gr],e.prototype,"height",null),e}(jf),fQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ny=globalThis&&globalThis.__assign||function(){return Ny=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ny.apply(this,arguments)},TO=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},YP=function(t){fQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.ELLIPSE_NODE,i.rx=30,i.ry=45,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,i=n.ry;r&&(this.rx=r),i&&(this.ry=i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.ellipse,i=this.properties.style,o=i===void 0?{}:i;return Ny(Ny(Ny({},n),Fn(r)),Fn(o))},Object.defineProperty(e.prototype,"width",{get:function(){return this.rx*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.ry*2},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.rx,a=n.ry;return[{x:r,y:i-a,id:"".concat(this.id,"_0")},{x:r+o,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a,id:"".concat(this.id,"_2")},{x:r-o,y:i,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,i=n.height,o=n.deltaX,a=n.deltaY;return this.move(o/2,a/2),this.rx=r,this.ry=i,this.setProperties({rx:r,ry:i}),this.getData()},TO([at],e.prototype,"rx",void 0),TO([at],e.prototype,"ry",void 0),TO([Gr],e.prototype,"width",null),TO([Gr],e.prototype,"height",null),e}(jf),hQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dy=globalThis&&globalThis.__assign||function(){return Dy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Dy.apply(this,arguments)},kO=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},PO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Kw=function(t){hQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.POLYGON_NODE,i.points=[[50,0],[100,50],[50,100],[0,50]],i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.points,i=n.width,o=n.height,a=r||this.points;this.points=c9e(a,i,o)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.polygon,i=this.properties.style,o=i===void 0?{}:i;return Dy(Dy(Dy({},n),Fn(r)),Fn(o))},Object.defineProperty(e.prototype,"pointsPosition",{get:function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return this.points.map(function(s){return{x:s[0]+r-o/2,y:s[1]+i-a/2}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(i){var o=PO(i,1),a=o[0];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(i){var o=PO(i,2),a=o[1];a<n&&(n=a),a>r&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=this,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points;return l.map(function(u,c){var d=PO(u,2),f=d[0],h=d[1];return{x:i+f-a/2,y:o+h-s/2,id:"".concat(n.id,"_").concat(c)}})},e.prototype.resize=function(n){var r=this,i=n.width,o=n.height,a=n.deltaX,s=n.deltaY;this.move(a/2,s/2);var l=Ca(this.points,function(u){var c=PO(u,2),d=c[0],f=c[1];return[d*i/r.width,f*o/r.height]});return this.points=l,this.properties.points=l,this.getData()},kO([at],e.prototype,"points",void 0),kO([Gr],e.prototype,"pointsPosition",null),kO([Gr],e.prototype,"width",null),kO([Gr],e.prototype,"height",null),e}(jf),pQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ly=globalThis&&globalThis.__assign||function(){return Ly=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ly.apply(this,arguments)},gQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},lp=function(t){pQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.RECT_NODE,i.radius=0,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.width,i=n.height,o=n.radius;Dr(r)||(this.width=r),Dr(i)||(this.height=i),Dr(o)||(this.radius=o)},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return[{x:r,y:i-a/2,id:"".concat(this.id,"_0")},{x:r+o/2,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a/2,id:"".concat(this.id,"_2")},{x:r-o/2,y:i,id:"".concat(this.id,"_3")}]},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.rect,i=this.properties.style,o=i===void 0?{}:i;return Ly(Ly(Ly({},n),Fn(r)),Fn(o))},gQe([at],e.prototype,"radius",void 0),e}(jf),mQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iy=globalThis&&globalThis.__assign||function(){return Iy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Iy.apply(this,arguments)},_6=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vQe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yQe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},O6=function(t){mQe(e,t);function e(){var n=t.apply(this,yQe([],vQe(arguments),!1))||this;return n.modelType=Kn.TEXT_NODE,n}return e.prototype.getTextStyle=function(){var n=t.prototype.getTextStyle.call(this),r=this.graphModel.theme.text,i=this.properties.textStyle;return Iy(Iy(Iy({},n),Fn(r)),Fn(i))},Object.defineProperty(e.prototype,"width",{get:function(){var n=String(this.text.value).split(/[\r\n]/g),r=this.getTextStyle().fontSize,i=h6({rows:n,fontSize:r,rowsLength:n.length}).width;return i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=String(this.text.value).split(/[\r\n]/g),r=this.getTextStyle().fontSize,i=h6({rows:n,fontSize:r,rowsLength:n.length}).height;return i},enumerable:!1,configurable:!0}),_6([Gr],e.prototype,"width",null),_6([Gr],e.prototype,"height",null),e}(jf),bQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),XP=function(t){bQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.HTML_NODE,i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.width,i=n.height;r&&(this.width=r),i&&(this.height=i)},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return[{x:r,y:i-a/2,id:"".concat(this.id,"_0")},{x:r+o/2,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a/2,id:"".concat(this.id,"_2")},{x:r-o/2,y:i,id:"".concat(this.id,"_3")}]},e}(jf),Pr=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},_Qe={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotate:!1,allowResize:!1,nodeSelectedOutline:!0,textEdit:!1,nodeTextEdit:!1,edgeTextEdit:!1,textDraggable:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},AO=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","snapGrid","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustEdgeStart","adjustEdgeEnd","adjustNodePosition","hideAnchors","allowRotate","allowResize","autoExpand","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","textEdit","nodeTextEdit","edgeTextEdit","textDraggable","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","textMode","nodeTextMode","edgeTextMode","nodeTextMultiple","edgeTextMultiple","nodeTextVertical","edgeTextVertical"],OQe=function(){function t(e){this.isSilentMode=!1,this.stopZoomGraph=!1,this.stopMoveGraph=!1,this.stopScrollGraph=!1,this.snapGrid=!1,this.textMode=hl.TEXT,this.textEdit=!0,this.textDraggable=!1,this.nodeTextEdit=!0,this.nodeTextDraggable=!1,this.nodeTextMultiple=!1,this.nodeTextVertical=!1,this.nodeTextMode=hl.TEXT,this.edgeTextMode=hl.TEXT,this.edgeTextEdit=!0,this.edgeTextDraggable=!1,this.edgeTextMultiple=!1,this.edgeTextVertical=!1,this.hideAnchors=!1,this.allowRotate=!1,this.allowResize=!1,this.hoverOutline=!0,this.nodeSelectedOutline=!0,this.adjustNodePosition=!0,this.autoExpand=!1,this.adjustEdge=!0,this.adjustEdgeMiddle=!1,this.adjustEdgeStartAndEnd=!1,this.adjustEdgeStart=!1,this.adjustEdgeEnd=!1,this.edgeSelectedOutline=!0,this.multipleSelectKey="",$r(this,this.computeConfig(e))}return t.prototype.updateEditConfig=function(e){var n=this.computeConfig(e);$r(this,n)},t.prototype.computeConfig=function(e){var n=e.isSilentMode,r=e.textDraggable,i=e.textMode,o=e.textEdit,a=e.adjustEdgeStartAndEnd,s={};if(n===!1&&$r(s,this.stagedConfig),n===!0&&n!==this.isSilentMode){var l=vo(_Qe,AO);this.stagedConfig=vo(this,AO),$r(s,l)}Wc(o)||$r(s,{nodeTextEdit:o,edgeTextEdit:o}),Wc(r)||$r(s,{nodeTextDraggable:r,edgeTextDraggable:r}),i&&$r(s,{nodeTextMode:i,edgeTextMode:i}),fw(a)&&$r(s,{adjustEdgeStart:a,adjustEdgeEnd:a});var u=vo(e,AO);return $r(s,u)},t.prototype.updateTextMode=function(e){this.textMode=e,this.edgeTextMode=e,this.nodeTextMode=e},t.prototype.getConfig=function(){return vo(this,AO)},Pr([at],t.prototype,"isSilentMode",void 0),Pr([at],t.prototype,"stopZoomGraph",void 0),Pr([at],t.prototype,"stopMoveGraph",void 0),Pr([at],t.prototype,"stopScrollGraph",void 0),Pr([at],t.prototype,"snapGrid",void 0),Pr([at],t.prototype,"textMode",void 0),Pr([at],t.prototype,"textEdit",void 0),Pr([at],t.prototype,"textDraggable",void 0),Pr([at],t.prototype,"nodeTextEdit",void 0),Pr([at],t.prototype,"nodeTextDraggable",void 0),Pr([at],t.prototype,"nodeTextMultiple",void 0),Pr([at],t.prototype,"nodeTextVertical",void 0),Pr([at],t.prototype,"nodeTextMode",void 0),Pr([at],t.prototype,"edgeTextMode",void 0),Pr([at],t.prototype,"edgeTextEdit",void 0),Pr([at],t.prototype,"edgeTextDraggable",void 0),Pr([at],t.prototype,"edgeTextMultiple",void 0),Pr([at],t.prototype,"edgeTextVertical",void 0),Pr([at],t.prototype,"hideAnchors",void 0),Pr([at],t.prototype,"allowRotate",void 0),Pr([at],t.prototype,"allowResize",void 0),Pr([at],t.prototype,"hoverOutline",void 0),Pr([at],t.prototype,"nodeSelectedOutline",void 0),Pr([at],t.prototype,"adjustNodePosition",void 0),Pr([at],t.prototype,"autoExpand",void 0),Pr([at],t.prototype,"adjustEdge",void 0),Pr([at],t.prototype,"adjustEdgeMiddle",void 0),Pr([at],t.prototype,"adjustEdgeStartAndEnd",void 0),Pr([at],t.prototype,"adjustEdgeStart",void 0),Pr([at],t.prototype,"adjustEdgeEnd",void 0),Pr([at],t.prototype,"edgeSelectedOutline",void 0),Pr([it],t.prototype,"updateEditConfig",null),Pr([it],t.prototype,"updateTextMode",null),t}(),wQe="*",SQe=function(){function t(){this._events={}}return t.prototype.on=function(e,n,r){var i=this;e==null||e.split(",").forEach(function(o){o=o.trim(),i._events[o]||(i._events[o]=[]),i._events[o].push({callback:n,once:!!r})})},t.prototype.once=function(e,n){var r=this;e==null||e.split(",").forEach(function(i){i=i.trim(),r.on(i,n,!0)})},t.prototype.emit=function(e,n){var r=this;e==null||e.split(",").forEach(function(i){var o=r._events[i]||[],a=r._events[wQe]||[],s=function(l){for(var u=l.length,c=0;c<u;c++)if(!!l[c]){var d=l[c],f=d.callback,h=d.once;h&&(l.splice(c,1),l.length===0&&delete r._events[i],u--,c--),f.apply(r,[n])}};s(o),s(a)})},t.prototype.off=function(e,n){var r=this;e||(this._events={}),e.split(",").forEach(function(i){if(!n)delete r._events[i];else{for(var o=r._events[i]||[],a=o.length,s=0;s<a;s++)o[s].callback===n&&(o.splice(s,1),a--,s--);o.length===0&&delete r._events[i]}})},t.prototype.getEvents=function(){return this._events},t.prototype.destroy=function(){this._events={}},t}(),xQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZP=globalThis&&globalThis.__assign||function(){return ZP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ZP.apply(this,arguments)},CQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},EQe=function(t){xQe(e,t);function e(n){var r=t.call(this)||this;r.stepScrollX=0,r.stepScrollY=0,r.onDragging=function(s){var l=s.deltaX,u=s.deltaY;r.setState({isDragging:!0});var c=r.props.graphModel,d=c.transformModel,f=c.editConfigModel;f.stopMoveGraph!==!0&&d.translate(l,u)},r.onDragEnd=function(){r.setState({isDragging:!1})},r.zoomHandler=function(s){var l=r.props,u=l.graphModel,c=u.editConfigModel,d=u.transformModel,f=u.gridSize,h=l.graphModel,m=s.deltaX,g=s.deltaY,y=c.stopScrollGraph,b=c.stopZoomGraph;if(!y&&!s.ctrlKey&&!s.metaKey){if(s.preventDefault(),r.stepScrollX+=m,r.stepScrollY+=g,Math.abs(r.stepScrollX)>=f){var w=r.stepScrollX%f,O=r.stepScrollX-w;d.translate(-O*d.SCALE_X,0),r.stepScrollX=w}if(Math.abs(r.stepScrollY)>=f){var S=r.stepScrollY%f,x=r.stepScrollY-S;d.translate(0,-x*d.SCALE_Y),r.stepScrollY=S}return}if(!b){s.preventDefault();var C=h.getPointByClient({x:s.clientX,y:s.clientY}),E=C.canvasOverlayPosition,T=E.x,P=E.y;d.zoom(s.deltaY<0,[T,P])}},r.clickHandler=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){var u=r.props.graphModel,c=u.selectElements;c.size>0&&u.clearSelectElements(),u.eventCenter.emit(pn.BLANK_CLICK,{e:s})}},r.handleContextMenu=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){s.preventDefault();var u=r.props.graphModel,c=u.getPointByClient({x:s.clientX,y:s.clientY});u.eventCenter.emit(pn.BLANK_CONTEXTMENU,{e:s,position:c})}},r.mouseDownHandler=function(s){var l=r.props.graphModel,u=l.eventCenter,c=l.editConfigModel,d=l.transformModel.SCALE_X,f=l.gridSize,h=c.adjustEdge,m=c.adjustNodePosition,g=c.stopMoveGraph,y=s.target,b=!h&&!m;(y.getAttribute("name")==="canvas-overlay"||b)&&(g!==!0?(r.stepDrag.setStep(f*d),r.stepDrag.handleMouseDown(s)):u.emit(pn.BLANK_MOUSEDOWN,{e:s}),r.clickHandler(s))};var i=n.graphModel,o=i.gridSize,a=i.eventCenter;return r.stepDrag=new kl({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:o,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:void 0}),r.state={isDragging:!1},r}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,i=this.props,o=i.children,a=i.dnd,s=this.state.isDragging;return rt("svg",ZP({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:s?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},a.eventMap(),{children:rt("g",{transform:r,children:o})}))},e=CQe([Ea],e),e}(ur),JY=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),F0=globalThis&&globalThis.__assign||function(){return F0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},F0.apply(this,arguments)},TQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},kQe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},w6=function(t){JY(e,t);function e(){var n=t.call(this)||this;return n.onDragging=function(r){var i=r.event,o=n.props,a=o.graphModel,s=o.bezierModel,l=o.type,u=a.getPointByClient({x:i.clientX,y:i.clientY}).canvasOverlayPosition,c=u.x,d=u.y;s.updateAdjustAnchor({x:c,y:d},l),a.eventCenter.emit(pn.EDGE_ADJUST,{data:s.getData()})},n.onDragEnd=function(){var r=n.props.bezierModel;r.isDragging=!1},n.dragHandler=new kl({onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.render=function(){var n=this,r=this.props.position,i=r.x,o=r.y,a=this.props.bezierModel,s=a.getEdgeStyle().adjustAnchor;return rt(bm,F0({className:"lf-bezier-adjust-anchor",x:i,y:o},s,{onMouseDown:function(l){n.dragHandler.handleMouseDown(l)}}))},e}(ur),PQe=function(t){JY(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getBezierAdjust=function(n,r){var i=n.path,o=n.id,a=zN(i),s=kQe(a,4),l=s[0],u=s[1],c=s[2],d=s[3],f=n.getEdgeStyle().adjustLine,h=[];return h.push(rt(ym,F0({x1:l.x,y1:l.y,x2:u.x,y2:u.y},f))),h.push(rt(w6,{position:u,bezierModel:n,graphModel:r,type:"sNext"},"".concat(o,"_ePre"))),h.push(rt(ym,F0({x1:d.x,y1:d.y,x2:c.x,y2:c.y},f))),h.push(rt(w6,{position:c,bezierModel:n,graphModel:r,type:"ePre"},"".concat(o,"_sNext"))),h},e.prototype.selectedBezierEdge=function(){for(var n=this.props.graphModel,r=n.edges,i=[],o=0;o<r.length;o++){var a=r[o];a.isSelected&&a.modelType===Kn.BEZIER_EDGE&&a.draggable&&i.push(this.getBezierAdjust(a,n))}return i},e.prototype.render=function(){return rt("g",{className:"lf-bezier-adjust",children:this.selectedBezierEdge()})},e=TQe([Ea],e),e}(ur),AQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),MQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},RQe=function(t){AQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.background;return rt("div",{className:"lf-background",children:rt("div",{style:_i(n)?n:{},className:"lf-background-area"})})},e=MQe([Ea],e),e}(ur),$Qe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),NQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Jw=function(t){$Qe(e,t);function e(n){var r=t.call(this,n)||this;return r.id=nf(),r.gridOptions=r.props.graphModel.grid,r}return e.prototype.renderDot=function(){var n=this.gridOptions,r=n.config,i=n.size,o=i===void 0?1:i,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?2:u,d=Math.min(Math.max(2,c),o/4),f=a?1:0;return rt("g",{fill:l,opacity:f,children:[rt("circle",{cx:0,cy:0,r:d/2}),rt("circle",{cx:0,cy:o,r:d/2}),rt("circle",{cx:o,cy:0,r:d/2}),rt("circle",{cx:o,cy:o,r:d/2})]})},e.prototype.renderMesh=function(){var n=this.gridOptions,r=n.config,i=n.size,o=i===void 0?1:i,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?1:u,d=Math.min(Math.max(1,c),o/2),f="M 0 0 H ".concat(o," V ").concat(o," H 0 Z"),h=a?1:0;return rt("path",{d:f,stroke:l,strokeWidth:d/2,opacity:h,fill:"transparent"})},e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=this.gridOptions,i=r.type,o=r.size,a=o===void 0?1:o,s=n.SCALE_X,l=n.SKEW_Y,u=n.SKEW_X,c=n.SCALE_Y,d=n.TRANSLATE_X,f=n.TRANSLATE_Y,h=[s,l,u,c,d,f].join(","),m="matrix(".concat(h,")");return rt("div",{className:"lf-grid",children:rt("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",children:[rt("defs",{children:rt("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:m,x:"0",y:"0",width:a,height:a,children:[i==="dot"&&this.renderDot(),i==="mesh"&&this.renderMesh()]})}),rt("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})]})})},e=NQe([Ea],e),e}(ur);(function(t){t.defaultProps={size:j7e,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};function e(n){var r=Fn(t.defaultProps);return typeof n=="number"?$r(r,{size:n}):typeof n=="boolean"?$r(r,{visible:n}):$r(r,n)}t.getGridOptions=e})(Jw||(Jw={}));var DQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),LQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},IQe=function(t){DQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,i=this.props.children;return rt("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay",children:rt("g",{transform:r,children:i})})},e=LQe([Ea],e),e}(ur),BQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ad=globalThis&&globalThis.__assign||function(){return Ad=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ad.apply(this,arguments)},FQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},VQe=function(t){BQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getNodesOutline=function(){var n=this.props.graphModel,r=n.nodes,i=n.editConfigModel,o=i.hoverOutline,a=i.nodeSelectedOutline,s=[];return r.forEach(function(l){if(l.isHovered||l.isSelected){var u=l.isHovered,c=l.isSelected,d=l.x,f=l.y,h=l.width,m=l.height;if(a&&c||o&&u){var g=l.getOutlineStyle(),y={};if(Object.keys(g).forEach(function(w){w!=="hover"&&(y[w]=g[w])}),u){var b=g.hover;y=Ad(Ad({},y),b)}s.push(rt(al,Ad({transform:l.transform,className:"lf-outline-node",x:d,y:f,width:h+10,height:m+10},y)))}}}),s},e.prototype.getEdgeOutline=function(){for(var n=this.props.graphModel,r=n.edges,i=n.editConfigModel,o=i.edgeSelectedOutline,a=i.hoverOutline,s=[],l=0;l<r.length;l++){var u=r[l];(o&&u.isSelected||a&&u.isHovered)&&(u.modelType===Kn.LINE_EDGE?s.push(this.getLineOutline(u)):u.modelType===Kn.POLYLINE_EDGE?s.push(this.getPolylineOutline(u)):u.modelType===Kn.BEZIER_EDGE&&s.push(this.getBezierOutline(u)))}return s},e.prototype.getLineOutline=function(n){var r=n.startPoint,i=n.endPoint,o=(r.x+i.x)/2,a=(r.y+i.y)/2,s=Math.abs(r.x-i.x)+10,l=Math.abs(r.y-i.y)+10,u=n.getOutlineStyle();return rt(al,Ad({className:"lf-outline-edge",x:o,y:a,width:s,height:l},u))},e.prototype.getPolylineOutline=function(n){var r=n.points,i=sp(r),o=N0(i,8),a=o.x,s=o.y,l=o.width,u=o.height,c=n.getOutlineStyle();return rt(al,Ad({className:"lf-outline",x:a,y:s,width:l,height:u},c))},e.prototype.getBezierOutline=function(n){var r=n.path,i=zN(r),o=N0(i,8),a=o.x,s=o.y,l=o.width,u=o.height,c=n.getOutlineStyle();return rt(al,Ad({className:"lf-outline",x:a,y:s,width:l,height:u},c))},e.prototype.render=function(){return rt("g",{className:"lf-outline",children:[this.getNodesOutline(),this.getEdgeOutline()]})},e=FQe([Ea],e),e}(ur),jQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Md=globalThis&&globalThis.__assign||function(){return Md=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Md.apply(this,arguments)},zQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},QQe=function(t){jQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.snaplineModel,r=n!=null?n:{},i=r.position,o=r.isShowHorizontal,a=r.isShowVertical,s=n==null?void 0:n.getStyle(),l=i!=null?i:{},u=l.x,c=u===void 0?0:u,d=l.y,f=d===void 0?0:d,h=Md(Md({x1:-1e5,y1:f,x2:1e5,y2:f},s),{stroke:o?s==null?void 0:s.stroke:"none"}),m=Md(Md({x1:c,y1:-1e5,x2:c,y2:1e5},s),{stroke:a?s==null?void 0:s.stroke:"none"});return rt("g",{className:"lf-snapline",children:[rt(ym,Md({},h)),rt(ym,Md({},m))]})},e=zQe([Ea],e),e}(ur),HQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),WQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},UQe=function(t){HQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){this.triggerToolRender()},e.prototype.componentDidUpdate=function(){this.triggerToolRender()},e.prototype.getTools=function(){var n=this.props,r=n.tool,i=n.graphModel,o=i.textEditElement,a=r.getTools(),s=a.map(function(l){return Gt(l,{textEditElement:o,graphModel:i,lf:r.instance})});return r.components=s,s},e.prototype.triggerToolRender=function(){var n=this.props,r=n.tool,i=n.graphModel,o=document.querySelector("#ToolOverlay_".concat(i.flowId)),a=r.getInstance();a.components.forEach(function(s){return s(a,o)}),a.components=[]},e.prototype.render=function(){var n=this.props.graphModel;return rt("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(n.flowId),children:this.getTools()})},e=WQe([Ea],e),e}(ur),Rd=globalThis&&globalThis.__assign||function(){return Rd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Rd.apply(this,arguments)},hn=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qQe=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mo=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xs=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},YQe=function(){function t(e){var n=this,r,i;this.modelMap=new Map,this.nodeModelMap=new Map,this.edgeModelMap=new Map,this.elementsModelMap=new Map,this.nodeMoveRules=[],this.nodeResizeRules=[],this.nodes=[],this.edges=[],this.overlapMode=Yl.DEFAULT,this.gridSize=1,this.partial=!1,this.waitCleanEffects=[];var o=e.container,a=e.partial,s=e.background,l=s===void 0?{}:s,u=e.grid,c=e.idGenerator,d=e.edgeGenerator,f=e.animation,h=e.customTrajectory;this.rootEl=o,this.partial=!!a,this.background=l,typeof u=="object"&&e.snapGrid&&(this.gridSize=u.size||1),this.theme=KY(e.style),this.grid=Jw.getGridOptions(u!=null?u:!1),this.edgeType=e.edgeType||"polyline",this.animation=B7e(f),this.overlapMode=e.overlapMode||Yl.DEFAULT,this.width=(r=e.width)!==null&&r!==void 0?r:this.rootEl.getBoundingClientRect().width,this.isContainerWidth=Dr(e.width),this.height=(i=e.height)!==null&&i!==void 0?i:this.rootEl.getBoundingClientRect().height,this.isContainerHeight=Dr(e.height);var m=new ResizeObserver(jo(function(g){var y,b;try{for(var w=qQe(g),O=w.next();!O.done;O=w.next()){var S=O.value;S.target===n.rootEl&&(n.resize(),n.eventCenter.emit("graph:resize",{target:n.rootEl,contentRect:S.contentRect}))}}catch(x){y={error:x}}finally{try{O&&!O.done&&(b=w.return)&&b.call(w)}finally{if(y)throw y.error}}},16));m.observe(this.rootEl),this.waitCleanEffects.push(function(){m.disconnect()}),this.eventCenter=new SQe,this.editConfigModel=new OQe(e),this.transformModel=new GQe(this.eventCenter,e),this.flowId=nf(),this.idGenerator=c,this.edgeGenerator=l9e(this,d),this.customTrajectory=h}return Object.defineProperty(t.prototype,"nodesMap",{get:function(){return this.nodes.reduce(function(e,n,r){return e[n.id]={index:r,model:n},e},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgesMap",{get:function(){return this.edges.reduce(function(e,n,r){return e[n.id]={index:r,model:n},e},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"modelsMap",{get:function(){return Xs(Xs([],mo(this.nodes),!1),mo(this.edges),!1).reduce(function(e,n){return e[n.id]=n,e},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sortElements",{get:function(){for(var e=Xs(Xs([],mo(this.nodes),!1),mo(this.edges),!1).sort(function(s,l){return s.zIndex-l.zIndex}),n=[],r=[-_O,-_O],i=[this.width+_O,this.height+_O],o=0;o<e.length;o++){var a=e[o];a.visible&&(!this.partial||a.isSelected||this.isElementInArea(a,r,i,!1,!1))&&n.push(a)}return n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditElement",{get:function(){var e=this.nodes.find(function(r){return r.state===Cr.TEXT_EDIT}),n=this.edges.find(function(r){return r.state===Cr.TEXT_EDIT});return e||n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectElements",{get:function(){var e=new Map;return this.nodes.forEach(function(n){n.isSelected&&e.set(n.id,n)}),this.edges.forEach(function(n){n.isSelected&&e.set(n.id,n)}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectNodes",{get:function(){var e=[];return this.nodes.forEach(function(n){n.isSelected&&e.push(n)}),e},enumerable:!1,configurable:!0}),t.prototype.getAreaElement=function(e,n,r,i,o){var a=this;r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!1);var s=[];return jn(Xs(Xs([],mo(this.nodes),!1),mo(this.edges),!1),function(l){var u=a.isElementInArea(l,e,n,r,i);(!o||l.visible)&&u&&s.push(l)}),s},t.prototype.getModel=function(e){return this.modelMap.get(e)},t.prototype.getNodeModelById=function(e){var n;return this.fakeNode&&e===this.fakeNode.id?this.fakeNode:(n=this.nodesMap[e])===null||n===void 0?void 0:n.model},t.prototype.getPointByClient=function(e){var n=e.x,r=e.y,i=this.rootEl.getBoundingClientRect(),o={x:n-i.left,y:r-i.top},a=mo(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2),s=a[0],l=a[1],u={x:s,y:l};return{domOverlayPosition:o,canvasOverlayPosition:u}},t.prototype.isElementInArea=function(e,n,r,i,o){var a;if(i===void 0&&(i=!0),o===void 0&&(o=!0),e.BaseType===Si.NODE){e=e;for(var s=ja(e),l=s.minX,u=s.minY,c=s.maxX,d=s.maxY,f=[{x:l,y:u},{x:c,y:u},{x:c,y:d},{x:l,y:d}],h=o,m=0;m<f.length;m++){var g=f[m],y=g.x,b=g.y;if(a=mo(this.transformModel.CanvasPointToHtmlPoint([y,b]),2),y=a[0],b=a[1],WT([y,b],n,r)!==o){h=!o;break}}return h}if(e.BaseType===Si.EDGE){e=e;var w=e.startPoint,O=e.endPoint,S=this.transformModel.CanvasPointToHtmlPoint([w.x,w.y]),x=this.transformModel.CanvasPointToHtmlPoint([O.x,O.y]),C=WT(S,n,r),E=WT(x,n,r);return i?C&&E:C||E}return!1},t.prototype.graphDataToModel=function(e){var n=this;if(!e){this.clearData();return}if(this.elementsModelMap.clear(),this.nodeModelMap.clear(),this.edgeModelMap.clear(),e.nodes?this.nodes=Ca(e.nodes,function(i){var o=n.getModelAfterSnapToGrid(i);return n.elementsModelMap.set(o.id,o),n.nodeModelMap.set(o.id,o),o}):this.nodes=[],e.edges){var r=this.edgeType;this.edges=Ca(e.edges,function(i){var o,a=n.getModel((o=i.type)!==null&&o!==void 0?o:r);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(i.type,"\u5BF9\u5E94\u7684\u8FB9\u3002"));var s=new a(i,n);return n.edgeModelMap.set(s.id,s),n.elementsModelMap.set(s.id,s),s})}else this.edges=[]},t.prototype.modelToGraphData=function(){var e=[];this.edges.forEach(function(r){var i=r.getData();i&&!r.virtual&&e.push(i)});var n=[];return this.nodes.forEach(function(r){var i=r.getData();i&&!r.virtual&&n.push(i)}),{nodes:n,edges:e}},t.prototype.modelToHistoryData=function(){for(var e=!1,n=[],r=0;r<this.nodes.length;r++){var i=this.nodes[r];if(i.isDragging){e=!0;break}else n.push(i.getHistoryData())}if(e)return!1;for(var o=!1,a=[],s=0;s<this.edges.length;s++){var l=this.edges[s];if(l.isDragging){o=!0;break}else a.push(l.getHistoryData())}return o?!1:{nodes:n,edges:a}},t.prototype.getEdgeModelById=function(e){var n;return(n=this.edgesMap[e])===null||n===void 0?void 0:n.model},t.prototype.getElement=function(e){return this.modelsMap[e]},t.prototype.getNodeEdges=function(e){for(var n=[],r=0;r<this.edges.length;r++){var i=this.edges[r],o=i.sourceNodeId===e,a=i.targetNodeId===e;(o||a)&&n.push(i)}return n},t.prototype.getSelectElements=function(e){e===void 0&&(e=!0);var n=this.selectElements,r={nodes:[],edges:[]};return n.forEach(function(i){if(i.BaseType===Si.NODE&&r.nodes.push(i.getData()),i.BaseType===Si.EDGE){var o=i.getData(),a=n.get(o.sourceNodeId)&&n.get(o.targetNodeId);(e||a)&&r.edges.push(o)}}),r},t.prototype.updateAttributes=function(e,n){var r=this.getElement(e);r==null||r.updateAttributes(n)},t.prototype.changeNodeId=function(e,n){return n||(n=nf()),this.nodesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8282\u70B9".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.nodesMap[e]?(this.edges.forEach(function(r){r.sourceNodeId===e&&(r.sourceNodeId=n),r.targetNodeId===e&&(r.targetNodeId=n)}),this.nodesMap[e].model.id=n,this.nodesMap[n]=this.nodesMap[e],n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8282\u70B9".concat(e,", \u4FEE\u6539\u5931\u8D25")),"")},t.prototype.changeEdgeId=function(e,n){return n||(n=nf()),this.edgesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.edgesMap[e]?(this.edges.forEach(function(r){r.id===e&&r.changeEdgeId(n)}),n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),"")},t.prototype.getTextModel=function(e){var n=this.editConfigModel,r=n.textMode,i=n.nodeTextMode,o=n.edgeTextMode;if(e.BaseType===Si.NODE)return e.textMode||i||r||hl.TEXT;if(e.BaseType===Si.EDGE)return e.textMode||o||r||hl.TEXT},t.prototype.setTextMode=function(e,n){this.editConfigModel.updateEditConfig({textMode:e})},t.prototype.setFakeNode=function(e){this.fakeNode=e},t.prototype.removeFakeNode=function(){this.fakeNode=null},t.prototype.setModel=function(e,n){return this.modelMap.set(e,n)},t.prototype.toFront=function(e){var n,r,i,o=((n=this.nodesMap[e])===null||n===void 0?void 0:n.model)||((r=this.edgesMap[e])===null||r===void 0?void 0:r.model);o&&(this.overlapMode===Yl.DEFAULT&&((i=this.topElement)===null||i===void 0||i.setZIndex(),o.setZIndex(V7e),this.topElement=o),this.overlapMode===Yl.INCREASE&&this.setElementZIndex(e,"top"))},t.prototype.setElementZIndex=function(e,n){var r,i,o=((r=this.nodesMap[e])===null||r===void 0?void 0:r.model)||((i=this.edgesMap[e])===null||i===void 0?void 0:i.model);if(o){var a=void 0;typeof n=="number"?a=n:(n==="top"&&(a=WN()),n==="bottom"&&(a=rQe())),o.setZIndex(a)}},t.prototype.deleteNode=function(e){var n=this.nodesMap[e].model,r=n.getData();this.deleteEdgeBySource(e),this.deleteEdgeByTarget(e),this.nodes.splice(this.nodesMap[e].index,1),this.eventCenter.emit(pn.NODE_DELETE,{data:r,model:n})},t.prototype.addNode=function(e,n,r){n===void 0&&(n=pn.NODE_ADD);var i=na(e),o=i.id;o&&this.nodesMap[o]&&delete i.id;var a=this.getModelAfterSnapToGrid(i);this.nodes.push(a);var s=a.getData(),l={data:s};return r&&(l.e=r),this.eventCenter.emit(n,l),a},t.prototype.getModelAfterSnapToGrid=function(e){var n=this.getModel(e.type),r=this.editConfigModel.snapGrid;if(!n)throw new Error("\u627E\u4E0D\u5230".concat(e.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var i=e.x,o=e.y;i&&o&&(e.x=vm(i,this.gridSize,r),e.y=vm(o,this.gridSize,r),typeof e.text=="object"&&e.text!==null&&(e.text.x+=e.x-i,e.text.y+=e.y-o));var a=new n(e,this);return this.nodeModelMap.set(a.id,a),this.elementsModelMap.set(a.id,a),a},t.prototype.cloneNode=function(e){var n=this.getNodeModelById(e),r=n==null?void 0:n.getData();if(r){r.x+=30,r.y+=30,r.id="",typeof r.text=="object"&&r.text!==null&&(r.text.x+=30,r.text.y+=30);var i=this.addNode(r);return i.setSelected(!0),n==null||n.setSelected(!1),i.getData()}},t.prototype.moveNode=function(e,n,r,i){var o;i===void 0&&(i=!1);var a=this.nodesMap[e];if(!a){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(e,"\u7684\u8282\u70B9"));return}var s=a.model;o=mo(s.getMoveDistance(n,r,i),2),n=o[0],r=o[1],this.moveEdge(e,n,r)},t.prototype.moveNode2Coordinate=function(e,n,r,i){i===void 0&&(i=!1);var o=this.nodesMap[e];if(!o){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(e,"\u7684\u8282\u70B9"));return}var a=o.model,s=a.x,l=a.y,u=n-s,c=r-l;this.moveNode(e,u,c,i)},t.prototype.editText=function(e){this.setElementStateById(e,Cr.TEXT_EDIT)},t.prototype.addEdge=function(e){var n=na(e),r=n.type;r||(r=this.edgeType),n.id&&this.edgesMap[n.id]&&delete n.id;var i=this.getModel(r);if(!i)throw new Error("\u627E\u4E0D\u5230".concat(r,"\u5BF9\u5E94\u7684\u8FB9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8FB9\u3002"));var o=new i(Rd(Rd({},n),{type:r}),this);this.edgeModelMap.set(o.id,o),this.elementsModelMap.set(o.id,o);var a=o.getData();return this.edges.push(o),this.eventCenter.emit(pn.EDGE_ADD,{data:a}),o},t.prototype.moveEdge=function(e,n,r){for(var i=0;i<this.edges.length;i++){var o=this.edges[i],a=o.textPosition,s=a.x,l=a.y,u=this.edges[i].sourceNodeId===e,c=this.edges[i].targetNodeId===e;u&&o.moveStartPoint(n,r),c&&o.moveEndPoint(n,r),(u||c)&&this.handleEdgeTextMove(o,s,l)}},t.prototype.handleEdgeTextMove=function(e,n,r){var i;if(e.customTextPosition){e.resetTextPosition();return}if(e.modelType===Kn.POLYLINE_EDGE&&((i=e.text)===null||i===void 0?void 0:i.value)){var o=e.text,a=HY(o,e.points);e.moveText(a.x-o.x,a.y-o.y)}var s=e.textPosition,l=s.x,u=s.y;e.moveText(l-n,u-r)},t.prototype.deleteEdgeBySourceAndTarget=function(e,n){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===e&&this.edges[r].targetNodeId===n){var i=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(pn.EDGE_DELETE,{data:i})}},t.prototype.deleteEdgeById=function(e){var n=this.edgesMap[e];if(!!n){var r=this.edgesMap[e].index,i=this.edgesMap[e].model.getData();this.edges.splice(r,1),this.eventCenter.emit(pn.EDGE_DELETE,{data:i})}},t.prototype.deleteEdgeBySource=function(e){for(var n=0;n<this.edges.length;n++)if(this.edges[n].sourceNodeId===e){var r=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(pn.EDGE_DELETE,{data:r})}},t.prototype.deleteEdgeByTarget=function(e){for(var n=0;n<this.edges.length;n++)if(this.edges[n].targetNodeId===e){var r=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(pn.EDGE_DELETE,{data:r})}},t.prototype.setElementStateById=function(e,n,r){this.nodes.forEach(function(i){i.id===e?i.setElementState(n,r):i.setElementState(Cr.DEFAULT)}),this.edges.forEach(function(i){i.id===e?i.setElementState(n,r):i.setElementState(Cr.DEFAULT)})},t.prototype.updateText=function(e,n){var r=hf(Xs(Xs([],mo(this.nodes),!1),mo(this.edges),!1),function(i){return i.id===e});r==null||r.updateText(n)},t.prototype.selectNodeById=function(e,n){var r;n===void 0&&(n=!1),n||this.clearSelectElements();var i=(r=this.nodesMap[e])===null||r===void 0?void 0:r.model;i==null||i.setSelected(!0)},t.prototype.selectEdgeById=function(e,n){var r;n===void 0&&(n=!1),n||this.clearSelectElements();var i=(r=this.edgesMap[e])===null||r===void 0?void 0:r.model;i==null||i.setSelected(!0)},t.prototype.selectElementById=function(e,n){n===void 0&&(n=!1),n||this.clearSelectElements();var r=this.getElement(e);r==null||r.setSelected(!0)},t.prototype.clearSelectElements=function(){var e;this.selectElements.forEach(function(n){n==null||n.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===Yl.DEFAULT&&((e=this.topElement)===null||e===void 0||e.setZIndex())},t.prototype.moveNodes=function(e,n,r,i){var o,a,s,l=this;i===void 0&&(i=!1);for(var u=e.reduce(function(O,S){var x,C=(x=l.nodesMap[S])===null||x===void 0?void 0:x.model;return C&&(O[S]=C.getMoveDistance(n,r,i)),O},{}),c=0;c<this.edges.length;c++){var d=this.edges[c],f=d.textPosition,h=f.x,m=f.y,g=u[d.sourceNodeId],y=u[d.targetNodeId],b=void 0,w=void 0;g&&y&&d.modelType===Kn.POLYLINE_EDGE?(o=mo(g,2),b=o[0],w=o[1],d.updatePointsList(b,w)):(g&&(a=mo(g,2),b=a[0],w=a[1],d.moveStartPoint(b,w)),y&&(s=mo(y,2),b=s[0],w=s[1],d.moveEndPoint(b,w))),(g||y)&&this.handleEdgeTextMove(d,h,m)}},t.prototype.addNodeMoveRules=function(e){this.nodeMoveRules.includes(e)||this.nodeMoveRules.push(e)},t.prototype.addNodeResizeRules=function(e){this.nodeResizeRules.includes(e)||this.nodeResizeRules.push(e)},t.prototype.setDefaultEdgeType=function(e){this.edgeType=e},t.prototype.changeNodeType=function(e,n){var r=this.getNodeModelById(e);if(!r){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(e,"\u7684\u8282\u70B9"));return}var i=r.getData();i.type=n;var o=this.getModel(n);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var a=new o(i,this);this.nodes.splice(this.nodesMap[e].index,1,a);var s=this.getNodeEdges(e);s.forEach(function(l){if(l.sourceNodeId===e){var u=f6(a,l.startPoint,a.width,a.height);l.updateStartPoint(u)}if(l.targetNodeId===e){var u=f6(a,l.endPoint,a.width,a.height);l.updateEndPoint(u)}})},t.prototype.changeEdgeType=function(e,n){var r=this.getEdgeModelById(e);if(!r){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(e,"\u7684\u8FB9"));return}if(r.type!==n){var i=r.getData();i.type=n;var o=this.getModel(n);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));delete i.pointsList;var a=new o(i,this);this.edges.splice(this.edgesMap[e].index,1,a)}},t.prototype.getNodeIncomingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.targetNodeId===e&&n.push(r)}),n},t.prototype.getNodeOutgoingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.sourceNodeId===e&&n.push(r)}),n},t.prototype.getAnchorIncomingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.targetAnchorId===e&&n.push(r)}),n},t.prototype.getAnchorOutgoingEdge=function(e){var n=[];return this.edges.forEach(function(r){r.sourceAnchorId===e&&n.push(r)}),n},t.prototype.getNodeIncomingNode=function(e){var n=this,r=[];return this.edges.forEach(function(i){var o;i.targetNodeId===e&&r.push((o=n.nodesMap[i.sourceNodeId])===null||o===void 0?void 0:o.model)}),r},t.prototype.getNodeOutgoingNode=function(e){var n=this,r=[];return this.edges.forEach(function(i){i.sourceNodeId===e&&r.push(n.nodesMap[i.targetNodeId].model)}),r},t.prototype.setTheme=function(e){this.theme=eQe(Rd(Rd({},this.theme),e))},t.prototype.updateGridOptions=function(e){Jh(this.grid,e)},t.prototype.updateGridSize=function(e){this.gridSize=e},t.prototype.updateBackgroundOptions=function(e){fw(e)||fw(this.background)?this.background=e:this.background=Rd(Rd({},this.background),e)},t.prototype.resize=function(e,n){this.width=e!=null?e:this.rootEl.getBoundingClientRect().width,this.isContainerWidth=Dr(e),this.height=n!=null?n:this.rootEl.getBoundingClientRect().height,this.isContainerHeight=Dr(n),(!this.width||!this.height)&&console.warn("\u6E32\u67D3\u753B\u5E03\u7684\u65F6\u5019\u65E0\u6CD5\u83B7\u53D6\u753B\u5E03\u5BBD\u9AD8\uFF0C\u8BF7\u786E\u8BA4\u5728container\u5DF2\u6302\u8F7D\u5230DOM\u3002@see https://github.com/didi/LogicFlow/issues/675")},t.prototype.clearData=function(){this.nodes=[],this.edges=[],this.edgeModelMap.clear(),this.nodeModelMap.clear(),this.elementsModelMap.clear()},t.prototype.getVirtualRectSize=function(){var e=this.nodes,n=[],r=[];e.forEach(function(f){var h=f.x,m=f.y,g=f.width,y=f.height,b=f.getNodeStyle().strokeWidth,w=b===void 0?0:b,O=h+g/2+w,S=h-g/2-w,x=m+y/2+w,C=m-y/2-w;n=n.concat([O,S].filter(function(E){return!Number.isNaN(E)})),r=r.concat([x,C].filter(function(E){return!Number.isNaN(E)}))});var i=Math.min.apply(Math,Xs([],mo(n),!1)),o=Math.max.apply(Math,Xs([],mo(n),!1)),a=Math.min.apply(Math,Xs([],mo(r),!1)),s=Math.max.apply(Math,Xs([],mo(r),!1)),l=o-i||0,u=s-a||0,c=i+l/2,d=a+u/2;return{width:l,height:u,x:c,y:d}},t.prototype.translateCenter=function(){var e=this,n=e.nodes,r=e.width,i=e.height,o=e.rootEl,a=e.transformModel;if(!!n.length){var s=r||o.clientWidth,l=i||o.clientHeight,u=this.getVirtualRectSize(),c=u.x,d=u.y;a.focusOn(c,d,s,l)}},t.prototype.fitView=function(e,n){e===void 0&&(e=20),n===void 0&&(n=20);var r=this,i=r.nodes,o=r.width,a=r.height,s=r.rootEl,l=r.transformModel;if(!!i.length){var u=o||s.clientWidth,c=a||s.clientHeight,d=this.getVirtualRectSize(),f=d.width,h=d.height,m=d.x,g=d.y,y=(f+n)/u,b=(h+e)/c,w=1/Math.max(y,b),O=[u/2,c/2];l.zoom(w,O),l.focusOn(m,g,u,c)}},t.prototype.openEdgeAnimation=function(e){var n=this.getEdgeModelById(e);n==null||n.openEdgeAnimation()},t.prototype.closeEdgeAnimation=function(e){var n=this.getEdgeModelById(e);n==null||n.closeEdgeAnimation()},t.prototype.getPartial=function(){return this.partial},t.prototype.setPartial=function(e){this.partial=e},t.prototype.destroy=function(){try{this.waitCleanEffects.forEach(function(e){e()})}catch(e){console.warn("error on destroy GraphModel",e)}this.waitCleanEffects.length=0,this.eventCenter.destroy()},hn([at],t.prototype,"width",void 0),hn([at],t.prototype,"height",void 0),hn([at],t.prototype,"grid",void 0),hn([at],t.prototype,"edgeType",void 0),hn([at],t.prototype,"nodes",void 0),hn([at],t.prototype,"edges",void 0),hn([at],t.prototype,"fakeNode",void 0),hn([at],t.prototype,"overlapMode",void 0),hn([at],t.prototype,"background",void 0),hn([at],t.prototype,"gridSize",void 0),hn([at],t.prototype,"transformModel",void 0),hn([at],t.prototype,"editConfigModel",void 0),hn([at],t.prototype,"partial",void 0),hn([Gr],t.prototype,"nodesMap",null),hn([Gr],t.prototype,"edgesMap",null),hn([Gr],t.prototype,"modelsMap",null),hn([Gr],t.prototype,"sortElements",null),hn([Gr],t.prototype,"textEditElement",null),hn([Gr],t.prototype,"selectElements",null),hn([Gr],t.prototype,"selectNodes",null),hn([it],t.prototype,"setTextMode",null),hn([it],t.prototype,"setFakeNode",null),hn([it],t.prototype,"removeFakeNode",null),hn([it],t.prototype,"setModel",null),hn([it],t.prototype,"toFront",null),hn([it],t.prototype,"setElementZIndex",null),hn([it],t.prototype,"deleteNode",null),hn([it],t.prototype,"addNode",null),hn([it],t.prototype,"cloneNode",null),hn([it],t.prototype,"moveNode",null),hn([it],t.prototype,"moveNode2Coordinate",null),hn([it],t.prototype,"editText",null),hn([it],t.prototype,"addEdge",null),hn([it],t.prototype,"moveEdge",null),hn([it],t.prototype,"deleteEdgeBySourceAndTarget",null),hn([it],t.prototype,"deleteEdgeById",null),hn([it],t.prototype,"deleteEdgeBySource",null),hn([it],t.prototype,"deleteEdgeByTarget",null),hn([it],t.prototype,"setElementStateById",null),hn([it],t.prototype,"updateText",null),hn([it],t.prototype,"selectNodeById",null),hn([it],t.prototype,"selectEdgeById",null),hn([it],t.prototype,"selectElementById",null),hn([it],t.prototype,"clearSelectElements",null),hn([it],t.prototype,"moveNodes",null),hn([it],t.prototype,"setDefaultEdgeType",null),hn([it],t.prototype,"changeNodeType",null),hn([it],t.prototype,"changeEdgeType",null),hn([it],t.prototype,"getNodeIncomingEdge",null),hn([it],t.prototype,"getNodeOutgoingEdge",null),hn([it],t.prototype,"getAnchorIncomingEdge",null),hn([it],t.prototype,"getAnchorOutgoingEdge",null),hn([it],t.prototype,"getNodeIncomingNode",null),hn([it],t.prototype,"getNodeOutgoingNode",null),hn([it],t.prototype,"setTheme",null),hn([it],t.prototype,"resize",null),hn([it],t.prototype,"clearData",null),hn([it],t.prototype,"translateCenter",null),hn([it],t.prototype,"fitView",null),hn([it],t.prototype,"openEdgeAnimation",null),hn([it],t.prototype,"closeEdgeAnimation",null),hn([it],t.prototype,"setPartial",null),t}(),wh=globalThis&&globalThis.__assign||function(){return wh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wh.apply(this,arguments)},Fv=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},XQe=function(){function t(e){this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}return t.prototype.getStyle=function(){return wh({},this.graphModel.theme.snapline)},t.prototype.getCenterSnapLine=function(e,n){for(var r=e.x,i=e.y,o=!1,a=!1,s=0;s<n.length;s++){var l=n[s];if(l.id!==e.id&&(r===l.x&&(o=!0),i===l.y&&(a=!0),o&&a))break}return{isShowVertical:o,isShowHorizontal:a,position:{x:r,y:i}}},t.prototype.getHorizontalSnapline=function(e,n){var r=!1,i=0,o=e.id,a;if(o){var s=this.graphModel.fakeNode;if(s&&s.id===o)a=ja(s);else{var l=this.graphModel.getNodeModelById(o);l&&(a=ja(l))}}for(var u=0;u<n.length;u++){var c=n[u];if(c.id!==e.id){var d=ja(c);if(d.minY===(a==null?void 0:a.minY)||d.maxY===(a==null?void 0:a.minY)){r=!0,i=a.minY;break}if(d.minY===(a==null?void 0:a.maxY)||d.maxY===(a==null?void 0:a.maxY)){r=!0,i=a.maxY;break}}}return{isShowHorizontal:r,isShowVertical:this.isShowVertical,position:wh(wh({},this.position),{y:i})}},t.prototype.getVerticalSnapline=function(e,n){var r=!1,i=0,o=e.id,a;if(o){var s=this.graphModel.fakeNode;if(s&&s.id===o)a=ja(s);else{var l=this.graphModel.getNodeModelById(o);l&&(a=ja(l))}}for(var u=0;u<n.length;u++){var c=n[u];if(c.id!==e.id){var d=ja(c);if(d.minX===(a==null?void 0:a.minX)||d.maxX===(a==null?void 0:a.minX)){r=!0,i=a.minX;break}if(d.minX===(a==null?void 0:a.maxX)||d.maxX===(a==null?void 0:a.maxX)){r=!0,i=a.maxX;break}}}return{isShowHorizontal:this.isShowHorizontal,isShowVertical:r,position:wh(wh({},this.position),{x:i})}},t.prototype.getSnapLinePosition=function(e,n){var r=this.getCenterSnapLine(e,n),i=r.isShowHorizontal,o=r.isShowVertical;if(!i){var a=this.getHorizontalSnapline(e,n);a.isShowHorizontal&&(r.isShowHorizontal=a.isShowHorizontal,r.position.y=a.position.y)}if(!o){var s=this.getVerticalSnapline(e,n);s.isShowVertical&&(r.isShowVertical=s.isShowVertical,r.position.x=s.position.x)}return r},t.prototype.setSnaplineInfo=function(e){var n=e.isShowHorizontal,r=e.isShowVertical,i=e.position;this.position=i,this.isShowHorizontal=n,this.isShowVertical=r},t.prototype.clearSnapline=function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1},t.prototype.setNodeSnapLine=function(e){var n=this.graphModel.nodes,r=this.getSnapLinePosition(e,n);this.setSnaplineInfo(r)},Fv([at],t.prototype,"isShowHorizontal",void 0),Fv([at],t.prototype,"isShowVertical",void 0),Fv([at],t.prototype,"position",void 0),Fv([it],t.prototype,"clearSnapline",null),Fv([it],t.prototype,"setNodeSnapLine",null),t}(),Fl=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Kp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ZQe={false:[-1/0,-1/0,1/0,1/0],true:[-1/0,-1/0,1/0,1/0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},GQe=function(){function t(e,n){this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,this.SCALE_X=1,this.SKEW_Y=0,this.SKEW_X=0,this.SCALE_Y=1,this.TRANSLATE_X=0,this.TRANSLATE_Y=0,this.ZOOM_SIZE=.04,this.translateLimitMinX=-1/0,this.translateLimitMinY=-1/0,this.translateLimitMaxX=1/0,this.translateLimitMaxY=1/0,this.eventCenter=e;var r=n.stopMoveGraph,i=r===void 0?!1:r;this.updateTranslateLimits(i)}return t.prototype.setZoomMiniSize=function(e){this.MINI_SCALE_SIZE=e},t.prototype.setZoomMaxSize=function(e){this.MAX_SCALE_SIZE=e},t.prototype.HtmlPointToCanvasPoint=function(e){var n=Kp(e,2),r=n[0],i=n[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(i-this.TRANSLATE_Y)/this.SCALE_Y]},t.prototype.CanvasPointToHtmlPoint=function(e){var n=Kp(e,2),r=n[0],i=n[1];return[r*this.SCALE_X+this.TRANSLATE_X,i*this.SCALE_Y+this.TRANSLATE_Y]},t.prototype.moveCanvasPointByHtml=function(e,n,r){var i=Kp(e,2),o=i[0],a=i[1];return[o+n/this.SCALE_X,a+r/this.SCALE_Y]},t.prototype.fixDeltaXY=function(e,n){return[e/this.SCALE_X,n/this.SCALE_Y]},t.prototype.getTransformStyle=function(){var e=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(e,")")}},t.prototype.zoom=function(e,n){e===void 0&&(e=!1);var r=this.SCALE_X,i=this.SCALE_Y;return typeof e=="number"?(r=e,i=e):e?(r+=this.ZOOM_SIZE,i+=this.ZOOM_SIZE):(r-=this.ZOOM_SIZE,i-=this.ZOOM_SIZE),r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE?"".concat(this.SCALE_X*100,"%"):(n&&(this.TRANSLATE_X-=(r-this.SCALE_X)*n[0],this.TRANSLATE_Y-=(i-this.SCALE_Y)*n[1]),this.SCALE_X=r,this.SCALE_Y=i,this.emitGraphTransform("zoom"),"".concat(this.SCALE_X*100,"%"))},t.prototype.emitGraphTransform=function(e){this.eventCenter.emit(pn.GRAPH_TRANSFORM,{type:e,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})},t.prototype.resetZoom=function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")},t.prototype.translate=function(e,n){this.TRANSLATE_X+e<=this.translateLimitMaxX&&this.TRANSLATE_X+e>=this.translateLimitMinX&&(this.TRANSLATE_X+=e),this.TRANSLATE_Y+n<=this.translateLimitMaxY&&this.TRANSLATE_Y+n>=this.translateLimitMinY&&(this.TRANSLATE_Y+=n),this.emitGraphTransform("translate")},t.prototype.focusOn=function(e,n,r,i){var o=Kp(this.CanvasPointToHtmlPoint([e,n]),2),a=o[0],s=o[1],l=Kp([r/2-a,i/2-s],2),u=l[0],c=l[1];this.TRANSLATE_X+=u,this.TRANSLATE_Y+=c,this.emitGraphTransform("focusOn")},t.prototype.updateTranslateLimits=function(e){var n;n=Kp(Array.isArray(e)&&e.length===4?e:ZQe[e.toString()],4),this.translateLimitMinX=n[0],this.translateLimitMinY=n[1],this.translateLimitMaxX=n[2],this.translateLimitMaxY=n[3]},Fl([at],t.prototype,"SCALE_X",void 0),Fl([at],t.prototype,"SKEW_Y",void 0),Fl([at],t.prototype,"SKEW_X",void 0),Fl([at],t.prototype,"SCALE_Y",void 0),Fl([at],t.prototype,"TRANSLATE_X",void 0),Fl([at],t.prototype,"TRANSLATE_Y",void 0),Fl([at],t.prototype,"ZOOM_SIZE",void 0),Fl([it],t.prototype,"zoom",null),Fl([it],t.prototype,"resetZoom",null),Fl([it],t.prototype,"translate",null),Fl([it],t.prototype,"focusOn",null),t}(),KQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},eHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nHe=function(t){KQe(e,t);function e(){var n=t.apply(this,tHe([],eHe(arguments),!1))||this;return n.handleResize=function(){var r=n.props,i=r.graphModel,o=r.options,a=i.width,s=i.height,l=i.isContainerWidth,u=i.isContainerHeight,c=a,d=s,f=!1;l&&(c=void 0,f=!0),u&&(d=void 0,f=!0),f&&i.resize(c,d),o.width=a,o.height=s},n.throttleResize=Vc(n.handleResize,200),n}return e.prototype.componentDidMount=function(){window.addEventListener("resize",this.throttleResize)},e.prototype.componentDidUpdate=function(){var n=this.props.graphModel.modelToGraphData();this.props.graphModel.eventCenter.emit(pn.GRAPH_UPDATED,{data:n})},e.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.throttleResize)},e.prototype.getComponent=function(n,r,i){i===void 0&&(i="canvas-overlay");var o=this.props.getView,a=o(n.type);return a?rt(a,{model:n,graphModel:r,overlay:i},n.id):null},e.prototype.render=function(){var n=this,r=this.props,i=r.graphModel,o=r.tool,a=r.options,s=r.dnd,l=r.snaplineModel,u={};a.width&&(u.width="".concat(i.width,"px")),a.height&&(u.height="".concat(i.height,"px"));var c=i.fakeNode,d=i.editConfigModel,f=i.background,h=d.adjustEdge;return rt("div",{className:"lf-graph","flow-id":i.flowId,style:u,children:[rt(EQe,{graphModel:i,dnd:s,children:[rt("g",{className:"lf-base",children:Ca(i.sortElements,function(m){return n.getComponent(m,i)})}),c?this.getComponent(c,i):""]}),rt(IQe,{graphModel:i,children:[rt(VQe,{graphModel:i}),h?rt(PQe,{graphModel:i}):"",a.snapline!==!1?rt(QQe,{snaplineModel:l}):""]}),rt(UQe,{graphModel:i,tool:o}),f&&rt(RQe,{background:f}),rt(Jw,{graphModel:i})]})},e=JQe([Ea],e),e}(ur),rHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Au=globalThis&&globalThis.__assign||function(){return Au=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Au.apply(this,arguments)},iHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},oHe=function(t){rHe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(r){var i=r.event,o=n.props,a=o.anchorData,s=o.nodeModel,l=o.graphModel;l.selectNodeById(s.id),s.autoToFront&&l.toFront(s.id),l.eventCenter.emit(pn.ANCHOR_DRAGSTART,{data:a,e:i,nodeModel:s}),n.setState({startX:a.x,startY:a.y,endX:a.x,endY:a.y})},n.onDragging=function(r){var i=r.event,o=n.props,a=o.graphModel,s=o.nodeModel,l=o.anchorData,u=a.transformModel,c=a.eventCenter,d=a.width,f=a.height,h=a.editConfigModel,m=h.autoExpand,g=h.stopMoveGraph;if(!!i){var y=i.clientX,b=i.clientY,w=a.getPointByClient({x:y,y:b}),O=w.domOverlayPosition,S=O.x,x=O.y,C=w.canvasOverlayPosition,E=C.x,T=C.y;n.t&&Zw(n.t);var P=[],A=10;S<10?P=[A,0]:S+10>d?P=[-A,0]:x<10?P=[0,A]:x+10>f&&(P=[0,-A]),n.setState({endX:E,endY:T,dragging:!0}),n.moveAnchorEnd(E,T),P.length>0&&!g&&m&&(n.t=YY(function(){var D=iHe(P,2),N=D[0],$=D[1];u.translate(N,$);var W=n.state,L=W.endX,I=W.endY;n.setState({endX:L-N,endY:I-$}),n.moveAnchorEnd(L-N,I-$)})),c.emit(pn.ANCHOR_DRAG,{data:l,e:i,nodeModel:s})}},n.onDragEnd=function(r){var i=r.event;n.t&&Zw(n.t);var o=n.checkEnd(i);n.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear();var a=n.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData;s.eventCenter.emit(pn.ANCHOR_DRAGEND,{data:u,e:i,nodeModel:l,edgeModel:o!=null?o:void 0})},n.checkEnd=function(r){var i,o=n.props,a=o.graphModel,s=o.nodeModel,l=o.anchorData,u=l.x,c=l.y,d=l.id,f=n.state,h=f.endX,m=f.endY,g=f.dragging,y=Yw({x:h,y:m},a);if(n.preTargetNode&&n.preTargetNode.state!==Cr.DEFAULT&&n.preTargetNode.setElementState(Cr.DEFAULT),!!g&&y&&y.node){var b=y.node,w=y.anchor.id,O="".concat(s.id,"_").concat(b.id,"_").concat(w,"_").concat(d),S=n.sourceRuleResults.get(O)||{},x=S.isAllPass,C=S.msg,E=n.targetRuleResults.get(O)||{},T=E.isAllPass,P=E.msg;if(x&&T){b.setElementState(Cr.DEFAULT);var A=a.getNodeModelById(y.node.id),D=(i=a.edgeGenerator)===null||i===void 0?void 0:i.call(a,s.getData(),A==null?void 0:A.getData()),N=a.addEdge(Au(Au({},D),{sourceNodeId:s.id,sourceAnchorId:d,startPoint:{x:u,y:c},targetNodeId:y.node.id,targetAnchorId:y.anchor.id,endPoint:{x:y.anchor.x,y:y.anchor.y}})),$=n.props.anchorData;return a.eventCenter.emit(pn.ANCHOR_DROP,{data:$,e:r,nodeModel:s,edgeModel:N}),N}var W=b.getData();return a.eventCenter.emit(pn.CONNECTION_NOT_ALLOWED,{data:W,msg:P||C||"\u4E0D\u5141\u8BB8\u6DFB\u52A0\u8FDE\u7EBF"}),null}},n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},n.dragHandler=new kl({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.getAnchorShape=function(){var n=this.props,r=n.anchorData,i=n.style,o=n.node,a=o.getAnchorShape(r);if(a)return a;var s=r.x,l=r.y,u=Au(Au({},i),i==null?void 0:i.hover);return rt("g",{children:[rt(bm,Au({className:"lf-node-anchor-hover"},u,{x:s,y:l})),rt(bm,Au({className:"lf-node-anchor"},i,{x:s,y:l}))]})},Object.defineProperty(e.prototype,"customTrajectory",{get:function(){var n=this.props.graphModel.customTrajectory;return n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"relateEdges",{get:function(){var n=this.props,r=n.graphModel,i=r.getAnchorIncomingEdge,o=r.getAnchorOutgoingEdge,a=n.anchorData.id;return{incomingEdgeList:i(a),outgoingEdgeList:o(a)}},enumerable:!1,configurable:!0}),e.prototype.moveAnchorEnd=function(n,r){var i,o,a=this.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData,c=Yw({x:n,y:r},s);if(c){var d=c.node,f=c.anchor.id;if(this.preTargetNode&&this.preTargetNode!==c.node&&this.preTargetNode.setElementState(Cr.DEFAULT),u.id===f)return;this.preTargetNode=d;var h="".concat(l.id,"_").concat(d.id,"_").concat(f,"_").concat(u.id);if(!this.targetRuleResults.has(h)){var m=c.anchor,g=l.isAllowConnectedAsSource(d,u,m),y=d.isAllowConnectedAsTarget(l,u,m);this.sourceRuleResults.set(h,Xw(g)),this.targetRuleResults.set(h,Xw(y))}var b=((i=this.sourceRuleResults.get(h))!==null&&i!==void 0?i:{}).isAllPass,w=((o=this.targetRuleResults.get(h))!==null&&o!==void 0?o:{}).isAllPass;b&&w?d.setElementState(Cr.ALLOW_CONNECT):d.setElementState(Cr.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Cr.DEFAULT&&this.preTargetNode.setElementState(Cr.DEFAULT)},e.prototype.isShowLine=function(){var n=this.state,r=n.startX,i=n.startY,o=n.endX,a=n.endY,s=Kl(r,i,o,a);return s>10},e.prototype.render=function(){var n=this,r=this.state,i=r.startX,o=r.startY,a=r.endX,s=r.endY,l=this.props,u=l.anchorData.edgeAddable,c=l.edgeStyle;return rt("g",{className:"lf-anchor",children:[rt("g",{onMouseDown:function(d){u!==!1&&n.dragHandler.handleMouseDown(d)},children:this.getAnchorShape()}),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(Au({sourcePoint:{x:i,y:o},targetPoint:{x:a,y:s}},c)):rt(ym,Au({x1:i,y1:o,x2:a,y2:s},c,{"pointer-events":"none"})))]})},e}(ur),aHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),GP=globalThis&&globalThis.__assign||function(){return GP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},GP.apply(this,arguments)},sHe=function(t){aHe(e,t);function e(n){var r=t.call(this,n)||this;return r.style={},r.onDragging=function(i){var o,a=i.event,s=r.props,l=s.graphModel,u=s.nodeModel,c=s.eventCenter,d=l.selectNodes,f=u.x,h=u.y,m=a.clientX,g=a.clientY,y=l.getPointByClient({x:m,y:g}).canvasOverlayPosition,b=y.x,w=y.y,O=new Vo(b-f,w-h),S=((o=r.normal)===null||o===void 0?void 0:o.angle(O))-r.defaultAngle,x=new mC(-f,-h).rotate(S).translate(f,h).toString();u.transform=x,u.rotate=S;var C=Ca(d,function(T){return T.id});C.indexOf(u.id)===-1&&(C=[u.id]);var E=OQ(C,function(T,P){var A=l.getNodeModelById(P);return T[P]=A==null?void 0:A.getMoveDistance(0,0,!1),T},{});C.forEach(function(T){var P=l.getNodeEdges(T);P.forEach(function(A){if(E[A.sourceNodeId]){var D=l.getNodeModelById(A.sourceNodeId),N=D.anchors.find(function($){return $.id===A.sourceAnchorId});A.updateStartPoint(N)}if(E[A.targetNodeId]){var D=l.getNodeModelById(A.targetNodeId),N=D.anchors.find(function(L){return L.id===A.targetAnchorId});A.updateEndPoint(N)}})}),c.emit(pn.NODE_ROTATE,{e:a,model:u,data:u.getData()})},r.style=n.style,r.stepperDrag=new kl({onDragging:r.onDragging}),r}return e.prototype.render=function(){var n=this,r=this.props.nodeModel,i=r.x,o=r.y,a=r.width,s=r.height,l=i+a/2+20,u=o-s/2-20;return this.normal=new Vo(1,0),this.defaultAngle=this.normal.angle(new Vo(l-i,u-o)),r.defaultAngle=this.defaultAngle,rt("g",{className:"lf-rotate-control",children:rt("g",{onMouseDown:function(c){n.stepperDrag.handleMouseDown(c)},children:rt(bm,GP({},this.style,{cx:l,cy:u}))})})},e}(ur),eX={exports:{}};/*!
  101. Copyright (c) 2018 Jed Watson.
  102. Licensed under the MIT License (MIT), see
  103. http://jedwatson.github.io/classnames
  104. */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)e.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(eX);var KP=eX.exports,lHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JP=globalThis&&globalThis.__assign||function(){return JP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},JP.apply(this,arguments)},uHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tX=function(t){lHe(e,t);function e(n){var r=t.call(this)||this;r.mouseDownHandler=function(o){var a=r.props,s=a.draggable,l=a.model,u=a.graphModel,c=u.editConfigModel.nodeTextDraggable;(s!=null?s:c)&&(o.stopPropagation(),r.stepperDrag.model=l,r.stepperDrag.handleMouseDown(o))},r.onDragging=function(o){var a=o.deltaX,s=o.deltaY,l=r.props,u=l.model,c=l.graphModel.transformModel;if(a||s){var d=uHe(c.fixDeltaXY(a,s),2),f=d[0],h=d[1];u.moveText(f,h)}},r.dbClickHandler=function(){var o=r.props,a=o.editable,s=o.graphModel.eventCenter,l=o.model;a&&l.setElementState(Cr.TEXT_EDIT),s.emit(pn.TEXT_DBCLICK,{data:l.text,model:l})};var i=n.draggable;return r.stepperDrag=new kl({onDragging:r.onDragging,step:1,eventType:"TEXT",isStopPropagation:i}),r}return e.prototype.getShape=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=r.text,s=a.value,l=a.x,u=a.y,c=a.editable,d=a.draggable,f={x:l,y:u,className:"",value:s},h=r.getTextStyle(),m=o.nodeTextDraggable||d;return rt(XY,JP({},f,h,{className:KP({"lf-element-text":c,"lf-text-draggable":!c&&m,"lf-text-disabled":!c&&!m}),model:r}))},e.prototype.render=function(){var n=this.props.model.text;if(n)return rt("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},e}(ur),cHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jl=globalThis&&globalThis.__assign||function(){return jl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jl.apply(this,arguments)},MO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},dHe=function(t){cHe(e,t);function e(n){var r=t.call(this,n)||this;return r.setHoverOn=function(){r.setState({isHovered:!0})},r.setHoverOff=function(){r.setState({isHovered:!1})},r.state={isHovered:!1},r}return e.prototype.getBackground=function(){var n=this.state.isHovered,r=this.props.model,i=r.text,o=r.getTextStyle(),a=o.background||{};if(n&&o.hover&&o.hover.background&&(a=jl(jl({},a),o.hover.background)),(i==null?void 0:i.value)&&(a==null?void 0:a.fill)!=="transparent"){var s=o.fontSize,l=o.textWidth,u=o.lineHeight,c=o.overflowMode,d=a.wrapPadding,f=i==null?void 0:i.value.split(/[\r\n]/g),h=f.length,m=i.x,g=i.y,y={};if(c==="autoWrap"&&l){var b=qY({rows:f,style:{fontSize:"".concat(s,"px"),width:"".concat(l,"px"),lineHeight:u,padding:d},rowsLength:h,className:"lf-get-text-height"});y=jl(jl({},a),{x:m,y:g,width:l,height:b})}else{var w=u9e({rows:f,rowsLength:h,fontSize:s}),O=w.width,S=w.height;if(c==="ellipsis"&&(O=l,S=s+2),typeof a.wrapPadding=="string"){var x=a.wrapPadding.split(",").filter(function(V){return V.trim()}).map(function(V){return parseFloat(V.trim())});if(x.length>0&&x.length<=4){if(x.length===1){var C=MO(x,1),E=C[0];x=[E,E,E,E]}else if(x.length===2){var T=MO(x,2),P=T[0],A=T[1];x=[P,A,P,A]}else if(x.length===3){var D=MO(x,3),N=D[0],A=D[1],$=D[2];x=[N,A,$,A]}var W=MO(x,4),L=W[0],I=W[1],U=W[2],Q=W[3];O+=I+Q,S+=L+U,m=m+(I-Q)/2,g=g+(U-L)/2}}y=jl(jl({},a),{x:m-1,y:g-1,width:O,height:S})}return rt(al,jl({},y))}return null},e.prototype.getShape=function(){var n=this.props.model,r=n.text,i=r.x,o=r.y,a=r.value;if(!a)return null;var s=n.getTextStyle(),l=jl({x:i,y:o,value:a,model:n,className:"lf-element-text"},s);return rt("g",{className:"lf-line-text",onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,children:[this.getBackground(),rt(XY,jl({},l))]})},e}(tX),fHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eS=globalThis&&globalThis.__assign||function(){return eS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},eS.apply(this,arguments)},hHe=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},RO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zf=function(t){fHe(e,t);function e(n){var r=t.call(this)||this;r.onDragStart=function(l){var u=l.event,c=r.props,d=c.model,f=c.graphModel;if(u){var h=f.getPointByClient({x:u.clientX,y:u.clientY}).canvasOverlayPosition,m=h.x,g=h.y;r.moveOffset={dx:d.x-m,dy:d.y-g}}},r.onDragging=function(l){var u,c,d,f,h=l.event,m=r.props,g=m.model,y=m.graphModel,b=y.editConfigModel,w=b.stopMoveGraph,O=b.autoExpand,S=b.snapGrid,x=y.transformModel,C=y.selectNodes,E=y.width,T=y.height,P=y.gridSize;g.isDragging=!0;var A=h,D=A.clientX,N=A.clientY,$=y.getPointByClient({x:D,y:N}).canvasOverlayPosition,W=$.x,L=$.y,I=RO(x.CanvasPointToHtmlPoint([W,L]),2),U=I[0],Q=I[1];if(W=W+((c=(u=r.moveOffset)===null||u===void 0?void 0:u.dx)!==null&&c!==void 0?c:0),L=L+((f=(d=r.moveOffset)===null||d===void 0?void 0:d.dy)!==null&&f!==void 0?f:0),W=vm(W,P,S),L=vm(L,P,S),!E||!T){y.moveNode2Coordinate(g.id,W,L);return}var V=U<0||Q<0||U>E||Q>T;if(!(O&&!w&&V)){var q=RO(x.CanvasPointToHtmlPoint([W-g.width/2,L-g.height/2]),2),K=q[0],ie=q[1],oe=RO(x.CanvasPointToHtmlPoint([W+g.width/2,L+g.height/2]),2),Se=oe[0],ke=oe[1],Y=Math.max(P,20),re=[];K<0?re=[Y,0]:Se>y.width?re=[-Y,0]:ie<0?re=[0,Y]:ke>y.height&&(re=[0,-Y]),r.t&&Zw(r.t),g.transform=new mC(-W,-L).rotate(g.rotate).translate(W,L).toString();var te=C.map(function(ge){return ge.id});te.indexOf(g.id)===-1&&(te=[g.id]),re.length>0&&!w&&O?r.t=YY(function(){var ge=RO(re,2),Re=ge[0],$e=ge[1];x.translate(Re!=null?Re:0,$e!=null?$e:0);var Z=-(Re!=null?Re:0)/x.SCALE_X,ce=-($e!=null?$e:0)/x.SCALE_X;y.moveNodes(te,Z,ce)}):y.moveNodes(te,W-g.x,L-g.y)}},r.onDragEnd=function(){r.t&&Zw(r.t);var l=r.props.model;l.isDragging=!1},r.onMouseOut=function(l){F7e()&&r.setHoverOff(l)},r.handleMouseUp=function(){var l=r.props.model;r.mouseUpDrag=l.isDragging},r.handleClick=function(l){var u=r.mouseUpDrag===!1;if(!!r.startTime){var c=r.props,d=c.model,f=c.graphModel;if(!!u){var h=d.getData(),m=f.getPointByClient({x:l.clientX,y:l.clientY}),g={data:h,e:l,position:m,isSelected:!1,isMultiple:!1},y=l.button===2,b=l.detail===2;if(!y){var w=f.editConfigModel,O=WY(l,w);g.isMultiple=O,d.isSelected&&!b&&O?(g.isSelected=!1,d.setSelected(!1)):(f.selectNodeById(d.id,O),g.isSelected=!0,w.isSilentMode||r.toFront()),b?(w.nodeTextEdit&&d.text.editable&&w.textMode===hl.TEXT&&(d.setSelected(!1),f.setElementStateById(d.id,Cr.TEXT_EDIT)),f.eventCenter.emit(pn.NODE_DBCLICK,g)):(f.eventCenter.emit(pn.ELEMENT_CLICK,g),f.eventCenter.emit(pn.NODE_CLICK,g))}}}},r.handleContextMenu=function(l){l.preventDefault();var u=r.props,c=u.model,d=u.graphModel,f=d.editConfigModel,h=c.getData(),m=d.getPointByClient({x:l.clientX,y:l.clientY});d.setElementStateById(c.id,Cr.SHOW_MENU,m.domOverlayPosition),c.isSelected||d.selectNodeById(c.id),d.eventCenter.emit(pn.NODE_CONTEXTMENU,{data:h,e:l,position:m}),f.isSilentMode||r.toFront()},r.handleMouseDown=function(l){var u=r.props,c=u.model,d=u.graphModel;r.startTime=new Date().getTime();var f=d.editConfigModel;f.adjustNodePosition&&c.draggable&&r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.handleFocus=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(pn.NODE_FOCUS,{data:u.getData()})},r.handleBlur=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(pn.NODE_BLUR,{data:u.getData()})},r.setHoverOn=function(l){var u=r.props,c=u.model,d=u.graphModel;if(!c.isHovered){var f=c.getData();c.setHovered(!0),d.eventCenter.emit(pn.NODE_MOUSEENTER,{data:f,e:l})}},r.setHoverOff=function(l){var u=r.props,c=u.model,d=u.graphModel,f=c.getData();!c.isHovered||(c.setHovered(!1),d.eventCenter.emit(pn.NODE_MOUSELEAVE,{data:f,e:l}))};var i=n.graphModel,o=i.gridSize,a=i.eventCenter,s=n.model;return r.stepDrag=new kl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:o,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:s}),r.modelDisposer=_Y(function(){return r.props},function(l){l&&l.model&&r.stepDrag.setModel(l.model)}),r}return e.prototype.componentWillUnmount=function(){this.modelDisposer&&this.modelDisposer(),this.render.$mobx&&this.render.$mobx.dispose()},e.prototype.componentDidMount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.getAnchorShape=function(n){return null},e.prototype.getAnchors=function(){var n=this,r=this.props,i=r.model,o=r.graphModel,a=i.isSelected,s=i.isHitable,l=i.isDragging,u=i.isShowAnchor;return s&&(a||u)&&!l?Ca(i.anchors,function(c,d){var f=i.getAnchorLineStyle(c),h=i.getAnchorStyle(c);return rt(oHe,{anchorData:c,node:n,style:h,edgeStyle:f,anchorIndex:d,nodeModel:i,graphModel:o,setHoverOff:n.setHoverOff})}):[]},e.prototype.getRotateControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.isSilentMode,s=o.allowRotate,l=r.isSelected,u=r.isHitable,c=r.rotatable,d=r.isHovered,f=s&&c,h=r.getRotateControlStyle();if(!a&&u&&(l||d)&&f)return rt(sHe,{graphModel:i,nodeModel:r,eventCenter:i.eventCenter,style:h})},e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.isSilentMode,s=o.allowResize,l=r.isSelected,u=r.isHitable,c=r.resizable,d=r.isHovered,f=s&&c,h=r.getResizeControlStyle();return!a&&u&&(l||d)&&f?rt(L9e,{style:h,model:r,graphModel:i}):null},e.prototype.getText=function(){var n,r=this.props,i=r.model,o=r.graphModel,a=o.editConfigModel;if(a.nodeTextMode!==hl.TEXT||i.state===Cr.TEXT_EDIT)return null;if(i.text){var s=!1;return a.nodeTextDraggable&&i.text.draggable&&(s=!0),rt(tX,{editable:a.nodeTextEdit&&((n=i.text.editable)!==null&&n!==void 0?n:!0),model:i,graphModel:o,draggable:s})}return null},e.prototype.getStateClassName=function(){var n=this.props.model,r=n.state,i=n.isDragging,o=n.isSelected,a="lf-node";switch(r){case Cr.ALLOW_CONNECT:a+=" lf-node-allow";break;case Cr.NOT_ALLOW_CONNECT:a+=" lf-node-not-allow";break;default:a+=" lf-node-default";break}return i&&(a+=" lf-dragging"),o&&(a+=" lf-node-selected"),a},e.prototype.toFront=function(){var n=this.props,r=n.model,i=n.graphModel;r.autoToFront&&i.toFront(r.id)},e.prototype.render=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.hideAnchors,s=o.adjustNodePosition,l=o.allowRotate,u=o.allowResize,c=i.gridSize,d=i.transformModel.SCALE_X,f=r.isHitable,h=r.draggable,m=r.transform,g=r.getOuterGAttributes(),y=g.className,b=y===void 0?"":y,w=hHe(g,["className"]),O=rt("g",{className:"lf-node-content",children:[rt("g",{transform:m,children:[this.getShape(),this.getText(),l&&this.getRotateControl(),u&&this.getResizeControl()]}),!a&&this.getAnchors()]}),S;return f?(s&&h&&this.stepDrag.setStep(c*d),S=rt("g",eS({className:"".concat(this.getStateClassName()," ").concat(b),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu,onFocus:this.handleFocus,onBlur:this.handleBlur},w,{children:O}))):S=rt("g",eS({className:"".concat(this.getStateClassName()," ").concat(b)},w,{children:O})),S},e.isObserved=!1,e}(ur),pHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eA=globalThis&&globalThis.__assign||function(){return eA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},eA.apply(this,arguments)},wf=function(t){pHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle();return rt(al,eA({},r,{x:n.x,y:n.y,width:n.width,height:n.height,radius:n.radius}))},e}(zf),gHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tA=globalThis&&globalThis.__assign||function(){return tA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},tA.apply(this,arguments)},tS=function(t){gHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.r,a=n.getNodeStyle();return rt(bm,tA({},a,{x:r,y:i,r:o}))},e}(zf),mHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nS=globalThis&&globalThis.__assign||function(){return nS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},nS.apply(this,arguments)},rS=function(t){mHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points,u=n.getNodeStyle(),c={transform:"matrix(1 0 0 1 ".concat(i-a/2," ").concat(o-s/2,")")};return rt("g",nS({},c,{children:rt(HN,nS({},u,{points:l,x:i,y:o}))}))},e}(zf),vHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nA=globalThis&&globalThis.__assign||function(){return nA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},nA.apply(this,arguments)},rA=function(t){vHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle();return rt("g",{children:rt(HN,nA({},r,{points:n.points,x:n.x,y:n.y}))})},e}(zf),yHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),iA=globalThis&&globalThis.__assign||function(){return iA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},iA.apply(this,arguments)},oA=function(t){yHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle();return rt(P9e,iA({},r,{x:n.x,y:n.y,rx:n.rx,ry:n.ry}))},e}(zf),bHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),By=globalThis&&globalThis.__assign||function(){return By=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},By.apply(this,arguments)},S6=function(t){bHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getBackground=function(){var n=this.props.model,r=n.getTextStyle(),i=n.width,o=n.height,a=n.x,s=n.y,l=By(By({},r.background),{x:a,y:s,width:i,height:o});return rt(al,By({},l))},e.prototype.getResizeControl=function(){return null},e.prototype.getShape=function(){return rt("g",{children:this.getBackground()})},e}(zf),_He=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aA=globalThis&&globalThis.__assign||function(){return aA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},aA.apply(this,arguments)},OHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},sA=function(t){_He(e,t);function e(){var n=t.apply(this,wHe([],OHe(arguments),!1))||this;return n.ref=uC(),n}return Object.defineProperty(e.prototype,"rootEl",{get:function(){return this.ref.current},enumerable:!1,configurable:!0}),e.prototype.setHtml=function(n){n.appendChild(document.createElement("div"))},e.prototype.confirmUpdate=function(n){this.setHtml(n)},e.prototype.shouldUpdate=function(){return this.preProperties&&this.preProperties===this.currentProperties?!1:(this.preProperties=this.currentProperties,!0)},e.prototype.componentDidMount=function(){this.shouldUpdate()&&this.rootEl&&this.setHtml(this.rootEl)},e.prototype.componentDidUpdate=function(){this.shouldUpdate()&&this.rootEl&&this.confirmUpdate(this.rootEl)},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.rootEl.innerHTML=""},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.height,a=n.width,s=n.getNodeStyle();return this.currentProperties=JSON.stringify(n.properties),rt("foreignObject",aA({},s,{x:r-a/2,y:i-o/2,width:a,height:o,ref:this.ref}))},e}(zf),SHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zl=globalThis&&globalThis.__assign||function(){return zl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zl.apply(this,arguments)},xHe=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},CHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($u||($u={}));var x6=function(t){SHe(e,t);function e(n){var r=t.call(this)||this;r.handleMouseDown=function(l){r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.onDragStart=function(){var l=r.props,u=l.x,c=l.y,d=l.edgeModel,f=d.startPoint,h=d.endPoint,m=d.pointsList;r.oldEdge={startPoint:f,endPoint:h,pointsList:m},r.setState({endX:u,endY:c,dragging:!0})},r.onDragging=function(l){var u=l.deltaX,c=l.deltaY,d=r.state,f=d.endX,h=d.endY,m=r.props,g=m.graphModel,y=m.type,b=g.transformModel,w=g.editConfigModel,O=CHe(b.moveCanvasPointByHtml([f,h],u,c),2),S=O[0],x=O[1];r.setState({endX:S,endY:x,dragging:!0});var C=r.props.edgeModel,E=Yw({x:f,y:h},g);if(E&&E.node&&r.isAllowAdjust(E).pass){var T=C.startPoint,P=C.endPoint,A=C.sourceNode,D=C.targetNode,N=y===$u.SOURCE?{startPoint:{x:E.anchor.x,y:E.anchor.y},endPoint:{x:P.x,y:P.y},sourceNode:E.node,targetNode:D}:{startPoint:{x:T.x,y:T.y},endPoint:{x:E.anchor.x,y:E.anchor.y},sourceNode:A,targetNode:E.node};C.updateAfterAdjustStartAndEnd(N)}else y===$u.SOURCE?C.updateStartPoint({x:S,y:x}):C.updateEndPoint({x:S,y:x});C.text.value&&w.adjustEdge&&C.setText(Object.assign({},C.text,C.textPosition))},r.onDragEnd=function(l){var u,c,d,f=l.event;try{r.setState({dragging:!1});var h=r.props,m=h.graphModel,g=h.edgeModel,y=h.type,b=r.state,w=b.endX,O=b.endY,S=b.dragging,x=Yw({x:w,y:O},m);if(!S)return;var C=!1,E=void 0;if(x&&x.node){var T=r.isAllowAdjust(x),P=T.pass,A=T.msg,D=T.newTargetNode;if(P){var N=g.getData(),$=N.text,W=N.sourceAnchorId,L=W===void 0?"":W,I=N.targetAnchorId,U=I===void 0?"":I,Q=xHe(N,["text","sourceAnchorId","targetAnchorId"]);if(E=zl(zl({sourceAnchorId:L,targetAnchorId:U},Q),{text:($==null?void 0:$.value)||""}),y===$u.SOURCE){var V=m.getNodeModelById(x.node.id),q=m.getNodeModelById(g.targetNodeId),K=(u=m.edgeGenerator)===null||u===void 0?void 0:u.call(m,V==null?void 0:V.getData(),q==null?void 0:q.getData(),E);E=zl(zl({},K),{sourceNodeId:x.node.id,sourceAnchorId:x.anchor.id,startPoint:{x:x.anchor.x,y:x.anchor.y},targetNodeId:g.targetNodeId,endPoint:zl({},g.endPoint)}),g.sourceNodeId===x.node.id&&g.sourceAnchorId===x.anchor.id&&(C=!0)}else if(y===$u.TARGET){var V=m.getNodeModelById(g.sourceNodeId),q=m.getNodeModelById(x.node.id),K=(c=m.edgeGenerator)===null||c===void 0?void 0:c.call(m,V==null?void 0:V.getData(),q==null?void 0:q.getData(),E);E=zl(zl({},K),{sourceNodeId:g.sourceNodeId,startPoint:zl({},g.startPoint),targetNodeId:x.node.id,targetAnchorId:x.anchor.id,endPoint:{x:x.anchor.x,y:x.anchor.y}}),g.targetNodeId===x.node.id&&g.targetAnchorId===x.anchor.id&&(C=!0)}}else{C=!0;var ie=D.getData();m.eventCenter.emit(pn.CONNECTION_NOT_ALLOWED,{data:ie,msg:A})}}else C=!0;if(C)r.recoveryEdge();else{var oe=g.getData();m.deleteEdgeById(g.id);var Se=m.addEdge(zl({},E));m.eventCenter.emit(pn.EDGE_EXCHANGE_NODE,{data:{newEdge:Se.getData(),oldEdge:oe}})}(d=r.preTargetNode)===null||d===void 0||d.setElementState(Cr.DEFAULT)}finally{var m=r.props.graphModel;m.eventCenter.emit(pn.ADJUST_POINT_DRAGEND,{e:f,data:r.stepDragData})}},r.recoveryEdge=function(){var l=r.props.edgeModel,u=r.oldEdge,c=u.startPoint,d=u.endPoint,f=u.pointsList;l.updateStartPoint(c),l.updateEndPoint(d),l.modelType!==Kn.LINE_EDGE&&(l.pointsList=f!=null?f:[],l.initPoints())},r.getAdjustPointStyle=function(){var l=r.props.graphModel.theme,u=l.edgeAdjust;return u},r.state={dragging:!1,endX:0,endY:0},r.targetRuleResults=new Map,r.sourceRuleResults=new Map;var i=n.type,o=n.edgeModel,a=n.graphModel,s=a.eventCenter;return r.stepDragData={type:i,edgeData:o.getData()},r.stepDrag=new kl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:s,data:r.stepDragData}),r}return e.prototype.isAllowAdjust=function(n){var r=this.props,i=r.edgeModel,o=i.id,a=i.sourceNode,s=i.targetNode,l=i.sourceAnchorId,u=i.targetAnchorId,c=r.type,d,f,h,m;if(c===$u.SOURCE?(d=n.node,f=s,h=n.anchor,m=s.getAnchorInfo(u)):(d=a,f=n.node,m=n.anchor,h=a.getAnchorInfo(l)),this.preTargetNode&&this.preTargetNode!==n.node&&this.preTargetNode.setElementState(Cr.DEFAULT),this.preTargetNode=n.node,m.id===h.id)return{pass:!1,msg:"",newTargetNode:f};var g="".concat(d.id,"_").concat(f.id,"_").concat(h.id,"_").concat(m.id);if(!this.targetRuleResults.has(g)){var y=d.isAllowConnectedAsSource(f,h,m,o),b=f.isAllowConnectedAsTarget(d,h,m,o);this.sourceRuleResults.set(g,Xw(y)),this.targetRuleResults.set(g,Xw(b))}var w=this.sourceRuleResults.get(g),O=w.isAllPass,S=w.msg,x=this.targetRuleResults.get(g),C=x.isAllPass,E=x.msg,T=O&&C?Cr.ALLOW_CONNECT:Cr.NOT_ALLOW_CONNECT;return c===$u.SOURCE?d.setElementState(T):f.setElementState(T),{pass:O&&C,msg:E||S,newTargetNode:f}},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.getAdjustPointShape,a=n.edgeModel,s=this.state.dragging;return rt("g",{pointerEvents:s?"none":"",onMouseDown:this.handleMouseDown,children:s?"":o(r,i,a)})},e}(ur),EHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lA=globalThis&&globalThis.__assign||function(){return lA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},lA.apply(this,arguments)};(function(t){EHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getArrowAttributes=function(){var n=this.props,r=n.arrowInfo,i=n.style,o=r.start,a=r.end,s={start:o,end:a,offset:i.offset,verticalLength:i.verticalLength,type:"end"},l=$0(s),u=l.leftX,c=l.leftY,d=l.rightX,f=l.rightY;return lA({d:"M".concat(u," ").concat(c," L").concat(a.x," ").concat(a.y," L").concat(d," ").concat(f," z")},i)},e.prototype.getShape=function(){var n=this.getArrowAttributes(),r=n.d,i=n.strokeWidth,o=n.stroke,a=n.fill;return rt(L0,{d:r,fill:a,strokeWidth:i,stroke:o})},e.prototype.render=function(){return rt("g",{className:"lf-arrow",children:this.getShape()})},e})(ur);var THe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fy=globalThis&&globalThis.__assign||function(){return Fy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fy.apply(this,arguments)},kHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yC=function(t){THe(e,t);function e(){var n=t.call(this)||this;return n.textRef=uC(),n.handleHover=function(r,i){var o=n.props,a=o.model,s=o.graphModel.eventCenter;a.setHovered(r);var l=r?pn.EDGE_MOUSEENTER:pn.EDGE_MOUSELEAVE,u=a.getData();s.emit(l,{data:u,e:i})},n.setHoverOn=function(r){var i=n.props.model.isHovered;i||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOn(),n.handleHover(!0,r))},n.setHoverOff=function(r){var i=n.props.model.isHovered;!i||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOff(),n.handleHover(!1,r))},n.handleContextMenu=function(r){r.preventDefault(),n.contextMenuTime=new Date().getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var i=n.props,o=i.model,a=i.graphModel,s=a.editConfigModel,l=a.getPointByClient({x:r.clientX,y:r.clientY});a.setElementStateById(o.id,Cr.SHOW_MENU,l.domOverlayPosition),s.isSilentMode||n.toFront(),o.isSelected||a.selectEdgeById(o.id);var u=o==null?void 0:o.getData();a.eventCenter.emit(pn.EDGE_CONTEXTMENU,{data:u,e:r,position:l})},n.handleMouseDown=function(r){r.stopPropagation(),n.startTime=new Date().getTime()},n.handleMouseUp=function(){var r=n.props.model;n.mouseUpDrag=r.isDragging},n.handleClick=function(r){if(!!n.startTime&&!n.mouseUpDrag){var i=r.button===2;if(!i){var o=r.detail===2,a=n.props,s=a.model,l=a.graphModel,u=s==null?void 0:s.getData(),c=l.getPointByClient({x:r.clientX,y:r.clientY});if(o){var d=l.editConfigModel,f=l.textEditElement,h=s.id,m=s.text,g=s.modelType;if(f&&f.id===h&&l.setElementStateById(h,Cr.DEFAULT),d.edgeTextEdit&&m.editable&&(s.setSelected(!1),l.setElementStateById(h,Cr.TEXT_EDIT)),g===Kn.POLYLINE_EDGE){var y=s,b=l.getPointByClient({x:r.x,y:r.y}).canvasOverlayPosition,w=b.x,O=b.y;y.dbClickPosition=HY({x:w,y:O},y.points)}l.eventCenter.emit(pn.EDGE_DBCLICK,{data:u,e:r,position:c})}else l.eventCenter.emit(pn.ELEMENT_CLICK,{data:u,e:r,position:c}),l.eventCenter.emit(pn.EDGE_CLICK,{data:u,e:r,position:c});var S=l.editConfigModel;l.selectEdgeById(s.id,WY(r,S)),S.isSilentMode||n.toFront()}}},n.handleFocus=function(){var r=n.props,i=r.model,o=r.graphModel;o.eventCenter.emit(pn.EDGE_FOCUS,{data:i.getData()})},n.handleBlur=function(){var r=n.props,i=r.model,o=r.graphModel;o.eventCenter.emit(pn.EDGE_BLUR,{data:i.getData()})},n}return e.prototype.getShape=function(){return rt("g",{children:this.getEdge()})},e.prototype.getTextStyle=function(){},e.prototype.getText=function(){var n,r=this.props,i=r.model,o=r.graphModel,a=o.editConfigModel;if(a.edgeTextMode!==hl.TEXT||i.state===Cr.TEXT_EDIT)return null;if(i.text){var s=!1;return a.edgeTextDraggable&&i.text.draggable&&(s=!0),rt(dHe,{ref:this.textRef,editable:a.edgeTextEdit&&((n=i.text.editable)!==null&&n!==void 0?n:!0),model:i,graphModel:o,draggable:s})}return null},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o=n.isSelected,a=this.state.hover;return{start:r,end:i,hover:a,isSelected:o}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint;return[r,i]},e.prototype.getArrowStyle=function(){return console.error("getArrowStyle is deprecated in 1.2.0, please use model.getArrowStyle"),null},e.prototype.getArrow=function(){var n=this.props.model,r=n.id,i=n.getArrowStyle(),o=i.refY,a=o===void 0?0:o,s=i.refX,l=s===void 0?2:s,u=kHe(this.getLastTwoPoints(),2),c=u[0],d=u[1],f="auto";return c!==null&&d!==null&&(f=K9e(G9e({x:d.x-c.x,y:d.y-c.y,z:0}))),rt("g",{children:rt("defs",{children:[rt("marker",{id:"marker-start-".concat(r),refX:-l,refY:a,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse",children:this.getStartArrow()}),rt("marker",{id:"marker-end-".concat(r),refX:l,refY:a,overflow:"visible",orient:f,markerUnits:"userSpaceOnUse",children:this.getEndArrow()})]})})},e.prototype.getStartArrow=function(){return rt("path",{})},e.prototype.getEndArrow=function(){var n=this.props.model,r=n.getArrowStyle(),i=r.stroke,o=r.strokeWidth,a=r.offset,s=r.verticalLength;return rt("path",{stroke:i,fill:i,strokeWidth:o,transform:"rotate(180)",d:"M 0 0 L ".concat(a," -").concat(s," L ").concat(a," ").concat(s," Z")})},e.prototype.getAdjustPointShape=function(n,r,i){var o=i.getAdjustPointStyle();return rt(bm,Fy({className:"lf-edge-adjust-point"},o,{x:n,y:r}))},e.prototype.getAdjustPoints=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.adjustEdgeStartAndEnd,s=o.adjustEdgeStart,l=o.adjustEdgeEnd,u=r.getAdjustStart(),c=r.getAdjustEnd();return rt("g",{children:[a&&s&&rt(x6,Fy({type:$u.SOURCE},u,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:i})),a&&l&&rt(x6,Fy({type:$u.TARGET},c,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:i}))]})},e.prototype.getAnimation=function(){console.error("getAnimation is deprecated in 1.2.0, please use model.getEdgeAnimationStyle")},e.prototype.getAppendWidth=function(){return rt("g",{})},e.prototype.getAppend=function(){return rt("g",{className:"lf-edge-append",children:this.getAppendWidth()})},e.prototype.getEdge=function(){return null},e.prototype.toFront=function(){var n=this.props,r=n.graphModel,i=n.model;r.toFront(i.id)},e.prototype.render=function(){var n=this.props.model,r=n.isSelected,i=n.isHitable,o=n.isShowAdjustPoint;return rt("g",{children:[rt("g",{className:["lf-edge",!i&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverOn,onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,onFocus:this.handleFocus,onBlur:this.handleBlur,children:[this.getShape(),this.getAppend(),this.getText(),this.getArrow()]}),o&&r?this.getAdjustPoints():""]})},e.isObserved=!1,e}(ur),PHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),uA=globalThis&&globalThis.__assign||function(){return uA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},uA.apply(this,arguments)},AHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cA=function(t){PHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.getEdgeStyle(),i=n,o=i.path,a=i.isAnimation,s=i.arrowConfig,l=n.getEdgeAnimationStyle(),u=l.strokeDasharray,c=l.stroke,d=l.strokeDashoffset,f=l.animationName,h=l.animationDuration,m=l.animationIterationCount,g=l.animationTimingFunction,y=l.animationDirection;return rt(L0,uA({d:o},r,s,a?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:d,animationName:f,animationDuration:h,animationIterationCount:m,animationTimingFunction:g,animationDirection:y}}:{}))},e.prototype.getAppendWidth=function(){var n=this.props.model.path;return rt(L0,{d:n,strokeWidth:10,stroke:"transparent",fill:"none"})},e.prototype.getArrowInfo=function(){var n=this.props.model,r=this.state.hover,i=n.isSelected,o=n.getArrowStyle().offset,a=n.pointsList.map(function(d){return{x:d.x,y:d.y}}),s=AHe(a6(a,o),2),l=s[0],u=s[1],c={start:l,end:u,hover:r,isSelected:i};return c},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.getArrowStyle().offset,i=n.pointsList.map(function(o){return{x:o.x,y:o.y}});return a6(i,r)},e}(yC),MHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),dA=globalThis&&globalThis.__assign||function(){return dA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},dA.apply(this,arguments)},C6=function(t){MHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o=n.isAnimation,a=n.arrowConfig,s=n.getEdgeStyle(),l=n.getEdgeAnimationStyle(),u=l.strokeDasharray,c=l.stroke,d=l.strokeDashoffset,f=l.animationName,h=l.animationDuration,m=l.animationIterationCount,g=l.animationTimingFunction,y=l.animationDirection;return rt(ym,dA({},s,{x1:r.x,y1:r.y,x2:i.x,y2:i.y},a,o?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:d,animationName:f,animationDuration:h,animationIterationCount:m,animationTimingFunction:g,animationDirection:y}}:{}))},e.prototype.getAppendWidth=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o={start:r,end:i},a=a9e(o),s=a.d,l=a.strokeWidth,u=a.fill,c=a.strokeDasharray,d=a.stroke;return rt(L0,{d:s,fill:u,strokeWidth:l,stroke:d,strokeDasharray:c})},e}(yC),RHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sh=globalThis&&globalThis.__assign||function(){return Sh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sh.apply(this,arguments)},$He=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},V0=function(t){RHe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(){var r=n.props.model;r.dragAppendStart(),n.isShowAdjustPointTemp=r.isShowAdjustPoint,r.isShowAdjustPoint=!1},n.onDragging=function(r){var i=r.deltaX,o=r.deltaY,a=n.props,s=a.model,l=a.graphModel;n.isDragging=!0;var u=l.transformModel,c=l.editConfigModel,d=$He(u.fixDeltaXY(i,o),2),f=d[0],h=d[1],m=s,g=c.adjustEdgeMiddle;g?n.appendInfo=m.dragAppendSimple(n.appendInfo,{x:f,y:h}):n.appendInfo=m.dragAppend(n.appendInfo,{x:f,y:h})},n.onDragEnd=function(){var r,i=n.props,o=i.model,a=i.graphModel.eventCenter,s=o;s.dragAppendEnd(),n.isDragging=!1,s.isShowAdjustPoint=(r=n.isShowAdjustPointTemp)!==null&&r!==void 0?r:!1,n.appendInfo=void 0,a.emit(pn.EDGE_ADJUST,{data:s.getData()})},n.beforeDragStart=function(r,i){i.draggable&&n.drag.handleMouseDown(r),n.appendInfo=i},n.drag=new kl({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd,isStopPropagation:!1}),n}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.getEdgeStyle(),s=n.getEdgeAnimationStyle(),l=s.strokeDasharray,u=s.stroke,c=s.strokeDashoffset,d=s.animationName,f=s.animationDuration,h=s.animationIterationCount,m=s.animationTimingFunction,g=s.animationDirection;return rt(R9e,Sh({points:r},a,o,i?{strokeDasharray:l,stroke:u,style:{strokeDashoffset:c,animationName:d,animationDuration:f,animationIterationCount:h,animationTimingFunction:m,animationDirection:g}}:{}))},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.points,i=n.isSelected,o=this.state.hover,a=sp(r),s=a[0],l=a[0];return a.length>=2&&(s=a[a.length-2],l=a[a.length-1]),{start:s,end:l,hover:o,isSelected:i}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.points,i=sp(r),o=i[0],a=i[0];return i.length>=2&&(o=i[i.length-2],a=i[i.length-1]),[o,a]},e.prototype.getAppendAttributes=function(n){var r=n.start,i=n.end,o;if(r.x===i.x&&r.y===i.y)o="";else{var a={start:r,end:i,offset:10,verticalLength:5},s=$0(Sh(Sh({},a),{type:"start"})),l=$0(Sh(Sh({},a),{type:"end"}));o="M".concat(s.leftX," ").concat(s.leftY,`
  105. L`).concat(s.rightX," ").concat(s.rightY,`
  106. L`).concat(l.rightX," ").concat(l.rightY,`
  107. L`).concat(l.leftX," ").concat(l.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},e.prototype.getAppendShape=function(n){var r=this.getAppendAttributes(n),i=r.d,o=r.strokeWidth,a=r.fill,s=r.strokeDasharray,l=r.stroke;return rt(L0,{d:i,fill:a,strokeWidth:o,stroke:l,strokeDasharray:s})},e.prototype.getAppendWidth=function(){for(var n=this,r=this.props,i=r.model,o=r.graphModel,a=i.pointsList,s=i.draggable,l=[],u=a.length,c=function(h){var m="lf-polyline-append",g={start:{x:a[h].x,y:a[h].y},end:{x:a[h+1].x,y:a[h+1].y},startIndex:h,endIndex:h+1,direction:di.HORIZONTAL,draggable:!0},y=rt("g",{className:m,children:d.getAppendShape(g)}),b=o.editConfigModel,w=b.adjustEdge,O=b.adjustEdgeMiddle;if(w&&s){var S=g.startIndex,x=g.endIndex,C=O&&(S===0||x===u-1);g.draggable=!C,g.start.x===g.end.x?(g.draggable&&(m+="-ew-resize"),g.direction=di.VERTICAL):g.start.y===g.end.y&&(g.draggable&&(m+="-ns-resize"),g.direction=di.HORIZONTAL),y=rt("g",{className:d.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(E){return n.beforeDragStart(E,g)},children:rt("g",{className:m,children:d.getAppendShape(g)})})}l.push(y)},d=this,f=0;f<u-1;f++)c(f);return rt("g",{children:l})},e}(yC),yg=globalThis&&globalThis.__assign||function(){return yg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yg.apply(this,arguments)},NHe=function(){function t(e){var n=this;this.nodeConfig=null,this.fakeNode=null,this.stopDrag=function(){n.nodeConfig=null,window.document.removeEventListener("mouseup",n.stopDrag)},this.dragEnter=function(i){!n.nodeConfig||n.fakeNode||(n.fakeNode=n.lf.createFakeNode(yg(yg({},n.nodeConfig),n.clientToLocalPoint({x:i.clientX,y:i.clientY}))))},this.onDragOver=function(i){if(i.preventDefault(),n.fakeNode){var o=n.clientToLocalPoint({x:i.clientX,y:i.clientY}),a=o.x,s=o.y;n.fakeNode.moveTo(a,s);var l=n.fakeNode.getData();n.lf.setNodeSnapLine(l),n.lf.graphModel.eventCenter.emit(pn.NODE_DND_DRAG,{data:l,e:i})}return!1},this.onDragLeave=function(){n.fakeNode&&(n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)},this.onDrop=function(i){!n.lf.graphModel||!i||!n.nodeConfig||(n.lf.addNode(yg(yg({},n.nodeConfig),n.clientToLocalPoint({x:i.clientX,y:i.clientY})),pn.NODE_DND_ADD,i),i.preventDefault(),i.stopPropagation(),n.nodeConfig=null,n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)};var r=e.lf;this.lf=r}return t.prototype.clientToLocalPoint=function(e){var n=e.x,r=e.y,i=Wr(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:n,y:r}),a=o.canvasOverlayPosition,s=a.x,l=a.y,u=this.lf.graphModel.editConfigModel.snapGrid;return{x:vm(s,i,u),y:vm(l,i,u)}},t.prototype.startDrag=function(e){var n=this.lf.graphModel.editConfigModel;n!=null&&n.isSilentMode||(this.nodeConfig=e,window.document.addEventListener("mouseup",this.stopDrag))},t.prototype.eventMap=function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}},t}();function DHe(t,e){t.on("node:mousemove",function(n){var r=n.data;e.setNodeSnapLine(r)}),t.on("node:mouseup",function(){e.clearSnapline()})}var LHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$c=globalThis&&globalThis.__assign||function(){return $c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},$c.apply(this,arguments)},IHe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},BHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},FHe=function(t){LHe(e,t);function e(n){var r=t.call(this,n)||this;return r.ref=uC(),r.__prevText={type:"",text:"",id:""},r.keyupHandler=function(i){var o=r.props.graphModel.textEditElement;i.key==="Enter"&&i.altKey&&(o==null||o.setElementState(Cr.DEFAULT))},r.inputHandler=function(i){var o=i.target.innerText,a=r.props.graphModel.textEditElement;a&&(r.__prevText={type:a.type,text:o.replace(/(\r\n)+$|(\n)+$/,""),id:a.id})},r.keydownHandler=function(i){i.stopPropagation()},r.state={style:{left:0,top:0}},r}return e.getDerivedStateFromProps=function(n){var r,i=n.textEditElement,o=n.graphModel,a=o.transformModel,s=o.theme,l=s.inputText,u;if(i){if(!(!((r=i.text)===null||r===void 0)&&r.value)&&i.BaseType===Si.EDGE){var c=i.text,d=i.textPosition,f=d.x,h=d.y;c.x=f,c.y=h,i.setText(c)}var m={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===Si.EDGE){var g=s.edgeText,y=g.overflowMode,b=g.lineHeight,w=g.wrapPadding,O=g.textWidth;O&&y==="autoWrap"&&(u=$c($c({},m),{width:O,minWidth:O,lineHeight:b,padding:w}))}else if(i.BaseType===Si.NODE){var S=s.nodeText,y=S.overflowMode,b=S.lineHeight,w=S.wrapPadding,O=S.textWidth,x=i.width,C=i.modelType,E=i.textWidth,T=E||O||x;(C!==Kn.TEXT_NODE&&y==="autoWrap"||C===Kn.TEXT_NODE&&O)&&(u=$c($c({},m),{width:T,minWidth:T,lineHeight:b,padding:w}))}var P=i.text,A=P.x,D=P.y,N=BHe(a.CanvasPointToHtmlPoint([A,D]),2),$=N[0],W=N[1];return{style:$c($c({left:$,top:W},u),l)}}return null},e.prototype.componentDidUpdate=function(){var n=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var r=this.__prevText,i=r.text,o=r.id;n.updateText(o,i),n.eventCenter.emit(pn.TEXT_UPDATE,{data:$c({},this.__prevText)}),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}},e.prototype.placeCaretAtEnd=function(n){if(window.getSelection!==void 0&&document.createRange!==void 0){var r=document.createRange();r.selectNodeContents(n),r.collapse(!1);var i=window.getSelection();i==null||i.removeAllRanges(),i==null||i.addRange(r)}},e.prototype.render=function(){var n,r=this.props.graphModel.textEditElement,i=this.state.style;return r?rt("div",{contentEditable:!0,className:"lf-text-input",style:i,ref:this.ref,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler,children:(n=r.text)===null||n===void 0?void 0:n.value},r.id):null},e.toolName="text-edit-tool",e=IHe([Ea],e),e}(ur),VHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jHe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},XT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},QHe=function(t){VHe(e,t);function e(n){var r=t.call(this,n)||this;r.handleMouseDown=function(s){r.stepDrag.handleMouseDown(s)},r.handleWheelEvent=function(s){var l,u;s.preventDefault();var c=s.deltaX,d=s.deltaY,f=s.clientX,h=s.clientY,m=s.ctrlKey,g=new WheelEvent("wheel",{deltaX:c,deltaY:d,clientX:f,clientY:h,ctrlKey:m});(u=(l=r.props.lf.container)===null||l===void 0?void 0:l.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||u===void 0||u.dispatchEvent(g)},r.onDragging=function(s){var l=s.deltaX,u=s.deltaY,c=r.props,d=c.graphModel,f=c.lf,h=f.getTransform(),m=h.SCALE_X,g=h.SCALE_Y,y=d.getSelectElements(!0);d.moveNodes(y.nodes.map(function(b){return b.id}),l/m,u/g)},r.handleContextMenu=function(s){s.preventDefault();var l=r.props,u=l.graphModel,c=l.graphModel,d=c.eventCenter,f=c.selectElements,h=u.getPointByClient({x:s.clientX,y:s.clientY}),m={nodes:[],edges:[]},g=zHe([],XT(f.values()),!1);g.forEach(function(y){y.BaseType===Si.NODE&&m.nodes.push(y.getData()),y.BaseType===Si.EDGE&&m.edges.push(y.getData())}),d.emit(pn.SELECTION_CONTEXTMENU,{data:m,e:s,position:h})};var i=n.graphModel,o=i.gridSize,a=i.eventCenter;return r.stepDrag=new kl({onDragging:r.onDragging,step:o,eventType:"SELECTION",eventCenter:a}),r}return e.prototype.render=function(){var n,r,i=this.props.graphModel,o=i.selectElements,a=i.transformModel,s=this.props.lf.getTransform(),l=s.SCALE_X,u=s.SCALE_Y;if(!(o.size<=1)){var c=Number.MAX_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER;o.forEach(function(g){var y;g.BaseType===Si.NODE&&(y=Q7e(g)),g.BaseType===Si.EDGE&&(y=q7e(g)),y!==void 0&&(c=Math.min(c,y.x),d=Math.min(d,y.y),f=Math.max(f,y.x1),h=Math.max(h,y.y1))}),n=XT(a.CanvasPointToHtmlPoint([c,d]),2),c=n[0],d=n[1],r=XT(a.CanvasPointToHtmlPoint([f,h]),2),f=r[0],h=r[1];var m={left:"".concat(c-20*l/2,"px"),top:"".concat(d-20*u/2,"px"),width:"".concat(f-c+20*l,"px"),height:"".concat(h-d+20*u,"px"),"border-width":"".concat(2*l,"px")};return rt("div",{className:"lf-multiple-select",style:m,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu,onWheel:this.handleWheelEvent})}},e.toolName="multiple-select-tool",e=jHe([Ea],e),e}(ur),ZT=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},HHe=[FHe,QHe],WHe=function(){function t(e){var n=this;this.toolMap=new Map,this.disabledToolMap=new Map,this.instance=e,jn(HHe,function(o){n.isDisabled(o.toolName)||n.registerTool(o.toolName,o)});var r=e.graphModel,i=r.eventCenter;i.on("".concat(pn.GRAPH_TRANSFORM,",").concat(pn.NODE_CLICK,",").concat(pn.BLANK_CLICK," "),function(){var o,a=r.textEditElement,s=r.editConfigModel,l=s.edgeTextEdit,u=s.nodeTextEdit;(l||u)&&a&&((o=r.textEditElement)===null||o===void 0||o.setElementState(Cr.DEFAULT))})}return t.prototype.isDisabled=function(e){var n;return((n=this.instance.options.disabledTools)===null||n===void 0?void 0:n.indexOf(e))!==-1},t.prototype.registerTool=function(e,n){this.toolMap.set(e,n)},t.prototype.disableTool=function(e){var n=this.toolMap.get(e);if(n)return this.disabledToolMap.set(e,n),this.toolMap.delete(e),!0;throw new Error("\u7981\u7528\u5931\u8D25\uFF0C\u4E0D\u5B58\u5728\u540D\u4E3A ${tool} \u7684\u5DE5\u5177")},t.prototype.enableTool=function(e){var n=this.disabledToolMap.get(e);if(n)return this.toolMap.set(e,n),this.disabledToolMap.delete(e),!0;throw new Error("\u4E0D\u5B58\u5728\u540D\u4E3A ${tool} \u7684\u5DE5\u5177")},t.prototype.getTools=function(){return Array.from(this.toolMap.values())},t.prototype.getInstance=function(){return this.instance},t.prototype.destroy=function(){this.toolMap.clear(),this.disabledToolMap.clear()},ZT([at],t.prototype,"toolMap",void 0),ZT([it],t.prototype,"disableTool",null),ZT([it],t.prototype,"enableTool",null),t}();function UHe(t){throw new Error("[mobx-utils] "+t)}function iS(t,e){e===void 0&&(e="Illegal state"),t||UHe(e)}var nX=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(nX(Object.getPrototypeOf(t))||[])},qHe=function(t){var e=nX(t),n=e.filter(function(r,i){return e.indexOf(r)===i});return n},YHe=function(t){return qHe(t).filter(function(e){return e!=="constructor"&&!~e.indexOf("__")})},rX="pending",oS="fulfilled",UN="rejected";function XHe(t){switch(this.state){case rX:return t.pending&&t.pending(this.value);case UN:return t.rejected&&t.rejected(this.value);case oS:return t.fulfilled?t.fulfilled(this.value):this.value}}function E6(t,e){if(iS(arguments.length<=2,"fromPromise expects up to two arguments"),iS(typeof t=="function"||typeof t=="object"&&t&&typeof t.then=="function","Please pass a promise or function to fromPromise"),t.isPromiseBasedObservable===!0)return t;typeof t=="function"&&(t=new Promise(t));var n=t;t.then(it("observableFromPromise-resolve",function(i){n.value=i,n.state=oS}),it("observableFromPromise-reject",function(i){n.value=i,n.state=UN})),n.isPromiseBasedObservable=!0,n.case=XHe;var r=e&&e.state===oS?e.value:void 0;return AP(n,{value:r,state:rX},{},{deep:!1}),n}(function(t){t.reject=it("fromPromise.reject",function(n){var r=t(Promise.reject(n));return r.state=UN,r.value=n,r});function e(n){n===void 0&&(n=void 0);var r=t(Promise.resolve(n));return r.state=oS,r.value=n,r}t.resolve=it("fromPromise.resolve",e)})(E6||(E6={}));var $O=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o};(function(){function t(e,n){var r=this;Bze(function(){r.current=n,r.subscription=e.subscribe(r)})}return t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(e){this.current=e},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(e){this.current=e,this.dispose()},$O([at.ref],t.prototype,"current",void 0),$O([it.bound],t.prototype,"next",null),$O([it.bound],t.prototype,"complete",null),$O([it.bound],t.prototype,"error",null),t})();var aS=function(){return aS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},aS.apply(this,arguments)},Vv=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ZHe=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function t(e){var n=this;this.model=e,this.localValues=at.map({}),this.localComputedValues=at.map({}),this.isPropertyDirty=function(r){return n.localValues.has(r)},iS(Sl(e),"createViewModel expects an observable object"),YHe(e).forEach(function(r){if(!(r===Ln||r==="__mobxDidRunLazyInitializers")){if(iS(ZHe.indexOf(r)===-1,"The propertyname "+r+" is reserved and cannot be used with viewModels"),vB(e,r)){var i=Vb(e,r).derivation;n.localComputedValues.set(r,Gr(i.bind(n)))}var o=Object.getOwnPropertyDescriptor(e,r),a=o?{enumerable:o.enumerable}:{};Object.defineProperty(n,r,aS(aS({},a),{configurable:!0,get:function(){return vB(e,r)?n.localComputedValues.get(r).get():n.isPropertyDirty(r)?n.localValues.get(r):n.model[r]},set:it(function(s){s!==n.model[r]?n.localValues.set(r,s):n.localValues.delete(r)})}))}})}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var e=this;mm(this.localValues).forEach(function(n){var r=e.localValues.get(n),i=e.model[n];hc(i)?i.replace(r):ls(i)?(i.clear(),i.merge(r)):Wze(r)||(e.model[n]=r)}),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(e){this.localValues.delete(e)},Vv([Gr],t.prototype,"isDirty",null),Vv([Gr],t.prototype,"changedValues",null),Vv([it.bound],t.prototype,"submit",null),Vv([it.bound],t.prototype,"reset",null),Vv([it.bound],t.prototype,"resetProperty",null),t})();function GT(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function KT(t){return Sl(t)||hc(t)||ls(t)}function GHe(t,e){var n=new WeakMap;function r(s){var l=n.get(s.object);i(s,l),e(s,GT(l),t)}function i(s,l){switch(s.type){case"add":o(s.newValue,l,s.name);break;case"update":a(s.oldValue),o(s.newValue,l,s.name||""+s.index);break;case"remove":case"delete":a(s.oldValue);break;case"splice":s.removed.map(a),s.added.forEach(function(d,f){return o(d,l,""+(s.index+f))});for(var u=s.index+s.addedCount;u<s.object.length;u++)if(KT(s.object[u])){var c=n.get(s.object[u]);c&&(c.path=""+u)}break}}function o(s,l,u){if(KT(s)){var c=n.get(s);if(c){if(c.parent!==l||c.path!==u)throw new Error("The same observable object cannot appear twice in the same tree,"+(" trying to assign it to '"+GT(l)+"/"+u+"',")+(" but it already exists at '"+GT(c.parent)+"/"+c.path+"'"))}else{var d={parent:l,path:u,dispose:TY(s,r)};n.set(s,d),Yze(s).forEach(function(f){var h=f[0],m=f[1];return o(m,d,h)})}}}function a(s){if(KT(s)){var l=n.get(s);if(!l)return;n.delete(s),l.dispose(),qze(s).forEach(a)}}return o(t,void 0,""),function(){a(t)}}var KHe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){KHe(e,t);function e(n,r,i){var o=i===void 0?{}:i,a=o.name,s=a===void 0?"ogm"+(Math.random()*1e3|0):a,l=o.keyToName,u=l===void 0?function(f){return""+f}:l,c=t.call(this)||this;c._keyToName=u,c._groupBy=r,c._ogmInfoKey=Symbol("ogmInfo"+s),c._base=n;for(var d=0;d<n.length;d++)c._addItem(n[d]);return c._disposeBaseObserver=TY(c._base,function(f){if(f.type==="splice")ql(function(){for(var h=0,m=f.removed;h<m.length;h++){var g=m[h];c._removeItem(g)}for(var y=0,b=f.added;y<b.length;y++){var w=b[y];c._addItem(w)}});else if(f.type==="update")ql(function(){c._removeItem(f.oldValue),c._addItem(f.newValue)});else throw new Error("illegal state")}),c}return e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(n){throw new Error("not supported")},e.prototype.set=function(n,r){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var n=0;n<this._base.length;n++){var r=this._base[n],i=r[this._ogmInfoKey];i.reaction(),delete r[this._ogmInfoKey]}},e.prototype._getGroupArr=function(n){var r=t.prototype.get.call(this,n);return r===void 0&&(r=at([],{name:"GroupArray["+this._keyToName(n)+"]",deep:!1}),t.prototype.set.call(this,n,r)),r},e.prototype._removeFromGroupArr=function(n,r){var i=t.prototype.get.call(this,n);i.length===1?t.prototype.delete.call(this,n):(r===i.length-1||(i[r]=i[i.length-1],i[r][this._ogmInfoKey].groupArrIndex=r),i.length--)},e.prototype._addItem=function(n){var r=this,i=this._groupBy(n),o=this._getGroupArr(i),a={groupByValue:i,groupArrIndex:o.length,reaction:_Y(function(){return r._groupBy(n)},function(s,l){var u=n[r._ogmInfoKey];r._removeFromGroupArr(u.groupByValue,u.groupArrIndex);var c=r._getGroupArr(s),d=c.length;c.push(n),u.groupByValue=s,u.groupArrIndex=d})};Object.defineProperty(n,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:a}),o.push(n)},e.prototype._removeItem=function(n){var r=n[this._ogmInfoKey];this._removeFromGroupArr(r.groupByValue,r.groupArrIndex),r.reaction(),delete n[this._ogmInfoKey]},e})(BN);Promise.resolve(),typeof queueMicrotask!="undefined"||typeof process!="undefined"&&process.nextTick;var fA=globalThis&&globalThis.__assign||function(){return fA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},fA.apply(this,arguments)},JHe=function(){function t(e){this.undos=[],this.redos=[],this.callbacks=[],this.stopWatch=null,this.curData=null,this.maxSize=50,this.waitTime=100,this.eventCenter=e}return t.prototype.add=function(e){so(ns(this.undos),e)||(this.undos.push(e),so(this.curData,e)||(this.redos=[]),this.eventCenter.emit(pn.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undoAble(),redoAble:this.redoAble()}}),this.undos.length>this.maxSize&&this.undos.shift())},t.prototype.undoAble=function(){return this.undos.length>1},t.prototype.undo=function(){if(!!this.undoAble()){var e=this.undos.pop();this.redos.push(e);var n=this.undos.pop();return this.curData=Fn(n),n}},t.prototype.redoAble=function(){return this.redos.length>0},t.prototype.redo=function(){if(!!this.redoAble()){var e=this.redos.pop();return this.curData=Fn(e),e}},t.prototype.watch=function(e){var n=this;this.stopWatch&&this.stopWatch(),this.undos.push(e.modelToGraphData()),this.stopWatch=GHe(e,jo(function(){var r=e.modelToHistoryData();r&&n.add(fA({},r))},this.waitTime))},t.prototype.destroy=function(){this.undos=[],this.redos=[],this.curData=null,this.stopWatch&&this.stopWatch()},t}(),iX={exports:{}};(function(t){(function(e,n,r){if(!e)return;for(var i={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},s={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},l,u=1;u<20;++u)i[111+u]="f"+u;for(u=0;u<=9;++u)i[u+96]=u.toString();function c(E,T,P){if(E.addEventListener){E.addEventListener(T,P,!1);return}E.attachEvent("on"+T,P)}function d(E){if(E.type=="keypress"){var T=String.fromCharCode(E.which);return E.shiftKey||(T=T.toLowerCase()),T}return i[E.which]?i[E.which]:o[E.which]?o[E.which]:String.fromCharCode(E.which).toLowerCase()}function f(E,T){return E.sort().join(",")===T.sort().join(",")}function h(E){var T=[];return E.shiftKey&&T.push("shift"),E.altKey&&T.push("alt"),E.ctrlKey&&T.push("ctrl"),E.metaKey&&T.push("meta"),T}function m(E){if(E.preventDefault){E.preventDefault();return}E.returnValue=!1}function g(E){if(E.stopPropagation){E.stopPropagation();return}E.cancelBubble=!0}function y(E){return E=="shift"||E=="ctrl"||E=="alt"||E=="meta"}function b(){if(!l){l={};for(var E in i)E>95&&E<112||i.hasOwnProperty(E)&&(l[i[E]]=E)}return l}function w(E,T,P){return P||(P=b()[E]?"keydown":"keypress"),P=="keypress"&&T.length&&(P="keydown"),P}function O(E){return E==="+"?["+"]:(E=E.replace(/\+{2}/g,"+plus"),E.split("+"))}function S(E,T){var P,A,D,N=[];for(P=O(E),D=0;D<P.length;++D)A=P[D],s[A]&&(A=s[A]),T&&T!="keypress"&&a[A]&&(A=a[A],N.push("shift")),y(A)&&N.push(A);return T=w(A,N,T),{key:A,modifiers:N,action:T}}function x(E,T){return E===null||E===n?!1:E===T?!0:x(E.parentNode,T)}function C(E){var T=this;if(E=E||n,!(T instanceof C))return new C(E);T.target=E,T._callbacks={},T._directMap={};var P={},A,D=!1,N=!1,$=!1;function W(K){K=K||{};var ie=!1,oe;for(oe in P){if(K[oe]){ie=!0;continue}P[oe]=0}ie||($=!1)}function L(K,ie,oe,Se,ke,Y){var re,te,ge=[],Re=oe.type;if(!T._callbacks[K])return[];for(Re=="keyup"&&y(K)&&(ie=[K]),re=0;re<T._callbacks[K].length;++re)if(te=T._callbacks[K][re],!(!Se&&te.seq&&P[te.seq]!=te.level)&&Re==te.action&&(Re=="keypress"&&!oe.metaKey&&!oe.ctrlKey||f(ie,te.modifiers))){var $e=!Se&&te.combo==ke,Z=Se&&te.seq==Se&&te.level==Y;($e||Z)&&T._callbacks[K].splice(re,1),ge.push(te)}return ge}function I(K,ie,oe,Se){T.stopCallback(ie,ie.target||ie.srcElement,oe,Se)||K(ie,oe)===!1&&(m(ie),g(ie))}T._handleKey=function(K,ie,oe){var Se=L(K,ie,oe),ke,Y={},re=0,te=!1;for(ke=0;ke<Se.length;++ke)Se[ke].seq&&(re=Math.max(re,Se[ke].level));for(ke=0;ke<Se.length;++ke){if(Se[ke].seq){if(Se[ke].level!=re)continue;te=!0,Y[Se[ke].seq]=1,I(Se[ke].callback,oe,Se[ke].combo,Se[ke].seq);continue}te||I(Se[ke].callback,oe,Se[ke].combo)}var ge=oe.type=="keypress"&&N;oe.type==$&&!y(K)&&!ge&&W(Y),N=te&&oe.type=="keydown"};function U(K){typeof K.which!="number"&&(K.which=K.keyCode);var ie=d(K);if(!!ie){if(K.type=="keyup"&&D===ie){D=!1;return}T.handleKey(ie,h(K),K)}}function Q(){clearTimeout(A),A=setTimeout(W,1e3)}function V(K,ie,oe,Se){P[K]=0;function ke(Re){return function(){$=Re,++P[K],Q()}}function Y(Re){I(oe,Re,K),Se!=="keyup"&&(D=d(Re)),setTimeout(W,10)}for(var re=0;re<ie.length;++re){var te=re+1===ie.length,ge=te?Y:ke(Se||S(ie[re+1]).action);q(ie[re],ge,Se,K,re)}}function q(K,ie,oe,Se,ke){T._directMap[K+":"+oe]=ie,K=K.replace(/\s+/g," ");var Y=K.split(" "),re;if(Y.length>1){V(K,Y,ie,oe);return}re=S(K,oe),T._callbacks[re.key]=T._callbacks[re.key]||[],L(re.key,re.modifiers,{type:re.action},Se,K,ke),T._callbacks[re.key][Se?"unshift":"push"]({callback:ie,modifiers:re.modifiers,action:re.action,seq:Se,level:ke,combo:K})}T._bindMultiple=function(K,ie,oe){for(var Se=0;Se<K.length;++Se)q(K[Se],ie,oe)},c(E,"keypress",U),c(E,"keydown",U),c(E,"keyup",U)}C.prototype.bind=function(E,T,P){var A=this;return E=E instanceof Array?E:[E],A._bindMultiple.call(A,E,T,P),A},C.prototype.unbind=function(E,T){var P=this;return P.bind.call(P,E,function(){},T)},C.prototype.trigger=function(E,T){var P=this;return P._directMap[E+":"+T]&&P._directMap[E+":"+T]({},E),P},C.prototype.reset=function(){var E=this;return E._callbacks={},E._directMap={},E},C.prototype.stopCallback=function(E,T){var P=this;if((" "+T.className+" ").indexOf(" mousetrap ")>-1||x(T,P.target))return!1;if("composedPath"in E&&typeof E.composedPath=="function"){var A=E.composedPath()[0];A!==E.target&&(T=A)}return T.tagName=="INPUT"||T.tagName=="SELECT"||T.tagName=="TEXTAREA"||T.isContentEditable},C.prototype.handleKey=function(){var E=this;return E._handleKey.apply(E,arguments)},C.addKeycodes=function(E){for(var T in E)E.hasOwnProperty(T)&&(i[T]=E[T]);l=null},C.init=function(){var E=C(n);for(var T in E)T.charAt(0)!=="_"&&(C[T]=function(P){return function(){return E[P].apply(E,arguments)}}(T))},C.init(),e.Mousetrap=C,t.exports&&(t.exports=C),typeof r=="function"&&r.amd&&r(function(){return C})})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)})(iX);var eWe=iX.exports,Ud=globalThis&&globalThis.__assign||function(){return Ud=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ud.apply(this,arguments)},tWe=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Su=null;function T6(t,e){return t.x+=e,t.y+=e,VR(t.text)||(t.text.x+=e,t.text.y+=e),t}function k6(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach(function(n){n.x+=e,n.y+=e}),VR(t.text)||(t.text.x+=e,t.text.y+=e),t}function nWe(t,e){var n=t.x,r=t.y,i=t.text,o=i?{x:i.x+e,y:i.y+e,value:i.value}:void 0;return Ud(Ud({},t),{id:"",x:n+e,y:r+e,text:o})}function rWe(t,e){var n=t.startPoint,r=t.endPoint,i=t.pointsList,o=t.text,a=tWe(t,["startPoint","endPoint","pointsList","text"]);a.id="";var s={x:n.x+e,y:n.y+e},l={x:r.x+e,y:r.y+e},u=Ca(i,function(d){return{x:d.x+e,y:d.y+e}}),c=o?Ud(Ud({},o),{x:o.x+e,y:o.y+e}):void 0;return Ud(Ud({},a),{startPoint:s,endPoint:l,pointsList:u,text:c})}var Jp=40,NO=40;function iWe(t,e){var n=t.keyboard,r=n.options.keyboard;n.on(["cmd + c","ctrl + c"],function(){if(NO=Jp,!(r!=null&&r.enabled)||e.textEditElement)return!0;var i=t.options.guards,o=e.getSelectElements(!1),a=i&&i.beforeClone?i.beforeClone(o):!0;return!a||o.nodes.length===0&&o.edges.length===0?(Su=null,!0):(Su=o,Su.nodes.forEach(function(s){return T6(s,Jp)}),Su.edges.forEach(function(s){return k6(s,Jp)}),!1)}),n.on(["cmd + v","ctrl + v"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;if(Su&&(Su.nodes||Su.edges)){t.clearSelectElements();var i=t.addElements(Su,NO);if(!i)return!0;i.nodes.forEach(function(o){return t.selectElementById(o.id,!0)}),i.edges.forEach(function(o){return t.selectElementById(o.id,!0)}),Su.nodes.forEach(function(o){return T6(o,Jp)}),Su.edges.forEach(function(o){return k6(o,Jp)}),NO=NO+Jp}return!1}),n.on(["cmd + z","ctrl + z"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.undo(),!1)}),n.on(["cmd + y","ctrl + y"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.redo(),!1)}),n.on(["backspace"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;var i=e.getSelectElements(!0);return t.clearSelectElements(),i.edges.forEach(function(o){return o.id&&t.deleteEdge(o.id)}),i.nodes.forEach(function(o){return o.id&&t.deleteNode(o.id)}),!1})}var oWe=function(){function t(e){e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var n=e.lf;this.target=n.container,this.mousetrap=new eWe(this.target),e.keyboard.enabled&&!n.options.isSilentMode&&this.enable(!0)}return t.prototype.initShortcuts=function(){var e=this,n,r=((n=this.options.keyboard)!==null&&n!==void 0?n:{}).shortcuts;if(r)if(Qn(r))r.forEach(function(s){var l=s.keys,u=s.callback,c=s.action;return e.on(l,u,c)});else{var i=r.keys,o=r.callback,a=r.action;this.on(i,o,a)}},t.prototype.on=function(e,n,r){this.mousetrap.bind(this.getKeys(e),n,r)},Object.defineProperty(t.prototype,"disabled",{get:function(){var e,n;return((n=(e=this.options)===null||e===void 0?void 0:e.keyboard)===null||n===void 0?void 0:n.enabled)!==!0},enumerable:!1,configurable:!0}),t.prototype.off=function(e,n){this.mousetrap.unbind(this.getKeys(e),n)},t.prototype.enable=function(e){(this.disabled||e)&&(this.options.keyboard&&(this.options.keyboard.enabled=!0),this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))},t.prototype.disable=function(){this.disabled||(this.options.keyboard&&(this.options.keyboard.enabled=!1),this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))},t.prototype.destroy=function(){this.mousetrap.reset()},t.prototype.getKeys=function(e){var n=this;return(Array.isArray(e)?e:[e]).map(function(r){return n.formatKey(r)})},t.prototype.formatKey=function(e){return e.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")},t}(),$d=globalThis&&globalThis.__assign||function(){return $d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},$d.apply(this,arguments)},DO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},JT=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},e2=Symbol("plugin registered by Logicflow.use"),hA=function(){function t(e){var n=this,r;this.viewMap=new Map,this.components=[],this.extension={},this.setView=function(u,c){return n.viewMap.set(u,c)},this.getView=function(u){return n.viewMap.get(u)};var i=M0.get(e),o=i.container,a=i.width,s=i.height;this.options=i,this.container=this.initContainer(o,a,s),this.graphModel=new YQe($d($d({},i),{container:this.container})),this.plugins=(r=i.plugins)!==null&&r!==void 0?r:[];var l=this.graphModel.eventCenter;this.tool=new WHe(this),this.dnd=new NHe({lf:this}),this.history=new JHe(l),this.keyboard=new oWe({lf:this,keyboard:i.keyboard}),i.snapline!==!1&&(this.snaplineModel=new XQe(this.graphModel),DHe(l,this.snaplineModel)),i.isSilentMode||(iWe(this,this.graphModel),this.keyboard.initShortcuts()),this.defaultRegister(),this.installPlugins(i.disabledPlugins)}return t.prototype.initContainer=function(e,n,r){var i=document.createElement("div");return i.style.position="relative",i.style.width=n?"".concat(n,"px"):"100%",i.style.height=r?"".concat(r,"px"):"100%",e.innerHTML="",e.appendChild(i),i},Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return t.toStringTag},enumerable:!1,configurable:!0}),t.prototype.register=function(e,n,r){if(r===void 0&&(r=!0),typeof e!="string"){this.registerElement(e);return}var i={BaseEdge:yC,BaseEdgeModel:vC,BaseNode:zf,BaseNodeModel:jf,RectNode:wf,RectNodeModel:lp,CircleNode:tS,CircleNodeModel:Gw,PolygonNode:rS,PolygonNodeModel:Kw,TextNode:S6,TextNodeModel:O6,LineEdge:C6,LineEdgeModel:v6,DiamondNode:rA,DiamondNodeModel:qP,PolylineEdge:V0,PolylineEdgeModel:B0,BezierEdge:cA,BezierEdgeModel:UP,EllipseNode:oA,EllipseNodeModel:YP,HtmlNode:sA,HtmlNodeModel:XP,h:Gt,type:e};if(this.viewMap.forEach(function(u){var c=u.extendKey;c&&(i[c]=u)}),this.graphModel.modelMap.forEach(function(u){var c=u.extendKey;c&&(i[c]=u)}),n){var o=n(i),a=o.view,s=o.model,l=a;r&&!l.isObserved&&(l.isObserved=!0,l=Ea(l)),this.setView(e,l),this.graphModel.setModel(e,s)}},t.prototype.registerElement=function(e){var n=e.view;e.isObserverView!==!1&&!n.isObserved&&(n.isObserved=!0,n=Ea(n)),this.setView(e.type,n),this.graphModel.setModel(e.type,e.model)},t.prototype.batchRegister=function(e){var n=this;e===void 0&&(e=[]),jn(e,function(r){n.registerElement(r)})},t.prototype.defaultRegister=function(){var e=[{type:"rect",view:wf,model:lp},{type:"circle",view:tS,model:Gw},{type:"polygon",view:rS,model:Kw},{type:"text",view:S6,model:O6},{type:"ellipse",view:oA,model:YP},{type:"diamond",view:rA,model:qP},{type:"html",view:sA,model:XP},{type:"line",view:C6,model:v6},{type:"polyline",view:V0,model:B0},{type:"bezier",view:cA,model:UP}];this.batchRegister(e)},t.prototype.addNode=function(e,n,r){return n===void 0&&(n=pn.NODE_ADD),this.graphModel.addNode(e,n,r)},t.prototype.deleteNode=function(e){var n=this.graphModel.getNodeModelById(e);if(!n)return!1;var r=n.getData(),i=this.options.guards,o=i!=null&&i.beforeDelete?i.beforeDelete(r):!0;return o&&this.graphModel.deleteNode(e),o},t.prototype.cloneNode=function(e){var n=this.graphModel.getNodeModelById(e),r=n==null?void 0:n.getData();if(r){var i=this.options.guards,o=i!=null&&i.beforeClone?i.beforeClone(r):!0;if(o)return this.graphModel.cloneNode(e)}},t.prototype.changeNodeId=function(e,n){return this.graphModel.changeNodeId(e,n)},t.prototype.changeNodeType=function(e,n){this.graphModel.changeNodeType(e,n)},t.prototype.getNodeModelById=function(e){return this.graphModel.getNodeModelById(e)},t.prototype.getNodeDataById=function(e){var n=this.getNodeModelById(e);return n==null?void 0:n.getData()},t.prototype.getNodeIncomingEdge=function(e){return this.graphModel.getNodeIncomingEdge(e)},t.prototype.getNodeOutgoingEdge=function(e){return this.graphModel.getNodeOutgoingEdge(e)},t.prototype.getNodeIncomingNode=function(e){return this.graphModel.getNodeIncomingNode(e)},t.prototype.getNodeOutgoingNode=function(e){return this.graphModel.getNodeOutgoingNode(e)},t.prototype.createFakeNode=function(e){var n=this.graphModel.modelMap.get(e.type);if(!n)return console.warn("\u4E0D\u5B58\u5728\u4E3A".concat(e.type,"\u7C7B\u578B\u7684\u8282\u70B9")),null;var r=new n($d($d({},e),{virtual:!0}),this.graphModel);return this.graphModel.setFakeNode(r),r},t.prototype.removeFakeNode=function(){this.graphModel.removeFakeNode()},t.prototype.setNodeSnapLine=function(e){var n;(n=this.snaplineModel)===null||n===void 0||n.setNodeSnapLine(e)},t.prototype.removeNodeSnapLine=function(){var e;(e=this.snaplineModel)===null||e===void 0||e.clearSnapline()},t.prototype.setDefaultEdgeType=function(e){this.graphModel.setDefaultEdgeType(e)},t.prototype.addEdge=function(e){return this.graphModel.addEdge(e)},t.prototype.getEdgeDataById=function(e){var n=this.getEdgeModelById(e);return n==null?void 0:n.getData()},t.prototype.getEdgeModelById=function(e){return this.graphModel.getEdgeModelById(e)},t.prototype.getEdgeModels=function(e){var n=e.sourceNodeId,r=e.targetNodeId,i=[],o=this.graphModel.edges;return n&&r?jn(o,function(a){a.sourceNodeId===n&&a.targetNodeId===r&&i.push(a)}):n?jn(o,function(a){a.sourceNodeId===n&&i.push(a)}):r&&jn(o,function(a){a.targetNodeId===r&&i.push(a)}),i},t.prototype.changeEdgeId=function(e,n){return this.graphModel.changeEdgeId(e,n)},t.prototype.changeEdgeType=function(e,n){this.graphModel.changeEdgeType(e,n)},t.prototype.deleteEdge=function(e){var n=this.graphModel.getEdgeModelById(e);if(!n)return!1;var r=n.getData(),i=this.options.guards,o=i!=null&&i.beforeDelete?i.beforeDelete(r):!0;return o&&this.graphModel.deleteEdgeById(e),o},t.prototype.deleteEdgeByNodeId=function(e){var n=e.sourceNodeId,r=e.targetNodeId;n&&r?this.graphModel.deleteEdgeBySourceAndTarget(n,r):n?this.graphModel.deleteEdgeBySource(n):r&&this.graphModel.deleteEdgeByTarget(r)},t.prototype.getNodeEdges=function(e){return this.graphModel.getNodeEdges(e)},t.prototype.addElements=function(e,n){var r=this,i=e.nodes,o=e.edges;n===void 0&&(n=40),console.log("distance",n);var a={},s={nodes:[],edges:[]};return jn(i,function(l){var u=l.id,c=r.addNode(l);u&&(a[u]=c.id),s.nodes.push(c)}),jn(o,function(l){var u=l.sourceNodeId,c=l.targetNodeId;a[u]&&(u=a[u]),a[c]&&(c=a[c]);var d=r.graphModel.addEdge($d($d({},l),{sourceNodeId:u,targetNodeId:c}));s.edges.push(d)}),s},t.prototype.selectElementById=function(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),this.graphModel.selectElementById(e,n),!n&&r&&this.graphModel.toFront(e)},t.prototype.getSelectElements=function(e){return e===void 0&&(e=!0),this.graphModel.getSelectElements(e)},t.prototype.clearSelectElements=function(){this.graphModel.clearSelectElements()},t.prototype.getModelById=function(e){return this.graphModel.getElement(e)},t.prototype.getDataById=function(e){var n;return(n=this.graphModel.getElement(e))===null||n===void 0?void 0:n.getData()},t.prototype.deleteElement=function(e){var n,r,i,o=this.getModelById(e);if(!o)return!1;var a=(n={},n[Si.NODE]=this.deleteNode,n[Si.EDGE]=this.deleteEdge,n);return(i=(r=a[o.BaseType])===null||r===void 0?void 0:r.call(this,e))!==null&&i!==void 0?i:!1},t.prototype.setElementZIndex=function(e,n){return this.graphModel.setElementZIndex(e,n)},t.prototype.getAreaElement=function(e,n,r,i,o){return r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!1),this.graphModel.getAreaElement(e,n,r,i,o).map(function(a){return a.getData()})},t.prototype.setProperties=function(e,n){var r;(r=this.graphModel.getElement(e))===null||r===void 0||r.setProperties(na(n))},t.prototype.getProperties=function(e){var n;return(n=this.graphModel.getElement(e))===null||n===void 0?void 0:n.getProperties()},t.prototype.deleteProperty=function(e,n){var r;(r=this.graphModel.getElement(e))===null||r===void 0||r.deleteProperty(n)},t.prototype.updateAttributes=function(e,n){this.graphModel.updateAttributes(e,n)},t.prototype.editText=function(e){this.graphModel.editText(e)},t.prototype.updateText=function(e,n){this.graphModel.updateText(e,n)},t.prototype.updateEditConfig=function(e){var n=this.graphModel,r=n.editConfigModel,i=n.transformModel,o=r.snapGrid;if(r.updateEditConfig(e),(e==null?void 0:e.stopMoveGraph)!==void 0&&i.updateTranslateLimits(e.stopMoveGraph),e!=null&&e.isSilentMode?this.keyboard.disable():this.keyboard.enable(!0),!Dr(e==null?void 0:e.snapGrid)&&e.snapGrid!==o){var a=this.graphModel.grid.size,s=a===void 0?1:a;this.graphModel.updateGridSize(e.snapGrid?s:1)}},t.prototype.getEditConfig=function(){return this.graphModel.editConfigModel.getConfig()},t.prototype.setTheme=function(e){this.graphModel.setTheme(e)},t.prototype.focusByElement=function(e){var n=void 0,r=this.getNodeModelById(e);if(r){var i=r.getData(),o=i.x,a=i.y;n={x:o,y:a}}var s=this.getEdgeModelById(e);if(s){var l=s.textPosition,o=l.x,a=l.y;n={x:o,y:a}}n&&this.focusByCoordinate(n)},t.prototype.focusByCoordinate=function(e){var n=this.graphModel,r=n.transformModel,i=n.width,o=n.height,a=e.x,s=e.y;r.focusOn(a,s,i,o)},t.prototype.focusOn=function(e){if(typeof e=="string")this.focusByElement(e);else if("x"in e&&"y"in e)this.focusByCoordinate(e);else{var n=e.id,r=e.coordinate;n&&this.focusByElement(n),r&&this.focusByCoordinate(r)}},t.prototype.resize=function(e,n){this.graphModel.resize(e,n),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height},t.prototype.toFront=function(e){this.graphModel.toFront(e)},t.prototype.getPointByClient=function(e,n){if(typeof e=="object")return this.graphModel.getPointByClient(e);if(typeof n=="number")return this.graphModel.getPointByClient({x:e,y:n})},t.prototype.getGraphData=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.getGraphRawData();return this.adapterOut?this.adapterOut.apply(this,JT([r],DO(e),!1)):r},t.prototype.getGraphRawData=function(){return this.graphModel.modelToGraphData()},t.prototype.clearData=function(){this.graphModel.clearData(),this.render({})},t.prototype.renderRawData=function(e){this.graphModel.graphDataToModel(na(e)),this.options.history!==!1&&this.history.watch(this.graphModel),HB(rt(nHe,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(pn.GRAPH_RENDERED,{data:this.graphModel.modelToGraphData(),graphModel:this.graphModel})},t.prototype.render=function(e){var n=Fn(e);this.adapterIn&&(n=this.adapterIn(n)),this.renderRawData(n)},t.prototype.undo=function(){if(!!this.history.undoAble()){var e=na(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(e)}},t.prototype.redo=function(){if(!!this.history.redoAble()){var e=na(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(e)}},t.prototype.zoom=function(e,n){var r=this.graphModel.transformModel;return r.zoom(e,n)},t.prototype.resetZoom=function(){var e=this.graphModel.transformModel;e.resetZoom()},t.prototype.setZoomMiniSize=function(e){var n=this.graphModel.transformModel;n.setZoomMiniSize(e)},t.prototype.setZoomMaxSize=function(e){var n=this.graphModel.transformModel;n.setZoomMaxSize(e)},t.prototype.getTransform=function(){var e=this.graphModel.transformModel,n=e.SCALE_X,r=e.SCALE_Y,i=e.TRANSLATE_X,o=e.TRANSLATE_Y;return{SCALE_X:n,SCALE_Y:r,TRANSLATE_X:i,TRANSLATE_Y:o}},t.prototype.translate=function(e,n){var r=this.graphModel.transformModel;r.translate(e,n)},t.prototype.resetTranslate=function(){var e=this.graphModel.transformModel,n=e.TRANSLATE_X,r=e.TRANSLATE_Y;this.translate(-n,-r)},t.prototype.translateCenter=function(){this.graphModel.translateCenter()},t.prototype.fitView=function(e,n){n===void 0&&(n=e),this.graphModel.fitView(e,n)},t.prototype.openEdgeAnimation=function(e){this.graphModel.openEdgeAnimation(e)},t.prototype.closeEdgeAnimation=function(e){this.graphModel.closeEdgeAnimation(e)},t.prototype.on=function(e,n){this.graphModel.eventCenter.on(e,n)},t.prototype.off=function(e,n){this.graphModel.eventCenter.off(e,n)},t.prototype.once=function(e,n){this.graphModel.eventCenter.once(e,n)},t.prototype.emit=function(e,n){this.graphModel.eventCenter.emit(e,n)},t.use=function(e,n){var r,i=e.pluginName;if(!i)throw new Error("\u8BF7\u7ED9\u63D2\u4EF6\u6307\u5B9A pluginName!");this.extensions.set(i,(r={},r[e2]=e2,r.extension=e,r.props=n,r))},t.prototype.installPlugins=function(e){var n=this;e===void 0&&(e=[]);var r=Array.from(t.extensions,function(o){var a=DO(o,2),s=a[1];return s}),i=JT(JT([],DO(this.plugins),!1),DO(r),!1);jn(i,function(o){var a,s;e2 in o?(a=o.extension,s=o.props):a=o;var l=a==null?void 0:a.pluginName;Y9(e,l)===-1&&n.installPlugin(a,s)})},t.prototype.installPlugin=function(e,n){var r,i;if("pluginName"in e&&"install"in e){var o=e.pluginName,a=e.install,s=e.render;o&&(a&&a.call(e,this,t),s&&this.components.push(s.bind(e)),this.extension[o]=e);return}var l=e,u=l.pluginName,c=new l({lf:this,LogicFlow:t,props:n,options:(i=(r=this.options.pluginsOptions)===null||r===void 0?void 0:r[u])!==null&&i!==void 0?i:{}});c.render&&this.components.push(c.render.bind(c)),this.extension[u]=c},t.prototype.destroy=function(){this.clearData(),HB(null,this.container),this.keyboard.destroy(),this.graphModel.destroy(),this.tool.destroy(),this.history.destroy()},t.extensions=new Map,t}();(function(t){t.toStringTag="LF.".concat(t.name)})(hA||(hA={}));var oX=hA;function Ea(t){return jN(t)}var P6={width:40,height:40},A6={width:40,height:40},M6={width:40,height:40},R6={width:100,height:80},$6={width:100,height:80},aWe=function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,function(e){var n=Math.random()*16|0,r=e==="x"?n:n&3|8;return r.toString(16)})},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t}(),sWe=(globalThis==null?void 0:globalThis._ids)||new aWe;function nv(){return sWe.next()}var aX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){aX(e,t);function e(n,r){return n.id||(n.id="Event_".concat(nv())),n.text||(n.text=""),n.text&&typeof n.text=="string"&&(n.text={value:n.text,x:n.x,y:n.y+40}),t.call(this,n,r)||this}return e.prototype.setAttributes=function(){this.r=18},e.prototype.getConnectedTargetRules=function(){var n=t.prototype.getConnectedTargetRules.call(this),r={message:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u7EC8\u70B9",validate:function(){return!1}};return n.push(r),n},e.extendKey="StartEventModel",e})(Gw);(function(t){aX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.extendKey="StartEventNode",e})(tS);var sX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sS=globalThis&&globalThis.__assign||function(){return sS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},sS.apply(this,arguments)};(function(t){sX(e,t);function e(n,r){return n.id||(n.id="Event_".concat(nv())),n.text||(n.text=""),n.text&&typeof n.text=="string"&&(n.text={value:n.text,x:n.x,y:n.y+40}),t.call(this,n,r)||this}return e.prototype.setAttributes=function(){this.r=18},e.prototype.getConnectedSourceRules=function(){var n=t.prototype.getConnectedSourceRules.call(this),r={message:"\u7ED3\u675F\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u8D77\u70B9",validate:function(){return!1}};return n.push(r),n},e.extendKey="EndEventModel",e})(Gw);(function(t){sX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},e.prototype.getShape=function(){var n=this.props.model,r=n.getNodeStyle(),i=n,o=i.x,a=i.y,s=i.r,l=t.prototype.getShape.call(this);return Gt("g",{},l,Gt("circle",sS(sS({},r),{cx:o,cy:a,r:s-5})))},e.extendKey="EndEventView",e})(tS);var lX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){lX(e,t);function e(n,r){return n.id||(n.id="Flow_".concat(nv())),t.call(this,n,r)||this}return e.extendKey="SequenceFlowModel",e})(B0);(function(t){lX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.extendKey="SequenceFlowEdge",e})(V0);var uX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vy=globalThis&&globalThis.__assign||function(){return Vy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Vy.apply(this,arguments)};(function(t){uX(e,t);function e(n,r){var i=this;return n.id||(n.id="Gateway_".concat(nv())),n.text||(n.text=""),n.text&&typeof n.text=="string"&&(n.text={value:n.text,x:n.x,y:n.y+40}),i=t.call(this,n,r)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return e.extendKey="ExclusiveGatewayModel",e})(Kw);(function(t){uX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getShape=function(){var n=this.props.model,r=n,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points,u=n.getNodeStyle();return Gt("g",{transform:"matrix(1 0 0 1 ".concat(i-a/2," ").concat(o-s/2,")")},Gt("polygon",Vy(Vy({},u),{x:i,y:o,points:l})),Gt("path",Vy({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},u)))},e.extendKey="ExclusiveGatewayNode",e})(rS);var cX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pA=globalThis&&globalThis.__assign||function(){return pA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},pA.apply(this,arguments)};(function(t){cX(e,t);function e(n,r){return n.id||(n.id="Activity_".concat(nv())),t.call(this,n,r)||this}return e.extendKey="ServiceTaskModel",e})(lp);(function(t){cX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getNodeStyle();return Gt("svg",{x:r-o/2+5,y:i-a/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Gt("path",{fill:s.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.radius,l=n.getNodeStyle();return Gt("g",{},[Gt("rect",pA({x:r-o/2,y:i-a/2,rx:s,ry:s,width:o,height:a},l)),this.getLabelShape()])},e.extendKey="ServiceTaskNode",e})(wf);var dX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lS=globalThis&&globalThis.__assign||function(){return lS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},lS.apply(this,arguments)};(function(t){dX(e,t);function e(n,r){return n.id||(n.id="Activity_".concat(nv())),t.call(this,n,r)||this}return e.extendKey="UserTaskModel",e})(lp);(function(t){dX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getNodeStyle();return Gt("svg",{x:r-o/2+5,y:i-a/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Gt("path",{fill:s.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.radius,l=n.getNodeStyle();return Gt("g",{},[Gt("rect",lS(lS({},l),{x:r-o/2,y:i-a/2,rx:s,ry:s,width:o,height:a})),this.getLabelShape()])},e.extendKey="UserTaskNode",e})(wf);var lWe=function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,function(e){var n=Math.random()*16|0,r=e==="x"?n:n&3|8;return r.toString(16)})},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t}(),uWe=(globalThis==null?void 0:globalThis._ids)||new lWe;function N6(){return uWe.next()}function fX(t){return Object.prototype.toString.call(t)}function cWe(t){return" ".repeat(t)}function uS(t){var e=t;return fX(t)==="[object Object]"?(e={},Object.keys(t).forEach(function(n){var r=n;n.charAt(0)==="-"&&(r=n.substring(1)),e[r]=uS(t[n])})):Array.isArray(t)&&(e=[],t.forEach(function(n,r){e[r]=uS(n)})),e}function dWe(t){var e=t;try{typeof e!="string"&&(e=JSON.parse(t))}catch{e=JSON.stringify(uS(t)).replace(/"/g,"'")}return e}var uh=`
  108. `;function I1(t,e,n){var r=cWe(n);if(t!==0&&t!==!1&&!t)return uh+r+"<".concat(e," />");var i="";if(e==="#text")return uh+r+t;if(e==="#cdata-section")return uh+r+"<![CDATA["+t+"]]>";if(e==="#comment")return uh+r+"<!--"+t+"-->";if("".concat(e).charAt(0)==="-")return" "+e.substring(1)+'="'+dWe(t)+'"';if(Array.isArray(t))t.forEach(function(l){i+=I1(l,e,n+1)});else if(fX(t)==="[object Object]"){var o=Object.keys(t),a="",s="";i+=(n===0?"":uh+r)+"<"+e,o.forEach(function(l){l.charAt(0)==="-"?a+=I1(t[l],l,n+1):s+=I1(t[l],l,n+1)}),i+=a+(s!==""?">".concat(s).concat(uh+r,"</").concat(e,">"):" />")}else i+=uh+r+"<".concat(e,">").concat(t.toString(),"</").concat(e,">");return i}function fWe(t){var e="";for(var n in t)e+=I1(t[n],n,0);return e}var Ra=function(){};Ra.ObjTree=function(){return this};Ra.ObjTree.VERSION="0.23";Ra.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
  109. `;Ra.ObjTree.prototype.attr_prefix="-";Ra.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e)return this.parseDOM(e)};Ra.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var i in e)r[i]=e[i];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var o=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=o.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};Ra.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!=11){var r={};r[t.nodeName]=n,n=r}return n}};Ra.ObjTree.prototype.parseElement=function(t){if(t.nodeType!=7){if(t.nodeType==3||t.nodeType==4||t.nodeType==8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,r={};if(t.attributes&&t.attributes.length){n={};for(var i=0;i<t.attributes.length;i++){var o=t.attributes[i].nodeName;if(typeof o=="string"){var a=t.attributes[i].nodeValue;try{a=JSON.parse(t.attributes[i].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[i].nodeValue}!a||(o=this.attr_prefix+o,typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}if(t.childNodes&&t.childNodes.length){var s=!0;n&&(s=!1);for(var i=0;i<t.childNodes.length&&s;i++){var l=t.childNodes[i].nodeType;l==3||l==4||l==8||(s=!1)}if(s){n||(n="");for(var i=0;i<t.childNodes.length;i++)n+=t.childNodes[i].nodeValue}else{n||(n={});for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes[i].nodeName;if(typeof o=="string"){var a=this.parseElement(t.childNodes[i]);!a||(typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}}else n===null&&(n={});return n}};Ra.ObjTree.prototype.addNode=function(t,e,n,r){this.__force_array[e]?(n==1&&(t[e]=[]),t[e][t[e].length]=r):n==1?t[e]=r:n==2?t[e]=[t[e],r]:t[e][t[e].length]=r};Ra.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};Ra.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],r=[];for(var i in e)if(!!e.hasOwnProperty(i)){var o=e[i];i.charAt(0)!=this.attr_prefix?typeof o=="undefined"||o==null?n[n.length]="<"+i+" />":typeof o=="object"&&o.constructor==Array?n[n.length]=this.array_to_xml(i,o):typeof o=="object"?n[n.length]=this.hash_to_xml(i,o):n[n.length]=this.scalar_to_xml(i,o):r[r.length]=" "+i.substring(1)+'="'+this.xml_escape(o)+'"'}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<"+t+a+`>
  110. `+s+"</"+t+`>
  111. `:s="<"+t+a+">"+s+"</"+t+`>
  112. `:s="<"+t+a+` />
  113. `),s};Ra.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r];typeof i=="undefined"||i==null?n[n.length]="<"+t+" />":typeof i=="object"&&i.constructor==Array?n[n.length]=this.array_to_xml(t,i):typeof i=="object"?n[n.length]=this.hash_to_xml(t,i):n[n.length]=this.scalar_to_xml(t,i)}return n.join("")};Ra.ObjTree.prototype.scalar_to_xml=function(t,e){return t=="#text"?this.xml_escape(e):"<"+t+">"+this.xml_escape(e)+"</"+t+`>
  114. `};Ra.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var hWe=function(t){return new Ra.ObjTree().parseXML(t)},pWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gA=globalThis&&globalThis.__assign||function(){return gA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},gA.apply(this,arguments)},bC=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},nc;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow"})(nc||(nc={}));var hX=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],D6=["properties","startPoint","endPoint","pointsList"];function L6(t){var e=t?D6.concat(t):D6;return function(n){function r(i){var o={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(a){return r(a)}):(Object.entries(i).forEach(function(a){var s=bC(a,2),l=s[0],u=s[1];typeof u!="object"?l.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(l)?o[l]=u:o["-".concat(l)]=u:e.includes(l)?o["-".concat(l)]=r(u):o[l]=r(u)}),o)}return r(n)}}function cS(t){var e={};return Object.entries(t).forEach(function(n){var r=bC(n,2),i=r[0],o=r[1];i.indexOf("-")===0?e[i.substring(1)]=uS(o):typeof o=="string"?e[i]=o:Object.prototype.toString.call(o)==="[object Object]"?e[i]=cS(o):Array.isArray(o)?e[i]=o.map(function(a){return cS(a)}):e[i]=o}),e}function gWe(t,e,n){var r=new Map;e.nodes.forEach(function(o){var a,s={"-id":o.id};if(!((a=o.text)===null||a===void 0)&&a.value&&(s["-name"]=o.text.value),o.properties){var l=L6(n)(o.properties);Object.assign(s,l)}r.set(o.id,s),t[o.type]?Array.isArray(t[o.type])?t[o.type].push(s):t[o.type]=[t[o.type],s]:t[o.type]=s});var i=e.edges.map(function(o){var a,s,l=r.get(o.targetNodeId);l["bpmn:incoming"]?Array.isArray(l["bpmn:incoming"])?l["bpmn:incoming"].push(o.id):l["bpmn:incoming"]=[l["bpmn:incoming"],o.id]:l["bpmn:incoming"]=o.id;var u={"-id":o.id,"-sourceRef":o.sourceNodeId,"-targetRef":o.targetNodeId};if(!((a=o.text)===null||a===void 0)&&a.value&&(u["-name"]=(s=o.text)===null||s===void 0?void 0:s.value),o.properties){var c=L6(n)(o.properties);Object.assign(u,c)}return u});e.edges.forEach(function(o){var a=r.get(o.sourceNodeId);a["bpmn:outgoing"]?Array.isArray(a["bpmn:outgoing"])?a["bpmn:outgoing"].push(o.id):a["bpmn:outgoing"]=[a["bpmn:outgoing"],o.id]:a["bpmn:outgoing"]=o.id}),t[nc.FLOW]=i}function mWe(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var r,i=n.id,o=n.pointsList.map(function(s){var l=s.x,u=s.y;return{"-x":l,"-y":u}}),a={"-id":"".concat(i,"_di"),"-bpmnElement":i,"di:waypoint":o};return!((r=n.text)===null||r===void 0)&&r.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var r,i=n.id,o=100,a=80,s=n.x,l=n.y,u=Qf.shapeConfigMap.get(n.type);u&&(o=u.width,a=u.height),s-=o/2,l-=a/2;var c={"-id":"".concat(i,"_di"),"-bpmnElement":i,"dc:Bounds":{"-x":s,"-y":l,"-width":o,"-height":a}};return!((r=n.text)===null||r===void 0)&&r.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c})}function vWe(t){var e=[],n=[],r=t["bpmn:definitions"];if(r){var i=r["bpmn:process"];Object.keys(i).forEach(function(o){if(o.indexOf("bpmn:")===0){var a=i[o];if(o===nc.FLOW){var s=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];n=bWe(a,s)}else{var l=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];e=e.concat(yWe(a,l,o))}}})}return{nodes:e,edges:n}}function yWe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=I6(s,n,a);r.push(l)});else{var i=void 0;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):i=e;var o=I6(i,n,t);r.push(o)}return r}function I6(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),i=Number(t["dc:Bounds"]["-y"]),o=n["-name"],a=Qf.shapeConfigMap.get(e);a&&(r+=a.width/2,i+=a.height/2);var s;Object.entries(n).forEach(function(d){var f=bC(d,2),h=f[0],m=f[1];hX.indexOf(h)===-1&&(s||(s={}),s[h]=m)}),s&&(s=cS(s));var l;if(o&&(l={x:r,y:i,value:o},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var u=t["bpmndi:BPMNLabel"]["dc:Bounds"];l.x=Number(u["-x"])+Number(u["-width"])/2,l.y=Number(u["-y"])+Number(u["-height"])/2}var c={id:t["-bpmnElement"],type:e,x:r,y:i,properties:s};return l&&(c.text=l),c}function bWe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(i){var o;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===i["-id"]}):o=e,n.push(B6(o,i))});else{var r=void 0;Array.isArray(e)?r=e.find(function(i){return i["-bpmnElement"]===t["-id"]}):r=e,n.push(B6(r,t))}return n}function B6(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var i=t["bpmndi:BPMNLabel"]["dc:Bounds"],o=0;r.split(`
  115. `).forEach(function(l){o<l.length&&(o=l.length)}),n={value:r,x:Number(i["-x"])+o*10/2,y:Number(i["-y"])+7}}var a;Object.entries(e).forEach(function(l){var u=bC(l,2),c=u[0],d=u[1];hX.indexOf(c)===-1&&(a||(a={}),a[c]=d)}),a&&(a=cS(a));var s={id:e["-id"],type:nc.FLOW,pointsList:t["di:waypoint"].map(function(l){return{x:Number(l["-x"]),y:Number(l["-y"])}}),sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:a};return n&&(s.text=n),s}var Qf=function(){function t(e){var n=e.lf,r=this;this.adapterOut=function(i,o){var a=gA({},r.processAttributes);gWe(a,i,o);var s={"-id":"BPMNPlane_1","-bpmnElement":a["-id"]};mWe(s,i);var l=r.definitionAttributes;l["bpmn:process"]=a,l["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":s};var u={"bpmn:definitions":l};return u},this.adapterIn=function(i){if(i)return vWe(i)},n.adapterIn=function(i){return r.adapterIn(i)},n.adapterOut=function(i,o){return r.adapterOut(i,o)},this.processAttributes={"-isExecutable":"true","-id":"Process_".concat(N6())},this.definitionAttributes={"-id":"Definitions_".concat(N6()),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t}();Qf.shapeConfigMap.set(nc.START,{width:P6.width,height:P6.height});Qf.shapeConfigMap.set(nc.END,{width:A6.width,height:A6.height});Qf.shapeConfigMap.set(nc.GATEWAY,{width:M6.width,height:M6.height});Qf.shapeConfigMap.set(nc.SYSTEM,{width:R6.width,height:R6.height});Qf.shapeConfigMap.set(nc.USER,{width:$6.width,height:$6.height});(function(t){pWe(e,t);function e(n){var r=t.call(this,n)||this;r.adapterXmlIn=function(o){var a=hWe(o);return r.adapterIn(a)},r.adapterXmlOut=function(o,a){var s=r.adapterOut(o,a);return fWe(s)};var i=n.lf;return i.adapterIn=r.adapterXmlIn,i.adapterOut=r.adapterXmlOut,r}return e.pluginName="bpmnXmlAdapter",e})(Qf);var _We=function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){var e="xxxxxxx".replace(/[x]/g,function(n){var r=Math.random()*16|0,i=n==="x"?r:r&3|8;return i.toString(16)});return e},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t}(),OWe=(globalThis==null?void 0:globalThis._ids)||new _We;function wWe(){return OWe.next()}globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var F6=globalThis&&globalThis.__assign||function(){return F6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},F6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var V6=globalThis&&globalThis.__assign||function(){return V6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},V6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var j6=globalThis&&globalThis.__assign||function(){return j6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},j6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var z6=globalThis&&globalThis.__assign||function(){return z6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},z6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Q6=globalThis&&globalThis.__assign||function(){return Q6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Q6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;Gt("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),Gt("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(180,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(210,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(240,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(270,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(300,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Gt("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(330,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"});Gt("circle",{cx:18,cy:18,r:10,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 4px; fill: rgb(34, 36, 42);"});Gt("circle",{cx:25,cy:25,r:13,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2.5px; fill: white;"});globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var H6=globalThis&&globalThis.__assign||function(){return H6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},H6.apply(this,arguments)};globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var W6=globalThis&&globalThis.__assign||function(){return W6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},W6.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var SWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xh=globalThis&&globalThis.__assign||function(){return xh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xh.apply(this,arguments)},xWe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},CWe=kl,EWe=function(t){SWe(e,t);function e(n){var r=t.call(this)||this;return r.updatePosition=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.x,u=s.y;r.nodeModel.x=l+o/2,r.nodeModel.y=u+a/2,r.nodeModel.moveText(o/2,a/2)},r.getResize=function(i){var o=i.index,a=i.deltaX,s=i.deltaY,l=i.width,u=i.height,c=i.PCTResizeInfo,d=i.pct,f=d===void 0?1:d,h=i.freezeWidth,m=h===void 0?!1:h,g=i.freezeHeight,y=g===void 0?!1:g,b={width:l,height:u,deltaX:a,deltaY:s};if(c){var w=4,O=0,S=0;switch(o){case 0:S=(a*-1-s)/w;break;case 1:S=(a-s)/w;break;case 2:S=(a+s)/w;break;case 3:S=(a*-1+s)/w;break}S!==0&&(O=Math.round(S/c.ResizeBasis.basisHeight*1e5)/1e3),c.ResizePCT.widthPCT=Math.max(Math.min(c.ResizePCT.widthPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit),c.ResizePCT.heightPCT=Math.max(Math.min(c.ResizePCT.heightPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit);var x=Math.round(c.ResizePCT.widthPCT*c.ResizeBasis.basisWidth/100),C=Math.round(c.ResizePCT.heightPCT*c.ResizeBasis.basisHeight/100);switch(o){case 0:a=l-x,s=u-C;break;case 1:a=x-l,s=u-C;break;case 2:a=x-l,s=C-u;break;case 3:a=l-x,s=C-u;break}return b.width=x,b.height=C,b.deltaX=a/f,b.deltaY=s/f,b}switch(o){case 0:b.width=m?l:l-a*f,b.height=y?u:u-s*f;break;case 1:b.width=m?l:l+a*f,b.height=y?u:u-s*f;break;case 2:b.width=m?l:l+a*f,b.height=y?u:u+s*f;break;case 3:b.width=m?l:l-a*f,b.height=y?u:u+s*f;break}return b},r.updateEdgePointByAnchors=function(){var i=r.nodeModel,o=i.id,a=i.anchors,s=r.getNodeEdges(o);s.sourceEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.sourceAnchorId});u&&l.updateStartPoint({x:u.x,y:u.y})}),s.targetEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.targetAnchorId});u&&l.updateEndPoint({x:u.x,y:u.y})})},r.updateRect=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.x,u=s.y,c=s.width,d=s.height,f=s.radius,h=s.PCTResizeInfo,m=r.nodeModel,g=m.minWidth,y=m.minHeight,b=m.maxWidth,w=m.maxHeight,O=r.index,S=g===b,x=y===w,C=r.getResize({index:O,deltaX:o,deltaY:a,width:c,height:d,PCTResizeInfo:h,pct:1,freezeWidth:S,freezeHeight:x});if(C.width<g||C.width>b||C.height<y||C.height>w){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:S?0:C.deltaX,deltaY:x?0:C.deltaY}),r.nodeModel.width=C.width,r.nodeModel.height=C.height,r.nodeModel.setProperties({nodeSize:{width:C.width,height:C.height}});var E={x:l,y:u,width:c,height:d,radius:f},T={x:r.nodeModel.x,y:r.nodeModel.y,width:r.nodeModel.width,height:r.nodeModel.height,radius:f};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:E,afterNode:T})},r.updateEllipse=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,m=r.nodeModel,g=m.minWidth,y=m.minHeight,b=m.maxWidth,w=m.maxHeight,O=g===b,S=y===w,x=l,C=u,E=r.getResize({index:h,deltaX:o,deltaY:a,width:x,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:S});if(E.width<g/2||E.width>b/2||E.height<y/2||E.height>w/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:S?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d},P={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:xh(xh({},T),{rx:l,ry:u}),afterNode:P})},r.updateDiamond=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,m=r.nodeModel,g=m.minWidth,y=m.minHeight,b=m.maxWidth,w=m.maxHeight,O=g===b,S=y===w,x=l,C=u,E=r.getResize({index:h,deltaX:o,deltaY:a,width:x,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:S});if(E.width<g/2||E.width>b/2||E.height<y/2||E.height>w/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:S?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d,rx:l,ry:u},P={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:T,afterNode:P})},r.eventEmit=function(i){var o=i.deltaX,a=i.deltaY,s=i.beforeNode,l=i.afterNode,u=r.nodeModel,c=u.id,d=u.modelType,f=u.type,h=xh({id:c,modelType:d,type:f},s),m=xh({id:c,modelType:d,type:f},l);r.graphModel.eventCenter.emit("node:resize",{preData:h,data:m,deltaX:o,deltaY:a,index:r.index,model:r.nodeModel})},r.onDragging=function(i){var o,a=i.deltaX,s=i.deltaY,l=r.graphModel.transformModel,u=r.nodeModel.modelType;o=xWe(l.fixDeltaXY(a,s),2),a=o[0],s=o[1],u===Kn.RECT_NODE||u===Kn.HTML_NODE?r.updateRect({deltaX:a,deltaY:s}):u===Kn.ELLIPSE_NODE?r.updateEllipse({deltaX:a,deltaY:s}):u===Kn.DIAMOND_NODE&&r.updateDiamond({deltaX:a,deltaY:s})},r.onDragEnd=function(){var i=r.graphModel.gridSize,o=i===void 0?1:i,a=o*Math.round(r.nodeModel.x/o),s=o*Math.round(r.nodeModel.y/o);r.nodeModel.moveTo(a,s),r.updateEdgePointByAnchors()},r.index=n.index,r.nodeModel=n.model,r.graphModel=n.graphModel,r.dragHandler=new CWe({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:1}),r}return e.prototype.getNodeEdges=function(n){for(var r=this.graphModel,i=r.edges,o=[],a=[],s=0;s<i.length;s++){var l=i[s];l.sourceNodeId===n?o.push(l):i[s].targetNodeId===n&&a.push(l)}return{sourceEdges:o,targetEdges:a}},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.index,a=n.model,s=a.getControlPointStyle();return rt("g",{className:"lf-resize-control-".concat(o),children:rt(al,xh({className:"lf-node-control",x:r,y:i},s,{onMouseDown:this.dragHandler.handleMouseDown}))})},e}(ur),TWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),dS=globalThis&&globalThis.__assign||function(){return dS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},dS.apply(this,arguments)},_C=function(t){TWe(e,t);function e(){var n=t.call(this)||this;return n.state={},n}return e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=r.x,a=r.y,s=r.width,l=r.height,u={minX:o-s/2,minY:a-l/2,maxX:o+s/2,maxY:a+l/2},c=u.minX,d=u.minY,f=u.maxX,h=u.maxY,m=[{x:c,y:d},{x:f,y:d},{x:f,y:h},{x:c,y:h}];return m.map(function(g,y){return rt(EWe,dS({index:y},g,{model:r,graphModel:i}))})},e.prototype.getGroupSolid=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getResizeOutlineStyle();return rt(al,dS({},s,{x:r,y:i,width:o,height:a}))},e.prototype.render=function(){return rt("g",{className:"lf-resize-control",children:[this.getGroupSolid(),this.getResizeControl()]})},e}(ur),pX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){pX(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.rx=o.rx,i.ry=o.ry),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},o={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e})(YP);(function(t){pX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(_C,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){return t.prototype.getShape.call(this)},e.prototype.getShape=function(){var n=this.props,r=n.model,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r.isSelected&&!i?this.getControlGroup():""]})},e})(oA);var gX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mA=globalThis&&globalThis.__assign||function(){return mA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},mA.apply(this,arguments)};(function(t){gX(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.rx=o.rx,i.ry=o.ry),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},o={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e})(qP);(function(t){gX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(_C,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){var n=this.props.model,r=n.points,i=n.getNodeStyle();return rt("g",{children:rt(HN,mA({},i,{points:r}))})},e.prototype.getShape=function(){var n=this.props,r=n.model.isSelected,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r&&!i?this.getControlGroup():""]})},e})(rA);var mX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){mX(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.width=o.width,i.height=o.height),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.width,basisHeight:this.height},o={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e})(XP);(function(t){mX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(_C,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){return t.prototype.getShape.call(this)},e.prototype.getShape=function(){var n=this.props,r=n.model.isSelected,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r&&!i?this.getControlGroup():""]})},e})(sA);var vX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),kWe=function(t){vX(e,t);function e(n,r){var i=t.call(this,n,r)||this,o=n.properties.nodeSize;return o&&(i.width=o.width,i.height=o.height),i}return e.prototype.initNodeData=function(n){t.prototype.initNodeData.call(this,n),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},e.prototype.getOutlineStyle=function(){var n=t.prototype.getOutlineStyle.call(this),r=this.graphModel.editConfigModel.isSilentMode;return r||(n.stroke="none",n.hover&&(n.hover.stroke="none")),n},e.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},e.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},e.prototype.enableProportionResize=function(n){if(n===void 0&&(n=!0),n){var r={widthPCT:100,heightPCT:100},i={basisWidth:this.width,basisHeight:this.height},o={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:r,ResizeBasis:i,ScaleLimit:o}}else delete this.PCTResizeInfo},e}(lp),PWe=function(t){vX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props,r=n.model,i=n.graphModel;return rt(_C,{model:r,graphModel:i})},e.prototype.getResizeShape=function(){return t.prototype.getShape.call(this)},e.prototype.getShape=function(){var n=this.props,r=n.model.isSelected,i=n.graphModel.editConfigModel.isSilentMode;return rt("g",{children:[this.getResizeShape(),r&&!i?this.getControlGroup():""]})},e}(wf),yX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fS=globalThis&&globalThis.__assign||function(){return fS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},fS.apply(this,arguments)},ch=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},dh=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},U6=500,q6=300,AWe=-1e4;(function(t){yX(e,t);function e(){var n=t.apply(this,dh([],ch(arguments),!1))||this;return n.isGroup=!0,n.isFolded=!1,n.unfoldedWidth=U6,n.unfoldedHeight=q6,n.childrenLastFoldStatus={},n}return e.prototype.initNodeData=function(n){var r=this;t.prototype.initNodeData.call(this,n);var i=[];Qn(n.children)&&(i=n.children),this.children=new Set(i),this.width=U6,this.height=q6,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=AWe,this.radius=0,this.text.editable=!1,this.text.draggable=!1,this.isRestrict=!1,this.resizable=!1,this.autoToFront=!1,this.foldable=!1,this.properties.isFolded===void 0&&(this.properties.isFolded=!1),this.isFolded=!!this.properties.isFolded,setTimeout(function(){r.isFolded&&r.foldGroup(r.isFolded)})},e.prototype.getResizeOutlineStyle=function(){var n=t.prototype.getResizeOutlineStyle.call(this);return n.stroke="none",n},e.prototype.foldGroup=function(n){var r=this;if(n!==this.isFolded){this.setProperty("isFolded",n),this.isFolded=n,n?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHeight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHeight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=dh(dh([],ch(this.incoming.edges),!1),ch(this.outgoing.edges),!1);this.children.forEach(function(o){var a=r.graphModel.getElement(o);if(a){var s=a.isFolded;if(a.isGroup&&!a.isFolded&&a.foldGroup(n),a.isGroup&&!n){var l=r.childrenLastFoldStatus[o];l!==void 0&&l!==a.isFolded&&a.foldGroup(l)}r.childrenLastFoldStatus[o]=!!s,a.visible=!n;var u=a.incoming.edges,c=a.outgoing.edges;i=dh(dh(dh([],ch(i),!1),ch(u),!1),ch(c),!1)}}),this.foldEdge(n,i)}},e.prototype.getAnchorStyle=function(n){var r=t.prototype.getAnchorStyle.call(this,n);return r.stroke="transparent",r.fill="transparent",r.hover.fill="transparent",r.hover.stroke="transparent",r},e.prototype.foldEdge=function(n,r){var i=this;r.forEach(function(o,a){var s=o.id,l=o.sourceNodeId,u=o.targetNodeId,c=o.startPoint,d=o.endPoint,f=o.type,h=o.text,m=o.getProperties(),g={id:"".concat(s,"__").concat(a),sourceNodeId:l,targetNodeId:u,startPoint:c,endPoint:d,type:f,properties:m,text:h==null?void 0:h.value};o.virtual&&i.graphModel.deleteEdgeById(o.id);var y=i.graphModel.group.getNodeGroup(u);y||(y=i.graphModel.getNodeModelById(u));var b=i.graphModel.group.getNodeGroup(l);b||(b=i.graphModel.getNodeModelById(l)),n&&o.visible!==!1&&(i.children.has(l)||i.id===l?(g.startPoint=void 0,g.sourceNodeId=i.id):(g.endPoint=void 0,g.targetNodeId=i.id),(y.id!==i.id||b.id!==i.id)&&i.createVirtualEdge(g),o.visible=!1),!n&&o.visible===!1&&(y&&y.isGroup&&y.isFolded?(g.targetNodeId=y.id,g.endPoint=void 0,i.createVirtualEdge(g)):b&&b.isGroup&&b.isFolded?(g.sourceNodeId=b.id,g.startPoint=void 0,i.createVirtualEdge(g)):o.visible=!0)})},e.prototype.createVirtualEdge=function(n){n.pointsList=void 0;var r=this.graphModel.addEdge(n);r.virtual=!0,r.text.editable=!1,r.isFoldedEdge=!0},e.prototype.isInRange=function(n){var r=n.minX,i=n.minY,o=n.maxX,a=n.maxY;return r>=this.x-this.width/2&&o<=this.x+this.width/2&&i>=this.y-this.height/2&&a<=this.y+this.height/2},e.prototype.isAllowMoveTo=function(n){var r=n.minX,i=n.minY,o=n.maxX,a=n.maxY;return{x:r>=this.x-this.width/2&&o<=this.x+this.width/2,y:i>=this.y-this.height/2&&a<=this.y+this.height/2}},e.prototype.setAllowAppendChild=function(n){this.setProperty("groupAddable",n)},e.prototype.addChild=function(n){this.children.add(n),this.graphModel.eventCenter.emit("group:add-node",{data:this.getData()})},e.prototype.removeChild=function(n){this.children.delete(n),this.graphModel.eventCenter.emit("group:remove-node",{data:this.getData()})},e.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},e.prototype.getData=function(){var n=this,r=t.prototype.getData.call(this);r.children=[],console.log("this.children",this.children),this.children.forEach(function(o){var a=n.graphModel.getNodeModelById(o);a&&!a.virtual&&r.children.push(o)});var i=r.properties;return i==null||delete i.groupAddable,i==null||delete i.isFolded,r},e.prototype.getHistoryData=function(){var n=t.prototype.getData.call(this);n.children=dh([],ch(this.children),!1),n.isGroup=!0;var r=n.properties;return r==null||delete r.groupAddable,r!=null&&r.isFolded&&(n.x=n.x+this.unfoldedWidth/2-this.foldedWidth/2,n.y=n.y+this.unfoldedHeight/2-this.foldedHeight/2),n},e.prototype.isAllowAppendIn=function(n){return console.info("_nodeData",n),!0},e.prototype.toBack=function(){this.zIndex--},e})(kWe);(function(t){yX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props.model,r=n.resizable,i=n.properties;return r&&!i.isFolded?t.prototype.getControlGroup.call(this):null},e.prototype.getAddableShape=function(){var n=this.props.model,r=n.width,i=n.height,o=n.x,a=n.y,s=n.radius,l=n.properties,u=n.getAddableOutlineStyle;if(!l.groupAddable)return null;var c=this.props.model.getNodeStyle().strokeWidth,d=c===void 0?0:c,f=u(),h=r+d+8,m=i+d+8;return Gt("rect",fS(fS({},f),{width:h,height:m,x:o-h/2,y:a-m/2,rx:s,ry:s}))},e.prototype.getFoldIcon=function(){var n=this.props.model,r=n.x-n.width/2+5,i=n.y-n.height/2+5;if(!n.foldable)return null;var o=Gt("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:n.properties.isFolded?"M ".concat(r+3,",").concat(i+6," ").concat(r+11,",").concat(i+6," M").concat(r+7,",").concat(i+2," ").concat(r+7,",").concat(i+10):"M ".concat(r+3,",").concat(i+6," ").concat(r+11,",").concat(i+6," ")});return Gt("g",{},[Gt("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:n.x-n.width/2+5,y:n.y-n.height/2+5,onClick:function(){n.foldGroup(!n.properties.isFolded)}}),o])},e.prototype.getResizeShape=function(){return Gt("g",{},[this.getAddableShape(),t.prototype.getResizeShape.call(this),this.getFoldIcon()])},e})(PWe);var Y6=globalThis&&globalThis.__assign||function(){return Y6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Y6.apply(this,arguments)};globalThis&&globalThis.__rest;globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var X6=globalThis&&globalThis.__assign||function(){return X6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},X6.apply(this,arguments)};globalThis&&globalThis.__values;var Z6=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jy=globalThis&&globalThis.__assign||function(){return jy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jy.apply(this,arguments)};function MWe(t){var e=function(r){Z6(i,r);function i(o,a){o.id||(o.id="Flow_".concat(wWe()));var s=jy(jy(jy({},t||{}),o.properties),{isDefaultFlow:!1});return o.properties=s,r.call(this,o,a)||this}return i.extendKey="SequenceFlowModel",i}(B0),n=function(r){Z6(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i.prototype.getStartArrow=function(){var o=this.props.model,a=o.properties.isDefaultFlow;return a?Gt("path",{refX:15,stroke:"#000000",strokeWidth:2,d:"M 20 5 10 -5 z"}):Gt("path",{d:""})},i.extendKey="SequenceFlowEdge",i}(V0);return{type:"bpmn:sequenceFlow",view:n,model:e}}MWe();globalThis&&globalThis.__read;var G6={width:40,height:40},K6={width:40,height:40},J6={width:100,height:80},hS={width:100,height:80},eF={width:100,height:80},tF={width:100,height:80},nF={width:100,height:80},rF={width:100,height:80},iF={width:100,height:80},oF={width:100,height:80},$a=function(){};$a.ObjTree=function(){return this};$a.ObjTree.VERSION="0.23";$a.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
  116. `;$a.ObjTree.prototype.attr_prefix="-";$a.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e){var i=this.parseDOM(e);return i}};$a.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var i in e)r[i]=e[i];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var o=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=o.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};$a.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!==11){var r={};r[t.nodeName]=n,n=r}return n}};$a.ObjTree.prototype.parseElement=function(t){if(t.nodeType!==7){if(t.nodeType===3||t.nodeType===4||t.nodeType===8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,r={};if(t.attributes&&t.attributes.length){n={};for(var i=0;i<t.attributes.length;i++){var o=t.attributes[i].nodeName;if(typeof o=="string"){var a=t.attributes[i].nodeValue;try{a=JSON.parse(t.attributes[i].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[i].nodeValue}a!=null&&(o=this.attr_prefix+o,typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}if(t.childNodes&&t.childNodes.length){var s=!0;n&&(s=!1);for(var i=0;i<t.childNodes.length&&s;i++){var l=t.childNodes[i].nodeType;l===3||l===4||l===8||(s=!1)}if(s){n||(n="");for(var i=0;i<t.childNodes.length;i++)n+=t.childNodes[i].nodeValue}else{n||(n={});for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes[i].nodeName;if(typeof o=="string"){var a=this.parseElement(t.childNodes[i]);!a||(typeof r[o]=="undefined"&&(r[o]=0),r[o]++,this.addNode(n,o,r[o],a))}}}}else n===null&&(n={});return n}};$a.ObjTree.prototype.addNode=function(t,e,n,r){this.__force_array[e]?(n===1&&(t[e]=[]),t[e][t[e].length]=r):n===1?t[e]=r:n===2?t[e]=[t[e],r]:t[e][t[e].length]=r};$a.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};$a.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],r=[];for(var i in e)if(!!qg(e,i)){var o=e[i];i.charAt(0)!==this.attr_prefix?typeof o=="undefined"||o==null?n[n.length]="<".concat(i," />"):typeof o=="object"&&o.constructor===Array?n[n.length]=this.array_to_xml(i,o):typeof o=="object"?n[n.length]=this.hash_to_xml(i,o):n[n.length]=this.scalar_to_xml(i,o):r[r.length]=" ".concat(i.substring(1),'="').concat(this.xml_escape(o),'"')}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<".concat(t).concat(a,`>
  117. `).concat(s,"</").concat(t,`>
  118. `):s="<".concat(t).concat(a,">").concat(s,"</").concat(t,`>
  119. `):s="<".concat(t).concat(a,` />
  120. `)),s};$a.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r];typeof i=="undefined"||i==null?n[n.length]="<".concat(t," />"):typeof i=="object"&&i.constructor===Array?n[n.length]=this.array_to_xml(t,i):typeof i=="object"?n[n.length]=this.hash_to_xml(t,i):n[n.length]=this.scalar_to_xml(t,i)}return n.join("")};$a.ObjTree.prototype.scalar_to_xml=function(t,e){return t==="#text"?this.xml_escape(e):"<".concat(t,">").concat(this.xml_escape(e),"</").concat(t,`>
  121. `)};$a.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var RWe=function(t){return new $a.ObjTree().parseXML(t)};function bX(t){return Object.prototype.toString.call(t)}function aF(t){return" ".repeat(t)}function pS(t){return bX(t)==="[object Object]"?Object.keys(t).reduce(function(e,n){var r=n;return n.charAt(0)==="-"&&(r=n.substring(1)),e[r]=pS(t[n]),e},{}):Array.isArray(t)?t.map(function(e){return pS(e)}):t}function $We(t){var e=t;try{typeof e!="string"&&(e=JSON.parse(t))}catch{e=JSON.stringify(pS(t)).replace(/"/g,"'")}return e}var sF=`
  122. `;function B1(t,e,n){var r=aF(n),i="",o=sF+r;if(e==="-json")return"";if(e==="#text")return o+t;if(e==="#cdata-section")return"".concat(o,"<![CDATA[").concat(t,"]]>");if(e==="#comment")return"".concat(o,"<!--").concat(t,"-->");if("".concat(e).charAt(0)==="-")return" ".concat(e.substring(1),'="').concat($We(t),'"');if(Array.isArray(t))i+=t.map(function(u){return B1(u,e,n+1)}).join("");else if(bX(t)==="[object Object]"){var a=Object.keys(t),s="",l=t["-json"]?sF+aF(n+1)+t["-json"]:"";i+="".concat(n===0?"":o,"<").concat(e),a.forEach(function(u){u.charAt(0)==="-"?s+=B1(t[u],u,n+1):l+=B1(t[u],u,n+1)}),i+=s+(l!==""?">".concat(l).concat(o,"</").concat(e,">"):" />")}else i+="".concat(o,"<").concat(e,">").concat(t.toString(),"</").concat(e,">");return i}function NWe(t){var e="";for(var n in t)e+=B1(t[n],n,0);return e}var DWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vA=globalThis&&globalThis.__assign||function(){return vA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},vA.apply(this,arguments)},lF=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},qN=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ko=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Wl=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Ta;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",t.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",t.BOUNDARY="bpmn:boundaryEvent",t.PARALLEL_GATEWAY="bpmn:parallelGateway",t.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",t.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow",t.SUBPROCESS="bpmn:subProcess"})(Ta||(Ta={}));var _X=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],LWe=["properties","startPoint","endPoint","pointsList"],gS={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},OX=function(t,e){var n=Object.keys(e||{});return n.forEach(function(r){if(t[r]){var i=e[r],o=i.in,a=i.out;o&&(t[r].in=o),a&&(t[r].out=a)}else t[r]=e[r]}),t},nl={"bpmn:startEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=nl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateCatchEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=nl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateThrowEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=nl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:boundaryEvent":{out:function(t){var e,n,r=t.properties;return((n=(e=nl[r.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:sequenceFlow":{out:function(t){var e=t.properties,n=e.expressionType,r=e.condition;return r?n==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'.concat(r,"}]]></bpmn:conditionExpression>")}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'.concat(r,"</bpmn:conditionExpression>")}:{json:""}}},"bpmn:timerEventDefinition":{out:function(t){var e=t.properties,n=e.timerType,r=e.timerValue,i=e.definitionId,o=function(){return"<bpmn:".concat(n,' xsi:type="bpmn:tFormalExpression">').concat(r,"</bpmn:").concat(n,">")};return{json:'<bpmn:timerEventDefinition id="'.concat(i,'"').concat(n&&r?">".concat(o(),"</bpmn:timerEventDefinition>"):"/>")}},in:function(t,e){var n,r,i,o,a=t,s=e["-id"],l="",u="";try{for(var c=qN(Object.keys(e)),d=c.next();!d.done;d=c.next()){var f=d.value;f.includes("bpmn:")&&(i=Ko(f.split(":"),2),l=i[1],u=(o=e[f])===null||o===void 0?void 0:o["#text"])}}catch(h){n={error:h}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return{"-definitionId":s,"-definitionType":a,"-timerType":l,"-timerValue":u}}},"bpmn:conditionExpression":{in:function(t,e){var n,r="",i="";return e["#cdata-section"]?(i="cdata",r=((n=/^\$\{(.*)\}$/g.exec(e["#cdata-section"]))===null||n===void 0?void 0:n[1])||""):e["#text"]&&(i="normal",r=e["#text"]),{"-condition":r,"-expressionType":i}}}};function IWe(t){var e=t!=null?t:{},n=e.retainedAttrsFields,r=e.excludeFields,i=e.transformer,o=new Set(Wl(Wl([],Ko(LWe),!1),Ko(n||[]),!1)),a={in:new Set(Wl(Wl([],Ko(gS.in),!1),Ko((r==null?void 0:r.in)||[]),!1)),out:new Set(Wl(Wl([],Ko(gS.out),!1),Ko((r==null?void 0:r.out)||[]),!1))};return nl=OX(nl,i),function(s){var l=s.nodes,u=s.edges;function c(d,f){var h,m;if((d==null?void 0:d.flag)!==1){var g;if((g=nl[d.type])&&g.out){var y=g.out(d),b=Object.keys(y);b.length>0&&b.forEach(function(P){d[P]=y[P]})}d!=null&&d.children&&(d.children=d.children.map(function(P){var A=l.find(function(D){return D.id===P})||u.find(function(D){return D.id===P});return A||{}}));var w={};if(typeof d=="string")return d;if(Array.isArray(d))return d.map(function(P){return c(P,"")}).filter(function(P){return P!=null});try{for(var O=qN(Object.entries(d)),S=O.next();!S.done;S=O.next()){var x=Ko(S.value,2),C=x[0],E=x[1];if((E==null?void 0:E.flag)===1)return;var T=[f,C].filter(function(P){return P}).join(".");a.out.has(T)||(typeof E!="object"?C.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(C)?w[C]=E:w["-".concat(C)]=E:o.has(T)?w["-".concat(C)]=c(E,T):w[C]=c(E,T))}}catch(P){h={error:P}}finally{try{S&&!S.done&&(m=O.return)&&m.call(O)}finally{if(h)throw h.error}}return w}}return c(s,"")}}function mS(t){var e,n,r={};try{for(var i=qN(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=Ko(o.value,2),s=a[0],l=a[1];s.indexOf("-")===0?r[s.substring(1)]=pS(l):typeof l=="string"?r[s]=l:Object.prototype.toString.call(l)==="[object Object]"?r[s]=mS(l):Array.isArray(l)?r[s]=l.map(function(u){return mS(u)}):r[s]=l}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function BWe(t,e,n){var r,i=new Map,o=IWe(n)(e);o.nodes.forEach(function(s){var l=s["-id"],u=s["-type"],c=s.text,d=s.children,f=lF(s,["-id","-type","text","children"]),h={"-id":l};c!=null&&c["-value"]&&(h["-name"]=c["-value"]),f["-json"]&&(h["-json"]=f["-json"]),f["-properties"]&&Object.assign(h,f["-properties"]),d&&(h.children=d),t[u]||(t[u]=[]),t[u].push(h),i.set(l,h)});var a=o.edges.map(function(s){var l=s["-id"],u=s["-sourceNodeId"],c=s["-targetNodeId"],d=s.text,f=lF(s,["-id","-sourceNodeId","-targetNodeId","text"]),h=i.get(c);h["bpmn:incoming"]||(h["bpmn:incoming"]=[]),h["bpmn:incoming"].push(l);var m={"-id":l,"-sourceRef":u,"-targetRef":c};return d!=null&&d["-value"]&&(m["-name"]=d["-value"]),f["-json"]&&(m["-json"]=f["-json"]),f["-properties"]&&Object.assign(m,f["-properties"]),m});return e.edges.forEach(function(s){var l=s.sourceNodeId,u=s.id,c=i.get(l);c["bpmn:outgoing"]||(c["bpmn:outgoing"]=[]),c["bpmn:outgoing"].push(u)}),(r=t["bpmn:subProcess"])===null||r===void 0||r.forEach(function(s){var l={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},u=[];s.children.forEach(function(g){var y,b=i.get(g["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(O){b[O]&&b[O].forEach(function(S){l[O].add(S)})});var w=(y=t[g["-type"]])===null||y===void 0?void 0:y.findIndex(function(O){return O["-id"]===g["-id"]});w>=0&&t[g["-type"]].splice(w,1),i.delete(g["-id"]),s[g["-type"]]||(s[g["-type"]]=[]),s[g["-type"]].push(b)});var c=l["bpmn:incoming"],d=l["bpmn:outgoing"];d.forEach(function(g){c.has(g)&&u.push(g)});for(var f=function(g){var y=a.findIndex(function(b){return b["-id"]===u[g]});y>=0?(s["bpmn:sequenceFlow"]||(s["bpmn:sequenceFlow"]=[]),s["bpmn:sequenceFlow"].push(a[y]),a.splice(y,1)):g++,h=g},h,m=0;m<u.length;)f(m),m=h;delete s.children}),t[Ta.FLOW]=a,t}function FWe(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var r,i=n.id,o=n.pointsList.map(function(s){var l=s.x,u=s.y;return{"-x":l,"-y":u}}),a={"-id":"".concat(i,"_di"),"-bpmnElement":i,"di:waypoint":o};return!((r=n.text)===null||r===void 0)&&r.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var r,i=n.id,o=100,a=80,s=n.x,l=n.y,u=us.shapeConfigMap.get(n.type);u&&(o=u.width,a=u.height),s-=o/2,l-=a/2;var c={"-id":"".concat(i,"_di"),"-bpmnElement":i,"dc:Bounds":{"-x":s,"-y":l,"-width":o,"-height":a}};return!((r=n.text)===null||r===void 0)&&r.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c})}var VWe=["bpmn:incoming","bpmn:outgoing"];function jWe(t,e){var n=[],r=[],i=new Map,o=e!=null?e:{},a=o.transformer,s=o.excludeFields,l={in:new Set(Wl(Wl([],Ko(gS.in),!1),Ko((s==null?void 0:s.in)||[]),!1)),out:new Set(Wl(Wl([],Ko(gS.out),!1),Ko((s==null?void 0:s.out)||[]),!1))};nl=OX(nl,a);var u=t["bpmn:definitions"];if(u){var c=u["bpmn:process"];(function(f,h){h.forEach(function(m){try{Object.keys(f).forEach(function(g){try{m(g)}catch(y){console.error(y)}})}catch(g){console.error(g)}})})(c,[function(f){function h(g){g["-children"]||(g["-children"]=[]),Object.keys(g).forEach(function(y){var b;y.indexOf("bpmn:")===0&&!VWe.includes(y)&&(c[y]||(c[y]=[]),!Array.isArray(c[y])&&(c[y]=[c[y]]),Array.isArray(g[y])?(b=c[y]).push.apply(b,Wl([],Ko(g[y]),!1)):c[y].push(g[y]),Array.isArray(g[y])?g[y].forEach(function(w){!y.includes("Flow")&&g["-children"].push(w["-id"])}):!y.includes("Flow")&&g["-children"].push(g[y]["-id"]),delete g[y])})}if(f==="bpmn:subProcess"){var m=c[f];Array.isArray(m)?m.forEach(function(g){f==="bpmn:subProcess"&&h(g)}):h(m)}},function(f){var h=function(g){Object.keys(g).forEach(function(y){var b,w;if(y.includes("bpmn:")){var O={};nl[y]&&nl[y].in?(O=(w=(b=nl[y]).in)===null||w===void 0?void 0:w.call(b,y,pe.cloneDeep(g[y])),delete g[y]):m(g[y]);var S=void 0;(S=Reflect.ownKeys(O)).length>0&&S.forEach(function(x){Reflect.set(g,x,O[x])})}})};function m(g){i.set(g["-id"],g),Array.isArray(g)?g.forEach(function(y){m(y)}):typeof g=="object"&&h(g)}m(c[f])},function(f){if(f.indexOf("bpmn:")===0){var h=c[f];if(f==="bpmn:sequenceFlow"){var m=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];r=QWe(h,m)}else{var g=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(f==="bpmn:boundaryEvent"){var y=c[f],b=function(w){var O=w["-attachedToRef"],S=i.get(O);S["-boundaryEvents"]||(S["-boundaryEvents"]=[]),S["-boundaryEvents"].push(w["-id"])};Array.isArray(y)?y.forEach(function(w){b(w)}):b(y)}n=n.concat(zWe(h,g,f))}}}])}var d=function(f,h,m){Object.keys(f).forEach(function(g){var y=m?"".concat(m,".").concat(g):g;h.has(y)?delete f[g]:typeof f[g]=="object"&&d(f[g],h,y)})};return n.forEach(function(f){var h,m;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var g=(m=e==null?void 0:e.mapping)===null||m===void 0?void 0:m.in,y=f.type;g[y]&&(f.type=g[y])}d(f,l.in,"")}),r.forEach(function(f){var h,m;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var g=(m=e==null?void 0:e.mapping)===null||m===void 0?void 0:m.in,y=f.type;g[y]&&(f.type=g[y])}d(f,l.in,"")}),{nodes:n,edges:r}}function zWe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=uF(s,n,a);r.push(l)});else{var i=void 0;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):i=e;var o=uF(i,n,t);r.push(o)}return r}function uF(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),i=Number(t["dc:Bounds"]["-y"]),o=n["-children"],a=n["-name"],s=us.shapeConfigMap.get(e);s&&(r+=s.width/2,i+=s.height/2);var l={};Object.entries(n).forEach(function(f){var h=Ko(f,2),m=h[0],g=h[1];_X.includes(m)||(l[m]=g)}),l=mS(l);var u;if(a&&(u={x:r,y:i,value:a},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var c=t["bpmndi:BPMNLabel"]["dc:Bounds"];u.x=Number(c["-x"])+Number(c["-width"])/2,u.y=Number(c["-y"])+Number(c["-height"])/2}var d={id:t["-bpmnElement"],type:e,x:r,y:i,properties:l};return o&&(d.children=o),u&&(d.text=u),d}function QWe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(i){var o;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===i["-id"]}):o=e,n.push(cF(o,i))});else{var r=void 0;Array.isArray(e)?r=e.find(function(i){return i["-bpmnElement"]===t["-id"]}):r=e,n.push(cF(r,t))}return n}function cF(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var i=t["bpmndi:BPMNLabel"]["dc:Bounds"],o=0;r.split(`
  123. `).forEach(function(u){o<u.length&&(o=u.length)}),n={value:r,x:Number(i["-x"])+o*10/2,y:Number(i["-y"])+7}}var a={};Object.entries(e).forEach(function(u){var c=Ko(u,2),d=c[0],f=c[1];_X.includes(d)||(a[d]=f)}),a=mS(a);var s=t["di:waypoint"].map(function(u){return{x:Number(u["-x"]),y:Number(u["-y"])}}),l={id:e["-id"],type:Ta.FLOW,pointsList:s,sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:a};return n&&(l.text=n),l}var us=function(){function t(e){var n=e.lf,r=this;this.adapterOut=function(i,o){var a,s,l=vA({},r.processAttributes);BWe(l,i,o);var u={"-id":"BPMNPlane_1","-bpmnElement":l["-id"]};FWe(u,i);var c=r.definitionAttributes;c["bpmn:process"]=l,c["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":u};var d={"bpmn:definitions":c};if(!((a=o==null?void 0:o.mapping)===null||a===void 0)&&a.out){var f=(s=o==null?void 0:o.mapping)===null||s===void 0?void 0:s.out,h=function(m){Array.isArray(m)&&m.forEach(function(g){return h(g)}),typeof m=="object"&&Object.keys(m).forEach(function(g){var y;(y=f[g])?(m[y]=pe.cloneDeep(m[g]),delete m[g],h(m[y])):h(m[g])})};h(d)}return d},this.adapterIn=function(i,o){if(i)return jWe(i,o)},n.adapterIn=this.adapterIn,n.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.10"}}return t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t}();us.shapeConfigMap.set(Ta.START,{width:G6.width,height:G6.height});us.shapeConfigMap.set(Ta.END,{width:K6.width,height:K6.height});us.shapeConfigMap.set(Ta.INTERMEDIATE_CATCH,{width:hS.width,height:hS.height});us.shapeConfigMap.set(Ta.INTERMEDIATE_THROW,{width:hS.width,height:hS.height});us.shapeConfigMap.set(Ta.BOUNDARY,{width:J6.width,height:J6.height});us.shapeConfigMap.set(Ta.PARALLEL_GATEWAY,{width:eF.width,height:eF.height});us.shapeConfigMap.set(Ta.INCLUSIVE_GATEWAY,{width:tF.width,height:tF.height});us.shapeConfigMap.set(Ta.EXCLUSIVE_GATEWAY,{width:nF.width,height:nF.height});us.shapeConfigMap.set(Ta.SYSTEM,{width:rF.width,height:rF.height});us.shapeConfigMap.set(Ta.USER,{width:iF.width,height:iF.height});us.shapeConfigMap.set(Ta.SUBPROCESS,{width:oF.width,height:oF.height});(function(t){DWe(e,t);function e(n){var r=t.call(this,n)||this;r.adapterXmlIn=function(a){var s=RWe(a);return r.adapterIn(s,r.props)},r.adapterXmlOut=function(a){var s=r.adapterOut(a,r.props);return NWe(s)};var i=n.lf,o=n.props;return i.adapterIn=r.adapterXmlIn,i.adapterOut=r.adapterXmlOut,r.props=o,r}return e.pluginName="BPMNAdapter",e})(us);var dF=globalThis&&globalThis.__assign||function(){return dF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},dF.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__read;function HWe(t,e,n){var r=e.x,i=e.y,o=t.x,a=t.y,s=o-r,l=a-i,u=s*Math.cos(n)-l*Math.sin(n),c=s*Math.sin(n)+l*Math.cos(n),d=u+r,f=c+i;return{x:d,y:f}}var WWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vS=globalThis&&globalThis.__assign||function(){return vS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},vS.apply(this,arguments)},UWe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qWe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},YWe=function(t){WWe(e,t);function e(){var n=t.apply(this,qWe([],UWe(arguments),!1))||this;return n.childrenPositionMap=new Map,n.onNodeRotate=function(r){var i=r.model,o=n.props,a=o.model,s=o.graphModel,l=a.transformWithContainer,u=a.isRestrict,c=n.childrenPositionMap;if(!(!l||u)&&i.id===a.id){var d={x:a.x,y:a.y};jn(Array.from(a.children),function(f){var h=s.getNodeModelById(f);if(h){var m={x:h.x,y:h.y};c.has(h.id)?m=c.get(h.id):c.set(h.id,m);var g=i.rotate*(180/Math.PI);g<0&&(g+=360);var y=g*(Math.PI/180),b=HWe(m,d,y);h.moveTo(b.x,b.y),h.rotate=i.rotate}})}},n.onNodeResize=function(r){var i=r.deltaX,o=r.deltaY,a=r.index,s=r.model,l=r.preData,u=n.props,c=u.model,d=u.graphModel,f=c.transformWithContainer,h=c.isRestrict;if(!(!f||h)&&s.id===c.id){var m=l.properties,g=m||{},y=g.width,b=g.height;jn(Array.from(c.children),function(w){var O=d.getNodeModelById(w);if(O){var S=O.width/y*i,x=O.height/b*o;GY({deltaX:S,deltaY:x,index:a,nodeModel:O,graphModel:d,cancelCallback:function(){}})}})}},n.onNodeMouseMove=function(){},n.graphRendered=function(){var r=n.props.model;r.isCollapsed&&r.toggleCollapse(!0)},n}return e.prototype.componentDidMount=function(){t.prototype.componentDidMount.call(this);var n=this.props.graphModel.eventCenter;n.on("node:rotate",this.onNodeRotate),n.on("node:resize",this.onNodeResize),n.on("node:mousemove",this.onNodeMouseMove),n.on("graph:rendered",this.graphRendered)},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this);var n=this.props.graphModel.eventCenter;n.off("node:rotate",this.onNodeRotate),n.off("node:resize",this.onNodeResize),n.off("node:mousemove",this.onNodeMouseMove),n.off("graph:rendered",this.graphRendered)},e.prototype.getNodesInGroup=function(n,r){var i=this,o=[];return n.isGroup&&jn(Array.from(n.children),function(a){o.push(a);var s=r.getNodeModelById(a);s!=null&&s.isGroup&&(o=o.concat(i.getNodesInGroup(s,r)))}),o},e.prototype.getResizeControl=function(){var n=this.props.model,r=n.resizable,i=n.isCollapsed,o=r&&!i;return o?t.prototype.getResizeControl.call(this):null},e.prototype.getAppendAreaShape=function(){var n=this.props.model,r=n.width,i=n.height,o=n.x,a=n.y,s=n.radius,l=n.groupAddable;if(!l)return null;var u=n.getNodeStyle().strokeWidth,c=u===void 0?0:u,d=n.getAddableOutlineStyle(),f=r+c+8,h=i+c+8;return Gt("rect",vS(vS({},d),{width:f,height:h,x:o-f/2,y:a-h/2,rx:s,ry:s}))},e.prototype.getCollapseIcon=function(n,r){return"M ".concat(n+3,",").concat(r+6," ").concat(n+11,",").concat(r+6," M").concat(n+7,",").concat(r+2," ").concat(n+7,",").concat(r+10)},e.prototype.getExpandIcon=function(n,r){return"M ".concat(n+3,",").concat(r+6," ").concat(n+11,",").concat(r+6," ")},e.prototype.getOperateIcon=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=r-o/2+10,l=i-a/2+10;if(!n.collapsible)return null;var u=n!=null&&n.isCollapsed?this.getCollapseIcon(s,l):this.getExpandIcon(s,l),c=Gt("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:u});return Gt("g",{},[Gt("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#f4f5f6",stroke:"#cecece",cursor:"pointer",x:s,y:l,onClick:function(){n.toggleCollapse(!n.isCollapsed)}}),c])},e.prototype.getShape=function(){return Gt("g",{},[this.getAppendAreaShape(),t.prototype.getShape.call(this),this.getOperateIcon()])},e}(wf),XWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yS=globalThis&&globalThis.__assign||function(){return yS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},yS.apply(this,arguments)},t2=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},eg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jv=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ZWe=400,GWe=230,KWe=80,JWe=60,eUe=-1e4,tUe=function(t){XWe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.isGroup=!0,i.isRestrict=!1,i.autoResize=!1,i.collapsible=!0,i.isCollapsed=!1,i.groupAddable=!1,i.transformWithContainer=!1,i.childrenLastCollapseStateDict=new Map,i.childrenLastCollapseStateDict=new Map,i.initNodeData(n),i.setAttributes(),i}return e.prototype.initNodeData=function(n){var r;t.prototype.initNodeData.call(this,n);var i=(r=n.properties)!==null&&r!==void 0?r:{},o=i.children,a=i.width,s=i.height,l=i.collapsedWidth,u=i.collapsedHeight,c=i.collapsible,d=i.isCollapsed,f=i.zIndex,h=i.isRestrict,m=i.autoResize,g=i.autoToFront,y=i.transformWithContainer;this.children=o?new Set(o):new Set,this.zIndex=f!=null?f:eUe,this.isCollapsed=d!=null?d:!1;var b=a!=null?a:ZWe,w=s!=null?s:GWe;this.width=b,this.height=w,this.expandWidth=b,this.expandHeight=w,this.collapsedWidth=l!=null?l:KWe,this.collapsedHeight=u!=null?u:JWe,this.isRestrict=h!=null?h:!1,this.transformWithContainer=y!=null?y:!1,this.autoResize=m!=null?m:!1,this.collapsible=c!=null?c:!0,this.autoToFront=g!=null?g:!1,this.text.editable=!1,this.text.draggable=!1},e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this)},e.prototype.getData=function(){var n=this,r=t.prototype.getData.call(this),i=[];return jn(Array.from(this.children),function(o){var a=n.graphModel.getNodeModelById(o);a&&!a.virtual&&i.push(o)}),r.children=i,r.properties&&(r.properties.children=i,r.properties.isCollapsed=this.isCollapsed),r},e.prototype.getNodesInGroup=function(n){var r=[];return n.isGroup&&jn(Array.from(n.children),function(i){r.push(i)}),r},e.prototype.getMoveDistance=function(n,r,i){i===void 0&&(i=!1);var o=eg(t.prototype.getMoveDistance.call(this,n,r,i),2),a=o[0],s=o[1],l=this.getNodesInGroup(this);return this.graphModel.moveNodes(l,n,r,i),[a,s]},e.prototype.getHistoryData=function(){var n=t.prototype.getHistoryData.call(this);n.children=Array.from(this.children),n.isGroup=!0;var r=this,i=r.x,o=r.y,a=r.collapsedWidth,s=r.collapsedHeight,l=r.expandWidth,u=r.expandHeight,c=r.isCollapsed;return c&&(n.x=i+l/2-a/2,n.y=o+u/2-s/2,n.text&&(n.text.x=n.text.x+l/2-a/2,n.text.y=n.text.y+u/2-s/2)),n},e.prototype.toggleCollapse=function(n){var r=this,i=!!n;this.isCollapsed=i,i?this.collapse():this.expand();var o=jv(jv([],eg(this.incoming.edges),!1),eg(this.outgoing.edges),!1),a=Array.from(this.children);jn(a,function(s){var l,u,c=r.graphModel.elementsModelMap.get(s);if(c){var d=c.isCollapsed;if(c.isGroup){var f=c;if(f.isCollapsed||f.toggleCollapse(n),!n){var h=(l=r.childrenLastCollapseStateDict)===null||l===void 0?void 0:l.get(s);h!==void 0&&h!==c.isCollapsed&&f.toggleCollapse(h)}}if((u=r.childrenLastCollapseStateDict)===null||u===void 0||u.set(s,!!d),c.visible=!n,c.BaseType===Si.NODE){var m=c.incoming.edges,g=c.outgoing.edges;o=jv(jv(jv([],eg(o),!1),eg(m),!1),eg(g),!1)}}}),this.collapseEdge(i,o)},e.prototype.collapse=function(){var n=this,r=n.x,i=n.y,o=n.text,a=n.width,s=n.height,l=n.collapsedWidth,u=n.collapsedHeight;this.x=r-a/2+l/2,this.y=i-s/2+u/2,this.text.x=o.x-a/2+l/2,this.text.y=o.y-s/2+u/2,this.expandWidth=a,this.expandHeight=s,this.width=l,this.height=u},e.prototype.expand=function(){var n=this,r=n.x,i=n.y,o=n.text,a=n.expandWidth,s=n.expandHeight,l=n.collapsedWidth,u=n.collapsedHeight;this.width=a,this.height=s,this.x=r+this.width/2-l/2,this.y=i+this.height/2-u/2,this.text.x=o.x+this.width/2-l/2,this.text.y=o.y+this.height/2-u/2},e.prototype.createVirtualEdge=function(n){n.pointsList=void 0;var r=this.graphModel.addEdge(n);r.virtual=!0,r.text.editable=!1,r.isCollapsedEdge=!0},e.prototype.collapseEdge=function(n,r){var i=this,o=this.graphModel;jn(r,function(a,s){var l,u=a.getData(),c=u.targetNodeId,d=u.sourceNodeId,f=yS(yS({},u),{id:"".concat(u.id,"__").concat(s),text:(l=u.text)===null||l===void 0?void 0:l.value});a.virtual&&o.deleteEdgeById(a.id);var h=o.dynamicGroup.getGroupByNodeId(c);h||(h=o.getNodeModelById(c));var m=o.dynamicGroup.getGroupByNodeId(d);m||(m=o.getNodeModelById(d)),n&&a.visible&&(i.children.has(d)||i.id===d?(f.startPoint=void 0,f.sourceNodeId=i.id):(f.endPoint=void 0,f.targetNodeId=i.id),(h.id!==i.id||m.id!==i.id)&&i.createVirtualEdge(f),a.visible=!1),!n&&!a.visible&&(h&&h.isGroup&&h.isCollapsed?(f.targetNodeId=h.id,f.endPoint=void 0,i.createVirtualEdge(f)):m&&m.isGroup&&m.isCollapsed?(f.sourceNodeId=m.id,f.startPoint=void 0,i.createVirtualEdge(f)):a.visible=!0)})},e.prototype.isAllowAppendIn=function(n){return!0},e.prototype.setAllowAppendChild=function(n){this.groupAddable=n},e.prototype.addChild=function(n){this.children.add(n);var r=this.getData();this.graphModel.eventCenter.emit("group:add-node",{data:r})},e.prototype.removeChild=function(n){this.children.delete(n);var r=this.getData();this.graphModel.eventCenter.emit("group:remove-node",{data:r})},e.prototype.toBack=function(){this.zIndex--},e.prototype.getResizeOutlineStyle=function(){var n=t.prototype.getResizeOutlineStyle.call(this);return n.stroke="none",n},e.prototype.getAnchorStyle=function(){var n=t.prototype.getAnchorStyle.call(this);return n.stroke="transparent",n.fill="transparent",n.hover&&(n.hover.fill="transparent",n.hover.stroke="transparent"),n},e.prototype.getAddableOutlineStyle=function(){return{stroke:"#feb663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},t2([at],e.prototype,"isCollapsed",void 0),t2([at],e.prototype,"groupAddable",void 0),t2([at],e.prototype,"transformWithContainer",void 0),e}(lp);function nUe(t,e){var n=t.minX,r=t.minY,i=t.maxX,o=t.maxY,a=e.x,s=e.y,l=e.width,u=e.height;return n>=a-l/2&&i<=a+l/2&&r>=s-u/2&&o<=s+u/2}function rUe(t,e,n,r){var i=t.minX,o=t.minY,a=t.maxX,s=t.maxY,l=e.x,u=e.y,c=e.width,d=e.height,f=i+c/2,h=o+d/2,m=a-c/2,g=s-d/2;return{x:l+n>=f&&l+n<=m,y:u+r>=h&&u+r<=g}}var bS=globalThis&&globalThis.__assign||function(){return bS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bS.apply(this,arguments)},tg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ng=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},YN={type:"dynamic-group",view:YWe,model:tUe},iUe=-1e3,LO=-1e4,oUe=function(){function t(e){var n=e.lf,r=e.options,i=this;this.topGroupZIndex=LO,this.nodeGroupMap=new Map,this.addNodeToGroup=function(o){var a=o.data,s=i.nodeGroupMap.get(a.id);if(s){var l=i.lf.getNodeModelById(s);l.removeChild(a.id),i.nodeGroupMap.delete(a.id),l.setAllowAppendChild(!1)}var u=i.lf.getNodeModelById(a.id),c=u==null?void 0:u.getBounds();if(u&&c){if(u.isGroup){var d=u;jn(Array.from(d.children),function(m){i.nodeGroupMap.set(m,a.id)}),i.calibrateTopGroupZIndex([a]),i.onNodeSelect({data:a,isSelected:!1,isMultiple:!1})}var l=i.getGroupByBounds(c,a);if(l){var f=l.isAllowAppendIn(a);console.log("isAllowAppendIn",f),f?(l.addChild(a.id),i.nodeGroupMap.set(a.id,l.id),l.setAllowAppendChild(!0)):i.lf.emit("group:not-allowed",{group:l.getData(),node:a})}}},this.removeNodeFromGroup=function(o){var a=o.data,s=o.model;s.isGroup&&a.children&&jn(Array.from(a.children),function(c){i.nodeGroupMap.delete(c),i.lf.deleteNode(c)});var l=i.nodeGroupMap.get(a.id);if(l){var u=i.lf.getNodeModelById(l);u&&u.removeChild(a.id),i.nodeGroupMap.delete(a.id)}},this.setActiveGroup=function(o){var a=o.data,s=i.lf.getNodeModelById(a.id),l=s==null?void 0:s.getBounds();if(s&&l){var u=i.getGroupByBounds(l,a);if(i.activeGroup&&i.activeGroup.setAllowAppendChild(!1),!u||s.isGroup&&u.id===a.id)return;var c=u.isAllowAppendIn(a);if(!c)return;i.activeGroup=u,console.log("this.activeGroup",i.activeGroup),i.activeGroup.setAllowAppendChild(!0)}},this.onNodeSelect=function(o){var a=o.data,s=o.isMultiple,l=o.isSelected,u=i.lf.getNodeModelById(a.id);if(i.sendNodeToFront(u),i.topGroupZIndex>iUe){var c=i.lf.graphModel.nodes;i.topGroupZIndex=LO;var d=SQ(Jv(c,function(y){return!!y.isGroup}),"zIndex"),f=0;jn(d,function(y){y.zIndex!==f&&(i.topGroupZIndex++,f=y.zIndex),y.setZIndex(i.topGroupZIndex)})}if(s&&l)if(u!=null&&u.isGroup){var h=u.children;jn(Array.from(h),function(y){var b=i.lf.getNodeModelById(y);b==null||b.setSelected(!1)})}else{var m=i.nodeGroupMap.get(a.id);if(m){var g=i.lf.getNodeModelById(m);g!=null&&g.isSelected&&(u==null||u.setSelected(!1))}}},this.onNodeMove=function(o){var a=o.deltaX,s=o.deltaY,l=o.data,u=l.id,c=l.x,d=l.y,f=l.properties;if(!!f){var h=f.width,m=f.height,g=i.nodeGroupMap.get(u);if(!!g){var y=i.lf.getNodeModelById(g);if(!(!y||!y.isRestrict||!y.autoResize)){var b=c+a/2,w=d+s/2,O=b-h/2,S=w-m/2,x=b+h/2,C=w+m/2,E=!1,T=y.getBounds(),P=Object.assign({},T);if(O<P.minX&&(P.minX=O,E=!0),S<P.minY&&(P.minY=S,E=!0),x>P.maxX&&(P.maxX=x,E=!0),C>P.maxY&&(P.maxY=C,E=!0),!!E){var A=P.minX+(P.maxX-P.minX)/2,D=P.minY+(P.maxY-P.minY)/2,N=P.maxX-P.minX,$=P.maxY-P.minY;y.moveTo(A,D),y.width=N,y.height=$}}}}},this.onGraphRendered=function(o){var a=o.data;console.log("data",a),jn(a.nodes,function(s){s.children&&jn(s.children,function(l){i.nodeGroupMap.set(l,s.id)})}),i.calibrateTopGroupZIndex(a.nodes)},n.register(YN),this.lf=n,$r(this,r),this.init()}return t.prototype.getGroupByNodeId=function(e){var n=this.nodeGroupMap.get(e);if(n)return this.lf.getNodeModelById(n)},t.prototype.getGroupByBounds=function(e,n){var r=this.lf.graphModel.nodes,i=Jv(r,function(l){return!!l.isGroup&&nUe(e,l)&&l.id!==n.id}),o=i.length;if(o<=1)return i[0];for(var a=i[o-1],s=o-2;s>=0;s--)i[s].zIndex>a.zIndex&&(a=i[s]);return a},t.prototype.sendNodeToFront=function(e){var n=this;if(!(!e||!e.isGroup)&&(this.topGroupZIndex++,e.setZIndex(this.topGroupZIndex),e.children)){var r=e.children;jn(Array.from(r),function(i){var o=n.lf.getNodeModelById(i);n.sendNodeToFront(o)})}},t.prototype.getMaxZIndex=function(e){var n=this,r=LO;if(e.isGroup&&(r=Math.max(r,e.zIndex)),e.children){var i=e.children;jn(Array.from(i),function(o){var a=n.lf.getNodeModelById(o);if(a!=null&&a.isGroup){var s=n.getMaxZIndex(a);r=Math.max(r,s)}})}return r},t.prototype.calibrateTopGroupZIndex=function(e){var n=this,r=LO;if(jn(e,function(s){var l=n.lf.getNodeModelById(s.id);if(l){var u=n.getMaxZIndex(l);u>r&&(r=u)}}),!(this.topGroupZIndex>=r)){var i=this.lf.graphModel.nodes,o=Jv(i,function(s){return!!s.isGroup}),a=this.topGroupZIndex;jn(o,function(s){s.zIndex>a&&(a=s.zIndex)}),this.topGroupZIndex=a}},t.prototype.removeChildrenInGroupNodeData=function(e){var n,r=Fn(e);return delete r.children,!((n=r.properties)===null||n===void 0)&&n.children&&delete r.properties.children,r},t.prototype.initGroupChildNodes=function(e,n,r,i){var o=this,a=[],s=[],l=[];jn(Array.from(n),function(d){var f=o.lf.getNodeModelById(d);if(f){var h=f.children,m=f.getData(),g=pn.NODE_GROUP_COPY||"node:group-copy-add",y=nWe(o.removeChildrenInGroupNodeData(m),i),b=o.lf.addNode(y,g);if(r.addChild(b.id),e[d]=b.id,a.push(b),l.push.apply(l,ng([],tg(ng(ng([],tg(b.incoming.edges),!1),tg(b.outgoing.edges),!1)),!1)),h instanceof Set){var w=o.initGroupChildNodes(e,h,b,i),O=w.childNodes,S=w.edgesData;a.push.apply(a,ng([],tg(O),!1)),s.push.apply(s,ng([],tg(S),!1))}}}),console.log("allRelatedEdges -->>",l);var u=Jv(l,function(d){return qg(e,d.sourceNodeId)&&qg(e,d.targetNodeId)}),c=Ca(u,function(d){return d.getData()});return{childNodes:a,edgesData:s.concat(c)}},t.prototype.createEdge=function(e,n,r){var i,o,a=e.sourceNodeId,s=e.targetNodeId,l=(i=n[a])!==null&&i!==void 0?i:a,u=(o=n[s])!==null&&o!==void 0?o:s,c=Fn(e);return e.id&&typeof e.text=="object"&&e.text!==null&&(c=rWe(e,r)),this.lf.graphModel.addEdge(bS(bS({},c),{sourceNodeId:l,targetNodeId:u}))},t.prototype.checkGroupBoundsWithChildren=function(e,n,r,i,o){if(e.children)for(var a=e.children,s=e.x,l=e.y,u=s+n/2,c=l+r/2,d=u-i/2,f=c-o/2,h=u+i/2,m=c+o/2,g=Array.from(a),y=0;y<g.length;y++){var b=g[y],w=this.lf.getNodeModelById(b);if(!!w){var O=w.getBounds(),S=O.minX,x=O.minY,C=O.maxX,E=O.maxY,T=d<=S&&f<=x&&h>=C&&m>=E;if(!T)return!1}}return!0},t.prototype.init=function(){var e=this,n=this.lf,r=n.graphModel;r.addNodeMoveRules(function(i,o,a){if(i.isGroup)return!0;var s=e.nodeGroupMap.get(i.id),l=e.lf.getNodeModelById(s);if(l&&l.isRestrict){if(l.autoResize)return!0;var u=l.getBounds();return rUe(u,i,o,a)}return!0}),r.addNodeResizeRules(function(i,o,a,s,l){return i.isGroup&&i.isRestrict?e.checkGroupBoundsWithChildren(i,o,a,s,l):!0}),r.dynamicGroup=this,n.on("node:add,node:drop,node:dnd-add",this.addNodeToGroup),n.on("node:delete",this.removeNodeFromGroup),n.on("node:drag,node:dnd-drag",this.setActiveGroup),n.on("node:click",this.onNodeSelect),n.on("node:mousemove",this.onNodeMove),n.on("graph:rendered",this.onGraphRendered),n.on("graph:updated",function(i){var o=i.data;return console.log("data",o)}),n.on("group:add-node",function(i){var o=i.data;return console.log("group:add-node",o)}),n.addElements=function(i,o){var a=i.nodes,s=i.edges;o===void 0&&(o=40);var l={},u={nodes:[],edges:[]},c=[];return jn(a,function(d){var f,h,m=d.id,g=(h=(f=d.properties)===null||f===void 0?void 0:f.children)!==null&&h!==void 0?h:d.children,y=n.addNode(e.removeChildrenInGroupNodeData(d));if(m&&(l[m]=y.id),u.nodes.push(y),y.isGroup){var b=e.initGroupChildNodes(l,g,y,o).edgesData;c.push.apply(c,ng([],tg(b),!1))}}),jn(c,function(d){e.createEdge(d,l,o)}),console.log("selectedEdges --->>>",s),jn(s,function(d){u.edges.push(e.createEdge(d,l,o))}),u},this.render()},t.prototype.render=function(){},t.prototype.destroy=function(){this.lf.off("node:add,node:drop,node:dnd-add",this.addNodeToGroup),this.lf.off("node:delete",this.removeNodeFromGroup),this.lf.off("node:drag,node:dnd-drag",this.setActiveGroup),this.lf.off("node:click",this.onNodeSelect),this.lf.off("node:mousemove",this.onNodeMove),this.lf.off("graph:rendered",this.onGraphRendered)},t.pluginName="dynamicGroup",t}(),fF;(function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"})(fF||(fF={}));globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var aUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zy=globalThis&&globalThis.__assign||function(){return zy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zy.apply(this,arguments)},sUe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},lUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uUe=function(t){aUe(e,t);function e(n){var r=t.call(this,n)||this;r.textRef=uC(),r.setHoverOn=function(){var l=r.props.element;l.isDragging||r.state.isHovered||(r.setState({isHovered:!0}),l.setHovered(!0))},r.setHoverOff=function(){var l=r.props.element;!r.state.isHovered||(r.setState({isHovered:!1}),l.setHovered(!1))},r.handleMouseDown=function(l){var u,c=r.props,d=c.label,f=c.graphModel,h=f.editConfigModel.nodeTextDraggable;((u=d.draggable)!==null&&u!==void 0?u:h)&&!r.state.isDragging&&!r.state.isEditing&&r.stepDrag.handleMouseDown(l)},r.handleMouseUp=function(l){r.state.isDragging&&r.stepDrag.handleMouseUp(l)},r.handleDragging=function(l){var u=l.deltaX,c=l.deltaY;r.state.isDragging||r.setState({isDragging:!0});var d=r.props,f=d.label,h=d.graphModel,m=h.transformModel,g=lUe(m.fixDeltaXY(u,c),2),y=g[0],b=g[1];r.setElementModelLabelInfo({x:f.x+y,y:f.y+b}),h.eventCenter.emit("label:drag",{data:f.getData(),model:f})},r.handleDragEnd=function(){r.setState({isDragging:!1})},r.handleClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;d.setSelected(!r.state.isSelected),r.setState({isSelected:!r.state.isSelected}),r.setElementModelLabelInfo({isSelected:!0}),f.eventCenter.emit("label:click",{data:c.getData(),e:l,model:d})},r.handleDbClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;if(f.eventCenter.emit("label:dblclick",{data:c.getData(),e:l,model:d}),!c.editable){d.setSelected(!0);return}if(d.setSelected(),d.setElementState(Cr.TEXT_EDIT),r.setState({isEditing:!0}),r.textRef.current){r.textRef.current.contentEditable="true",r.textRef.current.focus();var h=document.createRange(),m=window.getSelection();h.selectNodeContents(r.textRef.current),h.collapse(!1),m==null||m.removeAllRanges(),m==null||m.addRange(h)}},r.handleBlur=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel.eventCenter;f.emit("label:blur",{e:l,model:d,data:c.getData(),element:r.textRef.current}),r.setState({isDragging:!1,isHovered:!1,isSelected:!1})},r.handleInput=function(l){var u=r.props,c=u.label,d=u.graphModel;d.eventCenter.emit("label:input",{e:l,data:c.getData()})},r.reCalcLabelSize=function(){};var i=n.label,o=n.graphModel,a=o.gridSize,s=o.eventCenter;return r.stepDrag=new kl({onDragging:r.handleDragging,onDragEnd:r.handleDragEnd,step:a,eventType:"LABEL",model:i,eventCenter:s}),r.state={isEditing:!1,isHovered:!1,isDragging:!1,isSelected:!1},r}return e.prototype.setElementModelLabelInfo=function(n){var r=this.props,i=r.label,o=r.element,a=r.graphModel,s=o.properties._label,l=s,u=DR(l,function(f){return f.id===i.id}),c=l[u];l[u]=zy(zy({},c),n);var d=a.getElement(o.id);d==null||d.setProperty("_label",l)},e.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.label,o=r.element,a=r.graphModel;a.eventCenter.on("blank:click,node:click,edge:click,label:click",function(s){var l,u,c,d,f=s.data;if(((f==null?void 0:f.type)!=="label"||f.type==="label"&&f.id!==i.id||n.state.isSelected)&&n.setState({isSelected:!1}),((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==i.id)&&n.state.isEditing){n.setState({isEditing:!1});var h=(u=(l=n.textRef.current)===null||l===void 0?void 0:l.innerText)!==null&&u!==void 0?u:"",m=(d=(c=n.textRef.current)===null||c===void 0?void 0:c.innerHTML)!==null&&d!==void 0?d:"";n.setElementModelLabelInfo({value:h,content:m,isSelected:!1}),o.setElementState(Cr.DEFAULT)}((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==i.id)&&n.textRef.current&&(n.textRef.current.contentEditable="false")})},e.prototype.componentDidUpdate=function(){},e.prototype.componentWillUnmount=function(){var n=this.props.graphModel;n.eventCenter.off("blank:click,node:click,edge:click")},e.prototype.render=function(){var n,r=this.props,i=r.label,o=r.element,a=r.graphModel,s=this.state,l=s.isDragging,u=s.isHovered,c=s.isSelected,d=s.isEditing,f=a.transformModel,h=f.getTransformStyle().transform,m=i.id,g=i.x,y=i.y,b=i.zIndex,w=i.vertical,O=i.style,S=i.rotate,x=i.content,C=i.labelWidth,E=i.textOverflowMode,T=C!=null?C:o.BaseType==="node"?o.width-20:80,P={left:"".concat(g-T/2,"px"),top:"".concat(y-10,"px"),width:"".concat(T,"px"),height:"20px",zIndex:b!=null?b:1,transform:S?"".concat(h," rotate(").concat(S,"deg)"):"".concat(h," rotate(").concat(w?-.25:0,"turn)")};return rt("div",{id:"element-container-".concat(m),className:KP("lf-label-editor-container"),style:P,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onDblClick:this.handleDbClick,onBlur:this.handleBlur,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,children:rt("div",{ref:this.textRef,id:"editor-container-".concat(m),className:KP("lf-label-editor",(n={"lf-label-editor-dragging":l,"lf-label-editor-editing":d,"lf-label-editor-hover":!d&&(u||c)},n["lf-label-editor-".concat(E)]=!d,n)),onInput:this.handleInput,style:zy({maxWidth:"".concat(T,"px"),boxSizing:"border-box",display:"inline-block",background:d||o.BaseType==="edge"?"#fff":"transparent"},O),dangerouslySetInnerHTML:{__html:x}})})},e=sUe([Ea],e),e}(ur),Zs=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},cUe=nf,dUe=function(){function t(e,n,r){var i;this.type="label",this.content="",this.value="",this.style={},this.vertical=!1,this.editable=!0,this.draggable=!0,this.textOverflowMode="default",this.element=n,this.graphModel=r,this.id=(i=e.id)!==null&&i!==void 0?i:cUe(),this.initLabelData(e)}return t.prototype.initLabelData=function(e){$r(this,e)},t.prototype.getData=function(){return{id:this.id,x:this.x,y:this.y,type:"label",content:this.content,value:this.value,rotate:this.rotate,style:Hl(this.style),draggable:this.draggable,editable:this.editable,labelWidth:this.labelWidth,textOverflowMode:this.textOverflowMode,vertical:this.vertical}},Zs([at],t.prototype,"x",void 0),Zs([at],t.prototype,"y",void 0),Zs([at],t.prototype,"content",void 0),Zs([at],t.prototype,"value",void 0),Zs([at],t.prototype,"rotate",void 0),Zs([at],t.prototype,"style",void 0),Zs([at],t.prototype,"zIndex",void 0),Zs([at],t.prototype,"vertical",void 0),Zs([at],t.prototype,"editable",void 0),Zs([at],t.prototype,"draggable",void 0),Zs([at],t.prototype,"labelWidth",void 0),Zs([at],t.prototype,"textOverflowMode",void 0),t}(),wX={exports:{}};(function(t){/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */"classList"in document.createElement("_")||function(e){if("Element"in e){var n="classList",r="prototype",i=e.Element[r],o=Object,a=String[r].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[r].indexOf||function(m){for(var g=0,y=this.length;g<y;g++)if(g in this&&this[g]===m)return g;return-1},l=function(m,g){this.name=m,this.code=DOMException[m],this.message=g},u=function(m,g){if(g==="")throw new l("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(g))throw new l("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(m,g)},c=function(m){for(var g=a.call(m.getAttribute("class")||""),y=g?g.split(/\s+/):[],b=0,w=y.length;b<w;b++)this.push(y[b]);this._updateClassName=function(){m.setAttribute("class",this.toString())}},d=c[r]=[],f=function(){return new c(this)};if(l[r]=Error[r],d.item=function(m){return this[m]||null},d.contains=function(m){return m+="",u(this,m)!==-1},d.add=function(){var m=arguments,g=0,y=m.length,b,w=!1;do b=m[g]+"",u(this,b)===-1&&(this.push(b),w=!0);while(++g<y);w&&this._updateClassName()},d.remove=function(){var m=arguments,g=0,y=m.length,b,w=!1,O;do for(b=m[g]+"",O=u(this,b);O!==-1;)this.splice(O,1),w=!0,O=u(this,b);while(++g<y);w&&this._updateClassName()},d.toggle=function(m,g){m+="";var y=this.contains(m),b=y?g!==!0&&"remove":g!==!1&&"add";return b&&this[b](m),g===!0||g===!1?g:!y},d.toString=function(){return this.join(" ")},o.defineProperty){var h={get:f,enumerable:!0,configurable:!0};try{o.defineProperty(i,n,h)}catch(m){m.number===-2146823252&&(h.enumerable=!1,o.defineProperty(i,n,h))}}else o[r].__defineGetter__&&i.__defineGetter__(n,f)}}(self);/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */(function(e){if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{new Blob;return}catch{}var n=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(i){var o=function(E){return Object.prototype.toString.call(E).match(/^\[object\s(.*)\]$/)[1]},a=function(){this.data=[]},s=function(T,P,A){this.data=T,this.size=T.length,this.type=P,this.encoding=A},l=a.prototype,u=s.prototype,c=i.FileReaderSync,d=function(E){this.code=this[this.name=E]},f="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),h=f.length,m=i.URL||i.webkitURL||i,g=m.createObjectURL,y=m.revokeObjectURL,b=m,w=i.btoa,O=i.atob,S=i.ArrayBuffer,x=i.Uint8Array,C=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(s.fake=u.fake=!0;h--;)d.prototype[f[h]]=h+1;return m.createObjectURL||(b=i.URL=function(E){var T=document.createElementNS("http://www.w3.org/1999/xhtml","a"),P;return T.href=E,"origin"in T||(T.protocol.toLowerCase()==="data:"?T.origin=null:(P=E.match(C),T.origin=P&&P[1])),T}),b.createObjectURL=function(E){var T=E.type,P;if(T===null&&(T="application/octet-stream"),E instanceof s)return P="data:"+T,E.encoding==="base64"?P+";base64,"+E.data:E.encoding==="URI"?P+","+decodeURIComponent(E.data):w?P+";base64,"+w(E.data):P+","+encodeURIComponent(E.data);if(g)return g.call(m,E)},b.revokeObjectURL=function(E){E.substring(0,5)!=="data:"&&y&&y.call(m,E)},l.append=function(E){var T=this.data;if(x&&(E instanceof S||E instanceof x)){for(var P="",A=new x(E),D=0,N=A.length;D<N;D++)P+=String.fromCharCode(A[D]);T.push(P)}else if(o(E)==="Blob"||o(E)==="File")if(c){var $=new c;T.push($.readAsBinaryString(E))}else throw new d("NOT_READABLE_ERR");else E instanceof s?E.encoding==="base64"&&O?T.push(O(E.data)):E.encoding==="URI"?T.push(decodeURIComponent(E.data)):E.encoding==="raw"&&T.push(E.data):(typeof E!="string"&&(E+=""),T.push(unescape(encodeURIComponent(E))))},l.getBlob=function(E){return arguments.length||(E=null),new s(this.data.join(""),E,"raw")},l.toString=function(){return"[object BlobBuilder]"},u.slice=function(E,T,P){var A=arguments.length;return A<3&&(P=null),new s(this.data.slice(E,A>1?T:this.data.length),P,this.encoding)},u.toString=function(){return"[object Blob]"},u.close=function(){this.size=0,delete this.data},a}(e);e.Blob=function(i,o){var a=o&&o.type||"",s=new n;if(i)for(var l=0,u=i.length;l<u;l++)Uint8Array&&i[l]instanceof Uint8Array?s.append(i[l].buffer):s.append(i[l]);var c=s.getBlob(a);return!c.slice&&c.webkitSlice&&(c.slice=c.webkitSlice),c};var r=Object.getPrototypeOf||function(i){return i.__proto__};e.Blob.prototype=r(new e.Blob)})(typeof self!="undefined"&&self||typeof window!="undefined"&&window||Mi.content||Mi),function(e,n){var r=typeof process!="undefined"&&process&&process.versions&&process.versions.electron;r?e.MediumEditor=n:t.exports=n}(Mi,function(){function e(n,r){return this.init(n,r)}return e.extensions={},function(n){function r(l,u){var c,d=Array.prototype.slice.call(arguments,2);u=u||{};for(var f=0;f<d.length;f++){var h=d[f];if(h)for(c in h)h.hasOwnProperty(c)&&typeof h[c]!="undefined"&&(l||u.hasOwnProperty(c)===!1)&&(u[c]=h[c])}return u}var i=!1;try{var o=document.createElement("div"),a=document.createTextNode(" ");o.appendChild(a),i=o.contains(a)}catch{}var s={isIE:navigator.appName==="Microsoft Internet Explorer"||navigator.appName==="Netscape"&&new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent)!==null,isEdge:/Edge\/\d+/.exec(navigator.userAgent)!==null,isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:n.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(l){return!!(s.isMac&&l.metaKey||!s.isMac&&l.ctrlKey)},isKey:function(l,u){var c=s.getKeyCode(l);return Array.isArray(u)===!1?c===u:u.indexOf(c)!==-1},getKeyCode:function(l){var u=l.which;return u===null&&(u=l.charCode!==null?l.charCode:l.keyCode),u},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var u=[!0].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},defaults:function(){var u=[!1].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},createLink:function(l,u,c,d){var f=l.createElement("a");return s.moveTextRangeIntoElement(u[0],u[u.length-1],f),f.setAttribute("href",c),d&&(d==="_blank"&&f.setAttribute("rel","noopener noreferrer"),f.setAttribute("target",d)),f},findOrCreateMatchingTextNodes:function(l,u,c){for(var d=l.createTreeWalker(u,NodeFilter.SHOW_ALL,null,!1),f=[],h=0,m=!1,g=null,y=null;(g=d.nextNode())!==null;)if(!(g.nodeType>3))if(g.nodeType===3){if(!m&&c.start<h+g.nodeValue.length&&(m=!0,y=s.splitStartNodeIfNeeded(g,c.start,h)),m&&s.splitEndNodeIfNeeded(g,y,c.end,h),m&&h===c.end)break;if(m&&h>c.end+1)throw new Error("PerformLinking overshot the target!");m&&f.push(y||g),h+=g.nodeValue.length,y!==null&&(h+=y.nodeValue.length,d.nextNode()),y=null}else g.tagName.toLowerCase()==="img"&&(!m&&c.start<=h&&(m=!0),m&&f.push(g));return f},splitStartNodeIfNeeded:function(l,u,c){return u!==c?l.splitText(u-c):null},splitEndNodeIfNeeded:function(l,u,c,d){var f,h;f=d+l.nodeValue.length+(u?u.nodeValue.length:0)-1,h=c-d-(u?l.nodeValue.length:0),f>=c&&d!==f&&h!==0&&(u||l).splitText(h)},splitByBlockElements:function(l){if(l.nodeType!==3&&l.nodeType!==1)return[];var u=[],c=e.util.blockContainerElementNames.join(",");if(l.nodeType===3||l.querySelectorAll(c).length===0)return[l];for(var d=0;d<l.childNodes.length;d++){var f=l.childNodes[d];if(f.nodeType===3)u.push(f);else if(f.nodeType===1){var h=f.querySelectorAll(c);h.length===0?u.push(f):u=u.concat(e.util.splitByBlockElements(f))}}return u},findAdjacentTextNodeWithContent:function(u,c,d){var f=!1,h,m=d.createNodeIterator(u,NodeFilter.SHOW_TEXT,null,!1);for(h=m.nextNode();h;){if(h===c)f=!0;else if(f&&h.nodeType===3&&h.nodeValue&&h.nodeValue.trim().length>0)break;h=m.nextNode()}return h},findPreviousSibling:function(l){if(!l||s.isMediumEditorElement(l))return!1;for(var u=l.previousSibling;!u&&!s.isMediumEditorElement(l.parentNode);)l=l.parentNode,u=l.previousSibling;return u},isDescendant:function(u,c,d){if(!u||!c)return!1;if(u===c)return!!d;if(u.nodeType!==1)return!1;if(i||c.nodeType!==3)return u.contains(c);for(var f=c.parentNode;f!==null;){if(f===u)return!0;f=f.parentNode}return!1},isElement:function(u){return!!(u&&u.nodeType===1)},throttle:function(l,u){var c=50,d,f,h,m=null,g=0,y=function(){g=Date.now(),m=null,h=l.apply(d,f),m||(d=f=null)};return!u&&u!==0&&(u=c),function(){var b=Date.now(),w=u-(b-g);return d=this,f=arguments,w<=0||w>u?(m&&(clearTimeout(m),m=null),g=b,h=l.apply(d,f),m||(d=f=null)):m||(m=setTimeout(y,w)),h}},traverseUp:function(l,u){if(!l)return!1;do{if(l.nodeType===1){if(u(l))return l;if(s.isMediumEditorElement(l))return!1}l=l.parentNode}while(l);return!1},htmlEntities:function(l){return String(l).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},insertHTMLCommand:function(l,u){var c,d,f,h,m,g,y,b=!1,w=["insertHTML",!1,u];if(!e.util.isEdge&&l.queryCommandSupported("insertHTML"))try{return l.execCommand.apply(l,w)}catch{}if(c=l.getSelection(),c.rangeCount){if(d=c.getRangeAt(0),y=d.commonAncestorContainer,s.isMediumEditorElement(y)&&!y.firstChild)d.selectNode(y.appendChild(l.createTextNode("")));else if(y.nodeType===3&&d.startOffset===0&&d.endOffset===y.nodeValue.length||y.nodeType!==3&&y.innerHTML===d.toString()){for(;!s.isMediumEditorElement(y)&&y.parentNode&&y.parentNode.childNodes.length===1&&!s.isMediumEditorElement(y.parentNode);)y=y.parentNode;d.selectNode(y)}for(d.deleteContents(),f=l.createElement("div"),f.innerHTML=u,h=l.createDocumentFragment();f.firstChild;)m=f.firstChild,g=h.appendChild(m);d.insertNode(h),g&&(d=d.cloneRange(),d.setStartAfter(g),d.collapse(!0),e.selection.selectRange(l,d)),b=!0}return l.execCommand.callListeners&&l.execCommand.callListeners(w,b),b},execFormatBlock:function(l,u){var c=s.getTopBlockContainer(e.selection.getSelectionStart(l)),d;if(u==="blockquote"){if(c&&(d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return s.isBlockContainer(f)})))return l.execCommand("outdent",!1,null);if(s.isIE)return l.execCommand("indent",!1,u)}if(c&&u===c.nodeName.toLowerCase()&&(u="p"),s.isIE&&(u="<"+u+">"),c&&c.nodeName.toLowerCase()==="blockquote"){if(s.isIE&&u==="<p>")return l.execCommand("outdent",!1,u);if((s.isFF||s.isEdge)&&u==="p")return d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return!s.isBlockContainer(f)})&&l.execCommand("formatBlock",!1,u),l.execCommand("outdent",!1,u)}return l.execCommand("formatBlock",!1,u)},setTargetBlank:function(l,u){var c,d=u||!1;if(l.nodeName.toLowerCase()==="a")l.target="_blank",l.rel="noopener noreferrer";else for(l=l.getElementsByTagName("a"),c=0;c<l.length;c+=1)(d===!1||d===l[c].attributes.href.value)&&(l[c].target="_blank",l[c].rel="noopener noreferrer")},removeTargetBlank:function(l,u){var c;if(l.nodeName.toLowerCase()==="a")l.removeAttribute("target"),l.removeAttribute("rel");else for(l=l.getElementsByTagName("a"),c=0;c<l.length;c+=1)u===l[c].attributes.href.value&&(l[c].removeAttribute("target"),l[c].removeAttribute("rel"))},addClassToAnchors:function(l,u){var c=u.split(" "),d,f;if(l.nodeName.toLowerCase()==="a")for(f=0;f<c.length;f+=1)l.classList.add(c[f]);else{var h=l.getElementsByTagName("a");if(h.length===0){var m=s.getClosestTag(l,"a");l=m?[m]:[]}else l=h;for(d=0;d<l.length;d+=1)for(f=0;f<c.length;f+=1)l[d].classList.add(c[f])}},isListItem:function(l){if(!l)return!1;if(l.nodeName.toLowerCase()==="li")return!0;for(var u=l.parentNode,c=u.nodeName.toLowerCase();c==="li"||!s.isBlockContainer(u)&&c!=="div";){if(c==="li")return!0;if(u=u.parentNode,u)c=u.nodeName.toLowerCase();else return!1}return!1},cleanListDOM:function(l,u){if(u.nodeName.toLowerCase()==="li"){var c=u.parentElement;c.parentElement.nodeName.toLowerCase()==="p"&&(s.unwrap(c.parentElement,l),e.selection.moveCursor(l,u.firstChild,u.firstChild.textContent.length))}},splitOffDOMTree:function(l,u,c){for(var d=u,f=null,h=!c;d!==l;){var m=d.parentNode,g=m.cloneNode(!1),y=h?d:m.firstChild,b;for(f&&(h?g.appendChild(f):b=f),f=g;y;){var w=y.nextSibling;y===d?(y.hasChildNodes()?y=y.cloneNode(!1):y.parentNode.removeChild(y),y.textContent&&f.appendChild(y),y=h?w:null):(y.parentNode.removeChild(y),(y.hasChildNodes()||y.textContent)&&f.appendChild(y),y=w)}b&&f.appendChild(b),d=m}return f},moveTextRangeIntoElement:function(l,u,c){if(!l||!u)return!1;var d=s.findCommonRoot(l,u);if(!d)return!1;if(u===l){var f=l.parentNode,h=l.nextSibling;return f.removeChild(l),c.appendChild(l),h?f.insertBefore(c,h):f.appendChild(c),c.hasChildNodes()}for(var m=[],g,y,b,w=0;w<d.childNodes.length;w++)if(b=d.childNodes[w],!g)s.isDescendant(b,l,!0)&&(g=b);else if(s.isDescendant(b,u,!0)){y=b;break}else m.push(b);var O=y.nextSibling,S=d.ownerDocument.createDocumentFragment();return g===l?(g.parentNode.removeChild(g),S.appendChild(g)):S.appendChild(s.splitOffDOMTree(g,l)),m.forEach(function(x){x.parentNode.removeChild(x),S.appendChild(x)}),y===u?(y.parentNode.removeChild(y),S.appendChild(y)):S.appendChild(s.splitOffDOMTree(y,u,!0)),c.appendChild(S),y.parentNode===d?d.insertBefore(c,y):O?d.insertBefore(c,O):d.appendChild(c),c.hasChildNodes()},depthOfNode:function(l){for(var u=0,c=l;c.parentNode!==null;)c=c.parentNode,u++;return u},findCommonRoot:function(l,u){for(var c=s.depthOfNode(l),d=s.depthOfNode(u),f=l,h=u;c!==d;)c>d?(f=f.parentNode,c-=1):(h=h.parentNode,d-=1);for(;f!==h;)f=f.parentNode,h=h.parentNode;return f},isElementAtBeginningOfBlock:function(l){for(var u,c;!s.isBlockContainer(l)&&!s.isMediumEditorElement(l);){for(c=l;c=c.previousSibling;)if(u=c.nodeType===3?c.nodeValue:c.textContent,u.length>0)return!1;l=l.parentNode}return!0},isMediumEditorElement:function(l){return l&&l.getAttribute&&!!l.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(l){return s.traverseUp(l,function(u){return s.isMediumEditorElement(u)})},isBlockContainer:function(l){return l&&l.nodeType!==3&&s.blockContainerElementNames.indexOf(l.nodeName.toLowerCase())!==-1},getClosestBlockContainer:function(l){return s.traverseUp(l,function(u){return s.isBlockContainer(u)||s.isMediumEditorElement(u)})},getTopBlockContainer:function(l){var u=s.isBlockContainer(l)?l:!1;return s.traverseUp(l,function(c){return s.isBlockContainer(c)&&(u=c),!u&&s.isMediumEditorElement(c)?(u=c,!0):!1}),u},getFirstSelectableLeafNode:function(l){for(;l&&l.firstChild;)l=l.firstChild;if(l=s.traverseUp(l,function(c){return s.emptyElementNames.indexOf(c.nodeName.toLowerCase())===-1}),l.nodeName.toLowerCase()==="table"){var u=l.querySelector("th, td");u&&(l=u)}return l},getFirstTextNode:function(l){return s.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),s._getFirstTextNode(l)},_getFirstTextNode:function(l){if(l.nodeType===3)return l;for(var u=0;u<l.childNodes.length;u++){var c=s._getFirstTextNode(l.childNodes[u]);if(c!==null)return c}return null},ensureUrlHasProtocol:function(l){return l.indexOf("://")===-1?"http://"+l:l},warn:function(){n.console!==void 0&&typeof n.console.warn=="function"&&n.console.warn.apply(n.console,arguments)},deprecated:function(l,u,c){var d=l+" is deprecated, please use "+u+" instead.";c&&(d+=" Will be removed in "+c),s.warn(d)},deprecatedMethod:function(l,u,c,d){s.deprecated(l,u,d),typeof this[u]=="function"&&this[u].apply(this,c)},cleanupAttrs:function(l,u){u.forEach(function(c){l.removeAttribute(c)})},cleanupTags:function(l,u){u.indexOf(l.nodeName.toLowerCase())!==-1&&l.parentNode.removeChild(l)},unwrapTags:function(l,u){u.indexOf(l.nodeName.toLowerCase())!==-1&&e.util.unwrap(l,document)},getClosestTag:function(l,u){return s.traverseUp(l,function(c){return c.nodeName.toLowerCase()===u.toLowerCase()})},unwrap:function(l,u){for(var c=u.createDocumentFragment(),d=Array.prototype.slice.call(l.childNodes),f=0;f<d.length;f++)c.appendChild(d[f]);c.childNodes.length?l.parentNode.replaceChild(c,l):l.parentNode.removeChild(l)},guid:function(){function l(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return l()+l()+"-"+l()+"-"+l()+"-"+l()+"-"+l()+l()+l()}};e.util=s}(window),function(){var n=function(r){e.util.extend(this,r)};n.extend=function(r){var i=this,o;r&&r.hasOwnProperty("constructor")?o=r.constructor:o=function(){return i.apply(this,arguments)},e.util.extend(o,i);var a=function(){this.constructor=o};return a.prototype=i.prototype,o.prototype=new a,r&&e.util.extend(o.prototype,r),o},n.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(r){return this.base.options[r]}},["execAction","on","off","subscribe","trigger"].forEach(function(r){n.prototype[r]=function(){return this.base[r].apply(this.base,arguments)}}),e.Extension=n}(),function(){function n(i){return e.util.isBlockContainer(i)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var r={findMatchingSelectionParent:function(i,o){var a=o.getSelection(),s,l;return a.rangeCount===0?!1:(s=a.getRangeAt(0),l=s.commonAncestorContainer,e.util.traverseUp(l,i))},getSelectionElement:function(i){return this.findMatchingSelectionParent(function(o){return e.util.isMediumEditorElement(o)},i)},exportSelection:function(i,o){if(!i)return null;var a=null,s=o.getSelection();if(s.rangeCount>0){var l=s.getRangeAt(0),u=l.cloneRange(),c;u.selectNodeContents(i),u.setEnd(l.startContainer,l.startOffset),c=u.toString().length,a={start:c,end:c+l.toString().length},this.doesRangeStartWithImages(l,o)&&(a.startsWithImage=!0);var d=this.getTrailingImageCount(i,a,l.endContainer,l.endOffset);if(d&&(a.trailingImageCount=d),c!==0){var f=this.getIndexRelativeToAdjacentEmptyBlocks(o,i,l.startContainer,l.startOffset);f!==-1&&(a.emptyBlocksIndex=f)}}return a},importSelection:function(i,o,a,s){if(!(!i||!o)){var l=a.createRange();l.setStart(o,0),l.collapse(!0);var u=o,c=[],d=0,f=!1,h=!1,m=0,g=!1,y,b=!1,w=null;for((s||i.startsWithImage||typeof i.emptyBlocksIndex!="undefined")&&(b=!0);!g&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)y=d+u.length,!f&&i.start>=d&&i.start<=y&&(b||i.start<y?(l.setStart(u,i.start-d),f=!0):w=u),f&&i.end>=d&&i.end<=y&&(i.trailingImageCount?h=!0:(l.setEnd(u,i.end-d),g=!0)),d=y;else{if(i.trailingImageCount&&h&&(u.nodeName.toLowerCase()==="img"&&m++,m===i.trailingImageCount)){for(var O=0;u.parentNode.childNodes[O]!==u;)O++;l.setEnd(u.parentNode,O+1),g=!0}if(!g&&u.nodeType===1)for(var S=u.childNodes.length-1;S>=0;)c.push(u.childNodes[S]),S-=1}g||(u=c.pop())}!f&&w&&(l.setStart(w,w.length),l.setEnd(w,w.length)),typeof i.emptyBlocksIndex!="undefined"&&(l=this.importSelectionMoveCursorPastBlocks(a,o,i.emptyBlocksIndex,l)),s&&(l=this.importSelectionMoveCursorPastAnchor(i,l)),this.selectRange(a,l)}},importSelectionMoveCursorPastAnchor:function(i,o){var a=function(d){return d.nodeName.toLowerCase()==="a"};if(i.start===i.end&&o.startContainer.nodeType===3&&o.startOffset===o.startContainer.nodeValue.length&&e.util.traverseUp(o.startContainer,a)){for(var s=o.startContainer,l=o.startContainer.parentNode;l!==null&&l.nodeName.toLowerCase()!=="a";)l.childNodes[l.childNodes.length-1]!==s?l=null:(s=l,l=l.parentNode);if(l!==null&&l.nodeName.toLowerCase()==="a"){for(var u=null,c=0;u===null&&c<l.parentNode.childNodes.length;c++)l.parentNode.childNodes[c]===l&&(u=c);o.setStart(l.parentNode,u+1),o.collapse(!0)}}return o},importSelectionMoveCursorPastBlocks:function(i,o,a,s){var l=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,n,!1),u=s.startContainer,c,d,f=0;for(a=a||1,u.nodeType===3&&e.util.isBlockContainer(u.previousSibling)?c=u.previousSibling:c=e.util.getClosestBlockContainer(u);l.nextNode();)if(!d)c===l.currentNode&&(d=l.currentNode);else if(d=l.currentNode,f++,f===a||d.textContent.length>0)break;return d||(d=c),s.setStart(e.util.getFirstSelectableLeafNode(d),0),s},getIndexRelativeToAdjacentEmptyBlocks:function(i,o,a,s){if(a.textContent.length>0&&s>0)return-1;var l=a;if(l.nodeType!==3&&(l=a.childNodes[s]),l){if(!e.util.isElementAtBeginningOfBlock(l))return-1;var u=e.util.findPreviousSibling(l);if(u){if(u.nodeValue)return-1}else return-1}for(var c=e.util.getClosestBlockContainer(a),d=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,n,!1),f=0;d.nextNode();){var h=d.currentNode.textContent==="";if((h||f>0)&&(f+=1),d.currentNode===c)return f;h||(f=0)}return f},doesRangeStartWithImages:function(i,o){if(i.startOffset!==0||i.startContainer.nodeType!==1)return!1;if(i.startContainer.nodeName.toLowerCase()==="img")return!0;var a=i.startContainer.querySelector("img");if(!a)return!1;for(var s=o.createTreeWalker(i.startContainer,NodeFilter.SHOW_ALL,null,!1);s.nextNode();){var l=s.currentNode;if(l===a)break;if(l.nodeValue)return!1}return!0},getTrailingImageCount:function(i,o,a,s){if(s===0||a.nodeType!==1||a.nodeName.toLowerCase()!=="img"&&!a.querySelector("img"))return 0;for(var l=a.childNodes[s-1];l.hasChildNodes();)l=l.lastChild;for(var u=i,c=[],d=0,f=!1,h=!1,m=!1,g,y=0;!m&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)y=0,g=d+u.length,!f&&o.start>=d&&o.start<=g&&(f=!0),f&&o.end>=d&&o.end<=g&&(h=!0),d=g;else if(u.nodeName.toLowerCase()==="img"&&y++,u===l)m=!0;else if(u.nodeType===1)for(var b=u.childNodes.length-1;b>=0;)c.push(u.childNodes[b]),b-=1;m||(u=c.pop())}return y},selectionContainsContent:function(i){var o=i.getSelection();if(!o||o.isCollapsed||!o.rangeCount)return!1;if(o.toString().trim()!=="")return!0;var a=this.getSelectedParentElement(o.getRangeAt(0));return!!(a&&(a.nodeName.toLowerCase()==="img"||a.nodeType===1&&a.querySelector("img")))},selectionInContentEditableFalse:function(i){var o,a=this.findMatchingSelectionParent(function(s){var l=s&&s.getAttribute("contenteditable");return l==="true"&&(o=!0),s.nodeName!=="#text"&&l==="false"},i);return!o&&a},getSelectionHtml:function(o){var a,s="",l=o.getSelection(),u,c;if(l.rangeCount){for(c=o.createElement("div"),a=0,u=l.rangeCount;a<u;a+=1)c.appendChild(l.getRangeAt(a).cloneContents());s=c.innerHTML}return s},getCaretOffsets:function(o,a){var s,l;return a||(a=window.getSelection().getRangeAt(0)),s=a.cloneRange(),l=a.cloneRange(),s.selectNodeContents(o),s.setEnd(a.endContainer,a.endOffset),l.selectNodeContents(o),l.setStart(a.endContainer,a.endOffset),{left:s.toString().length,right:l.toString().length}},rangeSelectsSingleNode:function(i){var o=i.startContainer;return o===i.endContainer&&o.hasChildNodes()&&i.endOffset===i.startOffset+1},getSelectedParentElement:function(i){return i?this.rangeSelectsSingleNode(i)&&i.startContainer.childNodes[i.startOffset].nodeType!==3?i.startContainer.childNodes[i.startOffset]:i.startContainer.nodeType===3?i.startContainer.parentNode:i.startContainer:null},getSelectedElements:function(i){var o=i.getSelection(),a,s,l;if(!o.rangeCount||o.isCollapsed||!o.getRangeAt(0).commonAncestorContainer)return[];if(a=o.getRangeAt(0),a.commonAncestorContainer.nodeType===3){for(s=[],l=a.commonAncestorContainer;l.parentNode&&l.parentNode.childNodes.length===1;)s.push(l.parentNode),l=l.parentNode;return s}return[].filter.call(a.commonAncestorContainer.getElementsByTagName("*"),function(u){return typeof o.containsNode=="function"?o.containsNode(u,!0):!0})},selectNode:function(i,o){var a=o.createRange();a.selectNodeContents(i),this.selectRange(o,a)},select:function(i,o,a,s,l){var u=i.createRange();return u.setStart(o,a),s?u.setEnd(s,l):u.collapse(!0),this.selectRange(i,u),u},clearSelection:function(i,o){o?i.getSelection().collapseToStart():i.getSelection().collapseToEnd()},moveCursor:function(i,o,a){this.select(i,o,a)},getSelectionRange:function(i){var o=i.getSelection();return o.rangeCount===0?null:o.getRangeAt(0)},selectRange:function(i,o){var a=i.getSelection();a.removeAllRanges(),a.addRange(o)},getSelectionStart:function(i){var o=i.getSelection().anchorNode,a=o&&o.nodeType===3?o.parentNode:o;return a}};e.selection=r}(),function(){function n(i,o){return i?i.some(function(a){if(typeof a.getInteractionElements!="function")return!1;var s=a.getInteractionElements();return s?(Array.isArray(s)||(s=[s]),s.some(function(l){return e.util.isDescendant(l,o,!0)})):!1}):!1}var r=function(i){this.base=i,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};r.prototype={InputEventOnContenteditableSupported:!e.util.isIE&&!e.util.isEdge,attachDOMEvent:function(i,o,a,s){var l=this.base.options.contentWindow,u=this.base.options.ownerDocument;i=e.util.isElement(i)||[l,u].indexOf(i)>-1?[i]:i,Array.prototype.forEach.call(i,function(c){c.addEventListener(o,a,s),this.events.push([c,o,a,s])}.bind(this))},detachDOMEvent:function(i,o,a,s){var l,u,c=this.base.options.contentWindow,d=this.base.options.ownerDocument;i&&(i=e.util.isElement(i)||[c,d].indexOf(i)>-1?[i]:i,Array.prototype.forEach.call(i,function(f){l=this.indexOfListener(f,o,a,s),l!==-1&&(u=this.events.splice(l,1)[0],u[0].removeEventListener(u[1],u[2],u[3]))}.bind(this)))},indexOfListener:function(i,o,a,s){var l,u,c;for(l=0,u=this.events.length;l<u;l=l+1)if(c=this.events[l],c[0]===i&&c[1]===o&&c[2]===a&&c[3]===s)return l;return-1},detachAllDOMEvents:function(){for(var i=this.events.pop();i;)i[0].removeEventListener(i[1],i[2],i[3]),i=this.events.pop()},detachAllEventsFromElement:function(i){for(var o=this.events.filter(function(u){return u&&u[0].getAttribute&&u[0].getAttribute("medium-editor-index")===i.getAttribute("medium-editor-index")}),a=0,s=o.length;a<s;a++){var l=o[a];this.detachDOMEvent(l[0],l[1],l[2],l[3])}},attachAllEventsToElement:function(i){this.listeners.editableInput&&(this.contentCache[i.getAttribute("medium-editor-index")]=i.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(o){this.attachDOMEvent(i,o.name,o.handler.bind(this))},this)},enableCustomEvent:function(i){this.disabledEvents[i]!==void 0&&delete this.disabledEvents[i]},disableCustomEvent:function(i){this.disabledEvents[i]=!0},attachCustomEvent:function(i,o){this.setupListener(i),this.customEvents[i]||(this.customEvents[i]=[]),this.customEvents[i].push(o)},detachCustomEvent:function(i,o){var a=this.indexOfCustomListener(i,o);a!==-1&&this.customEvents[i].splice(a,1)},indexOfCustomListener:function(i,o){return!this.customEvents[i]||!this.customEvents[i].length?-1:this.customEvents[i].indexOf(o)},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(i,o,a){this.customEvents[i]&&!this.disabledEvents[i]&&this.customEvents[i].forEach(function(s){s(o,a)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(i){i.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(i){this.handleDocumentExecCommand(i)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var i=this.options.ownerDocument;if(!(!this.execCommandListener||!i.execCommand.listeners)){var o=i.execCommand.listeners.indexOf(this.execCommandListener);o!==-1&&i.execCommand.listeners.splice(o,1),i.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var i=this.options.ownerDocument;if(!i.execCommand.listeners){var o=function(s,l){i.execCommand.listeners&&i.execCommand.listeners.forEach(function(u){u({command:s[0],value:s[2],args:s,result:l})})},a=function(){var s=i.execCommand.orig.apply(this,arguments);if(!i.execCommand.listeners)return s;var l=Array.prototype.slice.call(arguments);return o(l,s),s};a.orig=i.execCommand,a.listeners=[],a.callListeners=o,i.execCommand=a}},unwrapExecCommand:function(){var i=this.options.ownerDocument;!i.execCommand.orig||(i.execCommand=i.execCommand.orig)},setupListener:function(i){if(!this.listeners[i]){switch(i){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":this.setupListener("externalInteraction");break;case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(o){this.contentCache[o.getAttribute("medium-editor-index")]=o.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":this.setupListener("editableKeydown");break;case"editableKeydownEnter":this.setupListener("editableKeydown");break;case"editableKeydownTab":this.setupListener("editableKeydown");break;case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste);break}this.listeners[i]=!0}},attachToEachElement:function(i,o){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(a){this.attachDOMEvent(a,i,o.bind(this))},this),this.eventsCache.push({name:i,handler:o})},cleanupElement:function(i){var o=i.getAttribute("medium-editor-index");o&&(this.detachAllEventsFromElement(i),this.contentCache&&delete this.contentCache[o])},focusElement:function(i){i.focus(),this.updateFocus(i,{target:i,type:"focus"})},updateFocus:function(i,o){var a=this.base.getFocusedElement(),s;a&&o.type==="click"&&this.lastMousedownTarget&&(e.util.isDescendant(a,this.lastMousedownTarget,!0)||n(this.base.extensions,this.lastMousedownTarget))&&(s=a),s||this.base.elements.some(function(u){return!s&&e.util.isDescendant(u,i,!0)&&(s=u),!!s},this);var l=!e.util.isDescendant(a,i,!0)&&!n(this.base.extensions,i);s!==a&&(a&&l&&(a.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",o,a)),s&&(s.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",o,s))),l&&this.triggerCustomEvent("externalInteraction",o)},updateInput:function(i,o){if(!!this.contentCache){var a=i.getAttribute("medium-editor-index"),s=i.innerHTML;s!==this.contentCache[a]&&this.triggerCustomEvent("editableInput",o,i),this.contentCache[a]=s}},handleDocumentSelectionChange:function(i){if(i.currentTarget&&i.currentTarget.activeElement){var o=i.currentTarget.activeElement,a;this.base.elements.some(function(s){return e.util.isDescendant(s,o,!0)?(a=s,!0):!1},this),a&&this.updateInput(a,{target:o,currentTarget:a})}},handleDocumentExecCommand:function(){var i=this.base.getFocusedElement();i&&this.updateInput(i,{target:i,currentTarget:i})},handleBodyClick:function(i){this.updateFocus(i.target,i)},handleBodyFocus:function(i){this.updateFocus(i.target,i)},handleBodyMousedown:function(i){this.lastMousedownTarget=i.target},handleInput:function(i){this.updateInput(i.currentTarget,i)},handleClick:function(i){this.triggerCustomEvent("editableClick",i,i.currentTarget)},handleBlur:function(i){this.triggerCustomEvent("editableBlur",i,i.currentTarget)},handleKeypress:function(i){if(this.triggerCustomEvent("editableKeypress",i,i.currentTarget),this.keypressUpdateInput){var o={target:i.target,currentTarget:i.currentTarget};setTimeout(function(){this.updateInput(o.currentTarget,o)}.bind(this),0)}},handleKeyup:function(i){this.triggerCustomEvent("editableKeyup",i,i.currentTarget)},handleMouseover:function(i){this.triggerCustomEvent("editableMouseover",i,i.currentTarget)},handleDragging:function(i){this.triggerCustomEvent("editableDrag",i,i.currentTarget)},handleDrop:function(i){this.triggerCustomEvent("editableDrop",i,i.currentTarget)},handlePaste:function(i){this.triggerCustomEvent("editablePaste",i,i.currentTarget)},handleKeydown:function(i){if(this.triggerCustomEvent("editableKeydown",i,i.currentTarget),e.util.isKey(i,e.util.keyCode.SPACE))return this.triggerCustomEvent("editableKeydownSpace",i,i.currentTarget);if(e.util.isKey(i,e.util.keyCode.ENTER)||i.ctrlKey&&e.util.isKey(i,e.util.keyCode.M))return this.triggerCustomEvent("editableKeydownEnter",i,i.currentTarget);if(e.util.isKey(i,e.util.keyCode.TAB))return this.triggerCustomEvent("editableKeydownTab",i,i.currentTarget);if(e.util.isKey(i,[e.util.keyCode.DELETE,e.util.keyCode.BACKSPACE]))return this.triggerCustomEvent("editableKeydownDelete",i,i.currentTarget)}},e.Events=r}(),function(){var n=e.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(r){n.isBuiltInButton(r)?e.Extension.call(this,this.defaults[r]):e.Extension.call(this,r)},init:function(){e.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return typeof this.action=="function"?this.action(this.base.options):this.action},getAria:function(){return typeof this.aria=="function"?this.aria(this.base.options):this.aria},getTagNames:function(){return typeof this.tagNames=="function"?this.tagNames(this.base.options):this.tagNames},createButton:function(){var r=this.document.createElement("button"),i=this.contentDefault,o=this.getAria(),a=this.getEditorOption("buttonLabels");return r.classList.add("medium-editor-action"),r.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(s){r.classList.add(s)}),r.setAttribute("data-action",this.getAction()),o&&(r.setAttribute("title",o),r.setAttribute("aria-label",o)),this.attrs&&Object.keys(this.attrs).forEach(function(s){r.setAttribute(s,this.attrs[s])},this),a==="fontawesome"&&this.contentFA&&(i=this.contentFA),r.innerHTML=i,r},handleClick:function(r){r.preventDefault(),r.stopPropagation();var i=this.getAction();i&&this.execAction(i)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var r=null;return this.useQueryState&&(r=this.base.queryCommandState(this.getAction())),r},isAlreadyApplied:function(r){var i=!1,o=this.getTagNames(),a,s;return this.knownState===!1||this.knownState===!0?this.knownState:(o&&o.length>0&&(i=o.indexOf(r.nodeName.toLowerCase())!==-1),!i&&this.style&&(a=this.style.value.split("|"),s=this.window.getComputedStyle(r,null).getPropertyValue(this.style.prop),a.forEach(function(l){this.knownState||(i=s.indexOf(l)!==-1,(i||this.style.prop!=="text-decoration")&&(this.knownState=i))},this)),i)}});n.isBuiltInButton=function(r){return typeof r=="string"&&e.extensions.button.prototype.defaults.hasOwnProperty(r)},e.extensions.button=n}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"<b>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>&bull;</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>&rarr;</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>&larr;</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>&ldquo;</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var n=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"&#10003;",formCloseLabel:"&times;",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return this.hasForm?this.getForm().classList.contains(this.activeClass):!1},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.hideToolbarDefaultActions()},setToolbarPosition:function(){var r=this.base.getExtensionByName("toolbar");r&&r.setToolbarPosition()}});e.extensions.form=n}(),function(){var n=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(r){r.preventDefault(),r.stopPropagation();var i=e.selection.getSelectionRange(this.document);return i.startContainer.nodeName.toLowerCase()==="a"||i.endContainer.nodeName.toLowerCase()==="a"||e.util.getClosestTag(e.selection.getSelectedParentElement(i),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(r){e.util.isKey(r,e.util.keyCode.K)&&e.util.isMetaCtrlKey(r)&&!r.shiftKey&&this.handleClick(r)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var r=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return r.push('<a href="#" class="medium-editor-toolbar-save">',this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),r.push('<a href="#" class="medium-editor-toolbar-close">',this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&r.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&r.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),r.join("")},isDisplayed:function(){return e.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){e.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(r){var i=this.getInput(),o=this.getAnchorTargetCheckbox(),a=this.getAnchorButtonCheckbox();if(r=r||{value:""},typeof r=="string"&&(r={value:r}),this.base.saveSelection(),this.hideToolbarDefaultActions(),e.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),i.value=r.value,i.focus(),o&&(o.checked=r.target==="_blank"),a){var s=r.buttonClass?r.buttonClass.split(" "):[];a.checked=s.indexOf(this.customClassOption)!==-1}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox(),o={value:this.getInput().value.trim()};return this.linkValidation&&(o.value=this.checkLinkFormat(o.value)),o.target="_self",r&&r.checked&&(o.target="_blank"),i&&i.checked&&(o.buttonClass=this.customClassOption),o},doFormSave:function(){var r=this.getFormOpts();this.completeFormSave(r)},completeFormSave:function(r){this.base.restoreSelection(),this.execAction(this.action,r),this.base.checkSelection()},ensureEncodedUri:function(r){return r===decodeURI(r)?encodeURI(r):r},ensureEncodedUriComponent:function(r){return r===decodeURIComponent(r)?encodeURIComponent(r):r},ensureEncodedParam:function(r){var i=r.split("="),o=i[0],a=i[1];return o+(a===void 0?"":"="+this.ensureEncodedUriComponent(a))},ensureEncodedQuery:function(r){return r.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(r){var i=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,o=i.test(r),a="",s=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,l=r.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),u=l[1],c=l[2],d=l[3];if(s.test(r))return"tel:"+r;if(!o){var f=u.split("/")[0];(f.match(/.+(\.|:).+/)||f==="localhost")&&(a="http://")}return a+this.ensureEncodedUri(u)+(c===void 0?"":"?"+this.ensureEncodedQuery(c))+(d===void 0?"":"#"+d)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(r){var i=r.querySelector(".medium-editor-toolbar-close"),o=r.querySelector(".medium-editor-toolbar-save"),a=r.querySelector(".medium-editor-toolbar-input");this.on(r,"click",this.handleFormClick.bind(this)),this.on(a,"keyup",this.handleTextboxKeyup.bind(this)),this.on(i,"click",this.handleCloseClick.bind(this)),this.on(o,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var r=this.document,i=r.createElement("div");return i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),i.innerHTML=this.getTemplate(),this.attachFormEvents(i),i},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(r){if(r.keyCode===e.util.keyCode.ENTER){r.preventDefault(),this.doFormSave();return}r.keyCode===e.util.keyCode.ESCAPE&&(r.preventDefault(),this.doFormCancel())},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.anchor=n}(),function(){var n=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var r=this.document.createElement("div");return r.id="medium-editor-anchor-preview-"+this.getEditorId(),r.className="medium-editor-anchor-preview",r.innerHTML=this.getTemplate(),this.on(r,"click",this.handleClick.bind(this)),r},getTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(r){return this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||r.getAttribute("data-disable-preview")?!0:(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=r.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=r.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=r,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(r){r=r||this.activeAnchor;var i=this.window.innerWidth,o=this.anchorPreview.offsetHeight,a=r.getBoundingClientRect(),s=this.diffLeft,l=this.diffTop,u=this.getEditorOption("elementsContainer"),c=["absolute","fixed"].indexOf(window.getComputedStyle(u).getPropertyValue("position"))>-1,d={},f,h,m,g,y;f=this.anchorPreview.offsetWidth/2;var b=this.base.getExtensionByName("toolbar");b&&(s=b.diffLeft,l=b.diffTop),h=s-f,c?(g=u.getBoundingClientRect(),["top","left"].forEach(function(w){d[w]=a[w]-g[w]}),d.width=a.width,d.height=a.height,a=d,i=g.width,y=u.scrollTop):y=this.window.pageYOffset,m=a.left+a.width/2,y+=o+a.top+a.height-l-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(y)+"px",this.anchorPreview.style.right="initial",m<f?(this.anchorPreview.style.left=h+f+"px",this.anchorPreview.style.right="initial"):i-m<f?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=h+m+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(r){var i=this.base.getExtensionByName("anchor"),o=this.activeAnchor;i&&o&&(r.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(o){var a={value:o.attributes.href.value,target:o.getAttribute("target"),buttonClass:o.getAttribute("class")};i.showForm(a),o=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(r){var i=e.util.getClosestTag(r.target,"a");if(i!==!1){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(i.outerHTML)||/href=["']#\S+["']/.test(i.outerHTML)))return!0;var o=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&o&&o.isDisplayed&&o.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==i&&this.detachPreviewHandlers(),this.anchorToPreview=i,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=new Date().getTime(),this.hovering=!0},handlePreviewMouseout:function(r){(!r.relatedTarget||!/anchor-preview/.test(r.relatedTarget.className))&&(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;var r=new Date().getTime()-this.lastOver;r>this.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=new Date().getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=n}(),function(){var n,r,i,o,a;n=[" "," ",`
  124. `,"\r","\xA0","\u2000","\u2001","\u2002","\u2003","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?\xAB\xBB\u201C\u201D\u2018\u2019])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i"),a=new RegExp(i,"gi");function s(u){return!e.util.getClosestTag(u,"a")}var l=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var u=0,c=0;c<this.window._mediumEditors.length;c++){var d=this.window._mediumEditors[c];d!==null&&d.getExtensionByName("autoLink")!==void 0&&u++}return u===1},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(u,c){this.performLinking(c)},onKeypress:function(u){this.disableEventHandling||e.util.isKey(u,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var c=this.base.exportSelection();this.performLinking(u.target)&&this.base.importSelection(c,!0)}catch(d){window.console&&window.console.error("Failed to perform linking",d),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(u){var c=e.util.splitByBlockElements(u),d=!1;c.length===0&&(c=[u]);for(var f=0;f<c.length;f++)d=this.removeObsoleteAutoLinkSpans(c[f])||d,d=this.performLinkingWithinElement(c[f])||d;return this.base.events.updateInput(u,{target:u,currentTarget:u}),d},removeObsoleteAutoLinkSpans:function(u){if(!u||u.nodeType===3)return!1;for(var c=u.querySelectorAll('span[data-auto-link="true"]'),d=!1,f=0;f<c.length;f++){var h=c[f].textContent;if(h.indexOf("://")===-1&&(h=e.util.ensureUrlHasProtocol(h)),c[f].getAttribute("data-href")!==h&&s(c[f])){d=!0;var m=h.replace(/\s+$/,"");if(c[f].getAttribute("data-href")===m){var g=h.length-m.length,y=e.util.splitOffDOMTree(c[f],this.splitTextBeforeEnd(c[f],g));c[f].parentNode.insertBefore(y,c[f].nextSibling)}else e.util.unwrap(c[f],this.document)}}return d},splitTextBeforeEnd:function(u,c){for(var d=this.document.createTreeWalker(u,NodeFilter.SHOW_TEXT,null,!1),f=!0;f;)f=d.lastChild()!==null;for(var h,m,g;c>0&&g!==null;)h=d.currentNode,m=h.nodeValue,m.length>c?(g=h.splitText(m.length-c),c=0):(g=d.previousNode(),c-=m.length);return g},performLinkingWithinElement:function(u){for(var c=this.findLinkableText(u),d=!1,f=0;f<c.length;f++){var h=e.util.findOrCreateMatchingTextNodes(this.document,u,c[f]);this.shouldNotLink(h)||this.createAutoLink(h,c[f].href)}return d},shouldNotLink:function(u){for(var c=!1,d=0;d<u.length&&c===!1;d++)c=!!e.util.traverseUp(u[d],function(f){return f.nodeName.toLowerCase()==="a"||f.getAttribute&&f.getAttribute("data-auto-link")==="true"});return c},findLinkableText:function(u){for(var c=u.textContent,d=null,f=[];(d=a.exec(c))!==null;){var h=!0,m=d.index+d[0].length;h=(d.index===0||n.indexOf(c[d.index-1])!==-1)&&(m===c.length||n.indexOf(c[m])!==-1),h=h&&(d[0].indexOf("/")!==-1||o.test(d[0].split(".").pop().split("?").shift())),h&&f.push({href:d[0],start:d.index,end:m})}return f},createAutoLink:function(u,c){c=e.util.ensureUrlHasProtocol(c);var d=e.util.createLink(this.document,u,c,this.getEditorOption("targetBlank")?"_blank":null),f=this.document.createElement("span");for(f.setAttribute("data-auto-link","true"),f.setAttribute("data-href",c),d.insertBefore(f,d.firstChild);d.childNodes.length>1;)f.appendChild(d.childNodes[1])}});e.extensions.autoLink=l}(),function(){var n="medium-editor-dragover";function r(o){var a=e.util.getContainerEditorElement(o),s=Array.prototype.slice.call(a.parentElement.querySelectorAll("."+n));s.forEach(function(l){l.classList.remove(n)})}var i=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(o){o.preventDefault(),o.dataTransfer.dropEffect="copy";var a=o.target.classList?o.target:o.target.parentElement;r(a),o.type==="dragover"&&a.classList.add(n)},handleDrop:function(o){o.preventDefault(),o.stopPropagation(),this.base.selectElement(o.target);var a=this.base.exportSelection();a.start=a.end,this.base.importSelection(a),o.dataTransfer.files&&Array.prototype.slice.call(o.dataTransfer.files).forEach(function(s){this.isAllowedFile(s)&&s.type.match("image")&&this.insertImageFile(s)},this),r(o.target)},isAllowedFile:function(o){return this.allowedTypes.some(function(a){return!!o.type.match(a)})},insertImageFile:function(o){if(typeof FileReader=="function"){var a=new FileReader;a.readAsDataURL(o),a.addEventListener("load",function(s){var l=this.document.createElement("img");l.src=s.target.result,e.util.insertHTMLCommand(this.document,l.outerHTML)}.bind(this))}}});e.extensions.fileDragging=i}(),function(){var n=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(r){var i=r.key.charCodeAt(0);this.keys[i]||(this.keys[i]=[]),this.keys[i].push(r)},this)},handleKeydown:function(r){var i=e.util.getKeyCode(r);if(!!this.keys[i]){var o=e.util.isMetaCtrlKey(r),a=!!r.shiftKey,s=!!r.altKey;this.keys[i].forEach(function(l){l.meta===o&&l.shift===a&&(l.alt===s||l.alt===void 0)&&(r.preventDefault(),r.stopPropagation(),typeof l.command=="function"?l.command.apply(this):l.command!==!1&&this.execAction(l.command))},this)}}});e.extensions.keyboardCommands=n}(),function(){var n=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"&#xB1;",contentFA:'<i class="fa fa-font"></i>',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var i=this.document.queryCommandValue("fontName")+"";this.showForm(i)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(r){var i=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),i.value=r||"",i.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var r=this.document,i=r.createElement("div"),o=r.createElement("select"),a=r.createElement("a"),s=r.createElement("a"),l;i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(i,"click",this.handleFormClick.bind(this));for(var u=0;u<this.fonts.length;u++)l=r.createElement("option"),l.innerHTML=this.fonts[u],l.value=this.fonts[u],o.appendChild(l);return o.className="medium-editor-toolbar-select",i.appendChild(o),this.on(o,"change",this.handleFontChange.bind(this)),s.setAttribute("href","#"),s.className="medium-editor-toobar-save",s.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-check"></i>':"&#10003;",i.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-times"></i>':"&times;",i.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),i},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("face")&&r.removeAttribute("face")})},handleFontChange:function(){var r=this.getSelect().value;r===""?this.clearFontName():this.execAction("fontName",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontName=n}(),function(){var n=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"&#xB1;",contentFA:'<i class="fa fa-text-height"></i>',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var i=this.document.queryCommandValue("fontSize")+"";this.showForm(i)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(r){var i=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),i.value=r||"",i.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var r=this.document,i=r.createElement("div"),o=r.createElement("input"),a=r.createElement("a"),s=r.createElement("a");return i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(i,"click",this.handleFormClick.bind(this)),o.setAttribute("type","range"),o.setAttribute("min","1"),o.setAttribute("max","7"),o.className="medium-editor-toolbar-input",i.appendChild(o),this.on(o,"change",this.handleSliderChange.bind(this)),s.setAttribute("href","#"),s.className="medium-editor-toobar-save",s.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-check"></i>':"&#10003;",i.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'<i class="fa fa-times"></i>':"&times;",i.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),i},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("size")&&r.removeAttribute("size")})},handleSliderChange:function(){var r=this.getInput().value;r==="4"?this.clearFontSize():this.execAction("fontSize",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=n}(),function(){var n="%ME_PASTEBIN%",r=null,i=null,o=function(u){u.stopPropagation()};function a(){return[[new RegExp(/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/&lt;(\/?)(i|b|a)&gt;/gi),"<$1$2>"],[new RegExp(/&lt;a(?:(?!href).)+href=(?:&quot;|&rdquo;|&ldquo;|"|“|”)(((?!&quot;|&rdquo;|&ldquo;|"|“|”).)*)(?:&quot;|&rdquo;|&ldquo;|"|“|”)(?:(?!&gt;).)*&gt;/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function s(u,c,d){var f=u.clipboardData||c.clipboardData||d.dataTransfer,h={};if(!f)return h;if(f.getData){var m=f.getData("Text");m&&m.length>0&&(h["text/plain"]=m)}if(f.types)for(var g=0;g<f.types.length;g++){var y=f.types[g];h[y]=f.getData(y)}return h}var l=e.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){e.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(u){this.on(u,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(u,c){this.on(c,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(u,c){if(!u.defaultPrevented){var d=s(u,this.window,this.document),f=d["text/html"],h=d["text/plain"];this.window.clipboardData&&u.clipboardData===void 0&&!f&&(f=h),(f||h)&&(u.preventDefault(),this.doPaste(f,h,c))}},doPaste:function(u,c,d){var f,h="",m;if(this.cleanPastedHTML&&u)return this.cleanPaste(u);if(!!c){if(this.getEditorOption("disableReturn")||d&&d.getAttribute("data-disable-return"))h=e.util.htmlEntities(c);else if(f=c.split(/[\r\n]+/g),f.length>1)for(m=0;m<f.length;m+=1)f[m]!==""&&(h+="<p>"+e.util.htmlEntities(f[m])+"</p>");else h=e.util.htmlEntities(f[0]);e.util.insertHTMLCommand(this.document,h)}},handlePasteBinPaste:function(u){if(u.defaultPrevented){this.removePasteBin();return}var c=s(u,this.window,this.document),d=c["text/html"],f=c["text/plain"],h=i;if(!this.cleanPastedHTML||d){u.preventDefault(),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h);return}setTimeout(function(){this.cleanPastedHTML&&(d=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h)}.bind(this),0)},handleKeydown:function(u,c){!(e.util.isKey(u,e.util.keyCode.V)&&e.util.isMetaCtrlKey(u))||(u.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(c))},createPasteBin:function(u){var c,d=e.selection.getSelectionRange(this.document),f=this.window.pageYOffset;i=u,d&&(c=d.getClientRects(),c.length?f+=c[0].top:d.startContainer.getBoundingClientRect!==void 0?f+=d.startContainer.getBoundingClientRect().top:f+=d.getBoundingClientRect().top),r=d;var h=this.document.createElement("div");h.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),h.setAttribute("style","border: 1px red solid; position: absolute; top: "+f+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),h.setAttribute("contentEditable",!0),h.innerHTML=n,this.document.body.appendChild(h),this.on(h,"focus",o),this.on(h,"focusin",o),this.on(h,"focusout",o),h.focus(),e.selection.selectNode(h,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(h,"paste",this.boundHandlePaste)},removePasteBin:function(){r!==null&&(e.selection.selectRange(this.document,r),r=null),i!==null&&(i=null);var u=this.getPasteBin();!u||u&&(this.off(u,"focus",o),this.off(u,"focusin",o),this.off(u,"focusout",o),this.off(u,"paste",this.boundHandlePaste),u.parentElement.removeChild(u))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var u=this.getPasteBin();if(!u||u.firstChild&&u.firstChild.id==="mcepastebin")return!1;var c=u.innerHTML;return!c||c===n?!1:c},cleanPaste:function(u){var c,d,f,h,m=/<p|<br|<div/.test(u),g=[].concat(this.preCleanReplacements||[],a(),this.cleanReplacements||[]);for(c=0;c<g.length;c+=1)u=u.replace(g[c][0],g[c][1]);if(!m)return this.pasteHTML(u);for(f=this.document.createElement("div"),f.innerHTML="<p>"+u.split("<br><br>").join("</p><p>")+"</p>",d=f.querySelectorAll("a,p,div,br"),c=0;c<d.length;c+=1)switch(h=d[c],h.innerHTML=h.innerHTML.replace(/\n/gi," "),h.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(h);break;case"br":this.filterLineBreak(h);break}this.pasteHTML(f.innerHTML)},pasteHTML:function(u,c){c=e.util.defaults({},c,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var d,f,h,m,g=this.document.createDocumentFragment();for(g.appendChild(this.document.createElement("body")),m=g.querySelector("body"),m.innerHTML=u,this.cleanupSpans(m),d=m.querySelectorAll("*"),h=0;h<d.length;h+=1)f=d[h],f.nodeName.toLowerCase()==="a"&&this.getEditorOption("targetBlank")&&e.util.setTargetBlank(f),e.util.cleanupAttrs(f,c.cleanAttrs),e.util.cleanupTags(f,c.cleanTags),e.util.unwrapTags(f,c.unwrapTags);e.util.insertHTMLCommand(this.document,m.innerHTML.replace(/&nbsp;/g," "))},isCommonBlock:function(u){return u&&(u.nodeName.toLowerCase()==="p"||u.nodeName.toLowerCase()==="div")},filterCommonBlocks:function(u){/^\s*$/.test(u.textContent)&&u.parentNode&&u.parentNode.removeChild(u)},filterLineBreak:function(u){this.isCommonBlock(u.previousElementSibling)?this.removeWithParent(u):this.isCommonBlock(u.parentNode)&&(u.parentNode.firstChild===u||u.parentNode.lastChild===u)?this.removeWithParent(u):u.parentNode&&u.parentNode.childElementCount===1&&u.parentNode.textContent===""&&this.removeWithParent(u)},removeWithParent:function(u){u&&u.parentNode&&(u.parentNode.parentNode&&u.parentNode.childElementCount===1?u.parentNode.parentNode.removeChild(u.parentNode):u.parentNode.removeChild(u))},cleanupSpans:function(u){var c,d,f,h=u.querySelectorAll(".replace-with"),m=function(g){return g&&g.nodeName!=="#text"&&g.getAttribute("contenteditable")==="false"};for(c=0;c<h.length;c+=1)d=h[c],f=this.document.createElement(d.classList.contains("bold")?"b":"i"),d.classList.contains("bold")&&d.classList.contains("italic")?f.innerHTML="<i>"+d.innerHTML+"</i>":f.innerHTML=d.innerHTML,d.parentNode.replaceChild(f,d);for(h=u.querySelectorAll("span"),c=0;c<h.length;c+=1){if(d=h[c],e.util.traverseUp(d,m))return!1;e.util.unwrap(d,this.document)}}});e.extensions.paste=l}(),function(){var n=e.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(r,i){this.initElement(i)},initElement:function(r){r.getAttribute("data-placeholder")||r.setAttribute("data-placeholder",this.text),this.updatePlaceholder(r)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(r,i){this.cleanupElement(i)},cleanupElement:function(r){r.getAttribute("data-placeholder")===this.text&&r.removeAttribute("data-placeholder")},showPlaceholder:function(r){r&&(e.util.isFF&&r.childNodes.length===0?(r.classList.add("medium-editor-placeholder-relative"),r.classList.remove("medium-editor-placeholder")):(r.classList.add("medium-editor-placeholder"),r.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(r){r&&(r.classList.remove("medium-editor-placeholder"),r.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(r,i){if(r.querySelector("img, blockquote, ul, ol, table")||r.textContent.replace(/^\s+|\s+$/g,"")!=="")return this.hidePlaceholder(r);i||this.showPlaceholder(r)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(r,i){var o=this.hideOnClick&&i===this.base.getFocusedElement();this.updatePlaceholder(i,o)},handleFocus:function(r,i){this.hidePlaceholder(i)},handleBlur:function(r,i){this.updatePlaceholder(i)}});e.extensions.placeholder=n}(),function(){var n=e.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(r,i){return this.base.extensions.forEach(function(o){if(o!==this)return r.apply(i||this,arguments)},this)},createToolbar:function(){var r=this.document.createElement("div");return r.id="medium-editor-toolbar-"+this.getEditorId(),r.className="medium-editor-toolbar",this.static?r.className+=" static-toolbar":this.relativeContainer?r.className+=" medium-editor-relative-toolbar":r.className+=" medium-editor-stalker-toolbar",r.appendChild(this.createToolbarButtons()),this.forEachExtension(function(i){i.hasForm&&r.appendChild(i.getForm())}),this.attachEventHandlers(),r},createToolbarButtons:function(){var r=this.document.createElement("ul"),i,o,a,s,l,u;return r.id="medium-editor-toolbar-actions"+this.getEditorId(),r.className="medium-editor-toolbar-actions",r.style.display="block",this.buttons.forEach(function(c){typeof c=="string"?(l=c,u=null):(l=c.name,u=c),s=this.base.addBuiltInExtension(l,u),s&&typeof s.getButton=="function"&&(o=s.getButton(this.base),i=this.document.createElement("li"),e.util.isElement(o)?i.appendChild(o):i.innerHTML=o,r.appendChild(i))},this),a=r.querySelectorAll("button"),a.length>0&&(a[0].classList.add(this.firstButtonClass),a[a.length-1].classList.add(this.lastButtonClass)),r},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(r){if(r&&r.target&&e.util.isDescendant(this.getToolbarElement(),r.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return this.getToolbarActionsElement().style.display==="block"},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(r){r.hasForm&&r.isDisplayed()&&r.hideForm()})},multipleBlockElementsSelected:function(){var r=/<[^\/>][^>]*><\/[^>]+>/gim,i=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),o=e.selection.getSelectionHtml(this.document).replace(r,""),a=o.match(i);return!!a&&a.length>1},modifySelection:function(){var r=this.window.getSelection(),i=r.getRangeAt(0);if(this.standardizeSelectionStart&&i.startContainer.nodeValue&&i.startOffset===i.startContainer.nodeValue.length){var o=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),i.startContainer,this.document);if(o){for(var a=0;o.nodeValue.substr(a,1).trim().length===0;)a=a+1;i=e.selection.select(this.document,o,a,i.endContainer,i.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var r=e.selection.getSelectionElement(this.window);if(!r||this.getEditorElements().indexOf(r)===-1||r.getAttribute("data-disable-toolbar"))return this.hideToolbar();if(this.updateOnEmptySelection&&this.static)return this.showAndUpdateToolbar();if(!e.selection.selectionContainsContent(this.document)||this.allowMultiParagraphSelection===!1&&this.multipleBlockElementsSelected())return this.hideToolbar();this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(r){typeof r.isActive=="function"&&typeof r.setInactive=="function"&&r.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var r=[],i=null,o=e.selection.getSelectionRange(this.document),a,s=function(l){typeof l.checkState=="function"?l.checkState(a):typeof l.isActive=="function"&&typeof l.isAlreadyApplied=="function"&&typeof l.setActive=="function"&&!l.isActive()&&l.isAlreadyApplied(a)&&l.setActive()};if(!!o&&(this.forEachExtension(function(l){if(typeof l.queryCommandState=="function"&&(i=l.queryCommandState(),i!==null)){i&&typeof l.setActive=="function"&&l.setActive();return}r.push(l)}),a=e.selection.getSelectedParentElement(o),!!this.getEditorElements().some(function(l){return e.util.isDescendant(l,a,!0)})))for(;a&&(r.forEach(s),!e.util.isMediumEditorElement(a));)a=a.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var r=this.base.getFocusedElement(),i=this.window.getSelection();if(!r)return this;(this.static||!i.isCollapsed)&&(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(r):this.positionToolbar(i)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(r){this.getToolbarElement().style.left="0";var i=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,o=this.window.innerWidth,a=this.getToolbarElement(),s=r.getBoundingClientRect(),l=s.top+i,u=s.left+s.width/2,c=a.offsetHeight,d=a.offsetWidth,f=d/2,h;switch(this.sticky?i>l+r.offsetHeight-c-this.stickyTopOffset?(a.style.top=l+r.offsetHeight-c+"px",a.classList.remove("medium-editor-sticky-toolbar")):i>l-c-this.stickyTopOffset?(a.classList.add("medium-editor-sticky-toolbar"),a.style.top=this.stickyTopOffset+"px"):(a.classList.remove("medium-editor-sticky-toolbar"),a.style.top=l-c+"px"):a.style.top=l-c+"px",this.align){case"left":h=s.left;break;case"right":h=s.right-d;break;case"center":h=u-f;break}h<0?h=0:h+d>o&&(h=o-Math.ceil(d)-1),a.style.left=h+"px"},positionToolbar:function(r){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var i=r.getRangeAt(0),o=i.getBoundingClientRect();(!o||o.height===0&&o.width===0&&i.startContainer===i.endContainer)&&(i.startContainer.nodeType===1&&i.startContainer.querySelector("img")?o=i.startContainer.querySelector("img").getBoundingClientRect():o=i.startContainer.getBoundingClientRect());var a=this.window.innerWidth,s=this.getToolbarElement(),l=s.offsetHeight,u=s.offsetWidth,c=u/2,d=50,f=this.diffLeft-c,h=this.getEditorOption("elementsContainer"),m=["absolute","fixed"].indexOf(window.getComputedStyle(h).getPropertyValue("position"))>-1,g={},y={},b,w;m?(w=h.getBoundingClientRect(),["top","left"].forEach(function(O){y[O]=o[O]-w[O]}),y.width=o.width,y.height=o.height,o=y,a=w.width,g.top=h.scrollTop):g.top=this.window.pageYOffset,b=o.left+o.width/2,g.top+=o.top-l,o.top<d?(s.classList.add("medium-toolbar-arrow-over"),s.classList.remove("medium-toolbar-arrow-under"),g.top+=d+o.height-this.diffTop):(s.classList.add("medium-toolbar-arrow-under"),s.classList.remove("medium-toolbar-arrow-over"),g.top+=this.diffTop),b<c?(g.left=f+c,g.right="initial"):a-b<c?(g.left="auto",g.right=0):(g.left=f+b,g.right="initial"),["top","left","right"].forEach(function(O){s.style[O]=g[O]+(isNaN(g[O])?"":"px")})}});e.extensions.toolbar=n}(),function(){var n=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(r){var i="medium-editor-dragover";r.preventDefault(),r.dataTransfer.dropEffect="copy",r.type==="dragover"?r.target.classList.add(i):r.type==="dragleave"&&r.target.classList.remove(i)},handleDrop:function(r){var i="medium-editor-dragover",o;r.preventDefault(),r.stopPropagation(),r.dataTransfer.files&&(o=Array.prototype.slice.call(r.dataTransfer.files,0),o.some(function(a){if(a.type.match("image")){var s,l;s=new FileReader,s.readAsDataURL(a),l="medium-img-"+ +new Date,e.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+l+'" />'),s.onload=function(){var u=this.document.getElementById(l);u&&(u.removeAttribute("id"),u.removeAttribute("class"),u.src=s.result)}.bind(this)}}.bind(this))),r.target.classList.remove(i)}});e.extensions.imageDragging=n}(),function(){function n($){var W=e.selection.getSelectionStart(this.options.ownerDocument),L=W.textContent,I=e.selection.getCaretOffsets(W);(L[I.left-1]===void 0||L[I.left-1].trim()===""||L[I.left]!==void 0&&L[I.left].trim()==="")&&$.preventDefault()}function r($,W){if(this.options.disableReturn||W.getAttribute("data-disable-return"))$.preventDefault();else if(this.options.disableDoubleReturn||W.getAttribute("data-disable-double-return")){var L=e.selection.getSelectionStart(this.options.ownerDocument);(L&&L.textContent.trim()===""&&L.nodeName.toLowerCase()!=="li"||L.previousElementSibling&&L.previousElementSibling.nodeName.toLowerCase()!=="br"&&L.previousElementSibling.textContent.trim()==="")&&$.preventDefault()}}function i($){var W=e.selection.getSelectionStart(this.options.ownerDocument),L=W&&W.nodeName.toLowerCase();L==="pre"&&($.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(W)&&($.preventDefault(),$.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function o($){var W,L=e.selection.getSelectionStart(this.options.ownerDocument),I=L.nodeName.toLowerCase(),U=/^(\s+|<br\/?>)?$/i,Q=/h\d/i;e.util.isKey($,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&L.previousElementSibling&&Q.test(I)&&e.selection.getCaretOffsets(L).left===0?e.util.isKey($,e.util.keyCode.BACKSPACE)&&U.test(L.previousElementSibling.innerHTML)?(L.previousElementSibling.parentNode.removeChild(L.previousElementSibling),$.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey($,e.util.keyCode.ENTER)&&(W=this.options.ownerDocument.createElement("p"),W.innerHTML="<br>",L.previousElementSibling.parentNode.insertBefore(W,L),$.preventDefault()):e.util.isKey($,e.util.keyCode.DELETE)&&L.nextElementSibling&&L.previousElementSibling&&!Q.test(I)&&U.test(L.innerHTML)&&Q.test(L.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,L.nextElementSibling),L.previousElementSibling.parentNode.removeChild(L),$.preventDefault()):e.util.isKey($,e.util.keyCode.BACKSPACE)&&I==="li"&&U.test(L.innerHTML)&&!L.previousElementSibling&&!L.parentElement.previousElementSibling&&L.nextElementSibling&&L.nextElementSibling.nodeName.toLowerCase()==="li"?(W=this.options.ownerDocument.createElement("p"),W.innerHTML="<br>",L.parentElement.parentElement.insertBefore(W,L.parentElement),e.selection.moveCursor(this.options.ownerDocument,W),L.parentElement.removeChild(L),$.preventDefault()):e.util.isKey($,e.util.keyCode.BACKSPACE)&&e.util.getClosestTag(L,"blockquote")!==!1&&e.selection.getCaretOffsets(L).left===0?($.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey($,e.util.keyCode.ENTER)&&e.util.getClosestTag(L,"blockquote")!==!1&&e.selection.getCaretOffsets(L).right===0?(W=this.options.ownerDocument.createElement("p"),W.innerHTML="<br>",L.parentElement.insertBefore(W,L.nextSibling),e.selection.moveCursor(this.options.ownerDocument,W),$.preventDefault()):e.util.isKey($,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(L.parentElement)&&!L.previousElementSibling&&L.nextElementSibling&&U.test(L.innerHTML)&&($.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,L.nextSibling),L.parentElement.removeChild(L))}function a($){var W=e.selection.getSelectionStart(this.options.ownerDocument),L;!W||(e.util.isMediumEditorElement(W)&&W.children.length===0&&!e.util.isBlockContainer(W)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),e.util.isKey($,e.util.keyCode.ENTER)&&!e.util.isListItem(W)&&!e.util.isBlockContainer(W)&&(L=W.nodeName.toLowerCase(),L==="a"?this.options.ownerDocument.execCommand("unlink",!1,null):!$.shiftKey&&!$.ctrlKey&&this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function s($,W){var L=W.parentNode.querySelector('textarea[medium-editor-textarea-id="'+W.getAttribute("medium-editor-textarea-id")+'"]');L&&(L.value=W.innerHTML.trim())}function l($){$._mediumEditors||($._mediumEditors=[null]),this.id||(this.id=$._mediumEditors.length),$._mediumEditors[this.id]=this}function u($){!$._mediumEditors||!$._mediumEditors[this.id]||($._mediumEditors[this.id]=null)}function c($,W,L){var I=[];if($||($=[]),typeof $=="string"&&($=W.querySelectorAll($)),e.util.isElement($)&&($=[$]),L)for(var U=0;U<$.length;U++){var Q=$[U];e.util.isElement(Q)&&!Q.getAttribute("data-medium-editor-element")&&!Q.getAttribute("medium-editor-textarea-id")&&I.push(Q)}else I=Array.prototype.slice.apply($);return I}function d($){var W=$.parentNode.querySelector('textarea[medium-editor-textarea-id="'+$.getAttribute("medium-editor-textarea-id")+'"]');W&&(W.classList.remove("medium-editor-hidden"),W.removeAttribute("medium-editor-textarea-id")),$.parentNode&&$.parentNode.removeChild($)}function f($,W){return Object.keys(W).forEach(function(L){$[L]===void 0&&($[L]=W[L])}),$}function h($,W,L){var I={window:L.options.contentWindow,document:L.options.ownerDocument,base:L};return $=f($,I),typeof $.init=="function"&&$.init(),$.name||($.name=W),$}function m(){return this.elements.every(function($){return!!$.getAttribute("data-disable-toolbar")})?!1:this.options.toolbar!==!1}function g(){return m.call(this)?this.options.anchorPreview!==!1:!1}function y(){return this.options.placeholder!==!1}function b(){return this.options.autoLink!==!1}function w(){return this.options.imageDragging!==!1}function O(){return this.options.keyboardCommands!==!1}function S(){return!this.options.extensions.imageDragging}function x($){for(var W=this.options.ownerDocument.createElement("div"),L=Date.now(),I="medium-editor-"+L,U=$.attributes;this.options.ownerDocument.getElementById(I);)L++,I="medium-editor-"+L;W.className=$.className,W.id=I,W.innerHTML=$.value,$.setAttribute("medium-editor-textarea-id",I);for(var Q=0,V=U.length;Q<V;Q++)W.hasAttribute(U[Q].nodeName)||W.setAttribute(U[Q].nodeName,U[Q].value);return $.form&&this.on($.form,"reset",function(q){q.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(I))}.bind(this)),$.classList.add("medium-editor-hidden"),$.parentNode.insertBefore(W,$),W}function C($,W){if(!$.getAttribute("data-medium-editor-element")){$.nodeName.toLowerCase()==="textarea"&&($=x.call(this,$),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=s.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),!this.options.disableEditing&&!$.getAttribute("data-disable-editing")&&($.setAttribute("contentEditable",!0),$.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||($.getAttribute("data-disable-return")||$.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=r.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),!this.options.disableReturn&&!$.getAttribute("data-disable-return")&&this.on($,"keyup",a.bind(this));var L=e.util.guid();$.setAttribute("data-medium-editor-element",!0),$.classList.add("medium-editor-element"),$.setAttribute("role","textbox"),$.setAttribute("aria-multiline",!0),$.setAttribute("data-medium-editor-editor-index",W),$.setAttribute("medium-editor-index",L),N[L]=$.innerHTML,this.events.attachAllEventsToElement($)}return $}function E(){this.subscribe("editableKeydownTab",i.bind(this)),this.subscribe("editableKeydownDelete",o.bind(this)),this.subscribe("editableKeydownEnter",o.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",n.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=r.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function T(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(U){U!=="toolbar"&&this.options.extensions[U]&&this.extensions.push(h(this.options.extensions[U],U,this))},this),S.call(this)){var $=this.options.fileDragging;$||($={},w.call(this)||($.allowedTypes=[])),this.addBuiltInExtension("fileDragging",$)}var W={paste:!0,"anchor-preview":g.call(this),autoLink:b.call(this),keyboardCommands:O.call(this),placeholder:y.call(this)};Object.keys(W).forEach(function(U){W[U]&&this.addBuiltInExtension(U)},this);var L=this.options.extensions.toolbar;if(!L&&m.call(this)){var I=e.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});L=new e.extensions.toolbar(I)}L&&this.extensions.push(h(L,"toolbar",this))}function P($,W){var L=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return W&&L.forEach(function(I){W.hasOwnProperty(I[0])&&W[I[0]]!==void 0&&e.util.deprecated(I[0],I[1],"v6.0.0")}),e.util.defaults({},W,$)}function A($,W){var L=/^append-(.+)$/gi,I=/justify([A-Za-z]*)$/g,U,Q;if(U=L.exec($),U)return e.util.execFormatBlock(this.options.ownerDocument,U[1]);if($==="fontSize")return W.size&&e.util.deprecated(".size option for fontSize command",".value","6.0.0"),Q=W.value||W.size,this.options.ownerDocument.execCommand("fontSize",!1,Q);if($==="fontName")return W.name&&e.util.deprecated(".name option for fontName command",".value","6.0.0"),Q=W.value||W.name,this.options.ownerDocument.execCommand("fontName",!1,Q);if($==="createLink")return this.createLink(W);if($==="image"){var V=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,V)}if($==="html"){var q=this.options.contentWindow.getSelection().toString().trim();return e.util.insertHTMLCommand(this.options.ownerDocument,q)}if(I.exec($)){var K=this.options.ownerDocument.execCommand($,!1,null),ie=e.selection.getSelectedParentElement(e.selection.getSelectionRange(this.options.ownerDocument));return ie&&D.call(this,e.util.getTopBlockContainer(ie)),K}return Q=W&&W.value,this.options.ownerDocument.execCommand($,!1,Q)}function D($){if(!!$){var W,L=Array.prototype.slice.call($.childNodes).filter(function(I){var U=I.nodeName.toLowerCase()==="div";return U&&!W&&(W=I.style.textAlign),U});L.length&&(this.saveSelection(),L.forEach(function(I){if(I.style.textAlign===W){var U=I.lastChild;if(U){e.util.unwrap(I,this.options.ownerDocument);var Q=this.options.ownerDocument.createElement("BR");U.parentNode.insertBefore(Q,U.nextSibling)}}},this),$.style.textAlign=W,this.restoreSelection())}}var N={};e.prototype={init:function($,W){return this.options=P.call(this,this.defaults,W),this.origElements=$,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(l.call(this,this.options.contentWindow),this.events=new e.Events(this),this.elements=[],this.addElements(this.origElements),this.elements.length!==0&&(this.isActive=!0,T.call(this),E.call(this)))},destroy:function(){!this.isActive||(this.isActive=!1,this.extensions.forEach(function($){typeof $.destroy=="function"&&$.destroy()},this),this.events.destroy(),this.elements.forEach(function($){this.options.spellcheck&&($.innerHTML=$.innerHTML),$.removeAttribute("contentEditable"),$.removeAttribute("spellcheck"),$.removeAttribute("data-medium-editor-element"),$.classList.remove("medium-editor-element"),$.removeAttribute("role"),$.removeAttribute("aria-multiline"),$.removeAttribute("medium-editor-index"),$.removeAttribute("data-medium-editor-editor-index"),$.getAttribute("medium-editor-textarea-id")&&d($)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,u.call(this,this.options.contentWindow))},on:function($,W,L,I){return this.events.attachDOMEvent($,W,L,I),this},off:function($,W,L,I){return this.events.detachDOMEvent($,W,L,I),this},subscribe:function($,W){return this.events.attachCustomEvent($,W),this},unsubscribe:function($,W){return this.events.detachCustomEvent($,W),this},trigger:function($,W,L){return this.events.triggerCustomEvent($,W,L),this},delay:function($){var W=this;return setTimeout(function(){W.isActive&&$()},this.options.delay)},serialize:function(){var $,W,L={},I=this.elements.length;for($=0;$<I;$+=1)W=this.elements[$].id!==""?this.elements[$].id:"element-"+$,L[W]={value:this.elements[$].innerHTML.trim()};return L},getExtensionByName:function($){var W;return this.extensions&&this.extensions.length&&this.extensions.some(function(L){return L.name===$?(W=L,!0):!1}),W},addBuiltInExtension:function($,W){var L=this.getExtensionByName($),I;if(L)return L;switch($){case"anchor":I=e.util.extend({},this.options.anchor,W),L=new e.extensions.anchor(I);break;case"anchor-preview":L=new e.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":L=new e.extensions.autoLink;break;case"fileDragging":L=new e.extensions.fileDragging(W);break;case"fontname":L=new e.extensions.fontName(this.options.fontName);break;case"fontsize":L=new e.extensions.fontSize(W);break;case"keyboardCommands":L=new e.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":L=new e.extensions.paste(this.options.paste);break;case"placeholder":L=new e.extensions.placeholder(this.options.placeholder);break;default:e.extensions.button.isBuiltInButton($)&&(W?(I=e.util.defaults({},W,e.extensions.button.prototype.defaults[$]),L=new e.extensions.button(I)):L=new e.extensions.button($))}return L&&this.extensions.push(h(L,$,this)),L},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var $=this.getExtensionByName("toolbar");return $&&$.checkState(),this},queryCommandState:function($){var W=/^full-(.+)$/gi,L,I=null;L=W.exec($),L&&($=L[1]);try{I=this.options.ownerDocument.queryCommandState($)}catch{I=null}return I},execAction:function($,W){var L=/^full-(.+)$/gi,I,U;return I=L.exec($),I?(this.saveSelection(),this.selectAllContents(),U=A.call(this,I[1],W),this.restoreSelection()):U=A.call(this,$,W),($==="insertunorderedlist"||$==="insertorderedlist")&&e.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),U},getSelectedParentElement:function($){return $===void 0&&($=this.options.contentWindow.getSelection().getRangeAt(0)),e.selection.getSelectedParentElement($)},selectAllContents:function(){var $=e.selection.getSelectionElement(this.options.contentWindow);if($){for(;$.children.length===1;)$=$.children[0];this.selectElement($)}},selectElement:function($){e.selection.selectNode($,this.options.ownerDocument);var W=e.selection.getSelectionElement(this.options.contentWindow);W&&this.events.focusElement(W)},getFocusedElement:function(){var $;return this.elements.some(function(W){return!$&&W.getAttribute("data-medium-focused")&&($=W),!!$},this),$},exportSelection:function(){var $=e.selection.getSelectionElement(this.options.contentWindow),W=this.elements.indexOf($),L=null;return W>=0&&(L=e.selection.exportSelection($,this.options.ownerDocument)),L!==null&&W!==0&&(L.editableElementIndex=W),L},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function($,W){if(!!$){var L=this.elements[$.editableElementIndex||0];e.selection.importSelection($,L,this.options.ownerDocument,W)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function($){var W=e.selection.getSelectionElement(this.options.contentWindow),L={},I;if(this.elements.indexOf(W)!==-1){try{if(this.events.disableCustomEvent("editableInput"),$.url&&e.util.deprecated(".url option for createLink",".value","6.0.0"),I=$.url||$.value,I&&I.trim().length>0){var U=this.options.contentWindow.getSelection();if(U){var Q=U.getRangeAt(0),V=Q.commonAncestorContainer,q,K,ie,oe;if(Q.endContainer.nodeType===3&&Q.startContainer.nodeType!==3&&Q.startOffset===0&&Q.startContainer.firstChild===Q.endContainer&&(V=Q.endContainer),K=e.util.getClosestBlockContainer(Q.startContainer),ie=e.util.getClosestBlockContainer(Q.endContainer),V.nodeType!==3&&V.textContent.length!==0&&K===ie){var Se=K||W,ke=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),q=this.exportSelection(),ke.appendChild(Se.cloneNode(!0)),W===Se?e.selection.select(this.options.ownerDocument,Se.firstChild,0,Se.lastChild,Se.lastChild.nodeType===3?Se.lastChild.nodeValue.length:Se.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,Se,0,Se,Se.childNodes.length);var Y=this.exportSelection();oe=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,ke,{start:q.start-Y.start,end:q.end-Y.start,editableElementIndex:q.editableElementIndex}),oe.length===0&&(ke=this.options.ownerDocument.createDocumentFragment(),ke.appendChild(V.cloneNode(!0)),oe=[ke.firstChild.firstChild,ke.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,oe,I.trim());var re=(ke.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,ke.firstChild.innerHTML.replace(/^\s+/,"")),q.start-=re,q.end-=re,this.importSelection(q)}else this.options.ownerDocument.execCommand("createLink",!1,I);this.options.targetBlank||$.target==="_blank"?e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),I):e.util.removeTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),I),$.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),$.buttonClass)}}if(this.options.targetBlank||$.target==="_blank"||$.buttonClass){L=this.options.ownerDocument.createEvent("HTMLEvents"),L.initEvent("input",!0,!0,this.options.contentWindow);for(var te=0,ge=this.elements.length;te<ge;te+=1)this.elements[te].dispatchEvent(L)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",L,W)}},cleanPaste:function($){this.getExtensionByName("paste").cleanPaste($)},pasteHTML:function($,W){this.getExtensionByName("paste").pasteHTML($,W)},setContent:function($,W){if(W=W||0,this.elements[W]){var L=this.elements[W];L.innerHTML=$,this.checkContentChanged(L)}},getContent:function($){return $=$||0,this.elements[$]?this.elements[$].innerHTML.trim():null},checkContentChanged:function($){$=$||e.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput($,{target:$,currentTarget:$})},resetContent:function($){if($){var W=this.elements.indexOf($);W!==-1&&this.setContent(N[$.getAttribute("medium-editor-index")],W);return}this.elements.forEach(function(L,I){this.setContent(N[L.getAttribute("medium-editor-index")],I)},this)},addElements:function($){var W=c($,this.options.ownerDocument,!0);if(W.length===0)return!1;W.forEach(function(L){L=C.call(this,L,this.id),this.elements.push(L),this.trigger("addElement",{target:L,currentTarget:L},L)},this)},removeElements:function($){var W=c($,this.options.ownerDocument),L=W.map(function(I){return I.getAttribute("medium-editor-textarea-id")&&I.parentNode?I.parentNode.querySelector('div[medium-editor-textarea-id="'+I.getAttribute("medium-editor-textarea-id")+'"]'):I});this.elements=this.elements.filter(function(I){return L.indexOf(I)!==-1?(this.events.cleanupElement(I),I.getAttribute("medium-editor-textarea-id")&&d(I),this.trigger("removeElement",{target:I,currentTarget:I},I),!1):!0},this)}},e.getEditorFromElement=function($){var W=$.getAttribute("data-medium-editor-editor-index"),L=$&&$.ownerDocument&&($.ownerDocument.defaultView||$.ownerDocument.parentWindow);return L&&L._mediumEditors&&L._mediumEditors[W]?L._mediumEditors[W]:null}}(),function(){e.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),e.parseVersionString=function(n){var r=n.split("-"),i=r[0].split("."),o=r.length>1?r[1]:"";return{major:parseInt(i[0],10),minor:parseInt(i[1],10),revision:parseInt(i[2],10),preRelease:o,toString:function(){return[i[0],i[1],i[2]].join(".")+(o?"-"+o:"")}}},e.version=e.parseVersionString.call(this,"5.23.3"),e}())})(wX);var _S=wX.exports;/*!
  125. * vanilla-picker v2.12.3
  126. * https://vanilla-picker.js.org
  127. *
  128. * Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
  129. * Released under the ISC license.
  130. */var XN=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ZN=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),IO=function(){function t(e,n){var r=[],i=!0,o=!1,a=void 0;try{for(var s=e[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(r.push(l.value),!(n&&r.length===n));i=!0);}catch(u){o=!0,a=u}finally{try{!i&&s.return&&s.return()}finally{if(o)throw a}}return r}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();String.prototype.startsWith=String.prototype.startsWith||function(t){return this.indexOf(t)===0};String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var fUe={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function hF(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var hUe=function(){function t(e,n,r,i){XN(this,t);var o=this;function a(l){if(l.startsWith("hsl")){var u=l.match(/([\-\d\.e]+)/g).map(Number),c=IO(u,4),d=c[0],f=c[1],h=c[2],m=c[3];m===void 0&&(m=1),d/=360,f/=100,h/=100,o.hsla=[d,f,h,m]}else if(l.startsWith("rgb")){var g=l.match(/([\-\d\.e]+)/g).map(Number),y=IO(g,4),b=y[0],w=y[1],O=y[2],S=y[3];S===void 0&&(S=1),o.rgba=[b,w,O,S]}else l.startsWith("#")?o.rgba=t.hexToRgb(l):o.rgba=t.nameToRgb(l)||t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(r===void 0){var s=e&&""+e;s&&a(s.toLowerCase())}else this.rgba=[e,n,r,i===void 0?1:i]}return ZN(t,[{key:"printRGB",value:function(n){var r=n?this.rgba:this.rgba.slice(0,3),i=r.map(function(o,a){return hF(o,a===3?3:0)});return n?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(n){var r=[360,100,100,1],i=["","%","%",""],o=n?this.hsla:this.hsla.slice(0,3),a=o.map(function(s,l){return hF(s*r[l],l===3?3:1)+i[l]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var r=this.hex;return n?r:r.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length===3&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){n.length===3&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba,r=n.map(function(i,o){return o<3?i.toString(16):Math.round(i*255).toString(16)});return"#"+r.map(function(i){return i.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var r=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!r.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=r.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(o){return parseInt(o,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var r=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=fUe[r];return i===void 0?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var r=IO(n,4),i=r[0],o=r[1],a=r[2],s=r[3];i/=255,o/=255,a/=255;var l=Math.max(i,o,a),u=Math.min(i,o,a),c=void 0,d=void 0,f=(l+u)/2;if(l===u)c=d=0;else{var h=l-u;switch(d=f>.5?h/(2-l-u):h/(l+u),l){case i:c=(o-a)/h+(o<a?6:0);break;case o:c=(a-i)/h+2;break;case a:c=(i-o)/h+4;break}c/=6}return[c,d,f,s]}},{key:"hslToRgb",value:function(n){var r=IO(n,4),i=r[0],o=r[1],a=r[2],s=r[3],l=void 0,u=void 0,c=void 0;if(o===0)l=u=c=a;else{var d=function(y,b,w){return w<0&&(w+=1),w>1&&(w-=1),w<.16666666666666666?y+(b-y)*6*w:w<.5?b:w<.6666666666666666?y+(b-y)*(.6666666666666666-w)*6:y},f=a<.5?a*(1+o):a+o-a*o,h=2*a-f;l=d(h,f,i+1/3),u=d(h,f,i),c=d(h,f,i-1/3)}var m=[l*255,u*255,c*255].map(Math.round);return m[3]=s,m}}]),t}(),pUe=function(){function t(){XN(this,t),this._events=[]}return ZN(t,[{key:"add",value:function(n,r,i){n.addEventListener(r,i,!1),this._events.push({target:n,type:r,handler:i})}},{key:"remove",value:function(n,r,i){this._events=this._events.filter(function(o){var a=!0;return n&&n!==o.target&&(a=!1),r&&r!==o.type&&(a=!1),i&&i!==o.handler&&(a=!1),a&&t._doRemove(o.target,o.type,o.handler),!a})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,r,i){n.removeEventListener(r,i,!1)}}]),t}();function gUe(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}function n2(t,e,n){var r=!1;function i(l,u,c){return Math.max(u,Math.min(l,c))}function o(l,u,c){if(c&&(r=!0),!!r){l.preventDefault();var d=e.getBoundingClientRect(),f=d.width,h=d.height,m=u.clientX,g=u.clientY,y=i(m-d.left,0,f),b=i(g-d.top,0,h);n(y/f,b/h)}}function a(l,u){var c=l.buttons===void 0?l.which:l.buttons;c===1?o(l,l,u):r=!1}function s(l,u){l.touches.length===1?o(l,l.touches[0],u):r=!1}t.add(e,"mousedown",function(l){a(l,!0)}),t.add(e,"touchstart",function(l){s(l,!0)}),t.add(window,"mousemove",a),t.add(e,"touchmove",s),t.add(window,"mouseup",function(l){r=!1}),t.add(e,"touchend",function(l){r=!1}),t.add(e,"touchcancel",function(l){r=!1})}var mUe=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
  131. linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,vUe=360,SX="keydown",BO="mousedown",r2="focusin";function xu(t,e){return(e||document).querySelector(t)}function xX(t){t.preventDefault(),t.stopPropagation()}function i2(t,e,n,r,i){t.add(e,SX,function(o){n.indexOf(o.key)>=0&&(i&&xX(o),r(o))})}var CX=function(){function t(e){XN(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new pUe,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return ZN(t,[{key:"setOptions",value:function(n){var r=this;if(!n)return;var i=this.settings;function o(u,c,d){for(var f in u)d&&d.indexOf(f)>=0||(c[f]=u[f])}if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),o(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=i.parent;if(s&&i.popup&&!this._popupInited){var l=function(c){return r.openHandler(c)};this._events.add(s,"click",l),i2(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var r=n&&n.type===SX?this._domEdit:this.domElement;setTimeout(function(){return r.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var r=n&&n.type,i=!1;if(!n)i=!0;else if(r===BO||r===r2){var o=(this.__containedEvent||0)+100;n.timeStamp>o&&(i=!0)}else xX(n),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",r!==BO&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,r){this.closeHandler(),this.setOptions(n),r&&this.openHandler()}},{key:"setColor",value:function(n,r){this._setColor(n,{silent:r})}},{key:"_setColor",value:function(n,r){if(typeof n=="string"&&(n=n.trim()),!!n){r=r||{};var i=void 0;try{i=new hUe(n)}catch(a){if(r.failSilently)return;throw a}if(!this.settings.alpha){var o=i.hsla;o[3]=1,i.hsla=o}this.colour=this.color=i,this._setHSLA(null,null,null,null,r)}}},{key:"setColour",value:function(n,r){this.setColor(n,r)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var r=this._toggleDOM(!0);return this._setPosition(),r}var i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=gUe(i);return this.domElement=o,this._domH=xu(".picker_hue",o),this._domSL=xu(".picker_sl",o),this._domA=xu(".picker_alpha",o),this._domEdit=xu(".picker_editor input",o),this._domSample=xu(".picker_sample",o),this._domOkay=xu(".picker_done button",o),this._domCancel=xu(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,r=this,i=this.domElement,o=this._events;function a(u,c,d){o.add(u,c,d)}a(i,"click",function(u){return u.preventDefault()}),n2(o,this._domH,function(u,c){return r._setHSLA(u)}),n2(o,this._domSL,function(u,c){return r._setHSLA(null,u,1-c)}),this.settings.alpha&&n2(o,this._domA,function(u,c){return r._setHSLA(null,null,null,1-c)});var s=this._domEdit;a(s,"input",function(u){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(s,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(f){return n.closeHandler(f)};a(window,BO,u),a(window,r2,u),i2(o,i,["Esc","Escape"],u);var c=function(f){n.__containedEvent=f.timeStamp};a(i,BO,c),a(i,r2,c),a(n._domCancel,"click",u)});var l=function(c){n._ifPopup(function(){return n.closeHandler(c)}),n.onDone&&n.onDone(n.colour)};a(this._domOkay,"click",l),i2(o,i,["Enter"],l)}},{key:"_setPosition",value:function(){var n=this.settings.parent,r=this.domElement;n!==r.parentNode&&n.appendChild(r),this._ifPopup(function(i){getComputedStyle(n).position==="static"&&(n.style.position="relative");var o=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(a){a===o?r.classList.add(a):r.classList.remove(a)}),r.classList.add(o)})}},{key:"_setHSLA",value:function(n,r,i,o,a){a=a||{};var s=this.colour,l=s.hsla;[n,r,i,o].forEach(function(u,c){(u||u===0)&&(l[c]=u)}),s.hsla=l,this._updateUI(a),this.onChange&&!a.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var r=this.colour,i=r.hsla,o="hsl("+i[0]*vUe+", 100%, 50%)",a=r.hslString,s=r.hslaString,l=this._domH,u=this._domSL,c=this._domA,d=xu(".picker_selector",l),f=xu(".picker_selector",u),h=xu(".picker_selector",c);function m(C,E,T){E.style.left=T*100+"%"}function g(C,E,T){E.style.top=T*100+"%"}m(l,d,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=o,m(u,f,i[1]),g(u,f,1-i[2]),u.style.color=a,g(c,h,1-i[3]);var y=a,b=y.replace("hsl","hsla").replace(")",", 0)"),w="linear-gradient("+[y,b]+")";if(this._domA.style.background=w+", "+mUe,!n.fromEditor){var O=this.settings.editorFormat,S=this.settings.alpha,x=void 0;switch(O){case"rgb":x=r.printRGB(S);break;case"hsl":x=r.printHSL(S);break;default:x=r.printHex(S)}this._domEdit.value=x}this._domSample.style.color=s}},{key:"_ifPopup",value:function(n,r){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):r&&r()}},{key:"_toggleDOM",value:function(n){var r=this.domElement;if(!r)return!1;var i=n?"":"none",o=r.style.display!==i;return o&&(r.style.display=i),o}}]),t}();{var o2=document.createElement("style");o2.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(o2),CX.StyleElement=o2}var GN={exports:{}};(function(t,e){(function(n,r){t.exports=n()})(function(){var n="object",r="function",i="undefined",o=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],a=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],s=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],l=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u(Y,re){var te=typeof Y[re];return te==r||!!(te==n&&Y[re])||te=="unknown"}function c(Y,re){return!!(typeof Y[re]==n&&Y[re])}function d(Y,re){return typeof Y[re]!=i}function f(Y){return function(re,te){for(var ge=te.length;ge--;)if(!Y(re,te[ge]))return!1;return!0}}var h=f(u),m=f(c),g=f(d);function y(Y){return Y&&h(Y,l)&&g(Y,s)}function b(Y){return c(Y,"body")?Y.body:Y.getElementsByTagName("body")[0]}var w=[].forEach?function(Y,re){Y.forEach(re)}:function(Y,re){for(var te=0,ge=Y.length;te<ge;++te)re(Y[te],te)},O={},S=typeof window!=i&&typeof document!=i,x={isHostMethod:u,isHostObject:c,isHostProperty:d,areHostMethods:h,areHostObjects:m,areHostProperties:g,isTextRange:y,getBody:b,forEach:w},C={version:"1.3.2",initialized:!1,isBrowser:S,supported:!0,util:x,features:{},modules:O,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==i?!0:rangyAutoInitialize}};function E(Y){typeof console!=i&&u(console,"log")&&console.log(Y)}function T(Y,re){S&&re?alert(Y):E(Y)}function P(Y){C.initialized=!0,C.supported=!1,T("Rangy is not supported in this environment. Reason: "+Y,C.config.alertOnFail)}C.fail=P;function A(Y){T("Rangy warning: "+Y,C.config.alertOnWarn)}C.warn=A;var D;({}).hasOwnProperty?(x.extend=D=function(Y,re,te){var ge,Re;for(var $e in re)$e==="__proto__"||$e==="constructor"||$e==="prototype"||re.hasOwnProperty($e)&&(ge=Y[$e],Re=re[$e],te&&ge!==null&&typeof ge=="object"&&Re!==null&&typeof Re=="object"&&D(ge,Re,!0),Y[$e]=Re);return re.hasOwnProperty("toString")&&(Y.toString=re.toString),Y},x.createOptions=function(Y,re){var te={};return D(te,re),Y&&D(te,Y),te}):P("hasOwnProperty not supported"),S||P("Rangy can only run in a browser"),function(){var Y;if(S){var re=document.createElement("div");re.appendChild(document.createElement("span"));var te=[].slice;try{te.call(re.childNodes,0)[0].nodeType==1&&(Y=function(ge){return te.call(ge,0)})}catch{}}Y||(Y=function(ge){for(var Re=[],$e=0,Z=ge.length;$e<Z;++$e)Re[$e]=ge[$e];return Re}),x.toArray=Y}();var N;S&&(u(document,"addEventListener")?N=function(Y,re,te){Y.addEventListener(re,te,!1)}:u(document,"attachEvent")?N=function(Y,re,te){Y.attachEvent("on"+re,te)}:P("Document does not have required addEventListener or attachEvent method"),x.addListener=N);var $=[];function W(Y){return Y.message||Y.description||String(Y)}function L(){if(!(!S||C.initialized)){var Y,re=!1,te=!1;u(document,"createRange")&&(Y=document.createRange(),h(Y,a)&&g(Y,o)&&(re=!0));var ge=b(document);if(!ge||ge.nodeName.toLowerCase()!="body"){P("No body element found");return}if(ge&&u(ge,"createTextRange")&&(Y=ge.createTextRange(),y(Y)&&(te=!0)),!re&&!te){P("Neither Range nor TextRange are available");return}C.initialized=!0,C.features={implementsDomRange:re,implementsTextRange:te};var Re,$e;for(var Z in O)(Re=O[Z])instanceof q&&Re.init(Re,C);for(var ce=0,Te=$.length;ce<Te;++ce)try{$[ce](C)}catch(Ie){$e="Rangy init listener threw an exception. Continuing. Detail: "+W(Ie),E($e)}}}function I(Y,re,te){te&&(Y+=" in module "+te.name),C.warn("DEPRECATED: "+Y+" is deprecated. Please use "+re+" instead.")}function U(Y,re,te,ge){Y[re]=function(){return I(re,te,ge),Y[te].apply(Y,x.toArray(arguments))}}x.deprecationNotice=I,x.createAliasForDeprecatedMethod=U,C.init=L,C.addInitListener=function(Y){C.initialized?Y(C):$.push(Y)};var Q=[];C.addShimListener=function(Y){Q.push(Y)};function V(Y){Y=Y||window,L();for(var re=0,te=Q.length;re<te;++re)Q[re](Y)}S&&(C.shim=C.createMissingNativeApi=V,U(C,"createMissingNativeApi","shim"));function q(Y,re,te){this.name=Y,this.dependencies=re,this.initialized=!1,this.supported=!1,this.initializer=te}q.prototype={init:function(){for(var Y=this.dependencies||[],re=0,te=Y.length,ge,Re;re<te;++re){if(Re=Y[re],ge=O[Re],!ge||!(ge instanceof q))throw new Error("required module '"+Re+"' not found");if(ge.init(),!ge.supported)throw new Error("required module '"+Re+"' not supported")}this.initializer(this)},fail:function(Y){throw this.initialized=!0,this.supported=!1,new Error(Y)},warn:function(Y){C.warn("Module "+this.name+": "+Y)},deprecationNotice:function(Y,re){C.warn("DEPRECATED: "+Y+" in module "+this.name+" is deprecated. Please use "+re+" instead")},createError:function(Y){return new Error("Error in Rangy "+this.name+" module: "+Y)}};function K(Y,re,te){var ge=new q(Y,re,function(Re){if(!Re.initialized){Re.initialized=!0;try{te(C,Re),Re.supported=!0}catch(Z){var $e="Module '"+Y+"' failed to load: "+W(Z);E($e),Z.stack&&E(Z.stack)}}});return O[Y]=ge,ge}C.createModule=function(Y){var re,te;arguments.length==2?(re=arguments[1],te=[]):(re=arguments[2],te=arguments[1]);var ge=K(Y,te,re);C.initialized&&C.supported&&ge.init()},C.createCoreModule=function(Y,re,te){K(Y,re,te)};function ie(){}C.RangePrototype=ie,C.rangePrototype=new ie;function oe(){}C.selectionPrototype=new oe,C.createCoreModule("DomUtil",[],function(Y,re){var te="undefined",ge=Y.util,Re=ge.getBody;ge.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||re.fail("document missing a Node creation method"),ge.isHostMethod(document,"getElementsByTagName")||re.fail("document missing getElementsByTagName method");var $e=document.createElement("div");ge.areHostMethods($e,["insertBefore","appendChild","cloneNode"])||re.fail("Incomplete Element implementation"),ge.isHostProperty($e,"innerHTML")||re.fail("Element is missing innerHTML property");var Z=document.createTextNode("test");ge.areHostMethods(Z,["splitText","deleteData","insertData","appendData","cloneNode"])||re.fail("Incomplete Text Node implementation");var ce=function(Ze,Rt){for(var xn=Ze.length;xn--;)if(Ze[xn]===Rt)return!0;return!1};function Te(Ze){var Rt;return typeof Ze.namespaceURI==te||(Rt=Ze.namespaceURI)===null||Rt=="http://www.w3.org/1999/xhtml"}function Ie(Ze){var Rt=Ze.parentNode;return Rt.nodeType==1?Rt:null}function ae(Ze){for(var Rt=0;Ze=Ze.previousSibling;)++Rt;return Rt}function me(Ze){switch(Ze.nodeType){case 7:case 10:return 0;case 3:case 8:return Ze.length;default:return Ze.childNodes.length}}function Ae(Ze,Rt){var xn=[],fn;for(fn=Ze;fn;fn=fn.parentNode)xn.push(fn);for(fn=Rt;fn;fn=fn.parentNode)if(ce(xn,fn))return fn;return null}function X(Ze,Rt,xn){for(var fn=xn?Rt:Rt.parentNode;fn;){if(fn===Ze)return!0;fn=fn.parentNode}return!1}function ee(Ze,Rt){return X(Ze,Rt,!0)}function le(Ze,Rt,xn){for(var fn,Er=xn?Ze:Ze.parentNode;Er;){if(fn=Er.parentNode,fn===Rt)return Er;Er=fn}return null}function Ce(Ze){var Rt=Ze.nodeType;return Rt==3||Rt==4||Rt==8}function fe(Ze){if(!Ze)return!1;var Rt=Ze.nodeType;return Rt==3||Rt==8}function Ee(Ze,Rt){var xn=Rt.nextSibling,fn=Rt.parentNode;return xn?fn.insertBefore(Ze,xn):fn.appendChild(Ze),Ze}function be(Ze,Rt,xn){var fn=Ze.cloneNode(!1);if(fn.deleteData(0,Rt),Ze.deleteData(Rt,Ze.length-Rt),Ee(fn,Ze),xn)for(var Er=0,dr;dr=xn[Er++];)dr.node==Ze&&dr.offset>Rt?(dr.node=fn,dr.offset-=Rt):dr.node==Ze.parentNode&&dr.offset>ae(Ze)&&++dr.offset;return fn}function Be(Ze){if(Ze.nodeType==9)return Ze;if(typeof Ze.ownerDocument!=te)return Ze.ownerDocument;if(typeof Ze.document!=te)return Ze.document;if(Ze.parentNode)return Be(Ze.parentNode);throw re.createError("getDocument: no document found for node")}function Xe(Ze){var Rt=Be(Ze);if(typeof Rt.defaultView!=te)return Rt.defaultView;if(typeof Rt.parentWindow!=te)return Rt.parentWindow;throw re.createError("Cannot get a window object for node")}function Ke(Ze){if(typeof Ze.contentDocument!=te)return Ze.contentDocument;if(typeof Ze.contentWindow!=te)return Ze.contentWindow.document;throw re.createError("getIframeDocument: No Document object found for iframe element")}function tt(Ze){if(typeof Ze.contentWindow!=te)return Ze.contentWindow;if(typeof Ze.contentDocument!=te)return Ze.contentDocument.defaultView;throw re.createError("getIframeWindow: No Window object found for iframe element")}function Dt(Ze){return Ze&&ge.isHostMethod(Ze,"setTimeout")&&ge.isHostObject(Ze,"document")}function jt(Ze,Rt,xn){var fn;if(Ze?ge.isHostProperty(Ze,"nodeType")?fn=Ze.nodeType==1&&Ze.tagName.toLowerCase()=="iframe"?Ke(Ze):Be(Ze):Dt(Ze)&&(fn=Ze.document):fn=document,!fn)throw Rt.createError(xn+"(): Parameter must be a Window object or DOM node");return fn}function Me(Ze){for(var Rt;Rt=Ze.parentNode;)Ze=Rt;return Ze}function nt(Ze,Rt,xn,fn){var Er,dr,eo,Pi,Oi;if(Ze==xn)return Rt===fn?0:Rt<fn?-1:1;if(Er=le(xn,Ze,!0))return Rt<=ae(Er)?-1:1;if(Er=le(Ze,xn,!0))return ae(Er)<fn?-1:1;if(dr=Ae(Ze,xn),!dr)throw new Error("comparePoints error: nodes have no common ancestor");if(eo=Ze===dr?dr:le(Ze,dr,!0),Pi=xn===dr?dr:le(xn,dr,!0),eo===Pi)throw re.createError("comparePoints got to case 4 and childA and childB are the same!");for(Oi=dr.firstChild;Oi;){if(Oi===eo)return-1;if(Oi===Pi)return 1;Oi=Oi.nextSibling}}var de=!1;function Pe(Ze){var Rt;try{return Rt=Ze.parentNode,!1}catch{return!0}}(function(){var Ze=document.createElement("b");Ze.innerHTML="1";var Rt=Ze.firstChild;Ze.innerHTML="<br />",de=Pe(Rt),Y.features.crashyTextNodes=de})();function Le(Ze){if(!Ze)return"[No node]";if(de&&Pe(Ze))return"[Broken node]";if(Ce(Ze))return'"'+Ze.data+'"';if(Ze.nodeType==1){var Rt=Ze.id?' id="'+Ze.id+'"':"";return"<"+Ze.nodeName+Rt+">[index:"+ae(Ze)+",length:"+Ze.childNodes.length+"]["+(Ze.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return Ze.nodeName}function wt(Ze){for(var Rt=Be(Ze).createDocumentFragment(),xn;xn=Ze.firstChild;)Rt.appendChild(xn);return Rt}var tn;typeof window.getComputedStyle!=te?tn=function(Ze,Rt){return Xe(Ze).getComputedStyle(Ze,null)[Rt]}:typeof document.documentElement.currentStyle!=te?tn=function(Ze,Rt){return Ze.currentStyle?Ze.currentStyle[Rt]:""}:re.fail("No means of obtaining computed style properties found");function De(Ze,Rt,xn){var fn=Re(Ze),Er=Ze.createElement("div");Er.contentEditable=""+!!xn,Rt&&(Er.innerHTML=Rt);var dr=fn.firstChild;return dr?fn.insertBefore(Er,dr):fn.appendChild(Er),Er}function xt(Ze){return Ze.parentNode.removeChild(Ze)}function qt(Ze){this.root=Ze,this._next=Ze}qt.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var Ze=this._current=this._next,Rt,xn;if(this._current)if(Rt=Ze.firstChild,Rt)this._next=Rt;else{for(xn=null;Ze!==this.root&&!(xn=Ze.nextSibling);)Ze=Ze.parentNode;this._next=xn}return this._current},detach:function(){this._current=this._next=this.root=null}};function ln(Ze){return new qt(Ze)}function nn(Ze,Rt){this.node=Ze,this.offset=Rt}nn.prototype={equals:function(Ze){return!!Ze&&this.node===Ze.node&&this.offset==Ze.offset},inspect:function(){return"[DomPosition("+Le(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}};function bn(Ze){this.code=this[Ze],this.codeName=Ze,this.message="DOMException: "+this.codeName}bn.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},bn.prototype.toString=function(){return this.message},Y.dom={arrayContains:ce,isHtmlNamespace:Te,parentElement:Ie,getNodeIndex:ae,getNodeLength:me,getCommonAncestor:Ae,isAncestorOf:X,isOrIsAncestorOf:ee,getClosestAncestorIn:le,isCharacterDataNode:Ce,isTextOrCommentNode:fe,insertAfter:Ee,splitDataNode:be,getDocument:Be,getWindow:Xe,getIframeWindow:tt,getIframeDocument:Ke,getBody:Re,isWindow:Dt,getContentDocument:jt,getRootContainer:Me,comparePoints:nt,isBrokenNode:Pe,inspectNode:Le,getComputedStyleProperty:tn,createTestElement:De,removeNode:xt,fragmentFromNodeChildren:wt,createIterator:ln,DomPosition:nn},Y.DOMException=bn}),C.createCoreModule("DomRange",["DomUtil"],function(Y,re){var te=Y.dom,ge=Y.util,Re=te.DomPosition,$e=Y.DOMException,Z=te.isCharacterDataNode,ce=te.getNodeIndex,Te=te.isOrIsAncestorOf,Ie=te.getDocument,ae=te.comparePoints,me=te.splitDataNode,Ae=te.getClosestAncestorIn,X=te.getNodeLength,ee=te.arrayContains,le=te.getRootContainer,Ce=Y.features.crashyTextNodes,fe=te.removeNode;function Ee(ve,We){return ve.nodeType!=3&&(Te(ve,We.startContainer)||Te(ve,We.endContainer))}function be(ve){return ve.document||Ie(ve.startContainer)}function Be(ve){return le(ve.startContainer)}function Xe(ve){return new Re(ve.parentNode,ce(ve))}function Ke(ve){return new Re(ve.parentNode,ce(ve)+1)}function tt(ve,We,_t){var Lt=ve.nodeType==11?ve.firstChild:ve;return Z(We)?_t==We.length?te.insertAfter(ve,We):We.parentNode.insertBefore(ve,_t==0?We:me(We,_t)):_t>=We.childNodes.length?We.appendChild(ve):We.insertBefore(ve,We.childNodes[_t]),Lt}function Dt(ve,We,_t){if(_r(ve),_r(We),be(We)!=be(ve))throw new $e("WRONG_DOCUMENT_ERR");var Lt=ae(ve.startContainer,ve.startOffset,We.endContainer,We.endOffset),mn=ae(ve.endContainer,ve.endOffset,We.startContainer,We.startOffset);return _t?Lt<=0&&mn>=0:Lt<0&&mn>0}function jt(ve){for(var We,_t,Lt=be(ve.range).createDocumentFragment(),mn;_t=ve.next();){if(We=ve.isPartiallySelectedSubtree(),_t=_t.cloneNode(!We),We&&(mn=ve.getSubtreeIterator(),_t.appendChild(jt(mn)),mn.detach()),_t.nodeType==10)throw new $e("HIERARCHY_REQUEST_ERR");Lt.appendChild(_t)}return Lt}function Me(ve,We,_t){var Lt,mn;_t=_t||{stop:!1};for(var ir,Tt;ir=ve.next();)if(ve.isPartiallySelectedSubtree()){if(We(ir)===!1){_t.stop=!0;return}else if(Tt=ve.getSubtreeIterator(),Me(Tt,We,_t),Tt.detach(),_t.stop)return}else for(Lt=te.createIterator(ir);mn=Lt.next();)if(We(mn)===!1){_t.stop=!0;return}}function nt(ve){for(var We;ve.next();)ve.isPartiallySelectedSubtree()?(We=ve.getSubtreeIterator(),nt(We),We.detach()):ve.remove()}function de(ve){for(var We,_t=be(ve.range).createDocumentFragment(),Lt;We=ve.next();){if(ve.isPartiallySelectedSubtree()?(We=We.cloneNode(!1),Lt=ve.getSubtreeIterator(),We.appendChild(de(Lt)),Lt.detach()):ve.remove(),We.nodeType==10)throw new $e("HIERARCHY_REQUEST_ERR");_t.appendChild(We)}return _t}function Pe(ve,We,_t){var Lt=!!(We&&We.length),mn,ir=!!_t;Lt&&(mn=new RegExp("^("+We.join("|")+")$"));var Tt=[];return Me(new wt(ve,!1),function(on){if(!(Lt&&!mn.test(on.nodeType))&&!(ir&&!_t(on))){var wn=ve.startContainer;if(!(on==wn&&Z(wn)&&ve.startOffset==wn.length)){var Zn=ve.endContainer;on==Zn&&Z(Zn)&&ve.endOffset==0||Tt.push(on)}}}),Tt}function Le(ve){var We=typeof ve.getName=="undefined"?"Range":ve.getName();return"["+We+"("+te.inspectNode(ve.startContainer)+":"+ve.startOffset+", "+te.inspectNode(ve.endContainer)+":"+ve.endOffset+")]"}function wt(ve,We){if(this.range=ve,this.clonePartiallySelectedTextNodes=We,!ve.collapsed){this.sc=ve.startContainer,this.so=ve.startOffset,this.ec=ve.endContainer,this.eo=ve.endOffset;var _t=ve.commonAncestorContainer;this.sc===this.ec&&Z(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===_t&&!Z(this.sc)?this.sc.childNodes[this.so]:Ae(this.sc,_t,!0),this._last=this.ec===_t&&!Z(this.ec)?this.ec.childNodes[this.eo-1]:Ae(this.ec,_t,!0))}}wt.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var ve=this._current=this._next;return ve&&(this._next=ve!==this._last?ve.nextSibling:null,Z(ve)&&this.clonePartiallySelectedTextNodes&&(ve===this.ec&&(ve=ve.cloneNode(!0)).deleteData(this.eo,ve.length-this.eo),this._current===this.sc&&(ve=ve.cloneNode(!0)).deleteData(0,this.so))),ve},remove:function(){var ve=this._current,We,_t;Z(ve)&&(ve===this.sc||ve===this.ec)?(We=ve===this.sc?this.so:0,_t=ve===this.ec?this.eo:ve.length,We!=_t&&ve.deleteData(We,_t-We)):ve.parentNode&&fe(ve)},isPartiallySelectedSubtree:function(){var ve=this._current;return Ee(ve,this.range)},getSubtreeIterator:function(){var ve;if(this.isSingleCharacterDataNode)ve=this.range.cloneRange(),ve.collapse(!1);else{ve=new Ti(be(this.range));var We=this._current,_t=We,Lt=0,mn=We,ir=X(We);Te(We,this.sc)&&(_t=this.sc,Lt=this.so),Te(We,this.ec)&&(mn=this.ec,ir=this.eo),gr(ve,_t,Lt,mn,ir)}return new wt(ve,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var tn=[1,3,4,5,7,8,10],De=[2,9,11],xt=[5,6,10,12],qt=[1,3,4,5,7,8,10,11],ln=[1,3,4,5,7,8];function nn(ve){return function(We,_t){for(var Lt,mn=_t?We:We.parentNode;mn;){if(Lt=mn.nodeType,ee(ve,Lt))return mn;mn=mn.parentNode}return null}}var bn=nn([9,11]),Ze=nn(xt),Rt=nn([6,10,12]),xn=nn([1]);function fn(ve,We){if(Rt(ve,We))throw new $e("INVALID_NODE_TYPE_ERR")}function Er(ve,We){if(!ee(We,ve.nodeType))throw new $e("INVALID_NODE_TYPE_ERR")}function dr(ve,We){if(We<0||We>(Z(ve)?ve.length:ve.childNodes.length))throw new $e("INDEX_SIZE_ERR")}function eo(ve,We){if(bn(ve,!0)!==bn(We,!0))throw new $e("WRONG_DOCUMENT_ERR")}function Pi(ve){if(Ze(ve,!0))throw new $e("NO_MODIFICATION_ALLOWED_ERR")}function Oi(ve,We){if(!ve)throw new $e(We)}function Ml(ve,We){return We<=(Z(ve)?ve.length:ve.childNodes.length)}function cs(ve){return!!ve.startContainer&&!!ve.endContainer&&!(Ce&&(te.isBrokenNode(ve.startContainer)||te.isBrokenNode(ve.endContainer)))&&le(ve.startContainer)==le(ve.endContainer)&&Ml(ve.startContainer,ve.startOffset)&&Ml(ve.endContainer,ve.endOffset)}function _r(ve){if(!cs(ve))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+ve.inspect()+")")}var Rl=document.createElement("style"),et=!1;try{Rl.innerHTML="<b>x</b>",et=Rl.firstChild.nodeType==3}catch{}Y.features.htmlParsingConforms=et;var Mt=et?function(ve){var We=this.startContainer,_t=Ie(We);if(!We)throw new $e("INVALID_STATE_ERR");var Lt=null;return We.nodeType==1?Lt=We:Z(We)&&(Lt=te.parentElement(We)),Lt===null||Lt.nodeName=="HTML"&&te.isHtmlNamespace(Ie(Lt).documentElement)&&te.isHtmlNamespace(Lt)?Lt=_t.createElement("body"):Lt=Lt.cloneNode(!1),Lt.innerHTML=ve,te.fragmentFromNodeChildren(Lt)}:function(ve){var We=be(this),_t=We.createElement("body");return _t.innerHTML=ve,te.fragmentFromNodeChildren(_t)};function Vn(ve,We){_r(ve);var _t=ve.startContainer,Lt=ve.startOffset,mn=ve.endContainer,ir=ve.endOffset,Tt=_t===mn;Z(mn)&&ir>0&&ir<mn.length&&me(mn,ir,We),Z(_t)&&Lt>0&&Lt<_t.length&&(_t=me(_t,Lt,We),Tt?(ir-=Lt,mn=_t):mn==_t.parentNode&&ir>=ce(_t)&&ir++,Lt=0),ve.setStartAndEnd(_t,Lt,mn,ir)}function zt(ve){_r(ve);var We=ve.commonAncestorContainer.parentNode.cloneNode(!1);return We.appendChild(ve.cloneContents()),We.innerHTML}var Li=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],Eo=0,Wo=1,po=2,Ei=3,Uo=0,ot=1,Nt=2,rn=3;ge.extend(Y.rangePrototype,{compareBoundaryPoints:function(ve,We){_r(this),eo(this.startContainer,We.startContainer);var _t,Lt,mn,ir,Tt=ve==Ei||ve==Eo?"start":"end",on=ve==Wo||ve==Eo?"start":"end";return _t=this[Tt+"Container"],Lt=this[Tt+"Offset"],mn=We[on+"Container"],ir=We[on+"Offset"],ae(_t,Lt,mn,ir)},insertNode:function(ve){if(_r(this),Er(ve,qt),Pi(this.startContainer),Te(ve,this.startContainer))throw new $e("HIERARCHY_REQUEST_ERR");var We=tt(ve,this.startContainer,this.startOffset);this.setStartBefore(We)},cloneContents:function(){_r(this);var ve,We;if(this.collapsed)return be(this).createDocumentFragment();if(this.startContainer===this.endContainer&&Z(this.startContainer))return ve=this.startContainer.cloneNode(!0),ve.data=ve.data.slice(this.startOffset,this.endOffset),We=be(this).createDocumentFragment(),We.appendChild(ve),We;var _t=new wt(this,!0);return ve=jt(_t),_t.detach(),ve},canSurroundContents:function(){_r(this),Pi(this.startContainer),Pi(this.endContainer);var ve=new wt(this,!0),We=ve._first&&Ee(ve._first,this)||ve._last&&Ee(ve._last,this);return ve.detach(),!We},surroundContents:function(ve){if(Er(ve,ln),!this.canSurroundContents())throw new $e("INVALID_STATE_ERR");var We=this.extractContents();if(ve.hasChildNodes())for(;ve.lastChild;)ve.removeChild(ve.lastChild);tt(ve,this.startContainer,this.startOffset),ve.appendChild(We),this.selectNode(ve)},cloneRange:function(){_r(this);for(var ve=new Ti(be(this)),We=Li.length,_t;We--;)_t=Li[We],ve[_t]=this[_t];return ve},toString:function(){_r(this);var ve=this.startContainer;if(ve===this.endContainer&&Z(ve))return ve.nodeType==3||ve.nodeType==4?ve.data.slice(this.startOffset,this.endOffset):"";var We=[],_t=new wt(this,!0);return Me(_t,function(Lt){(Lt.nodeType==3||Lt.nodeType==4)&&We.push(Lt.data)}),_t.detach(),We.join("")},compareNode:function(ve){_r(this);var We=ve.parentNode,_t=ce(ve);if(!We)throw new $e("NOT_FOUND_ERR");var Lt=this.comparePoint(We,_t),mn=this.comparePoint(We,_t+1);return Lt<0?mn>0?Nt:Uo:mn>0?ot:rn},comparePoint:function(ve,We){return _r(this),Oi(ve,"HIERARCHY_REQUEST_ERR"),eo(ve,this.startContainer),ae(ve,We,this.startContainer,this.startOffset)<0?-1:ae(ve,We,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:Mt,toHtml:function(){return zt(this)},intersectsNode:function(ve,We){if(_r(this),le(ve)!=Be(this))return!1;var _t=ve.parentNode,Lt=ce(ve);if(!_t)return!0;var mn=ae(_t,Lt,this.endContainer,this.endOffset),ir=ae(_t,Lt+1,this.startContainer,this.startOffset);return We?mn<=0&&ir>=0:mn<0&&ir>0},isPointInRange:function(ve,We){return _r(this),Oi(ve,"HIERARCHY_REQUEST_ERR"),eo(ve,this.startContainer),ae(ve,We,this.startContainer,this.startOffset)>=0&&ae(ve,We,this.endContainer,this.endOffset)<=0},intersectsRange:function(ve){return Dt(this,ve,!1)},intersectsOrTouchesRange:function(ve){return Dt(this,ve,!0)},intersection:function(ve){if(this.intersectsRange(ve)){var We=ae(this.startContainer,this.startOffset,ve.startContainer,ve.startOffset),_t=ae(this.endContainer,this.endOffset,ve.endContainer,ve.endOffset),Lt=this.cloneRange();return We==-1&&Lt.setStart(ve.startContainer,ve.startOffset),_t==1&&Lt.setEnd(ve.endContainer,ve.endOffset),Lt}return null},union:function(ve){if(this.intersectsOrTouchesRange(ve)){var We=this.cloneRange();return ae(ve.startContainer,ve.startOffset,this.startContainer,this.startOffset)==-1&&We.setStart(ve.startContainer,ve.startOffset),ae(ve.endContainer,ve.endOffset,this.endContainer,this.endOffset)==1&&We.setEnd(ve.endContainer,ve.endOffset),We}else throw new $e("Ranges do not intersect")},containsNode:function(ve,We){return We?this.intersectsNode(ve,!1):this.compareNode(ve)==rn},containsNodeContents:function(ve){return this.comparePoint(ve,0)>=0&&this.comparePoint(ve,X(ve))<=0},containsRange:function(ve){var We=this.intersection(ve);return We!==null&&ve.equals(We)},containsNodeText:function(ve){var We=this.cloneRange();We.selectNode(ve);var _t=We.getNodes([3]);if(_t.length>0){We.setStart(_t[0],0);var Lt=_t.pop();return We.setEnd(Lt,Lt.length),this.containsRange(We)}else return this.containsNodeContents(ve)},getNodes:function(ve,We){return _r(this),Pe(this,ve,We)},getDocument:function(){return be(this)},collapseBefore:function(ve){this.setEndBefore(ve),this.collapse(!1)},collapseAfter:function(ve){this.setStartAfter(ve),this.collapse(!0)},getBookmark:function(ve){var We=be(this),_t=Y.createRange(We);ve=ve||te.getBody(We),_t.selectNodeContents(ve);var Lt=this.intersection(_t),mn=0,ir=0;return Lt&&(_t.setEnd(Lt.startContainer,Lt.startOffset),mn=_t.toString().length,ir=mn+Lt.toString().length),{start:mn,end:ir,containerNode:ve}},moveToBookmark:function(ve){var We=ve.containerNode,_t=0;this.setStart(We,0),this.collapse(!0);for(var Lt=[We],mn,ir=!1,Tt=!1,on,wn,Zn;!Tt&&(mn=Lt.pop());)if(mn.nodeType==3)on=_t+mn.length,!ir&&ve.start>=_t&&ve.start<=on&&(this.setStart(mn,ve.start-_t),ir=!0),ir&&ve.end>=_t&&ve.end<=on&&(this.setEnd(mn,ve.end-_t),Tt=!0),_t=on;else for(Zn=mn.childNodes,wn=Zn.length;wn--;)Lt.push(Zn[wn])},getName:function(){return"DomRange"},equals:function(ve){return Ti.rangesEqual(this,ve)},isValid:function(){return cs(this)},inspect:function(){return Le(this)},detach:function(){}});function se(ve){ve.START_TO_START=Eo,ve.START_TO_END=Wo,ve.END_TO_END=po,ve.END_TO_START=Ei,ve.NODE_BEFORE=Uo,ve.NODE_AFTER=ot,ve.NODE_BEFORE_AND_AFTER=Nt,ve.NODE_INSIDE=rn}function ze(ve){se(ve),se(ve.prototype)}function pt(ve,We){return function(){_r(this);var _t=this.startContainer,Lt=this.startOffset,mn=this.commonAncestorContainer,ir=new wt(this,!0),Tt,on;_t!==mn&&(Tt=Ae(_t,mn,!0),on=Ke(Tt),_t=on.node,Lt=on.offset),Me(ir,Pi),ir.reset();var wn=ve(ir);return ir.detach(),We(this,_t,Lt,_t,Lt),wn}}function Yt(ve,We){function _t(Tt,on){return function(wn){Er(wn,tn),Er(le(wn),De);var Zn=(Tt?Xe:Ke)(wn);(on?Lt:mn)(this,Zn.node,Zn.offset)}}function Lt(Tt,on,wn){var Zn=Tt.endContainer,Yi=Tt.endOffset;(on!==Tt.startContainer||wn!==Tt.startOffset)&&((le(on)!=le(Zn)||ae(on,wn,Zn,Yi)==1)&&(Zn=on,Yi=wn),We(Tt,on,wn,Zn,Yi))}function mn(Tt,on,wn){var Zn=Tt.startContainer,Yi=Tt.startOffset;(on!==Tt.endContainer||wn!==Tt.endOffset)&&((le(on)!=le(Zn)||ae(on,wn,Zn,Yi)==-1)&&(Zn=on,Yi=wn),We(Tt,Zn,Yi,on,wn))}var ir=function(){};ir.prototype=Y.rangePrototype,ve.prototype=new ir,ge.extend(ve.prototype,{setStart:function(Tt,on){fn(Tt,!0),dr(Tt,on),Lt(this,Tt,on)},setEnd:function(Tt,on){fn(Tt,!0),dr(Tt,on),mn(this,Tt,on)},setStartAndEnd:function(){var Tt=arguments,on=Tt[0],wn=Tt[1],Zn=on,Yi=wn;switch(Tt.length){case 3:Yi=Tt[2];break;case 4:Zn=Tt[2],Yi=Tt[3];break}fn(on,!0),dr(on,wn),fn(Zn,!0),dr(Zn,Yi),We(this,on,wn,Zn,Yi)},setBoundary:function(Tt,on,wn){this["set"+(wn?"Start":"End")](Tt,on)},setStartBefore:_t(!0,!0),setStartAfter:_t(!1,!0),setEndBefore:_t(!0,!1),setEndAfter:_t(!1,!1),collapse:function(Tt){_r(this),Tt?We(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):We(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(Tt){fn(Tt,!0),We(this,Tt,0,Tt,X(Tt))},selectNode:function(Tt){fn(Tt,!1),Er(Tt,tn);var on=Xe(Tt),wn=Ke(Tt);We(this,on.node,on.offset,wn.node,wn.offset)},extractContents:pt(de,We),deleteContents:pt(nt,We),canSurroundContents:function(){_r(this),Pi(this.startContainer),Pi(this.endContainer);var Tt=new wt(this,!0),on=Tt._first&&Ee(Tt._first,this)||Tt._last&&Ee(Tt._last,this);return Tt.detach(),!on},splitBoundaries:function(){Vn(this)},splitBoundariesPreservingPositions:function(Tt){Vn(this,Tt)},normalizeBoundaries:function(){_r(this);var Tt=this.startContainer,on=this.startOffset,wn=this.endContainer,Zn=this.endOffset,Yi=function(qo){var ds=qo.nextSibling;ds&&ds.nodeType==qo.nodeType&&(wn=qo,Zn=qo.length,qo.appendData(ds.data),fe(ds))},fv=function(qo){var ds=qo.previousSibling;if(ds&&ds.nodeType==qo.nodeType){Tt=qo;var pv=qo.length;if(on=ds.length,qo.insertData(0,ds.data),fe(ds),Tt==wn)Zn+=on,wn=Tt;else if(wn==qo.parentNode){var Tp=ce(qo);Zn==Tp?(wn=qo,Zn=pv):Zn>Tp&&Zn--}}},hv=!0,da;if(Z(wn))Zn==wn.length?Yi(wn):Zn==0&&(da=wn.previousSibling,da&&da.nodeType==wn.nodeType&&(Zn=da.length,Tt==wn&&(hv=!1),da.appendData(wn.data),fe(wn),wn=da));else{if(Zn>0){var Ep=wn.childNodes[Zn-1];Ep&&Z(Ep)&&Yi(Ep)}hv=!this.collapsed}if(hv){if(Z(Tt))on==0?fv(Tt):on==Tt.length&&(da=Tt.nextSibling,da&&da.nodeType==Tt.nodeType&&(wn==da&&(wn=Tt,Zn+=Tt.length),Tt.appendData(da.data),fe(da)));else if(on<Tt.childNodes.length){var Yf=Tt.childNodes[on];Yf&&Z(Yf)&&fv(Yf)}}else Tt=wn,on=Zn;We(this,Tt,on,wn,Zn)},collapseToPoint:function(Tt,on){fn(Tt,!0),dr(Tt,on),this.setStartAndEnd(Tt,on)},parentElement:function(){_r(this);var Tt=this.commonAncestorContainer;return Tt?xn(this.commonAncestorContainer,!0):null}}),ze(ve)}function Rn(ve){ve.collapsed=ve.startContainer===ve.endContainer&&ve.startOffset===ve.endOffset,ve.commonAncestorContainer=ve.collapsed?ve.startContainer:te.getCommonAncestor(ve.startContainer,ve.endContainer)}function gr(ve,We,_t,Lt,mn){ve.startContainer=We,ve.startOffset=_t,ve.endContainer=Lt,ve.endOffset=mn,ve.document=te.getDocument(We),Rn(ve)}function Ti(ve){gr(this,ve,0,ve,0)}Yt(Ti,gr),ge.extend(Ti,{rangeProperties:Li,RangeIterator:wt,copyComparisonConstants:ze,createPrototypeRange:Yt,inspect:Le,toHtml:zt,getRangeDocument:be,rangesEqual:function(ve,We){return ve.startContainer===We.startContainer&&ve.startOffset===We.startOffset&&ve.endContainer===We.endContainer&&ve.endOffset===We.endOffset}}),Y.DomRange=Ti}),C.createCoreModule("WrappedRange",["DomRange"],function(Y,re){var te,ge,Re=Y.dom,$e=Y.util,Z=Re.DomPosition,ce=Y.DomRange,Te=Re.getBody,Ie=Re.getContentDocument,ae=Re.isCharacterDataNode;if(Y.features.implementsDomRange&&function(){var fe,Ee=ce.rangeProperties;function be(de){for(var Pe=Ee.length,Le;Pe--;)Le=Ee[Pe],de[Le]=de.nativeRange[Le];de.collapsed=de.startContainer===de.endContainer&&de.startOffset===de.endOffset}function Be(de,Pe,Le,wt,tn){var De=de.startContainer!==Pe||de.startOffset!=Le,xt=de.endContainer!==wt||de.endOffset!=tn,qt=!de.equals(de.nativeRange);(De||xt||qt)&&(de.setEnd(wt,tn),de.setStart(Pe,Le))}var Xe;te=function(de){if(!de)throw re.createError("WrappedRange: Range must be specified");this.nativeRange=de,be(this)},ce.createPrototypeRange(te,Be),fe=te.prototype,fe.selectNode=function(de){this.nativeRange.selectNode(de),be(this)},fe.cloneContents=function(){return this.nativeRange.cloneContents()},fe.surroundContents=function(de){this.nativeRange.surroundContents(de),be(this)},fe.collapse=function(de){this.nativeRange.collapse(de),be(this)},fe.cloneRange=function(){return new te(this.nativeRange.cloneRange())},fe.refresh=function(){be(this)},fe.toString=function(){return this.nativeRange.toString()};var Ke=document.createTextNode("test");Te(document).appendChild(Ke);var tt=document.createRange();tt.setStart(Ke,0),tt.setEnd(Ke,0);try{tt.setStart(Ke,1),fe.setStart=function(de,Pe){this.nativeRange.setStart(de,Pe),be(this)},fe.setEnd=function(de,Pe){this.nativeRange.setEnd(de,Pe),be(this)},Xe=function(de){return function(Pe){this.nativeRange[de](Pe),be(this)}}}catch{fe.setStart=function(Pe,Le){try{this.nativeRange.setStart(Pe,Le)}catch{this.nativeRange.setEnd(Pe,Le),this.nativeRange.setStart(Pe,Le)}be(this)},fe.setEnd=function(Pe,Le){try{this.nativeRange.setEnd(Pe,Le)}catch{this.nativeRange.setStart(Pe,Le),this.nativeRange.setEnd(Pe,Le)}be(this)},Xe=function(Pe,Le){return function(wt){try{this.nativeRange[Pe](wt)}catch{this.nativeRange[Le](wt),this.nativeRange[Pe](wt)}be(this)}}}fe.setStartBefore=Xe("setStartBefore","setEndBefore"),fe.setStartAfter=Xe("setStartAfter","setEndAfter"),fe.setEndBefore=Xe("setEndBefore","setStartBefore"),fe.setEndAfter=Xe("setEndAfter","setStartAfter"),fe.selectNodeContents=function(de){this.setStartAndEnd(de,0,Re.getNodeLength(de))},tt.selectNodeContents(Ke),tt.setEnd(Ke,3);var Dt=document.createRange();Dt.selectNodeContents(Ke),Dt.setEnd(Ke,4),Dt.setStart(Ke,2),tt.compareBoundaryPoints(tt.START_TO_END,Dt)==-1&&tt.compareBoundaryPoints(tt.END_TO_START,Dt)==1?fe.compareBoundaryPoints=function(de,Pe){return Pe=Pe.nativeRange||Pe,de==Pe.START_TO_END?de=Pe.END_TO_START:de==Pe.END_TO_START&&(de=Pe.START_TO_END),this.nativeRange.compareBoundaryPoints(de,Pe)}:fe.compareBoundaryPoints=function(de,Pe){return this.nativeRange.compareBoundaryPoints(de,Pe.nativeRange||Pe)};var jt=document.createElement("div");jt.innerHTML="123";var Me=jt.firstChild,nt=Te(document);nt.appendChild(jt),tt.setStart(Me,1),tt.setEnd(Me,2),tt.deleteContents(),Me.data=="13"&&(fe.deleteContents=function(){this.nativeRange.deleteContents(),be(this)},fe.extractContents=function(){var de=this.nativeRange.extractContents();return be(this),de}),nt.removeChild(jt),nt=null,$e.isHostMethod(tt,"createContextualFragment")&&(fe.createContextualFragment=function(de){return this.nativeRange.createContextualFragment(de)}),Te(document).removeChild(Ke),fe.getName=function(){return"WrappedRange"},Y.WrappedRange=te,Y.createNativeRange=function(de){return de=Ie(de,re,"createNativeRange"),de.createRange()}}(),Y.features.implementsTextRange){var me=function(fe){var Ee=fe.parentElement(),be=fe.duplicate();be.collapse(!0);var Be=be.parentElement();be=fe.duplicate(),be.collapse(!1);var Xe=be.parentElement(),Ke=Be==Xe?Be:Re.getCommonAncestor(Be,Xe);return Ke==Ee?Ke:Re.getCommonAncestor(Ee,Ke)},Ae=function(fe){return fe.compareEndPoints("StartToEnd",fe)==0},X=function(fe,Ee,be,Be,Xe){var Ke=fe.duplicate();Ke.collapse(be);var tt=Ke.parentElement();if(Re.isOrIsAncestorOf(Ee,tt)||(tt=Ee),!tt.canHaveHTML){var Dt=new Z(tt.parentNode,Re.getNodeIndex(tt));return{boundaryPosition:Dt,nodeInfo:{nodeIndex:Dt.offset,containerElement:Dt.node}}}var jt=Re.getDocument(tt).createElement("span");jt.parentNode&&Re.removeNode(jt);for(var Me,nt=be?"StartToStart":"StartToEnd",de,Pe,Le,wt,tn=Xe&&Xe.containerElement==tt?Xe.nodeIndex:0,De=tt.childNodes.length,xt=De,qt=xt;qt==De?tt.appendChild(jt):tt.insertBefore(jt,tt.childNodes[qt]),Ke.moveToElementText(jt),Me=Ke.compareEndPoints(nt,fe),!(Me==0||tn==xt);){if(Me==-1){if(xt==tn+1)break;tn=qt}else xt=xt==tn+1?tn:qt;qt=Math.floor((tn+xt)/2),tt.removeChild(jt)}if(wt=jt.nextSibling,Me==-1&&wt&&ae(wt)){Ke.setEndPoint(be?"EndToStart":"EndToEnd",fe);var ln;if(/[\r\n]/.test(wt.data)){var nn=Ke.duplicate(),bn=nn.text.replace(/\r\n/g,"\r").length;for(ln=nn.moveStart("character",bn);(Me=nn.compareEndPoints("StartToEnd",nn))==-1;)ln++,nn.moveStart("character",1)}else ln=Ke.text.length;Le=new Z(wt,ln)}else de=(Be||!be)&&jt.previousSibling,Pe=(Be||be)&&jt.nextSibling,Pe&&ae(Pe)?Le=new Z(Pe,0):de&&ae(de)?Le=new Z(de,de.data.length):Le=new Z(tt,Re.getNodeIndex(jt));return Re.removeNode(jt),{boundaryPosition:Le,nodeInfo:{nodeIndex:qt,containerElement:tt}}},ee=function(fe,Ee){var be,Be,Xe=fe.offset,Ke=Re.getDocument(fe.node),tt,Dt,jt=Te(Ke).createTextRange(),Me=ae(fe.node);return Me?(be=fe.node,Be=be.parentNode):(Dt=fe.node.childNodes,be=Xe<Dt.length?Dt[Xe]:null,Be=fe.node),tt=Ke.createElement("span"),tt.innerHTML="&#feff;",be?Be.insertBefore(tt,be):Be.appendChild(tt),jt.moveToElementText(tt),jt.collapse(!Ee),Be.removeChild(tt),Me&&jt[Ee?"moveStart":"moveEnd"]("character",Xe),jt};ge=function(fe){this.textRange=fe,this.refresh()},ge.prototype=new ce(document),ge.prototype.refresh=function(){var fe,Ee,be,Be=me(this.textRange);Ae(this.textRange)?Ee=fe=X(this.textRange,Be,!0,!0).boundaryPosition:(be=X(this.textRange,Be,!0,!1),fe=be.boundaryPosition,Ee=X(this.textRange,Be,!1,!1,be.nodeInfo).boundaryPosition),this.setStart(fe.node,fe.offset),this.setEnd(Ee.node,Ee.offset)},ge.prototype.getName=function(){return"WrappedTextRange"},ce.copyComparisonConstants(ge);var le=function(fe){if(fe.collapsed)return ee(new Z(fe.startContainer,fe.startOffset),!0);var Ee=ee(new Z(fe.startContainer,fe.startOffset),!0),be=ee(new Z(fe.endContainer,fe.endOffset),!1),Be=Te(ce.getRangeDocument(fe)).createTextRange();return Be.setEndPoint("StartToStart",Ee),Be.setEndPoint("EndToEnd",be),Be};if(ge.rangeToTextRange=le,ge.prototype.toTextRange=function(){return le(this)},Y.WrappedTextRange=ge,!Y.features.implementsDomRange||Y.config.preferTextRange){var Ce=function(fe){return fe("return this;")()}(Function);typeof Ce.Range=="undefined"&&(Ce.Range=ge),Y.createNativeRange=function(fe){return fe=Ie(fe,re,"createNativeRange"),Te(fe).createTextRange()},Y.WrappedRange=ge}}Y.createRange=function(fe){return fe=Ie(fe,re,"createRange"),new Y.WrappedRange(Y.createNativeRange(fe))},Y.createRangyRange=function(fe){return fe=Ie(fe,re,"createRangyRange"),new ce(fe)},$e.createAliasForDeprecatedMethod(Y,"createIframeRange","createRange"),$e.createAliasForDeprecatedMethod(Y,"createIframeRangyRange","createRangyRange"),Y.addShimListener(function(fe){var Ee=fe.document;typeof Ee.createRange=="undefined"&&(Ee.createRange=function(){return Y.createRange(Ee)}),Ee=fe=null})}),C.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(Y,re){Y.config.checkSelectionRanges=!0;var te="boolean",ge="number",Re=Y.dom,$e=Y.util,Z=$e.isHostMethod,ce=Y.DomRange,Te=Y.WrappedRange,Ie=Y.DOMException,ae=Re.DomPosition,me,Ae,X=Y.features,ee="Control",le=Re.getDocument,Ce=Re.getBody,fe=ce.rangesEqual;function Ee(se){return typeof se=="string"?/^backward(s)?$/i.test(se):!!se}function be(se,ze){if(se){if(Re.isWindow(se))return se;if(se instanceof _r)return se.win;var pt=Re.getContentDocument(se,re,ze);return Re.getWindow(pt)}else return window}function Be(se){return be(se,"getWinSelection").getSelection()}function Xe(se){return be(se,"getDocSelection").document.selection}function Ke(se){var ze=!1;return se.anchorNode&&(ze=Re.comparePoints(se.anchorNode,se.anchorOffset,se.focusNode,se.focusOffset)==1),ze}var tt=Z(window,"getSelection"),Dt=$e.isHostObject(document,"selection");X.implementsWinGetSelection=tt,X.implementsDocSelection=Dt;var jt=Dt&&(!tt||Y.config.preferTextRange);if(jt)me=Xe,Y.isSelectionValid=function(se){var ze=be(se,"isSelectionValid").document,pt=ze.selection;return pt.type!="None"||le(pt.createRange().parentElement())==ze};else if(tt)me=Be,Y.isSelectionValid=function(){return!0};else return re.fail("Neither document.selection or window.getSelection() detected."),!1;Y.getNativeSelection=me;var Me=me();if(!Me)return re.fail("Native selection was null (possibly issue 138?)"),!1;var nt=Y.createNativeRange(document),de=Ce(document),Pe=$e.areHostProperties(Me,["anchorNode","focusNode","anchorOffset","focusOffset"]);X.selectionHasAnchorAndFocus=Pe;var Le=Z(Me,"extend");X.selectionHasExtend=Le;var wt=Z(Me,"setBaseAndExtent");X.selectionHasSetBaseAndExtent=wt;var tn=typeof Me.rangeCount==ge;X.selectionHasRangeCount=tn;var De=!1,xt=!0,qt=Le?function(se,ze){var pt=ce.getRangeDocument(ze),Yt=Y.createRange(pt);Yt.collapseToPoint(ze.endContainer,ze.endOffset),se.addRange(fn(Yt)),se.extend(ze.startContainer,ze.startOffset)}:null;$e.areHostMethods(Me,["addRange","getRangeAt","removeAllRanges"])&&typeof Me.rangeCount==ge&&X.implementsDomRange&&function(){var se=window.getSelection();if(se){for(var ze=se.rangeCount,pt=ze>1,Yt=[],Rn=Ke(se),gr=0;gr<ze;++gr)Yt[gr]=se.getRangeAt(gr);var Ti=Re.createTestElement(document,"",!1),ve=Ti.appendChild(document.createTextNode("\xA0\xA0\xA0")),We=document.createRange();if(We.setStart(ve,1),We.collapse(!0),se.removeAllRanges(),se.addRange(We),xt=se.rangeCount==1,se.removeAllRanges(),!pt){var _t=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(_t&&parseInt(_t[1])>=36)De=!1;else{var Lt=We.cloneRange();We.setStart(ve,0),Lt.setEnd(ve,3),Lt.setStart(ve,2),se.addRange(We),se.addRange(Lt),De=se.rangeCount==2}}for(Re.removeNode(Ti),se.removeAllRanges(),gr=0;gr<ze;++gr)gr==0&&Rn?qt?qt(se,Yt[gr]):(Y.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),se.addRange(Yt[gr])):se.addRange(Yt[gr])}}(),X.selectionSupportsMultipleRanges=De,X.collapsedNonEditableSelectionsSupported=xt;var ln=!1,nn;de&&Z(de,"createControlRange")&&(nn=de.createControlRange(),$e.areHostProperties(nn,["item","add"])&&(ln=!0)),X.implementsControlRange=ln,Pe?Ae=function(se){return se.anchorNode===se.focusNode&&se.anchorOffset===se.focusOffset}:Ae=function(se){return se.rangeCount?se.getRangeAt(se.rangeCount-1).collapsed:!1};function bn(se,ze,pt){var Yt=pt?"end":"start",Rn=pt?"start":"end";se.anchorNode=ze[Yt+"Container"],se.anchorOffset=ze[Yt+"Offset"],se.focusNode=ze[Rn+"Container"],se.focusOffset=ze[Rn+"Offset"]}function Ze(se){var ze=se.nativeSelection;se.anchorNode=ze.anchorNode,se.anchorOffset=ze.anchorOffset,se.focusNode=ze.focusNode,se.focusOffset=ze.focusOffset}function Rt(se){se.anchorNode=se.focusNode=null,se.anchorOffset=se.focusOffset=0,se.rangeCount=0,se.isCollapsed=!0,se._ranges.length=0,xn(se)}function xn(se){se.type=se.rangeCount==0?"None":Ae(se)?"Caret":"Range"}function fn(se){var ze;return se instanceof ce?(ze=Y.createNativeRange(se.getDocument()),ze.setEnd(se.endContainer,se.endOffset),ze.setStart(se.startContainer,se.startOffset)):se instanceof Te?ze=se.nativeRange:X.implementsDomRange&&se instanceof Re.getWindow(se.startContainer).Range&&(ze=se),ze}function Er(se){if(!se.length||se[0].nodeType!=1)return!1;for(var ze=1,pt=se.length;ze<pt;++ze)if(!Re.isAncestorOf(se[0],se[ze]))return!1;return!0}function dr(se){var ze=se.getNodes();if(!Er(ze))throw re.createError("getSingleElementFromRange: range "+se.inspect()+" did not consist of a single element");return ze[0]}function eo(se){return!!se&&typeof se.text!="undefined"}function Pi(se,ze){var pt=new Te(ze);se._ranges=[pt],bn(se,pt,!1),se.rangeCount=1,se.isCollapsed=pt.collapsed,xn(se)}function Oi(se){if(se._ranges.length=0,se.docSelection.type=="None")Rt(se);else{var ze=se.docSelection.createRange();if(eo(ze))Pi(se,ze);else{se.rangeCount=ze.length;for(var pt,Yt=le(ze.item(0)),Rn=0;Rn<se.rangeCount;++Rn)pt=Y.createRange(Yt),pt.selectNode(ze.item(Rn)),se._ranges.push(pt);se.isCollapsed=se.rangeCount==1&&se._ranges[0].collapsed,bn(se,se._ranges[se.rangeCount-1],!1),xn(se)}}}function Ml(se,ze){for(var pt=se.docSelection.createRange(),Yt=dr(ze),Rn=le(pt.item(0)),gr=Ce(Rn).createControlRange(),Ti=0,ve=pt.length;Ti<ve;++Ti)gr.add(pt.item(Ti));try{gr.add(Yt)}catch{throw re.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}gr.select(),Oi(se)}var cs;Z(Me,"getRangeAt")?cs=function(se,ze){try{return se.getRangeAt(ze)}catch{return null}}:Pe&&(cs=function(se){var ze=le(se.anchorNode),pt=Y.createRange(ze);return pt.setStartAndEnd(se.anchorNode,se.anchorOffset,se.focusNode,se.focusOffset),pt.collapsed!==this.isCollapsed&&pt.setStartAndEnd(se.focusNode,se.focusOffset,se.anchorNode,se.anchorOffset),pt});function _r(se,ze,pt){this.nativeSelection=se,this.docSelection=ze,this._ranges=[],this.win=pt,this.refresh()}_r.prototype=Y.selectionPrototype;function Rl(se){se.win=se.anchorNode=se.focusNode=se._ranges=null,se.rangeCount=se.anchorOffset=se.focusOffset=0,se.detached=!0,xn(se)}var et=[];function Mt(se,ze){for(var pt=et.length,Yt,Rn;pt--;)if(Yt=et[pt],Rn=Yt.selection,ze=="deleteAll")Rl(Rn);else if(Yt.win==se)return ze=="delete"?(et.splice(pt,1),!0):Rn;return ze=="deleteAll"&&(et.length=0),null}var Vn=function(se){if(se&&se instanceof _r)return se.refresh(),se;se=be(se,"getNativeSelection");var ze=Mt(se),pt=me(se),Yt=Dt?Xe(se):null;return ze?(ze.nativeSelection=pt,ze.docSelection=Yt,ze.refresh()):(ze=new _r(pt,Yt,se),et.push({win:se,selection:ze})),ze};Y.getSelection=Vn,$e.createAliasForDeprecatedMethod(Y,"getIframeSelection","getSelection");var zt=_r.prototype;function Li(se,ze){for(var pt=le(ze[0].startContainer),Yt=Ce(pt).createControlRange(),Rn=0,gr,Ti=ze.length;Rn<Ti;++Rn){gr=dr(ze[Rn]);try{Yt.add(gr)}catch{throw re.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}Yt.select(),Oi(se)}if(!jt&&Pe&&$e.areHostMethods(Me,["removeAllRanges","addRange"])){zt.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),Rt(this)};var Eo=function(se,ze){qt(se.nativeSelection,ze),se.refresh()};tn?zt.addRange=function(se,ze){if(ln&&Dt&&this.docSelection.type==ee)Ml(this,se);else if(Ee(ze)&&Le)Eo(this,se);else{var pt;De?pt=this.rangeCount:(this.removeAllRanges(),pt=0);var Yt=fn(se).cloneRange();try{this.nativeSelection.addRange(Yt)}catch{}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==pt+1){if(Y.config.checkSelectionRanges){var Rn=cs(this.nativeSelection,this.rangeCount-1);Rn&&!fe(Rn,se)&&(se=new Te(Rn))}this._ranges[this.rangeCount-1]=se,bn(this,se,Ei(this.nativeSelection)),this.isCollapsed=Ae(this),xn(this)}else this.refresh()}}:zt.addRange=function(se,ze){Ee(ze)&&Le?Eo(this,se):(this.nativeSelection.addRange(fn(se)),this.refresh())},zt.setRanges=function(se){if(ln&&Dt&&se.length>1)Li(this,se);else{this.removeAllRanges();for(var ze=0,pt=se.length;ze<pt;++ze)this.addRange(se[ze])}}}else if(Z(Me,"empty")&&Z(nt,"select")&&ln&&jt)zt.removeAllRanges=function(){try{if(this.docSelection.empty(),this.docSelection.type!="None"){var se;if(this.anchorNode)se=le(this.anchorNode);else if(this.docSelection.type==ee){var ze=this.docSelection.createRange();ze.length&&(se=le(ze.item(0)))}if(se){var pt=Ce(se).createTextRange();pt.select(),this.docSelection.empty()}}}catch{}Rt(this)},zt.addRange=function(se){this.docSelection.type==ee?Ml(this,se):(Y.WrappedTextRange.rangeToTextRange(se).select(),this._ranges[0]=se,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,bn(this,se,!1),xn(this))},zt.setRanges=function(se){this.removeAllRanges();var ze=se.length;ze>1?Li(this,se):ze&&this.addRange(se[0])};else return re.fail("No means of selecting a Range or TextRange was found"),!1;zt.getRangeAt=function(se){if(se<0||se>=this.rangeCount)throw new Ie("INDEX_SIZE_ERR");return this._ranges[se].cloneRange()};var Wo;if(jt)Wo=function(se){var ze;Y.isSelectionValid(se.win)?ze=se.docSelection.createRange():(ze=Ce(se.win.document).createTextRange(),ze.collapse(!0)),se.docSelection.type==ee?Oi(se):eo(ze)?Pi(se,ze):Rt(se)};else if(Z(Me,"getRangeAt")&&typeof Me.rangeCount==ge)Wo=function(se){if(ln&&Dt&&se.docSelection.type==ee)Oi(se);else if(se._ranges.length=se.rangeCount=se.nativeSelection.rangeCount,se.rangeCount){for(var ze=0,pt=se.rangeCount;ze<pt;++ze)se._ranges[ze]=new Y.WrappedRange(se.nativeSelection.getRangeAt(ze));bn(se,se._ranges[se.rangeCount-1],Ei(se.nativeSelection)),se.isCollapsed=Ae(se),xn(se)}else Rt(se)};else if(Pe&&typeof Me.isCollapsed==te&&typeof nt.collapsed==te&&X.implementsDomRange)Wo=function(se){var ze,pt=se.nativeSelection;pt.anchorNode?(ze=cs(pt,0),se._ranges=[ze],se.rangeCount=1,Ze(se),se.isCollapsed=Ae(se),xn(se)):Rt(se)};else return re.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;zt.refresh=function(se){var ze=se?this._ranges.slice(0):null,pt=this.anchorNode,Yt=this.anchorOffset;if(Wo(this),se){var Rn=ze.length;if(Rn!=this._ranges.length||this.anchorNode!=pt||this.anchorOffset!=Yt)return!0;for(;Rn--;)if(!fe(ze[Rn],this._ranges[Rn]))return!0;return!1}};var po=function(se,ze){var pt=se.getAllRanges();se.removeAllRanges();for(var Yt=0,Rn=pt.length;Yt<Rn;++Yt)fe(ze,pt[Yt])||se.addRange(pt[Yt]);se.rangeCount||Rt(se)};ln&&Dt?zt.removeRange=function(se){if(this.docSelection.type==ee){for(var ze=this.docSelection.createRange(),pt=dr(se),Yt=le(ze.item(0)),Rn=Ce(Yt).createControlRange(),gr,Ti=!1,ve=0,We=ze.length;ve<We;++ve)gr=ze.item(ve),gr!==pt||Ti?Rn.add(ze.item(ve)):Ti=!0;Rn.select(),Oi(this)}else po(this,se)}:zt.removeRange=function(se){po(this,se)};var Ei;!jt&&Pe&&X.implementsDomRange?(Ei=Ke,zt.isBackward=function(){return Ei(this)}):Ei=zt.isBackward=function(){return!1},zt.isBackwards=zt.isBackward,zt.toString=function(){for(var se=[],ze=0,pt=this.rangeCount;ze<pt;++ze)se[ze]=""+this._ranges[ze];return se.join("")};function Uo(se,ze){if(se.win.document!=le(ze))throw new Ie("WRONG_DOCUMENT_ERR")}function ot(se,ze){if(ze<0||ze>(Re.isCharacterDataNode(se)?se.length:se.childNodes.length))throw new Ie("INDEX_SIZE_ERR")}zt.collapse=function(se,ze){Uo(this,se);var pt=Y.createRange(se);pt.collapseToPoint(se,ze),this.setSingleRange(pt),this.isCollapsed=!0},zt.collapseToStart=function(){if(this.rangeCount){var se=this._ranges[0];this.collapse(se.startContainer,se.startOffset)}else throw new Ie("INVALID_STATE_ERR")},zt.collapseToEnd=function(){if(this.rangeCount){var se=this._ranges[this.rangeCount-1];this.collapse(se.endContainer,se.endOffset)}else throw new Ie("INVALID_STATE_ERR")},zt.selectAllChildren=function(se){Uo(this,se);var ze=Y.createRange(se);ze.selectNodeContents(se),this.setSingleRange(ze)},wt?zt.setBaseAndExtent=function(se,ze,pt,Yt){this.nativeSelection.setBaseAndExtent(se,ze,pt,Yt),this.refresh()}:Le&&(zt.setBaseAndExtent=function(se,ze,pt,Yt){ot(se,ze),ot(pt,Yt),Uo(this,se),Uo(this,pt);var Rn=Y.createRange(node),gr=Re.comparePoints(se,ze,pt,Yt)==-1;gr?Rn.setStartAndEnd(pt,Yt,se,ze):Rn.setStartAndEnd(se,ze,pt,Yt),this.setSingleRange(Rn,gr)}),zt.deleteFromDocument=function(){if(ln&&Dt&&this.docSelection.type==ee){for(var se=this.docSelection.createRange(),ze;se.length;)ze=se.item(0),se.remove(ze),Re.removeNode(ze);this.refresh()}else if(this.rangeCount){var pt=this.getAllRanges();if(pt.length){this.removeAllRanges();for(var Yt=0,Rn=pt.length;Yt<Rn;++Yt)pt[Yt].deleteContents();this.addRange(pt[Rn-1])}}},zt.eachRange=function(se,ze){for(var pt=0,Yt=this._ranges.length;pt<Yt;++pt)if(se(this.getRangeAt(pt)))return ze},zt.getAllRanges=function(){var se=[];return this.eachRange(function(ze){se.push(ze)}),se},zt.setSingleRange=function(se,ze){this.removeAllRanges(),this.addRange(se,ze)},zt.callMethodOnEachRange=function(se,ze){var pt=[];return this.eachRange(function(Yt){pt.push(Yt[se].apply(Yt,ze||[]))}),pt};function Nt(se){return function(ze,pt){var Yt;this.rangeCount?(Yt=this.getRangeAt(0),Yt["set"+(se?"Start":"End")](ze,pt)):(Yt=Y.createRange(this.win.document),Yt.setStartAndEnd(ze,pt)),this.setSingleRange(Yt,this.isBackward())}}zt.setStart=Nt(!0),zt.setEnd=Nt(!1),Y.rangePrototype.select=function(se){Vn(this.getDocument()).setSingleRange(this,se)},zt.changeEachRange=function(se){var ze=[],pt=this.isBackward();this.eachRange(function(Yt){se(Yt),ze.push(Yt)}),this.removeAllRanges(),pt&&ze.length==1?this.addRange(ze[0],"backward"):this.setRanges(ze)},zt.containsNode=function(se,ze){return this.eachRange(function(pt){return pt.containsNode(se,ze)},!0)||!1},zt.getBookmark=function(se){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[se])}},zt.moveToBookmark=function(se){for(var ze=[],pt=0,Yt,Rn;Yt=se.rangeBookmarks[pt++];)Rn=Y.createRange(this.win),Rn.moveToBookmark(Yt),ze.push(Rn);se.backward?this.setSingleRange(ze[0],"backward"):this.setRanges(ze)},zt.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},zt.restoreRanges=function(se){this.removeAllRanges();for(var ze=0,pt;pt=se.ranges[ze];++ze)this.addRange(pt,se.backward&&ze==0)},zt.toHtml=function(){var se=[];return this.eachRange(function(ze){se.push(ce.toHtml(ze))}),se.join("")},X.implementsTextRange&&(zt.getNativeTextRange=function(){var se;if(se=this.docSelection){var ze=se.createRange();if(eo(ze))return ze;throw re.createError("getNativeTextRange: selection is a control selection")}else{if(this.rangeCount>0)return Y.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw re.createError("getNativeTextRange: selection contains no range")}});function rn(se){var ze=[],pt=new ae(se.anchorNode,se.anchorOffset),Yt=new ae(se.focusNode,se.focusOffset),Rn=typeof se.getName=="function"?se.getName():"Selection";if(typeof se.rangeCount!="undefined")for(var gr=0,Ti=se.rangeCount;gr<Ti;++gr)ze[gr]=ce.inspect(se.getRangeAt(gr));return"["+Rn+"(Ranges: "+ze.join(", ")+")(anchor: "+pt.inspect()+", focus: "+Yt.inspect()+"]"}zt.getName=function(){return"WrappedSelection"},zt.inspect=function(){return rn(this)},zt.detach=function(){Mt(this.win,"delete"),Rl(this)},_r.detachAll=function(){Mt(null,"deleteAll")},_r.inspect=rn,_r.isDirectionBackward=Ee,Y.Selection=_r,Y.selectionPrototype=zt,Y.addShimListener(function(se){typeof se.getSelection=="undefined"&&(se.getSelection=function(){return Vn(se)}),se=null})});var Se=!1,ke=function(Y){Se||(Se=!0,!C.initialized&&C.config.autoInitialize&&L())};return S&&(document.readyState=="complete"?ke():(u(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",ke,!1),N(window,"load",ke))),C})})(GN);var pF=GN.exports,yUe={exports:{}};(function(t,e){(function(n,r){t.exports=n(GN.exports)})(function(n){return n.createModule("ClassApplier",["WrappedSelection"],function(r,i){var o=r.dom,a=o.DomPosition,s=o.arrayContains,l=r.util,u=l.forEach,c="span",d=l.isHostMethod(document,"createElementNS");function f(X,ee){for(var le in X)if(X.hasOwnProperty(le)&&ee(le,X[le])===!1)return!1;return!0}function h(X){return X.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function m(X,ee){return!!X&&new RegExp("(?:^|\\s)"+ee+"(?:\\s|$)").test(X)}function g(X,ee){if(typeof X.classList=="object")return X.classList.contains(ee);var le=typeof X.className=="string",Ce=le?X.className:X.getAttribute("class");return m(Ce,ee)}function y(X,ee){if(typeof X.classList=="object")X.classList.add(ee);else{var le=typeof X.className=="string",Ce=le?X.className:X.getAttribute("class");Ce?m(Ce,ee)||(Ce+=" "+ee):Ce=ee,le?X.className=Ce:X.setAttribute("class",Ce)}}var b=function(){function X(ee,le,Ce){return le&&Ce?" ":""}return function(ee,le){if(typeof ee.classList=="object")ee.classList.remove(le);else{var Ce=typeof ee.className=="string",fe=Ce?ee.className:ee.getAttribute("class");fe=fe.replace(new RegExp("(^|\\s)"+le+"(\\s|$)"),X),Ce?ee.className=fe:ee.setAttribute("class",fe)}}}();function w(X){var ee=typeof X.className=="string";return ee?X.className:X.getAttribute("class")}function O(X){return X&&X.split(/\s+/).sort().join(" ")}function S(X){return O(w(X))}function x(X,ee){return S(X)==S(ee)}function C(X,ee){for(var le=ee.split(/\s+/),Ce=0,fe=le.length;Ce<fe;++Ce)if(!g(X,h(le[Ce])))return!1;return!0}function E(X){var ee=X.parentNode;return ee&&ee.nodeType==1&&!/^(textarea|style|script|select|iframe)$/i.test(ee.nodeName)}function T(X,ee,le,Ce,fe){var Ee=X.node,be=X.offset,Be=Ee,Xe=be;Ee==Ce&&be>fe&&++Xe,Ee==ee&&(be==le||be==le+1)&&(Be=Ce,Xe+=fe-le),Ee==ee&&be>le+1&&--Xe,X.node=Be,X.offset=Xe}function P(X,ee,le){X.node==ee&&X.offset>le&&--X.offset}function A(X,ee,le,Ce){le==-1&&(le=ee.childNodes.length);var fe=X.parentNode,Ee=o.getNodeIndex(X);u(Ce,function(be){T(be,fe,Ee,ee,le)}),ee.childNodes.length==le?ee.appendChild(X):ee.insertBefore(X,ee.childNodes[le])}function D(X,ee){var le=X.parentNode,Ce=o.getNodeIndex(X);u(ee,function(fe){P(fe,le,Ce)}),o.removeNode(X)}function N(X,ee,le,Ce,fe){for(var Ee,be=[];Ee=X.firstChild;)A(Ee,ee,le++,fe),be.push(Ee);return Ce&&D(X,fe),be}function $(X,ee){return N(X,X.parentNode,o.getNodeIndex(X),!0,ee)}function W(X,ee){var le=X.cloneRange();le.selectNodeContents(ee);var Ce=le.intersection(X),fe=Ce?Ce.toString():"";return fe!=""}function L(X){for(var ee=X.getNodes([3]),le=0,Ce;(Ce=ee[le])&&!W(X,Ce);)++le;for(var fe=ee.length-1;(Ce=ee[fe])&&!W(X,Ce);)--fe;return ee.slice(le,fe+1)}function I(X,ee){if(X.attributes.length!=ee.attributes.length)return!1;for(var le=0,Ce=X.attributes.length,fe,Ee,be;le<Ce;++le)if(fe=X.attributes[le],be=fe.name,be!="class"&&(Ee=ee.attributes.getNamedItem(be),fe===null!=(Ee===null)||fe.specified!=Ee.specified||fe.specified&&fe.nodeValue!==Ee.nodeValue))return!1;return!0}function U(X,ee){for(var le=0,Ce=X.attributes.length,fe;le<Ce;++le)if(fe=X.attributes[le].name,!(ee&&s(ee,fe))&&X.attributes[le].specified&&fe!="class")return!0;return!1}var Q=o.getComputedStyleProperty,V=function(){var X=document.createElement("div");return typeof X.isContentEditable=="boolean"?function(ee){return ee&&ee.nodeType==1&&ee.isContentEditable}:function(ee){return!ee||ee.nodeType!=1||ee.contentEditable=="false"?!1:ee.contentEditable=="true"||V(ee.parentNode)}}();function q(X){var ee;return X&&X.nodeType==1&&((ee=X.parentNode)&&ee.nodeType==9&&ee.designMode=="on"||V(X)&&!V(X.parentNode))}function K(X){return(V(X)||X.nodeType!=1&&V(X.parentNode))&&!q(X)}var ie=/^inline(-block|-table)?$/i;function oe(X){return X&&X.nodeType==1&&!ie.test(Q(X,"display"))}var Se=/[^\r\n\t\f \u200B]/;function ke(X){if(X.data.length==0)return!0;if(Se.test(X.data))return!1;var ee=Q(X.parentNode,"whiteSpace");switch(ee){case"pre":case"pre-wrap":case"-moz-pre-wrap":return!1;case"pre-line":if(/[\r\n]/.test(X.data))return!1}return oe(X.previousSibling)||oe(X.nextSibling)}function Y(X){var ee=[],le,Ce;for(le=0;Ce=X[le++];)ee.push(new a(Ce.startContainer,Ce.startOffset),new a(Ce.endContainer,Ce.endOffset));return ee}function re(X,ee){for(var le=0,Ce,fe,Ee,be=X.length;le<be;++le)Ce=X[le],fe=ee[le*2],Ee=ee[le*2+1],Ce.setStartAndEnd(fe.node,fe.offset,Ee.node,Ee.offset)}function te(X,ee){return o.isCharacterDataNode(X)?ee==0?!!X.previousSibling:ee==X.length?!!X.nextSibling:!0:ee>0&&ee<X.childNodes.length}function ge(X,ee,le,Ce){var fe,Ee,be=le==0;if(o.isAncestorOf(ee,X))return X;if(o.isCharacterDataNode(ee)){var Be=o.getNodeIndex(ee);if(le==0)le=Be;else if(le==ee.length)le=Be+1;else throw i.createError("splitNodeAt() should not be called with offset in the middle of a data node ("+le+" in "+ee.data);ee=ee.parentNode}if(te(ee,le)){fe=ee.cloneNode(!1),Ee=ee.parentNode,fe.id&&fe.removeAttribute("id");for(var Xe,Ke=0;Xe=ee.childNodes[le];)A(Xe,fe,Ke++,Ce);return A(fe,Ee,o.getNodeIndex(ee)+1,Ce),ee==X?fe:ge(X,Ee,o.getNodeIndex(fe),Ce)}else if(X!=ee){fe=ee.parentNode;var tt=o.getNodeIndex(ee);return be||tt++,ge(X,fe,tt,Ce)}return X}function Re(X,ee){return X.namespaceURI==ee.namespaceURI&&X.tagName.toLowerCase()==ee.tagName.toLowerCase()&&x(X,ee)&&I(X,ee)&&Q(X,"display")=="inline"&&Q(ee,"display")=="inline"}function $e(X){var ee=X?"nextSibling":"previousSibling";return function(le,Ce){var fe=le.parentNode,Ee=le[ee];if(Ee){if(Ee&&Ee.nodeType==3)return Ee}else if(Ce&&(Ee=fe[ee],Ee&&Ee.nodeType==1&&Re(fe,Ee))){var be=Ee[X?"firstChild":"lastChild"];if(be&&be.nodeType==3)return be}return null}}var Z=$e(!1),ce=$e(!0);function Te(X){this.isElementMerge=X.nodeType==1,this.textNodes=[];var ee=this.isElementMerge?X.lastChild:X;ee&&(this.textNodes[0]=ee)}Te.prototype={doMerge:function(X){var ee=this.textNodes,le=ee[0];if(ee.length>1){var Ce=o.getNodeIndex(le),fe=[],Ee=0,be;u(ee,function(Be,Xe){be=Be.parentNode,Xe>0&&(be.removeChild(Be),be.hasChildNodes()||o.removeNode(be),X&&u(X,function(Ke){Ke.node==Be&&(Ke.node=le,Ke.offset+=Ee),Ke.node==be&&Ke.offset>Ce&&(--Ke.offset,Ke.offset==Ce+1&&Xe<ee.length-1&&(Ke.node=le,Ke.offset=Ee))})),fe[Xe]=Be.data,Ee+=Be.data.length}),le.data=fe.join("")}return le.data},getLength:function(){for(var X=this.textNodes.length,ee=0;X--;)ee+=this.textNodes[X].length;return ee},toString:function(){var X=[];return u(this.textNodes,function(ee,le){X[le]="'"+ee.data+"'"}),"[Merge("+X.join(",")+")]"}};var Ie=["elementTagName","ignoreWhiteSpace","applyToEditableOnly","useExistingElements","removeEmptyElements","onElementCreate"],ae={};function me(X,ee,le){var Ce,fe,Ee,be,Be=this;Be.cssClass=Be.className=X;var Xe=null,Ke={};if(typeof ee=="object"&&ee!==null){for(typeof ee.elementTagName!="undefined"&&(ee.elementTagName=ee.elementTagName.toLowerCase()),le=ee.tagNames,Xe=ee.elementProperties,Ke=ee.elementAttributes,fe=0;be=Ie[fe++];)ee.hasOwnProperty(be)&&(Be[be]=ee[be]);Ce=ee.normalize}else Ce=ee;Be.normalize=typeof Ce=="undefined"?!0:Ce,Be.attrExceptions=[];var tt=document.createElement(Be.elementTagName);Be.elementProperties=Be.copyPropertiesToElement(Xe,tt,!0),f(Ke,function(jt,Me){Be.attrExceptions.push(jt),Ke[jt]=""+Me}),Be.elementAttributes=Ke,Be.elementSortedClassName=Be.elementProperties.hasOwnProperty("className")?O(Be.elementProperties.className+" "+X):X,Be.applyToAnyTagName=!1;var Dt=typeof le;if(Dt=="string")le=="*"?Be.applyToAnyTagName=!0:Be.tagNames=h(le.toLowerCase()).split(/\s*,\s*/);else if(Dt=="object"&&typeof le.length=="number")for(Be.tagNames=[],fe=0,Ee=le.length;fe<Ee;++fe)le[fe]=="*"?Be.applyToAnyTagName=!0:Be.tagNames.push(le[fe].toLowerCase());else Be.tagNames=[Be.elementTagName]}me.prototype={elementTagName:c,elementProperties:{},elementAttributes:{},ignoreWhiteSpace:!0,applyToEditableOnly:!1,useExistingElements:!0,removeEmptyElements:!0,onElementCreate:null,copyPropertiesToElement:function(X,ee,le){var Ce,fe,Ee={},be,Be,Xe,Ke;for(var tt in X)if(X.hasOwnProperty(tt))if(Be=X[tt],Xe=ee[tt],tt=="className")y(ee,Be),y(ee,this.className),ee[tt]=O(ee[tt]),le&&(Ee[tt]=Be);else if(tt=="style"){fe=Xe,le&&(Ee[tt]=be={});for(Ce in X[tt])X[tt].hasOwnProperty(Ce)&&(fe[Ce]=Be[Ce],le&&(be[Ce]=fe[Ce]));this.attrExceptions.push(tt)}else ee[tt]=Be,le&&(Ee[tt]=ee[tt],Ke=ae.hasOwnProperty(tt)?ae[tt]:tt,this.attrExceptions.push(Ke));return le?Ee:""},copyAttributesToElement:function(X,ee){for(var le in X)X.hasOwnProperty(le)&&!/^class(?:Name)?$/i.test(le)&&ee.setAttribute(le,X[le])},appliesToElement:function(X){return s(this.tagNames,X.tagName.toLowerCase())},getEmptyElements:function(X){var ee=this;return X.getNodes([1],function(le){return ee.appliesToElement(le)&&!le.hasChildNodes()})},hasClass:function(X){return X.nodeType==1&&(this.applyToAnyTagName||this.appliesToElement(X))&&g(X,this.className)},getSelfOrAncestorWithClass:function(X){for(;X;){if(this.hasClass(X))return X;X=X.parentNode}return null},isModifiable:function(X){return!this.applyToEditableOnly||K(X)},isIgnorableWhiteSpaceNode:function(X){return this.ignoreWhiteSpace&&X&&X.nodeType==3&&ke(X)},postApply:function(X,ee,le,Ce){var fe=X[0],Ee=X[X.length-1],be=[],Be,Xe=fe,Ke=Ee,tt=0,Dt=Ee.length,jt;u(X,function(Pe){jt=Z(Pe,!Ce),jt?(Be||(Be=new Te(jt),be.push(Be)),Be.textNodes.push(Pe),Pe===fe&&(Xe=Be.textNodes[0],tt=Xe.length),Pe===Ee&&(Ke=Be.textNodes[0],Dt=Be.getLength())):Be=null});var Me=ce(Ee,!Ce);if(Me&&(Be||(Be=new Te(Ee),be.push(Be)),Be.textNodes.push(Me)),be.length){for(var nt=0,de=be.length;nt<de;++nt)be[nt].doMerge(le);ee.setStartAndEnd(Xe,tt,Ke,Dt)}},createContainer:function(X){var ee=o.getDocument(X),le=d&&!o.isHtmlNamespace(X)&&X.namespaceURI?ee.createElementNS(X.namespaceURI,this.elementTagName):ee.createElement(this.elementTagName);return this.copyPropertiesToElement(this.elementProperties,le,!1),this.copyAttributesToElement(this.elementAttributes,le),y(le,this.className),this.onElementCreate&&this.onElementCreate(le,this),le},elementHasProperties:function(X,ee){var le=this;return f(ee,function(Ce,fe){if(Ce=="className")return C(X,fe);if(typeof fe=="object"){if(!le.elementHasProperties(X[Ce],fe))return!1}else if(X[Ce]!==fe)return!1})},elementHasAttributes:function(X,ee){return f(ee,function(le,Ce){if(X.getAttribute(le)!==Ce)return!1})},applyToTextNode:function(X,ee){if(E(X)){var le=X.parentNode;if(le.childNodes.length==1&&this.useExistingElements&&this.appliesToElement(le)&&this.elementHasProperties(le,this.elementProperties)&&this.elementHasAttributes(le,this.elementAttributes))y(le,this.className);else{var Ce=X.parentNode,fe=this.createContainer(Ce);Ce.insertBefore(fe,X),fe.appendChild(X)}}},isRemovable:function(X){return X.tagName.toLowerCase()==this.elementTagName&&S(X)==this.elementSortedClassName&&this.elementHasProperties(X,this.elementProperties)&&!U(X,this.attrExceptions)&&this.elementHasAttributes(X,this.elementAttributes)&&this.isModifiable(X)},isEmptyContainer:function(X){var ee=X.childNodes.length;return X.nodeType==1&&this.isRemovable(X)&&(ee==0||ee==1&&this.isEmptyContainer(X.firstChild))},removeEmptyContainers:function(X){var ee=this,le=X.getNodes([1],function(Ee){return ee.isEmptyContainer(Ee)}),Ce=[X],fe=Y(Ce);u(le,function(Ee){D(Ee,fe)}),re(Ce,fe)},undoToTextNode:function(X,ee,le,Ce){if(!ee.containsNode(le)){var fe=ee.cloneRange();fe.selectNode(le),fe.isPointInRange(ee.endContainer,ee.endOffset)&&(ge(le,ee.endContainer,ee.endOffset,Ce),ee.setEndAfter(le)),fe.isPointInRange(ee.startContainer,ee.startOffset)&&(le=ge(le,ee.startContainer,ee.startOffset,Ce))}this.isRemovable(le)?$(le,Ce):b(le,this.className)},splitAncestorWithClass:function(X,ee,le){var Ce=this.getSelfOrAncestorWithClass(X);Ce&&ge(Ce,X,ee,le)},undoToAncestor:function(X,ee){this.isRemovable(X)?$(X,ee):b(X,this.className)},applyToRange:function(X,ee){var le=this;ee=ee||[];var Ce=Y(ee||[]);X.splitBoundariesPreservingPositions(Ce),le.removeEmptyElements&&le.removeEmptyContainers(X);var fe=L(X);if(fe.length){u(fe,function(Be){!le.isIgnorableWhiteSpaceNode(Be)&&!le.getSelfOrAncestorWithClass(Be)&&le.isModifiable(Be)&&le.applyToTextNode(Be,Ce)});var Ee=fe[fe.length-1];X.setStartAndEnd(fe[0],0,Ee,Ee.length),le.normalize&&le.postApply(fe,X,Ce,!1),re(ee,Ce)}var be=le.getEmptyElements(X);u(be,function(Be){y(Be,le.className)})},applyToRanges:function(X){for(var ee=X.length;ee--;)this.applyToRange(X[ee],X);return X},applyToSelection:function(X){var ee=r.getSelection(X);ee.setRanges(this.applyToRanges(ee.getAllRanges()))},undoToRange:function(X,ee){var le=this;ee=ee||[];var Ce=Y(ee);X.splitBoundariesPreservingPositions(Ce),le.removeEmptyElements&&le.removeEmptyContainers(X,Ce);var fe=L(X),Ee,be,Be=fe[fe.length-1];if(fe.length){le.splitAncestorWithClass(X.endContainer,X.endOffset,Ce),le.splitAncestorWithClass(X.startContainer,X.startOffset,Ce);for(var Xe=0,Ke=fe.length;Xe<Ke;++Xe)Ee=fe[Xe],be=le.getSelfOrAncestorWithClass(Ee),be&&le.isModifiable(Ee)&&le.undoToAncestor(be,Ce);X.setStartAndEnd(fe[0],0,Be,Be.length),le.normalize&&le.postApply(fe,X,Ce,!0),re(ee,Ce)}var tt=le.getEmptyElements(X);u(tt,function(Dt){b(Dt,le.className)})},undoToRanges:function(X){for(var ee=X.length;ee--;)this.undoToRange(X[ee],X);return X},undoToSelection:function(X){var ee=r.getSelection(X),le=r.getSelection(X).getAllRanges();this.undoToRanges(le),ee.setRanges(le)},isAppliedToRange:function(X){if(X.collapsed||X.toString()=="")return!!this.getSelfOrAncestorWithClass(X.commonAncestorContainer);var ee=X.getNodes([3]);if(ee.length){for(var le=0,Ce;Ce=ee[le++];)if(!this.isIgnorableWhiteSpaceNode(Ce)&&W(X,Ce)&&this.isModifiable(Ce)&&!this.getSelfOrAncestorWithClass(Ce))return!1}return!0},isAppliedToRanges:function(X){var ee=X.length;if(ee==0)return!1;for(;ee--;)if(!this.isAppliedToRange(X[ee]))return!1;return!0},isAppliedToSelection:function(X){var ee=r.getSelection(X);return this.isAppliedToRanges(ee.getAllRanges())},toggleRange:function(X){this.isAppliedToRange(X)?this.undoToRange(X):this.applyToRange(X)},toggleSelection:function(X){this.isAppliedToSelection(X)?this.undoToSelection(X):this.applyToSelection(X)},getElementsWithClassIntersectingRange:function(X){var ee=[],le=this;return X.getNodes([3],function(Ce){var fe=le.getSelfOrAncestorWithClass(Ce);fe&&!s(ee,fe)&&ee.push(fe)}),ee},detach:function(){}};function Ae(X,ee,le){return new me(X,ee,le)}me.util={hasClass:g,addClass:y,removeClass:b,getClass:w,hasSameClasses:x,hasAllClasses:C,replaceWithOwnChildren:$,elementsHaveSameNonClassAttributes:I,elementHasNonClassAttributes:U,splitNodeAt:ge,isEditableElement:V,isEditingHost:q,isEditable:K},r.CssClassApplier=r.ClassApplier=me,r.createClassApplier=Ae,l.createAliasForDeprecatedMethod(r,"createCssClassApplier","createClassApplier",i)}),n})})(yUe);var gF={toolbar:{allowMultiParagraphSelection:!0,buttons:["bold","colorpicker","italic","underline","strikethrough","quote","justifyLeft","justifyCenter","justifyRight","justifyFull","superscript","subscript","orderedlist","unorderedlist","pre","removeFormat","outdent","indent","h2","h3"],standardizeSelectionStart:!1,updateOnEmptySelection:!1},placeholder:{text:"\u8BF7\u8F93\u5165\u5185\u5BB9",hideOnClick:!0},disableEditing:!0},mF=_S.extensions.button.extend({name:"colorpicker",tagNames:["mark"],contentDefault:"<b>Color</b>",aria:"Color Picker",action:"colorPicker",init:function(){var t=this;pF.init(),_S.extensions.button.prototype.init.call(this),this.colorPicker=new CX({parent:this.button,color:"#000",onDone:function(e){t.coloredText&&t.coloredText.isAppliedToSelection()&&t.coloredText.undoToSelection(),t.coloredText=pF.createClassApplier("colored",{elementTagName:"span",elementProperties:{style:{color:e.hex}},normalize:!0}),t.coloredText.toggleSelection(),t.base.checkContentChanged(),t.setInactive()}})},getButton:function(){return this.button},handleClick:function(){this.setActive(),this.colorPicker.show()},isAlreadyApplied:function(t){return t.nodeName.toLowerCase()==="mark"},isActive:function(){return this.button.classList.contains("medium-editor-button-active")},setInactive:function(){this.button.classList.remove("medium-editor-button-active")},setActive:function(){this.button.classList.add("medium-editor-button-active")}}),bUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_Ue=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vF=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};(function(t){bUe(e,t);function e(n){var r=t.call(this,n)||this;r.labelMap=new Map;var i=n.lf,o=n.graphModel;return r.lf=i,r.graphModel=o,r.state={tick:0},r}return e.prototype.componentDidMount=function(){var n=this,r=this.props.graphModel;this.editor=new _S(".lf-label-editor",Jh(gF,{autoLink:!0,extensions:{colorPicker:new mF}})),r.eventCenter.on("text:update,node:mousemove,node:resize,node:rotate,node:drag,label:drop,node:drop",function(){}),r.eventCenter.on("node:properties-change,node:properties-delete",function(){n.setState({tick:n.state.tick+1})})},e.prototype.componentDidUpdate=function(){var n;this.editor&&this.editor.elements.length>0?this.editor.addElements(".lf-label-editor"):((n=this.editor)===null||n===void 0||n.destroy(),this.editor=new _S(".lf-label-editor",Jh(gF,{autoLink:!0,extensions:{colorPicker:new mF}})))},e.prototype.componentWillUnmount=function(){var n;(n=this.editor)===null||n===void 0||n.destroy()},e.prototype.getLabels=function(){var n=this,r=this.props,i=r.lf.extension,o=r.graphModel,a=yF(yF([],vF(o.nodes),!1),vF(o.edges),!1),s=i.label;if(s){var l=[];return jn(a,function(u){var c,d,f=u.getData(),h=(d=(c=f.properties)===null||c===void 0?void 0:c._label)!==null&&d!==void 0?d:[];jn(h,function(m){var g=n.labelMap,y=new dUe(m,u,o);g.set(y.id,y),l.push(rt(uUe,{label:y,element:u,graphModel:o},y.id))})}),l}return null},e.prototype.render=function(){return rt("foreignObject",{id:"lf-label-overlay",class:"lf-label-overlay",children:this.getLabels()})},e.toolName="label-edit-tool",e=_Ue([Ea],e),e})(ur);var bF=globalThis&&globalThis.__assign||function(){return bF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bF.apply(this,arguments)},OC=globalThis&&globalThis.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})},wC=globalThis&&globalThis.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},OUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wUe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},zv={};function EX(t){return t.startsWith("data:text/plain")}function TX(t){return OC(this,void 0,void 0,function(){return wC(this,function(e){return zv[t]?[2,zv[t]]:[2,new Promise(function(n,r){try{fetch(t).then(function(i){return i.blob()}).then(function(i){var o=new FileReader;o.onloadend=function(){n(zv[t]=o.result)},o.onerror=r,o.readAsDataURL(i)}).catch(function(){n(zv[t]=t)})}catch{return zv[t]=t}})]})})}function _F(t,e){return OC(this,void 0,void 0,function(){var n,r,i;return wC(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n=t.getAttribute(e)||"",n.startsWith("data:")?[2]:[4,TX(n)];case 1:return r=o.sent(),EX(r)?[2]:(t.setAttribute(e,r),[3,3]);case 2:return i=o.sent(),console.error(i),[3,3];case 3:return[2]}})})}function OF(t,e){return OC(this,void 0,void 0,function(){var n,r;return wC(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e.startsWith("data:")?[2]:[4,TX(e)];case 1:return n=i.sent(),EX(n)?[2]:(t.style.backgroundImage="url(".concat(n,")"),[3,3]);case 2:return r=i.sent(),console.error(r),[3,3];case 3:return[2]}})})}function a2(t){return OC(this,void 0,void 0,function(){var e,n,r,i,o,a,s,u,l,u;return wC(this,function(c){switch(c.label){case 0:for(e=[t],r=[];e.length;)n=e.shift(),n.children.length&&e.push.apply(e,wUe([],OUe(n.children),!1)),n instanceof HTMLElement&&(i=n.style,o=i.background,a=i.backgroundImage,s=o.match(/url\(["']?(.*?)["']?\)/),s&&s[1]&&(u=s[1],r.push(OF(n,u))),l=a.match(/url\(["']?(.*?)["']?\)/),l&&l[1]&&(u=l[1],r.push(OF(n,u)))),n instanceof HTMLImageElement?r.push(_F(n,"src")):n instanceof SVGImageElement&&r.push(_F(n,"href"));return[4,Promise.all(r)];case 1:return c.sent(),[2]}})})}function Qv(t,e,n){var r=document.createElement("canvas");r.width=e,r.height=n;var i=r.getContext("2d");return i&&i.drawImage(t,0,0,t.width,t.height,0,0,e,n),r}var Pc=globalThis&&globalThis.__awaiter||function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,e||[])).next())})},Ac=globalThis&&globalThis.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},SUe=function(){function t(e){var n=e.lf,r=this;this.lf=n,this.customCssRules="",this.useGlobalRules=!0,n.getSnapshot=function(i,o){return Pc(r,void 0,void 0,function(){return Ac(this,function(a){switch(a.label){case 0:return[4,this.getSnapshot(i,o)];case 1:return[2,a.sent()]}})})},n.getSnapshotBlob=function(i,o){return Pc(r,void 0,void 0,function(){return Ac(this,function(a){switch(a.label){case 0:return[4,this.getSnapshotBlob(i,o)];case 1:return[2,a.sent()]}})})},n.getSnapshotBase64=function(i,o){return Pc(r,void 0,void 0,function(){return Ac(this,function(a){switch(a.label){case 0:return[4,this.getSnapshotBase64(i,o)];case 1:return[2,a.sent()]}})})}}return t.prototype.getSvgRootElement=function(e){var n=e.container.querySelector(".lf-canvas-overlay");return n},t.prototype.triggerDownload=function(e){var n=new MouseEvent("click",{view:document.defaultView,bubbles:!1,cancelable:!0}),r=document.createElement("a");r.setAttribute("download",this.fileName),r.setAttribute("href",e),r.setAttribute("target","_blank"),r.dispatchEvent(n)},t.prototype.removeAnchor=function(e){for(var n=e.childNodes,r=e.childNodes&&e.childNodes.length,i=0;i<r;i++){var o=n[i],a=o.classList&&Array.from(o.classList)||[];a.indexOf("lf-anchor")>-1&&(e.removeChild(e.childNodes[i]),r--,i--)}},t.prototype.removeRotateControl=function(e){for(var n=e.childNodes,r=e.childNodes&&e.childNodes.length,i=0;i<r;i++){var o=n[i],a=o.classList&&Array.from(o.classList)||[];a.indexOf("lf-rotate-control")>-1&&(e.removeChild(e.childNodes[i]),r--,i--)}},t.prototype.getSnapshot=function(e,n){return Pc(this,void 0,void 0,function(){var r,i,o,a,s=this;return Ac(this,function(l){switch(l.label){case 0:return r=this.lf.graphModel.getPartial(),i=(n!=null?n:{}).partial,o=i===void 0?r:i,a=this.lf.getEditConfig(),this.lf.updateEditConfig({isSilentMode:!0,stopScrollGraph:!0,stopMoveGraph:!0}),r===o?[3,1]:(this.lf.graphModel.setPartial(o),this.lf.graphModel.eventCenter.once("graph:updated",function(){return Pc(s,void 0,void 0,function(){return Ac(this,function(u){switch(u.label){case 0:return[4,this.snapshot(e,n)];case 1:return u.sent(),this.lf.graphModel.setPartial(r),[2]}})})}),[3,3]);case 1:return[4,this.snapshot(e,n)];case 2:l.sent(),l.label=3;case 3:return this.lf.updateEditConfig(a),[2]}})})},t.prototype.snapshot=function(e,n){return Pc(this,void 0,void 0,function(){var r,i,o,a,s,l,u,c,d,f=this;return Ac(this,function(h){switch(h.label){case 0:return r=n!=null?n:{},i=r.fileType,o=i===void 0?"png":i,a=r.quality,this.fileName="".concat(e!=null?e:"logic-flow.".concat(Date.now()),".").concat(o),s=this.getSvgRootElement(this.lf),[4,a2(s)];case 1:return h.sent(),o==="svg"?(l=this.cloneSvg(s),u=new XMLSerializer().serializeToString(l),c=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(c),this.triggerDownload(d)):this.getCanvasData(s,n!=null?n:{}).then(function(m){var g=m.toDataURL("image/".concat(o),a).replace("image/".concat(o),"image/octet-stream");f.triggerDownload(g)}),[2]}})})},t.prototype.getSnapshotBase64=function(e,n){return Pc(this,void 0,void 0,function(){var r,i=this;return Ac(this,function(o){switch(o.label){case 0:return r=this.getSvgRootElement(this.lf),[4,a2(r)];case 1:return o.sent(),[2,new Promise(function(a){i.getCanvasData(r,{backgroundColor:e}).then(function(s){var l=s.toDataURL("image/".concat(n!=null?n:"png"));a({data:l,width:s.width,height:s.height})})})]}})})},t.prototype.getSnapshotBlob=function(e,n){return Pc(this,void 0,void 0,function(){var r,i=this;return Ac(this,function(o){switch(o.label){case 0:return r=this.getSvgRootElement(this.lf),[4,a2(r)];case 1:return o.sent(),[2,new Promise(function(a){i.getCanvasData(r,{backgroundColor:e}).then(function(s){s.toBlob(function(l){a({data:l,width:s.width,height:s.height})},"image/".concat(n!=null?n:"png"))})})]}})})},t.prototype.getClassRules=function(){var e="";if(this.useGlobalRules)for(var n=document.styleSheets,r=0;r<n.length;r++){var i=n[r];try{for(var o=0;o<i.cssRules.length;o++)e+=i.cssRules[o].cssText}catch{console.log("CSS scripts from different sources have been filtered out")}}return this.customCssRules&&(e+=this.customCssRules),e},t.prototype.getCanvasData=function(e,n){return Pc(this,void 0,void 0,function(){var r,i,o,a,s,l,u,c,d,f,h,m,g,y,b,w,O,S,x,C,E,T,P,A,D,N;return Ac(this,function($){return r=n.width,i=n.height,o=n.backgroundColor,a=n.padding,s=a===void 0?40:a,l=this.cloneSvg(e,!1),u=window.devicePixelRatio||1,u<1&&(u=1),c=this.lf.graphModel.rootEl.querySelector(".lf-base"),d=c.getBoundingClientRect(),f=this.lf.container.querySelector(".lf-canvas-overlay"),h=f.getBoundingClientRect(),m=d.x-h.x,g=d.y-h.y,y=this.lf.graphModel,b=y.transformModel,w=b.SCALE_X,O=b.SCALE_Y,S=b.TRANSLATE_X,x=b.TRANSLATE_Y,l.lastChild.style.transform="matrix(1, 0, 0, 1, ".concat((-m+S)*(1/w),", ").concat((-g+x)*(1/O),")"),C=Math.ceil(d.width/w),E=Math.ceil(d.height/O),T=document.createElement("canvas"),T.style.width="".concat(C,"px"),T.style.height="".concat(E,"px"),T.width=C*u+s*2,T.height=E*u+s*2,P=T.getContext("2d"),P&&(P.clearRect(0,0,T.width,T.height),P.scale(u,u),o?(P.fillStyle=o,P.fillRect(0,0,T.width,T.height)):P.clearRect(0,0,T.width,T.height)),A=new Image,D=document.createElement("style"),D.innerHTML=this.getClassRules(),N=document.createElement("foreignObject"),N.appendChild(D),l.appendChild(N),[2,new Promise(function(W){A.onload=function(){var U=navigator.userAgent.indexOf("Firefox")>-1;try{U?createImageBitmap(A,{resizeWidth:r&&i?Qv(T,r,i).width:T.width,resizeHeight:r&&i?Qv(T,r,i).height:T.height}).then(function(Q){P==null||P.drawImage(Q,s/u,s/u),W(r&&i?Qv(T,r,i):T)}):(P==null||P.drawImage(A,s/u,s/u),W(r&&i?Qv(T,r,i):T))}catch{P==null||P.drawImage(A,s/u,s/u),W(r&&i?Qv(T,r,i):T)}};var L="data:image/svg+xml;charset=utf-8,".concat(new XMLSerializer().serializeToString(l)),I=L.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");A.src=I})]})})},t.prototype.cloneSvg=function(e,n){var r=this,i;n===void 0&&(n=!0);var o=e.cloneNode(!0),a=o.lastChild,s=(i=a==null?void 0:a.childNodes)===null||i===void 0?void 0:i.length;if(s)for(var l=0;l<s;l++){var u=a==null?void 0:a.childNodes[l],c=u.classList&&Array.from(u.classList);if(c&&c.indexOf("lf-base")<0)a==null||a.removeChild(a.childNodes[l]),s--,l--;else{var d=a==null?void 0:a.childNodes[l];d&&d.childNodes.forEach(function(m){var g=m;r.removeAnchor(g.firstChild),r.removeRotateControl(g.firstChild)})}}if(n){var f=document.createElement("style");f.innerHTML=this.getClassRules();var h=document.createElement("foreignObject");h.appendChild(f),o.appendChild(h)}return o},t.pluginName="snapshot",t}();globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var wF=globalThis&&globalThis.__assign||function(){return wF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wF.apply(this,arguments)},SF=globalThis&&globalThis.__assign||function(){return SF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},SF.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var xUe=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},CUe=function(){function t(e){var n=e.lf,r=e.LogicFlow,i=e.options,o=this;this.width=200,this.height=150,this.scale=1,this.translateX=0,this.translateY=0,this.showEdge=!1,this.viewPortTop=0,this.viewPortLeft=0,this.viewPortWidth=150,this.viewPortHeight=75,this.isShow=!1,this.isShowHeader=!1,this.isShowCloseIcon=!1,this.headerTitle="\u5BFC\u822A",this.disabledPlugins=["miniMap","control","selectionSelect"],this.onGraphResize=function(){o.updateViewPortBounds(),o.isShow&&o.updateViewPort()},this.render=function(s,l){o.container=l,o.lf.on("history:change",function(){o.isShow&&o.setView()}),o.lf.on("graph:transform",function(){o.isShow&&o.setView(!1)})},this.show=function(s,l){o.isShow||(o.createMiniMap(s,l),o.setView()),o.isShow=!0},this.hide=function(){o.isShow&&(o.removeMiniMap(),o.lf.emit("miniMap:close",{})),o.isShow=!1},this.updatePosition=function(s){if(typeof s=="object")(s.left!==void 0||s.right!==void 0)&&(o.leftPosition=s.left,o.rightPosition=s.right),(s.top!==void 0||s.bottom!==void 0)&&(o.topPosition=s.top,o.bottomPosition=s.bottom);else switch(s){case"left-top":o.leftPosition=0,o.rightPosition=void 0,o.topPosition=0,o.bottomPosition=void 0;break;case"right-top":o.leftPosition=void 0,o.rightPosition=0,o.topPosition=0,o.bottomPosition=void 0;break;case"left-bottom":o.leftPosition=0,o.rightPosition=void 0,o.topPosition=void 0,o.bottomPosition=0;break;case"right-bottom":o.leftPosition=void 0,o.rightPosition=0,o.topPosition=void 0,o.bottomPosition=0;break}o.updateMiniMapPosition()},this.reset=function(){o.lf.resetTranslate(),o.lf.resetZoom()},this.setShowEdge=function(s){o.showEdge!==s&&(o.showEdge=s,o.setView())},this.startDrag=function(s){document.addEventListener("mousemove",o.drag),document.addEventListener("mouseup",o.drop);var l=s.x,u=s.y;o.startPosition={x:l,y:u}},this.drag=function(s){var l=s.x,u=s.y,c=(l-o.startPosition.x)/o.scale,d=(u-o.startPosition.y)/o.scale,f=o.viewPortLeft+c+o.viewPortWidth/o.scale/2,h=o.viewPortTop+d+o.viewPortHeight/o.scale/2;o.startPosition={x:l,y:u},o.lf.focusOn({coordinate:{x:f,y:h}})},this.drop=function(){document.removeEventListener("mousemove",o.drag),document.removeEventListener("mouseup",o.drop)},this.mapClick=function(s){var l=s.offsetX,u=s.offsetY,c=o.translateX+l/o.scale,d=o.translateY+u/o.scale;o.lf.focusOn({coordinate:{x:c,y:d}})},this.lf=n,this.LFCtor=r,i&&this.setOption(i),this.viewPortWidth=n.graphModel.width,this.viewPortHeight=n.graphModel.height;var a={left:0,right:this.viewPortWidth,top:0,bottom:this.viewPortHeight};this.bounds=a,this.elementAreaBounds=a,this.viewPortBounds=a,this.initMiniMap(),n.on("graph:resize",this.onGraphResize)}return t.prototype.setOption=function(e){var n=e.width,r=n===void 0?150:n,i=e.height,o=i===void 0?220:i,a=e.showEdge,s=a===void 0?!1:a,l=e.isShowHeader,u=l===void 0?!1:l,c=e.isShowCloseIcon,d=c===void 0?!1:c,f=e.leftPosition,h=e.topPosition,m=e.rightPosition,g=m===void 0?0:m,y=e.bottomPosition,b=y===void 0?0:y,w=e.headerTitle,O=w===void 0?"\u5BFC\u822A":w;this.width=r,this.height=o,this.showEdge=s,this.isShowHeader=u,this.isShowCloseIcon=d,this.leftPosition=f,this.rightPosition=f!==void 0?void 0:g,this.topPosition=h,this.bottomPosition=h!==void 0?void 0:b,this.headerTitle=O},t.prototype.initMiniMap=function(){var e=document.createElement("div");e.className="lf-mini-map-graph",e.style.width="".concat(this.width,"px"),e.style.height="".concat(this.height,"px"),this.lfMap=new this.LFCtor({container:e,grid:!1,isSilentMode:!0,stopZoomGraph:!0,stopScrollGraph:!0,stopMoveGraph:!1,history:!1,snapline:!1,disabledPlugins:this.disabledPlugins}),this.miniMapWrap=e,this.createViewPort(),e.addEventListener("click",this.mapClick)},t.prototype.createMiniMap=function(e,n){var r,i=document.createElement("div");this.miniMapContainer=i,i.appendChild(this.miniMapWrap),i.style.position="absolute",(e!==void 0||n!==void 0)&&(this.leftPosition=e||0,this.topPosition=n||0,this.rightPosition=void 0,this.bottomPosition=void 0),this.updateMiniMapPosition(),i.className="lf-mini-map",this.isShowCloseIcon||i.classList.add("lf-mini-map-no-close-icon"),this.isShowHeader||i.classList.add("lf-mini-map-no-header"),(r=this.container)===null||r===void 0||r.appendChild(i),this.miniMapWrap.appendChild(this.viewport);var o=document.createElement("div");o.className="lf-mini-map-header",o.innerText=this.headerTitle,i.appendChild(o);var a=document.createElement("span");a.className="lf-mini-map-close",a.addEventListener("click",this.hide),i.appendChild(a)},t.prototype.updateMiniMapPosition=function(){if(this.miniMapContainer){var e=this.miniMapContainer.style;this.rightPosition!==void 0?(e.right="".concat(this.rightPosition,"px"),e.left=""):(e.left="".concat(this.leftPosition,"px"),e.right=""),this.bottomPosition!==void 0?(e.bottom="".concat(this.bottomPosition,"px"),e.top=""):(e.top="".concat(this.topPosition,"px"),e.bottom="")}},t.prototype.removeMiniMap=function(){var e;this.miniMapContainer&&((e=this.container)===null||e===void 0||e.removeChild(this.miniMapContainer))},t.prototype.updateBounds=function(e){e&&this.updateElementAreaBounds(e),this.updateViewPortBounds(),this.bounds={left:Math.min(this.elementAreaBounds.left,this.viewPortBounds.left),right:Math.max(this.elementAreaBounds.right,this.viewPortBounds.right),top:Math.min(this.elementAreaBounds.top,this.viewPortBounds.top),bottom:Math.max(this.elementAreaBounds.bottom,this.viewPortBounds.bottom)}},t.prototype.updateElementAreaBounds=function(e){var n={left:0,right:0,top:0,bottom:0},r=e.nodes;r&&r.length>0&&r.forEach(function(i){var o,a,s=i.x,l=i.y,u=(o=i.width)!==null&&o!==void 0?o:200,c=(a=i.height)!==null&&a!==void 0?a:200,d=s-u/2,f=s+u/2,h=l-c/2,m=l+c/2;n.left=Math.min(d,n.left),n.right=Math.max(f,n.right),n.top=Math.min(h,n.top),n.bottom=Math.max(m,n.bottom)}),this.elementAreaBounds=n},t.prototype.updateViewPortBounds=function(){var e=this.lf.getTransform(),n=e.TRANSLATE_X,r=e.TRANSLATE_Y,i=e.SCALE_X,o=e.SCALE_Y,a=this.lf.graphModel,s=a.width,l=a.height;this.viewPortBounds={left:-n/i,right:(-n+s)/i,top:-r/o,bottom:(-r+l)/o}},t.prototype.resetData=function(e){var n=e.nodes,r=e.edges;return n.forEach(function(i){i.text=void 0}),this.showEdge&&r.forEach(function(i){i.text=void 0}),{nodes:n,edges:this.showEdge?r:[]}},t.prototype.setView=function(e){var n,r;if(e===void 0&&(e=!0),e){var i=this.lf.getGraphRawData(),o=this.resetData(i),a=this.lf.viewMap,s=this.lf.graphModel.modelMap,l=this.lfMap.viewMap;try{for(var u=xUe(a.keys()),c=u.next();!c.done;c=u.next()){var d=c.value;l.has(d)||this.lfMap.register({type:d,view:a.get(d),model:s.get(d)})}}catch(P){n={error:P}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.lfMap.render(o),this.updateBounds(o)}else this.updateBounds();var f=this.bounds,h=f.left,m=f.top,g=f.right,y=f.bottom,b=g-h,w=y-m,O=this.width/b,S=this.height/w,x=Math.min(O,S);this.scale=x;var C=h-(this.width/x-b)/2,E=m-(this.height/x-w)/2;if(this.lfMap.graphModel.transformModel.translate(-C+this.translateX,-E+this.translateY),this.translateX=C,this.translateY=E,this.miniMapWrap.firstChild){var T=this.miniMapWrap.firstChild.style;T.pointerEvents="none",T.transform="matrix(".concat(x,", 0, 0, ").concat(x,", 0, 0)"),T.transformOrigin="left top",T.height="".concat(this.height/x,"px"),T.width="".concat(this.width/x,"px"),this.updateViewPort()}},t.prototype.updateViewPort=function(){var e=this.viewport.style,n=this.lf.getTransform(),r=n.TRANSLATE_X,i=n.TRANSLATE_Y,o=n.SCALE_X,a=n.SCALE_Y,s=this.lf.graphModel,l=s.width,u=s.height;this.viewPortLeft=-r/o,this.viewPortTop=-i/a,this.viewPortWidth=l/o*this.scale,this.viewPortHeight=u/a*this.scale,e.width="".concat(this.viewPortWidth,"px"),e.height="".concat(this.viewPortHeight,"px"),e.left="".concat((this.viewPortLeft-this.translateX)*this.scale,"px"),e.top="".concat((this.viewPortTop-this.translateY)*this.scale,"px")},t.prototype.createViewPort=function(){var e=document.createElement("div");e.className="lf-minimap-viewport",e.addEventListener("mousedown",this.startDrag),e.addEventListener("click",function(n){n.stopPropagation()}),this.viewport=e},t.prototype.destroy=function(){this.lf.off("graph:resize",this.onGraphResize)},t.pluginName="miniMap",t}(),EUe=function(){function t(e){var n=e.lf,r=this;this.disabled=!0,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.draw=function(o){var a=r.lf.getPointByClient(o.clientX,o.clientY).domOverlayPosition,s=a.x,l=a.y;if(r.endPoint={x:s,y:l},r.startPoint){var u=r.startPoint,c=u.x,d=u.y,f=c,h=d,m=s-c,g=l-d;s<c&&(f=s,m=c-s),l<d&&(h=l,g=d-l),r.wrapper&&(r.wrapper.style.left="".concat(f,"px"),r.wrapper.style.top="".concat(h,"px"),r.wrapper.style.width="".concat(m,"px"),r.wrapper.style.height="".concat(g,"px"))}},this.drawOff=function(){var o;if(document.removeEventListener("mousemove",r.draw),document.removeEventListener("mouseup",r.drawOff),r.wrapper&&(r.wrapper.oncontextmenu=null,(o=r.container)===null||o===void 0||o.removeChild(r.wrapper)),r.startPoint&&r.endPoint){var a=r.startPoint,s=a.x,l=a.y,u=r.endPoint,c=u.x,d=u.y,f=[Math.min(s,c),Math.min(l,d)],h=[Math.max(s,c),Math.max(l,d)];if(r.lf.emit("selection:selected-area",{topLeft:f,bottomRight:h}),Math.abs(c-s)<10&&Math.abs(d-l)<10)return;var m=r.lf.graphModel.getAreaElement(f,h,r.isWholeEdge,r.isWholeNode,!0),g=r.lf.graphModel,y=g.dynamicGroup,b=g.group,w=[];m.forEach(function(O){b&&b.getNodeGroup(O.id)||y&&y.getGroupByNodeId(O.id)||(r.lf.selectElementById(O.id,!0),w.push(O))}),r.lf.emit("selection:selected",{elements:w,leftTopPoint:f,rightBottomPoint:h})}},this.lf=n;var i=n.getEditConfig().stopMoveGraph;this.isDefaultStopMoveGraph=i,n.openSelectionSelect=function(){r.openSelectionSelect()},n.closeSelectionSelect=function(){r.closeSelectionSelect()}}return t.prototype.render=function(e,n){var r=this;this.container=n,e.on("blank:mousedown",function(i){var o=i.e,a=e.getEditConfig();if(!(!a.stopMoveGraph||r.disabled)){var s=o.button===2;if(!s){var l=e.getPointByClient(o.clientX,o.clientY).domOverlayPosition,u=l.x,c=l.y;r.startPoint={x:u,y:c},r.endPoint={x:u,y:c};var d=document.createElement("div");d.className="lf-selection-select",d.oncontextmenu=function(h){h.preventDefault()},d.style.top="".concat(r.startPoint.y,"px"),d.style.left="".concat(r.startPoint.x,"px"),n.appendChild(d),r.wrapper=d,document.addEventListener("mousemove",r.draw),document.addEventListener("mouseup",r.drawOff)}}})},t.prototype.setSelectionSense=function(e,n){e===void 0&&(e=!0),n===void 0&&(n=!0),this.isWholeEdge=e,this.isWholeNode=n},t.prototype.openSelectionSelect=function(){var e=this.lf.getEditConfig().stopMoveGraph;e||(this.isDefaultStopMoveGraph=!1,this.lf.updateEditConfig({stopMoveGraph:!0})),this.open()},t.prototype.closeSelectionSelect=function(){this.isDefaultStopMoveGraph||this.lf.updateEditConfig({stopMoveGraph:!1}),this.close()},t.prototype.open=function(){this.disabled=!1},t.prototype.close=function(){this.disabled=!0},t.pluginName="selectionSelect",t}(),xF=globalThis&&globalThis.__assign||function(){return xF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xF.apply(this,arguments)};globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var kX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),bg=globalThis&&globalThis.__assign||function(){return bg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bg.apply(this,arguments)},Qy=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},TUe={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function kUe(t){for(var e=t,n=1;n<e.length-1;){var r=Qy(e[n-1],2),i=r[0],o=r[1],a=Qy(e[n],2),s=a[0],l=a[1],u=Qy(e[n+1],2),c=u[0],d=u[1];i===s&&s===c||o===l&&l===d?e.splice(n,1):n++}return e}function PUe(t,e,n,r){var i=[t[0],t[1]],o=[t[0],t[1]];switch(n){case"tl":return e==="tr"?(i[1]+=r,o[0]+=r):e==="lb"&&(i[0]+=r,o[1]+=r),[i,o];case"tr":return e==="tl"?(i[1]+=r,o[0]-=r):e==="rb"&&(i[0]-=r,o[1]+=r),[i,o];case"bl":return e==="br"?(i[1]-=r,o[0]+=r):e==="lt"&&(i[0]+=r,o[1]-=r),[i,o];case"br":return e==="bl"?(i[1]-=r,o[0]-=r):e==="rt"&&(i[0]-=r,o[1]-=r),[i,o];default:return[]}}function AUe(t,e,n,r){var i,o="",a="";t[0]===e[0]?o=t[1]>e[1]?"t":"b":t[1]===e[1]&&(o=t[0]>e[0]?"l":"r"),e[0]===n[0]?a=e[1]>n[1]?"t":"b":e[1]===n[1]&&(a=e[0]>n[0]?"l":"r");var s=Math.min(Math.hypot(e[0]-t[0],e[1]-t[1])/2,Math.hypot(n[0]-e[0],n[1]-e[1])/2,r)||1/5*r,l="".concat(o).concat(a),u=TUe[l]||"-",c="L ".concat(t[0]," ").concat(t[1]);if(u==="-")c+="L ".concat(e[0]," ").concat(e[1]," L ").concat(n[0]," ").concat(n[1]);else{var d=Qy(PUe(e,l,u,s),2),f=d[0],h=d[1];f&&h&&(c+="L ".concat(f[0]," ").concat(f[1]," Q ").concat(e[0]," ").concat(e[1]," ").concat(h[0]," ").concat(h[1]),i=Qy(h,2),e[0]=i[0],e[1]=i[1])}return c}function MUe(t,e){var n=0,r="";if(t.length===2)r+="M".concat(t[n][0]," ").concat(t[n++][1]," L ").concat(t[n][0]," ").concat(t[n][1]);else{for(r+="M".concat(t[n][0]," ").concat(t[n++][1]);n+1<t.length;){var i=t[n-1],o=t[n],a=t[n+++1];r+=AUe(i,o,a,e)}r+="L ".concat(t[n][0]," ").concat(t[n][1])}return r}(function(t){kX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.radius,s=a===void 0?5:a,l=n.getEdgeStyle(),u=n.getEdgeAnimationStyle(),c=kUe(r.split(" ").map(function(h){return h.split(",").map(function(m){return+m})})),d=MUe(c,s),f=bg(bg(bg({style:i?u:{}},l),o),{fill:"none"});return Gt("path",bg({d},f))},e})(V0);(function(t){kX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(B0);var PX=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),OS=globalThis&&globalThis.__assign||function(){return OS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},OS.apply(this,arguments)},CF=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},EF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},RUe=function(t){PX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.id,i=n.x,o=n.y,a=n.width,s=n.height,l=n.properties,u=this.props.model.getNodeStyle();return Gt("svg",{x:i-a/2,y:o-s/2,width:50,height:24,style:"z-index: 0; background: none; overflow: auto;"},[l.labelText?Gt("text",{x:0,y:-5,fontSize:"16px",fill:u.stroke},l.labelText):"",l.disabledDelete?"":Gt("text",{x:l.labelText?50:0,y:-5,fontSize:"24px",cursor:"pointer",fill:u.stroke,onclick:this.handleCustomDeleteIconClick.bind(this,r)},"x")])},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.id,l=this.props.model.getNodeStyle();return Gt("g",{},[Gt("rect",OS(OS({},l),{x:r-o/2,y:i-a/2,width:o,height:a,id:s})),this.getLabelShape()])},e.prototype.toFront=function(){},e.prototype.handleCustomDeleteIconClick=function(n){var r=this.props.graphModel;r.deleteNode(n)},e}(rS),$Ue=function(t){PX(e,t);function e(){var n=t.apply(this,EF([],CF(arguments),!1))||this;return n.d=10,n.isResize=!1,n}return e.prototype.initNodeData=function(n){n.text={value:"",x:n.x,y:n.y,draggable:!1,editable:!1},t.prototype.initNodeData.call(this,n),this.zIndex=0,this.draggable=!0},e.prototype.setAttributes=function(){var n=this,r;this.points=[],((r=this.properties)===null||r===void 0?void 0:r.node_selection_ids).length>1&&setTimeout(function(){var i;n.updatePointsByNodes(((i=n.properties)===null||i===void 0?void 0:i.node_selection_ids)||[])})},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this);return n.stroke=this.properties.strokeColor||"#008000",n.strokeDasharray="10 5",n},e.prototype.getDefaultAnchor=function(){return[]},e.prototype.updatePoints=function(n){this.points=n},e.prototype.updateCoordinate=function(n){var r=n.x,i=n.y;this.x=r,this.y=i},e.prototype.updatePointsByNodes=function(n){var r=this,i=[],o=1/0,a=1/0,s=-1/0,l=-1/0;n.forEach(function(u){var c=r.graphModel.getNodeModelById(u);if(!!c){var d=c.width,f=c.height,h=c.x,m=c.y;o=Math.min(o,h-d/2-r.d),a=Math.min(a,m-f/2-r.d),s=Math.max(s,h+d/2+r.d),l=Math.max(l,m+f/2+r.d)}}),i.push([o,a],[s,a],[s,l],[o,l]),![o,a,s,l].some(function(u){return Math.abs(u)===1/0})&&(this.updatePoints(i),this.updateCoordinate({x:(s+o)/2,y:(l+a)/2}))},e.prototype.resize=function(n){var r;this.isResize=!0;for(var i=n.width,o=n.height,a={x:i/this.width,y:o/this.height},s=(this.properties.node_selection_ids||[]).slice(),l=[],u=new Set;s.length;){var c=s.shift(),d=(r=this.graphModel.nodesMap[c])===null||r===void 0?void 0:r.model;if(!!d){if(!F1(d)){l.push(d);continue}u.has(d.id)||(u.add(d.id),s.push.apply(s,EF([],CF(d.properties.node_selection_ids||[]),!1)))}}var f={x:this.x-this.width/2,y:this.y-this.height/2},h=t.prototype.resize.call(this,n),m={x:this.x-this.width/2,y:this.y-this.height/2};return l.forEach(function(g){g.width=g.width*a.x,g.height=g.height*a.y;var y=(g.x-f.x)*a.x+m.x-g.x,b=(g.y-f.y)*a.y+m.y-g.y;g.move(y,b,!0)}),this.isResize=!1,h},e}(Kw),yA="node-selection";(function(){function t(e){var n=e.lf;this.selectNodes=[],this.d=10,this.lf=n,n.register({type:yA,view:RUe,model:$Ue})}return Object.defineProperty(t.prototype,"selectNodesIds",{get:function(){return this.selectNodes.map(function(e){return e.id})},enumerable:!1,configurable:!0}),t.prototype.addNodeSelection=function(){var e=this.lf.addNode({type:"node-selection",text:"",properties:{node_selection_ids:this.selectNodesIds},x:0,y:0});e.updatePointsByNodes(this.selectNodesIds)},t.prototype.updateNodeSelection=function(){var e,n=this.getNodeSelection();!n||(this.lf.setProperties(n.id,{node_selection_ids:this.selectNodesIds}),(e=this.lf.getNodeModelById(n.id))===null||e===void 0||e.updatePointsByNodes(this.selectNodesIds))},t.prototype.getNodeSelection=function(){var e=this,n=this.selectNodesIds,r=this.lf.getGraphRawData(),i=n.filter(function(o){return o!==e.currentClickNode.id});return r.nodes.find(function(o){if(o.type==="node-selection"){var a=Wr(o,"properties.node_selection_ids",[]);return i.every(function(s){return a.includes(s)})}return!1})},t.prototype.onNodeChange=function(e,n){var r=e.graphModel.nodes.filter(function(i){if(!F1(i))return!1;var o=i.properties.node_selection_ids||[];return o.includes(n.id)});Promise.resolve().then(function(){r.forEach(function(i){i.updatePointsByNodes(i.properties.node_selection_ids||[])})})},t.prototype.render=function(e){var n=this;this.lf=e,e.on("node:click",function(r){var i;if(!(!r.e.shiftKey||r.data.type===yA)){n.currentClickNode=r.data;var o=!1;n.selectNodesIds.includes(r.data.id)&&((i=n.lf.getNodeModelById(r.data.id))===null||i===void 0||i.setSelected(!1),o=!0);var a=e.getSelectElements(!0).nodes;n.selectNodes=a,n.selectNodes.length===1?o?n.updateNodeSelection():n.addNodeSelection():n.selectNodes.length>1&&n.updateNodeSelection()}}),e.graphModel.addNodeMoveRules(function(r,i,o){if(n.onNodeChange(e,r),F1(r)&&!r.isResize){var a=r.properties.node_selection_ids||[];return e.graphModel.moveNodes(a,i,o,!0),!0}return!0}),e.graphModel.addNodeResizeRules(function(r){return F1(r)||n.onNodeChange(e,r),!0})},t.pluginName="node-selection",t})();var F1=function(t){return!!(t&&t.type===yA)},NUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wS=globalThis&&globalThis.__assign||function(){return wS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},wS.apply(this,arguments)};(function(t){NUe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getLabelShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.properties;return Gt("text",{x:r-o/2+5,y:i-a/2+16,fontSize:12,fill:"blue"},s.moreText)},e.prototype.getShape=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=this.props.model.getNodeStyle();return Gt("g",{},[Gt("rect",wS(wS({},s),{fill:"#FFFFFF",x:r-o/2,y:i-a/2})),this.getLabelShape()])},e})(wf);const Mn="/plugin/rule";function FO(t,e,n,r){var o;let i=[];try{let a=t.getGraphData();(o=a==null?void 0:a.metadata)==null||o.nodes.forEach(s=>{s.id&&s.id!==e.id&&i.push({value:s.id,label:s.name})})}catch{}finally{n.component.options=i}return i}const _m={category:{endpoints:{label:"\u8F93\u5165\u7AEF",background:"#A6BBCFFF",nodeType:"endpoint-node"},filter:{label:"\u8FC7\u6EE4\u5668",background:"#f1e861",nodeType:"simple-node"},transform:{label:"\u8F6C\u6362\u5668",background:"#79cef1",nodeType:"simple-node"},action:{label:"\u52A8\u4F5C",background:"#f1928f",nodeType:"simple-node"},external:{label:"\u5916\u90E8\u7684",background:"#fbc766",nodeType:"simple-node"},ai:{label:"AI",background:"#7cbaf8",nodeType:"simple-node"},ci:{label:"CI/CD",background:"#9ec9c9",nodeType:"simple-node"},iot:{label:"IoT",background:"#FFA500",nodeType:"simple-node"},flow:{label:"\u5B50\u89C4\u5219\u94FE",background:"#E6E0F8FF",nodeType:"simple-node"}},component:{endpoints:{"endpoint/mqtt":{notInput:!0,label:"MQTT",icon:Mn+"/images/endpoint/mqtt.svg",desc:"<ul><li>MQTT\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5MQTT Server\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"MQTT Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QOS",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/net":{notInput:!0,label:"TCP/UDP",icon:Mn+"/images/endpoint/net.svg",desc:"<ul><li>TCP/UDP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002</li><li>\u542F\u52A8TCP/UPD\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u8DEF\u7531\u6570\u636E\u89E6\u53D1\u89C4\u5219\u94FE\u3002</li></ul>",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335"},readTimeout:{label:"\u8BFB\u8D85\u65F6(\u5355\u4F4D\u79D2)",desc:""},encode:{label:"\u7F16\u7801",desc:"\u628A\u5B57\u8282\u6D41\u8F6C\u6362\u6210hex/base64\uFF0C\u9ED8\u8BA4\u4E0D\u8F6C\u6362",rules:[],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,clearable:!0,options:[{label:"\u65E0",value:"none"},{label:"hex",value:"hex"},{label:"base64",value:"base64"}]}},router:{from:{path:{label:"\u8DEF\u7531\u6B63\u5219\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u6EE1\u8DB3\u6761\u4EF6\u7684\u6570\u636E\u89E6\u53D1\uFF0C*\u8868\u793A\u5339\u914D\u6240\u6709"}}}},"endpoint/http":{notInput:!0,label:"HTTP",icon:Mn+"/images/endpoint/http.svg",desc:"<ul><li>HTTP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002</li><li>\u542F\u52A8HTTP\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002</li></ul>",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/v1/msg"}}}},"endpoint/ws":{notInput:!0,label:"Websocket",icon:Mn+"/images/endpoint/websocket.svg",desc:"<ul><li>Websocket\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002</li><li>\u542F\u52A8Websocket\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002</li></ul>",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/ms/ws "}}}},"endpoint/schedule":{notInput:!0,label:"\u5B9A\u65F6\u8C03\u5EA6",icon:Mn+"/images/endpoint/schedule.svg",desc:"<ul><li>\u5B9A\u65F6\u8C03\u5EA6\u63A5\u5165\u7AEF</li><li>\u901A\u8FC7\u8DEF\u7531\u7ED9\u5B9ACron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",router:{from:{path:{label:"cron\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BF7\u8F93\u5165cron\u8868\u8FBE\u5F0F\u5982: */10 * * * * *"}],desc:"\u901A\u8FC7cron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\uFF0C\u5982: */10 * * * * *"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/kafka":{notInput:!0,label:"Kafka",icon:"/images/endpoint/kafka.svg",desc:"<ul><li>Kafka\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Kafka\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4sagoo"},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/nats":{notInput:!0,label:"Nats",icon:Mn+"/images/endpoint/nats.svg",desc:"<ul><li>Nats\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Nats\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/redis":{notInput:!0,label:"Redis",icon:Mn+"/images/endpoint/redis.svg",desc:"<ul><li>Redis\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8BA2\u9605\u901A\u9053\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},router:{from:{path:{label:"\u8BA2\u9605Redis\u901A\u9053",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u901A\u9053\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/redis/stream":{notInput:!0,label:"Redis\u6D41",icon:Mn+"/images/endpoint/redis_stream.svg",desc:"<ul><li>Redis Steam\u63A5\u5165\u7AEF</li><li>\u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u6D41\u540D\u79F0\u89E6\u53D1\u89C4\u5219\u94FE</li></ul>",server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4rulego"},router:{from:{path:{label:"\u8BA2\u9605\u6D41\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u6D41\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/rabbitmq":{notInput:!0,label:"RabbitMQ",icon:Mn+"/images/endpoint/rabbitmq.svg",desc:"<ul><li>rabbitmq\u8BA2\u9605\u63A5\u5165\u7AEF</li><li>\u652F\u6301AMQP\u534F\u8BAE</li><li>\u8FDE\u63A5rabbitmq\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8DEF\u7531\u952E\u89E6\u53D1\u89C4\u5219\u94FE</li><li>\u5982\u679C\u4EA4\u6362\u673A\u4E0D\u5B58\u5728\u5219\u81EA\u52A8\u58F0\u660E</li></ul>",server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"direct/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""},router:{from:{path:{label:"\u8DEF\u7531\u952E",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""}}}},"endpoint/mysql_cdc":{notInput:!0,label:"MYSQL CDC",icon:Mn+"/images/endpoint/mysql_cdc.svg",desc:"<ul><li>\u76D1\u542Cmysql\u8868\u6570\u636E\u53D8\u5316\u89E6\u53D1\u3002</li></li>",server:{label:"MYSQL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:3306"},user:{label:"\u7528\u6237\u540D"},password:{label:"\u5BC6\u7801",desc:""},fromOldest:{label:"\u662F\u5426\u5168\u91CF\u540C\u6B65",desc:"\u5F00\u542F\u540E\uFF0C\u6BCF\u6B21\u91CD\u542F\u670D\u52A1\u90FD\u4F1A\u4ECE\u7B2C\u4E00\u884C\u5F00\u59CB\u540C\u6B65\u6570\u636E\uFF0C\u5426\u5219\u53EA\u540C\u6B65\u589E\u91CF\u6570\u636E"},dbs:{label:"\u76D1\u542C\u6570\u636E\u5E93\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest"},includeTables:{label:"\u5305\u542B\u8868\u540D\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest.users\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1A.*\\.canal\u6216test.*"},excludeTables:{label:"\u6392\u9664\u8868\u540D",desc:"\u5982\uFF1Amysql.component\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1Amysql\\..*"},executionPath:{label:"mysqldump\u6267\u884C\u8DEF\u5F84",desc:"\u5982\uFF1Amysqldump\u6216\u8005/usr/bin/mysqldump"},charset:{label:"\u5B57\u7B26\u96C6",desc:"\u5982\uFF1Autf8"},flavor:{label:"\u6570\u636E\u5E93\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"mariadb",value:"mariadb"}]}},heartbeat:{label:"\u5FC3\u8DF3\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2"},readTimeout:{label:"\u8BFB\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2"},router:{from:{path:{label:"\u8DEF\u7531\u8868\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u6839\u636E\u8868\u540D\u8DEF\u7531\uFF0C\u8868\u540D\u683C\u5F0F\uFF1AdbName.tableName\uFF0C\u5982:test.users\u3002*\u8868\u793A\u6240\u6709\u8868"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/sagoo/devicein":{notInput:!0,label:"\u8BBE\u5907\u6570\u636E",icon:Mn+"/images/devicein.svg",desc:"\u7528\u4E8E\u83B7\u53D6\u8BBE\u5907\u6570\u636E\u3002",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},antiShake:{label:"\u542F\u7528\u9632\u6296",desc:""},antiShakeMs:{label:"\u9632\u6296\u65F6\u95F4",desc:"\u5355\u4F4D\uFF1A\u79D2"},antiShakeNum:{label:"\u9632\u6296\u6B21\u6570",desc:""},processFirstItem:{label:"\u9996\u6761\u6570\u636E\u7ACB\u5373\u5904\u7406",desc:""},router:{from:{path:{label:"\u89E6\u53D1\u7C7B\u578B",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",options:[{label:"\u5C5E\u6027\u4E0A\u62A5",value:"reportAttribute"},{label:"\u4E8B\u4EF6\u4E0A\u62A5",value:"reportEvent"}]}}}},"endpoint/opcua":{notInput:!0,label:"OPC_UA\u8BA2\u9605",icon:"/images/endpoint/opcua.svg",desc:"<ul><li>\u5B9A\u65F6\u4ECEOPCUA\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"endpoint/grpc/stream":{label:"gRPC\u6D41",icon:"/images/grpc.svg",desc:'<ul><li>\u63A5\u6536gRPC\u670D\u52A1\u5668\u63A8\u9001\u6570\u636E\uFF0C\u5E76\u8F6C\u53D1\u5230\u89C4\u5219\u94FE\u5904\u7406</li></ul><a href="https://rulego.cc/pages/endpoint-grpc-stream/" target="_blank">\u5E2E\u52A9\u6587\u6863</a>',server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9(\u5141\u8BB8\u7A7A)",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}',component:{type:"textarea"}},headers:{label:"\u8BF7\u6C42\u5934",desc:""},checkInterval:{label:"\u670D\u52A1\u68C0\u67E5\u95F4\u9694,\u5355\u4F4D:\u6BEB\u79D2",desc:""},router:{hide:!0}}},nodes:{comment:{notInput:!0,notOutput:!0,label:"\u6CE8\u91CA",icon:Mn+"/images/comment.svg",desc:"\u628A\u8282\u70B9\u540D\u79F0\u4F5C\u4E3A\u6CE8\u91CA\u5185\u5BB9\u663E\u793A\u5728\u753B\u5E03\u4E0A",nodeType:"comment-node"},delay:{label:"\u5EF6\u8FDF",icon:Mn+"/images/delay.svg",desc:"",periodInSeconds:{label:"\u5EF6\u8FDF\u65F6\u95F4(\u79D2)",desc:""},maxPendingMsgs:{label:"\u6700\u5927\u5141\u8BB8\u6302\u8D77\u6D88\u606F\u7684\u6570\u91CF",desc:"\u5982\u679C\u542F\u7528\u8986\u76D6\u6A21\u5F0F\uFF0C\u8BE5\u53C2\u6570\u5931\u6548"},periodInSecondsPattern:{label:"\u5EF6\u8FDF\u65F6\u95F4\u8868\u8FBE\u5F0F(\u79D2)",desc:"\u901A\u8FC7 ${metadata.key} \u4ECE\u5143\u6570\u636E\u53D8\u91CF\u4E2D\u83B7\u53D6\u6216\u8005\u901A\u8FC7 ${msg.key} \u4ECE\u6D88\u606F\u8D1F\u8377\u4E2D\u83B7\u53D6\uFF0C\u5EF6\u8FDF\u65F6\u95F4\uFF0C\u5982\u679C\u8BE5\u503C\u6709\u503C\uFF0C\u4F18\u5148\u53D6\u8BE5\u503C\u3002"},overwrite:{label:"\u8986\u76D6\u6A21\u5F0F",desc:"\u5982\u679C\u542F\u7528\uFF0C\u5468\u671F\u5185\u53EA\u5141\u8BB8\u6302\u8D77\u4E00\u6761\u6D88\u606F\uFF0C\u65B0\u6D88\u606F\u4F1A\u8986\u76D6\u4E0A\u4E00\u6761\u6D88\u606F"}},log:{label:"\u65E5\u5FD7",icon:Mn+"/images/log.svg",desc:"<ul><li>\u8BB0\u5F55\u65E5\u5FD7</li><li>\u4F7F\u7528JavaScript\u811A\u672C\u5BF9\u6D88\u606F\u8FDB\u884C\u683C\u5F0F\u5316\u540E\u8BB0\u5F55\u5230\u65E5\u5FD7\u6587\u4EF6\u4E2D</li></ul>",jsScript:{label:"function String(msg, metadata, msgType) {",desc:"}"}},for:{label:"for",icon:Mn+"/images/for.svg",desc:"<ul><li>\u904D\u5386\u7EC4\u4EF6</li><li>\u7528\u4E8E\u904D\u5386\u6570\u7EC4\uFF0C\u5207\u7247\u548C\u7ED3\u6784\u4F53\uFF0C\u4E5F\u7528\u4E8E\u91CD\u590D\u6267\u884C\u4ECE\u6307\u5B9A\u8282\u70B9\u5F00\u59CB\u7684\u94FE\u6216\u5B50\u89C4\u5219\u94FE</li></ul>",range:{label:"\u8FED\u4EE3\u503C\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.items;1..3;\u5982\u679C\u7A7A\u5219\u904D\u5386\u6574\u4E2Amsg"},do:{label:"\u5904\u7406\u8282\u70B9ID",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5904\u7406\u94FE\u7684\u8D77\u59CB\u8282\u70B9ID",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,loadData:FO}},mode:{label:"\u6267\u884C\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u540C\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:0},{label:"\u540C\u6B65\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:1},{label:"\u540C\u6B65\u8986\u76D6\u6267\u884C\u7ED3\u679C",value:2},{label:"\u5F02\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:3}]}}},functions:{label:"\u51FD\u6570",desc:"<ul><li>\u6267\u884C\u81EA\u5B9A\u4E49\u5904\u7406\u51FD\u6570</li><li>\u7528\u4E8E\u8F7B\u91CF\u7EA7\u81EA\u5B9A\u4E49\u8282\u70B9\u5B9E\u73B0\uFF0C\u8BA9\u4F60\u7684Golang\u81EA\u5B9A\u4E49\u51FD\u6570\u79D2\u53D8\u7EC4\u4EF6</li></ul>",functionName:{label:"\u51FD\u6570\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,placeholder:"\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u51FD\u6570\u540D"}}},dbClient:{label:"\u6570\u636E\u5E93",icon:Mn+"/images/db.svg",desc:"<ul><li>\u6570\u636E\u5E93\u5BA2\u6237\u7AEF</li><li>\u901A\u8FC7\u6807\u51C6sql\u63A5\u53E3\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u589E\u5220\u4FEE\u6539\u67E5\u64CD\u4F5C</li></ul>",sql:{label:"SQL\u8BED\u53E5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u6216\u8005 ${msg.key}\u53D8\u91CF\uFF0CSQL\u53C2\u6570\u5141\u8BB8\u4F7F\u7528 ? \u5360\u4F4D\u7B26"},params:{label:"\u5360\u4F4D\u7B26\u53C2\u6570\u5217\u8868",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},getOne:{label:"\u8FD4\u56DE\u4E00\u6761\u8BB0\u5F55",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},driverName:{label:"\u6570\u636E\u5E93\u9A71\u52A8\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"mysql\u6216postgres\uFF0C\u5982\u9700\u5176\u4ED6\u6570\u636E\u5E93\u7C7B\u578B\u9700\u5F15\u5165\u5BF9\u5E94\u6570\u636E\u5E93\u9A71\u52A8",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"postgres",value:"postgres"}]}},dsn:{label:"\u6570\u636E\u5E93\u8FDE\u63A5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"Mysql\u914D\u7F6E\u793A\u4F8B: username:password@tcp(127.0.0.1:3306)/db Postgres\u914D\u7F6E\u793A\u4F8B\uFF1Apostgres://username:password@127.0.0.1:5432/db?sslmode=disable",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}}},mqttClient:{label:"MQTT",icon:Mn+"/images/mqtt.svg",desc:"<ul><li>mqtt\u5BA2\u6237\u7AEF</li><li>\u5F80mqtt broker \u6307\u5B9A\u4E3B\u9898\u53D1\u5E03\u5F53\u524D\u6D88\u606F\u6570\u636E</li></ul>",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"MQTT \u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:1883 \u3002\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QoS",desc:""},clientID:{label:"\u5BA2\u6237\u7AEFID",desc:""},cleanSession:{label:"\u6E05\u9664\u4F1A\u8BDD",desc:""},cAFile:{label:"\u8BC1\u4E66\u9881\u53D1\u673A\u6784(CA)\u6587\u4EF6",desc:""},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6",desc:""},certKeyFile:{label:"\u8BC1\u4E66\u5BC6\u94A5\u6587\u4EF6",desc:""}},restApiCall:{label:"REST",icon:Mn+"/images/rest.svg",desc:"<ul><li>\u8C03\u7528rest api\u5BA2\u6237\u7AEF</li><li>\u8C03\u7528\u5916\u90E8REST\u670D\u52A1</li></ul>",restEndpointUrlPattern:{label:"HTTP URL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},requestMethod:{label:"\u8BF7\u6C42\u65B9\u6CD5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"HEAD",value:"HEAD"}]},desc:"POST/GET/DELETE/PUT/PATCH/HEAD"},withoutRequestBody:{label:"\u4E0D\u4F20\u8F93request body",desc:"\u4E0D\u628A\u6D88\u606F\u8D1F\u8377\u4F20\u8F93\u7ED9\u914D\u7F6E\u7684\u670D\u52A1\u5730\u5740"},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},readTimeoutMs:{label:"\u8D85\u65F6\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u9ED8\u8BA4:0",desc:"0\u4EE3\u8868\u4E0D\u8D85\u65F6"},insecureSkipVerify:{label:"\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1",desc:"\u81EA\u7B7E\u8BC1\u4E66\u9700\u8981\u6253\u5F00\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1"},maxParallelRequestsCount:{label:"\u6700\u5927\u5E76\u53D1\u5927\u5C0F",desc:"0\u4EE3\u8868\u4E0D\u9650\u5236"},enableProxy:{label:"\u5F00\u542F\u4EE3\u7406",desc:""},useSystemProxyProperties:{label:"\u4F7F\u7528\u7CFB\u7EDF\u4EE3\u7406\u914D\u7F6E",desc:""},proxyScheme:{label:"\u4EE3\u7406\u534F\u8BAE",desc:""},proxyHost:{label:"\u4EE3\u7406\u4E3B\u673A",desc:""},proxyPort:{label:"\u4EE3\u7406\u7AEF\u53E3",desc:""},proxyUser:{label:"\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u5BC6\u7801",desc:""}},sendEmail:{label:"\u53D1\u90AE\u4EF6",icon:Mn+"/images/email.svg",desc:"<ul><li>\u53D1\u9001\u90AE\u4EF6</li></ul>",smtpHost:{label:"SMTP \u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},smtpPort:{label:"SMTP \u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"\u7528\u6237\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},password:{label:"\u6388\u6743\u7801",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},enableTls:{label:"\u662F\u5426\u5F00\u542FTLS",desc:""},email:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"",from:{label:"\u53D1\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},to:{label:"\u6536\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},cc:{label:"\u6284\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},bcc:{label:"\u5BC6\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},subject:{label:"\u90AE\u4EF6\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},body:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6,\u5355\u4F4D\u79D2\u3002\u9ED8\u8BA4:10",desc:""}},ssh:{label:"SSH",icon:Mn+"/images/ssh.svg",desc:"<ul><li>\u901A\u8FC7ssh\u8FDC\u7A0B\u767B\u5F55</li><li>\u6267\u884CShell\u811A\u672C</li></ul>",host:{label:"ssh\u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},port:{label:"ssh\u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"ssh\u767B\u5F55\u7528\u6237\u540D",desc:""},password:{label:"ssh\u767B\u5F55\u5BC6\u7801",desc:""},cmd:{label:"shell\u547D\u4EE4",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},fieldFilter:{label:"\u5B57\u6BB5\u8FC7\u6EE4",desc:"<ul><li>\u5B57\u6BB5\u8FC7\u6EE4\u5668</li><li>\u53EF\u4EE5\u5BF9msg\u548Cmetadata\u5B57\u6BB5\u8FDB\u884C\u8FC7\u6EE4</li></ul>",checkAllKeys:{label:"\u662F\u5426\u6EE1\u8DB3\u9700\u8981\u6240\u6709\u5B57\u6BB5key\u5B58\u5728",desc:""},dataNames:{label:"msg data\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"},metadataNames:{label:"metadata\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"}},jsFilter:{label:"js\u8FC7\u6EE4",icon:Mn+"/images/jsFilter.svg",desc:"<ul><li>\u811A\u672C\u8FC7\u6EE4\u5668</li><li>\u53EF\u4EE5\u4F7F\u7528JavaScript\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4</li></ul>",jsScript:{label:"function Filter(msg, metadata, msgType) {",desc:"}"}},jsSwitch:{label:"js\u8DEF\u7531",desc:"<ul><li>\u811A\u672C\u8DEF\u7531</li><li>\u6267\u884C\u5DF2\u914D\u7F6E\u7684JS\u811A\u672C</li></ul>",jsScript:{label:"function Switch(msg, metadata, msgType) {",desc:"}"}},msgTypeSwitch:{label:"\u6D88\u606F\u8DEF\u7531",icon:Mn+"/images/msgTypeSwitch.svg",desc:"<ul><li>\u6D88\u606F\u8DEF\u7531</li><li>\u6839\u636E\u4F20\u5165\u7684\u6D88\u606F\u7C7B\u578B\uFF08msgType\uFF09\u8DEF\u7531\u5230\u4E00\u4E2A\u6216\u591A\u4E2A\u8F93\u51FA\u94FE</li></ul>",cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprFilter:{label:"\u8868\u8FBE\u5F0F\u8FC7\u6EE4",icon:Mn+"/images/exp.svg",desc:"<ul><li>\u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u6D88\u606F</li><li>\u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`</li><li>\u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`</li><li>\u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B</li><li>\u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B</li></ul>",expr:{label:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.temperature>50\uFF0C\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5E03\u5C14\u7C7B\u578B",rules:[{required:!0,message:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F\u662F\u5FC5\u987B\u7684"}]}},switch:{label:"\u6761\u4EF6\u5206\u652F",icon:Mn+"/images/msgTypeSwitch.svg",desc:"<ul><li>\u6761\u4EF6\u5206\u652F\u8282\u70B9</li><li>\u4F9D\u6B21\u5339\u914Dcase\u8868\u8FBE\u5F0F</li></ul>",cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprTransform:{label:"\u8868\u8FBE\u5F0F\u8F6C\u6362",icon:Mn+"/images/exp.svg",desc:"<ul><li>\u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684msg</li><li>\u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`</li><li>\u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`</li><li>\u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B</li><li>\u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B</li></ul>",expr:{label:"\u8F6C\u6362\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.name\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\u5219\u4F18\u5148\u4F7F\u7528\u8BE5\u5B57\u6BB5\u3002"},mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868\uFF08\u521B\u5EFA\u65B0\u7684Msg\uFF09",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\uFF0C\u6839\u636E\u6307\u5B9A\u7684\u5B57\u6BB5\u548C\u8F6C\u6362\u8868\u8FBE\u5F0F\u521B\u5EFA\u65B0\u7684Msg"}},metadataTransform:{label:"\u5143\u6570\u636E\u8F6C\u6362",icon:Mn+"/images/metadata.svg",desc:"<ul><li>\u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E</li><li>\u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`</li><li>\u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`</li><li>\u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B</li><li>\u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B</li></ul>",mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8F6C\u6362\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u4E0D\u662F\u8868\u8FBE\u5F0F\uFF0C\u4F7F\u7528\u5355\u5F15\u53F7\uFF0C\u5982\uFF1A'xx'"},isNew:{label:"\u662F\u5426\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868",desc:"true:\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868,false:\u66F4\u65B0\u5BF9\u5E94\u7684\u5143\u6570\u636Ekey"}},jsTransform:{label:"js\u8F6C\u6362",desc:"<ul><li>\u811A\u672C\u8F6C\u6362\u5668</li><li>\u53EF\u4EE5\u4F7F\u7528JavaScript\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A</li></ul>",jsScript:{label:"function Transform(msg, metadata, msgType) {",desc:"}"}},net:{label:"TCP/UDP",icon:Mn+"/images/net.svg",desc:"<ul><li>TCP/UDP\u5BA2\u6237\u7AEF</li><li>\u628Amsg\u53D1\u9001\u5230\u6307\u5B9A\u534F\u8BAE\u7F51\u7EDC\u670D\u52A1\u5668</li><li>\u652F\u6301\u534F\u8BAE\uFF1Atcp\u3001udp\u3001ip4:1\u3001ip6:ipv6-icmp\u3001ip6:58\u3001unix\u3001unixgram\uFF0C\u4EE5\u53CAnet\u5305\u652F\u6301\u7684\u534F\u8BAE\u7C7B\u578B</li></ul>",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B:127.0.0.1:6335"},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA460"},heartbeatInterval:{label:"\u5FC3\u8DF3\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2\uFF0C0\u4E0D\u53D1\u9001\u5FC3\u8DF3"}},flow:{label:"\u5B50\u89C4\u5219\u94FE",desc:"",targetId:{label:"\u5B50\u89C4\u5219\u94FEID",desc:"",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:async function(t,e,n,r){var i;if(!r){let o=[];try{let a=await fetch(((i=t.getEditorSetting())==null?void 0:i.url)+"/api/v1/rules?root=false").then(s=>s.json());a==null||a.items.forEach(s=>{o.push({value:s.ruleChain.id,label:s.ruleChain.name})})}catch{}finally{n.component.options=o}}}}},extend:{label:"\u7EE7\u627F\u6A21\u5F0F",desc:"\u5982\u679C\u5F00\u542F\uFF0C\u4E0D\u5408\u5E76\u5B50\u89C4\u5219\u94FE\u8F93\u51FA\u5173\u7CFB\u548C\u6D88\u606F",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}]}},ref:{label:"\u8282\u70B9\u5F15\u7528",icon:Mn+"/images/ref.svg",relationTypeAllowCreate:!0,relationTypes:[{label:"\u6210\u529F",value:"Success"},{label:"\u5931\u8D25",value:"Failure"},{label:"\u771F",value:"True"},{label:"\u5047",value:"False"}],desc:"<ul><li>\u8282\u70B9\u5F15\u7528</li><li>\u5F15\u7528\u6307\u5B9A\u89C4\u5219\u94FE\u6216\u8005\u5F53\u524D\u89C4\u5219\u94FE\u8282\u70B9\uFF0C\u7528\u4E8E\u8282\u70B9\u590D\u7528</li></ul>",targetId:{label:"\u8282\u70B9ID",desc:"\u5F15\u7528\u672C\u89C4\u5219\u94FE\u4E2D\u7684\u5176\u4ED6\u8282\u70B9",rules:[{required:!0,message:"\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:FO}}},groupFilter:{label:"\u8FC7\u6EE4\u5668\u7EC4",icon:Mn+"/images/groupFilter.svg",desc:"<ul><li>\u8FC7\u6EE4\u5668\u8282\u70B9\u7EC4</li><li>\u628A\u591A\u4E2AFilter\u8282\u70B9\u7EC4\u6210\u4E00\u4E2A\u5206\u7EC4</li></ul>",allMatches:{label:"\u662F\u5426\u9700\u8981\u5168\u5339\u914D",desc:""},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:FO}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},groupAction:{label:"\u8282\u70B9\u7EC4",desc:"<ul><li>\u5F02\u6B65\u6267\u884C\u591A\u4E2A\u8282\u70B9\uFF0C\u628A\u6240\u6709\u8282\u70B9\u7ED3\u679C\u5408\u5E76\uFF0C\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li><li>\u5982\u679C\u5339\u914D\u5230\u6307\u5B9A\u6570\u91CF\u8282\u70B9\u90FD\u662F\u6307\u5B9A\u5173\u7CFB\u7C7B\u578B\uFF0C\u5219\u628A\u6570\u636E\u5230`Success`\u94FE, \u5426\u5219\u53D1\u5230`Failure`\u94FE</li></ul>",icon:Mn+"/images/groupAction.svg",matchRelationType:{label:"\u5339\u914D\u5173\u7CFB\uFF0C\u9ED8\u8BA4Success",desc:""},matchNum:{label:"\u5339\u914D\u6EE1\u8DB3\u8282\u70B9\u6570\u91CF\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u8868\u793A\u6240\u6709\u8282\u70B9\u90FD\u6EE1\u8DB3\u6307\u5B9A\u5173\u7CFB"},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:FO}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},iterator:{label:"\u8FED\u4EE3\u5668",desc:"<ul><li>\u5F03\u7528\uFF0C\u4F7F\u7528for\u7EC4\u4EF6\u4EE3\u66FF</li><li>\u904D\u5386msg\u6216\u8005msg\u4E2D\u6307\u5B9A\u5B57\u6BB5item\u503C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u904D\u5386\u5B57\u6BB5\u503C\u5FC5\u987B\u662F`\u6570\u7EC4`\u6216\u8005`{key:value}`\u7C7B\u578B</li><li>\u5982\u679Citem\u6EE1\u8DB3jsScript\uFF0C\u5219\u4F1A\u628Aitem\u6570\u636E\u901A\u8FC7`True`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u5426\u5219\u901A\u8FC7`False`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li><li>\u5982\u679C\u627E\u4E0D\u5230\u6307\u5B9A\u5B57\u6BB5\u3001js\u811A\u672C\u6267\u884C\u5931\u8D25\u6216\u8005\u904D\u5386\u7684\u5BF9\u8C61\u4E0D\u662F `\u6570\u7EC4`\u6216\u8005`{key:value}`\uFF0C\u5219\u4F1A\u628A\u9519\u8BEF\u4FE1\u606F\u901A\u8FC7`Failure`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li><li>\u904D\u5386\u7ED3\u675F\u540E\uFF0C\u901A\u8FC7`Success`\u94FE\u628A\u539F\u59CBmsg\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9</li></ul>",icon:Mn+"/images/iterator.svg",fieldName:{label:"\u904D\u5386\u5B57\u6BB5",desc:"\u5982\u679C\u7A7A\uFF0C\u904D\u5386\u6574\u4E2Amsg\uFF0C\u652F\u6301\u5D4C\u5957\u65B9\u5F0F\u83B7\u53D6msg\u5B57\u6BB5\u503C\uFF0C\u4F8B\u5982items.value\u3001items"},jsScript:{label:"function Filter(item,index,metadata) {",desc:"} \u5339\u914Ditem\u7684js\u811A\u672C\uFF0C\u53EF\u9009\uFF0C\u5982\u679C\u7A7A\u5219\u904D\u5386\u6240\u6709item"}},join:{label:"\u5408\u5E76",desc:"<ul><li>\u5408\u5E76\u591A\u4E2A\u5F02\u6B65\u8282\u70B9\u6267\u884C\u7ED3\u679C</li></ul>",icon:Mn+"/images/join.svg",timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},fork:{label:"\u5E76\u884C\u7F51\u5173",desc:"<ul><li>\u628A\u6D41\u5206\u6210\u591A\u4E2A\u5E76\u884C\u6267\u884C\u7684\u8DEF\u5F84</li></ul>",icon:Mn+"/images/fork.svg"},"text/template":{label:"\u6A21\u677F\u8F6C\u6362",icon:Mn+"/images/template.svg",desc:"",template:{label:"\u6A21\u677F\u5185\u5BB9\u6216\u8005\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u662F\u6A21\u677F\u6587\u4EF6\u8DEF\u5F84\u4F7F\u7528file:\u5F00\u5934",component:{type:"codeEditor"}}},exec:{label:"\u547D\u4EE4\u884C",icon:Mn+"/images/ssh.svg",desc:"<ul><li>\u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4</li></ul>",cmd:{label:"\u6267\u884C\u547D\u4EE4",desc:"",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"x/redisClient":{label:"Redis",icon:Mn+"/images/redis.svg",desc:"<ul><li>redis\u5BA2\u6237\u7AEF</li><li>\u53EF\u4EE5\u6267\u884Credis\u547D\u4EE4</li></ul>",server:{label:"redis\u670D\u52A1\u5668\u5730\u5740",desc:"",rules:[{required:!0,message:"redis\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},cmd:{label:"\u6267\u884C\u547D\u4EE4\uFF0C\u4F8B\u5982SET/GET/DEL/HMSET/HMGET",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},paramsExpr:{label:"\u547D\u4EE4\u52A8\u6001\u53C2\u6570",desc:'\u652F\u6301Expr\u8868\u8FBE\u5F0F\u3002\u5982:["myhash2", "field1", "value1"]\uFF0C\u6216\u8005\u901A\u8FC7\u53D8\u91CF\u53D6\u503C\u5982:msg\u8868\u793A\u53D6\u6D88\u606F\u8D1F\u8377\u3002\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u548C\u547D\u4EE4\u9759\u6001\u53C2\u6570\uFF0C\u4F18\u5148\u53D6\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u503C\u3002'},params:{label:"\u547D\u4EE4\u9759\u6001\u53C2\u6570",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377"}},"x/luaFilter":{label:"Lua\u811A\u672C\u8FC7\u6EE4",icon:Mn+"/images/lua.svg",desc:"<ul><li>\u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4\u3002\u6839\u636E\u811A\u672C\u8FD4\u56DE\u503C\u8DEF\u7531\u5230True\u6216\u8005False\u94FE\u3002</li><li>\u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C</li></ul>",script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/luaTransform":{label:"Lua\u811A\u672C\u8F6C\u6362",icon:Mn+"/images/lua.svg",desc:"<ul><li>lua\u811A\u672C\u8F6C\u6362\u5668\u3002\u53EF\u4EE5\u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A\u3002</li><li>\u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C</li></ul>",script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/natsClient":{label:"NATS",icon:Mn+"/images/nats.svg",desc:"<ul><li>nats\u5BA2\u6237\u7AEF</li><li>\u5F80nats server \u6307\u5B9A\u4E3B\u9898\u53D1\u5E03\u5F53\u524D\u6D88\u606F\u6570\u636E</li></ul>",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""}},"x/rabbitmqClient":{label:"RabbitMQ",icon:Mn+"/images/rabbitmq.svg",desc:'<ul><li>\u53D1\u6D88\u606F\u8D1F\u8377\u53D1\u9001\u5230rabbitmq\u961F\u5217</li><li>\u652F\u6301AMQP\u534F\u8BAE</li><li><a href="https://rulego.cc/pages/rabbitmq-client/" target="_blank">\u5E2E\u52A9\u6587\u6863</li></ul></a>',server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},key:{label:"\u8DEF\u7531\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"\u53EF\u9009\u7C7B\u578B\uFF1Adirect/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""}},"x/opengeminiWrite":{label:"opengemini\u5199",icon:Mn+"/images/opengemini-write.svg",desc:"<ul><li>opengemini\u5199\u5BA2\u6237\u7AEF</li><li>\u628A\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u5199\u5165 OpenGemini \u670D\u52A1\u5668</li></ul>",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"}},"x/opengeminiQuery":{label:"opengemini\u8BFB",icon:Mn+"/images/opengemini.svg",desc:"<ul><li>opengemini\u8BFB\u5BA2\u6237\u7AEF</li><li>\u4ECEOpenGemini\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E</li></ul>",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"},command:{label:"\u67E5\u8BE2\u8BED\u53E5",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]}},"x/grpcClient":{label:"gRPC \u5BA2\u6237\u7AEF",icon:Mn+"/images/grpc.svg",desc:"<ul><li>\u52A8\u6001\u8C03\u7528gRPC\u670D\u52A1</li><</ul>",server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}\u3002\u5982\u679C\u7A7A\uFF0C\u5219\u4F7F\u7528\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u3002\u53C2\u6570\u4F7F\u7528JSON\u7F16\u7801\uFF0C\u5FC5\u987B\u548Cservice/method\u8981\u6C42\u4E00\u81F4\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF'},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF"}},"x/mongodbClient":{label:"MongoDB",icon:Mn+"/images/mongodb.svg",desc:"<ul><li>MongoDB \u5BA2\u6237\u7AEF</li><li>\u53EF\u4EE5\u5BF9MongoDB\u8FDB\u884C\u589E\u5220\u4FEE\u6539\u67E5\u64CD\u4F5C</li></li></ul>",server:{label:"MongoDB\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},collection:{label:"\u96C6\u5408",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},opType:{label:"\u64CD\u4F5C\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u63D2\u5165",value:"INSERT"},{label:"\u67E5\u8BE2",value:"QUERY"},{label:"\u66F4\u65B0",value:"UPDATE"},{label:"\u5220\u9664",value:"DELETE"}]},rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},filter:{label:"\u8FC7\u6EE4\u6761\u4EF6",desc:'\u67E5\u8BE2\u662F\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"age"": {"$gte": 18 }\u3002'},doc:{label:"\u66F4\u65B0/\u63D2\u5165\u6587\u6863",desc:'\u67E5\u8BE2\u6216\u8005\u5220\u9664\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"name":"test","age":18}\u3002'},one:{label:"\u662F\u5426\u64CD\u4F5C1\u6761\u8BB0\u5F55",desc:""}},"x/kafkaProducer":{label:"Kafka",icon:"/images/kafka.svg",desc:"<ul><li>Kafka\u751F\u4EA7\u8005\u7EC4\u4EF6\u3002\u7528\u4E8E\u5C06\u6D88\u606F\u53D1\u5E03\u5230Kafka\u6307\u5B9A\u4E3B\u9898\u3002</li></ul>",server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u670D\u52A1\u5668\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},topic:{label:"\u53D1\u5E03\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u4E3B\u9898\u662F\u5FC5\u987B\u7684"}]},key:{label:"\u5206\u533A\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},partition:{label:"\u5206\u533A\u7F16\u53F7",desc:""}},"ai/createImage":{label:"AI\u56FE\u50CF\u751F\u6210",icon:"/images/generate-image.svg",desc:'<ul><li>\u901A\u8FC7\u63D0\u793A\u8BCD\u751F\u6210\u56FE\u7247</li><a href="https://rulego.cc/pages/b0e537/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',url:{label:"API\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"dall-e-3",value:"dall-e-3"},{label:"dall-e-2",value:"dall-e-2"}]}},prompt:{label:"\u56FE\u50CF\u751F\u6210\u7684\u63D0\u793A",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"textarea"}},n:{label:"\u751F\u6210\u56FE\u50CF\u7684\u6570\u91CF",desc:"",component:{type:"slider",showInput:!0,showTooltip:!0,min:1,max:10,step:1}},responseFormat:{label:"\u54CD\u5E94\u683C\u5F0F",desc:"\u9ED8\u8BA4:url",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"url",value:"url"},{label:"b64_json",value:"b64_json"}]}},quality:{label:"\u56FE\u50CF\u8D28\u91CF",desc:"\u9ED8\u8BA4:standard",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"standard",value:"standard"},{label:"hd",value:"hd"}]}},size:{label:"\u56FE\u50CF\u5C3A\u5BF8",desc:"\u9ED8\u8BA4:1024x1024",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"256x256",value:"256x256"},{label:"512x512",value:"512x512"},{label:"1024x1024",value:"1024x1024"},{label:"1792x1024",value:"1792x1024"},{label:"1024x1792",value:"1024x1792"}]}},style:{label:"\u56FE\u50CF\u98CE\u683C",desc:"\u9ED8\u8BA4:vivid",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"vivid",value:"vivid"},{label:"natural",value:"natural"}]}}},"ai/llm":{label:"AI\u6587\u672C\u751F\u6210",icon:"/images/generate-text.svg",desc:'<ul><li>\u901A\u8FC7\u63D0\u793A\u8BCD\u751F\u6210\u6587\u672C</li><a href="https://rulego.cc/pages/a43229/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',url:{label:"API\u5730\u5740",desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"DeepSeek-R1-Distill-Qwen-32B",value:"DeepSeek-R1-Distill-Qwen-32B"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"Qwen2-7B-Instruct",value:"Qwen2-7B-Instruct"},{label:"Qwen2-VL-72B",value:"Qwen2-VL-72B"},{label:"o1-mini",value:"o1-mini"},{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]}},systemPrompt:{label:"\u7CFB\u7EDF\u63D0\u793A",desc:"\u7528\u4E8E\u9884\u5148\u5B9A\u4E49\u6A21\u578B\u7684\u57FA\u7840\u884C\u4E3A\u6846\u67B6\u548C\u54CD\u5E94\u98CE\u683C\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF",component:{type:"textarea"}},messages:{label:"\u4E0A\u4E0B\u6587/\u7528\u6237\u6D88\u606F\u5217\u8868",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"table",options:[{name:"role",label:"\u89D2\u8272",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",multiple:!1,options:[{label:"USER",value:"user"},{label:"ASSISTANT",value:"assistant"}]}},{name:"content",label:"\u6D88\u606F\u5185\u5BB9",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"USER\u89D2\u8272\uFF1A\u5411\u6A21\u578B\u63D0\u4F9B\u6307\u4EE4\u3001\u67E5\u8BE2\u6216\u4EFB\u4F55\u57FA\u4E8E\u6587\u672C\u7684\u8F93\u5165\u3002 ASSISTANT\u89D2\u8272\uFF1A\u57FA\u4E8E\u7528\u6237\u6D88\u606F\u7684\u6A21\u578B\u56DE\u590D",component:{type:"textarea"}}]}},images:{label:"\u89C6\u89C9",desc:"\u56FE\u50CFURL\u5217\u8868\uFF0C\u5927\u6A21\u578B\u5C06\u6839\u636E\u56FE\u50CF\u5185\u5BB9\u7684\u7406\u89E3\u56DE\u7B54\u7528\u6237\u95EE\u9898\u3002\u8BE5\u529F\u80FD\u9700\u8981\u5927\u6A21\u578Bapi\u652F\u6301(Qwen2-VL-72B\u652F\u6301\u89C6\u89C9)\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF"},params:{label:"\u5927\u6A21\u578B\u53C2\u6570",desc:"",temperature:{label:"\u6E29\u5EA6",desc:"\u91C7\u6837\u6E29\u5EA6\u63A7\u5236\u8F93\u51FA\u7684\u968F\u673A\u6027\u3002\u6E29\u5EA6\u503C\u5728 [0.0, 2.0] \u8303\u56F4\u5185\uFF0C\u503C\u8D8A\u9AD8\uFF0C\u8F93\u51FA\u8D8A\u968F\u673A\u548C\u521B\u9020\u6027\uFF1B\u503C\u8D8A\u4F4E\uFF0C\u8F93\u51FA\u8D8A\u7A33\u5B9A\u3002",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:2,step:.1}},topP:{label:"Top P",desc:"\u901A\u8FC7\u6838\u5FC3\u91C7\u6837\u63A7\u5236\u591A\u6837\u6027\uFF1A0.5\u8868\u793A\u8003\u8651\u4E86\u4E00\u534A\u7684\u6240\u6709\u53EF\u80FD\u6027\u52A0\u6743\u9009\u9879\u3002\u53D6\u503C\u8303\u56F4\uFF1A[0.0, 1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},presencePenalty:{label:"\u5B58\u5728\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u5DF2\u6709\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},frequencyPenalty:{label:"\u9891\u7387\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u51FA\u73B0\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A\u3002\u53D6\u503C\u8303\u56F4[0.0,1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},maxTokens:{label:"\u6700\u5927\u8F93\u51FA\u957F\u5EA6",desc:"",component:{type:"input-number",min:0,max:1e6,step:10}},stop:{label:"\u6A21\u578B\u505C\u6B62\u8F93\u51FA\u7684\u6807\u8BB0",desc:""},responseFormat:{label:"\u8F93\u51FA\u7ED3\u679C\u7684\u683C\u5F0F",desc:"\u53D6\u503C\uFF1Atext\u3001json_object\u3001json_schema\u3002\u9ED8\u8BA4\u4E3A text\u3002",component:{type:"select",multiple:!1,options:[{label:"text",value:"text"},{label:"json_object",value:"json_object"},{label:"json_schema",value:"json_schema"}]}},jsonSchema:{label:"JSON Schema",desc:"",component:{type:"codeEditor"}},keepThink:{label:"\u662F\u5426\u4FDD\u7559\u8F93\u51FA\u601D\u8003\u8FC7\u7A0B",desc:"\u53EA\u5BF9text\u54CD\u5E94\u683C\u5F0F\u751F\u6548"}}},"ci/exec":{label:"\u547D\u4EE4\u884C",icon:Mn+"/images/ssh.svg",desc:"<ul><li>\u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4</li></ul>",command:{label:"\u6267\u884C\u547D\u4EE4",desc:""},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"ci/gitClone":{label:"Git\u62C9\u53D6",icon:Mn+"/images/git.svg",desc:"<ul><li>git\u514B\u9686\u6216\u8005\u62C9\u53D6\u4ED3\u5E93\u4EE3\u7801</li></ul>",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/sagoo-cloud/sagooiot.git"},directory:{label:"\u514B\u9686\u5230\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},reference:{label:"\u5F15\u7528\u540D\u79F0",desc:"\u53EF\u4EE5\u662F\u5206\u652F\u540D\u3001\u6807\u7B7E\u540D\u5B8C\u6574\u5F15\u7528\u540D\u3002\u4F8B\u5982\uFF1Arefs/heads/main\u3002\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2Dref\u503C"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406URL",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitPush":{label:"Git\u63A8\u9001",icon:Mn+"/images/git-push.svg",desc:"<ul><li>git\u63A8\u9001</li></ul>",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/sagoo-cloud/sagooiot.git"},directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},refSpecs:{label:"\u672C\u5730\u5206\u652F\u4E0E\u8FDC\u7A0B\u5206\u652F\u6620\u5C04\u5173\u7CFB",desc:"\u4F8B\u5982\uFF1Arefs/heads/your-branch:refs/heads/your-branch\uFF0C\u591A\u4E2A\u6620\u5C04\u5173\u7CFB\u4E0E\u9017\u53F7\u9694\u5F00"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406\u5730\u5740",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitCommit":{label:"Git\u63D0\u4EA4",icon:Mn+"/images/git-commit.svg",desc:'<ul><li>git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE</li><a href="https://rulego.cc/pages/ci-git-commit/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},pattern:{label:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F",desc:"\u5FC5\u987B\u5F53\u524D\u5DE5\u4F5C\u533A\u76F8\u5BF9\u76EE\u5F55\u3002\u4F8B\u5982\uFF1A/example/*.go",rules:[{required:!0,message:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F\u662F\u5FC5\u987B\u7684"}]},message:{label:"Git\u63D0\u4EA4",desc:"",rules:[{required:!0,message:"\u63D0\u4EA4\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/gitCreateTag":{label:"Git\u521B\u5EFA\u6807\u7B7E",icon:Mn+"/images/git-tag.svg",desc:'<ul><li>git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE</li><a href="https://rulego.cc/pages/ci-git-create-tag/" target="_blank">\u5E2E\u52A9\u6587\u6863</a></ul>',directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},tag:{label:"\u6807\u7B7E\u540D\u79F0",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},message:{label:"\u6807\u7B7E\u6D88\u606F",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/ps":{label:"\u670D\u52A1\u5668\u6307\u6807",icon:Mn+"/images/ps.svg",desc:'\u7528\u4E8E\u76D1\u63A7\u670D\u52A1\u5668CPU\u3001\u5185\u5B58\u3001\u78C1\u76D8\u7B49\u6307\u6807\u3002<a href="https://rulego.cc/pages/ci-ps/" target="_blank">\u5E2E\u52A9\u6587\u6863</a>',options:{label:"\u6307\u6807\u5217\u8868",desc:"\u5982\u679C\u4E3A\u7A7A\uFF0C\u5219\u67E5\u8BE2\u6240\u6709\u6307\u6807",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!0,options:[{label:"\u4E3B\u673A\u4FE1\u606F",value:"host/info"},{label:"CPU\u4FE1\u606F",value:"cpu/info"},{label:"\u865A\u62DF\u5185\u5B58\u4FE1\u606F",value:"mem/virtualMemory"},{label:"\u4EA4\u6362\u5185\u5B58\u4FE1\u606F",value:"mem/swapMemory"},{label:"\u78C1\u76D8\u4F7F\u7528\u60C5\u51B5",value:"disk/usage"},{label:"\u78C1\u76D8IO\u8BA1\u6570\u5668\u4FE1\u606F",value:"disk/ioCounters"},{label:"\u7F51\u7EDCIO\u8BA1\u6570\u5668\u4FE1\u606F",value:"net/ioCounters"},{label:"\u7F51\u7EDC\u63A5\u53E3\u4FE1\u606F",value:"net/interfaces"}],placeholder:"\u8BF7\u9009\u62E9\u67E5\u8BE2\u6307\u6807"}}},"action/sagoo/deviceaction":{label:"\u8BBE\u5907\u52A8\u4F5C",icon:Mn+"/images/deviceaction.svg",desc:"\u7528\u4E8E\u6267\u884C\u8BBE\u5907\u7684\u64CD\u4F5C",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},triggerType:{label:"\u64CD\u4F5C\u7C7B\u578B",desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u8BBE\u5907\u529F\u80FD\u8C03\u7528",value:"functionCall"},{label:"\u83B7\u53D6\u8BBE\u5907\u5C5E\u6027",value:"getProperties"},{label:"\u8BBE\u7F6E\u8BBE\u5907\u5C5E\u6027",value:"setProperties"}],placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B"}},funcKey:{label:"\u529F\u80FD\u6807\u8BC6",desc:"\u5E73\u53F0\u8BBE\u7F6E\u7684\u529F\u80FD\u7684Key"},parameter:{label:"\u8BF7\u6C42\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},"x/opcuaRead":{label:"OPC_UA\u8BFB",icon:"/images/opcua_read.svg",category:"external",desc:"<ul><li>\u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcuaWrite":{label:"OPC_UA\u5199",icon:"/images/opcua_write.svg",category:"external",desc:"<ul><li>\u628A\u6D88\u606F\u8D1F\u8377\u70B9\u4F4D\u6570\u636E\u5217\u8868\uFF0C\u5199\u5165OPCUA\u670D\u52A1\u5668\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcua":{label:"OPC_UA\u8BA2\u9605",icon:"/images/endpoint/opcua.svg",category:"external",notInput:!0,nodeType:"endpoint-node",desc:"<ul><li>\u5B9A\u65F6\u4ECEOPCUA\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E\u3002</li></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"x/modbus":{label:"Modbus\u8BFB\u5199",icon:"/images/modbus.svg",category:"external",desc:"<ul><li>\u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002</li><a href='https://rulego.cc/pages/x-modbus/' target='_blank'>\u5E2E\u52A9\u6587\u6863</a></ul>",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u670D\u52A1\u5668\u5730\u5740\uFF0C\u683C\u5F0F\u4E3A\uFF1A<mode>://<serial device or host:port> \u793A\u4F8B: tcp://hostname-or-ip-address:502; rtu:///dev/ttyUSB0",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},cmd:{label:"Modbus\u65B9\u6CD5\u540D\u79F0",desc:"Modbus\u547D\u4EE4\u540D\u79F0",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u8BFB\u53D6\u7EBF\u5708\u72B6\u6001",value:"ReadCoils"},{label:"\u8BFB\u53D6\u5355\u4E2A\u7EBF\u5708\u72B6\u6001",value:"ReadCoil"},{label:"\u8BFB\u53D6\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInputs"},{label:"\u8BFB\u53D6\u5355\u4E2A\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInput"},{label:"\u8BFB\u53D6\u5BC4\u5B58\u5668",value:"ReadRegisters"},{label:"\u8BFB\u53D6\u5355\u4E2A\u5BC4\u5B58\u5668",value:"ReadRegister"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64"},{label:"\u8BFB\u53D6\u5B57\u8282\u6570\u636E",value:"ReadBytes"},{label:"\u8BFB\u53D6\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"ReadRawBytes"},{label:"\u5199\u5165\u7EBF\u5708\u72B6\u6001",value:"WriteCoil"},{label:"\u5199\u5165\u591A\u4E2A\u7EBF\u5708\u72B6\u6001",value:"WriteCoils"},{label:"\u5199\u5165\u5BC4\u5B58\u5668",value:"WriteRegister"},{label:"\u5199\u5165\u591A\u4E2A\u5BC4\u5B58\u5668",value:"WriteRegisters"},{label:"\u5199\u5165\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32s"},{label:"\u5199\u5165\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32s"},{label:"\u5199\u5165\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64s"},{label:"\u5199\u5165\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64s"},{label:"\u5199\u5165\u5B57\u8282\u6570\u636E",value:"WriteBytes"},{label:"\u5199\u5165\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"WriteRawBytes"}]}},unitId:{label:"\u4ECE\u673A\u7F16\u53F7",desc:"\u4F7F\u7528\u7684\u5355\u5143\u7F16\u53F7\uFF08\u4ECE\u673A\u7F16\u53F7\uFF09\uFF0C\u683C\u5F0F\uFF1Auint8\uFF0C\u793A\u4F8B\uFF1A1",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},address:{label:"\u5BC4\u5B58\u5668\u5730\u5740",desc:"\u5BC4\u5B58\u5668\u5730\u5740\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u683C\u5F0F\uFF1Auint16\uFF0C\u793A\u4F8B\uFF1A50\u6216\u80050x32"},quantity:{label:"\u5BC4\u5B58\u5668\u6570\u91CF",desc:"\u5BC4\u5B58\u5668\u6570\u91CF\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u793A\u4F8B\uFF1A1"},value:{label:"\u5BC4\u5B58\u5668\u503C",desc:"\u5BC4\u5B58\u5668\u503C\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\u3002\u8BFB\u5219\u4E0D\u9700\u8981\u63D0\u4F9B\uFF0C\u5982\u679C\u5199\u5165\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00\uFF0C\u4F8B\u5982\uFF1A0x01,0x01 true 51,52"},regType:{label:"\u5BC4\u5B58\u5668\u7C7B\u578B",desc:"\u5BC4\u5B58\u5668\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u4FDD\u6301\u5BC4\u5B58\u56680x3",value:"0"},{label:"\u8F93\u5165\u5BC4\u5B58\u56680x4",value:"1"}]}},encodingConfig:{label:"\u7F16\u7801\u914D\u7F6E",desc:"",endianness:{label:"\u5B57\u8282\u5E8F",desc:"\u5BC4\u5B58\u5668\u7684\u5B57\u8282\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u5927\u7AEF\u5E8F",value:1},{label:"\u5C0F\u7AEF\u5E8F",value:2}]}},wordOrder:{label:"\u5B57\u5E8F",desc:"32\u4F4D\u5BC4\u5B58\u5668\u7684\u5B57\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u9AD8\u5B57\u5728\u524D",value:1},{label:"\u4F4E\u5B57\u5728\u524D",value:2}]}}},rtuConfig:{label:"RTU\u914D\u7F6E",desc:"",parity:{label:"\u6821\u9A8C\u4F4D",desc:"\u4E32\u884C\u94FE\u8DEF\u7684\u6821\u9A8C\u6A21\u5F0F\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u65E0\u6821\u9A8C",value:0},{label:"\u5076\u6821\u9A8C",value:1},{label:"\u5947\u6821\u9A8C",value:2}]}},speed:{label:"\u4E32\u884C\u6CE2\u7279\u7387",desc:"\u8BBE\u7F6E\u4E32\u884C\u94FE\u8DEF\u6CE2\u7279\u7387\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"38400",value:38400},{label:"19200",value:19200},{label:"9600",value:9600},{label:"4800",value:4800}]}},dataBits:{label:"\u6570\u636E\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u5B57\u7B26\u7684\u6570\u636E\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"},stopBits:{label:"\u505C\u6B62\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u505C\u6B62\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"}},tcpConfig:{label:"TCP\u914D\u7F6E",desc:"",timeout:{label:"\u8D85\u65F6\u65F6\u95F4",desc:"\u8BBE\u7F6E\u8BF7\u6C42\u8D85\u65F6\u503C\uFF0C\u5355\u4F4D\u4E3A\u79D2"},certPath:{label:"\u8BC1\u4E66\u8DEF\u5F84",desc:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"},keyPath:{label:"\u5BC6\u94A5\u8DEF\u5F84",desc:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84"},caPath:{label:"CA\u8BC1\u4E66\u8DEF\u5F84",desc:"CA\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"}}}}}},DUe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let SS=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=DUe[n[t]&63];return e};const Ng=(t,e)=>{if(t&&e){let n=_m[e];if(n)return n[t]||t}else if(t)return _m[t]||t;return t},AX=t=>{if(!t)return 0;let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:r>=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=1.8}return e},LUe=(t,e)=>{KN(_m,e);let n=JSON.parse(JSON.stringify(_m.category));t.endpoints&&t.endpoints.forEach(r=>{TF(t.builtins,n,r,!0)}),t.nodes||(t.nodes=t),t.nodes.forEach(r=>{TF(t.builtins,n,r,!1)});for(let r in n){let i=n[r];(!i.components||Array.isArray(i.components)&&i.components.length===0)&&delete n[r]}return n},TF=(t,e,n,r)=>{IUe(n,r);let i="";if(r&&!e[n.category])i="endpoints";else{i=n.category.split("/")[0];let a=n.type.split("/")[0];e[a]&&(i=a)}let o=e[i];o?(n.background=n.background||o.background,o.components?o.components.push(n):o.components=[n]):e[i]={label:i,background:"#86B4E5FF",components:[n]},n.category=i,YUe(t,n,i),BUe(n),n.nodeType=n.nodeType||o&&o.nodeType||"simple-node"},IUe=(t,e)=>{let n={};e?n=_m.component.endpoints[t.type]:n=_m.component.nodes[t.type],n?(Object.assign(t,n),t.relationTypes=n.relationTypes||kF(t.relationTypes),"disabled"in n&&(t.disabled=n.disabled),MX(t,n),e&&(t.router=n.router||t.router)):t.relationTypes=kF(t.relationTypes),e&&(t.router=t.router||{},t.hasOwnProperty("notInput")||(t.notInput=!0))},kF=t=>{if(t){let e=[];return t.forEach(n=>{let r=n.value!==void 0&&n.value!==null?n.value:n,i=n.label!==void 0&&n.label!==null?n.label:n;e.push({value:r,label:Ng(i,"relationTypes")})}),e}return t},MX=(t,e)=>{t.fields&&t.fields.forEach(n=>{let r=e[n.name];r&&KN(n,r),n.fields&&r&&MX(n,r)})},BUe=t=>{t.fields&&t.fields.forEach(e=>{e.type.indexOf("int")>-1&&!e.rules?e.rules=[{type:"number",message:"\u5FC5\u987B\u662F\u6570\u503C\u7C7B\u578B"}]:e.type.indexOf("float")>-1&&!e.rules&&(e.rules=[{pattern:/^-?\d+(\.\d+)?$/,message:"\u5FC5\u987B\u662F\u6D6E\u70B9\u7C7B\u578B"}])})},bA=(t,e)=>{let n={};return t&&t.forEach(r=>{r.id===e&&(n=r)}),n},FUe=(t,e,n)=>{let r=null;return t&&t.forEach(i=>{i.sourceNodeId===e&&i.targetNodeId===n&&(r=i)}),r},VUe=(t,e,n)=>{let r={id:"edge_"+t.edgeCount,type:"flow-link",sourceNodeId:n.fromId,targetNodeId:n.toId,startPoint:{},endPoint:{},text:Ng(n.type,"relationTypes")||"",properties:{model:{...n}}},i=bA(e,r.sourceNodeId),o=bA(e,r.targetNodeId);return i&&(r.startPoint.x=i.x+t.nodeWidth/2,r.startPoint.y=i.y),o&&(r.endPoint.x=o.x-t.nodeWidth/2-10,r.endPoint.y=o.y),r},jUe=t=>{let e=t.split("_");if(e.length>0){let n=parseInt(e[e.length-1]);return isNaN(n)?0:n}},zUe=(t,e,n)=>{let r={};t.forEach(o=>{let a=o.properties.model||{};a.routerId&&(r[a.routerId]=o.id)});let i=[];return e.routers&&e.routers.forEach(o=>{if(!r[o.id]||r[o.id]===n){let a=jb(o);i.push({label:a,value:o.id||a})}}),i},QUe=(t,e)=>{let n=[];return t.type==="switch"&&(e.configuration&&e.configuration.cases&&e.configuration.cases.forEach(r=>{n.push({label:r.then,value:r.then})}),n.push({label:"Default",value:"Default"}),n.push({label:"\u5931\u8D25",value:"Failure"})),n},HUe=(t,e)=>{let n=[];return t.routers&&t.routers.forEach(r=>{if(r.id===e){let i=jb(r);n.push({label:i,value:e})}}),n},WUe=(t,e,n)=>{let r=[];return n?(e.routers&&e.routers.length>0&&e.routers.forEach(i=>{if(i.to&&i.to.path){let o=i.to.path.split(":"),a=jb(i);if(o.length<=1)r.push({fromId:t,toId:n.id,routerId:i.id,nodeType:"endpoint-node",type:a});else for(let s=1;s<o.length;s++)r.push({fromId:t,toId:o[s],nodeType:"endpoint-node",routerId:i.id,type:a})}}),r):[]},UUe=(t,e,n)=>{t.routers=t.routers||[],t.routers.forEach(r=>{r.to||(r.to={}),r.to.path=e}),n.forEach(r=>{r.fromId===t.id&&t.routers&&t.routers.forEach(i=>{let o=jb(i);(i.id===r.type||o===r.type)&&(i.to.path=i.to.path+":"+r.toId)})})},jb=t=>t.from?(t.params?t.params.join(" "):"")+" "+(t.from&&t.from.path):"",qUe=t=>SS(t||12),YUe=(t,e,n)=>{if(n==="endpoints"){let i=t.endpoints;i&&e.router&&(e.router.options={},Object.keys(i).forEach(o=>{e.router.options[o]=i[o]}))}let r=t.nodePool&&t.nodePool[e.type];if(r&&e.fields){let i=XUe(r);e.fields.forEach(o=>{o.component&&!o.component.options&&(o.component.options=i)})}Object.keys(t).forEach(i=>{e.type===i&&e.fields&&e.fields.forEach(o=>{t[i][o.name]&&(o.component=o.component||{},o.component.options=t[i][o.name])})})};function XUe(t){let e=[];return t&&t.forEach(n=>{e.push({label:n.name,value:`ref://${n.id}`})}),e}function KN(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");const n=r=>r&&typeof r=="object"&&!Array.isArray(r);for(const r of e)if(n(r))for(const i in r)n(r[i])&&n(t[i])?KN(t[i],r[i]):t[i]=r[i];return t}const ZUe=(t,e,n)=>e.map(r=>{const i=t.find(o=>o.value!==void 0&&o.value!==null?o.value===r:o===r);return i&&i.label?i.label:Ng(r,n)}).filter(r=>r!==void 0),GUe=t=>new Promise((e,n)=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t).then(()=>e(!0)).catch(r=>n(r));else{const r=document.createElement("textarea");r.value=t,document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?e(!0):n("execCommand copy failed")}catch(i){n(i)}finally{document.body.removeChild(r)}}}),KUe=()=>new Promise((t,e)=>{navigator.clipboard&&window.isSecureContext?navigator.clipboard.readText().then(n=>t(n)).catch(n=>{PF().then(t,e)}):PF().then(t,e)});function PF(){return new Promise((t,e)=>{let n="";const r=document.createElement("textarea");r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("paste")?(n=r.value,t(n)):e("execCommand paste failed")}catch(i){e(i)}finally{document.body.removeChild(r)}})}const Xn={};Xn.getNodeSeq=jUe;Xn.adapterComponents=LUe;Xn.getNodeByID=bA;Xn.getEdgeBySourceNodeIdAndTargetNodeId=FUe;Xn.createEdge=VUe;Xn.getRelationTypeOptionsFromRouters=zUe;Xn.getEndpointConnections=WUe;Xn.updateEndpointRouterToPath=UUe;Xn.toFromPath=jb;Xn.getRouterRelationTypeLabel=HUe;Xn.genId=qUe;Xn.getSelectedLabels=ZUe;Xn.copyToClipboard=GUe;Xn.readFromClipboard=KUe;Xn.getRelationTypeOptionsFromNode=QUe;class JUe extends lp{initNodeData(e){super.initNodeData(e),this.width=120,this.height=30,this.resizable=!1,this.radius=5,this.text.x=this.x+10,this.iconPosition="",this.defaultFill="#a6bbcf";const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return c&&c.length>0&&c.filter(f=>f.sourceNode.id===a.id&&f.targetNode.id===s.id).length>0?!1:l.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>1&&a.type==="start-node"||s.type==="start-node"||s.type==="endpoint-node")}},i={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>0&&c.filter(f=>f.sourceNode.id==a.id&&f.targetNode.id==s.id).length>0)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(i);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(a,s,l,u)=>u.type==="left"};this.targetRules.push(o)}getData(){const e=super.getData();return e.properties.ui="node-red",e}setAttributes(){if(this.text.value){let e=30+AX(this.text.value)*9;e=Math.ceil(e/20)*20;let n=Math.ceil((e-this.width)/20);if(n>0){let r=this.text.value.length-n;r>0&&(this.text.value=this.text.value.substring(0,r)+"...")}}}updateText(e){super.updateText(e),this.setAttributes()}getNodeStyle(){const e=super.getNodeStyle(),n=this.properties.view||{};return this.isSelected?(e.strokeWidth=Number(n.borderWidth)||2,e.stroke=n.borderColor||"#ff7f0e"):(e.strokeWidth=Number(n.borderWidth)||1,e.stroke=n.borderColor||"#999"),e.fill=n.background||this.defaultFill||"rgb(230, 224, 248)",this.icon=n.icon||"/plugin/rule/images/"+n.category+".svg"||"images/fetch.svg",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:i,height:o}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"},{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}getOutlineStyle(){const e=super.getOutlineStyle();return e.stroke="transparent",e.hover.stroke="transparent",e}}class eqe extends wf{getAnchorShape(e){const{x:n,y:r,type:i}=e;return Gt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}getIcon(){return null}getShape(){const{text:e,x:n,y:r,width:i,height:o,radius:a}=this.props.model,s=this.props.model.getNodeStyle();return Gt("g",{className:"lf-red-node"},[Gt("rect",{...s,x:n-i/2,y:r-o/2,width:i,height:o,rx:a,ry:a}),Gt("g",{style:"pointer-events: none;",transform:`translate(${n}, ${r})`},[Gt("rect",{x:-i/2,y:-o/2,width:30,height:30,fill:"#000",fillOpacity:.05,stroke:"none"}),this.getIcon(),Gt("path",{d:`M ${30-i/2} ${1-o/2} l 0 28`,stroke:"#000",strokeOpacity:.1,strokeWidth:1})])])}}var pc={type:"red-node",model:JUe,view:eqe};class tqe extends pc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/images/comment.svg";return Gt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class nqe extends pc.model{getDefaultAnchor(){return[]}initNodeData(e){super.initNodeData(e)}getTextStyle(){const e=super.getTextStyle();return e.fontStyle="italic",e}setAttributes(){this.width=15+AX(this.text.value)*8,this.width<120&&(this.width=120)}updateText(e){super.updateText(e),this.setAttributes()}}var rqe={type:"comment-node",model:nqe,view:tqe};class iqe extends pc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/plugin/rule/images/start.svg";return Gt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class oqe extends pc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e)}}var aqe={type:"endpoint-node",model:oqe,view:iqe};class sqe extends pc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/plugin/rule/images/fetch.svg";return Gt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class lqe extends pc.model{initNodeData(e){super.initNodeData(e)}}var uqe={type:"simple-node",model:lqe,view:sqe};class cqe extends pc.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:i,icon:o}=e;let a=o||"/plugin/rule/images/fetch.svg";return Gt("image",{width:30,height:30,x:-r/2,y:-i/2,href:a})}}class dqe extends pc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}initNodeData(e){super.initNodeData(e)}}var fqe={type:"chain-node",model:dqe,view:cqe};class hqe extends pc.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:i}=e;return Gt("image",{width:30,height:30,x:-r/2,y:-i/2,className:"node-red-start",href:"/plugin/rule/images/start.svg",onClick:()=>{n.eventCenter.emit("node-red:start")}})}}class pqe extends pc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e),this.defaultFill="rgb(166, 187, 207)",e.moveRules&&(this.moveRules=e.moveRules)}}var gqe={type:"start-node",model:pqe,view:hqe};class mqe extends YN.view{getAnchorShape(e){const{x:n,y:r,type:i}=e;return Gt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}}class vqe extends YN.model{initNodeData(e){this.width=300,this.height=200,super.initNodeData(e),this.resizable=!0,this.collapsible=!0,this.isRestrict=!1,this.autoResize=!0,this.nodeTextDraggable=!1;const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return c&&c.length>0&&c.filter(f=>f.sourceNode.id===a.id&&f.targetNode.id===s.id).length>0?!1:l.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>1&&a.type==="start-node"||s.type==="start-node"||s.type==="endpoint-node")}},i={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>0&&c.filter(f=>f.sourceNode.id==a.id&&f.targetNode.id==s.id).length>0)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(i);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(a,s,l,u)=>u.type==="left"};this.targetRules.push(o)}getNodeStyle(){const e=super.getNodeStyle();return this.isSelected?(e.strokeWidth=2,e.stroke="#ff7f0e"):(e.stroke="#AEAFAE",e.strokeDasharray="3 3",e.strokeWidth=1),e}getAddableOutlineStyle(){const e=super.getAddableOutlineStyle();return e.stroke="#AEAFAE",e.strokeDasharray="3 3",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:i,height:o}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"},{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}}var yqe={type:"group-node",model:vqe,view:mqe};class bqe extends UP{getEdgeStyle(){const e=super.getEdgeStyle();return e.strokeWidth=this.isHovered?4:3,e.stroke=this.isSelected||this.isHovered?"#ff7f0e":"#999",e}getTextStyle(){const e=super.getTextStyle();e.color="#003a79",e.textWidth=200,e.overflowMode="autoWrap",e.fontSize=16;let n="0px,0px";return this.text.value&&(e.textWidth=Math.ceil(this.text.value.length/2)*e.fontSize+e.fontSize/4+30,e.textWidth>200&&(e.textWidth=200)),e.background={wrapPadding:n,fill:"#FFF",strokeWidth:2,stroke:"#003a79",x:0,y:0,rx:10,ry:10},e}setAttributes(e){super.setAttributes(e),this.offset=20}}class _qe extends cA{}var Oqe={type:"flow-link",view:_qe,model:bqe},Pl=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const wqe={class:"demo-collapse"},Sqe={class:"classify-title"},xqe=["onMousedown"],Cqe={class:"red-ui-palette-label"},Eqe={class:"red-ui-palette-icon-container"},Tqe={key:0,class:"red-ui-palette-port red-ui-palette-port-input"},kqe={key:1,class:"red-ui-palette-port red-ui-palette-port-output"},Pqe=ue({__name:"Sidebar",props:{lf:{type:oX,required:!0}},setup(t){const e=t,n="/plugin/rule",r=F(""),i=F(["endpoints","action","filter","transform","external","flow","ai","ci","iot"]),o=c=>{const{lf:d}=e;d.dnd.startDrag({type:c.nodeType,text:c.label||c.type,properties:{model:{type:c.type,debugMode:!1},view:c}})},a=F(null),s=F(null),{lf:l}=e;l.on("rulego-editor:componentOk",c=>{s.value=c,a.value=c}),Bt(()=>{const{lf:c}=e;c.graphModel.eventCenter.emit("rulego-editor:sidebarOk")});const u=()=>{let c=r.value.toLowerCase(),d={};if(c=="")d=s.value;else for(let f in s.value)d[f]||(d[f]=[]),d[f]=JSON.parse(JSON.stringify(s.value[f])),d[f].components&&(d[f].components=d[f].components.filter(h=>h.label.toLowerCase().indexOf(c)>-1||h.type.toLowerCase().indexOf(c)>-1));a.value=d};return(c,d)=>{const f=hi,h=ho,m=fo,g=Ui,y=Gx,b=Zx,w=mu;return R(),G("div",wqe,[B(f,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=O=>r.value=O),"prefix-icon":p(c$),onInput:u,placeholder:"\u641C\u7D22\u7EC4\u4EF6"},null,8,["modelValue","prefix-icon"]),B(w,{height:"calc(100vh - 82px)"},{default:z(()=>[(R(!0),G(ct,null,Wt(a.value,(O,S,x)=>(R(),we(b,{modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=C=>i.value=C)},{default:z(()=>[B(y,{name:S},{title:z(()=>[B(m,null,{default:z(()=>[B(h,{span:3},{default:z(()=>[J("span",{class:"red-ui-palette-icon",style:mt({backgroundImage:`url(${p(n)+"/images/"+S+"-dark.svg"})`})},null,4)]),_:2},1024),B(h,{span:18,offset:2},{default:z(()=>[J("span",Sqe,je(O.label),1)]),_:2},1024)]),_:2},1024)]),default:z(()=>[(R(!0),G(ct,null,Wt(O.components,(C,E)=>(R(),G("div",{class:"red-ui-palette-node ui-draggable ui-draggable-handle",onMousedown:T=>o(C),key:E,style:mt({backgroundColor:C.background||"#a6bbcf"})},[B(g,{class:"box-item","popper-class":"help-box",effect:"light","show-after":1e3,content:C.desc,placement:"right-start","raw-content":""},{default:z(()=>[J("div",Cqe,je(C.label||C.type),1)]),_:2},1032,["content"]),J("div",Eqe,[C.icon?(R(),G("div",{key:0,class:"red-ui-palette-icon",style:mt({backgroundImage:`url(${C.icon})`})},null,4)):(R(),G("div",{key:1,class:"red-ui-palette-icon",style:mt({backgroundImage:`url(${p(n)+"/images/"+S+".svg"})`})},null,4))]),C.notInput?_e("",!0):(R(),G("div",Tqe)),C.notOutput?_e("",!0):(R(),G("div",kqe))],44,xqe))),128))]),_:2},1032,["name"])]),_:2},1032,["modelValue"]))),256))]),_:1})])}}});var Aqe=Pl(Pqe,[["__scopeId","data-v-3f7105dc"]]);let AF=!1;class RX{constructor({lf:e}){e.register(gqe),e.register(aqe),e.register(rqe),e.register(uqe),e.register(fqe),e.register(yqe),e.register(Oqe),e.setDefaultEdgeType("flow-link")}render(e,n){if(AF){this.app=px(Aqe,{lf:e});const r=document.createElement("div");r.className="node-red-palette",document.body.appendChild(r),this.app.mount(r)}AF=!0}getNodeList(){let e={};for(let n in this.nodeGroups)this.nodeGroups[n].components.forEach(r=>{e[r.type]=r});return e}}JE(RX,"pluginName","NodeRedExtension");var Mqe="/plugin/rule/assets/logo.91bc7193.png";const Rqe={style:{flex:"auto"}},$X={__name:"NewFlowDialog",props:["show"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{show:r}=t,i=F();F(r);const o=Sn({id:"default",name:"",root:!0,additionalInfo:{description:""}});F(!1);const a=()=>{n("submit",Bn(o))},s=()=>{n("close")};return e({updateDefault:u=>{var c;o.id=(u==null?void 0:u.id)||SS(12),o.name=(u==null?void 0:u.name)||"",o.root=(c=u==null?void 0:u.root)!=null?c:!0,u&&"disabled"in u&&(o.disabled=u.disabled),o.additionalInfo=(u==null?void 0:u.additionalInfo)||{description:""},o.configuration=(u==null?void 0:u.configuration)||{}}}),(u,c)=>{const d=ho,f=fo,h=hi,m=Tl,g=Xm,y=El,b=lr,w=Ma;return R(),we(w,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u.handleOpen},{header:z(()=>[B(f,null,{default:z(()=>[B(d,{span:12},{default:z(()=>[qe("\u521B\u5EFA\u6D41\u7A0B")]),_:1})]),_:1})]),footer:z(()=>[J("div",Rqe,[B(b,{type:"primary",onClick:a},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(b,{onClick:s},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(y,{model:o,ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:z(()=>[B(m,{label:"ID",prop:"id"},{default:z(()=>[B(h,{modelValue:o.id,"onUpdate:modelValue":c[0]||(c[0]=O=>o.id=O),placeholder:"\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u81EA\u52A8\u521B\u5EFA"},null,8,["modelValue"])]),_:1}),B(m,{label:"\u540D\u79F0",prop:"name"},{default:z(()=>[B(h,{modelValue:o.name,"onUpdate:modelValue":c[1]||(c[1]=O=>o.name=O),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(m,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:z(()=>[B(g,{class:"ml-2",modelValue:o.root,"onUpdate:modelValue":c[2]||(c[2]=O=>o.root=O),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"])]),_:1}),B(m,{label:"\u63CF\u8FF0",prop:"description"},{default:z(()=>[B(h,{modelValue:o.additionalInfo.description,"onUpdate:modelValue":c[3]||(c[3]=O=>o.additionalInfo.description=O),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","onOpen"])}}};var _A={exports:{}};/**
  132. * @license
  133. * Lodash <https://lodash.com/>
  134. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  135. * Released under MIT license <https://lodash.com/license>
  136. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  137. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  138. */(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,f=2,h=4,m=1,g=2,y=1,b=2,w=4,O=8,S=16,x=32,C=64,E=128,T=256,P=512,A=30,D="...",N=800,$=16,W=1,L=2,I=3,U=1/0,Q=9007199254740991,V=17976931348623157e292,q=0/0,K=4294967295,ie=K-1,oe=K>>>1,Se=[["ary",E],["bind",y],["bindKey",b],["curry",O],["curryRight",S],["flip",P],["partial",x],["partialRight",C],["rearg",T]],ke="[object Arguments]",Y="[object Array]",re="[object AsyncFunction]",te="[object Boolean]",ge="[object Date]",Re="[object DOMException]",$e="[object Error]",Z="[object Function]",ce="[object GeneratorFunction]",Te="[object Map]",Ie="[object Number]",ae="[object Null]",me="[object Object]",Ae="[object Promise]",X="[object Proxy]",ee="[object RegExp]",le="[object Set]",Ce="[object String]",fe="[object Symbol]",Ee="[object Undefined]",be="[object WeakMap]",Be="[object WeakSet]",Xe="[object ArrayBuffer]",Ke="[object DataView]",tt="[object Float32Array]",Dt="[object Float64Array]",jt="[object Int8Array]",Me="[object Int16Array]",nt="[object Int32Array]",de="[object Uint8Array]",Pe="[object Uint8ClampedArray]",Le="[object Uint16Array]",wt="[object Uint32Array]",tn=/\b__p \+= '';/g,De=/\b(__p \+=) '' \+/g,xt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,qt=/&(?:amp|lt|gt|quot|#39);/g,ln=/[&<>"']/g,nn=RegExp(qt.source),bn=RegExp(ln.source),Ze=/<%-([\s\S]+?)%>/g,Rt=/<%([\s\S]+?)%>/g,xn=/<%=([\s\S]+?)%>/g,fn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Er=/^\w*$/,dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eo=/[\\^$.*+?()[\]{}|]/g,Pi=RegExp(eo.source),Oi=/^\s+/,Ml=/\s/,cs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,Rl=/,? & /,et=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Mt=/[()=,{}\[\]\/\s]/,Vn=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Li=/\w*$/,Eo=/^[-+]0x[0-9a-f]+$/i,Wo=/^0b[01]+$/i,po=/^\[object .+?Constructor\]$/,Ei=/^0o[0-7]+$/i,Uo=/^(?:0|[1-9]\d*)$/,ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nt=/($^)/,rn=/['\n\r\u2028\u2029\\]/g,se="\\ud800-\\udfff",ze="\\u0300-\\u036f",pt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Rn=ze+pt+Yt,gr="\\u2700-\\u27bf",Ti="a-z\\xdf-\\xf6\\xf8-\\xff",ve="\\xac\\xb1\\xd7\\xf7",We="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_t="\\u2000-\\u206f",Lt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",mn="A-Z\\xc0-\\xd6\\xd8-\\xde",ir="\\ufe0e\\ufe0f",Tt=ve+We+_t+Lt,on="['\u2019]",wn="["+se+"]",Zn="["+Tt+"]",Yi="["+Rn+"]",fv="\\d+",hv="["+gr+"]",da="["+Ti+"]",Ep="[^"+se+Tt+fv+gr+Ti+mn+"]",Yf="\\ud83c[\\udffb-\\udfff]",qo="(?:"+Yi+"|"+Yf+")",ds="[^"+se+"]",pv="(?:\\ud83c[\\udde6-\\uddff]){2}",Tp="[\\ud800-\\udbff][\\udc00-\\udfff]",kp="["+mn+"]",nL="\\u200d",rL="(?:"+da+"|"+Ep+")",XJ="(?:"+kp+"|"+Ep+")",iL="(?:"+on+"(?:d|ll|m|re|s|t|ve))?",oL="(?:"+on+"(?:D|LL|M|RE|S|T|VE))?",aL=qo+"?",sL="["+ir+"]?",ZJ="(?:"+nL+"(?:"+[ds,pv,Tp].join("|")+")"+sL+aL+")*",GJ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",KJ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",lL=sL+aL+ZJ,JJ="(?:"+[hv,pv,Tp].join("|")+")"+lL,eee="(?:"+[ds+Yi+"?",Yi,pv,Tp,wn].join("|")+")",tee=RegExp(on,"g"),nee=RegExp(Yi,"g"),qC=RegExp(Yf+"(?="+Yf+")|"+eee+lL,"g"),ree=RegExp([kp+"?"+da+"+"+iL+"(?="+[Zn,kp,"$"].join("|")+")",XJ+"+"+oL+"(?="+[Zn,kp+rL,"$"].join("|")+")",kp+"?"+rL+"+"+iL,kp+"+"+oL,KJ,GJ,fv,JJ].join("|"),"g"),iee=RegExp("["+nL+se+Rn+ir+"]"),oee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,aee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],see=-1,gi={};gi[tt]=gi[Dt]=gi[jt]=gi[Me]=gi[nt]=gi[de]=gi[Pe]=gi[Le]=gi[wt]=!0,gi[ke]=gi[Y]=gi[Xe]=gi[te]=gi[Ke]=gi[ge]=gi[$e]=gi[Z]=gi[Te]=gi[Ie]=gi[me]=gi[ee]=gi[le]=gi[Ce]=gi[be]=!1;var li={};li[ke]=li[Y]=li[Xe]=li[Ke]=li[te]=li[ge]=li[tt]=li[Dt]=li[jt]=li[Me]=li[nt]=li[Te]=li[Ie]=li[me]=li[ee]=li[le]=li[Ce]=li[fe]=li[de]=li[Pe]=li[Le]=li[wt]=!0,li[$e]=li[Z]=li[be]=!1;var lee={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},uee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cee={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},dee={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fee=parseFloat,hee=parseInt,uL=typeof Mi=="object"&&Mi&&Mi.Object===Object&&Mi,pee=typeof self=="object"&&self&&self.Object===Object&&self,To=uL||pee||Function("return this")(),YC=e&&!e.nodeType&&e,Xf=YC&&!0&&t&&!t.nodeType&&t,cL=Xf&&Xf.exports===YC,XC=cL&&uL.process,Vs=function(){try{var He=Xf&&Xf.require&&Xf.require("util").types;return He||XC&&XC.binding&&XC.binding("util")}catch{}}(),dL=Vs&&Vs.isArrayBuffer,fL=Vs&&Vs.isDate,hL=Vs&&Vs.isMap,pL=Vs&&Vs.isRegExp,gL=Vs&&Vs.isSet,mL=Vs&&Vs.isTypedArray;function fs(He,ft,st){switch(st.length){case 0:return He.call(ft);case 1:return He.call(ft,st[0]);case 2:return He.call(ft,st[0],st[1]);case 3:return He.call(ft,st[0],st[1],st[2])}return He.apply(ft,st)}function gee(He,ft,st,Kt){for(var qn=-1,Br=He==null?0:He.length;++qn<Br;){var to=He[qn];ft(Kt,to,st(to),He)}return Kt}function js(He,ft){for(var st=-1,Kt=He==null?0:He.length;++st<Kt&&ft(He[st],st,He)!==!1;);return He}function mee(He,ft){for(var st=He==null?0:He.length;st--&&ft(He[st],st,He)!==!1;);return He}function vL(He,ft){for(var st=-1,Kt=He==null?0:He.length;++st<Kt;)if(!ft(He[st],st,He))return!1;return!0}function fd(He,ft){for(var st=-1,Kt=He==null?0:He.length,qn=0,Br=[];++st<Kt;){var to=He[st];ft(to,st,He)&&(Br[qn++]=to)}return Br}function r_(He,ft){var st=He==null?0:He.length;return!!st&&Pp(He,ft,0)>-1}function ZC(He,ft,st){for(var Kt=-1,qn=He==null?0:He.length;++Kt<qn;)if(st(ft,He[Kt]))return!0;return!1}function wi(He,ft){for(var st=-1,Kt=He==null?0:He.length,qn=Array(Kt);++st<Kt;)qn[st]=ft(He[st],st,He);return qn}function hd(He,ft){for(var st=-1,Kt=ft.length,qn=He.length;++st<Kt;)He[qn+st]=ft[st];return He}function GC(He,ft,st,Kt){var qn=-1,Br=He==null?0:He.length;for(Kt&&Br&&(st=He[++qn]);++qn<Br;)st=ft(st,He[qn],qn,He);return st}function vee(He,ft,st,Kt){var qn=He==null?0:He.length;for(Kt&&qn&&(st=He[--qn]);qn--;)st=ft(st,He[qn],qn,He);return st}function KC(He,ft){for(var st=-1,Kt=He==null?0:He.length;++st<Kt;)if(ft(He[st],st,He))return!0;return!1}var yee=JC("length");function bee(He){return He.split("")}function _ee(He){return He.match(et)||[]}function yL(He,ft,st){var Kt;return st(He,function(qn,Br,to){if(ft(qn,Br,to))return Kt=Br,!1}),Kt}function i_(He,ft,st,Kt){for(var qn=He.length,Br=st+(Kt?1:-1);Kt?Br--:++Br<qn;)if(ft(He[Br],Br,He))return Br;return-1}function Pp(He,ft,st){return ft===ft?Ree(He,ft,st):i_(He,bL,st)}function Oee(He,ft,st,Kt){for(var qn=st-1,Br=He.length;++qn<Br;)if(Kt(He[qn],ft))return qn;return-1}function bL(He){return He!==He}function _L(He,ft){var st=He==null?0:He.length;return st?tE(He,ft)/st:q}function JC(He){return function(ft){return ft==null?n:ft[He]}}function eE(He){return function(ft){return He==null?n:He[ft]}}function OL(He,ft,st,Kt,qn){return qn(He,function(Br,to,ni){st=Kt?(Kt=!1,Br):ft(st,Br,to,ni)}),st}function wee(He,ft){var st=He.length;for(He.sort(ft);st--;)He[st]=He[st].value;return He}function tE(He,ft){for(var st,Kt=-1,qn=He.length;++Kt<qn;){var Br=ft(He[Kt]);Br!==n&&(st=st===n?Br:st+Br)}return st}function nE(He,ft){for(var st=-1,Kt=Array(He);++st<He;)Kt[st]=ft(st);return Kt}function See(He,ft){return wi(ft,function(st){return[st,He[st]]})}function wL(He){return He&&He.slice(0,EL(He)+1).replace(Oi,"")}function hs(He){return function(ft){return He(ft)}}function rE(He,ft){return wi(ft,function(st){return He[st]})}function gv(He,ft){return He.has(ft)}function SL(He,ft){for(var st=-1,Kt=He.length;++st<Kt&&Pp(ft,He[st],0)>-1;);return st}function xL(He,ft){for(var st=He.length;st--&&Pp(ft,He[st],0)>-1;);return st}function xee(He,ft){for(var st=He.length,Kt=0;st--;)He[st]===ft&&++Kt;return Kt}var Cee=eE(lee),Eee=eE(uee);function Tee(He){return"\\"+dee[He]}function kee(He,ft){return He==null?n:He[ft]}function Ap(He){return iee.test(He)}function Pee(He){return oee.test(He)}function Aee(He){for(var ft,st=[];!(ft=He.next()).done;)st.push(ft.value);return st}function iE(He){var ft=-1,st=Array(He.size);return He.forEach(function(Kt,qn){st[++ft]=[qn,Kt]}),st}function CL(He,ft){return function(st){return He(ft(st))}}function pd(He,ft){for(var st=-1,Kt=He.length,qn=0,Br=[];++st<Kt;){var to=He[st];(to===ft||to===c)&&(He[st]=c,Br[qn++]=st)}return Br}function o_(He){var ft=-1,st=Array(He.size);return He.forEach(function(Kt){st[++ft]=Kt}),st}function Mee(He){var ft=-1,st=Array(He.size);return He.forEach(function(Kt){st[++ft]=[Kt,Kt]}),st}function Ree(He,ft,st){for(var Kt=st-1,qn=He.length;++Kt<qn;)if(He[Kt]===ft)return Kt;return-1}function $ee(He,ft,st){for(var Kt=st+1;Kt--;)if(He[Kt]===ft)return Kt;return Kt}function Mp(He){return Ap(He)?Dee(He):yee(He)}function $l(He){return Ap(He)?Lee(He):bee(He)}function EL(He){for(var ft=He.length;ft--&&Ml.test(He.charAt(ft)););return ft}var Nee=eE(cee);function Dee(He){for(var ft=qC.lastIndex=0;qC.test(He);)++ft;return ft}function Lee(He){return He.match(qC)||[]}function Iee(He){return He.match(ree)||[]}var Bee=function He(ft){ft=ft==null?To:Rp.defaults(To.Object(),ft,Rp.pick(To,aee));var st=ft.Array,Kt=ft.Date,qn=ft.Error,Br=ft.Function,to=ft.Math,ni=ft.Object,oE=ft.RegExp,Fee=ft.String,zs=ft.TypeError,a_=st.prototype,Vee=Br.prototype,$p=ni.prototype,s_=ft["__core-js_shared__"],l_=Vee.toString,Xr=$p.hasOwnProperty,jee=0,TL=function(){var v=/[^.]+$/.exec(s_&&s_.keys&&s_.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),u_=$p.toString,zee=l_.call(ni),Qee=To._,Hee=oE("^"+l_.call(Xr).replace(eo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),c_=cL?ft.Buffer:n,gd=ft.Symbol,d_=ft.Uint8Array,kL=c_?c_.allocUnsafe:n,f_=CL(ni.getPrototypeOf,ni),PL=ni.create,AL=$p.propertyIsEnumerable,h_=a_.splice,ML=gd?gd.isConcatSpreadable:n,mv=gd?gd.iterator:n,Zf=gd?gd.toStringTag:n,p_=function(){try{var v=th(ni,"defineProperty");return v({},"",{}),v}catch{}}(),Wee=ft.clearTimeout!==To.clearTimeout&&ft.clearTimeout,Uee=Kt&&Kt.now!==To.Date.now&&Kt.now,qee=ft.setTimeout!==To.setTimeout&&ft.setTimeout,g_=to.ceil,m_=to.floor,aE=ni.getOwnPropertySymbols,Yee=c_?c_.isBuffer:n,RL=ft.isFinite,Xee=a_.join,Zee=CL(ni.keys,ni),no=to.max,Yo=to.min,Gee=Kt.now,Kee=ft.parseInt,$L=to.random,Jee=a_.reverse,sE=th(ft,"DataView"),vv=th(ft,"Map"),lE=th(ft,"Promise"),Np=th(ft,"Set"),yv=th(ft,"WeakMap"),bv=th(ni,"create"),v_=yv&&new yv,Dp={},ete=nh(sE),tte=nh(vv),nte=nh(lE),rte=nh(Np),ite=nh(yv),y_=gd?gd.prototype:n,_v=y_?y_.valueOf:n,NL=y_?y_.toString:n;function he(v){if(Ai(v)&&!Yn(v)&&!(v instanceof Or)){if(v instanceof Qs)return v;if(Xr.call(v,"__wrapped__"))return DI(v)}return new Qs(v)}var Lp=function(){function v(){}return function(_){if(!ki(_))return{};if(PL)return PL(_);v.prototype=_;var k=new v;return v.prototype=n,k}}();function b_(){}function Qs(v,_){this.__wrapped__=v,this.__actions__=[],this.__chain__=!!_,this.__index__=0,this.__values__=n}he.templateSettings={escape:Ze,evaluate:Rt,interpolate:xn,variable:"",imports:{_:he}},he.prototype=b_.prototype,he.prototype.constructor=he,Qs.prototype=Lp(b_.prototype),Qs.prototype.constructor=Qs;function Or(v){this.__wrapped__=v,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function ote(){var v=new Or(this.__wrapped__);return v.__actions__=Na(this.__actions__),v.__dir__=this.__dir__,v.__filtered__=this.__filtered__,v.__iteratees__=Na(this.__iteratees__),v.__takeCount__=this.__takeCount__,v.__views__=Na(this.__views__),v}function ate(){if(this.__filtered__){var v=new Or(this);v.__dir__=-1,v.__filtered__=!0}else v=this.clone(),v.__dir__*=-1;return v}function ste(){var v=this.__wrapped__.value(),_=this.__dir__,k=Yn(v),H=_<0,ne=k?v.length:0,ye=bne(0,ne,this.__views__),Ne=ye.start,Fe=ye.end,Ue=Fe-Ne,vt=H?Fe:Ne-1,bt=this.__iteratees__,Ct=bt.length,Qt=0,vn=Yo(Ue,this.__takeCount__);if(!k||!H&&ne==Ue&&vn==Ue)return iI(v,this.__actions__);var $n=[];e:for(;Ue--&&Qt<vn;){vt+=_;for(var or=-1,Nn=v[vt];++or<Ct;){var mr=bt[or],xr=mr.iteratee,ms=mr.type,pa=xr(Nn);if(ms==L)Nn=pa;else if(!pa){if(ms==W)continue e;break e}}$n[Qt++]=Nn}return $n}Or.prototype=Lp(b_.prototype),Or.prototype.constructor=Or;function Gf(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_<k;){var H=v[_];this.set(H[0],H[1])}}function lte(){this.__data__=bv?bv(null):{},this.size=0}function ute(v){var _=this.has(v)&&delete this.__data__[v];return this.size-=_?1:0,_}function cte(v){var _=this.__data__;if(bv){var k=_[v];return k===l?n:k}return Xr.call(_,v)?_[v]:n}function dte(v){var _=this.__data__;return bv?_[v]!==n:Xr.call(_,v)}function fte(v,_){var k=this.__data__;return this.size+=this.has(v)?0:1,k[v]=bv&&_===n?l:_,this}Gf.prototype.clear=lte,Gf.prototype.delete=ute,Gf.prototype.get=cte,Gf.prototype.has=dte,Gf.prototype.set=fte;function bc(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_<k;){var H=v[_];this.set(H[0],H[1])}}function hte(){this.__data__=[],this.size=0}function pte(v){var _=this.__data__,k=__(_,v);if(k<0)return!1;var H=_.length-1;return k==H?_.pop():h_.call(_,k,1),--this.size,!0}function gte(v){var _=this.__data__,k=__(_,v);return k<0?n:_[k][1]}function mte(v){return __(this.__data__,v)>-1}function vte(v,_){var k=this.__data__,H=__(k,v);return H<0?(++this.size,k.push([v,_])):k[H][1]=_,this}bc.prototype.clear=hte,bc.prototype.delete=pte,bc.prototype.get=gte,bc.prototype.has=mte,bc.prototype.set=vte;function _c(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_<k;){var H=v[_];this.set(H[0],H[1])}}function yte(){this.size=0,this.__data__={hash:new Gf,map:new(vv||bc),string:new Gf}}function bte(v){var _=R_(this,v).delete(v);return this.size-=_?1:0,_}function _te(v){return R_(this,v).get(v)}function Ote(v){return R_(this,v).has(v)}function wte(v,_){var k=R_(this,v),H=k.size;return k.set(v,_),this.size+=k.size==H?0:1,this}_c.prototype.clear=yte,_c.prototype.delete=bte,_c.prototype.get=_te,_c.prototype.has=Ote,_c.prototype.set=wte;function Kf(v){var _=-1,k=v==null?0:v.length;for(this.__data__=new _c;++_<k;)this.add(v[_])}function Ste(v){return this.__data__.set(v,l),this}function xte(v){return this.__data__.has(v)}Kf.prototype.add=Kf.prototype.push=Ste,Kf.prototype.has=xte;function Nl(v){var _=this.__data__=new bc(v);this.size=_.size}function Cte(){this.__data__=new bc,this.size=0}function Ete(v){var _=this.__data__,k=_.delete(v);return this.size=_.size,k}function Tte(v){return this.__data__.get(v)}function kte(v){return this.__data__.has(v)}function Pte(v,_){var k=this.__data__;if(k instanceof bc){var H=k.__data__;if(!vv||H.length<i-1)return H.push([v,_]),this.size=++k.size,this;k=this.__data__=new _c(H)}return k.set(v,_),this.size=k.size,this}Nl.prototype.clear=Cte,Nl.prototype.delete=Ete,Nl.prototype.get=Tte,Nl.prototype.has=kte,Nl.prototype.set=Pte;function DL(v,_){var k=Yn(v),H=!k&&rh(v),ne=!k&&!H&&_d(v),ye=!k&&!H&&!ne&&Vp(v),Ne=k||H||ne||ye,Fe=Ne?nE(v.length,Fee):[],Ue=Fe.length;for(var vt in v)(_||Xr.call(v,vt))&&!(Ne&&(vt=="length"||ne&&(vt=="offset"||vt=="parent")||ye&&(vt=="buffer"||vt=="byteLength"||vt=="byteOffset")||xc(vt,Ue)))&&Fe.push(vt);return Fe}function LL(v){var _=v.length;return _?v[bE(0,_-1)]:n}function Ate(v,_){return $_(Na(v),Jf(_,0,v.length))}function Mte(v){return $_(Na(v))}function uE(v,_,k){(k!==n&&!Dl(v[_],k)||k===n&&!(_ in v))&&Oc(v,_,k)}function Ov(v,_,k){var H=v[_];(!(Xr.call(v,_)&&Dl(H,k))||k===n&&!(_ in v))&&Oc(v,_,k)}function __(v,_){for(var k=v.length;k--;)if(Dl(v[k][0],_))return k;return-1}function Rte(v,_,k,H){return md(v,function(ne,ye,Ne){_(H,ne,k(ne),Ne)}),H}function IL(v,_){return v&&_u(_,go(_),v)}function $te(v,_){return v&&_u(_,La(_),v)}function Oc(v,_,k){_=="__proto__"&&p_?p_(v,_,{configurable:!0,enumerable:!0,value:k,writable:!0}):v[_]=k}function cE(v,_){for(var k=-1,H=_.length,ne=st(H),ye=v==null;++k<H;)ne[k]=ye?n:HE(v,_[k]);return ne}function Jf(v,_,k){return v===v&&(k!==n&&(v=v<=k?v:k),_!==n&&(v=v>=_?v:_)),v}function Hs(v,_,k,H,ne,ye){var Ne,Fe=_&d,Ue=_&f,vt=_&h;if(k&&(Ne=ne?k(v,H,ne,ye):k(v)),Ne!==n)return Ne;if(!ki(v))return v;var bt=Yn(v);if(bt){if(Ne=One(v),!Fe)return Na(v,Ne)}else{var Ct=Xo(v),Qt=Ct==Z||Ct==ce;if(_d(v))return sI(v,Fe);if(Ct==me||Ct==ke||Qt&&!ne){if(Ne=Ue||Qt?{}:EI(v),!Fe)return Ue?cne(v,$te(Ne,v)):une(v,IL(Ne,v))}else{if(!li[Ct])return ne?v:{};Ne=wne(v,Ct,Fe)}}ye||(ye=new Nl);var vn=ye.get(v);if(vn)return vn;ye.set(v,Ne),t3(v)?v.forEach(function(Nn){Ne.add(Hs(Nn,_,k,Nn,v,ye))}):JI(v)&&v.forEach(function(Nn,mr){Ne.set(mr,Hs(Nn,_,k,mr,v,ye))});var $n=vt?Ue?AE:PE:Ue?La:go,or=bt?n:$n(v);return js(or||v,function(Nn,mr){or&&(mr=Nn,Nn=v[mr]),Ov(Ne,mr,Hs(Nn,_,k,mr,v,ye))}),Ne}function Nte(v){var _=go(v);return function(k){return BL(k,v,_)}}function BL(v,_,k){var H=k.length;if(v==null)return!H;for(v=ni(v);H--;){var ne=k[H],ye=_[ne],Ne=v[ne];if(Ne===n&&!(ne in v)||!ye(Ne))return!1}return!0}function FL(v,_,k){if(typeof v!="function")throw new zs(a);return kv(function(){v.apply(n,k)},_)}function wv(v,_,k,H){var ne=-1,ye=r_,Ne=!0,Fe=v.length,Ue=[],vt=_.length;if(!Fe)return Ue;k&&(_=wi(_,hs(k))),H?(ye=ZC,Ne=!1):_.length>=i&&(ye=gv,Ne=!1,_=new Kf(_));e:for(;++ne<Fe;){var bt=v[ne],Ct=k==null?bt:k(bt);if(bt=H||bt!==0?bt:0,Ne&&Ct===Ct){for(var Qt=vt;Qt--;)if(_[Qt]===Ct)continue e;Ue.push(bt)}else ye(_,Ct,H)||Ue.push(bt)}return Ue}var md=fI(bu),VL=fI(fE,!0);function Dte(v,_){var k=!0;return md(v,function(H,ne,ye){return k=!!_(H,ne,ye),k}),k}function O_(v,_,k){for(var H=-1,ne=v.length;++H<ne;){var ye=v[H],Ne=_(ye);if(Ne!=null&&(Fe===n?Ne===Ne&&!gs(Ne):k(Ne,Fe)))var Fe=Ne,Ue=ye}return Ue}function Lte(v,_,k,H){var ne=v.length;for(k=nr(k),k<0&&(k=-k>ne?0:ne+k),H=H===n||H>ne?ne:nr(H),H<0&&(H+=ne),H=k>H?0:r3(H);k<H;)v[k++]=_;return v}function jL(v,_){var k=[];return md(v,function(H,ne,ye){_(H,ne,ye)&&k.push(H)}),k}function ko(v,_,k,H,ne){var ye=-1,Ne=v.length;for(k||(k=xne),ne||(ne=[]);++ye<Ne;){var Fe=v[ye];_>0&&k(Fe)?_>1?ko(Fe,_-1,k,H,ne):hd(ne,Fe):H||(ne[ne.length]=Fe)}return ne}var dE=hI(),zL=hI(!0);function bu(v,_){return v&&dE(v,_,go)}function fE(v,_){return v&&zL(v,_,go)}function w_(v,_){return fd(_,function(k){return Cc(v[k])})}function eh(v,_){_=yd(_,v);for(var k=0,H=_.length;v!=null&&k<H;)v=v[Ou(_[k++])];return k&&k==H?v:n}function QL(v,_,k){var H=_(v);return Yn(v)?H:hd(H,k(v))}function fa(v){return v==null?v===n?Ee:ae:Zf&&Zf in ni(v)?yne(v):Mne(v)}function hE(v,_){return v>_}function Ite(v,_){return v!=null&&Xr.call(v,_)}function Bte(v,_){return v!=null&&_ in ni(v)}function Fte(v,_,k){return v>=Yo(_,k)&&v<no(_,k)}function pE(v,_,k){for(var H=k?ZC:r_,ne=v[0].length,ye=v.length,Ne=ye,Fe=st(ye),Ue=1/0,vt=[];Ne--;){var bt=v[Ne];Ne&&_&&(bt=wi(bt,hs(_))),Ue=Yo(bt.length,Ue),Fe[Ne]=!k&&(_||ne>=120&&bt.length>=120)?new Kf(Ne&&bt):n}bt=v[0];var Ct=-1,Qt=Fe[0];e:for(;++Ct<ne&&vt.length<Ue;){var vn=bt[Ct],$n=_?_(vn):vn;if(vn=k||vn!==0?vn:0,!(Qt?gv(Qt,$n):H(vt,$n,k))){for(Ne=ye;--Ne;){var or=Fe[Ne];if(!(or?gv(or,$n):H(v[Ne],$n,k)))continue e}Qt&&Qt.push($n),vt.push(vn)}}return vt}function Vte(v,_,k,H){return bu(v,function(ne,ye,Ne){_(H,k(ne),ye,Ne)}),H}function Sv(v,_,k){_=yd(_,v),v=AI(v,_);var H=v==null?v:v[Ou(Us(_))];return H==null?n:fs(H,v,k)}function HL(v){return Ai(v)&&fa(v)==ke}function jte(v){return Ai(v)&&fa(v)==Xe}function zte(v){return Ai(v)&&fa(v)==ge}function xv(v,_,k,H,ne){return v===_?!0:v==null||_==null||!Ai(v)&&!Ai(_)?v!==v&&_!==_:Qte(v,_,k,H,xv,ne)}function Qte(v,_,k,H,ne,ye){var Ne=Yn(v),Fe=Yn(_),Ue=Ne?Y:Xo(v),vt=Fe?Y:Xo(_);Ue=Ue==ke?me:Ue,vt=vt==ke?me:vt;var bt=Ue==me,Ct=vt==me,Qt=Ue==vt;if(Qt&&_d(v)){if(!_d(_))return!1;Ne=!0,bt=!1}if(Qt&&!bt)return ye||(ye=new Nl),Ne||Vp(v)?SI(v,_,k,H,ne,ye):mne(v,_,Ue,k,H,ne,ye);if(!(k&m)){var vn=bt&&Xr.call(v,"__wrapped__"),$n=Ct&&Xr.call(_,"__wrapped__");if(vn||$n){var or=vn?v.value():v,Nn=$n?_.value():_;return ye||(ye=new Nl),ne(or,Nn,k,H,ye)}}return Qt?(ye||(ye=new Nl),vne(v,_,k,H,ne,ye)):!1}function Hte(v){return Ai(v)&&Xo(v)==Te}function gE(v,_,k,H){var ne=k.length,ye=ne,Ne=!H;if(v==null)return!ye;for(v=ni(v);ne--;){var Fe=k[ne];if(Ne&&Fe[2]?Fe[1]!==v[Fe[0]]:!(Fe[0]in v))return!1}for(;++ne<ye;){Fe=k[ne];var Ue=Fe[0],vt=v[Ue],bt=Fe[1];if(Ne&&Fe[2]){if(vt===n&&!(Ue in v))return!1}else{var Ct=new Nl;if(H)var Qt=H(vt,bt,Ue,v,_,Ct);if(!(Qt===n?xv(bt,vt,m|g,H,Ct):Qt))return!1}}return!0}function WL(v){if(!ki(v)||Ene(v))return!1;var _=Cc(v)?Hee:po;return _.test(nh(v))}function Wte(v){return Ai(v)&&fa(v)==ee}function Ute(v){return Ai(v)&&Xo(v)==le}function qte(v){return Ai(v)&&F_(v.length)&&!!gi[fa(v)]}function UL(v){return typeof v=="function"?v:v==null?Ia:typeof v=="object"?Yn(v)?XL(v[0],v[1]):YL(v):p3(v)}function mE(v){if(!Tv(v))return Zee(v);var _=[];for(var k in ni(v))Xr.call(v,k)&&k!="constructor"&&_.push(k);return _}function Yte(v){if(!ki(v))return Ane(v);var _=Tv(v),k=[];for(var H in v)H=="constructor"&&(_||!Xr.call(v,H))||k.push(H);return k}function vE(v,_){return v<_}function qL(v,_){var k=-1,H=Da(v)?st(v.length):[];return md(v,function(ne,ye,Ne){H[++k]=_(ne,ye,Ne)}),H}function YL(v){var _=RE(v);return _.length==1&&_[0][2]?kI(_[0][0],_[0][1]):function(k){return k===v||gE(k,v,_)}}function XL(v,_){return NE(v)&&TI(_)?kI(Ou(v),_):function(k){var H=HE(k,v);return H===n&&H===_?WE(k,v):xv(_,H,m|g)}}function S_(v,_,k,H,ne){v!==_&&dE(_,function(ye,Ne){if(ne||(ne=new Nl),ki(ye))Xte(v,_,Ne,k,S_,H,ne);else{var Fe=H?H(LE(v,Ne),ye,Ne+"",v,_,ne):n;Fe===n&&(Fe=ye),uE(v,Ne,Fe)}},La)}function Xte(v,_,k,H,ne,ye,Ne){var Fe=LE(v,k),Ue=LE(_,k),vt=Ne.get(Ue);if(vt){uE(v,k,vt);return}var bt=ye?ye(Fe,Ue,k+"",v,_,Ne):n,Ct=bt===n;if(Ct){var Qt=Yn(Ue),vn=!Qt&&_d(Ue),$n=!Qt&&!vn&&Vp(Ue);bt=Ue,Qt||vn||$n?Yn(Fe)?bt=Fe:Ii(Fe)?bt=Na(Fe):vn?(Ct=!1,bt=sI(Ue,!0)):$n?(Ct=!1,bt=lI(Ue,!0)):bt=[]:Pv(Ue)||rh(Ue)?(bt=Fe,rh(Fe)?bt=i3(Fe):(!ki(Fe)||Cc(Fe))&&(bt=EI(Ue))):Ct=!1}Ct&&(Ne.set(Ue,bt),ne(bt,Ue,H,ye,Ne),Ne.delete(Ue)),uE(v,k,bt)}function ZL(v,_){var k=v.length;if(!!k)return _+=_<0?k:0,xc(_,k)?v[_]:n}function GL(v,_,k){_.length?_=wi(_,function(ye){return Yn(ye)?function(Ne){return eh(Ne,ye.length===1?ye[0]:ye)}:ye}):_=[Ia];var H=-1;_=wi(_,hs(Pn()));var ne=qL(v,function(ye,Ne,Fe){var Ue=wi(_,function(vt){return vt(ye)});return{criteria:Ue,index:++H,value:ye}});return wee(ne,function(ye,Ne){return lne(ye,Ne,k)})}function Zte(v,_){return KL(v,_,function(k,H){return WE(v,H)})}function KL(v,_,k){for(var H=-1,ne=_.length,ye={};++H<ne;){var Ne=_[H],Fe=eh(v,Ne);k(Fe,Ne)&&Cv(ye,yd(Ne,v),Fe)}return ye}function Gte(v){return function(_){return eh(_,v)}}function yE(v,_,k,H){var ne=H?Oee:Pp,ye=-1,Ne=_.length,Fe=v;for(v===_&&(_=Na(_)),k&&(Fe=wi(v,hs(k)));++ye<Ne;)for(var Ue=0,vt=_[ye],bt=k?k(vt):vt;(Ue=ne(Fe,bt,Ue,H))>-1;)Fe!==v&&h_.call(Fe,Ue,1),h_.call(v,Ue,1);return v}function JL(v,_){for(var k=v?_.length:0,H=k-1;k--;){var ne=_[k];if(k==H||ne!==ye){var ye=ne;xc(ne)?h_.call(v,ne,1):wE(v,ne)}}return v}function bE(v,_){return v+m_($L()*(_-v+1))}function Kte(v,_,k,H){for(var ne=-1,ye=no(g_((_-v)/(k||1)),0),Ne=st(ye);ye--;)Ne[H?ye:++ne]=v,v+=k;return Ne}function _E(v,_){var k="";if(!v||_<1||_>Q)return k;do _%2&&(k+=v),_=m_(_/2),_&&(v+=v);while(_);return k}function ar(v,_){return IE(PI(v,_,Ia),v+"")}function Jte(v){return LL(jp(v))}function ene(v,_){var k=jp(v);return $_(k,Jf(_,0,k.length))}function Cv(v,_,k,H){if(!ki(v))return v;_=yd(_,v);for(var ne=-1,ye=_.length,Ne=ye-1,Fe=v;Fe!=null&&++ne<ye;){var Ue=Ou(_[ne]),vt=k;if(Ue==="__proto__"||Ue==="constructor"||Ue==="prototype")return v;if(ne!=Ne){var bt=Fe[Ue];vt=H?H(bt,Ue,Fe):n,vt===n&&(vt=ki(bt)?bt:xc(_[ne+1])?[]:{})}Ov(Fe,Ue,vt),Fe=Fe[Ue]}return v}var eI=v_?function(v,_){return v_.set(v,_),v}:Ia,tne=p_?function(v,_){return p_(v,"toString",{configurable:!0,enumerable:!1,value:qE(_),writable:!0})}:Ia;function nne(v){return $_(jp(v))}function Ws(v,_,k){var H=-1,ne=v.length;_<0&&(_=-_>ne?0:ne+_),k=k>ne?ne:k,k<0&&(k+=ne),ne=_>k?0:k-_>>>0,_>>>=0;for(var ye=st(ne);++H<ne;)ye[H]=v[H+_];return ye}function rne(v,_){var k;return md(v,function(H,ne,ye){return k=_(H,ne,ye),!k}),!!k}function x_(v,_,k){var H=0,ne=v==null?H:v.length;if(typeof _=="number"&&_===_&&ne<=oe){for(;H<ne;){var ye=H+ne>>>1,Ne=v[ye];Ne!==null&&!gs(Ne)&&(k?Ne<=_:Ne<_)?H=ye+1:ne=ye}return ne}return OE(v,_,Ia,k)}function OE(v,_,k,H){var ne=0,ye=v==null?0:v.length;if(ye===0)return 0;_=k(_);for(var Ne=_!==_,Fe=_===null,Ue=gs(_),vt=_===n;ne<ye;){var bt=m_((ne+ye)/2),Ct=k(v[bt]),Qt=Ct!==n,vn=Ct===null,$n=Ct===Ct,or=gs(Ct);if(Ne)var Nn=H||$n;else vt?Nn=$n&&(H||Qt):Fe?Nn=$n&&Qt&&(H||!vn):Ue?Nn=$n&&Qt&&!vn&&(H||!or):vn||or?Nn=!1:Nn=H?Ct<=_:Ct<_;Nn?ne=bt+1:ye=bt}return Yo(ye,ie)}function tI(v,_){for(var k=-1,H=v.length,ne=0,ye=[];++k<H;){var Ne=v[k],Fe=_?_(Ne):Ne;if(!k||!Dl(Fe,Ue)){var Ue=Fe;ye[ne++]=Ne===0?0:Ne}}return ye}function nI(v){return typeof v=="number"?v:gs(v)?q:+v}function ps(v){if(typeof v=="string")return v;if(Yn(v))return wi(v,ps)+"";if(gs(v))return NL?NL.call(v):"";var _=v+"";return _=="0"&&1/v==-U?"-0":_}function vd(v,_,k){var H=-1,ne=r_,ye=v.length,Ne=!0,Fe=[],Ue=Fe;if(k)Ne=!1,ne=ZC;else if(ye>=i){var vt=_?null:pne(v);if(vt)return o_(vt);Ne=!1,ne=gv,Ue=new Kf}else Ue=_?[]:Fe;e:for(;++H<ye;){var bt=v[H],Ct=_?_(bt):bt;if(bt=k||bt!==0?bt:0,Ne&&Ct===Ct){for(var Qt=Ue.length;Qt--;)if(Ue[Qt]===Ct)continue e;_&&Ue.push(Ct),Fe.push(bt)}else ne(Ue,Ct,k)||(Ue!==Fe&&Ue.push(Ct),Fe.push(bt))}return Fe}function wE(v,_){return _=yd(_,v),v=AI(v,_),v==null||delete v[Ou(Us(_))]}function rI(v,_,k,H){return Cv(v,_,k(eh(v,_)),H)}function C_(v,_,k,H){for(var ne=v.length,ye=H?ne:-1;(H?ye--:++ye<ne)&&_(v[ye],ye,v););return k?Ws(v,H?0:ye,H?ye+1:ne):Ws(v,H?ye+1:0,H?ne:ye)}function iI(v,_){var k=v;return k instanceof Or&&(k=k.value()),GC(_,function(H,ne){return ne.func.apply(ne.thisArg,hd([H],ne.args))},k)}function SE(v,_,k){var H=v.length;if(H<2)return H?vd(v[0]):[];for(var ne=-1,ye=st(H);++ne<H;)for(var Ne=v[ne],Fe=-1;++Fe<H;)Fe!=ne&&(ye[ne]=wv(ye[ne]||Ne,v[Fe],_,k));return vd(ko(ye,1),_,k)}function oI(v,_,k){for(var H=-1,ne=v.length,ye=_.length,Ne={};++H<ne;){var Fe=H<ye?_[H]:n;k(Ne,v[H],Fe)}return Ne}function xE(v){return Ii(v)?v:[]}function CE(v){return typeof v=="function"?v:Ia}function yd(v,_){return Yn(v)?v:NE(v,_)?[v]:NI(zr(v))}var ine=ar;function bd(v,_,k){var H=v.length;return k=k===n?H:k,!_&&k>=H?v:Ws(v,_,k)}var aI=Wee||function(v){return To.clearTimeout(v)};function sI(v,_){if(_)return v.slice();var k=v.length,H=kL?kL(k):new v.constructor(k);return v.copy(H),H}function EE(v){var _=new v.constructor(v.byteLength);return new d_(_).set(new d_(v)),_}function one(v,_){var k=_?EE(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.byteLength)}function ane(v){var _=new v.constructor(v.source,Li.exec(v));return _.lastIndex=v.lastIndex,_}function sne(v){return _v?ni(_v.call(v)):{}}function lI(v,_){var k=_?EE(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.length)}function uI(v,_){if(v!==_){var k=v!==n,H=v===null,ne=v===v,ye=gs(v),Ne=_!==n,Fe=_===null,Ue=_===_,vt=gs(_);if(!Fe&&!vt&&!ye&&v>_||ye&&Ne&&Ue&&!Fe&&!vt||H&&Ne&&Ue||!k&&Ue||!ne)return 1;if(!H&&!ye&&!vt&&v<_||vt&&k&&ne&&!H&&!ye||Fe&&k&&ne||!Ne&&ne||!Ue)return-1}return 0}function lne(v,_,k){for(var H=-1,ne=v.criteria,ye=_.criteria,Ne=ne.length,Fe=k.length;++H<Ne;){var Ue=uI(ne[H],ye[H]);if(Ue){if(H>=Fe)return Ue;var vt=k[H];return Ue*(vt=="desc"?-1:1)}}return v.index-_.index}function cI(v,_,k,H){for(var ne=-1,ye=v.length,Ne=k.length,Fe=-1,Ue=_.length,vt=no(ye-Ne,0),bt=st(Ue+vt),Ct=!H;++Fe<Ue;)bt[Fe]=_[Fe];for(;++ne<Ne;)(Ct||ne<ye)&&(bt[k[ne]]=v[ne]);for(;vt--;)bt[Fe++]=v[ne++];return bt}function dI(v,_,k,H){for(var ne=-1,ye=v.length,Ne=-1,Fe=k.length,Ue=-1,vt=_.length,bt=no(ye-Fe,0),Ct=st(bt+vt),Qt=!H;++ne<bt;)Ct[ne]=v[ne];for(var vn=ne;++Ue<vt;)Ct[vn+Ue]=_[Ue];for(;++Ne<Fe;)(Qt||ne<ye)&&(Ct[vn+k[Ne]]=v[ne++]);return Ct}function Na(v,_){var k=-1,H=v.length;for(_||(_=st(H));++k<H;)_[k]=v[k];return _}function _u(v,_,k,H){var ne=!k;k||(k={});for(var ye=-1,Ne=_.length;++ye<Ne;){var Fe=_[ye],Ue=H?H(k[Fe],v[Fe],Fe,k,v):n;Ue===n&&(Ue=v[Fe]),ne?Oc(k,Fe,Ue):Ov(k,Fe,Ue)}return k}function une(v,_){return _u(v,$E(v),_)}function cne(v,_){return _u(v,xI(v),_)}function E_(v,_){return function(k,H){var ne=Yn(k)?gee:Rte,ye=_?_():{};return ne(k,v,Pn(H,2),ye)}}function Ip(v){return ar(function(_,k){var H=-1,ne=k.length,ye=ne>1?k[ne-1]:n,Ne=ne>2?k[2]:n;for(ye=v.length>3&&typeof ye=="function"?(ne--,ye):n,Ne&&ha(k[0],k[1],Ne)&&(ye=ne<3?n:ye,ne=1),_=ni(_);++H<ne;){var Fe=k[H];Fe&&v(_,Fe,H,ye)}return _})}function fI(v,_){return function(k,H){if(k==null)return k;if(!Da(k))return v(k,H);for(var ne=k.length,ye=_?ne:-1,Ne=ni(k);(_?ye--:++ye<ne)&&H(Ne[ye],ye,Ne)!==!1;);return k}}function hI(v){return function(_,k,H){for(var ne=-1,ye=ni(_),Ne=H(_),Fe=Ne.length;Fe--;){var Ue=Ne[v?Fe:++ne];if(k(ye[Ue],Ue,ye)===!1)break}return _}}function dne(v,_,k){var H=_&y,ne=Ev(v);function ye(){var Ne=this&&this!==To&&this instanceof ye?ne:v;return Ne.apply(H?k:this,arguments)}return ye}function pI(v){return function(_){_=zr(_);var k=Ap(_)?$l(_):n,H=k?k[0]:_.charAt(0),ne=k?bd(k,1).join(""):_.slice(1);return H[v]()+ne}}function Bp(v){return function(_){return GC(f3(d3(_).replace(tee,"")),v,"")}}function Ev(v){return function(){var _=arguments;switch(_.length){case 0:return new v;case 1:return new v(_[0]);case 2:return new v(_[0],_[1]);case 3:return new v(_[0],_[1],_[2]);case 4:return new v(_[0],_[1],_[2],_[3]);case 5:return new v(_[0],_[1],_[2],_[3],_[4]);case 6:return new v(_[0],_[1],_[2],_[3],_[4],_[5]);case 7:return new v(_[0],_[1],_[2],_[3],_[4],_[5],_[6])}var k=Lp(v.prototype),H=v.apply(k,_);return ki(H)?H:k}}function fne(v,_,k){var H=Ev(v);function ne(){for(var ye=arguments.length,Ne=st(ye),Fe=ye,Ue=Fp(ne);Fe--;)Ne[Fe]=arguments[Fe];var vt=ye<3&&Ne[0]!==Ue&&Ne[ye-1]!==Ue?[]:pd(Ne,Ue);if(ye-=vt.length,ye<k)return bI(v,_,T_,ne.placeholder,n,Ne,vt,n,n,k-ye);var bt=this&&this!==To&&this instanceof ne?H:v;return fs(bt,this,Ne)}return ne}function gI(v){return function(_,k,H){var ne=ni(_);if(!Da(_)){var ye=Pn(k,3);_=go(_),k=function(Fe){return ye(ne[Fe],Fe,ne)}}var Ne=v(_,k,H);return Ne>-1?ne[ye?_[Ne]:Ne]:n}}function mI(v){return Sc(function(_){var k=_.length,H=k,ne=Qs.prototype.thru;for(v&&_.reverse();H--;){var ye=_[H];if(typeof ye!="function")throw new zs(a);if(ne&&!Ne&&M_(ye)=="wrapper")var Ne=new Qs([],!0)}for(H=Ne?H:k;++H<k;){ye=_[H];var Fe=M_(ye),Ue=Fe=="wrapper"?ME(ye):n;Ue&&DE(Ue[0])&&Ue[1]==(E|O|x|T)&&!Ue[4].length&&Ue[9]==1?Ne=Ne[M_(Ue[0])].apply(Ne,Ue[3]):Ne=ye.length==1&&DE(ye)?Ne[Fe]():Ne.thru(ye)}return function(){var vt=arguments,bt=vt[0];if(Ne&&vt.length==1&&Yn(bt))return Ne.plant(bt).value();for(var Ct=0,Qt=k?_[Ct].apply(this,vt):bt;++Ct<k;)Qt=_[Ct].call(this,Qt);return Qt}})}function T_(v,_,k,H,ne,ye,Ne,Fe,Ue,vt){var bt=_&E,Ct=_&y,Qt=_&b,vn=_&(O|S),$n=_&P,or=Qt?n:Ev(v);function Nn(){for(var mr=arguments.length,xr=st(mr),ms=mr;ms--;)xr[ms]=arguments[ms];if(vn)var pa=Fp(Nn),vs=xee(xr,pa);if(H&&(xr=cI(xr,H,ne,vn)),ye&&(xr=dI(xr,ye,Ne,vn)),mr-=vs,vn&&mr<vt){var Bi=pd(xr,pa);return bI(v,_,T_,Nn.placeholder,k,xr,Bi,Fe,Ue,vt-mr)}var Ll=Ct?k:this,Tc=Qt?Ll[v]:v;return mr=xr.length,Fe?xr=Rne(xr,Fe):$n&&mr>1&&xr.reverse(),bt&&Ue<mr&&(xr.length=Ue),this&&this!==To&&this instanceof Nn&&(Tc=or||Ev(Tc)),Tc.apply(Ll,xr)}return Nn}function vI(v,_){return function(k,H){return Vte(k,v,_(H),{})}}function k_(v,_){return function(k,H){var ne;if(k===n&&H===n)return _;if(k!==n&&(ne=k),H!==n){if(ne===n)return H;typeof k=="string"||typeof H=="string"?(k=ps(k),H=ps(H)):(k=nI(k),H=nI(H)),ne=v(k,H)}return ne}}function TE(v){return Sc(function(_){return _=wi(_,hs(Pn())),ar(function(k){var H=this;return v(_,function(ne){return fs(ne,H,k)})})})}function P_(v,_){_=_===n?" ":ps(_);var k=_.length;if(k<2)return k?_E(_,v):_;var H=_E(_,g_(v/Mp(_)));return Ap(_)?bd($l(H),0,v).join(""):H.slice(0,v)}function hne(v,_,k,H){var ne=_&y,ye=Ev(v);function Ne(){for(var Fe=-1,Ue=arguments.length,vt=-1,bt=H.length,Ct=st(bt+Ue),Qt=this&&this!==To&&this instanceof Ne?ye:v;++vt<bt;)Ct[vt]=H[vt];for(;Ue--;)Ct[vt++]=arguments[++Fe];return fs(Qt,ne?k:this,Ct)}return Ne}function yI(v){return function(_,k,H){return H&&typeof H!="number"&&ha(_,k,H)&&(k=H=n),_=Ec(_),k===n?(k=_,_=0):k=Ec(k),H=H===n?_<k?1:-1:Ec(H),Kte(_,k,H,v)}}function A_(v){return function(_,k){return typeof _=="string"&&typeof k=="string"||(_=qs(_),k=qs(k)),v(_,k)}}function bI(v,_,k,H,ne,ye,Ne,Fe,Ue,vt){var bt=_&O,Ct=bt?Ne:n,Qt=bt?n:Ne,vn=bt?ye:n,$n=bt?n:ye;_|=bt?x:C,_&=~(bt?C:x),_&w||(_&=~(y|b));var or=[v,_,ne,vn,Ct,$n,Qt,Fe,Ue,vt],Nn=k.apply(n,or);return DE(v)&&MI(Nn,or),Nn.placeholder=H,RI(Nn,v,_)}function kE(v){var _=to[v];return function(k,H){if(k=qs(k),H=H==null?0:Yo(nr(H),292),H&&RL(k)){var ne=(zr(k)+"e").split("e"),ye=_(ne[0]+"e"+(+ne[1]+H));return ne=(zr(ye)+"e").split("e"),+(ne[0]+"e"+(+ne[1]-H))}return _(k)}}var pne=Np&&1/o_(new Np([,-0]))[1]==U?function(v){return new Np(v)}:ZE;function _I(v){return function(_){var k=Xo(_);return k==Te?iE(_):k==le?Mee(_):See(_,v(_))}}function wc(v,_,k,H,ne,ye,Ne,Fe){var Ue=_&b;if(!Ue&&typeof v!="function")throw new zs(a);var vt=H?H.length:0;if(vt||(_&=~(x|C),H=ne=n),Ne=Ne===n?Ne:no(nr(Ne),0),Fe=Fe===n?Fe:nr(Fe),vt-=ne?ne.length:0,_&C){var bt=H,Ct=ne;H=ne=n}var Qt=Ue?n:ME(v),vn=[v,_,k,H,ne,bt,Ct,ye,Ne,Fe];if(Qt&&Pne(vn,Qt),v=vn[0],_=vn[1],k=vn[2],H=vn[3],ne=vn[4],Fe=vn[9]=vn[9]===n?Ue?0:v.length:no(vn[9]-vt,0),!Fe&&_&(O|S)&&(_&=~(O|S)),!_||_==y)var $n=dne(v,_,k);else _==O||_==S?$n=fne(v,_,Fe):(_==x||_==(y|x))&&!ne.length?$n=hne(v,_,k,H):$n=T_.apply(n,vn);var or=Qt?eI:MI;return RI(or($n,vn),v,_)}function OI(v,_,k,H){return v===n||Dl(v,$p[k])&&!Xr.call(H,k)?_:v}function wI(v,_,k,H,ne,ye){return ki(v)&&ki(_)&&(ye.set(_,v),S_(v,_,n,wI,ye),ye.delete(_)),v}function gne(v){return Pv(v)?n:v}function SI(v,_,k,H,ne,ye){var Ne=k&m,Fe=v.length,Ue=_.length;if(Fe!=Ue&&!(Ne&&Ue>Fe))return!1;var vt=ye.get(v),bt=ye.get(_);if(vt&&bt)return vt==_&&bt==v;var Ct=-1,Qt=!0,vn=k&g?new Kf:n;for(ye.set(v,_),ye.set(_,v);++Ct<Fe;){var $n=v[Ct],or=_[Ct];if(H)var Nn=Ne?H(or,$n,Ct,_,v,ye):H($n,or,Ct,v,_,ye);if(Nn!==n){if(Nn)continue;Qt=!1;break}if(vn){if(!KC(_,function(mr,xr){if(!gv(vn,xr)&&($n===mr||ne($n,mr,k,H,ye)))return vn.push(xr)})){Qt=!1;break}}else if(!($n===or||ne($n,or,k,H,ye))){Qt=!1;break}}return ye.delete(v),ye.delete(_),Qt}function mne(v,_,k,H,ne,ye,Ne){switch(k){case Ke:if(v.byteLength!=_.byteLength||v.byteOffset!=_.byteOffset)return!1;v=v.buffer,_=_.buffer;case Xe:return!(v.byteLength!=_.byteLength||!ye(new d_(v),new d_(_)));case te:case ge:case Ie:return Dl(+v,+_);case $e:return v.name==_.name&&v.message==_.message;case ee:case Ce:return v==_+"";case Te:var Fe=iE;case le:var Ue=H&m;if(Fe||(Fe=o_),v.size!=_.size&&!Ue)return!1;var vt=Ne.get(v);if(vt)return vt==_;H|=g,Ne.set(v,_);var bt=SI(Fe(v),Fe(_),H,ne,ye,Ne);return Ne.delete(v),bt;case fe:if(_v)return _v.call(v)==_v.call(_)}return!1}function vne(v,_,k,H,ne,ye){var Ne=k&m,Fe=PE(v),Ue=Fe.length,vt=PE(_),bt=vt.length;if(Ue!=bt&&!Ne)return!1;for(var Ct=Ue;Ct--;){var Qt=Fe[Ct];if(!(Ne?Qt in _:Xr.call(_,Qt)))return!1}var vn=ye.get(v),$n=ye.get(_);if(vn&&$n)return vn==_&&$n==v;var or=!0;ye.set(v,_),ye.set(_,v);for(var Nn=Ne;++Ct<Ue;){Qt=Fe[Ct];var mr=v[Qt],xr=_[Qt];if(H)var ms=Ne?H(xr,mr,Qt,_,v,ye):H(mr,xr,Qt,v,_,ye);if(!(ms===n?mr===xr||ne(mr,xr,k,H,ye):ms)){or=!1;break}Nn||(Nn=Qt=="constructor")}if(or&&!Nn){var pa=v.constructor,vs=_.constructor;pa!=vs&&"constructor"in v&&"constructor"in _&&!(typeof pa=="function"&&pa instanceof pa&&typeof vs=="function"&&vs instanceof vs)&&(or=!1)}return ye.delete(v),ye.delete(_),or}function Sc(v){return IE(PI(v,n,BI),v+"")}function PE(v){return QL(v,go,$E)}function AE(v){return QL(v,La,xI)}var ME=v_?function(v){return v_.get(v)}:ZE;function M_(v){for(var _=v.name+"",k=Dp[_],H=Xr.call(Dp,_)?k.length:0;H--;){var ne=k[H],ye=ne.func;if(ye==null||ye==v)return ne.name}return _}function Fp(v){var _=Xr.call(he,"placeholder")?he:v;return _.placeholder}function Pn(){var v=he.iteratee||YE;return v=v===YE?UL:v,arguments.length?v(arguments[0],arguments[1]):v}function R_(v,_){var k=v.__data__;return Cne(_)?k[typeof _=="string"?"string":"hash"]:k.map}function RE(v){for(var _=go(v),k=_.length;k--;){var H=_[k],ne=v[H];_[k]=[H,ne,TI(ne)]}return _}function th(v,_){var k=kee(v,_);return WL(k)?k:n}function yne(v){var _=Xr.call(v,Zf),k=v[Zf];try{v[Zf]=n;var H=!0}catch{}var ne=u_.call(v);return H&&(_?v[Zf]=k:delete v[Zf]),ne}var $E=aE?function(v){return v==null?[]:(v=ni(v),fd(aE(v),function(_){return AL.call(v,_)}))}:GE,xI=aE?function(v){for(var _=[];v;)hd(_,$E(v)),v=f_(v);return _}:GE,Xo=fa;(sE&&Xo(new sE(new ArrayBuffer(1)))!=Ke||vv&&Xo(new vv)!=Te||lE&&Xo(lE.resolve())!=Ae||Np&&Xo(new Np)!=le||yv&&Xo(new yv)!=be)&&(Xo=function(v){var _=fa(v),k=_==me?v.constructor:n,H=k?nh(k):"";if(H)switch(H){case ete:return Ke;case tte:return Te;case nte:return Ae;case rte:return le;case ite:return be}return _});function bne(v,_,k){for(var H=-1,ne=k.length;++H<ne;){var ye=k[H],Ne=ye.size;switch(ye.type){case"drop":v+=Ne;break;case"dropRight":_-=Ne;break;case"take":_=Yo(_,v+Ne);break;case"takeRight":v=no(v,_-Ne);break}}return{start:v,end:_}}function _ne(v){var _=v.match(_r);return _?_[1].split(Rl):[]}function CI(v,_,k){_=yd(_,v);for(var H=-1,ne=_.length,ye=!1;++H<ne;){var Ne=Ou(_[H]);if(!(ye=v!=null&&k(v,Ne)))break;v=v[Ne]}return ye||++H!=ne?ye:(ne=v==null?0:v.length,!!ne&&F_(ne)&&xc(Ne,ne)&&(Yn(v)||rh(v)))}function One(v){var _=v.length,k=new v.constructor(_);return _&&typeof v[0]=="string"&&Xr.call(v,"index")&&(k.index=v.index,k.input=v.input),k}function EI(v){return typeof v.constructor=="function"&&!Tv(v)?Lp(f_(v)):{}}function wne(v,_,k){var H=v.constructor;switch(_){case Xe:return EE(v);case te:case ge:return new H(+v);case Ke:return one(v,k);case tt:case Dt:case jt:case Me:case nt:case de:case Pe:case Le:case wt:return lI(v,k);case Te:return new H;case Ie:case Ce:return new H(v);case ee:return ane(v);case le:return new H;case fe:return sne(v)}}function Sne(v,_){var k=_.length;if(!k)return v;var H=k-1;return _[H]=(k>1?"& ":"")+_[H],_=_.join(k>2?", ":" "),v.replace(cs,`{
  139. /* [wrapped with `+_+`] */
  140. `)}function xne(v){return Yn(v)||rh(v)||!!(ML&&v&&v[ML])}function xc(v,_){var k=typeof v;return _=_==null?Q:_,!!_&&(k=="number"||k!="symbol"&&Uo.test(v))&&v>-1&&v%1==0&&v<_}function ha(v,_,k){if(!ki(k))return!1;var H=typeof _;return(H=="number"?Da(k)&&xc(_,k.length):H=="string"&&_ in k)?Dl(k[_],v):!1}function NE(v,_){if(Yn(v))return!1;var k=typeof v;return k=="number"||k=="symbol"||k=="boolean"||v==null||gs(v)?!0:Er.test(v)||!fn.test(v)||_!=null&&v in ni(_)}function Cne(v){var _=typeof v;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?v!=="__proto__":v===null}function DE(v){var _=M_(v),k=he[_];if(typeof k!="function"||!(_ in Or.prototype))return!1;if(v===k)return!0;var H=ME(k);return!!H&&v===H[0]}function Ene(v){return!!TL&&TL in v}var Tne=s_?Cc:KE;function Tv(v){var _=v&&v.constructor,k=typeof _=="function"&&_.prototype||$p;return v===k}function TI(v){return v===v&&!ki(v)}function kI(v,_){return function(k){return k==null?!1:k[v]===_&&(_!==n||v in ni(k))}}function kne(v){var _=I_(v,function(H){return k.size===u&&k.clear(),H}),k=_.cache;return _}function Pne(v,_){var k=v[1],H=_[1],ne=k|H,ye=ne<(y|b|E),Ne=H==E&&k==O||H==E&&k==T&&v[7].length<=_[8]||H==(E|T)&&_[7].length<=_[8]&&k==O;if(!(ye||Ne))return v;H&y&&(v[2]=_[2],ne|=k&y?0:w);var Fe=_[3];if(Fe){var Ue=v[3];v[3]=Ue?cI(Ue,Fe,_[4]):Fe,v[4]=Ue?pd(v[3],c):_[4]}return Fe=_[5],Fe&&(Ue=v[5],v[5]=Ue?dI(Ue,Fe,_[6]):Fe,v[6]=Ue?pd(v[5],c):_[6]),Fe=_[7],Fe&&(v[7]=Fe),H&E&&(v[8]=v[8]==null?_[8]:Yo(v[8],_[8])),v[9]==null&&(v[9]=_[9]),v[0]=_[0],v[1]=ne,v}function Ane(v){var _=[];if(v!=null)for(var k in ni(v))_.push(k);return _}function Mne(v){return u_.call(v)}function PI(v,_,k){return _=no(_===n?v.length-1:_,0),function(){for(var H=arguments,ne=-1,ye=no(H.length-_,0),Ne=st(ye);++ne<ye;)Ne[ne]=H[_+ne];ne=-1;for(var Fe=st(_+1);++ne<_;)Fe[ne]=H[ne];return Fe[_]=k(Ne),fs(v,this,Fe)}}function AI(v,_){return _.length<2?v:eh(v,Ws(_,0,-1))}function Rne(v,_){for(var k=v.length,H=Yo(_.length,k),ne=Na(v);H--;){var ye=_[H];v[H]=xc(ye,k)?ne[ye]:n}return v}function LE(v,_){if(!(_==="constructor"&&typeof v[_]=="function")&&_!="__proto__")return v[_]}var MI=$I(eI),kv=qee||function(v,_){return To.setTimeout(v,_)},IE=$I(tne);function RI(v,_,k){var H=_+"";return IE(v,Sne(H,$ne(_ne(H),k)))}function $I(v){var _=0,k=0;return function(){var H=Gee(),ne=$-(H-k);if(k=H,ne>0){if(++_>=N)return arguments[0]}else _=0;return v.apply(n,arguments)}}function $_(v,_){var k=-1,H=v.length,ne=H-1;for(_=_===n?H:_;++k<_;){var ye=bE(k,ne),Ne=v[ye];v[ye]=v[k],v[k]=Ne}return v.length=_,v}var NI=kne(function(v){var _=[];return v.charCodeAt(0)===46&&_.push(""),v.replace(dr,function(k,H,ne,ye){_.push(ne?ye.replace(Vn,"$1"):H||k)}),_});function Ou(v){if(typeof v=="string"||gs(v))return v;var _=v+"";return _=="0"&&1/v==-U?"-0":_}function nh(v){if(v!=null){try{return l_.call(v)}catch{}try{return v+""}catch{}}return""}function $ne(v,_){return js(Se,function(k){var H="_."+k[0];_&k[1]&&!r_(v,H)&&v.push(H)}),v.sort()}function DI(v){if(v instanceof Or)return v.clone();var _=new Qs(v.__wrapped__,v.__chain__);return _.__actions__=Na(v.__actions__),_.__index__=v.__index__,_.__values__=v.__values__,_}function Nne(v,_,k){(k?ha(v,_,k):_===n)?_=1:_=no(nr(_),0);var H=v==null?0:v.length;if(!H||_<1)return[];for(var ne=0,ye=0,Ne=st(g_(H/_));ne<H;)Ne[ye++]=Ws(v,ne,ne+=_);return Ne}function Dne(v){for(var _=-1,k=v==null?0:v.length,H=0,ne=[];++_<k;){var ye=v[_];ye&&(ne[H++]=ye)}return ne}function Lne(){var v=arguments.length;if(!v)return[];for(var _=st(v-1),k=arguments[0],H=v;H--;)_[H-1]=arguments[H];return hd(Yn(k)?Na(k):[k],ko(_,1))}var Ine=ar(function(v,_){return Ii(v)?wv(v,ko(_,1,Ii,!0)):[]}),Bne=ar(function(v,_){var k=Us(_);return Ii(k)&&(k=n),Ii(v)?wv(v,ko(_,1,Ii,!0),Pn(k,2)):[]}),Fne=ar(function(v,_){var k=Us(_);return Ii(k)&&(k=n),Ii(v)?wv(v,ko(_,1,Ii,!0),n,k):[]});function Vne(v,_,k){var H=v==null?0:v.length;return H?(_=k||_===n?1:nr(_),Ws(v,_<0?0:_,H)):[]}function jne(v,_,k){var H=v==null?0:v.length;return H?(_=k||_===n?1:nr(_),_=H-_,Ws(v,0,_<0?0:_)):[]}function zne(v,_){return v&&v.length?C_(v,Pn(_,3),!0,!0):[]}function Qne(v,_){return v&&v.length?C_(v,Pn(_,3),!0):[]}function Hne(v,_,k,H){var ne=v==null?0:v.length;return ne?(k&&typeof k!="number"&&ha(v,_,k)&&(k=0,H=ne),Lte(v,_,k,H)):[]}function LI(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var ne=k==null?0:nr(k);return ne<0&&(ne=no(H+ne,0)),i_(v,Pn(_,3),ne)}function II(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var ne=H-1;return k!==n&&(ne=nr(k),ne=k<0?no(H+ne,0):Yo(ne,H-1)),i_(v,Pn(_,3),ne,!0)}function BI(v){var _=v==null?0:v.length;return _?ko(v,1):[]}function Wne(v){var _=v==null?0:v.length;return _?ko(v,U):[]}function Une(v,_){var k=v==null?0:v.length;return k?(_=_===n?1:nr(_),ko(v,_)):[]}function qne(v){for(var _=-1,k=v==null?0:v.length,H={};++_<k;){var ne=v[_];H[ne[0]]=ne[1]}return H}function FI(v){return v&&v.length?v[0]:n}function Yne(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var ne=k==null?0:nr(k);return ne<0&&(ne=no(H+ne,0)),Pp(v,_,ne)}function Xne(v){var _=v==null?0:v.length;return _?Ws(v,0,-1):[]}var Zne=ar(function(v){var _=wi(v,xE);return _.length&&_[0]===v[0]?pE(_):[]}),Gne=ar(function(v){var _=Us(v),k=wi(v,xE);return _===Us(k)?_=n:k.pop(),k.length&&k[0]===v[0]?pE(k,Pn(_,2)):[]}),Kne=ar(function(v){var _=Us(v),k=wi(v,xE);return _=typeof _=="function"?_:n,_&&k.pop(),k.length&&k[0]===v[0]?pE(k,n,_):[]});function Jne(v,_){return v==null?"":Xee.call(v,_)}function Us(v){var _=v==null?0:v.length;return _?v[_-1]:n}function ere(v,_,k){var H=v==null?0:v.length;if(!H)return-1;var ne=H;return k!==n&&(ne=nr(k),ne=ne<0?no(H+ne,0):Yo(ne,H-1)),_===_?$ee(v,_,ne):i_(v,bL,ne,!0)}function tre(v,_){return v&&v.length?ZL(v,nr(_)):n}var nre=ar(VI);function VI(v,_){return v&&v.length&&_&&_.length?yE(v,_):v}function rre(v,_,k){return v&&v.length&&_&&_.length?yE(v,_,Pn(k,2)):v}function ire(v,_,k){return v&&v.length&&_&&_.length?yE(v,_,n,k):v}var ore=Sc(function(v,_){var k=v==null?0:v.length,H=cE(v,_);return JL(v,wi(_,function(ne){return xc(ne,k)?+ne:ne}).sort(uI)),H});function are(v,_){var k=[];if(!(v&&v.length))return k;var H=-1,ne=[],ye=v.length;for(_=Pn(_,3);++H<ye;){var Ne=v[H];_(Ne,H,v)&&(k.push(Ne),ne.push(H))}return JL(v,ne),k}function BE(v){return v==null?v:Jee.call(v)}function sre(v,_,k){var H=v==null?0:v.length;return H?(k&&typeof k!="number"&&ha(v,_,k)?(_=0,k=H):(_=_==null?0:nr(_),k=k===n?H:nr(k)),Ws(v,_,k)):[]}function lre(v,_){return x_(v,_)}function ure(v,_,k){return OE(v,_,Pn(k,2))}function cre(v,_){var k=v==null?0:v.length;if(k){var H=x_(v,_);if(H<k&&Dl(v[H],_))return H}return-1}function dre(v,_){return x_(v,_,!0)}function fre(v,_,k){return OE(v,_,Pn(k,2),!0)}function hre(v,_){var k=v==null?0:v.length;if(k){var H=x_(v,_,!0)-1;if(Dl(v[H],_))return H}return-1}function pre(v){return v&&v.length?tI(v):[]}function gre(v,_){return v&&v.length?tI(v,Pn(_,2)):[]}function mre(v){var _=v==null?0:v.length;return _?Ws(v,1,_):[]}function vre(v,_,k){return v&&v.length?(_=k||_===n?1:nr(_),Ws(v,0,_<0?0:_)):[]}function yre(v,_,k){var H=v==null?0:v.length;return H?(_=k||_===n?1:nr(_),_=H-_,Ws(v,_<0?0:_,H)):[]}function bre(v,_){return v&&v.length?C_(v,Pn(_,3),!1,!0):[]}function _re(v,_){return v&&v.length?C_(v,Pn(_,3)):[]}var Ore=ar(function(v){return vd(ko(v,1,Ii,!0))}),wre=ar(function(v){var _=Us(v);return Ii(_)&&(_=n),vd(ko(v,1,Ii,!0),Pn(_,2))}),Sre=ar(function(v){var _=Us(v);return _=typeof _=="function"?_:n,vd(ko(v,1,Ii,!0),n,_)});function xre(v){return v&&v.length?vd(v):[]}function Cre(v,_){return v&&v.length?vd(v,Pn(_,2)):[]}function Ere(v,_){return _=typeof _=="function"?_:n,v&&v.length?vd(v,n,_):[]}function FE(v){if(!(v&&v.length))return[];var _=0;return v=fd(v,function(k){if(Ii(k))return _=no(k.length,_),!0}),nE(_,function(k){return wi(v,JC(k))})}function jI(v,_){if(!(v&&v.length))return[];var k=FE(v);return _==null?k:wi(k,function(H){return fs(_,n,H)})}var Tre=ar(function(v,_){return Ii(v)?wv(v,_):[]}),kre=ar(function(v){return SE(fd(v,Ii))}),Pre=ar(function(v){var _=Us(v);return Ii(_)&&(_=n),SE(fd(v,Ii),Pn(_,2))}),Are=ar(function(v){var _=Us(v);return _=typeof _=="function"?_:n,SE(fd(v,Ii),n,_)}),Mre=ar(FE);function Rre(v,_){return oI(v||[],_||[],Ov)}function $re(v,_){return oI(v||[],_||[],Cv)}var Nre=ar(function(v){var _=v.length,k=_>1?v[_-1]:n;return k=typeof k=="function"?(v.pop(),k):n,jI(v,k)});function zI(v){var _=he(v);return _.__chain__=!0,_}function Dre(v,_){return _(v),v}function N_(v,_){return _(v)}var Lre=Sc(function(v){var _=v.length,k=_?v[0]:0,H=this.__wrapped__,ne=function(ye){return cE(ye,v)};return _>1||this.__actions__.length||!(H instanceof Or)||!xc(k)?this.thru(ne):(H=H.slice(k,+k+(_?1:0)),H.__actions__.push({func:N_,args:[ne],thisArg:n}),new Qs(H,this.__chain__).thru(function(ye){return _&&!ye.length&&ye.push(n),ye}))});function Ire(){return zI(this)}function Bre(){return new Qs(this.value(),this.__chain__)}function Fre(){this.__values__===n&&(this.__values__=n3(this.value()));var v=this.__index__>=this.__values__.length,_=v?n:this.__values__[this.__index__++];return{done:v,value:_}}function Vre(){return this}function jre(v){for(var _,k=this;k instanceof b_;){var H=DI(k);H.__index__=0,H.__values__=n,_?ne.__wrapped__=H:_=H;var ne=H;k=k.__wrapped__}return ne.__wrapped__=v,_}function zre(){var v=this.__wrapped__;if(v instanceof Or){var _=v;return this.__actions__.length&&(_=new Or(this)),_=_.reverse(),_.__actions__.push({func:N_,args:[BE],thisArg:n}),new Qs(_,this.__chain__)}return this.thru(BE)}function Qre(){return iI(this.__wrapped__,this.__actions__)}var Hre=E_(function(v,_,k){Xr.call(v,k)?++v[k]:Oc(v,k,1)});function Wre(v,_,k){var H=Yn(v)?vL:Dte;return k&&ha(v,_,k)&&(_=n),H(v,Pn(_,3))}function Ure(v,_){var k=Yn(v)?fd:jL;return k(v,Pn(_,3))}var qre=gI(LI),Yre=gI(II);function Xre(v,_){return ko(D_(v,_),1)}function Zre(v,_){return ko(D_(v,_),U)}function Gre(v,_,k){return k=k===n?1:nr(k),ko(D_(v,_),k)}function QI(v,_){var k=Yn(v)?js:md;return k(v,Pn(_,3))}function HI(v,_){var k=Yn(v)?mee:VL;return k(v,Pn(_,3))}var Kre=E_(function(v,_,k){Xr.call(v,k)?v[k].push(_):Oc(v,k,[_])});function Jre(v,_,k,H){v=Da(v)?v:jp(v),k=k&&!H?nr(k):0;var ne=v.length;return k<0&&(k=no(ne+k,0)),V_(v)?k<=ne&&v.indexOf(_,k)>-1:!!ne&&Pp(v,_,k)>-1}var eie=ar(function(v,_,k){var H=-1,ne=typeof _=="function",ye=Da(v)?st(v.length):[];return md(v,function(Ne){ye[++H]=ne?fs(_,Ne,k):Sv(Ne,_,k)}),ye}),tie=E_(function(v,_,k){Oc(v,k,_)});function D_(v,_){var k=Yn(v)?wi:qL;return k(v,Pn(_,3))}function nie(v,_,k,H){return v==null?[]:(Yn(_)||(_=_==null?[]:[_]),k=H?n:k,Yn(k)||(k=k==null?[]:[k]),GL(v,_,k))}var rie=E_(function(v,_,k){v[k?0:1].push(_)},function(){return[[],[]]});function iie(v,_,k){var H=Yn(v)?GC:OL,ne=arguments.length<3;return H(v,Pn(_,4),k,ne,md)}function oie(v,_,k){var H=Yn(v)?vee:OL,ne=arguments.length<3;return H(v,Pn(_,4),k,ne,VL)}function aie(v,_){var k=Yn(v)?fd:jL;return k(v,B_(Pn(_,3)))}function sie(v){var _=Yn(v)?LL:Jte;return _(v)}function lie(v,_,k){(k?ha(v,_,k):_===n)?_=1:_=nr(_);var H=Yn(v)?Ate:ene;return H(v,_)}function uie(v){var _=Yn(v)?Mte:nne;return _(v)}function cie(v){if(v==null)return 0;if(Da(v))return V_(v)?Mp(v):v.length;var _=Xo(v);return _==Te||_==le?v.size:mE(v).length}function die(v,_,k){var H=Yn(v)?KC:rne;return k&&ha(v,_,k)&&(_=n),H(v,Pn(_,3))}var fie=ar(function(v,_){if(v==null)return[];var k=_.length;return k>1&&ha(v,_[0],_[1])?_=[]:k>2&&ha(_[0],_[1],_[2])&&(_=[_[0]]),GL(v,ko(_,1),[])}),L_=Uee||function(){return To.Date.now()};function hie(v,_){if(typeof _!="function")throw new zs(a);return v=nr(v),function(){if(--v<1)return _.apply(this,arguments)}}function WI(v,_,k){return _=k?n:_,_=v&&_==null?v.length:_,wc(v,E,n,n,n,n,_)}function UI(v,_){var k;if(typeof _!="function")throw new zs(a);return v=nr(v),function(){return--v>0&&(k=_.apply(this,arguments)),v<=1&&(_=n),k}}var VE=ar(function(v,_,k){var H=y;if(k.length){var ne=pd(k,Fp(VE));H|=x}return wc(v,H,_,k,ne)}),qI=ar(function(v,_,k){var H=y|b;if(k.length){var ne=pd(k,Fp(qI));H|=x}return wc(_,H,v,k,ne)});function YI(v,_,k){_=k?n:_;var H=wc(v,O,n,n,n,n,n,_);return H.placeholder=YI.placeholder,H}function XI(v,_,k){_=k?n:_;var H=wc(v,S,n,n,n,n,n,_);return H.placeholder=XI.placeholder,H}function ZI(v,_,k){var H,ne,ye,Ne,Fe,Ue,vt=0,bt=!1,Ct=!1,Qt=!0;if(typeof v!="function")throw new zs(a);_=qs(_)||0,ki(k)&&(bt=!!k.leading,Ct="maxWait"in k,ye=Ct?no(qs(k.maxWait)||0,_):ye,Qt="trailing"in k?!!k.trailing:Qt);function vn(Bi){var Ll=H,Tc=ne;return H=ne=n,vt=Bi,Ne=v.apply(Tc,Ll),Ne}function $n(Bi){return vt=Bi,Fe=kv(mr,_),bt?vn(Bi):Ne}function or(Bi){var Ll=Bi-Ue,Tc=Bi-vt,g3=_-Ll;return Ct?Yo(g3,ye-Tc):g3}function Nn(Bi){var Ll=Bi-Ue,Tc=Bi-vt;return Ue===n||Ll>=_||Ll<0||Ct&&Tc>=ye}function mr(){var Bi=L_();if(Nn(Bi))return xr(Bi);Fe=kv(mr,or(Bi))}function xr(Bi){return Fe=n,Qt&&H?vn(Bi):(H=ne=n,Ne)}function ms(){Fe!==n&&aI(Fe),vt=0,H=Ue=ne=Fe=n}function pa(){return Fe===n?Ne:xr(L_())}function vs(){var Bi=L_(),Ll=Nn(Bi);if(H=arguments,ne=this,Ue=Bi,Ll){if(Fe===n)return $n(Ue);if(Ct)return aI(Fe),Fe=kv(mr,_),vn(Ue)}return Fe===n&&(Fe=kv(mr,_)),Ne}return vs.cancel=ms,vs.flush=pa,vs}var pie=ar(function(v,_){return FL(v,1,_)}),gie=ar(function(v,_,k){return FL(v,qs(_)||0,k)});function mie(v){return wc(v,P)}function I_(v,_){if(typeof v!="function"||_!=null&&typeof _!="function")throw new zs(a);var k=function(){var H=arguments,ne=_?_.apply(this,H):H[0],ye=k.cache;if(ye.has(ne))return ye.get(ne);var Ne=v.apply(this,H);return k.cache=ye.set(ne,Ne)||ye,Ne};return k.cache=new(I_.Cache||_c),k}I_.Cache=_c;function B_(v){if(typeof v!="function")throw new zs(a);return function(){var _=arguments;switch(_.length){case 0:return!v.call(this);case 1:return!v.call(this,_[0]);case 2:return!v.call(this,_[0],_[1]);case 3:return!v.call(this,_[0],_[1],_[2])}return!v.apply(this,_)}}function vie(v){return UI(2,v)}var yie=ine(function(v,_){_=_.length==1&&Yn(_[0])?wi(_[0],hs(Pn())):wi(ko(_,1),hs(Pn()));var k=_.length;return ar(function(H){for(var ne=-1,ye=Yo(H.length,k);++ne<ye;)H[ne]=_[ne].call(this,H[ne]);return fs(v,this,H)})}),jE=ar(function(v,_){var k=pd(_,Fp(jE));return wc(v,x,n,_,k)}),GI=ar(function(v,_){var k=pd(_,Fp(GI));return wc(v,C,n,_,k)}),bie=Sc(function(v,_){return wc(v,T,n,n,n,_)});function _ie(v,_){if(typeof v!="function")throw new zs(a);return _=_===n?_:nr(_),ar(v,_)}function Oie(v,_){if(typeof v!="function")throw new zs(a);return _=_==null?0:no(nr(_),0),ar(function(k){var H=k[_],ne=bd(k,0,_);return H&&hd(ne,H),fs(v,this,ne)})}function wie(v,_,k){var H=!0,ne=!0;if(typeof v!="function")throw new zs(a);return ki(k)&&(H="leading"in k?!!k.leading:H,ne="trailing"in k?!!k.trailing:ne),ZI(v,_,{leading:H,maxWait:_,trailing:ne})}function Sie(v){return WI(v,1)}function xie(v,_){return jE(CE(_),v)}function Cie(){if(!arguments.length)return[];var v=arguments[0];return Yn(v)?v:[v]}function Eie(v){return Hs(v,h)}function Tie(v,_){return _=typeof _=="function"?_:n,Hs(v,h,_)}function kie(v){return Hs(v,d|h)}function Pie(v,_){return _=typeof _=="function"?_:n,Hs(v,d|h,_)}function Aie(v,_){return _==null||BL(v,_,go(_))}function Dl(v,_){return v===_||v!==v&&_!==_}var Mie=A_(hE),Rie=A_(function(v,_){return v>=_}),rh=HL(function(){return arguments}())?HL:function(v){return Ai(v)&&Xr.call(v,"callee")&&!AL.call(v,"callee")},Yn=st.isArray,$ie=dL?hs(dL):jte;function Da(v){return v!=null&&F_(v.length)&&!Cc(v)}function Ii(v){return Ai(v)&&Da(v)}function Nie(v){return v===!0||v===!1||Ai(v)&&fa(v)==te}var _d=Yee||KE,Die=fL?hs(fL):zte;function Lie(v){return Ai(v)&&v.nodeType===1&&!Pv(v)}function Iie(v){if(v==null)return!0;if(Da(v)&&(Yn(v)||typeof v=="string"||typeof v.splice=="function"||_d(v)||Vp(v)||rh(v)))return!v.length;var _=Xo(v);if(_==Te||_==le)return!v.size;if(Tv(v))return!mE(v).length;for(var k in v)if(Xr.call(v,k))return!1;return!0}function Bie(v,_){return xv(v,_)}function Fie(v,_,k){k=typeof k=="function"?k:n;var H=k?k(v,_):n;return H===n?xv(v,_,n,k):!!H}function zE(v){if(!Ai(v))return!1;var _=fa(v);return _==$e||_==Re||typeof v.message=="string"&&typeof v.name=="string"&&!Pv(v)}function Vie(v){return typeof v=="number"&&RL(v)}function Cc(v){if(!ki(v))return!1;var _=fa(v);return _==Z||_==ce||_==re||_==X}function KI(v){return typeof v=="number"&&v==nr(v)}function F_(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=Q}function ki(v){var _=typeof v;return v!=null&&(_=="object"||_=="function")}function Ai(v){return v!=null&&typeof v=="object"}var JI=hL?hs(hL):Hte;function jie(v,_){return v===_||gE(v,_,RE(_))}function zie(v,_,k){return k=typeof k=="function"?k:n,gE(v,_,RE(_),k)}function Qie(v){return e3(v)&&v!=+v}function Hie(v){if(Tne(v))throw new qn(o);return WL(v)}function Wie(v){return v===null}function Uie(v){return v==null}function e3(v){return typeof v=="number"||Ai(v)&&fa(v)==Ie}function Pv(v){if(!Ai(v)||fa(v)!=me)return!1;var _=f_(v);if(_===null)return!0;var k=Xr.call(_,"constructor")&&_.constructor;return typeof k=="function"&&k instanceof k&&l_.call(k)==zee}var QE=pL?hs(pL):Wte;function qie(v){return KI(v)&&v>=-Q&&v<=Q}var t3=gL?hs(gL):Ute;function V_(v){return typeof v=="string"||!Yn(v)&&Ai(v)&&fa(v)==Ce}function gs(v){return typeof v=="symbol"||Ai(v)&&fa(v)==fe}var Vp=mL?hs(mL):qte;function Yie(v){return v===n}function Xie(v){return Ai(v)&&Xo(v)==be}function Zie(v){return Ai(v)&&fa(v)==Be}var Gie=A_(vE),Kie=A_(function(v,_){return v<=_});function n3(v){if(!v)return[];if(Da(v))return V_(v)?$l(v):Na(v);if(mv&&v[mv])return Aee(v[mv]());var _=Xo(v),k=_==Te?iE:_==le?o_:jp;return k(v)}function Ec(v){if(!v)return v===0?v:0;if(v=qs(v),v===U||v===-U){var _=v<0?-1:1;return _*V}return v===v?v:0}function nr(v){var _=Ec(v),k=_%1;return _===_?k?_-k:_:0}function r3(v){return v?Jf(nr(v),0,K):0}function qs(v){if(typeof v=="number")return v;if(gs(v))return q;if(ki(v)){var _=typeof v.valueOf=="function"?v.valueOf():v;v=ki(_)?_+"":_}if(typeof v!="string")return v===0?v:+v;v=wL(v);var k=Wo.test(v);return k||Ei.test(v)?hee(v.slice(2),k?2:8):Eo.test(v)?q:+v}function i3(v){return _u(v,La(v))}function Jie(v){return v?Jf(nr(v),-Q,Q):v===0?v:0}function zr(v){return v==null?"":ps(v)}var eoe=Ip(function(v,_){if(Tv(_)||Da(_)){_u(_,go(_),v);return}for(var k in _)Xr.call(_,k)&&Ov(v,k,_[k])}),o3=Ip(function(v,_){_u(_,La(_),v)}),j_=Ip(function(v,_,k,H){_u(_,La(_),v,H)}),toe=Ip(function(v,_,k,H){_u(_,go(_),v,H)}),noe=Sc(cE);function roe(v,_){var k=Lp(v);return _==null?k:IL(k,_)}var ioe=ar(function(v,_){v=ni(v);var k=-1,H=_.length,ne=H>2?_[2]:n;for(ne&&ha(_[0],_[1],ne)&&(H=1);++k<H;)for(var ye=_[k],Ne=La(ye),Fe=-1,Ue=Ne.length;++Fe<Ue;){var vt=Ne[Fe],bt=v[vt];(bt===n||Dl(bt,$p[vt])&&!Xr.call(v,vt))&&(v[vt]=ye[vt])}return v}),ooe=ar(function(v){return v.push(n,wI),fs(a3,n,v)});function aoe(v,_){return yL(v,Pn(_,3),bu)}function soe(v,_){return yL(v,Pn(_,3),fE)}function loe(v,_){return v==null?v:dE(v,Pn(_,3),La)}function uoe(v,_){return v==null?v:zL(v,Pn(_,3),La)}function coe(v,_){return v&&bu(v,Pn(_,3))}function doe(v,_){return v&&fE(v,Pn(_,3))}function foe(v){return v==null?[]:w_(v,go(v))}function hoe(v){return v==null?[]:w_(v,La(v))}function HE(v,_,k){var H=v==null?n:eh(v,_);return H===n?k:H}function poe(v,_){return v!=null&&CI(v,_,Ite)}function WE(v,_){return v!=null&&CI(v,_,Bte)}var goe=vI(function(v,_,k){_!=null&&typeof _.toString!="function"&&(_=u_.call(_)),v[_]=k},qE(Ia)),moe=vI(function(v,_,k){_!=null&&typeof _.toString!="function"&&(_=u_.call(_)),Xr.call(v,_)?v[_].push(k):v[_]=[k]},Pn),voe=ar(Sv);function go(v){return Da(v)?DL(v):mE(v)}function La(v){return Da(v)?DL(v,!0):Yte(v)}function yoe(v,_){var k={};return _=Pn(_,3),bu(v,function(H,ne,ye){Oc(k,_(H,ne,ye),H)}),k}function boe(v,_){var k={};return _=Pn(_,3),bu(v,function(H,ne,ye){Oc(k,ne,_(H,ne,ye))}),k}var _oe=Ip(function(v,_,k){S_(v,_,k)}),a3=Ip(function(v,_,k,H){S_(v,_,k,H)}),Ooe=Sc(function(v,_){var k={};if(v==null)return k;var H=!1;_=wi(_,function(ye){return ye=yd(ye,v),H||(H=ye.length>1),ye}),_u(v,AE(v),k),H&&(k=Hs(k,d|f|h,gne));for(var ne=_.length;ne--;)wE(k,_[ne]);return k});function woe(v,_){return s3(v,B_(Pn(_)))}var Soe=Sc(function(v,_){return v==null?{}:Zte(v,_)});function s3(v,_){if(v==null)return{};var k=wi(AE(v),function(H){return[H]});return _=Pn(_),KL(v,k,function(H,ne){return _(H,ne[0])})}function xoe(v,_,k){_=yd(_,v);var H=-1,ne=_.length;for(ne||(ne=1,v=n);++H<ne;){var ye=v==null?n:v[Ou(_[H])];ye===n&&(H=ne,ye=k),v=Cc(ye)?ye.call(v):ye}return v}function Coe(v,_,k){return v==null?v:Cv(v,_,k)}function Eoe(v,_,k,H){return H=typeof H=="function"?H:n,v==null?v:Cv(v,_,k,H)}var l3=_I(go),u3=_I(La);function Toe(v,_,k){var H=Yn(v),ne=H||_d(v)||Vp(v);if(_=Pn(_,4),k==null){var ye=v&&v.constructor;ne?k=H?new ye:[]:ki(v)?k=Cc(ye)?Lp(f_(v)):{}:k={}}return(ne?js:bu)(v,function(Ne,Fe,Ue){return _(k,Ne,Fe,Ue)}),k}function koe(v,_){return v==null?!0:wE(v,_)}function Poe(v,_,k){return v==null?v:rI(v,_,CE(k))}function Aoe(v,_,k,H){return H=typeof H=="function"?H:n,v==null?v:rI(v,_,CE(k),H)}function jp(v){return v==null?[]:rE(v,go(v))}function Moe(v){return v==null?[]:rE(v,La(v))}function Roe(v,_,k){return k===n&&(k=_,_=n),k!==n&&(k=qs(k),k=k===k?k:0),_!==n&&(_=qs(_),_=_===_?_:0),Jf(qs(v),_,k)}function $oe(v,_,k){return _=Ec(_),k===n?(k=_,_=0):k=Ec(k),v=qs(v),Fte(v,_,k)}function Noe(v,_,k){if(k&&typeof k!="boolean"&&ha(v,_,k)&&(_=k=n),k===n&&(typeof _=="boolean"?(k=_,_=n):typeof v=="boolean"&&(k=v,v=n)),v===n&&_===n?(v=0,_=1):(v=Ec(v),_===n?(_=v,v=0):_=Ec(_)),v>_){var H=v;v=_,_=H}if(k||v%1||_%1){var ne=$L();return Yo(v+ne*(_-v+fee("1e-"+((ne+"").length-1))),_)}return bE(v,_)}var Doe=Bp(function(v,_,k){return _=_.toLowerCase(),v+(k?c3(_):_)});function c3(v){return UE(zr(v).toLowerCase())}function d3(v){return v=zr(v),v&&v.replace(ot,Cee).replace(nee,"")}function Loe(v,_,k){v=zr(v),_=ps(_);var H=v.length;k=k===n?H:Jf(nr(k),0,H);var ne=k;return k-=_.length,k>=0&&v.slice(k,ne)==_}function Ioe(v){return v=zr(v),v&&bn.test(v)?v.replace(ln,Eee):v}function Boe(v){return v=zr(v),v&&Pi.test(v)?v.replace(eo,"\\$&"):v}var Foe=Bp(function(v,_,k){return v+(k?"-":"")+_.toLowerCase()}),Voe=Bp(function(v,_,k){return v+(k?" ":"")+_.toLowerCase()}),joe=pI("toLowerCase");function zoe(v,_,k){v=zr(v),_=nr(_);var H=_?Mp(v):0;if(!_||H>=_)return v;var ne=(_-H)/2;return P_(m_(ne),k)+v+P_(g_(ne),k)}function Qoe(v,_,k){v=zr(v),_=nr(_);var H=_?Mp(v):0;return _&&H<_?v+P_(_-H,k):v}function Hoe(v,_,k){v=zr(v),_=nr(_);var H=_?Mp(v):0;return _&&H<_?P_(_-H,k)+v:v}function Woe(v,_,k){return k||_==null?_=0:_&&(_=+_),Kee(zr(v).replace(Oi,""),_||0)}function Uoe(v,_,k){return(k?ha(v,_,k):_===n)?_=1:_=nr(_),_E(zr(v),_)}function qoe(){var v=arguments,_=zr(v[0]);return v.length<3?_:_.replace(v[1],v[2])}var Yoe=Bp(function(v,_,k){return v+(k?"_":"")+_.toLowerCase()});function Xoe(v,_,k){return k&&typeof k!="number"&&ha(v,_,k)&&(_=k=n),k=k===n?K:k>>>0,k?(v=zr(v),v&&(typeof _=="string"||_!=null&&!QE(_))&&(_=ps(_),!_&&Ap(v))?bd($l(v),0,k):v.split(_,k)):[]}var Zoe=Bp(function(v,_,k){return v+(k?" ":"")+UE(_)});function Goe(v,_,k){return v=zr(v),k=k==null?0:Jf(nr(k),0,v.length),_=ps(_),v.slice(k,k+_.length)==_}function Koe(v,_,k){var H=he.templateSettings;k&&ha(v,_,k)&&(_=n),v=zr(v),_=j_({},_,H,OI);var ne=j_({},_.imports,H.imports,OI),ye=go(ne),Ne=rE(ne,ye),Fe,Ue,vt=0,bt=_.interpolate||Nt,Ct="__p += '",Qt=oE((_.escape||Nt).source+"|"+bt.source+"|"+(bt===xn?zt:Nt).source+"|"+(_.evaluate||Nt).source+"|$","g"),vn="//# sourceURL="+(Xr.call(_,"sourceURL")?(_.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++see+"]")+`
  141. `;v.replace(Qt,function(Nn,mr,xr,ms,pa,vs){return xr||(xr=ms),Ct+=v.slice(vt,vs).replace(rn,Tee),mr&&(Fe=!0,Ct+=`' +
  142. __e(`+mr+`) +
  143. '`),pa&&(Ue=!0,Ct+=`';
  144. `+pa+`;
  145. __p += '`),xr&&(Ct+=`' +
  146. ((__t = (`+xr+`)) == null ? '' : __t) +
  147. '`),vt=vs+Nn.length,Nn}),Ct+=`';
  148. `;var $n=Xr.call(_,"variable")&&_.variable;if(!$n)Ct=`with (obj) {
  149. `+Ct+`
  150. }
  151. `;else if(Mt.test($n))throw new qn(s);Ct=(Ue?Ct.replace(tn,""):Ct).replace(De,"$1").replace(xt,"$1;"),Ct="function("+($n||"obj")+`) {
  152. `+($n?"":`obj || (obj = {});
  153. `)+"var __t, __p = ''"+(Fe?", __e = _.escape":"")+(Ue?`, __j = Array.prototype.join;
  154. function print() { __p += __j.call(arguments, '') }
  155. `:`;
  156. `)+Ct+`return __p
  157. }`;var or=h3(function(){return Br(ye,vn+"return "+Ct).apply(n,Ne)});if(or.source=Ct,zE(or))throw or;return or}function Joe(v){return zr(v).toLowerCase()}function eae(v){return zr(v).toUpperCase()}function tae(v,_,k){if(v=zr(v),v&&(k||_===n))return wL(v);if(!v||!(_=ps(_)))return v;var H=$l(v),ne=$l(_),ye=SL(H,ne),Ne=xL(H,ne)+1;return bd(H,ye,Ne).join("")}function nae(v,_,k){if(v=zr(v),v&&(k||_===n))return v.slice(0,EL(v)+1);if(!v||!(_=ps(_)))return v;var H=$l(v),ne=xL(H,$l(_))+1;return bd(H,0,ne).join("")}function rae(v,_,k){if(v=zr(v),v&&(k||_===n))return v.replace(Oi,"");if(!v||!(_=ps(_)))return v;var H=$l(v),ne=SL(H,$l(_));return bd(H,ne).join("")}function iae(v,_){var k=A,H=D;if(ki(_)){var ne="separator"in _?_.separator:ne;k="length"in _?nr(_.length):k,H="omission"in _?ps(_.omission):H}v=zr(v);var ye=v.length;if(Ap(v)){var Ne=$l(v);ye=Ne.length}if(k>=ye)return v;var Fe=k-Mp(H);if(Fe<1)return H;var Ue=Ne?bd(Ne,0,Fe).join(""):v.slice(0,Fe);if(ne===n)return Ue+H;if(Ne&&(Fe+=Ue.length-Fe),QE(ne)){if(v.slice(Fe).search(ne)){var vt,bt=Ue;for(ne.global||(ne=oE(ne.source,zr(Li.exec(ne))+"g")),ne.lastIndex=0;vt=ne.exec(bt);)var Ct=vt.index;Ue=Ue.slice(0,Ct===n?Fe:Ct)}}else if(v.indexOf(ps(ne),Fe)!=Fe){var Qt=Ue.lastIndexOf(ne);Qt>-1&&(Ue=Ue.slice(0,Qt))}return Ue+H}function oae(v){return v=zr(v),v&&nn.test(v)?v.replace(qt,Nee):v}var aae=Bp(function(v,_,k){return v+(k?" ":"")+_.toUpperCase()}),UE=pI("toUpperCase");function f3(v,_,k){return v=zr(v),_=k?n:_,_===n?Pee(v)?Iee(v):_ee(v):v.match(_)||[]}var h3=ar(function(v,_){try{return fs(v,n,_)}catch(k){return zE(k)?k:new qn(k)}}),sae=Sc(function(v,_){return js(_,function(k){k=Ou(k),Oc(v,k,VE(v[k],v))}),v});function lae(v){var _=v==null?0:v.length,k=Pn();return v=_?wi(v,function(H){if(typeof H[1]!="function")throw new zs(a);return[k(H[0]),H[1]]}):[],ar(function(H){for(var ne=-1;++ne<_;){var ye=v[ne];if(fs(ye[0],this,H))return fs(ye[1],this,H)}})}function uae(v){return Nte(Hs(v,d))}function qE(v){return function(){return v}}function cae(v,_){return v==null||v!==v?_:v}var dae=mI(),fae=mI(!0);function Ia(v){return v}function YE(v){return UL(typeof v=="function"?v:Hs(v,d))}function hae(v){return YL(Hs(v,d))}function pae(v,_){return XL(v,Hs(_,d))}var gae=ar(function(v,_){return function(k){return Sv(k,v,_)}}),mae=ar(function(v,_){return function(k){return Sv(v,k,_)}});function XE(v,_,k){var H=go(_),ne=w_(_,H);k==null&&!(ki(_)&&(ne.length||!H.length))&&(k=_,_=v,v=this,ne=w_(_,go(_)));var ye=!(ki(k)&&"chain"in k)||!!k.chain,Ne=Cc(v);return js(ne,function(Fe){var Ue=_[Fe];v[Fe]=Ue,Ne&&(v.prototype[Fe]=function(){var vt=this.__chain__;if(ye||vt){var bt=v(this.__wrapped__),Ct=bt.__actions__=Na(this.__actions__);return Ct.push({func:Ue,args:arguments,thisArg:v}),bt.__chain__=vt,bt}return Ue.apply(v,hd([this.value()],arguments))})}),v}function vae(){return To._===this&&(To._=Qee),this}function ZE(){}function yae(v){return v=nr(v),ar(function(_){return ZL(_,v)})}var bae=TE(wi),_ae=TE(vL),Oae=TE(KC);function p3(v){return NE(v)?JC(Ou(v)):Gte(v)}function wae(v){return function(_){return v==null?n:eh(v,_)}}var Sae=yI(),xae=yI(!0);function GE(){return[]}function KE(){return!1}function Cae(){return{}}function Eae(){return""}function Tae(){return!0}function kae(v,_){if(v=nr(v),v<1||v>Q)return[];var k=K,H=Yo(v,K);_=Pn(_),v-=K;for(var ne=nE(H,_);++k<v;)_(k);return ne}function Pae(v){return Yn(v)?wi(v,Ou):gs(v)?[v]:Na(NI(zr(v)))}function Aae(v){var _=++jee;return zr(v)+_}var Mae=k_(function(v,_){return v+_},0),Rae=kE("ceil"),$ae=k_(function(v,_){return v/_},1),Nae=kE("floor");function Dae(v){return v&&v.length?O_(v,Ia,hE):n}function Lae(v,_){return v&&v.length?O_(v,Pn(_,2),hE):n}function Iae(v){return _L(v,Ia)}function Bae(v,_){return _L(v,Pn(_,2))}function Fae(v){return v&&v.length?O_(v,Ia,vE):n}function Vae(v,_){return v&&v.length?O_(v,Pn(_,2),vE):n}var jae=k_(function(v,_){return v*_},1),zae=kE("round"),Qae=k_(function(v,_){return v-_},0);function Hae(v){return v&&v.length?tE(v,Ia):0}function Wae(v,_){return v&&v.length?tE(v,Pn(_,2)):0}return he.after=hie,he.ary=WI,he.assign=eoe,he.assignIn=o3,he.assignInWith=j_,he.assignWith=toe,he.at=noe,he.before=UI,he.bind=VE,he.bindAll=sae,he.bindKey=qI,he.castArray=Cie,he.chain=zI,he.chunk=Nne,he.compact=Dne,he.concat=Lne,he.cond=lae,he.conforms=uae,he.constant=qE,he.countBy=Hre,he.create=roe,he.curry=YI,he.curryRight=XI,he.debounce=ZI,he.defaults=ioe,he.defaultsDeep=ooe,he.defer=pie,he.delay=gie,he.difference=Ine,he.differenceBy=Bne,he.differenceWith=Fne,he.drop=Vne,he.dropRight=jne,he.dropRightWhile=zne,he.dropWhile=Qne,he.fill=Hne,he.filter=Ure,he.flatMap=Xre,he.flatMapDeep=Zre,he.flatMapDepth=Gre,he.flatten=BI,he.flattenDeep=Wne,he.flattenDepth=Une,he.flip=mie,he.flow=dae,he.flowRight=fae,he.fromPairs=qne,he.functions=foe,he.functionsIn=hoe,he.groupBy=Kre,he.initial=Xne,he.intersection=Zne,he.intersectionBy=Gne,he.intersectionWith=Kne,he.invert=goe,he.invertBy=moe,he.invokeMap=eie,he.iteratee=YE,he.keyBy=tie,he.keys=go,he.keysIn=La,he.map=D_,he.mapKeys=yoe,he.mapValues=boe,he.matches=hae,he.matchesProperty=pae,he.memoize=I_,he.merge=_oe,he.mergeWith=a3,he.method=gae,he.methodOf=mae,he.mixin=XE,he.negate=B_,he.nthArg=yae,he.omit=Ooe,he.omitBy=woe,he.once=vie,he.orderBy=nie,he.over=bae,he.overArgs=yie,he.overEvery=_ae,he.overSome=Oae,he.partial=jE,he.partialRight=GI,he.partition=rie,he.pick=Soe,he.pickBy=s3,he.property=p3,he.propertyOf=wae,he.pull=nre,he.pullAll=VI,he.pullAllBy=rre,he.pullAllWith=ire,he.pullAt=ore,he.range=Sae,he.rangeRight=xae,he.rearg=bie,he.reject=aie,he.remove=are,he.rest=_ie,he.reverse=BE,he.sampleSize=lie,he.set=Coe,he.setWith=Eoe,he.shuffle=uie,he.slice=sre,he.sortBy=fie,he.sortedUniq=pre,he.sortedUniqBy=gre,he.split=Xoe,he.spread=Oie,he.tail=mre,he.take=vre,he.takeRight=yre,he.takeRightWhile=bre,he.takeWhile=_re,he.tap=Dre,he.throttle=wie,he.thru=N_,he.toArray=n3,he.toPairs=l3,he.toPairsIn=u3,he.toPath=Pae,he.toPlainObject=i3,he.transform=Toe,he.unary=Sie,he.union=Ore,he.unionBy=wre,he.unionWith=Sre,he.uniq=xre,he.uniqBy=Cre,he.uniqWith=Ere,he.unset=koe,he.unzip=FE,he.unzipWith=jI,he.update=Poe,he.updateWith=Aoe,he.values=jp,he.valuesIn=Moe,he.without=Tre,he.words=f3,he.wrap=xie,he.xor=kre,he.xorBy=Pre,he.xorWith=Are,he.zip=Mre,he.zipObject=Rre,he.zipObjectDeep=$re,he.zipWith=Nre,he.entries=l3,he.entriesIn=u3,he.extend=o3,he.extendWith=j_,XE(he,he),he.add=Mae,he.attempt=h3,he.camelCase=Doe,he.capitalize=c3,he.ceil=Rae,he.clamp=Roe,he.clone=Eie,he.cloneDeep=kie,he.cloneDeepWith=Pie,he.cloneWith=Tie,he.conformsTo=Aie,he.deburr=d3,he.defaultTo=cae,he.divide=$ae,he.endsWith=Loe,he.eq=Dl,he.escape=Ioe,he.escapeRegExp=Boe,he.every=Wre,he.find=qre,he.findIndex=LI,he.findKey=aoe,he.findLast=Yre,he.findLastIndex=II,he.findLastKey=soe,he.floor=Nae,he.forEach=QI,he.forEachRight=HI,he.forIn=loe,he.forInRight=uoe,he.forOwn=coe,he.forOwnRight=doe,he.get=HE,he.gt=Mie,he.gte=Rie,he.has=poe,he.hasIn=WE,he.head=FI,he.identity=Ia,he.includes=Jre,he.indexOf=Yne,he.inRange=$oe,he.invoke=voe,he.isArguments=rh,he.isArray=Yn,he.isArrayBuffer=$ie,he.isArrayLike=Da,he.isArrayLikeObject=Ii,he.isBoolean=Nie,he.isBuffer=_d,he.isDate=Die,he.isElement=Lie,he.isEmpty=Iie,he.isEqual=Bie,he.isEqualWith=Fie,he.isError=zE,he.isFinite=Vie,he.isFunction=Cc,he.isInteger=KI,he.isLength=F_,he.isMap=JI,he.isMatch=jie,he.isMatchWith=zie,he.isNaN=Qie,he.isNative=Hie,he.isNil=Uie,he.isNull=Wie,he.isNumber=e3,he.isObject=ki,he.isObjectLike=Ai,he.isPlainObject=Pv,he.isRegExp=QE,he.isSafeInteger=qie,he.isSet=t3,he.isString=V_,he.isSymbol=gs,he.isTypedArray=Vp,he.isUndefined=Yie,he.isWeakMap=Xie,he.isWeakSet=Zie,he.join=Jne,he.kebabCase=Foe,he.last=Us,he.lastIndexOf=ere,he.lowerCase=Voe,he.lowerFirst=joe,he.lt=Gie,he.lte=Kie,he.max=Dae,he.maxBy=Lae,he.mean=Iae,he.meanBy=Bae,he.min=Fae,he.minBy=Vae,he.stubArray=GE,he.stubFalse=KE,he.stubObject=Cae,he.stubString=Eae,he.stubTrue=Tae,he.multiply=jae,he.nth=tre,he.noConflict=vae,he.noop=ZE,he.now=L_,he.pad=zoe,he.padEnd=Qoe,he.padStart=Hoe,he.parseInt=Woe,he.random=Noe,he.reduce=iie,he.reduceRight=oie,he.repeat=Uoe,he.replace=qoe,he.result=xoe,he.round=zae,he.runInContext=He,he.sample=sie,he.size=cie,he.snakeCase=Yoe,he.some=die,he.sortedIndex=lre,he.sortedIndexBy=ure,he.sortedIndexOf=cre,he.sortedLastIndex=dre,he.sortedLastIndexBy=fre,he.sortedLastIndexOf=hre,he.startCase=Zoe,he.startsWith=Goe,he.subtract=Qae,he.sum=Hae,he.sumBy=Wae,he.template=Koe,he.times=kae,he.toFinite=Ec,he.toInteger=nr,he.toLength=r3,he.toLower=Joe,he.toNumber=qs,he.toSafeInteger=Jie,he.toString=zr,he.toUpper=eae,he.trim=tae,he.trimEnd=nae,he.trimStart=rae,he.truncate=iae,he.unescape=oae,he.uniqueId=Aae,he.upperCase=aae,he.upperFirst=UE,he.each=QI,he.eachRight=HI,he.first=FI,XE(he,function(){var v={};return bu(he,function(_,k){Xr.call(he.prototype,k)||(v[k]=_)}),v}(),{chain:!1}),he.VERSION=r,js(["bind","bindKey","curry","curryRight","partial","partialRight"],function(v){he[v].placeholder=he}),js(["drop","take"],function(v,_){Or.prototype[v]=function(k){k=k===n?1:no(nr(k),0);var H=this.__filtered__&&!_?new Or(this):this.clone();return H.__filtered__?H.__takeCount__=Yo(k,H.__takeCount__):H.__views__.push({size:Yo(k,K),type:v+(H.__dir__<0?"Right":"")}),H},Or.prototype[v+"Right"]=function(k){return this.reverse()[v](k).reverse()}}),js(["filter","map","takeWhile"],function(v,_){var k=_+1,H=k==W||k==I;Or.prototype[v]=function(ne){var ye=this.clone();return ye.__iteratees__.push({iteratee:Pn(ne,3),type:k}),ye.__filtered__=ye.__filtered__||H,ye}}),js(["head","last"],function(v,_){var k="take"+(_?"Right":"");Or.prototype[v]=function(){return this[k](1).value()[0]}}),js(["initial","tail"],function(v,_){var k="drop"+(_?"":"Right");Or.prototype[v]=function(){return this.__filtered__?new Or(this):this[k](1)}}),Or.prototype.compact=function(){return this.filter(Ia)},Or.prototype.find=function(v){return this.filter(v).head()},Or.prototype.findLast=function(v){return this.reverse().find(v)},Or.prototype.invokeMap=ar(function(v,_){return typeof v=="function"?new Or(this):this.map(function(k){return Sv(k,v,_)})}),Or.prototype.reject=function(v){return this.filter(B_(Pn(v)))},Or.prototype.slice=function(v,_){v=nr(v);var k=this;return k.__filtered__&&(v>0||_<0)?new Or(k):(v<0?k=k.takeRight(-v):v&&(k=k.drop(v)),_!==n&&(_=nr(_),k=_<0?k.dropRight(-_):k.take(_-v)),k)},Or.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},Or.prototype.toArray=function(){return this.take(K)},bu(Or.prototype,function(v,_){var k=/^(?:filter|find|map|reject)|While$/.test(_),H=/^(?:head|last)$/.test(_),ne=he[H?"take"+(_=="last"?"Right":""):_],ye=H||/^find/.test(_);!ne||(he.prototype[_]=function(){var Ne=this.__wrapped__,Fe=H?[1]:arguments,Ue=Ne instanceof Or,vt=Fe[0],bt=Ue||Yn(Ne),Ct=function(mr){var xr=ne.apply(he,hd([mr],Fe));return H&&Qt?xr[0]:xr};bt&&k&&typeof vt=="function"&&vt.length!=1&&(Ue=bt=!1);var Qt=this.__chain__,vn=!!this.__actions__.length,$n=ye&&!Qt,or=Ue&&!vn;if(!ye&&bt){Ne=or?Ne:new Or(this);var Nn=v.apply(Ne,Fe);return Nn.__actions__.push({func:N_,args:[Ct],thisArg:n}),new Qs(Nn,Qt)}return $n&&or?v.apply(this,Fe):(Nn=this.thru(Ct),$n?H?Nn.value()[0]:Nn.value():Nn)})}),js(["pop","push","shift","sort","splice","unshift"],function(v){var _=a_[v],k=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",H=/^(?:pop|shift)$/.test(v);he.prototype[v]=function(){var ne=arguments;if(H&&!this.__chain__){var ye=this.value();return _.apply(Yn(ye)?ye:[],ne)}return this[k](function(Ne){return _.apply(Yn(Ne)?Ne:[],ne)})}}),bu(Or.prototype,function(v,_){var k=he[_];if(k){var H=k.name+"";Xr.call(Dp,H)||(Dp[H]=[]),Dp[H].push({name:_,func:k})}}),Dp[T_(n,b).name]=[{name:"wrapper",func:n}],Or.prototype.clone=ote,Or.prototype.reverse=ate,Or.prototype.value=ste,he.prototype.at=Lre,he.prototype.chain=Ire,he.prototype.commit=Bre,he.prototype.next=Fre,he.prototype.plant=jre,he.prototype.reverse=zre,he.prototype.toJSON=he.prototype.valueOf=he.prototype.value=Qre,he.prototype.first=he.prototype.head,mv&&(he.prototype[mv]=Vre),he},Rp=Bee();Xf?((Xf.exports=Rp)._=Rp,YC._=Rp):To._=Rp}).call(Mi)})(_A,_A.exports);var $qe=_A.exports;const Nqe={style:{display:"flex","align-items":"center"}},Dqe={__name:"FlowTable",props:["lf","root"],emits:["new","close","open","operate"],setup(t,{emit:e}){const{lf:n,root:r}=t,i=F(""),o=F(""),a=F([]),s=F(!1),l=F({}),u=F({page:1,size:20,total:0}),c=T=>{u.value.size=T,u.value.page=1,f()},d=T=>{u.value.page=T,f()},f=()=>{let T=n.getEditorSetting().url+n.getEditorSetting().chainsApi;T=T+`?&root=${r}&keywords=${i.value}&disabled=${o.value}&size=${u.value.size}&page=${u.value.page}`,fetch(T).then(P=>P.json()).then(P=>{a.value=(P==null?void 0:P.items)||[],u.value.total=P.total||20}).catch(P=>{Vr.error(P.message)})},h=$qe.debounce(()=>{f()},300),m=()=>{f()};Bt(()=>{f()});const g=(T,P)=>{var A,D;return((D=(A=T.ruleChain)==null?void 0:A.additionalInfo)==null?void 0:D.updateTime)||""},y=T=>{var A,D;let P=(A=T==null?void 0:T.metadata)==null?void 0:A.endpoints;if(P&&P.length>0){let N=P[0].type||"";return((D=n.nodeComponents()[N])==null?void 0:D.icon)||"/images/endpoint/endpoints.svg"}return"/images/endpoint/endpoints.svg"},b=T=>{var A,D;let P=(A=T==null?void 0:T.metadata)==null?void 0:A.endpoints;if(P&&P.length>0){let N=P[0].type||"";return((D=n.nodeComponents()[N])==null?void 0:D.label)||N}return""},w=()=>{let T={id:SS(12),name:(r?"\u6D41\u7A0B":"\u5B50\u6D41\u7A0B")+u.value.total||1,root:r,additionalInfo:{description:""}};l.value.updateDefault(T),s.value=!0},O=T=>{s.value=!1,e("new",T)},S=()=>{s.value=!1},x=T=>{e("open",T)},C=T=>{Mw.confirm(`\u786E\u5B9A${T.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"} ${T.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{let P=n.getEditorSetting().url+n.getEditorSetting().chainsApi;fetch(P+`/${T.id}/operate/${T.disabled?"start":"stop"}`,{method:"POST"}).then(A=>A.ok?A.text():A.text().then(D=>{throw new Error(`${D}`)})).then(A=>{Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate",T.id,T.disabled?"start":"stop"),f()}).catch(A=>{Vr.error(`${T.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"}\u5931\u8D25: ${A.message}`)})})},E=T=>{Mw.confirm(`\u786E\u5B9A\u5220\u9664 ${T.ruleChain.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{let P=n.getEditorSetting().url+n.getEditorSetting().chainsApi;fetch(P+"/"+T.ruleChain.id,{method:"DELETE"}).then(A=>{A.ok?(Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate","delete"),f()):Vr.error(`\u5220\u9664\u5931\u8D25: ${A.statusText}`)}).catch(A=>{Vr.error(`\u5220\u9664\u5931\u8D25: ${A.message}`)})})};return(T,P)=>{const A=lr,D=ho,N=Yc,$=Ol,W=hi,L=fo,I=$b,U=mU,Q=Ui,V=Bs,q=Rb,K=eC;return R(),G(ct,null,[B(p(EH),{locale:p(Uq)},{default:z(()=>[B(L,null,{default:z(()=>[B(D,{span:4},{default:z(()=>[B(A,{type:"primary",onClick:w},{default:z(()=>[qe(je(t.root?"\u65B0\u5EFA\u6D41\u7A0B":"\u65B0\u5EFA\u5B50\u6D41\u7A0B"),1)]),_:1})]),_:1}),B(D,{span:8,offset:12,style:{display:"flex","justify-content":"space-between"}},{default:z(()=>[B($,{modelValue:o.value,"onUpdate:modelValue":P[0]||(P[0]=ie=>o.value=ie),clearable:"",placeholder:"\u72B6\u6001",style:{width:"50%"},onChange:m},{default:z(()=>[B(N,{label:"\u505C\u7528\u4E2D",value:"true"}),B(N,{label:"\u8FD0\u884C\u4E2D",value:"false"})]),_:1},8,["modelValue"]),B(W,{"prefix-icon":p(c$),modelValue:i.value,"onUpdate:modelValue":P[1]||(P[1]=ie=>i.value=ie),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57",onInput:p(h)},null,8,["prefix-icon","modelValue","onInput"])]),_:1})]),_:1}),B(q,{data:a.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:z(()=>[B(I,{prop:"ruleChain.id",label:"ID"}),B(I,{prop:"ruleChain.name",label:"\u540D\u79F0"},{default:z(ie=>[J("div",Nqe,[qe(je(ie.row.ruleChain.name)+" ",1),t.root&&b(ie.row)?(R(),we(Q,{key:0,class:"box-item",effect:"dark",content:`\u89E6\u53D1\u5668:${b(ie.row)||"\u624B\u52A8\u89E6\u53D1"}`,placement:"bottom-start"},{default:z(()=>[t.root?(R(),we(U,{key:0,style:{"margin-left":"8px",width:"20px",height:"20px"},src:y(ie.row),fit:"cover"},null,8,["src"])):_e("",!0)]),_:2},1032,["content"])):_e("",!0)])]),_:1}),B(I,{prop:"ruleChain.disabled",label:"\u72B6\u6001"},{default:z(ie=>{var oe,Se,ke,Y;return[B(V,{type:ie.row.ruleChain.disabled?"info":"success"},{default:z(()=>[qe(je(ie.row.ruleChain.disabled?"\u505C\u7528\u4E2D":"\u8FD0\u884C\u4E2D"),1)]),_:2},1032,["type"]),(Se=(oe=ie.row.ruleChain)==null?void 0:oe.additionalInfo)!=null&&Se.message?(R(),we(Q,{key:0,class:"box-item",effect:"dark",content:(Y=(ke=ie.row.ruleChain)==null?void 0:ke.additionalInfo)==null?void 0:Y.message,placement:"bottom-start"},{default:z(()=>[B(A,{type:"text",size:"small"},{default:z(()=>[qe("\u67E5\u770B\u4FE1\u606F")]),_:1})]),_:2},1032,["content"])):_e("",!0)]}),_:1}),B(I,{formatter:g,label:"\u66F4\u65B0\u65F6\u95F4"}),B(I,{fixed:"right",label:"\u64CD\u4F5C","min-width":"120"},{default:z(ie=>[B(A,{link:"",icon:p(VQ),type:"primary",size:"small",onClick:oe=>x(ie.row)},{default:z(()=>[qe(" \u8BBE\u8BA1 ")]),_:2},1032,["icon","onClick"]),B(A,{link:"",icon:ie.row.ruleChain.disabled?p(zCe):p(PCe),type:ie.row.ruleChain.disabled?"success":"danger",size:"small",onClick:oe=>C(ie.row.ruleChain)},{default:z(()=>[qe(je(ie.row.ruleChain.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"),1)]),_:2},1032,["icon","type","onClick"]),B(A,{link:"",icon:p(l$),type:"danger",size:"small",onClick:oe=>E(ie.row)},{default:z(()=>[qe("\u5220\u9664")]),_:2},1032,["icon","onClick"])]),_:1})]),_:1},8,["data"]),B(K,{currentPage:u.value.page,"onUpdate:currentPage":P[2]||(P[2]=ie=>u.value.page=ie),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"])]),_:1},8,["locale"]),B($X,{ref_key:"newFlowDialogRef",ref:l,lf:t.lf,show:s.value,onSubmit:O,onClose:S},null,8,["lf","show"])],64)}}};var MF=Pl(Dqe,[["__scopeId","data-v-1f5efb6c"]]);const Lqe={__name:"NewOrOpenFlowDialog",props:["show","lf"],emits:["new","open","close"],setup(t,{emit:e}){const n=F("flows");F(!1);const r=s=>{e("new",s)},i=s=>{e("open",s)},o=(s,l)=>{e("operate",s,l)},a=()=>{e("close")};return(s,l)=>{const u=ho,c=fo,d=Sp,f=wp,h=Ma;return R(),we(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":a,modelValue:t.show},{header:z(()=>[B(c,null,{default:z(()=>[B(u,{span:12},{default:z(()=>[qe("\u65B0\u5EFA/\u6253\u5F00\u89C4\u5219\u94FE")]),_:1})]),_:1})]),default:z(()=>[B(f,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=m=>n.value=m)},{default:z(()=>[B(d,{label:"\u6D41\u7A0B\u5217\u8868",name:"flows"},{default:z(()=>[B(MF,{lf:t.lf,root:!0,onNew:r,onOpen:i,onClose:a,onOperate:o},null,8,["lf"])]),_:1}),B(d,{label:"\u5B50\u6D41\u7A0B\u5217\u8868",name:"subFlows"},{default:z(()=>[B(MF,{lf:t.lf,root:!1,onNew:r,onOpen:i,onClose:a,onOperate:o},null,8,["lf"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}};var NX={exports:{}};(function(t,e){(function(n,r){r()})(Mi,function(){function n(u,c){return typeof c=="undefined"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,c,d){var f=new XMLHttpRequest;f.open("GET",u),f.responseType="blob",f.onload=function(){l(f.response,c,d)},f.onerror=function(){console.error("could not download file")},f.send()}function i(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Mi=="object"&&Mi.global===Mi?Mi:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,c,d){var f=a.URL||a.webkitURL,h=document.createElement("a");c=c||u.name||"download",h.download=c,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?o(h):i(h.href)?r(u,c,d):o(h,h.target="_blank")):(h.href=f.createObjectURL(u),setTimeout(function(){f.revokeObjectURL(h.href)},4e4),setTimeout(function(){o(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,d){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,d),c);else if(i(u))r(u,c,d);else{var f=document.createElement("a");f.href=u,f.target="_blank",setTimeout(function(){o(f)})}}:function(u,c,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof u=="string")return r(u,c,d);var h=u.type==="application/octet-stream",m=/constructor/i.test(a.HTMLElement)||a.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||h&&m||s)&&typeof FileReader!="undefined"){var y=new FileReader;y.onloadend=function(){var O=y.result;O=g?O:O.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=O:location=O,f=null},y.readAsDataURL(u)}else{var b=a.URL||a.webkitURL,w=b.createObjectURL(u);f?f.location=w:location.href=w,f=null,setTimeout(function(){b.revokeObjectURL(w)},4e4)}});a.saveAs=l.saveAs=l,t.exports=l})})(NX);let OA=[],DX=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?DX:OA).push(n=n+t[e])})();function Iqe(t){if(t<768)return!1;for(let e=0,n=OA.length;;){let r=e+n>>1;if(t<OA[r])n=r;else if(t>=DX[r])e=r+1;else return!0;if(e==n)return!1}}function RF(t){return t>=127462&&t<=127487}const $F=8205;function Bqe(t,e,n=!0,r=!0){return(n?LX:Fqe)(t,e,r)}function LX(t,e,n){if(e==t.length)return e;e&&IX(t.charCodeAt(e))&&BX(t.charCodeAt(e-1))&&e--;let r=s2(t,e);for(e+=NF(r);e<t.length;){let i=s2(t,e);if(r==$F||i==$F||n&&Iqe(i))e+=NF(i),r=i;else if(RF(i)){let o=0,a=e-2;for(;a>=0&&RF(s2(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function Fqe(t,e,n){for(;e>0;){let r=LX(t,e-2,n);if(r<e)return r;e--}return 0}function s2(t,e){let n=t.charCodeAt(e);if(!BX(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return IX(r)?(n-55296<<10)+(r-56320)+65536:n}function IX(t){return t>=56320&&t<57344}function BX(t){return t>=55296&&t<56320}function NF(t){return t<65536?1:2}class Mr{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Om(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Iu.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Om(this,e,n);let r=[];return this.decompose(e,n,r,0),Iu.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Hy(this),o=new Hy(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Hy(this,e)}iterRange(e,n=this.length){return new FX(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new VX(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Mr.empty:e.length<=32?new Vi(e):Iu.from(Vi.split(e,[]))}}class Vi extends Mr{constructor(e,n=Vqe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new jqe(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Vi(DF(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=V1(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new Vi(s,a.length+o.length));else{let l=s.length>>1;r.push(new Vi(s.slice(0,l)),new Vi(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Vi))return super.replace(e,n,r);[e,n]=Om(this,e,n);let i=V1(this.text,V1(r.text,DF(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Vi(i,o):Iu.from(Vi.split(i,[]),o)}sliceString(e,n=this.length,r=`
  158. `){[e,n]=Om(this,e,n);let i="";for(let o=0,a=0;o<=n&&a<this.text.length;a++){let s=this.text[a],l=o+s.length;o>e&&a&&(i+=r),e<l&&n>o&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Vi(r,i)),r=[],i=-1);return i>-1&&n.push(new Vi(r,i)),n}}class Iu extends Mr{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o<this.children.length;o++){let s=this.children[o],l=a+s.length;if(e<=l&&n>=a){let u=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!u?r.push(s):s.decompose(e-a,n-a,r,u)}a=l+1}}replace(e,n,r){if([e,n]=Om(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let a=this.children[i],s=o+a.length;if(e>=o&&n<=s){let l=a.replace(e-o,n-o,r),u=this.lines-a.lines+l.lines;if(l.lines<u>>5-1&&l.lines>u>>5+1){let c=this.children.slice();return c[i]=l,new Iu(c,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
  159. `){[e,n]=Om(this,e,n);let i="";for(let o=0,a=0;o<this.children.length&&a<=n;o++){let s=this.children[o],l=a+s.length;a>e&&o&&(i+=r),e<l&&n>a&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Iu))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],u=e.children[o];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let m of e)m.flatten(h);return new Vi(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,u=-1,c=[];function d(h){let m;if(h.lines>o&&h instanceof Iu)for(let g of h.children)d(g);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof Vi&&l&&(m=c[c.length-1])instanceof Vi&&h.lines+m.lines<=32?(l+=h.lines,u+=h.length+1,c[c.length-1]=new Vi(m.text.concat(h.text),m.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,u+=h.length+1,c.push(h))}function f(){l!=0&&(s.push(c.length==1?c[0]:Iu.from(c,u)),u=-1,l=c.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new Iu(s,n)}}Mr.empty=new Vi([""],0);function Vqe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function V1(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o<t.length&&i<=r;o++){let s=t[o],l=i+s.length;l>=n&&(l>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(e[e.length-1]+=s,a=!1):e.push(s)),i=l+1}return e}function DF(t,e,n){return V1(t,[""],e,n)}class Hy{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Vi?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof Vi?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
  160. `,this;e--}else if(i instanceof Vi){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Vi?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class FX{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Hy(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class VX{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(Mr.prototype[Symbol.iterator]=function(){return this.iter()},Hy.prototype[Symbol.iterator]=FX.prototype[Symbol.iterator]=VX.prototype[Symbol.iterator]=function(){return this});class jqe{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Om(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Io(t,e,n=!0,r=!0){return Bqe(t,e,n,r)}function zqe(t){return t>=56320&&t<57344}function Qqe(t){return t>=55296&&t<56320}function za(t,e){let n=t.charCodeAt(e);if(!Qqe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return zqe(r)?(n-55296<<10)+(r-56320)+65536:n}function JN(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Bu(t){return t<65536?1:2}const wA=/\r\n?|\n/;var No=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(No||(No={}));class Xu{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],a=this.sections[n++];a<0?(e(r,i,o),i+=o):i+=a,r+=o}}iterChangedRanges(e,n=!1){SA(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Xu(e)}composeDesc(e){return this.empty?e:e.empty?this:jX(this,e)}mapDesc(e,n=!1){return e.empty?this:xA(this,e,n)}mapPos(e,n=-1,r=No.Simple){let i=0,o=0;for(let a=0;a<this.sections.length;){let s=this.sections[a++],l=this.sections[a++],u=i+s;if(l<0){if(u>e)return o+(e-i);o+=s}else{if(r!=No.Simple&&u>=e&&(r==No.TrackDel&&i<e&&u>e||r==No.TrackBefore&&i<e||r==No.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],a=this.sections[r++],s=i+o;if(a>=0&&i<=n&&s>=e)return i<e&&s>n?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Xu(e)}static create(e){return new Xu(e)}}class oo extends Xu{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return SA(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return xA(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let a=n[i],s=n[i+1];if(s>=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length<l;)r.push(Mr.empty);r.push(a?e.slice(o,o+a):Mr.empty)}o+=a}return new oo(n,r)}compose(e){return this.empty?e:e.empty?this:jX(this,e,!0)}map(e,n=!1){return e.empty?this:xA(this,e,n,!0)}iterChanges(e,n=!1){SA(this,e,n)}get desc(){return Xu.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new j0(this);e:for(let a=0,s=0;;){let l=a==e.length?1e9:e[a++];for(;s<l||s==l&&o.len==0;){if(o.done)break e;let c=Math.min(o.len,l-s);Jo(i,c,-1);let d=o.ins==-1?-1:o.off==0?o.ins:0;Jo(n,c,d),d>0&&qd(r,n,o.text),o.forward(c),s+=c}let u=e[a++];for(;s<u;){if(o.done)break e;let c=Math.min(o.len,u-s);Jo(n,c,-1),Jo(i,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),s+=c}}return{changes:new oo(n,r),filtered:Xu.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(c=!1){if(!c&&!i.length)return;a<n&&Jo(i,n-a,-1);let d=new oo(i,o);s=s?s.compose(d.map(s)):d,i=[],o=[],a=0}function u(c){if(Array.isArray(c))for(let d of c)u(d);else if(c instanceof oo){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);l(),s=s?s.compose(c.map(s)):c}else{let{from:d,to:f=d,insert:h}=c;if(d>f||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let m=h?typeof h=="string"?Mr.of(h.split(r||wA)):h:Mr.empty,g=m.length;if(d==f&&g==0)return;d<a&&l(),d>a&&Jo(i,d-a,-1),Jo(i,f-d,g),qd(o,i,m),a=f}}return u(e),l(!s),s}static empty(e){return new oo(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((a,s)=>s&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Mr.empty);r[i]=Mr.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new oo(n,r)}static createSet(e,n){return new oo(e,n)}}function Jo(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function qd(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Mr.empty);t.push(n)}}function SA(t,e,n){let r=t.inserted;for(let i=0,o=0,a=0;a<t.sections.length;){let s=t.sections[a++],l=t.sections[a++];if(l<0)i+=s,o+=s;else{let u=i,c=o,d=Mr.empty;for(;u+=s,c+=l,l&&r&&(d=d.append(r[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,u,o,c,d),i=u,o=c}}}function xA(t,e,n,r=!1){let i=[],o=r?[]:null,a=new j0(t),s=new j0(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let u=Math.min(a.len,s.len);Jo(i,u,-1),a.forward(u),s.forward(u)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len<a.len||s.len==a.len&&!n))){let u=s.len;for(Jo(i,s.ins,-1);u;){let c=Math.min(a.len,u);a.ins>=0&&l<a.i&&a.len<=c&&(Jo(i,0,a.ins),o&&qd(o,i,a.text),l=a.i),a.forward(c),u-=c}s.next()}else if(a.ins>=0){let u=0,c=a.len;for(;c;)if(s.ins==-1){let d=Math.min(c,s.len);u+=d,c-=d,s.forward(d)}else if(s.ins==0&&s.len<c)c-=s.len,s.next();else break;Jo(i,u,l<a.i?a.ins:0),o&&l<a.i&&qd(o,i,a.text),l=a.i,a.forward(a.len-c)}else{if(a.done&&s.done)return o?oo.createSet(i,o):Xu.create(i);throw new Error("Mismatched change set lengths")}}}function jX(t,e,n=!1){let r=[],i=n?[]:null,o=new j0(t),a=new j0(e);for(let s=!1;;){if(o.done&&a.done)return i?oo.createSet(r,i):Xu.create(r);if(o.ins==0)Jo(r,o.len,0,s),o.next();else if(a.len==0&&!a.done)Jo(r,0,a.ins,s),i&&qd(i,r,a.text),a.next();else{if(o.done||a.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,a.len),u=r.length;if(o.ins==-1){let c=a.ins==-1?-1:a.off?0:a.ins;Jo(r,l,c,s),i&&c&&qd(i,r,a.text)}else a.ins==-1?(Jo(r,o.off?0:o.len,l,s),i&&qd(i,r,o.textBit(l))):(Jo(r,o.off?0:o.len,a.off?0:a.ins,s),i&&!a.off&&qd(i,r,a.text));s=(o.ins>l||a.ins>=0&&a.len>l)&&(s||r.length>u),o.forward2(l),a.forward(l)}}}}class j0{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Mr.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Mr.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Dh{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Dh(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return yt.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return yt.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return yt.range(e.anchor,e.head)}static create(e,n,r){return new Dh(e,n,r)}}class yt{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:yt.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new yt([this.main],0)}addRange(e,n=!0){return yt.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,yt.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new yt(e.ranges.map(n=>Dh.fromJSON(n)),e.main)}static single(e,n=e){return new yt([yt.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return yt.normalized(e.slice(),n);r=o.to}return new yt(e,n)}static cursor(e,n=0,r,i){return Dh.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i!=null?i:16777215)<<6)}static range(e,n,r,i){let o=(r!=null?r:16777215)<<6|(i==null?7:Math.min(6,i));return n<e?Dh.create(n,e,48|o):Dh.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],a=e[i-1];if(o.empty?o.from<=a.to:o.from<a.to){let s=a.from,l=Math.max(o.to,a.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?yt.range(l,s):yt.range(s,l))}}return new yt(e,n)}}function zX(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let eD=0;class Xt{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=eD++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Xt(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:tD),!!e.static,e.enables)}of(e){return new j1([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new j1(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new j1(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function tD(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class j1{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=eD++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:(((n=e[d.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||CA(d,c)){let h=r(d);if(s?!LF(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,m=f.config.address[o];if(m!=null){let g=CS(f,m);if(this.dependencies.every(y=>y instanceof Xt?f.facet(y)===d.facet(y):y instanceof So?f.field(y,!1)==d.field(y,!1):!0)||(s?LF(h=r(d),g,i):i(h=r(d),g)))return d.values[a]=g,0}else h=r(d);return d.values[a]=h,1}}}}function LF(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function CA(t,e){let n=!1;for(let r of e)Wy(t,r)&1&&(n=!0);return n}function Hqe(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let u=[];for(let c=0;c<r.length;c++){let d=CS(l,r[c]);if(i[c]==2)for(let f of d)u.push(f);else u.push(d)}return e.combine(u)}return{create(l){for(let u of r)Wy(l,u);return l.values[a]=s(l),1},update(l,u){if(!CA(l,o))return 0;let c=s(l);return e.compare(c,l.values[a])?0:(l.values[a]=c,1)},reconfigure(l,u){let c=CA(l,r),d=u.config.facets[e.id],f=u.facet(e);if(d&&!c&&tD(n,d))return l.values[a]=f,0;let h=s(l);return e.compare(h,f)?(l.values[a]=f,0):(l.values[a]=h,1)}}}const IF=Xt.define({static:!0});class So{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new So(eD++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(IF).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,IF.of({field:this,create:e})]}get extension(){return this}}const Ch={lowest:4,low:3,default:2,high:1,highest:0};function Hv(t){return e=>new QX(e,t)}const Hf={highest:Hv(Ch.highest),high:Hv(Ch.high),default:Hv(Ch.default),low:Hv(Ch.low),lowest:Hv(Ch.lowest)};class QX{constructor(e,n){this.inner=e,this.prec=n}}class zb{of(e){return new EA(this,e)}reconfigure(e){return zb.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class EA{constructor(e,n){this.compartment=e,this.inner=n}}class xS{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of Wqe(e,n,a))f instanceof So?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],u=[];for(let f of i)s[f.id]=u.length<<1,u.push(h=>f.slot(h));let c=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],m=h[0].facet,g=c&&c[f]||[];if(h.every(y=>y.type==0))if(s[m.id]=l.length<<1|1,tD(g,h))l.push(r.facet(m));else{let y=m.combine(h.map(b=>b.value));l.push(r&&m.compare(y,r.facet(m))?r.facet(m):y)}else{for(let y of h)y.type==0?(s[y.id]=l.length<<1|1,l.push(y.value)):(s[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));s[m.id]=u.length<<1,u.push(y=>Hqe(y,m,h))}}let d=u.map(f=>f(s));return new xS(e,a,d,s,l,o)}}function Wqe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let u=r[l].indexOf(a);u>-1&&r[l].splice(u,1),a instanceof EA&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let u of a)o(u,s);else if(a instanceof EA){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(a.compartment)||a.inner;n.set(a.compartment,u),o(u,s)}else if(a instanceof QX)o(a.inner,a.prec);else if(a instanceof So)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof j1)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,Ch.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,s)}}return o(t,Ch.default),r.reduce((a,s)=>a.concat(s))}function Wy(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function CS(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const HX=Xt.define(),TA=Xt.define({combine:t=>t.some(e=>e),static:!0}),WX=Xt.define({combine:t=>t.length?t[0]:void 0,static:!0}),UX=Xt.define(),qX=Xt.define(),YX=Xt.define(),XX=Xt.define({combine:t=>t.length?t[0]:!1});class cd{constructor(e,n){this.type=e,this.value=n}static define(){return new Uqe}}class Uqe{of(e){return new cd(this,e)}}class qqe{constructor(e){this.map=e}of(e){return new Wn(this,e)}}class Wn{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Wn(this.type,n)}is(e){return this.type==e}static define(e={}){return new qqe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Wn.reconfigure=Wn.define();Wn.appendConfig=Wn.define();class Zi{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&zX(r,n.newLength),o.some(s=>s.type==Zi.time)||(this.annotations=o.concat(Zi.time.of(Date.now())))}static create(e,n,r,i,o,a){return new Zi(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Zi.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Zi.time=cd.define();Zi.userEvent=cd.define();Zi.addToHistory=cd.define();Zi.remote=cd.define();function Yqe(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],a=t[r++];else if(i<e.length)o=e[i++],a=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function ZX(t,e,n){var r;let i,o,a;return n?(i=e.changes,o=oo.empty(e.changes.length),a=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(i)),{changes:a,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Wn.mapEffects(t.effects,i).concat(Wn.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function kA(t,e,n){let r=e.selection,i=Dg(e.annotations);return e.userEvent&&(i=i.concat(Zi.userEvent.of(e.userEvent))),{changes:e.changes instanceof oo?e.changes:oo.of(e.changes||[],n,t.facet(WX)),selection:r&&(r instanceof yt?r:yt.single(r.anchor,r.head)),effects:Dg(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function GX(t,e,n){let r=kA(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let a=!!e[o].sequential;r=ZX(r,kA(t,e[o],a?r.changes.newLength:t.doc.length),a)}let i=Zi.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Zqe(n?Xqe(i):i)}function Xqe(t){let e=t.startState,n=!0;for(let i of e.facet(UX)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:Yqe(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=oo.empty(e.doc.length);else{let a=t.changes.filter(n);i=a.changes,o=a.filtered.mapDesc(a.changes).invertedDesc}t=Zi.create(e,i,t.selection&&t.selection.map(o),Wn.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(qX);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof Zi?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Zi?t=o[0]:t=GX(e,Dg(o),!1)}return t}function Zqe(t){let e=t.startState,n=e.facet(YX),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=ZX(r,kA(e,o,t.changes.newLength),!0))}return r==t?t:Zi.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const Gqe=[];function Dg(t){return t==null?Gqe:Array.isArray(t)?t:[t]}var xi=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(xi||(xi={}));const Kqe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let PA;try{PA=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Jqe(t){if(PA)return PA.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||Kqe.test(n)))return!0}return!1}function eYe(t){return e=>{if(!/\S/.test(e))return xi.Space;if(Jqe(e))return xi.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return xi.Word;return xi.Other}}class vr{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;s<this.config.dynamicSlots.length;s++)Wy(this,s<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Wy(this,r),CS(this,r)}update(...e){return GX(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let s of e.effects)s.is(zb.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,u)=>i.set(u,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(Wn.reconfigure)?(n=null,r=s.value):s.is(Wn.appendConfig)&&(n=null,r=Dg(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=xS.resolve(r,i,this),o=new vr(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let a=e.startState.facet(TA)?e.newSelection:e.newSelection.asSingle();new vr(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:yt.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=Dg(r.effects);for(let s=1;s<n.ranges.length;s++){let l=e(n.ranges[s]),u=this.changes(l.changes),c=u.map(i);for(let f=0;f<s;f++)o[f]=o[f].map(c);let d=i.mapDesc(u,!0);o.push(l.range.map(d)),i=i.compose(c),a=Wn.mapEffects(a,c).concat(Wn.mapEffects(Dg(l.effects),d))}return{changes:i,selection:yt.create(o,n.mainIndex),effects:a}}changes(e=[]){return e instanceof oo?e:oo.of(e,this.doc.length,this.facet(vr.lineSeparator))}toText(e){return Mr.of(e.split(this.facet(vr.lineSeparator)||wA))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Wy(this,n),CS(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof So&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let a=r[o],s=e[o];i.push(a.init(l=>a.spec.fromJSON(s,l)))}}return vr.create({doc:e.doc,selection:yt.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=xS.resolve(e.extensions||[],new Map),r=e.doc instanceof Mr?e.doc:Mr.of((e.doc||"").split(n.staticFacet(vr.lineSeparator)||wA)),i=e.selection?e.selection instanceof yt?e.selection:yt.single(e.selection.anchor,e.selection.head):yt.single(0);return zX(i,r.length),n.staticFacet(TA)||(i=i.asSingle()),new vr(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(vr.tabSize)}get lineBreak(){return this.facet(vr.lineSeparator)||`
  161. `}get readOnly(){return this.facet(XX)}phrase(e,...n){for(let r of this.facet(vr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(HX))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return eYe(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=Io(n,a,!1);if(o(n.slice(l,a))!=xi.Word)break;a=l}for(;s<i;){let l=Io(n,s);if(o(n.slice(s,l))!=xi.Word)break;s=l}return a==s?null:yt.range(a+r,s+r)}}vr.allowMultipleSelections=TA;vr.tabSize=Xt.define({combine:t=>t.length?t[0]:4});vr.lineSeparator=WX;vr.readOnly=XX;vr.phrases=Xt.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});vr.languageData=HX;vr.changeFilter=UX;vr.transactionFilter=qX;vr.transactionExtender=YX;zb.reconfigure=Wn.define();function gc(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class up{eq(e){return this==e}range(e,n=e){return z0.create(e,n,this)}}up.prototype.startSide=up.prototype.endSide=0;up.prototype.point=!1;up.prototype.mapMode=No.TrackDel;class z0{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new z0(e,n,r)}}function AA(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class nD{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,u=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return u>=0?a:s;u>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);o<a;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],a=-1,s=-1;for(let l=0;l<this.value.length;l++){let u=this.value[l],c=this.from[l]+e,d=this.to[l]+e,f,h;if(c==d){let m=n.mapPos(c,u.startSide,u.mapMode);if(m==null||(f=h=m,u.startSide!=u.endSide&&(h=n.mapPos(c,u.endSide),h<f)))continue}else if(f=n.mapPos(c,u.startSide),h=n.mapPos(d,u.endSide),f>h||f==h&&u.startSide>0&&u.endSide<=0)continue;(h-f||u.endSide-u.startSide)<0||(a<0&&(a=f),u.point&&(s=Math.max(s,h-f)),r.push(u),i.push(f-a),o.push(h-a))}return{mapped:r.length?new nD(i,o,r,s):null,pos:a}}}class Ar{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ar(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(AA)),this.isEmpty)return n.length?Ar.of(n):this;let s=new KX(this,null,-1).goto(0),l=0,u=[],c=new Sf;for(;s.value||l<n.length;)if(l<n.length&&(s.from-n[l].from||s.startSide-n[l].value.startSide)>=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(s.chunkIndex)<n[l].from)&&(!a||i>this.chunkEnd(s.chunkIndex)||o<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!a||i>s.to||o<s.from||a(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||u.push(z0.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?Ar.empty:this.nextLayer.update({add:u,filter:a,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let a=0;a<this.chunk.length;a++){let s=this.chunkPos[a],l=this.chunk[a],u=e.touchesRange(s,s+l.length);if(u===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(s));else if(u===!0){let{mapped:c,pos:d}=l.map(s,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(d))}}let o=this.nextLayer.map(e);return n.length==0?o:new Ar(r,n,o||Ar.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],a=this.chunk[i];if(n>=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Q0.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Q0.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=BF(a,s,r),u=new Wv(a,l,o),c=new Wv(s,l,o);r.iterGaps((d,f,h)=>FF(u,d,c,f,h,i)),r.empty&&r.length==0&&FF(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),a=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=BF(o,a),l=new Wv(o,s,0).goto(r),u=new Wv(a,s,0).goto(r);for(;;){if(l.to!=u.to||!MA(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,n,r,i,o=-1){let a=new Wv(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let u=Math.min(a.to,r);if(a.point){let c=a.activeForPoint(a.to),d=a.pointFrom<n?c.length+1:a.point.startSide<0?c.length:Math.min(c.length,l);i.point(s,u,a.point,c,d,a.pointRank),l=Math.min(a.openEnd(u),c.length)}else u>s&&(i.span(s,u,a.active,l),l=a.openEnd(u));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new Sf;for(let i of e instanceof z0?[e]:n?tYe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ar.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ar.empty;i=i.nextLayer)n=new Ar(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ar.empty=new Ar([],[],null,-1);function tYe(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(AA(e,r)>0)return t.slice().sort(AA);e=r}return t}Ar.empty.nextLayer=Ar.empty;class Sf{finishChunk(e){this.chunks.push(new nD(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Sf)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ar.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ar.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function BF(t,e,n){let r=new Map;for(let o of t)for(let a=0;a<o.chunk.length;a++)o.chunk[a].maxPoint<=0&&r.set(o.chunk[a],o.chunkPos[a]);let i=new Set;for(let o of e)for(let a=0;a<o.chunk.length;a++){let s=r.get(o.chunk[a]);s!=null&&(n?n.mapPos(s):s)==o.chunkPos[a]&&!(n!=null&&n.touchesRange(s,s+o.chunk[a].length))&&i.add(o.chunk[a])}return i}class KX{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Q0{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let a=e[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new KX(a,n,r,o));return i.length==1?i[0]:new Q0(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)l2(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)l2(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),l2(this.heap,0)}}}function l2(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Wv{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Q0.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){VO(this.active,e),VO(this.activeTo,e),VO(this.activeRank,e),this.minActive=VF(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;jO(this.active,n,r),jO(this.activeTo,n,i),jO(this.activeRank,n,o),e&&jO(e,n,this.cursor.from),this.minActive=VF(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&VO(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function FF(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let u=t.to+l-n.to,c=u||t.endSide-n.endSide,d=c<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&MA(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!MA(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(u||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,c<=0&&t.next(),c>=0&&n.next()}}function MA(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function VO(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function jO(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function VF(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function rv(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Io(t,i));return r}function RA(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Io(t,i)}return r===!0?-1:t.length}const $A="\u037C",jF=typeof Symbol=="undefined"?"__"+$A:Symbol.for($A),NA=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),zF=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class xf{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,u){let c=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let m=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(g=>a.map(y=>g.replace(/&/,y))).reduce((g,y)=>g.concat(y)),m,l);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),m,c,f)}else m!=null&&c.push(h.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+m+";")}(c.length||f)&&l.push((r&&!d&&!u?a.map(r):a).join(", ")+" {"+c.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(`
  162. `)}static newName(){let e=zF[jF]||1;return zF[jF]=e+1,$A+e.toString(36)}static mount(e,n,r){let i=e[NA],o=r&&r.nonce;i?o&&i.setNonce(o):i=new nYe(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let QF=new Map;class nYe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=QF.get(r);if(o)return e[NA]=o;this.sheet=new i.CSSStyleSheet,QF.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[NA]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a<e.length;a++){let s=e[a],l=this.modules.indexOf(s);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let u=0;u<s.rules.length;u++)r.insertRule(s.rules[u],i++)}else{for(;o<l;)i+=this.modules[o++].rules.length;i+=s.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
  163. `;this.styleTag.textContent=a;let s=n.head||n;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Cf={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:"'"},H0={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rYe=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),iYe=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ro=0;Ro<10;Ro++)Cf[48+Ro]=Cf[96+Ro]=String(Ro);for(var Ro=1;Ro<=24;Ro++)Cf[Ro+111]="F"+Ro;for(var Ro=65;Ro<=90;Ro++)Cf[Ro]=String.fromCharCode(Ro+32),H0[Ro]=String.fromCharCode(Ro);for(var u2 in Cf)H0.hasOwnProperty(u2)||(H0[u2]=Cf[u2]);function oYe(t){var e=rYe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iYe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?H0:Cf)[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}function W0(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function DA(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function z1(t,e){if(!e.anchorNode)return!1;try{return DA(t,e.anchorNode)}catch{return!1}}function wm(t){return t.nodeType==3?dp(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Uy(t,e,n,r){return n?HF(t,e,n,r,-1)||HF(t,e,n,r,1):!1}function cp(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function ES(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function HF(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:rc(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=cp(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?rc(t):0}else return!1}}function rc(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Qb(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function aYe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function JX(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function sYe(t,e,n,r,i,o,a,s){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let f,h=c==l.body,m=1,g=1;if(h)f=aYe(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();({scaleX:m,scaleY:g}=JX(c,w)),f={left:w.left,right:w.left+c.clientWidth*m,top:w.top,bottom:w.top+c.clientHeight*g}}let y=0,b=0;if(i=="nearest")e.top<f.top?(b=-(f.top-e.top+a),n>0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+a)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+a,n<0&&e.top-b<f.top&&(b=-(f.top+b-e.top+a)));else{let w=e.bottom-e.top,O=f.bottom-f.top;b=(i=="center"&&w<=O?e.top+w/2-O/2:i=="start"||i=="center"&&n<0?e.top-a:e.bottom-O+a)-f.top}if(r=="nearest"?e.left<f.left?(y=-(f.left-e.left+o),n>0&&e.right>f.right+y&&(y=e.right-f.right+y+o)):e.right>f.right&&(y=e.right-f.right+o,n<0&&e.left<f.left+y&&(y=-(f.left+y-e.left+o))):y=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==s?e.left-o:e.right-(f.right-f.left)+o)-f.left,y||b)if(h)u.scrollBy(y,b);else{let w=0,O=0;if(b){let S=c.scrollTop;c.scrollTop+=b/g,O=(c.scrollTop-S)*g}if(y){let S=c.scrollLeft;c.scrollLeft+=y/m,w=(c.scrollLeft-S)*m}e={left:e.left-w,top:e.top-O,right:e.right-w,bottom:e.bottom-O},w&&Math.abs(w-y)<1&&(r="nearest"),O&&Math.abs(O-b)<1&&(i="nearest")}if(h)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function lYe(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class uYe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?rc(n):0),r,Math.min(e.focusOffset,r?rc(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let rg=null;function eZ(t){if(t.setActive)return t.setActive();if(rg)return t.focus(rg);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(rg==null?{get preventScroll(){return rg={preventScroll:!0},!0}}:void 0),!rg){rg=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let WF;function dp(t,e,n=e){let r=WF||(WF=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Lg(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,t.dispatchEvent(a),o.defaultPrevented||a.defaultPrevented}function cYe(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function tZ(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function dYe(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,rc(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=rc(n))}else{if(n==t)return!0;r=cp(n),n=n.parentNode}}function nZ(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function rZ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=rc(n)}else if(n.parentNode&&!ES(n))r=cp(n),n=n.parentNode;else return null}}function iZ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!ES(n))r=cp(n)+1,n=n.parentNode;else return null}}class ra{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new ra(e.parentNode,cp(e),n)}static after(e,n){return new ra(e.parentNode,cp(e)+1,n)}}const rD=[];class oi{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let a of this.children){if(a.flags&7){if(!a.dom&&(o=i?i.nextSibling:r.firstChild)){let s=oi.get(o);(!s||!s.parent&&s.canReuseDOM(a))&&a.reuseDOM(o)}a.sync(e,n),a.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=a.dom&&(n.written=!0),a.dom.parentNode==r)for(;o&&o!=a.dom;)o=UF(o);else r.insertBefore(a.dom,o);i=a.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=UF(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=rc(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!oi.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let a=this.children[i];if(a.dom==r)return o;o+=a.length+a.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,a=-1,s=-1;for(let l=0,u=r,c=r;l<this.children.length;l++){let d=this.children[l],f=u+d.length;if(u<e&&f>n)return d.domBoundsAround(e,n,u);if(f>=e&&i==-1&&(i=l,o=u),u>n&&d.dom.parentNode==this.dom){a=l,s=c;break}c=f,u=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=rD){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new oZ(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}oi.prototype.breakAfter=0;function UF(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class oZ{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function aZ(t,e,n,r,i,o,a,s,l){let{children:u}=t,c=u.length?u[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&c&&!a&&!f&&o.length<2&&c.merge(n,i,o.length?d:null,n==0,s,l))){if(r<u.length){let h=u[r];h&&(i<h.length||h.breakAfter&&(d==null?void 0:d.breakAfter))?(e==r&&(h=h.split(i),i=0),!f&&d&&h.merge(0,i,d,!0,0,l)?o[o.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,l),o.push(h))):h!=null&&h.breakAfter&&(d?d.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,n>0&&(!a&&o.length&&c.merge(n,c.length,o[0],!1,s,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,s,0),e++));e<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:s;else if(u[e].become(o[0]))e++,o.shift(),s=o.length?0:l;else break;!o.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,s,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function sZ(t,e,n,r,i,o){let a=t.childCursor(),{i:s,off:l}=a.findPos(n,1),{i:u,off:c}=a.findPos(e,-1),d=e-n;for(let f of r)d+=f.length;t.length+=d,aZ(t,u,c,s,l,r,0,i,o)}let Qa=typeof navigator!="undefined"?navigator:{userAgent:"",vendor:"",platform:""},LA=typeof document!="undefined"?document:{documentElement:{style:{}}};const IA=/Edge\/(\d+)/.exec(Qa.userAgent),lZ=/MSIE \d/.test(Qa.userAgent),BA=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qa.userAgent),SC=!!(lZ||BA||IA),qF=!SC&&/gecko\/(\d+)/i.test(Qa.userAgent),c2=!SC&&/Chrome\/(\d+)/.exec(Qa.userAgent),YF="webkitFontSmoothing"in LA.documentElement.style,uZ=!SC&&/Apple Computer/.test(Qa.vendor),XF=uZ&&(/Mobile\/\w+/.test(Qa.userAgent)||Qa.maxTouchPoints>2);var Jt={mac:XF||/Mac/.test(Qa.platform),windows:/Win/.test(Qa.platform),linux:/Linux|X11/.test(Qa.platform),ie:SC,ie_version:lZ?LA.documentMode||6:BA?+BA[1]:IA?+IA[1]:0,gecko:qF,gecko_version:qF?+(/Firefox\/(\d+)/.exec(Qa.userAgent)||[0,0])[1]:0,chrome:!!c2,chrome_version:c2?+c2[1]:0,ios:XF,android:/Android\b/.test(Qa.userAgent),webkit:YF,safari:uZ,webkit_version:YF?+(/\bAppleWebKit\/(\d+)/.exec(Qa.userAgent)||[0,0])[1]:0,tabSize:LA.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const fYe=256;class uu extends oi{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof uu)||this.length-(n-e)+r.length>fYe||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new uu(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new ra(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return hYe(this.dom,e,n)}}class Zc extends oi{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(tZ(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof Zc&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&a<=0)?!1:(sZ(this,e,n,r?r.children.slice():[],o-1,a-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let s of this.children){let l=r+s.length;l>e&&n.push(r<e?s.split(e-r):s),i<0&&r>=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Zc(this.mark,n,a)}domAtPos(e){return cZ(this,e)}coordsAt(e,n){return fZ(this,e,n)}}function hYe(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?Jt.chrome||Jt.gecko||(e?(i--,a=1):o<r&&(o++,a=-1)):n<0?i--:o<r&&o++;let s=dp(t,i,o).getClientRects();if(!s.length)return null;let l=s[(a?a<0:n>=0)?0:s.length-1];return Jt.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),a?Qb(l,a<0):l||null}class Yd extends oi{static create(e,n,r){return new Yd(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Yd.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof Yd)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&a<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Yd&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Mr.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Mr.empty}domAtPos(e){return(this.length?e==0:this.side>0)?ra.before(this.dom):ra.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top<o.bottom);s+=a?-1:1);return Qb(o,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Sm extends oi{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Sm&&e.side==this.side}split(){return new Sm(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?ra.before(this.dom):ra.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Mr.empty}get isHidden(){return!0}}uu.prototype.children=Yd.prototype.children=Sm.prototype.children=rD;function cZ(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let a=r[i],s=o+a.length;if(!(s==o&&a.getSide()<=0)){if(e>o&&e<s&&a.dom.parentNode==n)return a.domAtPos(e-o);if(e<=o)break;o=s}}for(let o=i;o>0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o<r.length;o++){let a=r[o];if(a.dom.parentNode==n)return a.domAtPos(0)}return new ra(n,0)}function dZ(t,e,n){let r,{children:i}=t;n>0&&e instanceof Zc&&i.length&&(r=i[i.length-1])instanceof Zc&&r.mark.eq(e.mark)?dZ(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function fZ(t,e,n){let r=null,i=-1,o=null,a=-1;function s(u,c){for(let d=0,f=0;d<u.children.length&&f<=c;d++){let h=u.children[d],m=f+h.length;m>=c&&(h.children.length?s(h,c-f):(!o||o.isHidden&&n>0)&&(m>c||f==m&&h.getSide()>0)?(o=h,a=c-f):(f<c||f==m&&h.getSide()<0&&!h.isHidden)&&(r=h,i=c-f)),f=m}}s(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:a),n):pYe(t)}function pYe(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=wm(e);return n[n.length-1]||null}function FA(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const ZF=Object.create(null);function TS(t,e,n){if(t==e)return!0;t||(t=ZF),e||(e=ZF);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function VA(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function gYe(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class mc{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var wa=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(wa||(wa={}));class yn extends up{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Hb(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Ef(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=hZ(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new Ef(e,r,i,n,e.widget||null,!0)}static line(e){return new Wb(e)}static set(e,n=!1){return Ar.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}yn.none=Ar.empty;class Hb extends yn{constructor(e){let{start:n,end:r}=hZ(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Hb&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&TS(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Hb.prototype.point=!1;class Wb extends yn{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Wb&&this.spec.class==e.spec.class&&TS(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Wb.prototype.mapMode=No.TrackBefore;Wb.prototype.point=!0;class Ef extends yn{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?No.TrackBefore:No.TrackAfter:No.TrackDel}get type(){return this.startSide!=this.endSide?wa.WidgetRange:this.startSide<=0?wa.WidgetBefore:wa.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ef&&mYe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Ef.prototype.point=!0;function hZ(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n!=null?n:e,end:r!=null?r:e}}function mYe(t,e){return t==e||!!(t&&e&&t.compare(e))}function jA(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Xi extends oi{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof Xi))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),sZ(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new Xi;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){!this.dom||(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){TS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){dZ(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=FA(n,this.attrs||{})),r&&(this.attrs=FA({class:r},this.attrs||{}))}domAtPos(e){return cZ(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(tZ(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(VA(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&oi.get(i)instanceof Zc;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=oi.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Jt.ios||!this.children.some(o=>o instanceof uu))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof uu)||/[^ -~]/.test(r.text))return null;let i=wm(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=fZ(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let a=(o-i.textHeight)/2;return{top:r.top+a,bottom:r.bottom-a,left:r.left,right:r.left}}}return r}become(e){return e instanceof Xi&&this.children.length==0&&e.children.length==0&&TS(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],a=i+o.length;if(a>=n){if(o instanceof Xi)return o;if(a>n)break}i=a+o.breakAfter}return null}}class jc extends oi{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof jc)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&a<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?ra.before(this.dom):ra.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new jc(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return rD}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Mr.empty}domBoundsAround(){return null}become(e){return e instanceof jc&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof zA?null:Qb(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class zA extends mc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class qy{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof jc&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Xi),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(zO(new Sm(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof jc)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(zO(new uu(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Ef){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Ef)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new jc(r.widget||xm.block,s,r));else{let l=Yd.create(r.widget||xm.inline,s,s?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),c=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(d.append(zO(new Sm(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(zO(l,i),o),this.atCursorPos=c,this.pendingBuffer=c?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new qy(e,n,r,o);return a.openEnd=Ar.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function zO(t,e){for(let n of e)t=new Zc(n,[t],t.length);return t}class xm extends mc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}xm.inline=new xm("span");xm.block=new xm("div");var bi=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(bi||(bi={}));const fp=bi.LTR,iD=bi.RTL;function pZ(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const vYe=pZ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),yYe=pZ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),QA=Object.create(null),Cu=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);QA[e]=n,QA[n]=-e}function gZ(t){return t<=247?vYe[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?yYe[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const bYe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Xd{get dir(){return this.level%2?iD:fp}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let a=0;a<e.length;a++){let s=e[a];if(s.from<=n&&s.to>=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.from<n:s.to>n:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function mZ(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!mZ(r.inner,i.inner))return!1}return!0}const ii=[];function _Ye(t,e,n,r,i){for(let o=0;o<=r.length;o++){let a=o?r[o-1].to:e,s=o<r.length?r[o].from:n,l=o?256:i;for(let u=a,c=l,d=l;u<s;u++){let f=gZ(t.charCodeAt(u));f==512?f=c:f==8&&d==4&&(f=16),ii[u]=f==4?2:f,f&7&&(d=f),c=f}for(let u=a,c=l,d=l;u<s;u++){let f=ii[u];if(f==128)u<s-1&&c==ii[u+1]&&c&24?f=ii[u]=c:ii[u]=256;else if(f==64){let h=u+1;for(;h<s&&ii[h]==64;)h++;let m=u&&c==8||h<n&&ii[h]==8?d==1?1:8:256;for(let g=u;g<h;g++)ii[g]=m;u=h-1}else f==8&&d==1&&(ii[u]=1);c=f,f&7&&(d=f)}}}function OYe(t,e,n,r,i){let o=i==1?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let u=a?r[a-1].to:e,c=a<r.length?r[a].from:n;for(let d=u,f,h,m;d<c;d++)if(h=QA[f=t.charCodeAt(d)])if(h<0){for(let g=s-3;g>=0;g-=3)if(Cu[g+1]==-h){let y=Cu[g+2],b=y&2?i:y&4?y&1?o:i:0;b&&(ii[d]=ii[Cu[g]]=b),s=g;break}}else{if(Cu.length==189)break;Cu[s++]=d,Cu[s++]=f,Cu[s++]=l}else if((m=ii[d])==2||m==1){let g=m==i;l=g?0:1;for(let y=s-3;y>=0;y-=3){let b=Cu[y+2];if(b&2)break;if(g)Cu[y+2]|=2;else{if(b&4)break;Cu[y+2]|=4}}}}}function wYe(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=i<n.length?n[i].from:e;for(let l=a;l<s;){let u=ii[l];if(u==256){let c=l+1;for(;;)if(c==s){if(i==n.length)break;c=n[i++].to,s=i<n.length?n[i].from:e}else if(ii[c]==256)c++;else break;let d=o==1,f=(c<e?ii[c]:r)==1,h=d==f?d?1:2:r;for(let m=c,g=i,y=g?n[g-1].to:t;m>l;)m==y&&(m=n[--g].from,y=g?n[g-1].to:t),ii[--m]=h;l=c}else o=u,l++}}}function HA(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,u=0;l<n;){let c=!0,d=!1;if(u==o.length||l<o[u].from){let g=ii[l];g!=s&&(c=!1,d=g==16)}let f=!c&&s==1?[]:null,h=c?r:r+1,m=l;e:for(;;)if(u<o.length&&m==o[u].from){if(d)break e;let g=o[u];if(!c)for(let y=g.to,b=u+1;;){if(y==n)break e;if(b<o.length&&o[b].from==y)y=o[b++].to;else{if(ii[y]==s)break e;break}}if(u++,f)f.push(g);else{g.from>l&&a.push(new Xd(l,g.from,h));let y=g.direction==fp!=!(h%2);WA(t,y?r+1:r,i,g.inner,g.from,g.to,a),l=g.to}m=g.to}else{if(m==n||(c?ii[m]!=s:ii[m]==s))break;m++}f?HA(t,l,m,r+1,i,f,a):l<m&&a.push(new Xd(l,m,h)),l=m}else for(let l=n,u=o.length;l>e;){let c=!0,d=!1;if(!u||l>o[u-1].to){let g=ii[l-1];g!=s&&(c=!1,d=g==16)}let f=!c&&s==1?[]:null,h=c?r:r+1,m=l;e:for(;;)if(u&&m==o[u-1].to){if(d)break e;let g=o[--u];if(!c)for(let y=g.from,b=u;;){if(y==e)break e;if(b&&o[b-1].to==y)y=o[--b].from;else{if(ii[y-1]==s)break e;break}}if(f)f.push(g);else{g.to<l&&a.push(new Xd(g.to,l,h));let y=g.direction==fp!=!(h%2);WA(t,y?r+1:r,i,g.inner,g.from,g.to,a),l=g.from}m=g.from}else{if(m==e||(c?ii[m-1]!=s:ii[m-1]==s))break;m--}f?HA(t,m,l,r+1,i,f,a):m<l&&a.push(new Xd(m,l,h)),l=m}}function WA(t,e,n,r,i,o,a){let s=e%2?2:1;_Ye(t,i,o,r,s),OYe(t,i,o,r,s),wYe(i,o,r,s),HA(t,i,o,e,n,r,a)}function SYe(t,e,n){if(!t)return[new Xd(0,0,e==iD?1:0)];if(e==fp&&!n.length&&!bYe.test(t))return vZ(t.length);if(n.length)for(;t.length>ii.length;)ii[ii.length]=256;let r=[],i=e==fp?0:1;return WA(t,i,i,n,0,t.length,r),r}function vZ(t){return[new Xd(0,t,0)]}let yZ="";function xYe(t,e,n,r,i){var o;let a=r.head-t.from,s=Xd.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],u=l.side(i,n);if(a==u){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),u=l.side(i,n)}let c=Io(t.text,a,l.forward(i,n));(c<l.from||c>l.to)&&(c=u),yZ=t.text.slice(Math.min(a,c),Math.max(a,c));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&c==u&&d.level+(i?0:1)<l.level?yt.cursor(d.side(!i,n)+t.from,d.forward(i,n)?1:-1,d.level):yt.cursor(c+t.from,l.forward(i,n)?-1:1,l.level)}function CYe(t,e,n){for(let r=e;r<n;r++){let i=gZ(t.charCodeAt(r));if(i==1)return fp;if(i==2||i==4)return iD}return fp}const bZ=Xt.define(),_Z=Xt.define(),OZ=Xt.define(),wZ=Xt.define(),UA=Xt.define(),SZ=Xt.define(),xZ=Xt.define(),oD=Xt.define(),aD=Xt.define(),CZ=Xt.define({combine:t=>t.some(e=>e)}),EZ=Xt.define({combine:t=>t.some(e=>e)}),TZ=Xt.define();class Ig{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new Ig(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ig(yt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const QO=Wn.define({map:(t,e)=>t.map(e)}),kZ=Wn.define();function qa(t,e,n){let r=t.facet(wZ);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Bd=Xt.define({combine:t=>t.length?t[0]:!0});let EYe=0;const sy=Xt.define();class qi{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:a}=n||{};return new qi(EYe++,e,r,i,s=>{let l=[sy.of(s)];return a&&l.push(U0.of(u=>{let c=u.plugin(s);return c?a(c):yn.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return qi.define(r=>new e(r),n)}}class d2{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(qa(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){qa(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){qa(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const PZ=Xt.define(),sD=Xt.define(),U0=Xt.define(),AZ=Xt.define(),lD=Xt.define(),MZ=Xt.define();function GF(t,e){let n=t.state.facet(MZ);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Ar.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let u=o-e.from,c=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,m;if(h==null&&(h=CYe(e.text,u,c)),l>0&&d.length&&(m=d[d.length-1]).to==u&&m.direction==h)m.to=c,d=m.inner;else{let g={from:u,to:c,direction:h,inner:[]};d.push(g),d=g.inner}}}}),i}const RZ=Xt.define();function $Z(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(RZ)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ly=Xt.define();class pl{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new pl(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,a=0,s=0;;i++){let l=i==e.length?null:e[i],u=a-s,c=l?l.fromB:1e9;for(;o<n.length&&n[o]<c;){let d=n[o],f=n[o+1],h=Math.max(s,d),m=Math.min(c,f);if(h<=m&&new pl(h+u,m+u,h,m).addToSet(r),f>c)break;o+=2}if(!l)return r;new pl(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class kS{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=oo.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new pl(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new kS(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class KF extends oi{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=yn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Xi],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new pl(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:c})=>c<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!$Ye(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?kYe(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new pl(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Jt.ie||Jt.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=MYe(a,s,e.changes);return r=pl.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Jt.chrome||Jt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof jc&&a.widget instanceof zA&&o.push(a.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let a=i.length-1;;a--){let s=a>=0?i[a]:null;if(!s)break;let{fromA:l,toA:u,fromB:c,toB:d}=s,f,h,m,g;if(r&&r.range.fromB<d&&r.range.toB>c){let S=qy.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),x=qy.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,m=S.openStart,g=x.openEnd;let C=this.compositionView(r);x.breakAtStart?C.breakAfter=1:x.content.length&&C.merge(C.length,C.length,x.content[0],!1,x.openStart,0)&&(C.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&C.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(C).concat(x.content)}else({content:f,breakAtStart:h,openStart:m,openEnd:g}=qy.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=o.findPos(u,1),{i:w,off:O}=o.findPos(l,-1);aZ(this,w,O,y,b,f,h,m,g)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(kZ)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new uu(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Zc(i,[n],n.length);let r=new Xi;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=oi.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&z1(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Jt.gecko&&s.empty&&!this.hasComposition&&TYe(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new ra(d,0),a=!0}let c=this.view.observer.selectionRange;(a||!c.focusNode||(!Uy(l.node,l.offset,c.anchorNode,c.anchorOffset)||!Uy(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,s))&&(this.view.observer.ignore(()=>{Jt.android&&Jt.chrome&&this.dom.contains(c.focusNode)&&RYe(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=W0(this.view.root);if(d)if(s.empty){if(Jt.gecko){let f=PYe(l.node,l.offset);if(f&&f!=3){let h=(f==1?rZ:iZ)(l.node,l.offset);h&&(l=new ra(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new ra(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new ra(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Uy(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=W0(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=Xi.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=oi.get(n.childNodes[i]);o instanceof Xi&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=oi.get(n.childNodes[i]);o instanceof Xi&&(r=o.domAtPos(o.length))}return r?new ra(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=oi.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof Xi)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,a=this.children.length-1;a>=0;a--){let s=this.children[a],l=o-s.breakAfter,u=l-s.length;if(l<e)break;if(u<=e&&(u<e||s.covers(-1))&&(l>e||s.covers(1))&&(!r||s instanceof Xi&&!(r instanceof Xi&&n>=0)))r=s,i=u;else if(r&&u==e&&l==e&&s instanceof jc&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=u}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Xi))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof uu))return null;let o=Io(i.text,r);if(o==r)return null;let a=dp(i.dom,r,o).getClientRects();for(let s=0;s<a.length;s++){let l=a[s];if(s==a.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,a=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==bi.LTR;for(let u=0,c=0;c<this.children.length;c++){let d=this.children[c],f=u+d.length;if(f>i)break;if(u>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let m=d.dom.lastChild,g=m?wm(m):[];if(g.length){let y=g[g.length-1],b=l?y.right-h.left:h.right-y.left;b>s&&(s=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?bi.RTL:bi.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Xi){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=wm(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new oZ(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(yn.replace({widget:new zA(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return yn.set(e)}updateDeco(){let e=1,n=this.view.state.facet(U0).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(AZ).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ar.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let u of this.view.state.facet(TZ))try{if(u(this.view,e.range,e))return!0}catch(c){qa(this.view.state,c,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=$Z(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;sYe(this.view.scrollDOM,a,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==bi.LTR)}}function TYe(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function NZ(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=rZ(n.focusNode,n.focusOffset),i=iZ(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let s=oi.get(i.node);if(!s||s instanceof uu&&s.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let l=oi.get(r.node);!l||l instanceof uu&&l.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let a=e-o.offset;return{from:a,to:a+o.node.nodeValue.length,node:o.node}}function kYe(t,e,n){let r=NZ(t,n);if(!r)return null;let{node:i,from:o,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||t.state.doc.sliceString(r.from,r.to)!=s)return null;let l=e.invertedDesc,u=new pl(l.mapPos(o),l.mapPos(a),o,a),c=[];for(let d=i.parentNode;;d=d.parentNode){let f=oi.get(d);if(f instanceof Zc)c.push({node:d,deco:f.mark});else{if(f instanceof Xi||d.nodeName=="DIV"&&d.parentNode==t.contentDOM)return{range:u,text:i,marks:c,line:d};if(d!=t.contentDOM)c.push({node:d,deco:new Hb({inclusive:!0,attributes:gYe(d),tagName:d.tagName.toLowerCase()})});else return null}}}function PYe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let AYe=class{constructor(){this.changes=[]}compareRange(e,n){jA(e,n,this.changes)}comparePoint(e,n){jA(e,n,this.changes)}};function MYe(t,e,n){let r=new AYe;return Ar.compare(t,e,n,r),r.changes}function RYe(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function $Ye(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function NYe(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return yt.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=Io(i.text,o,!1):s=Io(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let u=Io(i.text,a,!1);if(r(i.text.slice(u,a))!=l)break;a=u}for(;s<i.length;){let u=Io(i.text,s);if(r(i.text.slice(s,u))!=l)break;s=u}return yt.range(a+i.from,s+i.from)}function DYe(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function LYe(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function f2(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function JF(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function eV(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function qA(t,e,n){let r,i,o,a,s=!1,l,u,c,d;for(let m=t.firstChild;m;m=m.nextSibling){let g=wm(m);for(let y=0;y<g.length;y++){let b=g[y];i&&f2(i,b)&&(b=JF(eV(b,i.bottom),i.top));let w=DYe(e,b),O=LYe(n,b);if(w==0&&O==0)return m.nodeType==3?tV(m,e,n):qA(m,e,n);if(!r||a>O||a==O&&o>w){r=m,i=b,o=w,a=O;let S=O?n<b.top?-1:1:w?e<b.left?-1:1:0;s=!S||(S>0?y<g.length-1:y>0)}w==0?n>b.bottom&&(!c||c.bottom<b.bottom)?(l=m,c=b):n<b.top&&(!d||d.top>b.top)&&(u=m,d=b):c&&f2(c,b)?c=eV(c,b.bottom):d&&f2(d,b)&&(d=JF(d,b.top))}}if(c&&c.bottom>=n?(r=l,i=c):d&&d.top<=n&&(r=u,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return tV(r,f,n);if(s&&r.contentEditable!="false")return qA(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function tV(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;s<r;s++){let l=dp(t,s,s+1).getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(c.top==c.bottom)continue;a||(a=e-c.left);let d=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d<o){let f=e>=(c.left+c.right)/2,h=f;if((Jt.chrome||Jt.gecko)&&dp(t,s).getBoundingClientRect().left==c.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function DZ(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,f=d-s;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,x=!1;l=t.elementAtHeight(f),l.type!=wa.Text;)for(;f=r>0?l.bottom+S:l.top-S,!(f>=0&&f<=u);){if(x)return n?null:0;x=!0,r=-r}d=s+f;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:nV(t,a,l,c,d);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:nV(t,a,l,c,d);let m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,y=g.elementFromPoint(c,d);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(a.left+1,Math.min(a.right-1,c)),y=g.elementFromPoint(c,d),y&&!t.contentDOM.contains(y)&&(y=null));let b,w=-1;if(y&&((i=t.docView.nearest(y))===null||i===void 0?void 0:i.isEditable)!=!1){if(m.caretPositionFromPoint){let S=m.caretPositionFromPoint(c,d);S&&({offsetNode:b,offset:w}=S)}else if(m.caretRangeFromPoint){let S=m.caretRangeFromPoint(c,d);S&&({startContainer:b,startOffset:w}=S,(!t.contentDOM.contains(b)||Jt.safari&&IYe(b,w,c)||Jt.chrome&&BYe(b,w,c))&&(b=void 0))}b&&(w=Math.min(rc(b),w))}if(!b||!t.docView.dom.contains(b)){let S=Xi.find(t.docView,h);if(!S)return f>l.top+l.height/2?l.to:l.from;({node:b,offset:w}=qA(S.dom,c,d))}let O=t.docView.nearest(b);if(!O)return null;if(O.isWidget&&((o=O.dom)===null||o===void 0?void 0:o.nodeType)==1){let S=O.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?O.posAtStart:O.posAtEnd}else return O.localPosFromDOM(b,w)+O.posAtStart}function nV(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+RA(a,o,t.state.tabSize)}function IYe(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return dp(t,r-1,r).getBoundingClientRect().left>n}function BYe(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():dp(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function YA(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==wa.Text))return r}return n}function FYe(t,e,n,r){let i=YA(t,e.head),o=!r||i.type!=wa.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==bi.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return yt.cursor(l,n?-1:1)}return yt.cursor(n?i.to:i.from,n?-1:1)}function rV(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let u=xYe(i,o,a,s,n),c=yZ;if(!u){if(i.number==(n?t.state.doc.lines:1))return s;c=`
  164. `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=t.visualLineSide(i,!n)}if(l){if(!l(c))return s}else{if(!r)return u;l=r(c)}s=u}}function VYe(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==xi.Space&&(i=a),i==a}}function jYe(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return yt.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(u)a==null&&(a=u.left-l.left),s=o<0?u.top:u.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+c}let d=l.left+a,f=r!=null?r:t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let m=s+(f+h)*o,g=DZ(t,{x:d,y:m},!1,o);if(m<l.top||m>l.bottom||(o<0?g<i:g>i)){let y=t.docView.coordsForChar(g),b=!y||m<y.top?-1:1;return yt.cursor(g,b,void 0,a)}}}function Q1(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,a,s)=>{if(e>o&&e<a){let l=r||n||(e-o<a-e?-1:1);e=l<0?o:a,r=l}});if(!r)return e}}function h2(t,e,n){let r=Q1(t.state.facet(lD).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:yt.cursor(r,r<n.from?1:-1)}const uy="\uFFFF";class zYe{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(vr.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=uy}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let a=i.nextSibling;if(a==n)break;let s=oi.get(i),l=oi.get(a);(s&&l?s.breakAfter:(s?s.breakAfter:ES(i))||ES(a)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=oi.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(QYe(e,r.node,r.offset)?n:0))}}function QYe(t,e,n){for(;;){if(!e||n<rc(e))return!1;if(e==t)return!0;n=cp(e)+1,e=e.parentNode}}class iV{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class HYe{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:qYe(e),l=new zYe(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=YYe(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!DA(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!DA(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),c=e.viewport;if((Jt.ios||Jt.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.to<e.state.doc.length)){let d=Math.min(l,u),f=Math.max(l,u),h=c.from-d,m=c.to-f;(h==0||h==1||d==0)&&(m==0||m==-1||f==e.state.doc.length)&&(l=0,u=e.state.doc.length)}this.newSel=yt.single(u,l)}}}function LZ(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,u=null;(o===8||Jt.android&&e.text.length<s-a)&&(l=i.to,u="end");let c=UYe(t.state.doc.sliceString(a,s,uy),e.text,l-a,u);c&&(Jt.chrome&&o==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==uy+uy&&c.toB--,n={from:a+c.from,to:a+c.toA,insert:Mr.of(e.text.slice(c.from,c.toB).split(uy))})}else r&&(!t.hasFocus&&t.state.facet(Bd)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(Jt.mac||Jt.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=yt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Mr.of([" "])}):Jt.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
  165. `&&t.lineWrapping&&(r&&(r=yt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Mr.of([" "])}),n)return uD(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function uD(t,e,n,r=-1){if(Jt.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Jt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Lg(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Lg(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Lg(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=WYe(t,e,n));return t.state.facet(SZ).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function WYe(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=o.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=i.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&NZ(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-m}}else c=t.state.doc.lineAt(o.head);let f=o.to-e.to,h=o.to-o.from;r=i.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:s,range:l||m.map(s)};let g=m.to-f,y=g-u.length;if(m.to-m.from!=h||t.state.sliceDoc(y,g)!=u||m.to>=c.from&&m.from<=c.to)return{range:m};let b=i.changes({from:y,to:g,insert:e.insert}),w=m.to-o.to;return{changes:b,range:l?yt.range(Math.max(0,l.anchor+w),Math.max(0,l.head+w)):m.map(b)}})}else r={changes:s,selection:l&&i.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function UYe(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let a=t.length,s=e.length;for(;a>0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}return a<o&&t.length<e.length?(o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o):s<o&&(o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o),{from:o,toA:a,toB:s}}function qYe(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new iV(n,r)),(i!=n||o!=r)&&e.push(new iV(i,o))),e}function YYe(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?yt.single(n+e,r+e):null}class XYe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Jt.safari&&e.contentDOM.addEventListener("input",()=>null),Jt.gecko&&dXe(e.contentDOM.ownerDocument)}handleEvent(e){!rXe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=ZYe(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&BZ.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Jt.android&&Jt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Jt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=IZ.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||GYe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Lg(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Jt.safari&&!Jt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function oV(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){qa(n.state,i)}}}function ZYe(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let a=i.domEventHandlers[o];a&&n(o).handlers.push(oV(r.value,a))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let a=i.domEventObservers[o];a&&n(o).observers.push(oV(r.value,a))}}for(let r in cu)n(r).handlers.push(cu[r]);for(let r in xl)n(r).observers.push(xl[r]);return e}const IZ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GYe="dthko",BZ=[16,17,18,20,91,92,224,225],HO=6;function WO(t){return Math.max(0,t)*.7+8}function KYe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class JYe{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=lYe(e.contentDOM),this.atoms=e.state.facet(lD).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(vr.allowMultipleSelections)&&eXe(e,n),this.dragging=nXe(e,n)&&jZ(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&KYe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=$Z(this.view);e.clientX-l.left<=i+HO?n=-WO(i-e.clientX):e.clientX+l.right>=a-HO&&(n=WO(e.clientX-a)),e.clientY-l.top<=o+HO?r=-WO(o-e.clientY):e.clientY+l.bottom>=s-HO&&(r=WO(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let a=Q1(this.atoms,i.from,0);a!=i.from&&(o=yt.cursor(a,-1))}else{let a=Q1(this.atoms,i.from,-1),s=Q1(this.atoms,i.to,1);(a!=i.from||s!=i.to)&&(o=yt.range(i.from==i.anchor?a:s,i.from==i.head?a:s))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?yt.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function eXe(t,e){let n=t.state.facet(bZ);return n.length?n[0](e):Jt.mac?e.metaKey:e.ctrlKey}function tXe(t,e){let n=t.state.facet(_Z);return n.length?n[0](e):Jt.mac?!e.altKey:!e.ctrlKey}function nXe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=W0(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let a=i[o];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function rXe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=oi.get(n))&&r.ignoreEvent(e))return!1;return!0}const cu=Object.create(null),xl=Object.create(null),FZ=Jt.ie&&Jt.ie_version<15||Jt.ios&&Jt.webkit_version<604;function iXe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),VZ(t,n.value)},50)}function xC(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function VZ(t,e){e=xC(t.state,oD,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(XA!=null&&n.selection.ranges.every(l=>l.empty)&&XA==o.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:yt.cursor(u.from+d.length)}})}else a?r=n.changeByRange(l=>{let u=o.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:yt.cursor(l.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}xl.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};cu.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);xl.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};xl.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};cu.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(OZ))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=sXe(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new JYe(t,e,n,r)),r&&t.observer.ignore(()=>{eZ(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function aV(t,e,n,r){if(r==1)return yt.cursor(e,n);if(r==2)return NYe(t.state,e,n);{let i=Xi.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return s<t.state.doc.length&&s==o.to&&s++,yt.range(a,s)}}let sV=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function oXe(t,e,n,r){let i=Xi.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&sV(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&sV(n,r,s)?1:a&&a.bottom>=r?-1:1}function lV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:oXe(t,n,e.clientX,e.clientY)}}const aXe=Jt.ie&&Jt.ie_version<=11;let uV=null,cV=0,dV=0;function jZ(t){if(!aXe)return t.detail;let e=uV,n=dV;return uV=t,dV=Date.now(),cV=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(cV+1)%3:1}function sXe(t,e){let n=lV(t,e),r=jZ(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=lV(t,o),u,c=aV(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=aV(t,n.pos,n.bias,r),f=Math.min(d.from,c.from),h=Math.max(d.to,c.to);c=f<c.from?yt.range(f,h):yt.range(h,f)}return a?i.replaceRange(i.main.extend(c.from,c.to)):s&&r==1&&i.ranges.length>1&&(u=lXe(i,l.pos))?u:s?i.addRange(c):yt.create([c])}}}function lXe(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return yt.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}cu.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=yt.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",xC(t.state,aD,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};cu.dragend=t=>(t.inputState.draggedContent=null,!1);function fV(t,e,n,r){if(n=xC(t.state,oD,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&tXe(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}cu.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&fV(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let s=new FileReader;s.onerror=o,s.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return fV(t,e,r,!0),!0}return!1};cu.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=FZ?null:e.clipboardData;return n?(VZ(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(iXe(t),!1)};function uXe(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function cXe(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:xC(t,aD,e.join(t.lineBreak)),ranges:n,linewise:r}}let XA=null;cu.copy=cu.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=cXe(t.state);if(!n&&!i)return!1;XA=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=FZ?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(uXe(t,n),!1)};const zZ=cd.define();function QZ(t,e){let n=[];for(let r of t.facet(xZ)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:zZ.of(!0)}):null}function HZ(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=QZ(t.state,e);n?t.dispatch(n):t.update([])}},10)}xl.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),HZ(t)};xl.blur=t=>{t.observer.clearSelectionRange(),HZ(t)};xl.compositionstart=xl.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};xl.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Jt.chrome&&Jt.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};xl.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};cu.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),u=t.posAtDOM(s.endContainer,s.endOffset);return uD(t,{from:l,to:u,insert:t.state.toText(o)},null),!0}}let i;if(Jt.chrome&&Jt.android&&(i=IZ.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Jt.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Jt.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>xl.compositionend(t,e),20),!1};const hV=new Set;function dXe(t){hV.has(t)||(hV.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const pV=["pre-wrap","normal","pre-line","break-spaces"];let Cm=!1;function gV(){Cm=!1}class fXe{constructor(e){this.lineWrapping=e,this.doc=Mr.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return pV.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,a){let s=pV.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let u=0;u<a.length;u++){let c=a[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return l}}class hXe{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Fu{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?wa.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Ef?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Fu(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var vi=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(vi||(vi={}));const H1=.001;class Sa{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>H1&&(Cm=!0),this.height=e)}replace(e,n,r){return Sa.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:c,toB:d}=i[s],f=o.lineAt(l,vi.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=u?f:o.lineAt(u,vi.ByPosNoHeight,r,0,0);for(d+=h.to-u,u=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,c=i[s-1].fromB,s--,l<f.from&&(f=o.lineAt(l,vi.ByPosNoHeight,r,0,0));c+=f.from-l,l=f.from;let m=cD.build(r.setDoc(a),e,c,d);o=PS(o,o.replace(l,u,m))}return o.updateHeight(r,0)}static empty(){return new Ss(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i<o){let s=e[n++];s&&(i+=s.size)}else{let s=e[--r];s&&(o+=s.size)}let a=0;return e[n-1]==null?(a=1,n--):e[n]==null&&(a=1,r++),new pXe(Sa.of(e.slice(0,n)),a,Sa.of(e.slice(r)))}}function PS(t,e){return t==e?t:(t.constructor!=e.constructor&&(Cm=!0),e)}Sa.prototype.size=1;class WZ extends Sa{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new Fu(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,a){e<=o+this.length&&n>=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ss extends WZ{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new Fu(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Ss||i instanceof Mo&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Mo?i=new Ss(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Sa.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Mo extends Sa{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),c=n.doc.lineAt(u),d=s+c.length*l,f=Math.max(r,e-d/2);return new Fu(c.from,c.length,f,d,0)}else{let u=Math.max(0,Math.min(a-o,Math.floor((e-r)/s))),{from:c,length:d}=n.doc.line(o+u);return new Fu(c,d,r+s*u,s,0)}}lineAt(e,n,r,i,o){if(n==vi.ByHeight)return this.blockAt(e,r,i,o);if(n==vi.ByPosNoHeight){let{from:h,to:m}=r.doc.lineAt(e);return new Fu(h,m-h,0,0,0)}let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(r,o),u=r.doc.lineAt(e),c=s+u.length*l,d=u.number-a,f=i+s*d+l*(u.from-o-d);return new Fu(u.from,u.length,Math.max(i,Math.min(f,i+this.height-c)),c,0)}forEachLine(e,n,r,i,o,a){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:s,perLine:l,perChar:u}=this.heightMetrics(r,o);for(let c=e,d=i;c<=n;){let f=r.doc.lineAt(c);if(c==e){let m=f.number-s;d+=l*m+u*(e-o-m)}let h=l+u*f.length;a(new Fu(f.from,f.length,d,h,0)),d+=h,c=f.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Mo?r[r.length-1]=new Mo(o.length+i):r.push(null,new Mo(i-1))}if(e>0){let o=r[0];o instanceof Mo?r[0]=new Mo(e+o.length):r.unshift(new Mo(e-1),null)}return Sa.of(r)}decomposeLeft(e,n){n.push(new Mo(e-1),null)}decomposeRight(e,n){n.push(null,new Mo(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new Mo(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let c=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=H1&&(l=-2);let f=new Ss(c,d);f.outdated=!1,a.push(f),s+=c+1}s<=o&&a.push(null,new Mo(o-s).updateHeight(e,s));let u=Sa.of(a);return(l<0||Math.abs(u.height-this.height)>=H1||Math.abs(l-this.heightMetrics(e,n).perLine)>=H1)&&(Cm=!0),PS(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class pXe extends Sa{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let a=i+this.left.height,s=o+this.left.length+this.break,l=n==vi.ByHeight?e<a:e<s,u=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,a,s);if(this.break||(l?u.to<s:u.from>s))return u;let c=n==vi.ByPosNoHeight?vi.ByPosNoHeight:vi.ByPos;return l?u.join(this.right.lineAt(s,c,r,a,s)):this.left.lineAt(s,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,a),n>=l&&this.right.forEachLine(e,n,r,s,l,a);else{let u=this.lineAt(l,vi.ByPos,r,i,o);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,o,a),u.to>=e&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&mV(o,a-1),n<this.length){let s=o.length;this.decomposeRight(n,o),mV(o,s)}return Sa.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Sa.of(this.break?[e,null,n]:[e,n]):(this.left=PS(this.left,e),this.right=PS(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function mV(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Mo&&(r=t[e+1])instanceof Mo&&t.splice(e-1,3,new Mo(n.length+1+r.length))}const gXe=5;class cD{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ss?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ss(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let a=n-e;r.block?this.addBlock(new WZ(a,i,r)):(a||o||i>=gXe)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ss(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Mo(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ss)return e;let n=new Ss(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ss)&&!this.isCovered?this.nodes.push(new Ss(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Ss&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new cD(r,e);return Ar.spans(n,r,i,o,0),o.finish(r)}}function mXe(t,e,n){let r=new vXe;return Ar.compare(t,e,n,r,0),r.changes}class vXe{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&jA(e,n,this.changes,5)}}function yXe(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,d=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let f=c.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(u==t.parentNode?i.innerHeight:l,f.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function bXe(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class p2{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return yn.replace({widget:new _Xe(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class _Xe extends mc{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class vV{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=yV,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=bi.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(sD).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new fXe(n),this.stateDeco=e.facet(U0).filter(r=>typeof r!="function"),this.heightMap=Sa.empty().applyChanges(this.stateDeco,Mr.empty,this.heightOracle.setDoc(e.doc),[new pl(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=yn.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new UO(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?yV:new dD(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(cy(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(U0).filter(c=>typeof c!="function");let i=e.changedRanges,o=pl.extendWithRanges(i,mXe(r,this.stateDeco,e?e.changes:oo.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);gV(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||Cm)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(EZ)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?bi.RTL:bi.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,c=0;if(s.width&&s.height){let{scaleX:S,scaleY:x}=JX(n,s);(S>.005&&Math.abs(this.scaleX-S)>.005||x>.005&&Math.abs(this.scaleY-x)>.005)&&(this.scaleX=S,this.scaleY=x,u|=8,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=nZ(e.scrollDOM);let m=(this.printing?bXe:yXe)(n,this.paddingTop),g=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let w=s.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(a=!0),a||i.lineWrapping&&Math.abs(w-this.contentDOMWidth)>i.charWidth){let{lineHeight:x,charWidth:C,textHeight:E}=e.docView.measureTextSize();a=x>0&&i.refresh(o,x,C,E,w/C,S),a&&(e.docView.minWidth=0,u|=8)}g>0&&y>0?c=Math.max(g,y):g<0&&y<0&&(c=Math.min(g,y)),gV();for(let x of this.viewports){let C=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?Sa.empty().applyChanges(this.stateDeco,Mr.empty,this.heightOracle,[new pl(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new hXe(x.from,C))}Cm&&(u|=2)}let O=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return O&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||O)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new UO(i.lineAt(a-r*1e3,vi.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,vi.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(u<l.from||u>l.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(u,vi.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<l.from?f=d.top:f=d.bottom-c,l=new UO(i.lineAt(f-1e3/2,vi.ByHeight,o,0,0).from,i.lineAt(f+c+1e3/2,vi.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new UO(this.heightMap.lineAt(r,vi.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,vi.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,vi.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,vi.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:s}=this;return(e==0||i<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o<s+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new p2(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,a=i<<1;if(this.defaultTextDirection!=bi.LTR&&!r)return[];let s=[],l=(c,d,f,h)=>{if(d-c<o)return;let m=this.state.selection.main,g=[m.from];m.empty||g.push(m.to);for(let b of g)if(b>c&&b<d){l(c,b-10,f,h),l(b+10,d,f,h);return}let y=wXe(e,b=>b.from>=f.from&&b.to<=f.to&&Math.abs(b.from-c)<o&&Math.abs(b.to-d)<o&&!g.some(w=>b.from<w&&b.to>w));if(!y){if(d<f.to&&n&&r&&n.visibleRanges.some(O=>O.from<=d&&O.to>=d)){let O=n.moveToLineBoundary(yt.cursor(d),!1,!0).head;O>c&&(d=O)}let b=this.gapSize(f,c,d,h),w=r||b<2e6?b:2e6;y=new p2(c,d,b,w)}s.push(y)},u=c=>{if(c.length<a||c.type!=wa.Text)return;let d=OXe(c.from,c.to,this.stateDeco);if(d.total<a)return;let f=this.scrollTarget?this.scrollTarget.range.head:null,h,m;if(r){let g=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,y,b;if(f!=null){let w=YO(d,f),O=((this.visibleBottom-this.visibleTop)/2+g)/c.height;y=w-O,b=w+O}else y=(this.visibleTop-c.top-g)/c.height,b=(this.visibleBottom-c.top+g)/c.height;h=qO(d,y),m=qO(d,b)}else{let g=d.total*this.heightOracle.charWidth,y=i*this.heightOracle.charWidth,b=0;if(g>2e6)for(let C of e)C.from>=c.from&&C.from<c.to&&C.size!=C.displaySize&&C.from*this.heightOracle.charWidth+b<this.pixelViewport.left&&(b=C.size-C.displaySize);let w=this.pixelViewport.left+b,O=this.pixelViewport.right+b,S,x;if(f!=null){let C=YO(d,f),E=((O-w)/2+y)/g;S=C-E,x=C+E}else S=(w-y)/g,x=(O+y)/g;h=qO(d,S),m=qO(d,x)}h>c.from&&l(c.from,h,c,d),m<c.to&&l(m,c.to,c,d)};for(let c of this.viewportLines)Array.isArray(c.type)?c.type.forEach(u):u(c);return s}gapSize(e,n,r,i){let o=YO(i,r)-YO(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){p2.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=yn.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Ar.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||cy(this.heightMap.lineAt(e,vi.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||cy(this.heightMap.lineAt(this.scaler.fromDOM(e),vi.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return cy(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class UO{constructor(e,n){this.from=e,this.to=n}}function OXe(t,e,n){let r=[],i=t,o=0;return Ar.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function qO({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function YO(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function wXe(t,e){for(let n of t)if(e(n))return n}const yV={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class dD{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let u=n.lineAt(s,vi.ByPos,e,0,0).top,c=n.lineAt(l,vi.ByPos,e,0,0).bottom;return i+=c-u,{from:s,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}eq(e){return e instanceof dD?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function cy(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Fu(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>cy(i,e)):t._content)}const XO=Xt.define({combine:t=>t.join(" ")}),ZA=Xt.define({combine:t=>t.indexOf(!0)>-1}),GA=xf.newName(),UZ=xf.newName(),qZ=xf.newName(),YZ={"&light":"."+UZ,"&dark":"."+qZ};function KA(t,e,n){return new xf(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const SXe=KA("."+GA,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},YZ),xXe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},g2=Jt.ie&&Jt.ie_version<=11;class CXe{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new uYe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Jt.ie&&Jt.ie_version<=11||Jt.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Jt.chrome&&Jt.chrome_version<126)&&(this.editContext=new TXe(e),e.state.facet(Bd)&&(e.contentDOM.editContext=this.editContext.editContext)),g2&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Bd)?r.root.activeElement!=this.dom:!z1(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Jt.ie&&Jt.ie_version<=11||Jt.android&&Jt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Uy(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=W0(e.root);if(!n)return!1;let r=Jt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&EXe(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=z1(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&dYe(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,xXe),g2&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){!this.active||(this.active=!1,this.observer.disconnect(),g2&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Lg(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);!a||(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&z1(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new HYe(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=LZ(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=bV(n,e.previousSibling||e.target.previousSibling,-1),i=bV(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Bd)!=e.state.facet(Bd)&&(e.view.contentDOM.editContext=e.state.facet(Bd)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function bV(t,e,n){for(;e;){let r=oi.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function _V(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Uy(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function EXe(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return _V(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?_V(t,n):null}class TXe{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,o={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Mr.of(r.text.split(`
  166. `))};o.from==this.from&&i<this.from?o.from=i:o.to==this.to&&i>this.to&&(o.to=i),!(o.from==o.to&&!o.insert.length)&&(this.pendingContextChange=o,e.state.readOnly||uD(e,o,yt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a<s;a++){let l=e.coordsForChar(a);o=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||o||new DOMRect,i.push(o)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(a!="None"&&s!="None"){let l=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${s=="Thin"?1:2}px`;i.push(yn.mark({attributes:{style:l}}).range(this.toEditorPos(o.rangeStart),this.toEditorPos(o.rangeEnd)))}}e.dispatch({effects:kZ.of(yn.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=W0(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,u)=>{if(r)return;let c=u.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(u)){i=this.pendingContextChange=null,n+=c,this.to+=c;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=c,this.to+=c;else if(o<this.to){if(o<this.from||a>this.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),u.toString()),this.to+=c}n+=c}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Ut{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||cYe(e.parent)||document,this.viewState=new vV(e.state||vr.create(e)),e.scrollTo&&e.scrollTo.is(QO)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(sy).map(i=>new d2(i));for(let i of this.plugins)i.update(this);this.observer=new CXe(this),this.inputState=new XYe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new KF(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Zi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(zZ))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=QZ(o,a),l||(s=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(vr.phrases)!=this.state.facet(vr.phrases))return this.setState(o);i=kS.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new Ig(h.empty?h:yt.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(QO)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=AS.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ly)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(XO)!=i.state.facet(XO)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet(UA))try{f(i)}catch(h){qa(this.state,h,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!LZ(this,c)&&u.force&&Lg(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new vV(e),this.plugins=e.facet(sy).map(r=>new d2(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new KF(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(sy),r=e.state.facet(sy);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new d2(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){qa(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(nZ(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(h=>{try{return h.read(this)}catch(m){return qa(this.state,m),OV}}),d=kS.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h<u.length;h++)if(c[h]!=OV)try{let m=u[h];m.write&&m.write(c[h],this)}catch(m){qa(this.state,m)}if(f&&this.docView.updateSelection(!0),!d.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let m=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-a;if(m>1||m<-1){i=i+m,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(UA))s(n)}get themeClasses(){return GA+" "+(this.state.facet(ZA)?qZ:UZ)+" "+this.state.facet(XO)}updateAttrs(){let e=wV(this,PZ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Bd)?"true":"false",class:"cm-content",style:`${Jt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),wV(this,sD,n);let r=this.observer.ignore(()=>{let i=VA(this.contentDOM,this.contentAttrs,n),o=VA(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Ut.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ly);let e=this.state.facet(Ut.cspNonce);xf.mount(this.root,this.styleModules.concat(SXe).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return h2(this,e,rV(this,e,n,r))}moveByGroup(e,n){return h2(this,e,rV(this,e,n,r=>VYe(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return yt.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return FYe(this,e,n,r)}moveVertically(e,n,r){return h2(this,e,jYe(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),DZ(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Xd.find(o,e-i.from,-1,n)];return Qb(r,a.dir==bi.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(CZ)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>kXe)return vZ(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||mZ(o.isolates,r=GF(this,e))))return o.order;r||(r=GF(this,e));let i=SYe(e.text,n,r);return this.bidiCache.push(new AS(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Jt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{eZ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return QO.of(new Ig(typeof e=="number"?yt.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return QO.of(new Ig(yt.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return qi.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return qi.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=xf.newName(),i=[XO.of(r),ly.of(KA(`.${r}`,e))];return n&&n.dark&&i.push(ZA.of(!0)),i}static baseTheme(e){return Hf.lowest(ly.of(KA("."+GA,e,YZ)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&oi.get(r)||oi.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}Ut.styleModule=ly;Ut.inputHandler=SZ;Ut.clipboardInputFilter=oD;Ut.clipboardOutputFilter=aD;Ut.scrollHandler=TZ;Ut.focusChangeEffect=xZ;Ut.perLineTextDirection=CZ;Ut.exceptionSink=wZ;Ut.updateListener=UA;Ut.editable=Bd;Ut.mouseSelectionStyle=OZ;Ut.dragMovesSelection=_Z;Ut.clickAddsSelectionRange=bZ;Ut.decorations=U0;Ut.outerDecorations=AZ;Ut.atomicRanges=lD;Ut.bidiIsolatedRanges=MZ;Ut.scrollMargins=RZ;Ut.darkTheme=ZA;Ut.cspNonce=Xt.define({combine:t=>t.length?t[0]:""});Ut.contentAttributes=sD;Ut.editorAttributes=PZ;Ut.lineWrapping=Ut.contentAttributes.of({class:"cm-lineWrapping"});Ut.announce=Wn.define();const kXe=4096,OV={};class AS{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:bi.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let a=e[o];a.dir==i&&!n.touchesRange(a.from,a.to)&&r.push(new AS(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return r}}function wV(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&FA(a,n)}return n}const PXe=Jt.mac?"mac":Jt.windows?"win":Jt.linux?"linux":"key";function AXe(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;l<n.length-1;++l){const u=n[l];if(/^(cmd|meta|m)$/i.test(u))s=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))a=!0;else if(/^mod$/i.test(u))e=="mac"?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),s&&(r="Meta-"+r),a&&(r="Shift-"+r),r}function ZO(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const MXe=Hf.default(Ut.domEventHandlers({keydown(t,e){return ZZ(XZ(e.state),t,e,"editor")}})),Ub=Xt.define({enables:MXe}),SV=new WeakMap;function XZ(t){let e=t.facet(Ub),n=SV.get(e);return n||SV.set(e,n=NXe(e.reduce((r,i)=>r.concat(i),[]))),n}function RXe(t,e,n){return ZZ(XZ(t.state),e,t,n)}let Fd=null;const $Xe=4e3;function NXe(t,e=PXe){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,u,c)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),m=s.split(/ (?!$)/).map(b=>AXe(b,e));for(let b=1;b<m.length;b++){let w=m.slice(0,b).join(" ");i(w,!0),h[w]||(h[w]={preventDefault:!0,stopPropagation:!1,run:[O=>{let S=Fd={view:O,prefix:w,scope:a};return setTimeout(()=>{Fd==S&&(Fd=null)},$Xe),!0}]})}let g=m.join(" ");i(g,!1);let y=h[g]||(h[g]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&y.run.push(l),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of s){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in c)c[f].run.push(h=>d(h,JA))}let l=a[e]||a.key;if(!!l)for(let u of s)o(u,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(u,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let JA=null;function ZZ(t,e,n,r){JA=e;let i=oYe(e),o=za(i,0),a=Bu(o)==i.length&&i!=" ",s="",l=!1,u=!1,c=!1;Fd&&Fd.view==n&&Fd.scope==r&&(s=Fd.prefix+" ",BZ.indexOf(e.keyCode)<0&&(u=!0,Fd=null));let d=new Set,f=y=>{if(y){for(let b of y.run)if(!d.has(b)&&(d.add(b),b(n)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},h=t[r],m,g;return h&&(f(h[s+ZO(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Jt.windows&&e.ctrlKey&&e.altKey)&&(m=Cf[e.keyCode])&&m!=i?(f(h[s+ZO(m,e,!0)])||e.shiftKey&&(g=H0[e.keyCode])!=i&&g!=m&&f(h[s+ZO(g,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+ZO(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),JA=null,l}class qb{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=GZ(e);return[new qb(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return DXe(e,n,r)}}function GZ(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==bi.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function xV(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function DXe(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==bi.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=GZ(t),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=s.right-(c?parseInt(c.paddingRight):0),h=YA(t,r),m=YA(t,i),g=h.type==wa.Text?h:null,y=m.type==wa.Text?m:null;if(g&&(t.lineWrapping||h.widgetLineBreaks)&&(g=xV(t,r,1,g)),y&&(t.lineWrapping||m.widgetLineBreaks)&&(y=xV(t,i,-1,y)),g&&y&&g.from==y.from&&g.to==y.to)return w(O(n.from,n.to,g));{let x=g?O(n.from,null,g):S(h,!1),C=y?O(null,n.to,y):S(m,!0),E=[];return(g||h).to<(y||m).from-(g&&y?1:0)||h.widgetLineBreaks>1&&x.bottom+t.defaultLineHeight/2<C.top?E.push(b(d,x.bottom,f,C.top)):x.bottom<C.top&&t.elementAtHeight((x.bottom+C.top)/2).type==wa.Text&&(x.bottom=C.top=(x.bottom+C.top)/2),w(x).concat(E).concat(w(C))}function b(x,C,E,T){return new qb(e,x-l.left,C-l.top-.01,E-x,T-C+.01)}function w({top:x,bottom:C,horizontal:E}){let T=[];for(let P=0;P<E.length;P+=2)T.push(b(E[P],x,E[P+1],C));return T}function O(x,C,E){let T=1e9,P=-1e9,A=[];function D(W,L,I,U,Q){let V=t.coordsAtPos(W,W==E.to?-2:2),q=t.coordsAtPos(I,I==E.from?2:-2);!V||!q||(T=Math.min(V.top,q.top,T),P=Math.max(V.bottom,q.bottom,P),Q==bi.LTR?A.push(o&&L?d:V.left,o&&U?f:q.right):A.push(!o&&U?d:q.left,!o&&L?f:V.right))}let N=x!=null?x:E.from,$=C!=null?C:E.to;for(let W of t.visibleRanges)if(W.to>N&&W.from<$)for(let L=Math.max(W.from,N),I=Math.min(W.to,$);;){let U=t.state.doc.lineAt(L);for(let Q of t.bidiSpans(U)){let V=Q.from+U.from,q=Q.to+U.from;if(V>=I)break;q>L&&D(Math.max(V,L),x==null&&V<=N,Math.min(q,I),C==null&&q>=$,Q.dir)}if(L=U.to+1,L>=I)break}return A.length==0&&D(N,x==null,$,C==null,t.textDirection),{top:T,bottom:P,horizontal:A}}function S(x,C){let E=s.top+(C?x.top:x.bottom);return{top:E,bottom:E,horizontal:[]}}}function LXe(t,e){return t.constructor==e.constructor&&t.eq(e)}class IXe{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(W1)!=e.state.facet(W1)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(W1);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!LXe(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const W1=Xt.define();function KZ(t){return[qi.define(e=>new IXe(e,t)),W1.of(t)]}const JZ=!Jt.ios,q0=Xt.define({combine(t){return gc(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function BXe(t={}){return[q0.of(t),FXe,VXe,jXe,EZ.of(!0)]}function eG(t){return t.startState.facet(q0)!=t.state.facet(q0)}const FXe=KZ({above:!0,markers(t){let{state:e}=t,n=e.facet(q0),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||JZ:n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:yt.cursor(i.head,i.head>i.anchor?-1:1);for(let l of qb.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=eG(t);return n&&CV(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){CV(e.state,t)},class:"cm-cursorLayer"});function CV(t,e){e.style.animationDuration=t.facet(q0).cursorBlinkRate+"ms"}const VXe=KZ({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:qb.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||eG(t)},class:"cm-selectionLayer"}),eM={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};JZ&&(eM[".cm-line"].caretColor=eM[".cm-content"].caretColor="transparent !important");const jXe=Hf.highest(Ut.theme(eM)),tG=Wn.define({map(t,e){return t==null?null:e.mapPos(t)}}),dy=So.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(tG)?r.value:n,t)}}),zXe=qi.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(dy);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(dy)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(dy),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(dy)!=t&&this.view.dispatch({effects:tG.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function QXe(){return[dy,zXe]}function EV(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function HXe(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class WXe{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,u,c)=>i(c,u,u+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,u,c)=>{let d=r(s,l,u);d&&c(u,u+s[0].length,d)};else if(r)this.addMatch=(s,l,u,c)=>c(u,u+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new Sf,r=n.add.bind(n);for(let{from:i,to:o}of HXe(e,this.maxLength))EV(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>e.view.viewport.from&&s<e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportChanged||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>a){let l=e.state.doc.lineAt(a),u=l.to<s?e.state.doc.lineAt(s):l,c=Math.max(o.from,l.from),d=Math.min(o.to,u.to);if(this.boundary){for(;a>l.from;a--)if(this.boundary.test(l.text[a-1-l.from])){c=a;break}for(;s<u.to;s++)if(this.boundary.test(u.text[s-u.from])){d=s;break}}let f=[],h,m=(g,y,b)=>f.push(b.range(g,y));if(l==u)for(this.regexp.lastIndex=c-l.from;(h=this.regexp.exec(l.text))&&h.index<d-l.from;)this.addMatch(h,e,h.index+l.from,m);else EV(e.state.doc,this.regexp,c,d,(g,y)=>this.addMatch(y,e,g,m));n=n.update({filterFrom:c,filterTo:d,filter:(g,y)=>g<c||y>d,add:f})}}return n}}const tM=/x/.unicode!=null?"gu":"g",UXe=new RegExp(`[\0-\b
  167. -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,tM),qXe={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let m2=null;function YXe(){var t;if(m2==null&&typeof document!="undefined"&&document.body){let e=document.body.style;m2=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return m2||!1}const U1=Xt.define({combine(t){let e=gc(t,{render:null,specialChars:UXe,addSpecialChars:null});return(e.replaceTabs=!YXe())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tM)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tM)),e}});function XXe(t={}){return[U1.of(t),ZXe()]}let TV=null;function ZXe(){return TV||(TV=qi.fromClass(class{constructor(t){this.view=t,this.decorations=yn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(U1)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new WXe({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=za(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=rv(a.text,s,r-a.from);return yn.replace({widget:new eZe((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=yn.replace({widget:new JXe(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(U1);t.startState.facet(U1)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const GXe="\u2022";function KXe(t){return t>=32?GXe:t==10?"\u2424":String.fromCharCode(9216+t)}class JXe extends mc{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=KXe(this.code),r=e.state.phrase("Control character")+" "+(qXe[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class eZe extends mc{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function tZe(){return rZe}const nZe=yn.line({class:"cm-activeLine"}),rZe=qi.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(nZe.range(i.from)),e=i.from)}return yn.set(n)}},{decorations:t=>t.decorations});class iZe extends mc{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?n.setAttribute("aria-label","placeholder "+this.content):n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?wm(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Qb(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function oZe(t){return qi.fromClass(class{constructor(e){this.view=e,this.placeholder=t?yn.set([yn.widget({widget:new iZe(t),side:1}).range(0)]):yn.none}get decorations(){return this.view.state.doc.length?yn.none:this.placeholder}},{decorations:e=>e.decorations})}const nM=2e3;function aZe(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>nM||n.off>nM||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let u=t.doc.line(l);u.length<=s&&o.push(yt.range(u.from+a,u.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let u=t.doc.line(l),c=RA(u.text,a,t.tabSize,!0);if(c<0)o.push(yt.cursor(u.to));else{let d=RA(u.text,s,t.tabSize);o.push(yt.range(u.from+c,u.from+d))}}}return o}function sZe(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function kV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>nM?-1:i==r.length?sZe(t,e.clientX):rv(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function lZe(t,e){let n=kV(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=kV(t,i);if(!s)return r;let l=aZe(t.state,n,s);return l.length?a?yt.create(l.concat(r.ranges)):yt.create(l):r}}:null}function uZe(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return Ut.mouseSelectionStyle.of((n,r)=>e(r)?lZe(n,r):null)}const cZe={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},dZe={style:"cursor: crosshair"};function fZe(t={}){let[e,n]=cZe[t.key||"Alt"],r=qi.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,Ut.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?dZe:null})]}const Uv="-10000px";class nG{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;l<o.length;l++){let u=o[l],c=-1;if(!!u){for(let d=0;d<this.tooltips.length;d++){let f=this.tooltips[d];f&&f.create==u.create&&(c=d)}if(c<0)a[l]=this.createTooltipView(u,l?a[l-1]:null),s&&(s[l]=!!u.above);else{let d=a[l]=this.tooltipViews[c];s&&(s[l]=n[c]),d.update&&d.update(e)}}}for(let l of this.tooltipViews)a.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(s.forEach((l,u)=>n[u]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function hZe(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const v2=Xt.define({combine:t=>{var e,n,r;return{position:Jt.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||hZe}}}),PV=new WeakMap,fD=qi.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(v2);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new nG(t,hD,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(v2);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Uv,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Jt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Uv&&i.style.left=="0px"){let o=i.getBoundingClientRect();r=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,n=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((i,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(v2).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{editor:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],u=this.manager.tooltipViews[s],{dom:c}=u,d=t.pos[s],f=t.size[s];if(!d||d.bottom<=Math.max(n.top,r.top)||d.top>=Math.min(n.bottom,r.bottom)||d.right<Math.max(n.left,r.left)-.1||d.left>Math.min(n.right,r.right)+.1){c.style.top=Uv;continue}let h=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,g=f.right-f.left,y=(e=PV.get(u))!==null&&e!==void 0?e:f.bottom-f.top,b=u.offset||gZe,w=this.view.textDirection==bi.LTR,O=f.width>r.right-r.left?w?r.left:r.right-f.width:w?Math.max(r.left,Math.min(d.left-(h?14:0)+b.x,r.right-g)):Math.min(Math.max(r.left,d.left-g+(h?14:0)-b.x),r.right-g),S=this.above[s];!l.strictSide&&(S?d.top-(f.bottom-f.top)-b.y<r.top:d.bottom+(f.bottom-f.top)+b.y>r.bottom)&&S==r.bottom-d.bottom>d.top-r.top&&(S=this.above[s]=!S);let x=(S?d.top-r.top:r.bottom-d.bottom)-m;if(x<y&&u.resize!==!1){if(x<this.view.defaultLineHeight){c.style.top=Uv;continue}PV.set(u,y),c.style.height=(y=x)/o+"px"}else c.style.height&&(c.style.height="");let C=S?d.top-y-m-b.y:d.bottom+m+b.y,E=O+g;if(u.overlap!==!0)for(let T of a)T.left<E&&T.right>O&&T.top<C+y&&T.bottom>C&&(C=S?T.top-y-2-m:T.bottom+m+2);if(this.position=="absolute"?(c.style.top=(C-t.parent.top)/o+"px",c.style.left=(O-t.parent.left)/i+"px"):(c.style.top=C/o+"px",c.style.left=O/i+"px"),h){let T=d.left+(w?b.x:-b.x)-(O+14-7);h.style.left=T/i+"px"}u.overlap!==!0&&a.push({left:O,top:C,right:E,bottom:C+y}),c.classList.toggle("cm-tooltip-above",S),c.classList.toggle("cm-tooltip-below",!S),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Uv}},{eventObservers:{scroll(){this.maybeMeasure()}}}),pZe=Ut.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),gZe={x:0,y:0},hD=Xt.define({enables:[fD,pZe]}),MS=Xt.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class CC{static create(e){return new CC(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new nG(e,MS,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const mZe=hD.compute([MS],t=>{let e=t.facet(MS);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:CC.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class vZe{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Yd)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let s=e.coordsAtPos(i);if(!s||n.y<s.top||n.y>s.bottom||n.x<s.left-e.defaultCharacterWidth||n.x>s.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==bi.RTL?-1:1;o=n.x<s.left?-u:u}let a=this.source(e,i,o);if(a!=null&&a.then){let s=this.pending={pos:i};a.then(l=>{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>qa(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(fD),n=e?e.manager.tooltips.findIndex(r=>r.create==CC.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!yZe(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!bZe(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const GO=4;function yZe(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-GO&&e.clientX<=r+GO&&e.clientY>=i-GO&&e.clientY<=o+GO}function bZe(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.right<r||a.top>i||Math.min(a.bottom,s)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function _Ze(t,e={}){let n=Wn.define(),r=So.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,No.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),s);u.pos=l,u.end!=null&&(u.end=o.changes.mapPos(u.end)),a.push(u)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(OZe)&&(i=[]);return i},provide:i=>MS.from(i)});return{active:r,extension:[r,qi.define(i=>new vZe(i,t,r,n,e.hoverTime||300)),mZe]}}function rG(t,e){let n=t.plugin(fD);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const OZe=Wn.define(),AV=Xt.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Y0(t,e){let n=t.plugin(iG),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const iG=qi.fromClass(class{constructor(t){this.input=t.state.facet(X0),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(AV);this.top=new KO(t,!0,e.topContainer),this.bottom=new KO(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(AV);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new KO(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new KO(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(X0);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),s.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?o:a).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Ut.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class KO{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=MV(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=MV(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function MV(t){let e=t.nextSibling;return t.remove(),e}const X0=Xt.define({enables:iG});class Gc extends up{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Gc.prototype.elementClass="";Gc.prototype.toDOM=void 0;Gc.prototype.mapMode=No.TrackBefore;Gc.prototype.startSide=Gc.prototype.endSide=-1;Gc.prototype.point=!0;const q1=Xt.define(),wZe=Xt.define(),SZe={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ar.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Yy=Xt.define();function xZe(t){return[oG(),Yy.of(Object.assign(Object.assign({},SZe),t))]}const rM=Xt.define({combine:t=>t.some(e=>e)});function oG(t){let e=[CZe];return t&&t.fixed===!1&&e.push(rM.of(!0)),e}const CZe=qi.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Yy).map(e=>new $V(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(rM),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(rM)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Ar.iter(this.view.state.facet(q1),this.view.viewport.from),r=[],i=this.gutters.map(o=>new EZe(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==wa.Text&&a){iM(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==wa.Text){iM(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Yy),n=t.state.facet(Yy),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ar.eq(t.startState.facet(q1),t.state.facet(q1),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new $V(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Ut.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==bi.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function RV(t){return Array.isArray(t)?t:[t]}function iM(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class EZe{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ar.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new aG(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];iM(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(wZe)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class $V{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=RV(n.markers(e)),n.initialSpacer&&(this.spacer=new aG(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=RV(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ar.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class aG{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),TZe(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=o<n.length?n[o++]:null,u=!1;if(l){let c=l.elementClass;c&&(r+=" "+c);for(let d=a;d<this.markers.length;d++)if(this.markers[d].compare(l)){s=d,u=!0;break}}else s=this.markers.length;for(;a<s;){let c=this.markers[a++];if(c.toDOM){c.destroy(i);let d=i.nextSibling;i.remove(),i=d}}if(!l)break;l.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),u&&a++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function TZe(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const kZe=Xt.define(),PZe=Xt.define(),_g=Xt.define({combine(t){return gc(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],a=n[i];r[i]=o?(s,l,u)=>o(s,l,u)||a(s,l,u):a}return r}})}});class y2 extends Gc{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function b2(t,e){return t.state.facet(_g).formatNumber(e,t.state)}const AZe=Yy.compute([_g],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(kZe)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new y2(b2(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(PZe)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(_g)!=e.state.facet(_g),initialSpacer(e){return new y2(b2(e,NV(e.state.doc.lines)))},updateSpacer(e,n){let r=b2(n.view,NV(n.view.state.doc.lines));return r==e.number?e:new y2(r)},domEventHandlers:t.facet(_g).domEventHandlers}));function MZe(t={}){return[_g.of(t),oG(),AZe]}function NV(t){let e=9;for(;e<t;)e=e*10+9;return e}const RZe=new class extends Gc{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},$Ze=q1.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(RZe.range(i)))}return Ar.of(e)});function NZe(){return $Ze}const sG=1024;let DZe=0;class _2{constructor(e,n){this.from=e,this.to=n}}class hr{constructor(e={}){this.id=DZe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=is.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}hr.closedBy=new hr({deserialize:t=>t.split(" ")});hr.openedBy=new hr({deserialize:t=>t.split(" ")});hr.group=new hr({deserialize:t=>t.split(" ")});hr.isolate=new hr({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});hr.contextHash=new hr({perNode:!0});hr.lookAhead=new hr({perNode:!0});hr.mounted=new hr({perNode:!0});class RS{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[hr.mounted.id]}}const LZe=Object.create(null);class is{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):LZe,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new is(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(hr.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(hr.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}is.none=new is("",Object.create(null),0,8);class pD{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let a=o(r);a&&(i||(i=Object.assign({},r.props)),i[a[0].id]=a[1])}n.push(i?new is(r.name,i,r.id,r.flags):r)}return new pD(n)}}const JO=new WeakMap,DV=new WeakMap;var ao;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(ao||(ao={}));class Gi{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[a,s]of o)this.props[typeof a=="number"?a:a.id]=s}}toString(){let e=RS.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new aM(this.topNode,e)}cursorAt(e,n=0,r=0){let i=JO.get(this)||this.topNode,o=new aM(i);return o.moveTo(e,n),JO.set(this,o._tree),o}get topNode(){return new Ja(this,0,0,null)}resolve(e,n=0){let r=Z0(JO.get(this)||this.topNode,e,n,!1);return JO.set(this,r),r}resolveInner(e,n=0){let r=Z0(DV.get(this)||this.topNode,e,n,!0);return DV.set(this,r),r}resolveStack(e,n=0){return FZe(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,a=e.mode||0,s=(a&ao.IncludeAnonymous)>0;for(let l=this.cursor(a|ao.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:vD(is.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Gi(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Gi(is.none,n,r,i)))}static build(e){return VZe(e)}}Gi.empty=new Gi(is.none,[],[],0);class gD{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new gD(this.buffer,this.index)}}class Tf{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return is.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let a=[];for(;e<r;)a.push(this.childString(e)),e=this.buffer[e+3];return o+"("+a.join(",")+")"}findChild(e,n,r,i,o){let{buffer:a}=this,s=-1;for(let l=e;l!=n&&!(lG(o,i,a[l+1],a[l+2])&&(s=l,r>0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s<n;){o[l++]=i[s++],o[l++]=i[s++]-r;let u=o[l++]=i[s++]-r;o[l++]=i[s++]-e,a=Math.max(a,u)}return new Tf(o,a,this.set)}}function lG(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Z0(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!r&&t instanceof Ja&&t.index<0?null:t.parent;if(!a)return t;t=a}let o=r?0:ao.IgnoreOverlays;if(r)for(let a=t,s=a.parent;s;a=s,s=a.parent)a instanceof Ja&&a.index<0&&((i=s.enter(e,n,o))===null||i===void 0?void 0:i.from)!=a.from&&(t=s);for(;;){let a=t.enter(e,n,o);if(!a)return t;t=a}}class uG{cursor(e=0){return new aM(this,e)}getChild(e,n=null,r=null){let i=LV(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return LV(this,e,n,r)}resolve(e,n=0){return Z0(this,e,n,!1)}resolveInner(e,n=0){return Z0(this,e,n,!0)}matchContext(e){return oM(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Ja extends uG{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let a=this;;){for(let{children:s,positions:l}=a._tree,u=n>0?s.length:-1;e!=u;e+=n){let c=s[e],d=l[e]+a.from;if(!!lG(i,r,d,d+c.length)){if(c instanceof Tf){if(o&ao.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,r-d,i);if(f>-1)return new zu(new IZe(a,c,e,d),null,f)}else if(o&ao.IncludeAnonymous||!c.type.isAnonymous||mD(c)){let f;if(!(o&ao.IgnoreMounts)&&(f=RS.get(c))&&!f.overlay)return new Ja(f.tree,d,e,a);let h=new Ja(c,d,e,a);return o&ao.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&ao.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&ao.IgnoreOverlays)&&(i=RS.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a<o)&&(n<0?s>=o:s>o))return new Ja(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function LV(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function oM(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class IZe{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class zu extends uG{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new zu(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&ao.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new zu(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new zu(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new zu(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new Gi(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function cG(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let a=t[o];(a.from>n.from||a.to<n.to)&&(n=a,e=o)}let r=n instanceof Ja&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new BZe(i,n)}class BZe{constructor(e,n){this.heads=e,this.node=n}get next(){return cG(this.heads)}}function FZe(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Ja?r:r.context.parent;o;o=o.parent)if(o.index<0){let a=o.parent;(i||(i=[r])).push(a.resolve(e,n)),o=a}else{let a=RS.get(o.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let s=new Ja(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Z0(s,e,n,!1))}}return i?cG(i):r}class aM{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Ja)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Ja?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&ao.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ao.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ao.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&ao.IncludeAnonymous||s instanceof Tf||!s.type.isAnonymous||mD(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer){e:for(let i=this.index,o=this.stack.length;o>=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}}for(let i=r;i<this.stack.length;i++)n=new zu(this.buffer,n,this.stack[i]);return this.bufferNode=new zu(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return oM(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return oM(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function mD(t){return t.children.some(e=>e instanceof Tf||!e.type.isAnonymous||mD(e))}function VZe(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=sG,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new gD(n,n.length):n,l=r.types,u=0,c=0;function d(x,C,E,T,P,A){let{id:D,start:N,end:$,size:W}=s,L=c,I=u;for(;W<0;)if(s.next(),W==-1){let K=o[D];E.push(K),T.push(N-x);return}else if(W==-3){u=D;return}else if(W==-4){c=D;return}else throw new RangeError(`Unrecognized record size: ${W}`);let U=l[D],Q,V,q=N-x;if($-N<=i&&(V=y(s.pos-C,P))){let K=new Uint16Array(V.size-V.skip),ie=s.pos-V.size,oe=K.length;for(;s.pos>ie;)oe=b(V.start,K,oe);Q=new Tf(K,$-V.start,r),q=V.start-x}else{let K=s.pos-W;s.next();let ie=[],oe=[],Se=D>=a?D:-1,ke=0,Y=$;for(;s.pos>K;)Se>=0&&s.id==Se&&s.size>=0?(s.end<=Y-i&&(m(ie,oe,N,ke,s.end,Y,Se,L,I),ke=ie.length,Y=s.end),s.next()):A>2500?f(N,K,ie,oe):d(N,K,ie,oe,Se,A+1);if(Se>=0&&ke>0&&ke<ie.length&&m(ie,oe,N,ke,N,Y,Se,L,I),ie.reverse(),oe.reverse(),Se>-1&&ke>0){let re=h(U,I);Q=vD(U,ie,oe,0,ie.length,0,$-N,re,re)}else Q=g(U,ie,oe,$-N,L-$,I)}E.push(Q),T.push(q)}function f(x,C,E,T){let P=[],A=0,D=-1;for(;s.pos>C;){let{id:N,start:$,end:W,size:L}=s;if(L>4)s.next();else{if(D>-1&&$<D)break;D<0&&(D=W-i),P.push(N,$,W),A++,s.next()}}if(A){let N=new Uint16Array(A*4),$=P[P.length-2];for(let W=P.length-3,L=0;W>=0;W-=3)N[L++]=P[W],N[L++]=P[W+1]-$,N[L++]=P[W+2]-$,N[L++]=L;E.push(new Tf(N,P[2]-$,r)),T.push($-x)}}function h(x,C){return(E,T,P)=>{let A=0,D=E.length-1,N,$;if(D>=0&&(N=E[D])instanceof Gi){if(!D&&N.type==x&&N.length==P)return N;($=N.prop(hr.lookAhead))&&(A=T[D]+N.length+$)}return g(x,E,T,P,A,C)}}function m(x,C,E,T,P,A,D,N,$){let W=[],L=[];for(;x.length>T;)W.push(x.pop()),L.push(C.pop()+E-P);x.push(g(r.types[D],W,L,A-P,N-A,$)),C.push(P-E)}function g(x,C,E,T,P,A,D){if(A){let N=[hr.contextHash,A];D=D?[N].concat(D):[N]}if(P>25){let N=[hr.lookAhead,P];D=D?[N].concat(D):[N]}return new Gi(x,C,E,T,D)}function y(x,C){let E=s.fork(),T=0,P=0,A=0,D=E.end-i,N={size:0,start:0,skip:0};e:for(let $=E.pos-x;E.pos>$;){let W=E.size;if(E.id==C&&W>=0){N.size=T,N.start=P,N.skip=A,A+=4,T+=4,E.next();continue}let L=E.pos-W;if(W<0||L<$||E.start<D)break;let I=E.id>=a?4:0,U=E.start;for(E.next();E.pos>L;){if(E.size<0)if(E.size==-3)I+=4;else break e;else E.id>=a&&(I+=4);E.next()}P=U,T+=W,A+=I}return(C<0||T==x)&&(N.size=T,N.start=P,N.skip=A),N.size>4?N:void 0}function b(x,C,E){let{id:T,start:P,end:A,size:D}=s;if(s.next(),D>=0&&T<a){let N=E;if(D>4){let $=s.pos-(D-4);for(;s.pos>$;)E=b(x,C,E)}C[--E]=N,C[--E]=A-x,C[--E]=P-x,C[--E]=T}else D==-3?u=T:D==-4&&(c=T);return E}let w=[],O=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,w,O,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:w.length?O[0]+w[0].length:0;return new Gi(l[t.topID],w.reverse(),O.reverse(),S)}const IV=new WeakMap;function Y1(t,e){if(!t.isAnonymous||e instanceof Tf||e.type!=t)return 1;let n=IV.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Gi)){n=1;break}n+=Y1(t,r)}IV.set(e,n)}return n}function vD(t,e,n,r,i,o,a,s,l){let u=0;for(let m=r;m<i;m++)u+=Y1(t,e[m]);let c=Math.ceil(u*1.5/8),d=[],f=[];function h(m,g,y,b,w){for(let O=y;O<b;){let S=O,x=g[O],C=Y1(t,m[O]);for(O++;O<b;O++){let E=Y1(t,m[O]);if(C+E>=c)break;C+=E}if(O==S+1){if(C>c){let E=m[S];h(E.children,E.positions,0,E.children.length,g[S]+w);continue}d.push(m[S])}else{let E=g[O-1]+m[O-1].length-x;d.push(vD(t,m,g,S,O,x,E,null,l))}f.push(x+w-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class jZe{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof zu?this.setBuffer(e.context.buffer,e.index,n):e instanceof Ja&&this.map.set(e.tree,n)}get(e){return e instanceof zu?this.getBuffer(e.context.buffer,e.index):e instanceof Ja?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class qh{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new qh(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let c=s<n.length?n[s]:null,d=c?c.fromA:1e9;if(d-l>=r)for(;a&&a.from<d;){let f=a;if(l>=f.from||d<=f.to||u){let h=Math.max(f.from,l)-u,m=Math.min(f.to,d)-u;f=h>=m?null:new qh(h,m,f.tree,f.offset+u,s>0,!!c)}if(f&&i.push(f),a.to>d)break;a=o<e.length?e[o++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return i}}class dG{startParse(e,n,r){return typeof e=="string"&&(e=new zZe(e)),r=r?r.length?r.map(i=>new _2(i.from,i.to)):[new _2(0,0)]:[new _2(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class zZe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new hr({perNode:!0});let QZe=0;class tl{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=QZe++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof tl&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new tl(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new $S(e);return r=>r.modified.indexOf(n)>-1?r:$S.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}}let HZe=0;class $S{constructor(e){this.name=e,this.instances=[],this.id=HZe++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&WZe(n,s.modified));if(r)return r;let i=[],o=new tl(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=UZe(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push($S.get(s,l));return o}}function WZe(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function UZe(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function yD(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new NS(r,a,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return fG.add(e)}const fG=new hr;class NS{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}NS.empty=new NS([],2,null);function hG(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let a of o.tag)n[a.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let a=i;for(let s of o)for(let l of s.set){let u=n[l.id];if(u){a=a?a+" "+u:u;break}}return a},scope:r}}function qZe(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function YZe(t,e,n,r=0,i=t.length){let o=new XZe(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class XZe{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let u=i,c=ZZe(e)||NS.empty,d=qZe(o,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),u),c.opaque)return;let f=e.tree&&e.tree.prop(hr.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),m=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),g=e.firstChild();for(let y=0,b=s;;y++){let w=y<f.overlay.length?f.overlay[y]:null,O=w?w.from+s:l,S=Math.max(n,b),x=Math.min(r,O);if(S<x&&g)for(;e.from<x&&(this.highlightRange(e,S,x,i,o),this.startSpan(Math.min(x,e.to),u),!(e.to>=O||!e.nextSibling())););if(!w||O>r)break;b=w.to+s,b>n&&(this.highlightRange(h.cursor(),Math.max(n,w.from+s),Math.min(r,b),"",m),this.startSpan(Math.min(r,b),u))}g&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function ZZe(t){let e=t.type.prop(fG);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ft=tl.define,e1=Ft(),Nd=Ft(),BV=Ft(Nd),FV=Ft(Nd),Dd=Ft(),t1=Ft(Dd),O2=Ft(Dd),Pu=Ft(),fh=Ft(Pu),Eu=Ft(),Tu=Ft(),sM=Ft(),qv=Ft(sM),n1=Ft(),Je={comment:e1,lineComment:Ft(e1),blockComment:Ft(e1),docComment:Ft(e1),name:Nd,variableName:Ft(Nd),typeName:BV,tagName:Ft(BV),propertyName:FV,attributeName:Ft(FV),className:Ft(Nd),labelName:Ft(Nd),namespace:Ft(Nd),macroName:Ft(Nd),literal:Dd,string:t1,docString:Ft(t1),character:Ft(t1),attributeValue:Ft(t1),number:O2,integer:Ft(O2),float:Ft(O2),bool:Ft(Dd),regexp:Ft(Dd),escape:Ft(Dd),color:Ft(Dd),url:Ft(Dd),keyword:Eu,self:Ft(Eu),null:Ft(Eu),atom:Ft(Eu),unit:Ft(Eu),modifier:Ft(Eu),operatorKeyword:Ft(Eu),controlKeyword:Ft(Eu),definitionKeyword:Ft(Eu),moduleKeyword:Ft(Eu),operator:Tu,derefOperator:Ft(Tu),arithmeticOperator:Ft(Tu),logicOperator:Ft(Tu),bitwiseOperator:Ft(Tu),compareOperator:Ft(Tu),updateOperator:Ft(Tu),definitionOperator:Ft(Tu),typeOperator:Ft(Tu),controlOperator:Ft(Tu),punctuation:sM,separator:Ft(sM),bracket:qv,angleBracket:Ft(qv),squareBracket:Ft(qv),paren:Ft(qv),brace:Ft(qv),content:Pu,heading:fh,heading1:Ft(fh),heading2:Ft(fh),heading3:Ft(fh),heading4:Ft(fh),heading5:Ft(fh),heading6:Ft(fh),contentSeparator:Ft(Pu),list:Ft(Pu),quote:Ft(Pu),emphasis:Ft(Pu),strong:Ft(Pu),link:Ft(Pu),monospace:Ft(Pu),strikethrough:Ft(Pu),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:n1,documentMeta:Ft(n1),annotation:Ft(n1),processingInstruction:Ft(n1),definition:tl.defineModifier("definition"),constant:tl.defineModifier("constant"),function:tl.defineModifier("function"),standard:tl.defineModifier("standard"),local:tl.defineModifier("local"),special:tl.defineModifier("special")};for(let t in Je){let e=Je[t];e instanceof tl&&(e.name=t)}hG([{tag:Je.link,class:"tok-link"},{tag:Je.heading,class:"tok-heading"},{tag:Je.emphasis,class:"tok-emphasis"},{tag:Je.strong,class:"tok-strong"},{tag:Je.keyword,class:"tok-keyword"},{tag:Je.atom,class:"tok-atom"},{tag:Je.bool,class:"tok-bool"},{tag:Je.url,class:"tok-url"},{tag:Je.labelName,class:"tok-labelName"},{tag:Je.inserted,class:"tok-inserted"},{tag:Je.deleted,class:"tok-deleted"},{tag:Je.literal,class:"tok-literal"},{tag:Je.string,class:"tok-string"},{tag:Je.number,class:"tok-number"},{tag:[Je.regexp,Je.escape,Je.special(Je.string)],class:"tok-string2"},{tag:Je.variableName,class:"tok-variableName"},{tag:Je.local(Je.variableName),class:"tok-variableName tok-local"},{tag:Je.definition(Je.variableName),class:"tok-variableName tok-definition"},{tag:Je.special(Je.variableName),class:"tok-variableName2"},{tag:Je.definition(Je.propertyName),class:"tok-propertyName tok-definition"},{tag:Je.typeName,class:"tok-typeName"},{tag:Je.namespace,class:"tok-namespace"},{tag:Je.className,class:"tok-className"},{tag:Je.macroName,class:"tok-macroName"},{tag:Je.propertyName,class:"tok-propertyName"},{tag:Je.operator,class:"tok-operator"},{tag:Je.comment,class:"tok-comment"},{tag:Je.meta,class:"tok-meta"},{tag:Je.invalid,class:"tok-invalid"},{tag:Je.punctuation,class:"tok-punctuation"}]);var w2;const Og=new hr;function pG(t){return Xt.define({combine:t?e=>e.concat(t):void 0})}const bD=new hr;class Jl{constructor(e,n,r=[],i=""){this.data=e,this.name=i,vr.prototype.hasOwnProperty("tree")||Object.defineProperty(vr.prototype,"tree",{get(){return uo(this)}}),this.parser=n,this.extension=[kf.of(this),vr.languageData.of((o,a,s)=>{let l=VV(o,a,s),u=l.type.prop(Og);if(!u)return[];let c=o.facet(u),d=l.type.prop(bD);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let m=o.facet(h.facet);return h.type=="replace"?m:m.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return VV(e,n,r).type.prop(Og)==this.data}findRegions(e){let n=e.facet(kf);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(Og)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(hr.mounted);if(s){if(s.tree.prop(Og)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;l<o.children.length;l++){let u=o.children[l];u instanceof Gi&&i(u,o.positions[l]+a)}};return i(uo(e),0),r}get allowsNesting(){return!0}}Jl.setState=Wn.define();function VV(t,e,n){let r=t.facet(kf),i=uo(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,ao.ExcludeBuffers))o.type.isTop&&(i=o);return i}class G0 extends Jl{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=pG(e.languageData);return new G0(n,e.parser.configure({props:[Og.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new G0(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function uo(t){let e=t.field(Jl.state,!1);return e?e.tree:Gi.empty}class GZe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Yv=null;class DS{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new DS(e,n,[],Gi.empty,0,r,[],null)}startParse(){return this.parser.startParse(new GZe(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Gi.empty&&this.isDone(n!=null?n:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(qh.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n!=null?n:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(qh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Yv;Yv=this;try{return e()}finally{Yv=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=jV(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,f)=>l.push({fromA:u,toA:c,fromB:d,toB:f})),r=qh.applyChanges(r,l),i=Gi.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);c<d&&s.push({from:c,to:d})}}}return new DS(this.parser,n,r,i,o,a,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=jV(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends dG{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=Yv;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new Gi(is.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Yv}}function jV(t,e,n){return qh.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Em{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Em(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=DS.create(e.facet(kf).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Em(r)}}Jl.state=So.define({create:Em.init,update(t,e){for(let n of e.effects)if(n.is(Jl.setState))return n.value;return e.startState.facet(kf)!=e.state.facet(kf)?Em.init(e.state):t.apply(e)}});let gG=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback!="undefined"&&(gG=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const S2=typeof navigator!="undefined"&&((w2=navigator.scheduling)===null||w2===void 0?void 0:w2.isInputPending)?()=>navigator.scheduling.isInputPending():null,KZe=qi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Jl.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Jl.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=gG(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Jl.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!S2?Math.max(25,e.timeRemaining()-5):1e9),s=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>S2&&S2()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Jl.setState.of(new Em(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>qa(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),kf=Xt.define({combine(t){return t.length?t[0]:null},enables:t=>[Jl.state,KZe,Ut.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class mG{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const JZe=Xt.define(),Yb=Xt.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function LS(t){let e=t.facet(Yb);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function K0(t,e){let n="",r=t.tabSize,i=t.facet(Yb)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function _D(t,e){t instanceof vr&&(t=new EC(t));for(let r of t.state.facet(JZe)){let i=r(t,e);if(i!==void 0)return i}let n=uo(t.state);return n.length>=e?eGe(t,n,e):null}class EC{constructor(e,n={}){this.state=e,this.options=n,this.unit=LS(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return rv(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const OD=new hr;function eGe(t,e,n){let r=e.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a!=r.node;a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return vG(r,t,n)}function vG(t,e,n){for(let r=t;r;r=r.next){let i=nGe(r.node);if(i)return i(wD.create(e,n,r))}return 0}function tGe(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function nGe(t){let e=t.type.prop(OD);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(hr.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>yG(a,!0,1,void 0,o&&!tGe(a)?i.from:void 0)}return t.parent==null?rGe:null}function rGe(){return 0}class wD extends EC{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new wD(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(iGe(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return vG(this.context.next,this.base,this.pos)}}function iGe(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function oGe(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let u=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+u}}s=l.to}}function aGe({closing:t,align:e=!0,units:n=1}){return r=>yG(r,e,n,t)}function yG(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?oGe(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const sGe=t=>t.baseIndent;function Xy({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const lGe=200;function uGe(){return vr.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+lGe)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:u}of a.selection.ranges){let c=a.doc.lineAt(u);if(c.from==s)continue;s=c.from;let d=_D(a,c.from);if(d==null)continue;let f=/^\s*/.exec(c.text)[0],h=K0(a,d);f!=h&&l.push({from:c.from,to:c.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const cGe=Xt.define(),SD=new hr;function bG(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function dGe(t,e,n){let r=uo(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let a=i;a;a=a.next){let s=a.node;if(s.to<=n||s.from>n)continue;if(o&&s.from<e)break;let l=s.type.prop(SD);if(l&&(s.to<r.length-50||r.length==t.doc.length||!fGe(s))){let u=l(s,t);u&&u.from<=n&&u.from>=e&&u.to>n&&(o=u)}}return o}function fGe(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function IS(t,e,n){for(let r of t.facet(cGe)){let i=r(t,e,n);if(i)return i}return dGe(t,e,n)}function _G(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const TC=Wn.define({map:_G}),Xb=Wn.define({map:_G});function OG(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const hp=So.define({create(){return yn.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(TC)&&!hGe(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(xD),i=r?yn.replace({widget:new _Ge(r(e.state,n.value))}):zV;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Xb)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>Ut.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(zV.range(r,i))}return yn.set(e,!0)}});function BS(t,e,n){var r;let i=null;return(r=t.field(hp,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function hGe(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function wG(t,e){return t.field(hp,!1)?e:e.concat(Wn.appendConfig.of(xG()))}const pGe=t=>{for(let e of OG(t)){let n=IS(t.state,e.from,e.to);if(n)return t.dispatch({effects:wG(t.state,[TC.of(n),SG(t,n)])}),!0}return!1},gGe=t=>{if(!t.state.field(hp,!1))return!1;let e=[];for(let n of OG(t)){let r=BS(t.state,n.from,n.to);r&&e.push(Xb.of(r),SG(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function SG(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Ut.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const mGe=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=IS(e,i.from,i.to);o&&n.push(TC.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:wG(t.state,n)}),!!n.length},vGe=t=>{let e=t.state.field(hp,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(Xb.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},yGe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:pGe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:gGe},{key:"Ctrl-Alt-[",run:mGe},{key:"Ctrl-Alt-]",run:vGe}],bGe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},xD=Xt.define({combine(t){return gc(t,bGe)}});function xG(t){let e=[hp,SGe];return t&&e.push(xD.of(t)),e}function CG(t,e){let{state:n}=t,r=n.facet(xD),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=BS(t.state,s.from,s.to);l&&t.dispatch({effects:Xb.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const zV=yn.replace({widget:new class extends mc{toDOM(t){return CG(t,null)}}});class _Ge extends mc{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return CG(e,this.value)}}const OGe={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class x2 extends Gc{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function wGe(t={}){let e=Object.assign(Object.assign({},OGe),t),n=new x2(e,!0),r=new x2(e,!1),i=qi.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(kf)!=a.state.facet(kf)||a.startState.field(hp,!1)!=a.state.field(hp,!1)||uo(a.startState)!=uo(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new Sf;for(let l of a.viewportLineBlocks){let u=BS(a.state,l.from,l.to)?r:IS(a.state,l.from,l.to)?n:null;u&&s.add(l.from,l.from,u)}return s.finish()}}),{domEventHandlers:o}=e;return[i,xZe({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||Ar.empty},initialSpacer(){return new x2(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let u=BS(a.state,s.from,s.to);if(u)return a.dispatch({effects:Xb.of(u)}),!0;let c=IS(a.state,s.from,s.to);return c?(a.dispatch({effects:TC.of(c)}),!0):!1}})}),xG()]}const SGe=Ut.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class kC{constructor(e,n){this.specs=e;let r;function i(s){let l=xf.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof Jl?s=>s.prop(Og)==a.data:a?s=>s==a:void 0,this.style=hG(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new xf(r):null,this.themeType=n.themeType}static define(e,n){return new kC(e,n||{})}}const lM=Xt.define(),EG=Xt.define({combine(t){return t.length?[t[0]]:null}});function C2(t){let e=t.facet(lM);return e.length?e:t.facet(EG)}function xGe(t,e){let n=[EGe],r;return t instanceof kC&&(t.module&&n.push(Ut.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(EG.of(t)):r?n.push(lM.computeN([Ut.darkTheme],i=>i.facet(Ut.darkTheme)==(r=="dark")?[t]:[])):n.push(lM.of(t)),n}class CGe{constructor(e){this.markCache=Object.create(null),this.tree=uo(e.state),this.decorations=this.buildDeco(e,C2(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=uo(e.state),r=C2(e.state),i=r!=C2(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&a>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return yn.none;let r=new Sf;for(let{from:i,to:o}of e.visibleRanges)YZe(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=yn.mark({class:l})))},i,o);return r.finish()}}const EGe=Hf.high(qi.fromClass(CGe,{decorations:t=>t.decorations})),TGe=kC.define([{tag:Je.meta,color:"#404740"},{tag:Je.link,textDecoration:"underline"},{tag:Je.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Je.emphasis,fontStyle:"italic"},{tag:Je.strong,fontWeight:"bold"},{tag:Je.strikethrough,textDecoration:"line-through"},{tag:Je.keyword,color:"#708"},{tag:[Je.atom,Je.bool,Je.url,Je.contentSeparator,Je.labelName],color:"#219"},{tag:[Je.literal,Je.inserted],color:"#164"},{tag:[Je.string,Je.deleted],color:"#a11"},{tag:[Je.regexp,Je.escape,Je.special(Je.string)],color:"#e40"},{tag:Je.definition(Je.variableName),color:"#00f"},{tag:Je.local(Je.variableName),color:"#30a"},{tag:[Je.typeName,Je.namespace],color:"#085"},{tag:Je.className,color:"#167"},{tag:[Je.special(Je.variableName),Je.macroName],color:"#256"},{tag:Je.definition(Je.propertyName),color:"#00c"},{tag:Je.comment,color:"#940"},{tag:Je.invalid,color:"#f00"}]),kGe=Ut.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),TG=1e4,kG="()[]{}",PG=Xt.define({combine(t){return gc(t,{afterCursor:!0,brackets:kG,maxScanDistance:TG,renderMatch:MGe})}}),PGe=yn.mark({class:"cm-matchingBracket"}),AGe=yn.mark({class:"cm-nonmatchingBracket"});function MGe(t){let e=[],n=t.matched?PGe:AGe;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const RGe=So.define({create(){return yn.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(PG);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Qu(e.state,i.head,-1,r)||i.head>0&&Qu(e.state,i.head-1,1,r)||r.afterCursor&&(Qu(e.state,i.head,1,r)||i.head<e.state.doc.length&&Qu(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return yn.set(n,!0)},provide:t=>Ut.decorations.from(t)}),$Ge=[RGe,kGe];function NGe(t={}){return[PG.of(t),$Ge]}const DGe=new hr;function uM(t,e,n){let r=t.prop(e<0?hr.openedBy:hr.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function cM(t){let e=t.type.prop(DGe);return e?e(t.node):t}function Qu(t,e,n,r={}){let i=r.maxScanDistance||TG,o=r.brackets||kG,a=uo(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let u=uM(l.type,n,o);if(u&&l.from<l.to){let c=cM(l);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return LGe(t,e,n,l,c,u,o)}}return IGe(t,e,n,a,s.type,i,o)}function LGe(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},u=0,c=s==null?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from<c.to){let d=cM(c);return{start:l,end:d?{from:d.from,to:d.to}:void 0,matched:!0}}else if(uM(c.type,n,a))u++;else if(uM(c.type,-n,a)){if(u==0){let d=cM(c);return{start:l,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function IGe(t,e,n,r,i,o,a){let s=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!c.next().done&&f<=o;){let h=c.value;n<0&&(f+=h.length);let m=e+f*n;for(let g=n>0?0:h.length-1,y=n>0?h.length:-1;g!=y;g+=n){let b=a.indexOf(h[g]);if(!(b<0||r.resolveInner(m+g,1).type!=i))if(b%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:m+g,to:m+g+1},matched:b>>1==l>>1};d--}}n>0&&(f+=h.length)}return c.done?{start:u,matched:!1}:null}const BGe=Object.create(null),QV=[is.none],HV=[],WV=Object.create(null),FGe=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])FGe[t]=VGe(BGe,e);function E2(t,e){HV.indexOf(t)>-1||(HV.push(t),console.warn(e))}function VGe(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let u of s.split(".")){let c=t[u]||Je[u];c?typeof c=="function"?l.length?l=l.map(c):E2(u,`Modifier ${u} used at start of tag`):l.length?E2(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:E2(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=WV[i];if(o)return o.id;let a=WV[i]=is.define({id:QV.length,name:r,props:[yD({[r]:n})]});return QV.push(a),a.id}bi.RTL,bi.LTR;const jGe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=ED(t.state,n.from);return r.line?zGe(t):r.block?HGe(t):!1};function CD(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const zGe=CD(qGe,0),QGe=CD(AG,0),HGe=CD((t,e)=>AG(t,e,UGe(e)),0);function ED(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Xv=50;function WGe(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-Xv,r),a=t.sliceDoc(i,i+Xv),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,u=o.length-s;if(o.slice(u-e.length,u)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let c,d;i-r<=2*Xv?c=d=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+Xv),d=t.sliceDoc(i-Xv,i));let f=/^\s*/.exec(c)[0].length,h=/\s*$/.exec(d)[0].length,m=d.length-h-n.length;return c.slice(f,f+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function UGe(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function AG(t,e,n=e.selection.ranges){let r=n.map(o=>ED(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>WGe(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;a<i.length;a++)if(s=i[a]){let l=r[a],{open:u,close:c}=s;o.push({from:u.pos-l.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+l.close.length})}return{changes:o}}return null}function qGe(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:a}of n){let s=r.length,l=1e9,u=ED(e,o).line;if(!!u){for(let c=o;c<=a;){let d=e.doc.lineAt(c);if(d.from>i&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,m=d.text.slice(f,f+u.length)==u?f:-1;f<d.text.length&&f<l&&(l=f),r.push({line:d,comment:m,token:u,indent:f,empty:h,single:!1})}c=d.to+1}if(l<1e9)for(let c=s;c<r.length;c++)r[c].indent<r[c].line.text.length&&(r[c].indent=l);r.length==s+1&&(r[s].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:u,empty:c,single:d}of r)(d||!c)&&o.push({from:s.from+u,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let u=a.from+s,c=u+l.length;a.text[c-a.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const dM=cd.define(),YGe=cd.define(),XGe=Xt.define(),MG=Xt.define({combine(t){return gc(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),RG=So.define({create(){return Hu.empty},update(t,e){let n=e.state.facet(MG),r=e.annotation(dM);if(r){let l=Ya.fromTransaction(e,r.selection),u=r.side,c=u==0?t.undone:t.done;return l?c=FS(c,c.length,n.minDepth,l):c=DG(c,e.startState.selection),new Hu(u==0?r.rest:c,u==0?c:r.rest)}let i=e.annotation(YGe);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Zi.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Ya.fromTransaction(e),a=e.annotation(Zi.time),s=e.annotation(Zi.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Hu(t.done.map(Ya.fromJSON),t.undone.map(Ya.fromJSON))}});function ZGe(t={}){return[RG,MG.of(t),Ut.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?$G:e.inputType=="historyRedo"?fM:null;return r?(e.preventDefault(),r(n)):!1}})]}function PC(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(RG,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const $G=PC(0,!1),fM=PC(1,!1),GGe=PC(0,!0),KGe=PC(1,!0);class Ya{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Ya(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ya(e.changes&&oo.fromJSON(e.changes),[],e.mapped&&Xu.fromJSON(e.mapped),e.startSelection&&yt.fromJSON(e.startSelection),e.selectionsAfter.map(yt.fromJSON))}static fromTransaction(e,n){let r=sl;for(let i of e.startState.facet(XGe)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new Ya(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,sl)}static selection(e){return new Ya(void 0,sl,void 0,void 0,e)}}function FS(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function JGe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l<n.length;){let u=n[l++],c=n[l++];s>=u&&a<=c&&(r=!0)}}),r}function eKe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function NG(t,e){return t.length?e.length?t.concat(e):t:e}const sl=[],tKe=200;function DG(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-tKe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),FS(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Ya.selection([e])]}function nKe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function T2(t,e){if(!t.length)return t;let n=t.length,r=sl;for(;n;){let i=rKe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Ya.selection(r)]:sl}function rKe(t,e,n){let r=NG(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):sl,n);if(!t.changes)return Ya.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new Ya(i,Wn.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const iKe=/^(input\.type|delete)($|\.)/;class Hu{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Hu(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||iKe.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,JGe(s.changes,e.changes))||r=="input.type.compose")?a=FS(a,a.length-1,i.minDepth,new Ya(e.changes.compose(s.changes),NG(Wn.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,sl)):a=FS(a,a.length,i.minDepth,e),new Hu(a,sl,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:sl;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&eKe(o[o.length-1],e)?this:new Hu(DG(this.done,e),this.undone,n,r)}addMapping(e){return new Hu(T2(this.done,e),T2(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],a=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:dM.of({side:e,rest:nKe(i),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?sl:i.slice(0,i.length-1);return o.mapped&&(s=T2(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:dM.of({side:e,rest:s,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Hu.empty=new Hu(sl,sl);const oKe=[{key:"Mod-z",run:$G,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:fM,preventDefault:!0},{linux:"Ctrl-Shift-z",run:fM,preventDefault:!0},{key:"Mod-u",run:GGe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:KGe,preventDefault:!0}];function iv(t,e){return yt.create(t.ranges.map(e),t.mainIndex)}function vc(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function vu({state:t,dispatch:e},n){let r=iv(t.selection,n);return r.eq(t.selection,!0)?!1:(e(vc(t,r)),!0)}function AC(t,e){return yt.cursor(e?t.to:t.from)}function LG(t,e){return vu(t,n=>n.empty?t.moveByChar(n,e):AC(n,e))}function ca(t){return t.textDirectionAt(t.state.selection.main.head)==bi.LTR}const IG=t=>LG(t,!ca(t)),BG=t=>LG(t,ca(t));function FG(t,e){return vu(t,n=>n.empty?t.moveByGroup(n,e):AC(n,e))}const aKe=t=>FG(t,!ca(t)),sKe=t=>FG(t,ca(t));function lKe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function MC(t,e,n){let r=uo(t).resolveInner(e.head),i=n?hr.closedBy:hr.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;lKe(t,u,i)?r=u:l=n?u.to:u.from}let o=r.type.prop(i),a,s;return o&&(a=n?Qu(t,r.from,1):Qu(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,yt.cursor(s,n?-1:1)}const uKe=t=>vu(t,e=>MC(t.state,e,!ca(t))),cKe=t=>vu(t,e=>MC(t.state,e,ca(t)));function VG(t,e){return vu(t,n=>{if(!n.empty)return AC(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const jG=t=>VG(t,!1),zG=t=>VG(t,!0);function QG(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(Ut.scrollMargins)){let a=o(t);a!=null&&a.top&&(n=Math.max(a==null?void 0:a.top,n)),a!=null&&a.bottom&&(r=Math.max(a==null?void 0:a.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function HG(t,e){let n=QG(t),{state:r}=t,i=iv(r.selection,a=>a.empty?t.moveVertically(a,e,n.height):AC(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,u=s.bottom-n.marginBottom;a&&a.top>l&&a.bottom<u&&(o=Ut.scrollIntoView(i.main.head,{y:"start",yMargin:a.top-l}))}return t.dispatch(vc(r,i),{effects:o}),!0}const UV=t=>HG(t,!1),hM=t=>HG(t,!0);function Wf(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=yt.cursor(r.from+o))}return i}const dKe=t=>vu(t,e=>Wf(t,e,!0)),fKe=t=>vu(t,e=>Wf(t,e,!1)),hKe=t=>vu(t,e=>Wf(t,e,!ca(t))),pKe=t=>vu(t,e=>Wf(t,e,ca(t))),gKe=t=>vu(t,e=>yt.cursor(t.lineBlockAt(e.head).from,1)),mKe=t=>vu(t,e=>yt.cursor(t.lineBlockAt(e.head).to,-1));function vKe(t,e,n){let r=!1,i=iv(t.selection,o=>{let a=Qu(t,o.head,-1)||Qu(t,o.head,1)||o.head>0&&Qu(t,o.head-1,1)||o.head<t.doc.length&&Qu(t,o.head+1,-1);if(!a||!a.end)return o;r=!0;let s=a.start.from==o.head?a.end.to:a.end.from;return n?yt.range(o.anchor,s):yt.cursor(s)});return r?(e(vc(t,i)),!0):!1}const yKe=({state:t,dispatch:e})=>vKe(t,e,!1);function Al(t,e){let n=iv(t.state.selection,r=>{let i=e(r);return yt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(vc(t.state,n)),!0)}function WG(t,e){return Al(t,n=>t.moveByChar(n,e))}const UG=t=>WG(t,!ca(t)),qG=t=>WG(t,ca(t));function YG(t,e){return Al(t,n=>t.moveByGroup(n,e))}const bKe=t=>YG(t,!ca(t)),_Ke=t=>YG(t,ca(t)),OKe=t=>Al(t,e=>MC(t.state,e,!ca(t))),wKe=t=>Al(t,e=>MC(t.state,e,ca(t)));function XG(t,e){return Al(t,n=>t.moveVertically(n,e))}const ZG=t=>XG(t,!1),GG=t=>XG(t,!0);function KG(t,e){return Al(t,n=>t.moveVertically(n,e,QG(t).height))}const qV=t=>KG(t,!1),YV=t=>KG(t,!0),SKe=t=>Al(t,e=>Wf(t,e,!0)),xKe=t=>Al(t,e=>Wf(t,e,!1)),CKe=t=>Al(t,e=>Wf(t,e,!ca(t))),EKe=t=>Al(t,e=>Wf(t,e,ca(t))),TKe=t=>Al(t,e=>yt.cursor(t.lineBlockAt(e.head).from)),kKe=t=>Al(t,e=>yt.cursor(t.lineBlockAt(e.head).to)),XV=({state:t,dispatch:e})=>(e(vc(t,{anchor:0})),!0),ZV=({state:t,dispatch:e})=>(e(vc(t,{anchor:t.doc.length})),!0),GV=({state:t,dispatch:e})=>(e(vc(t,{anchor:t.selection.main.anchor,head:0})),!0),KV=({state:t,dispatch:e})=>(e(vc(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),PKe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),AKe=({state:t,dispatch:e})=>{let n=RC(t).map(({from:r,to:i})=>yt.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:yt.create(n),userEvent:"select"})),!0},MKe=({state:t,dispatch:e})=>{let n=iv(t.selection,r=>{let i=uo(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from<r.from&&s.to>=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return yt.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(vc(t,n)),!0)},RKe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=yt.create([n.main]):n.main.empty||(r=yt.create([yt.cursor(n.main.head)])),r?(e(vc(t,r)),!0):!1};function Zb(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);l<a?(n="delete.backward",l=r1(t,l,!1)):l>a&&(n="delete.forward",l=r1(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=r1(t,a,!1),s=r1(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:yt.cursor(a,a<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Ut.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function r1(t,e,n){if(t instanceof Ut)for(let r of t.state.facet(Ut.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const JG=(t,e,n)=>Zb(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(s=a.text.slice(0,i-a.from))){if(s[s.length-1]==" ")return i-1;let u=rv(s,o.tabSize),c=u%LS(o)||LS(o);for(let d=0;d<c&&s[s.length-1-d]==" ";d++)i--;l=i}else l=Io(a.text,i-a.from,e,e)+a.from,l==i&&a.number!=(e?o.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(l-a.from,i-a.from))&&(l=Io(a.text,l-a.from,!1,!1)+a.from);return l}),pM=t=>JG(t,!1,!0),eK=t=>JG(t,!0,!1),tK=(t,e)=>Zb(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Io(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),c=a(u);if(s!=null&&c!=s)break;(u!=" "||r!=n.head)&&(s=c),r=l}return r}),nK=t=>tK(t,!1),$Ke=t=>tK(t,!0),NKe=t=>Zb(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),DKe=t=>Zb(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),LKe=t=>Zb(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),IKe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Mr.of(["",""])},range:yt.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},BKe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:Io(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:Io(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:yt.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function RC(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function rK(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of RC(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(yt.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(yt.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:yt.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const FKe=({state:t,dispatch:e})=>rK(t,e,!1),VKe=({state:t,dispatch:e})=>rK(t,e,!0);function iK(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of RC(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jKe=({state:t,dispatch:e})=>iK(t,e,!1),zKe=({state:t,dispatch:e})=>iK(t,e,!0),QKe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(RC(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=iv(e.selection,i=>{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function HKe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=uo(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(hr.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const JV=oK(!1),WKe=oK(!0);function oK(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&HKe(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let u=new EC(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=_D(u,o);for(c==null&&(c=rv(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));a<s.to&&/\s/.test(s.text[a-s.from]);)a++;l?{from:o,to:a}=l:o>s.from&&o<s.from+100&&!/\S/.test(s.text.slice(0,o))&&(o=s.from);let d=["",K0(e,c)];return l&&d.push(K0(e,u.lineIndent(s.from,-1))),{changes:{from:o,to:a,insert:Mr.of(d)},range:yt.cursor(o+1+d[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function TD(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:yt.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const UKe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new EC(t,{overrideIndentation:o=>{let a=n[o];return a==null?-1:a}}),i=TD(t,(o,a,s)=>{let l=_D(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=K0(t,l);(u!=c||s.from<o.from+u.length)&&(n[o.from]=l,a.push({from:o.from,to:o.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},aK=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(TD(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Yb)})}),{userEvent:"input.indent"})),!0),sK=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(TD(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=rv(i,t.tabSize),a=0,s=K0(t,Math.max(0,o-LS(t)));for(;a<i.length&&a<s.length&&i.charCodeAt(a)==s.charCodeAt(a);)a++;r.push({from:n.from+a,to:n.from+i.length,insert:s.slice(a)})}),{userEvent:"delete.dedent"})),!0),qKe=t=>(t.setTabFocusMode(),!0),YKe=[{key:"Ctrl-b",run:IG,shift:UG,preventDefault:!0},{key:"Ctrl-f",run:BG,shift:qG},{key:"Ctrl-p",run:jG,shift:ZG},{key:"Ctrl-n",run:zG,shift:GG},{key:"Ctrl-a",run:gKe,shift:TKe},{key:"Ctrl-e",run:mKe,shift:kKe},{key:"Ctrl-d",run:eK},{key:"Ctrl-h",run:pM},{key:"Ctrl-k",run:NKe},{key:"Ctrl-Alt-h",run:nK},{key:"Ctrl-o",run:IKe},{key:"Ctrl-t",run:BKe},{key:"Ctrl-v",run:hM}],XKe=[{key:"ArrowLeft",run:IG,shift:UG,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:aKe,shift:bKe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:hKe,shift:CKe,preventDefault:!0},{key:"ArrowRight",run:BG,shift:qG,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:sKe,shift:_Ke,preventDefault:!0},{mac:"Cmd-ArrowRight",run:pKe,shift:EKe,preventDefault:!0},{key:"ArrowUp",run:jG,shift:ZG,preventDefault:!0},{mac:"Cmd-ArrowUp",run:XV,shift:GV},{mac:"Ctrl-ArrowUp",run:UV,shift:qV},{key:"ArrowDown",run:zG,shift:GG,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ZV,shift:KV},{mac:"Ctrl-ArrowDown",run:hM,shift:YV},{key:"PageUp",run:UV,shift:qV},{key:"PageDown",run:hM,shift:YV},{key:"Home",run:fKe,shift:xKe,preventDefault:!0},{key:"Mod-Home",run:XV,shift:GV},{key:"End",run:dKe,shift:SKe,preventDefault:!0},{key:"Mod-End",run:ZV,shift:KV},{key:"Enter",run:JV,shift:JV},{key:"Mod-a",run:PKe},{key:"Backspace",run:pM,shift:pM},{key:"Delete",run:eK},{key:"Mod-Backspace",mac:"Alt-Backspace",run:nK},{key:"Mod-Delete",mac:"Alt-Delete",run:$Ke},{mac:"Mod-Backspace",run:DKe},{mac:"Mod-Delete",run:LKe}].concat(YKe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ZKe=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:uKe,shift:OKe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:cKe,shift:wKe},{key:"Alt-ArrowUp",run:FKe},{key:"Shift-Alt-ArrowUp",run:jKe},{key:"Alt-ArrowDown",run:VKe},{key:"Shift-Alt-ArrowDown",run:zKe},{key:"Escape",run:RKe},{key:"Mod-Enter",run:WKe},{key:"Alt-l",mac:"Ctrl-l",run:AKe},{key:"Mod-i",run:MKe,preventDefault:!0},{key:"Mod-[",run:sK},{key:"Mod-]",run:aK},{key:"Mod-Alt-\\",run:UKe},{key:"Shift-Mod-k",run:QKe},{key:"Shift-Mod-\\",run:yKe},{key:"Mod-/",run:jGe},{key:"Alt-A",run:QGe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:qKe}].concat(XKe),GKe={key:"Tab",run:aK,shift:sK};function ci(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)lK(t,arguments[e]);return t}function lK(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)lK(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const ej=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Tm{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(ej(s)):ej,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return za(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=JN(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Bu(e);let i=this.normalize(n);for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&o<n.length&&n.charCodeAt(o)==s&&a++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let a=this.matches[o],s=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,s=!0)),s||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol!="undefined"&&(Tm.prototype[Symbol.iterator]=function(){return this});const uK={from:-1,to:-1,match:/.*/.exec("")},kD="gm"+(/x/.unicode==null?"":"u");class cK{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=uK,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new dK(e,n,r,i,o);this.re=new RegExp(n,kD+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=VS(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=VS(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const k2=new WeakMap;class Bg{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=k2.get(e);if(!i||i.from>=r||i.to<=n){let s=new Bg(n,e.sliceString(n,r));return k2.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to<r&&(o+=e.sliceString(i.to,r)),k2.set(e,new Bg(a,o)),new Bg(n,o.slice(n-a,r-a))}}class dK{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=uK,this.matchPos=VS(e,i),this.re=new RegExp(n,kD+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Bg.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=VS(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Bg.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol!="undefined"&&(cK.prototype[Symbol.iterator]=dK.prototype[Symbol.iterator]=function(){return this});function KKe(t){try{return new RegExp(t,kD),!0}catch{return!1}}function VS(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function gM(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ci("input",{class:"cm-textfield",name:"line",value:e}),r=ci("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:jS.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},ci("label",t.state.phrase("Go to line"),": ",n)," ",ci("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,u,c,d]=o,f=c?+c.slice(1):0,h=u?+u:s.number;if(u&&d){let y=h/100;l&&(y=y*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*y)}else u&&l&&(h=h*(l=="-"?-1:1)+s.number);let m=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),g=yt.cursor(m.from+Math.max(0,Math.min(f,m.length)));t.dispatch({effects:[jS.of(!1),Ut.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:r}}const jS=Wn.define(),tj=So.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(jS)&&(t=n.value);return t},provide:t=>X0.from(t,e=>e?gM:null)}),JKe=t=>{let e=Y0(t,gM);if(!e){let n=[jS.of(!0)];t.state.field(tj,!1)==null&&n.push(Wn.appendConfig.of([tj,eJe])),t.dispatch({effects:n}),e=Y0(t,gM)}return e&&e.dom.querySelector("input").select(),!0},eJe=Ut.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),tJe={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},fK=Xt.define({combine(t){return gc(t,tJe,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function nJe(t){let e=[sJe,aJe];return t&&e.push(fK.of(t)),e}const rJe=yn.mark({class:"cm-selectionMatch"}),iJe=yn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function nj(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=xi.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=xi.Word)}function oJe(t,e,n,r){return t(e.sliceDoc(n,n+1))==xi.Word&&t(e.sliceDoc(r-1,r))==xi.Word}const aJe=qi.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(fK),{state:n}=t,r=n.selection;if(r.ranges.length>1)return yn.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return yn.none;let l=n.wordAt(i.head);if(!l)return yn.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return yn.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(nj(a,n,i.from,i.to)&&oJe(a,n,i.from,i.to)))return yn.none}else if(o=n.sliceDoc(i.from,i.to),!o)return yn.none}let s=[];for(let l of t.visibleRanges){let u=new Tm(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!a||nj(a,n,c,d))&&(i.empty&&c<=i.from&&d>=i.to?s.push(iJe.range(c,d)):(c>=i.to||d<=i.from)&&s.push(rJe.range(c,d)),s.length>e.maxMatches))return yn.none}}return yn.set(s)}},{decorations:t=>t.decorations}),sJe=Ut.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),lJe=({state:t,dispatch:e})=>{let{selection:n}=t,r=yt.create(n.ranges.map(i=>t.wordAt(i.head)||yt.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function uJe(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new Tm(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new Tm(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const cJe=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return lJe({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=uJe(t,r);return i?(e(t.update({selection:t.selection.addRange(yt.range(i.from,i.to),!1),effects:Ut.scrollIntoView(i.to)})),!0):!1},ov=Xt.define({combine(t){return gc(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new wJe(e),scrollToMatch:e=>Ut.scrollIntoView(e)})}});class hK{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||KKe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
  168. `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new pJe(this):new fJe(this)}getCursor(e,n=0,r){let i=e.doc?e:vr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?dg(this,i,n,r):cg(this,i,n,r)}}class pK{constructor(e){this.spec=e}}function cg(t,e,n,r){return new Tm(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?dJe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function dJe(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(zS(i,n-o))!=xi.Word||e(QS(i,n-o))!=xi.Word)&&(e(QS(i,r-o))!=xi.Word||e(zS(i,r-o))!=xi.Word))}class fJe extends pK{constructor(e){super(e)}nextMatch(e,n,r){let i=cg(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=cg(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),a=cg(this.spec,e,o,i),s=null;for(;!a.nextOverlapping().done;)s=a.value;if(s)return s;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=cg(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=cg(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function dg(t,e,n,r){return new cK(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?hJe(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function zS(t,e){return t.slice(Io(t,e,!1),e)}function QS(t,e){return t.slice(e,Io(t,e))}function hJe(t){return(e,n,r)=>!r[0].length||(t(zS(r.input,r.index))!=xi.Word||t(QS(r.input,r.index))!=xi.Word)&&(t(QS(r.input,r.index+r[0].length))!=xi.Word||t(zS(r.input,r.index+r[0].length))!=xi.Word)}class pJe extends pK{nextMatch(e,n,r){let i=dg(this.spec,e,r,e.doc.length).next();return i.done&&(i=dg(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=dg(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=dg(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=dg(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const J0=Wn.define(),PD=Wn.define(),rf=So.define({create(t){return new P2(mM(t).create(),null)},update(t,e){for(let n of e.effects)n.is(J0)?t=new P2(n.value.create(),t.panel):n.is(PD)&&(t=new P2(t.query,n.value?AD:null));return t},provide:t=>X0.from(t,e=>e.panel)});class P2{constructor(e,n){this.query=e,this.panel=n}}const gJe=yn.mark({class:"cm-searchMatch"}),mJe=yn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),vJe=qi.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(rf))}update(t){let e=t.state.field(rf);(e!=t.startState.field(rf)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return yn.none;let{view:n}=this,r=new Sf;for(let i=0,o=n.visibleRanges,a=o.length;i<a;i++){let{from:s,to:l}=o[i];for(;i<a-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(u,c)=>{let d=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);r.add(u,c,d?mJe:gJe)})}return r.finish()}},{decorations:t=>t.decorations});function Gb(t){return e=>{let n=e.state.field(rf,!1);return n&&n.query.spec.valid?t(e,n):vK(e)}}const HS=Gb((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=yt.single(r.from,r.to),o=t.state.facet(ov);return t.dispatch({selection:i,effects:[MD(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),mK(t),!0}),WS=Gb((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=yt.single(i.from,i.to),a=t.state.facet(ov);return t.dispatch({selection:o,effects:[MD(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),mK(t),!0}),yJe=Gb((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:yt.create(n.map(r=>yt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),bJe=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new Tm(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(yt.range(s.value.from,s.value.to))}return e(t.update({selection:yt.create(o,a),userEvent:"select.search.matches"})),!0},rj=Gb((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=[],s,l,u=[];if(o.from==r&&o.to==i&&(l=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),u.push(Ut.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let c=a.length==0||a[0].from>=o.to?0:o.to-o.from-l.length;s=yt.single(o.from-c,o.to-c),u.push(MD(t,o)),u.push(n.facet(ov).scrollToMatch(s.main,t))}return t.dispatch({changes:a,selection:s,effects:u,userEvent:"input.replace"}),!0}),_Je=Gb((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Ut.announce.of(r),userEvent:"input.replace.all"}),!0});function AD(t){return t.state.facet(ov).createPanel(t)}function mM(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let u=t.facet(ov);return new hK({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function gK(t){let e=Y0(t,AD);return e&&e.dom.querySelector("[main-field]")}function mK(t){let e=gK(t);e&&e==t.root.activeElement&&e.select()}const vK=t=>{let e=t.state.field(rf,!1);if(e&&e.panel){let n=gK(t);if(n&&n!=t.root.activeElement){let r=mM(t.state,e.query.spec);r.valid&&t.dispatch({effects:J0.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[PD.of(!0),e?J0.of(mM(t.state,e.query.spec)):Wn.appendConfig.of(xJe)]});return!0},yK=t=>{let e=t.state.field(rf,!1);if(!e||!e.panel)return!1;let n=Y0(t,AD);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:PD.of(!1)}),!0},OJe=[{key:"Mod-f",run:vK,scope:"editor search-panel"},{key:"F3",run:HS,shift:WS,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:HS,shift:WS,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:yK,scope:"editor search-panel"},{key:"Mod-Shift-l",run:bJe},{key:"Mod-Alt-g",run:JKe},{key:"Mod-d",run:cJe,preventDefault:!0}];class wJe{constructor(e){this.view=e;let n=this.query=e.state.field(rf).query.spec;this.commit=this.commit.bind(this),this.searchField=ci("input",{value:n.search,placeholder:ys(e,"Find"),"aria-label":ys(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ci("input",{value:n.replace,placeholder:ys(e,"Replace"),"aria-label":ys(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ci("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ci("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ci("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return ci("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=ci("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>HS(e),[ys(e,"next")]),r("prev",()=>WS(e),[ys(e,"previous")]),r("select",()=>yJe(e),[ys(e,"all")]),ci("label",null,[this.caseField,ys(e,"match case")]),ci("label",null,[this.reField,ys(e,"regexp")]),ci("label",null,[this.wordField,ys(e,"by word")]),...e.state.readOnly?[]:[ci("br"),this.replaceField,r("replace",()=>rj(e),[ys(e,"replace")]),r("replaceAll",()=>_Je(e),[ys(e,"replace all")])],ci("button",{name:"close",onclick:()=>yK(e),"aria-label":ys(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new hK({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:J0.of(e)}))}keydown(e){RXe(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?WS:HS)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),rj(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(J0)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ov).top}}function ys(t,e){return t.state.phrase(e)}const i1=30,o1=/[\s\.,:;?!]/;function MD(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-i1),a=Math.min(i,n+i1),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;l<i1;l++)if(!o1.test(s[l+1])&&o1.test(s[l])){s=s.slice(l);break}}if(a!=i){for(let l=s.length-1;l>s.length-i1;l--)if(!o1.test(s[l-1])&&o1.test(s[l])){s=s.slice(0,l);break}}return Ut.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const SJe=Ut.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xJe=[rf,Hf.low(vJe),SJe];class bK{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=uo(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(OK(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function ij(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function CJe(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=ij(e)+ij(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function _K(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:CJe(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function EJe(t,e){return n=>{for(let r=uo(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class oj{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function of(t){return t.selection.main.from}function OK(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const RD=cd.define();function TJe(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:yt.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const aj=new WeakMap;function kJe(t){if(!Array.isArray(t))return t;let e=aj.get(t);return e||aj.set(t,e=_K(t)),e}const US=Wn.define(),eb=Wn.define();class PJe{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=za(e,n),i=Bu(r);this.chars.push(r);let o=e.slice(n,n+i),a=o.toUpperCase();this.folded.push(za(a==o?o.toLowerCase():a,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:a}=this;if(n.length==1){let w=za(e,0),O=Bu(w),S=O==e.length?0:-100;if(w!=n[0])if(w==r[0])S+=-200;else return null;return this.ret(S,[0,O])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,u=0;if(s<0){for(let w=0,O=Math.min(e.length,200);w<O&&u<l;){let S=za(e,w);(S==n[u]||S==r[u])&&(i[u++]=w),w+=Bu(S)}if(u<l)return null}let c=0,d=0,f=!1,h=0,m=-1,g=-1,y=/[a-z]/.test(e),b=!0;for(let w=0,O=Math.min(e.length,200),S=0;w<O&&d<l;){let x=za(e,w);s<0&&(c<l&&x==n[c]&&(o[c++]=w),h<l&&(x==n[h]||x==r[h]?(h==0&&(m=w),g=w+1,h++):h=0));let C,E=x<255?x>=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(C=JN(x))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!w||E==1&&y||S==0&&E!=0)&&(n[d]==x||r[d]==x&&(f=!0)?a[d++]=w:a.length&&(b=!1)),S=E,w+=Bu(x)}return d==l&&a[0]==0&&b?this.result(-100+(f?-200:0),a,e):h==l&&m==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-200+-700-e.length,[m,g]):d==l?this.result(-100+(f?-200:0)+-700+(b?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Bu(za(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class AJe{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Do=Xt.define({combine(t){return gc(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:MJe,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>sj(e(r),n(r)),optionClass:(e,n)=>r=>sj(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function sj(t,e){return t?e?t+" "+e:t:e}function MJe(t,e,n,r,i,o){let a=t.textDirection==bi.RTL,s=a,l=!1,u="top",c,d,f=e.left-i.left,h=i.right-e.right,m=r.right-r.left,g=r.bottom-r.top;if(s&&f<Math.min(m,h)?s=!1:!s&&h<Math.min(m,f)&&(s=!0),m<=(s?f:h))c=Math.max(i.top,Math.min(n.top,i.bottom-g))-e.top,d=Math.min(400,s?f:h);else{l=!0,d=Math.min(400,(a?e.right:i.right-e.left)-30);let w=i.bottom-e.bottom;w>=g||w>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function RJe(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let u=0;u<o.length;){let c=o[u++],d=o[u++];c>l&&a.appendChild(document.createTextNode(s.slice(l,c)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(c,d))),f.className="cm-completionMatchedText",l=d}return l<s.length&&a.appendChild(document.createTextNode(s.slice(l))),a},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function A2(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class $Je{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(Do);this.optionContent=RJe(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=A2(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]<u.length){this.applyCompletion(e,u[+d[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Do).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:eb.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=A2(o.length,a,e.state.facet(Do).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=A2(n.options.length,n.selected,this.view.state.facet(Do).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>qa(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&DJe(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(Do).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let a=r.from;a<r.to;a++){let{completion:s,match:l}=e[a],{section:u}=s;if(u){let f=typeof u=="string"?u:u.name;if(f!=o&&(a>r.from||r.from==0))if(o=f,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+a,c.setAttribute("role","option");let d=this.optionClass(s);d&&(c.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&c.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function NJe(t,e){return n=>new $Je(n,t,e)}function DJe(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function lj(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function LJe(t,e){let n=[],r=null,i=u=>{n.push(u);let{section:c}=u.completion;if(c){r||(r=[]);let d=typeof c=="string"?c:c.name;r.some(f=>f.name==d)||r.push(typeof c=="string"?{name:d}:c)}},o=e.facet(Do);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)i(new oj(d,u.source,c?c(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),f,h=o.filterStrict?new AJe(d):new PJe(d);for(let m of u.result.options)if(f=h.match(m.label)){let g=m.displayLabel?c?c(m,f.matched):[]:f.matched;i(new oj(m,u.source,g,f.score+(m.boost||0)))}}}if(r){let u=Object.create(null),c=0,d=(f,h)=>{var m,g;return((m=f.rank)!==null&&m!==void 0?m:1e9)-((g=h.rank)!==null&&g!==void 0?g:1e9)||(f.name<h.name?-1:1)};for(let f of r.sort(d))c-=1e5,u[f.name]=c;for(let f of n){let{section:h}=f.completion;h&&(f.score+=u[typeof h=="string"?h:h.name])}}let a=[],s=null,l=o.compareCompletions;for(let u of n.sort((c,d)=>d.score-c.score||l(c.completion,d.completion))){let c=u.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?a.push(u):lj(u.completion)>lj(s)&&(a[a.length-1]=u),s=u.completion}return a}class wg{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new wg(this.options,uj(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let a=LJe(e,n);if(!a.length)return i&&e.some(l=>l.state==1)?new wg(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let s=n.facet(Do).selectOnOpen?0:-1;if(i&&i.selected!=s&&i.selected!=-1){let l=i.options[i.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==l){s=u;break}}return new wg(a,uj(r,s),{pos:e.reduce((l,u)=>u.hasResult()?Math.min(l,u.from):l,1e8),create:zJe,above:o.aboveCursor},i?i.timestamp:Date.now(),s,!1)}map(e){return new wg(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class qS{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new qS(VJe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Do),o=(r.override||n.languageDataAt("autocomplete",of(n)).map(kJe)).map(s=>(this.active.find(u=>u.source==s)||new Cs(s,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((s,l)=>s==this.active[l])&&(o=this.active);let a=this.open;a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(s=>s.hasResult()&&e.changes.touchesRange(s.from,s.to))||!IJe(o,this.active)?a=wg.build(o,n,this.id,a,r):a&&a.disabled&&!o.some(s=>s.state==1)&&(a=null),!a&&o.every(s=>s.state!=1)&&o.some(s=>s.hasResult())&&(o=o.map(s=>s.hasResult()?new Cs(s.source,0):s));for(let s of e.effects)s.is(xK)&&(a=a&&a.setSelected(s.value,this.id));return o==this.active&&a==this.open?this:new qS(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?BJe:FJe}}function IJe(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const BJe={"aria-autocomplete":"list"},FJe={};function uj(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const VJe=[];function wK(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(RD);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Cs{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=wK(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new Cs(i.source,0)),r&4&&i.state==0&&(i=new Cs(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(US))i=new Cs(i.source,1,o.value?of(e.state):-1);else if(o.is(eb))i=new Cs(i.source,0);else if(o.is(SK))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Cs(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(of(e.state))}}class Fg extends Cs{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=of(e.state);if((this.explicitPos<0?s<=o:s<this.from)||s>a||!i||n&2&&of(e.startState)==this.from)return new Cs(this.source,n&4?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return jJe(i.validFor,e.state,o,a)?new Fg(this.source,l,i,o,a):i.update&&(i=i.update(i,o,a,new bK(e.state,s,l>=0)))?new Fg(this.source,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:of(e.state)):new Cs(this.source,1,l)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Fg(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Cs(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function jJe(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):OK(t,!0).test(i)}const SK=Wn.define({map(t,e){return t.map(n=>n.map(e))}}),xK=Wn.define(),Ha=So.define({create(){return qS.start()},update(t,e){return t.update(e)},provide:t=>[hD.from(t,e=>e.tooltip),Ut.contentAttributes.from(t,e=>e.attrs)]});function $D(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Ha).active.find(i=>i.source==e.source);return r instanceof Fg?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},TJe(t.state,n,r.from,r.to)),{annotations:RD.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const zJe=NJe(Ha,$D);function a1(t,e="option"){return n=>{let r=n.state.field(Ha,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Do).interactionDelay)return!1;let i=1,o;e=="page"&&(o=rG(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:xK.of(s)}),!0}}const QJe=t=>{let e=t.state.field(Ha,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Do).interactionDelay?!1:$D(t,e.open.options[e.open.selected])},cj=t=>t.state.field(Ha,!1)?(t.dispatch({effects:US.of(!0)}),!0):!1,HJe=t=>{let e=t.state.field(Ha,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:eb.of(null)}),!0)};class WJe{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const UJe=50,qJe=1e3,YJe=qi.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Ha).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Ha),n=t.state.facet(Do);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Ha)==e)return;let r=t.transactions.some(o=>{let a=wK(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;o<this.running.length;o++){let a=this.running[o];if(r||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>UJe&&Date.now()-a.time>qJe){for(let s of a.context.abortListeners)try{s()}catch(l){qa(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(US)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.state==1&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Ha);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=of(e),r=new bK(e,n,t.explicitPos==n,this.view),i=new WJe(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:eb.of(null)}),qa(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Do).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Do);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let a=new Fg(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:of(i.updates.length?i.updates[0].startState:this.view.state));for(let s of i.updates)a=a.update(s,n);if(a.hasResult()){e.push(a);continue}}let o=this.view.state.field(Ha).active.find(a=>a.source==i.active.source);if(o&&o.state==1)if(i.done==null){let a=new Cs(i.active.source,0);for(let s of i.updates)a=a.update(s,n);a.state!=1&&e.push(a)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:SK.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Ha,!1);if(e&&e.tooltip&&this.view.state.facet(Do).closeOnBlur){let n=e.open&&rG(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:eb.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:US.of(!1)}),20),this.composing=0}}}),XJe=typeof navigator=="object"&&/Win/.test(navigator.platform),ZJe=Hf.highest(Ut.domEventHandlers({keydown(t,e){let n=e.state.field(Ha,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(XJe&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&$D(e,r),!1}})),CK=Ut.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class GJe{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class ND{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,No.TrackDel),r=e.mapPos(this.to,1,No.TrackDel);return n==null||r==null?null:new ND(this.field,n,r)}}class DD{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let u=a,c=/^\t*/.exec(l)[0].length;for(let d=0;d<c;d++)u+=e.facet(Yb);i.push(n+u.length-c),l=u+l.slice(c)}r.push(l),n+=l.length+1}let s=this.fieldPositions.map(l=>new ND(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",u=-1,c=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d<n.length;d++)(s!=null?n[d].seq==s:c?n[d].name==c:!1)&&(u=d);if(u<0){let d=0;for(;d<n.length&&(s==null||n[d].seq!=null&&n[d].seq<s);)d++;n.splice(d,0,{seq:s,name:c}),u=d;for(let f of i)f.field>=u&&f.field++}i.push(new GJe(u,r.length,o.index,o.index+c.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,u)=>{for(let c of i)c.line==r.length&&c.from>u&&(c.from--,c.to--);return l}),r.push(a)}return new DD(r,i)}}let KJe=yn.widget({widget:new class extends mc{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),JJe=yn.mark({class:"cm-snippetField"});class av{constructor(e,n){this.ranges=e,this.active=n,this.deco=yn.set(e.map(r=>(r.from==r.to?KJe:JJe).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new av(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Kb=Wn.define({map(t,e){return t&&t.map(e)}}),eet=Wn.define(),tb=So.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Kb))return n.value;if(n.is(eet)&&t)return new av(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Ut.decorations.from(t,e=>e?e.deco:yn.none)});function LD(t,e){return yt.create(t.filter(n=>n.field==e).map(n=>yt.range(n.from,n.to)))}function tet(t){let e=DD.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),l={changes:{from:i,to:o,insert:Mr.of(a)},scrollIntoView:!0,annotations:r?[RD.of(r),Zi.userEvent.of("input.complete")]:void 0};if(s.length&&(l.selection=LD(s,0)),s.some(u=>u.field>0)){let u=new av(s,0),c=l.effects=[Kb.of(u)];n.state.field(tb,!1)===void 0&&c.push(Wn.appendConfig.of([tb,aet,set,CK]))}n.dispatch(n.state.update(l))}}function EK(t){return({state:e,dispatch:n})=>{let r=e.field(tb,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:LD(r.ranges,i),effects:Kb.of(o?null:new av(r.ranges,i)),scrollIntoView:!0})),!0}}const net=({state:t,dispatch:e})=>t.field(tb,!1)?(e(t.update({effects:Kb.of(null)})),!0):!1,ret=EK(1),iet=EK(-1),oet=[{key:"Tab",run:ret,shift:iet},{key:"Escape",run:net}],dj=Xt.define({combine(t){return t.length?t[0]:oet}}),aet=Hf.highest(Ub.compute([dj],t=>t.facet(dj)));function Va(t,e){return Object.assign(Object.assign({},e),{apply:tet(t)})}const set=Ut.domEventHandlers({mousedown(t,e){let n=e.state.field(tb,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:LD(n.ranges,i.field),effects:Kb.of(n.ranges.some(o=>o.field>i.field)?new av(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),nb={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Lh=Wn.define({map(t,e){let n=e.mapPos(t,-1,No.TrackAfter);return n==null?void 0:n}}),ID=new class extends up{};ID.startSide=1;ID.endSide=-1;const TK=So.define({create(){return Ar.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Lh)&&(t=t.update({add:[ID.range(n.value,n.value+1)]}));return t}});function uet(){return[det,TK]}const M2="()[]{}<>";function kK(t){for(let e=0;e<M2.length;e+=2)if(M2.charCodeAt(e)==t)return M2.charAt(e+1);return JN(t<128?t:t+1)}function PK(t,e){return t.languageDataAt("closeBrackets",e)[0]||nb}const cet=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),det=Ut.inputHandler.of((t,e,n,r)=>{if((cet?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Bu(za(r,0))==1||e!=i.from||n!=i.to)return!1;let o=pet(t.state,r);return o?(t.dispatch(o),!0):!1}),fet=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=PK(t,t.selection.main.head).brackets||nb.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=get(t.doc,a.head);for(let l of r)if(l==s&&$C(t.doc,a.head)==kK(za(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:yt.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},het=[{key:"Backspace",run:fet}];function pet(t,e){let n=PK(t,t.selection.main.head),r=n.brackets||nb.brackets;for(let i of r){let o=kK(za(i,0));if(e==i)return o==i?yet(t,i,r.indexOf(i+i+i)>-1,n):met(t,i,o,n.before||nb.before);if(e==o&&AK(t,t.selection.main.from))return vet(t,i,o)}return null}function AK(t,e){let n=!1;return t.field(TK).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function $C(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Bu(za(n,0)))}function get(t,e){let n=t.sliceString(e-2,e);return Bu(za(n,0))==n.length?n:n.slice(1)}function met(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Lh.of(a.to+e.length),range:yt.range(a.anchor+e.length,a.head+e.length)};let s=$C(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:Lh.of(a.head+e.length),range:yt.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function vet(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&$C(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:yt.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function yet(t,e,n,r){let i=r.stringPrefixes||nb.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Lh.of(s.to+e.length),range:yt.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=$C(t.doc,l),c;if(u==e){if(fj(t,l))return{changes:{insert:e+e,from:l},effects:Lh.of(l+e.length),range:yt.cursor(l+e.length)};if(AK(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:yt.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=hj(t,l-2*e.length,i))>-1&&fj(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Lh.of(l+e.length),range:yt.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=xi.Word&&hj(t,l,i)>-1&&!bet(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Lh.of(l+e.length),range:yt.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function fj(t,e){let n=uo(t).resolveInner(e+1);return n.parent&&n.from==e}function bet(t,e,n,r){let i=uo(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function hj(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=xi.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=xi.Word)return o}return-1}function _et(t={}){return[ZJe,Ha,Do.of(t),YJe,Oet,CK]}const MK=[{key:"Ctrl-Space",run:cj},{mac:"Alt-`",run:cj},{key:"Escape",run:HJe},{key:"ArrowDown",run:a1(!0)},{key:"ArrowUp",run:a1(!1)},{key:"PageDown",run:a1(!0,"page")},{key:"PageUp",run:a1(!1,"page")},{key:"Enter",run:QJe}],Oet=Hf.highest(Ub.computeN([Do],t=>t.facet(Do).defaultKeymap?[MK]:[]));class wet{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Eh{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(rb).markerFilter;o&&(i=o(i,r));let a=yn.set(i.map(s=>s.from==s.to||s.from==s.to-1&&r.doc.lineAt(s.from).to==s.from?yn.widget({widget:new Ret(s),diagnostic:s}).range(s.from):yn.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity+(s.markClass?" "+s.markClass:"")},diagnostic:s}).range(s.from,s.to)),!0);return new Eh(a,n,km(a))}}function km(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:a})=>{if(!(e&&a.diagnostic!=e))return r=new wet(i,o,a.diagnostic),!1}),r}function xet(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(rb).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(RK))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function Cet(t,e){return t.field(Ts,!1)?e:e.concat(Wn.appendConfig.of(Det))}const RK=Wn.define(),BD=Wn.define(),$K=Wn.define(),Ts=So.define({create(){return new Eh(yn.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=km(n,t.selected.diagnostic,o)||km(n,null,o)}!n.size&&i&&e.state.facet(rb).autoPanel&&(i=null),t=new Eh(n,i,r)}for(let n of e.effects)if(n.is(RK)){let r=e.state.facet(rb).autoPanel?n.value.length?ib.open:null:t.panel;t=Eh.init(n.value,r,e.state)}else n.is(BD)?t=new Eh(t.diagnostics,n.value?ib.open:null,t.selected):n.is($K)&&(t=new Eh(t.diagnostics,t.panel,n.value));return t},provide:t=>[X0.from(t,e=>e.panel),Ut.decorations.from(t,e=>e.diagnostics)]}),Eet=yn.mark({class:"cm-lintRange cm-lintRange-active"});function Tet(t,e,n){let{diagnostics:r}=t.state.field(Ts),i=[],o=2e8,a=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e<u||n<0))&&(i.push(c.diagnostic),o=Math.min(l,o),a=Math.max(u,a))});let s=t.state.facet(rb).tooltipFilter;return s&&(i=s(i,t.state)),i.length?{pos:o,end:a,above:t.state.doc.lineAt(o).to<a,create(){return{dom:ket(t,i)}}}:null}function ket(t,e){return ci("ul",{class:"cm-tooltip-lint"},e.map(n=>DK(t,n,!1)))}const Pet=t=>{let e=t.state.field(Ts,!1);(!e||!e.panel)&&t.dispatch({effects:Cet(t.state,[BD.of(!0)])});let n=Y0(t,ib.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},pj=t=>{let e=t.state.field(Ts,!1);return!e||!e.panel?!1:(t.dispatch({effects:BD.of(!1)}),!0)},Aet=t=>{let e=t.state.field(Ts,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},Met=[{key:"Mod-Shift-m",run:Pet,preventDefault:!0},{key:"F8",run:Aet}],rb=Xt.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},gc(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function NK(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function DK(t,e,n){var r;let i=n?NK(e.actions):[];return ci("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ci("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=km(t.state.field(Ts).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:u}=o,c=i[a]?u.indexOf(i[a]):-1,d=c<0?u:[u.slice(0,c),ci("u",u.slice(c,c+1)),u.slice(c+1)];return ci("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&ci("div",{class:"cm-diagnosticSource"},e.source))}class Ret extends mc{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return ci("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class gj{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=DK(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class ib{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)pj(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=NK(o.actions);for(let s=0;s<a.length;s++)if(a[s].toUpperCase().charCodeAt(0)==i.keyCode){let l=km(this.view.state.field(Ts).diagnostics,o);l&&o.actions[s].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=ci("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=ci("div",{class:"cm-panel-lint"},this.list,ci("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>pj(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Ts).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Ts),r=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(a,s,{spec:l})=>{let u=-1,c;for(let d=r;d<this.items.length;d++)if(this.items[d].diagnostic==l.diagnostic){u=d;break}u<0?(c=new gj(this.view,l.diagnostic),this.items.splice(r,0,c),i=!0):(c=this.items[u],u>r&&(this.items.splice(r,u-r),i=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),r++});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new gj(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:s})=>{let l=s.height/this.list.offsetHeight;a.top<s.top?this.list.scrollTop-=(s.top-a.top)/l:a.bottom>s.bottom&&(this.list.scrollTop+=(a.bottom-s.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ts),r=km(n.diagnostics,this.items[e].diagnostic);!r||this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:$K.of(r)})}static open(e){return new ib(e)}}function $et(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function s1(t){return $et(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Net=Ut.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:s1("#d11")},".cm-lintRange-warning":{backgroundImage:s1("orange")},".cm-lintRange-info":{backgroundImage:s1("#999")},".cm-lintRange-hint":{backgroundImage:s1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Det=[Ts,Ut.decorations.compute([Ts],t=>{let{selected:e,panel:n}=t.field(Ts);return!e||!n||e.from==e.to?yn.none:yn.set([Eet.range(e.from,e.to)])}),_Ze(Tet,{hideOn:xet}),Net],Let=(()=>[MZe(),NZe(),XXe(),ZGe(),wGe(),BXe(),QXe(),vr.allowMultipleSelections.of(!0),uGe(),xGe(TGe,{fallback:!0}),NGe(),uet(),_et(),uZe(),fZe(),tZe(),nJe(),Ub.of([...het,...ZKe,...OJe,...oKe,...yGe,...MK,...Met])])();/*!
  169. * VueCodemirror v6.1.1
  170. * Copyright (c) Surmon. All rights reserved.
  171. * Released under the MIT License.
  172. * Surmon
  173. */var Iet=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[Let]}),Bet=Symbol("vue-codemirror-global-config"),va,Fet=function(t){var e=t.onUpdate,n=t.onChange,r=t.onFocus,i=t.onBlur,o=function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(a);c<u.length;c++)s.indexOf(u[c])<0&&Object.prototype.propertyIsEnumerable.call(a,u[c])&&(l[u[c]]=a[u[c]])}return l}(t,["onUpdate","onChange","onFocus","onBlur"]);return vr.create({doc:o.doc,selection:o.selection,extensions:(Array.isArray(o.extensions)?o.extensions:[o.extensions]).concat([Ut.updateListener.of(function(a){e(a),a.docChanged&&n(a.state.doc.toString(),a),a.focusChanged&&(a.view.hasFocus?r(a):i(a))})])})},fg=function(t){var e=new zb;return{compartment:e,run:function(n){e.get(t.state)?t.dispatch({effects:e.reconfigure(n)}):t.dispatch({effects:Wn.appendConfig.of(e.of(n))})}}},mj=function(t,e){var n=fg(t),r=n.compartment,i=n.run;return function(o){var a=r.get(t.state);i((o!=null?o:a!==e)?e:[])}},l1={type:Boolean,default:void 0},Vet={autofocus:l1,disabled:l1,indentWithTab:l1,tabSize:Number,placeholder:String,style:Object,autoDestroy:l1,phrases:Object,root:Object,extensions:Array,selection:Object},jet={modelValue:{type:String,default:""}},zet=Object.assign(Object.assign({},Vet),jet);(function(t){t.Change="change",t.Update="update",t.Focus="focus",t.Blur="blur",t.Ready="ready",t.ModelUpdate="update:modelValue"})(va||(va={}));var Th={};Th[va.Change]=function(t,e){return!0},Th[va.Update]=function(t){return!0},Th[va.Focus]=function(t){return!0},Th[va.Blur]=function(t){return!0},Th[va.Ready]=function(t){return!0};var LK={};LK[va.ModelUpdate]=Th[va.Change];var Qet=Object.assign(Object.assign({},Th),LK),Het=ue({name:"VueCodemirror",props:Object.assign({},zet),emits:Object.assign({},Qet),setup:function(t,e){var n=Tr(),r=Tr(),i=Tr(),o=Object.assign(Object.assign({},Iet),ht(Bet,{})),a=M(function(){var s={};return Object.keys(Bn(t)).forEach(function(l){var u;l!=="modelValue"&&(s[l]=(u=t[l])!==null&&u!==void 0?u:o[l])}),s});return Bt(function(){var s;r.value=Fet({doc:t.modelValue,selection:a.value.selection,extensions:(s=o.extensions)!==null&&s!==void 0?s:[],onFocus:function(u){return e.emit(va.Focus,u)},onBlur:function(u){return e.emit(va.Blur,u)},onUpdate:function(u){return e.emit(va.Update,u)},onChange:function(u,c){u!==t.modelValue&&(e.emit(va.Change,u,c),e.emit(va.ModelUpdate,u,c))}}),i.value=function(u){return new Ut(Object.assign({},u))}({state:r.value,parent:n.value,root:a.value.root});var l=function(u){var c=function(){return u.state.doc.toString()},d=fg(u).run,f=mj(u,[Ut.editable.of(!1),vr.readOnly.of(!0)]),h=mj(u,Ub.of([GKe])),m=fg(u).run,g=fg(u).run,y=fg(u).run,b=fg(u).run;return{focus:function(){return u.focus()},getDoc:c,setDoc:function(w){w!==c()&&u.dispatch({changes:{from:0,to:u.state.doc.length,insert:w}})},reExtensions:d,toggleDisabled:f,toggleIndentWithTab:h,setTabSize:function(w){m([vr.tabSize.of(w),Yb.of(" ".repeat(w))])},setPhrases:function(w){g([vr.phrases.of(w)])},setPlaceholder:function(w){y(oZe(w))},setStyle:function(w){w===void 0&&(w={}),b(Ut.theme({"&":Object.assign({},w)}))}}}(i.value);Ve(function(){return t.modelValue},function(u){u!==l.getDoc()&&l.setDoc(u)}),Ve(function(){return t.extensions},function(u){return l.reExtensions(u||[])},{immediate:!0}),Ve(function(){return a.value.disabled},function(u){return l.toggleDisabled(u)},{immediate:!0}),Ve(function(){return a.value.indentWithTab},function(u){return l.toggleIndentWithTab(u)},{immediate:!0}),Ve(function(){return a.value.tabSize},function(u){return l.setTabSize(u)},{immediate:!0}),Ve(function(){return a.value.phrases},function(u){return l.setPhrases(u||{})},{immediate:!0}),Ve(function(){return a.value.placeholder},function(u){return l.setPlaceholder(u)},{immediate:!0}),Ve(function(){return a.value.style},function(u){return l.setStyle(u)},{immediate:!0}),a.value.autofocus&&l.focus(),e.emit(va.Ready,{state:r.value,view:i.value,container:n.value})}),pr(function(){a.value.autoDestroy&&i.value&&function(s){s.destroy()}(i.value)}),function(){return Et("div",{class:"v-codemirror",style:{display:"contents"},ref:n})}}}),Vu=Het;class YS{constructor(e,n,r,i,o,a,s,l,u,c=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new YS(e,[],n,r,r,0,[],0,i?new vj(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),u=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-u;c>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=u,this.p.lastBigReductionSize=c));let d=l?this.stack[l-1]:0,f=this.bufferBase+this.buffer.length-d;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,u,h,f+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,u)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,s=this.buffer.length;if(s==0&&a.parent&&(s=a.bufferBase-a.parent.bufferBase,a=a.parent),s>0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new YS(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Wet(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>4<<1||this.stack.length>=120){let i=[];for(let o=0,a;o<n.length;o+=2)(a=n[o+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(n[o],a);if(this.stack.length<120)for(let o=0;i.length<4<<1&&o<n.length;o+=2){let a=n[o+1];i.some((s,l)=>l&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let a=this.split();a.pushState(o,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[i],this.pos),a.reducePos=this.pos,a.score-=200,r.push(a)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new vj(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class vj{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Wet{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class XS{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new XS(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new XS(this.stack,this.pos,this.index)}}function fy(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let a=t.charCodeAt(r++),s=!1;if(a==126){o=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class X1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yj=new X1;class Uet{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yj,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let a=this.ranges[--i];o-=r.from-a.to,r=a}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let a=this.rangeIndex,s=this.range;for(;s.to<=r;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=yj,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Vg{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;IK(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Vg.prototype.contextual=Vg.prototype.fallback=Vg.prototype.extend=!1;class vM{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?fy(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(IK(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}vM.prototype.contextual=Vg.prototype.fallback=Vg.prototype.extend=!1;class Jb{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function IK(t,e,n,r,i,o){let a=0,s=1<<r,{dialect:l}=n.p.parser;e:for(;(s&t[a])!=0;){let u=t[a+1];for(let h=a+3;h<u;h+=2)if((t[h+1]&s)>0){let m=t[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||qet(m,e.token.value,i,o))){e.acceptToken(m);break}}let c=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[u+f*3-3]==65535){a=t[u+f*3-1];continue e}for(;d<f;){let h=d+f>>1,m=u+h+(h<<1),g=t[m],y=t[m+1]||65536;if(c<g)f=h;else if(c>=y)d=h+1;else{a=t[m+2],e.advance();continue e}}break}}function bj(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function qet(t,e,n,r){let i=bj(n,r,e);return i<0||bj(n,r,t)<i}const bs=typeof process!="undefined"&&process.env&&/\bparse\b/.test({}.LOG);let R2=null;function _j(t,e,n){let r=t.cursor(ao.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Yet{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?_j(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?_j(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],a=this.start[n]+r.positions[i];if(a>e)return this.nextStart=a,null;if(o instanceof Gi){if(a==e){if(a<this.safeFrom)return null;let s=a+o.length;if(s<=this.safeTo){let l=o.prop(hr.lookAhead);if(!l||s+l<this.fragment.to)return o}}this.index[n]++,a+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class Xet{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new X1)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<o.length;u++){if((1<<u&a)==0)continue;let c=o[u],d=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||d.start!=e.pos||d.mask!=a||d.context!=s)&&(this.updateCachedToken(d,c,e),d.mask=a,d.context=s),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new X1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new X1,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a<o.specialized.length;a++)if(o.specialized[a]==e.value){let s=o.specializers[a](this.stream.read(e.start,e.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:a}=e.p,{data:s}=a;for(let l=0;l<2;l++)for(let u=a.stateSlot(o,l?2:1);;u+=3){if(s[u]==65535)if(s[u+1]==1)u=Lc(s,u+2);else{i==0&&s[u+1]==2&&(i=this.putAction(Lc(s,u+2),n,r,i));break}s[u]==n&&(i=this.putAction(Lc(s,u+1),n,r,i))}return i}}class Zet{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Uet(n,i),this.tokens=new Xet(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[YS.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new Yet(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let s=e[a];for(;;){if(this.tokens.mainToken=null,s.pos>n)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&Jet(i);if(a)return bs&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw bs&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return bs&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a<r.length-1;a++){let s=r[a];for(let l=a+1;l<r.length;l++){let u=r[l];if(s.sameState(u)||s.buffer.length>500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a<r.length;a++)r[a].pos<this.minStackPos&&(this.minStackPos=r[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,a=bs?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!u||(d.prop(hr.contextHash)||0)==c))return e.useNode(d,f),bs&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Gi)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof Gi&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),bs&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],d=l[u++],f=l[u++],h=u==l.length||!r,m=h?e:e.split(),g=this.tokens.mainToken;if(m.apply(c,d,g?g.start:m.pos,f),bs&&console.log(a+this.stackID(m)+` (via ${(c&65536)==0?"shift":`reduce of ${o.getName(c&65535)}`} for ${o.getName(d)} @ ${i}${m==e?"":", split"})`),h)return!0;m.pos>i?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Oj(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a<e.length;a++){let s=e[a],l=n[a<<1],u=n[(a<<1)+1],c=bs?this.stackID(s)+" -> ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),bs&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=c;for(let h=0;d.forceReduce()&&h<10&&(bs&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)bs&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))bs&&console.log(c+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),bs&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Oj(s,r)):(!i||i.score<s.score)&&(i=s)}return i}stackToTree(e){return e.close(),Gi.build({buffer:XS.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(R2||(R2=new WeakMap)).get(e);return n||R2.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function Oj(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Get{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const $2=t=>t;class Ket{constructor(e){this.start=e.start,this.shift=e.shift||$2,this.reduce=e.reduce||$2,this.reuse=e.reuse||$2,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ob extends dG{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;s<e.repeatNodeCount;s++)n.push("");let r=Object.keys(e.topRules).map(s=>e.topRules[s][1]),i=[];for(let s=0;s<n.length;s++)i.push([]);function o(s,l,u){i[s].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let s of e.nodeProps){let l=s[0];typeof l=="string"&&(l=hr[l]);for(let u=1;u<s.length;){let c=s[u++];if(c>=0)o(c,l,s[u++]);else{let d=s[u+-c];for(let f=-c;f>0;f--)o(s[u++],l,d);u++}}}this.nodeSet=new pD(n.map((s,l)=>is.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=sG;let a=fy(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;s<this.specializerSpecs.length;s++)this.specialized[s]=this.specializerSpecs[s].term;this.specializers=this.specializerSpecs.map(wj),this.states=fy(e.states,Uint32Array),this.data=fy(e.stateData),this.goto=fy(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(s=>typeof s=="number"?new Vg(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Zet(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let u=o+(a>>1);o<u;o++)if(i[o]==e)return l;if(s)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),a;;o+=3){if((a=r[o])==65535)if(r[o+1]==1)a=r[o=Lc(r,o+2)];else{if(r[o+1]==2)return Lc(r,o+2);break}if(a==n||a==0)return Lc(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Lc(this.data,o+2);else break;i=n(Lc(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Lc(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(ob.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=wj(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let a=this.dialects[n[o]],s;(s=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new Get(e,r,i)}static deserialize(e){return new ob(e)}}function Lc(t,e){return t[e]|t[e+1]<<16}function Jet(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function wj(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const ett=yD({String:Je.string,Number:Je.number,"True False":Je.bool,PropertyName:Je.propertyName,Null:Je.null,",":Je.separator,"[ ]":Je.squareBracket,"{ }":Je.brace}),ttt=ob.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[ett],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),ntt=G0.define({name:"json",parser:ttt.configure({props:[OD.add({Object:Xy({except:/^\s*\}/}),Array:Xy({except:/^\s*\]/})}),SD.add({"Object Array":bG})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function sv(){return new mG(ntt)}var BK={exports:{}},NC={},FD={exports:{}},FK={},DC={};function _o(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}_o.prototype.clone_empty=function(){var t=new _o(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t};_o.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]};_o.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1};_o.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};_o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};_o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};_o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1};_o.prototype.is_empty=function(){return this.__items.length===0};_o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};_o.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(`
  174. `);e!==-1?this.__character_count=t.length-e:this.__character_count+=t.length};_o.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t};_o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)};_o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)};_o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1};_o.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function e_(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}e_.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n};e_.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n};e_.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()};e_.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)};function xo(t,e){this.__indent_cache=new e_(t,e),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}xo.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};xo.prototype.get_line_number=function(){return this.__lines.length};xo.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)};xo.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)};xo.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};xo.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)};xo.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&(e[e.length-1]===`
  175. `&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(`
  176. `);return t!==`
  177. `&&(n=n.replace(/[\n]/g,t)),n};xo.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};xo.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)};xo.prototype.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1};xo.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()};xo.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))};xo.prototype.remove_indent=function(t){for(var e=this.__lines.length;t<e;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()};xo.prototype.trim=function(t){for(t=t===void 0?!1:t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};xo.prototype.just_added_newline=function(){return this.current_line.is_empty()};xo.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};xo.prototype.ensure_empty_line_above=function(t,e){for(var n=this.__lines.length-2;n>=0;){var r=this.__lines[n];if(r.is_empty())break;if(r.item(0).indexOf(t)!==0&&r.item(-1)!==e){this.__lines.splice(n+1,0,new _o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}};DC.Output=xo;var VD={};function rtt(t,e,n,r){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}VD.Token=rtt;var jD={};(function(t){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",a="(?:"+o+"|["+e+r+"])",s="(?:"+o+"|["+n+r+i+"])*";t.identifier=new RegExp(a+s,"g"),t.identifierStart=new RegExp(a),t.identifierMatch=new RegExp("(?:"+o+"|["+n+r+i+"])+"),t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp(`\r
  178. |`+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g")})(jD);var zD={},lv={};function Uf(t,e){this.raw_options=VK(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}Uf.prototype._get_array=function(t,e){var n=this.raw_options[t],r=e||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(r=n.concat()):typeof n=="string"&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r};Uf.prototype._get_boolean=function(t,e){var n=this.raw_options[t],r=n===void 0?!!e:!!n;return r};Uf.prototype._get_characters=function(t,e){var n=this.raw_options[t],r=e||"";return typeof n=="string"&&(r=n.replace(/\\r/,"\r").replace(/\\n/,`
  179. `).replace(/\\t/," ")),r};Uf.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var r=parseInt(n,10);return isNaN(r)&&(r=e),r};Uf.prototype._get_selection=function(t,e,n){var r=this._get_selection_list(t,e,n);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values:
  180. `+e+`
  181. You passed in: '`+this.raw_options[t]+"'");return r[0]};Uf.prototype._get_selection_list=function(t,e,n){if(!e||e.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var r=this._get_array(t,n);if(!this._is_valid_selection(r,e))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values:
  182. `+e+`
  183. You passed in: '`+this.raw_options[t]+"'");return r};Uf.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some(function(n){return e.indexOf(n)===-1})};function VK(t,e){var n={};t=jK(t);var r;for(r in t)r!==e&&(n[r]=t[r]);if(e&&t[e])for(r in t[e])n[r]=t[e][r];return n}function jK(t){var e={},n;for(n in t){var r=n.replace(/-/g,"_");e[r]=t[n]}return e}lv.Options=Uf;lv.normalizeOpts=jK;lv.mergeOpts=VK;var zK=lv.Options,itt=["before-newline","after-newline","preserve-newline"];function QK(t){zK.call(this,t,"js");var e=this.raw_options.brace_style||null;e==="expand-strict"?this.raw_options.brace_style="expand":e==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r<n.length;r++)n[r]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=n[r];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",itt),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}QK.prototype=new zK;zD.Options=QK;var qf={},LC={},HK=RegExp.prototype.hasOwnProperty("sticky");function Qo(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}Qo.prototype.restart=function(){this.__position=0};Qo.prototype.back=function(){this.__position>0&&(this.__position-=1)};Qo.prototype.hasNext=function(){return this.__position<this.__input_length};Qo.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__input.charAt(this.__position),this.__position+=1),t};Qo.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__input_length&&(e=this.__input.charAt(t)),e};Qo.prototype.__match=function(t,e){t.lastIndex=e;var n=t.exec(this.__input);return n&&!(HK&&t.sticky)&&n.index!==e&&(n=null),n};Qo.prototype.test=function(t,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length?!!this.__match(t,e):!1};Qo.prototype.testChar=function(t,e){var n=this.peek(e);return t.lastIndex=0,n!==null&&t.test(n)};Qo.prototype.match=function(t){var e=this.__match(t,this.__position);return e?this.__position+=e[0].length:e=null,e};Qo.prototype.read=function(t,e,n){var r="",i;return t&&(i=this.match(t),i&&(r+=i[0])),e&&(i||!t)&&(r+=this.readUntil(e,n)),r};Qo.prototype.readUntil=function(t,e){var n="",r=this.__position;t.lastIndex=this.__position;var i=t.exec(this.__input);return i?(r=i.index,e&&(r+=i[0].length)):r=this.__input_length,n=this.__input.substring(this.__position,r),this.__position=r,n};Qo.prototype.readUntilAfter=function(t){return this.readUntil(t,!0)};Qo.prototype.get_regexp=function(t,e){var n=null,r="g";return e&&HK&&(r="y"),typeof t=="string"&&t!==""?n=new RegExp(t,r):t&&(n=new RegExp(t.source,r)),n};Qo.prototype.get_literal_regexp=function(t){return RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))};Qo.prototype.peekUntilAfter=function(t){var e=this.__position,n=this.readUntilAfter(t);return this.__position=e,n};Qo.prototype.lookBack=function(t){var e=this.__position-1;return e>=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t};LC.InputScanner=Qo;var uv={},WK={};function xp(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}xp.prototype.restart=function(){this.__position=0};xp.prototype.isEmpty=function(){return this.__tokens_length===0};xp.prototype.hasNext=function(){return this.__position<this.__tokens_length};xp.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t};xp.prototype.peek=function(t){var e=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(e=this.__tokens[t]),e};xp.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1};WK.TokenStream=xp;var UK={},t_={};function ic(t,e){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,e&&(this._starting_pattern=this._input.get_regexp(e._starting_pattern,!0),this._match_pattern=this._input.get_regexp(e._match_pattern,!0),this._until_pattern=this._input.get_regexp(e._until_pattern),this._until_after=e._until_after)}ic.prototype.read=function(){var t=this._input.read(this._starting_pattern);return(!this._starting_pattern||t)&&(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t};ic.prototype.read_match=function(){return this._input.match(this._match_pattern)};ic.prototype.until_after=function(t){var e=this._create();return e._until_after=!0,e._until_pattern=this._input.get_regexp(t),e._update(),e};ic.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e};ic.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e};ic.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e};ic.prototype._create=function(){return new ic(this._input,this)};ic.prototype._update=function(){};t_.Pattern=ic;var qK=t_.Pattern;function Pf(t,e){qK.call(this,t,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}Pf.prototype=new qK;Pf.prototype.__set_whitespace_patterns=function(t,e){t+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+t+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")};Pf.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var t=this._input.read(this._match_pattern);if(t===" ")this.whitespace_before_token=" ";else if(t){var e=this.__split(this._newline_regexp,t);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return t};Pf.prototype.matching=function(t,e){var n=this._create();return n.__set_whitespace_patterns(t,e),n._update(),n};Pf.prototype._create=function(){return new Pf(this._input,this)};Pf.prototype.__split=function(t,e){t.lastIndex=0;for(var n=0,r=[],i=t.exec(e);i;)r.push(e.substring(n,i.index)),n=i.index+i[0].length,i=t.exec(e);return n<e.length?r.push(e.substring(n,e.length)):r.push(""),r};UK.WhitespacePattern=Pf;var ott=LC.InputScanner,YK=VD.Token,N2=WK.TokenStream,att=UK.WhitespacePattern,ab={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},yc=function(t,e){this._input=new ott(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new att(this._input)};yc.prototype.tokenize=function(){this._input.restart(),this.__tokens=new N2,this._reset();for(var t,e=new YK(ab.START,""),n=null,r=[],i=new N2;e.type!==ab.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)i.add(t),t=this._get_next_token(e,n);i.isEmpty()||(t.comments_before=i,i=new N2),t.parent=n,this._is_opening(t)?(r.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=r.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens};yc.prototype._is_first_token=function(){return this.__tokens.isEmpty()};yc.prototype._reset=function(){};yc.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(ab.RAW,n):this._create_token(ab.EOF,"")};yc.prototype._is_comment=function(t){return!1};yc.prototype._is_opening=function(t){return!1};yc.prototype._is_closing=function(t,e){return!1};yc.prototype._create_token=function(t,e){var n=new YK(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n};yc.prototype._readWhitespace=function(){return this._patterns.whitespace.read()};uv.Tokenizer=yc;uv.TOKEN=ab;var IC={};function QD(t,e){t=typeof t=="string"?t:t.source,e=typeof e=="string"?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}QD.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e};QD.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)};IC.Directives=QD;var HD={},yM=t_.Pattern,bM={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function du(t,e){yM.call(this,t,e),this.__template_pattern=null,this._disabled=Object.assign({},bM),this._excluded=Object.assign({},bM),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var n=new yM(t);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}du.prototype=new yM;du.prototype._create=function(){return new du(this._input,this)};du.prototype._update=function(){this.__set_templated_pattern()};du.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e};du.prototype.read_options=function(t){var e=this._create();for(var n in bM)e._disabled[n]=t.templating.indexOf(n)===-1;return e._update(),e};du.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e};du.prototype.read=function(){var t="";this._match_pattern?t=this._input.read(this._starting_pattern):t=this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t};du.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")};du.prototype._read_template=function(){var t="",e=this._input.peek();if(e==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(t=t||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(t=t||this.__patterns.erb.read())}else e==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t};HD.TemplatablePattern=du;var stt=LC.InputScanner,XK=uv.Tokenizer,D2=uv.TOKEN,ltt=IC.Directives,ll=jD,utt=t_.Pattern,ctt=HD.TemplatablePattern;function L2(t,e){return e.indexOf(t)!==-1}var En={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:D2.START,RAW:D2.RAW,EOF:D2.EOF},Sj=new ltt(/\/\*/,/\*\//),dtt=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,ftt=/[0-9]/,htt=/[^\d\.]/,ptt=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),pp=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";pp=pp.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");pp="\\?\\.(?!\\d) "+pp;pp=pp.replace(/ /g,"|");var gtt=new RegExp(pp),ZK="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),mtt=ZK.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),vtt=new RegExp("^(?:"+mtt.join("|")+")$"),Z1,Co=function(t,e){XK.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new utt(this._input),r=new ctt(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(ll.identifier).matching(ll.identifierMatch),number:n.matching(dtt),punct:n.matching(gtt),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(/<!--/),html_comment_end:n.matching(/-->/),include:n.starting_with(/#include/).until_after(ll.lineBreak),shebang:n.starting_with(/#!/).until_after(ll.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};Co.prototype=new XK;Co.prototype._is_comment=function(t){return t.type===En.COMMENT||t.type===En.BLOCK_COMMENT||t.type===En.UNKNOWN};Co.prototype._is_opening=function(t){return t.type===En.START_BLOCK||t.type===En.START_EXPR};Co.prototype._is_closing=function(t,e){return(t.type===En.END_BLOCK||t.type===En.END_EXPR)&&e&&(t.text==="]"&&e.text==="["||t.text===")"&&e.text==="("||t.text==="}"&&e.text==="{")};Co.prototype._reset=function(){Z1=!1};Co.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(En.EOF,""):(n=n||this._read_non_javascript(r),n=n||this._read_string(r),n=n||this._read_pair(r,this._input.peek(1)),n=n||this._read_word(t),n=n||this._read_singles(r),n=n||this._read_comment(r),n=n||this._read_regexp(r,t),n=n||this._read_xml(r,t),n=n||this._read_punctuation(),n=n||this._create_token(En.UNKNOWN,this._input.next()),n)};Co.prototype._read_word=function(t){var e;if(e=this.__patterns.identifier.read(),e!=="")return e=e.replace(ll.allLineBreaks,`
  184. `),!(t.type===En.DOT||t.type===En.RESERVED&&(t.text==="set"||t.text==="get"))&&vtt.test(e)?(e==="in"||e==="of")&&(t.type===En.WORD||t.type===En.STRING)?this._create_token(En.OPERATOR,e):this._create_token(En.RESERVED,e):this._create_token(En.WORD,e);if(e=this.__patterns.number.read(),e!=="")return this._create_token(En.WORD,e)};Co.prototype._read_singles=function(t){var e=null;return t==="("||t==="["?e=this._create_token(En.START_EXPR,t):t===")"||t==="]"?e=this._create_token(En.END_EXPR,t):t==="{"?e=this._create_token(En.START_BLOCK,t):t==="}"?e=this._create_token(En.END_BLOCK,t):t===";"?e=this._create_token(En.SEMICOLON,t):t==="."&&htt.test(this._input.peek(1))?e=this._create_token(En.DOT,t):t===","&&(e=this._create_token(En.COMMA,t)),e&&this._input.next(),e};Co.prototype._read_pair=function(t,e){var n=null;return t==="#"&&e==="{"&&(n=this._create_token(En.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n};Co.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(t!=="")return t==="="?this._create_token(En.EQUALS,t):t==="?."?this._create_token(En.DOT,t):this._create_token(En.OPERATOR,t)};Co.prototype._read_non_javascript=function(t){var e="";if(t==="#"){if(this._is_first_token()&&(e=this.__patterns.shebang.read(),e))return this._create_token(En.UNKNOWN,e.trim()+`
  185. `);if(e=this.__patterns.include.read(),e)return this._create_token(En.UNKNOWN,e.trim()+`
  186. `);t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(ftt)){do t=this._input.next(),n+=t;while(this._input.hasNext()&&t!=="#"&&t!=="=");return t==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(n+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(n+="{}",this._input.next(),this._input.next())),this._create_token(En.WORD,n)}this._input.back()}else if(t==="<"&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read(),e){for(;this._input.hasNext()&&!this._input.testChar(ll.newline);)e+=this._input.next();return Z1=!0,this._create_token(En.COMMENT,e)}}else if(Z1&&t==="-"&&(e=this.__patterns.html_comment_end.read(),e))return Z1=!1,this._create_token(En.COMMENT,e);return null};Co.prototype._read_comment=function(t){var e=null;if(t==="/"){var n="";if(this._input.peek(1)==="*"){n=this.__patterns.block_comment.read();var r=Sj.get_directives(n);r&&r.ignore==="start"&&(n+=Sj.readIgnored(this._input)),n=n.replace(ll.allLineBreaks,`
  187. `),e=this._create_token(En.BLOCK_COMMENT,n),e.directives=r}else this._input.peek(1)==="/"&&(n=this.__patterns.comment.read(),e=this._create_token(En.COMMENT,n))}return e};Co.prototype._read_string=function(t){if(t==="`"||t==="'"||t==='"'){var e=this._input.next();return this.has_char_escapes=!1,t==="`"?e+=this._read_string_recursive("`",!0,"${"):e+=this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=ytt(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(ll.allLineBreaks,`
  188. `),this._create_token(En.STRING,e)}return null};Co.prototype._allow_regexp_or_xml=function(t){return t.type===En.RESERVED&&L2(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===En.END_EXPR&&t.text===")"&&t.opened.previous.type===En.RESERVED&&L2(t.opened.previous.text,["if","while","for"])||L2(t.type,[En.COMMENT,En.START_EXPR,En.START_BLOCK,En.START,En.END_BLOCK,En.OPERATOR,En.EQUALS,En.EOF,En.SEMICOLON,En.COMMA])};Co.prototype._read_regexp=function(t,e){if(t==="/"&&this._allow_regexp_or_xml(e)){for(var n=this._input.next(),r=!1,i=!1;this._input.hasNext()&&(r||i||this._input.peek()!==t)&&!this._input.testChar(ll.newline);)n+=this._input.peek(),r?r=!1:(r=this._input.peek()==="\\",this._input.peek()==="["?i=!0:this._input.peek()==="]"&&(i=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(ll.identifier)),this._create_token(En.STRING,n)}return null};Co.prototype._read_xml=function(t,e){if(this._options.e4x&&t==="<"&&this._allow_regexp_or_xml(e)){var n="",r=this.__patterns.xml.read_match();if(r){for(var i=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),o=i.indexOf("{")===0,a=0;r;){var s=!!r[1],l=r[2],u=!!r[r.length-1]||l.slice(0,8)==="![CDATA[";if(!u&&(l===i||o&&l.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--a:++a),n+=r[0],a<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(ll.allLineBreaks,`
  189. `),this._create_token(En.STRING,n)}}return null};function ytt(t){for(var e="",n=0,r=new stt(t),i=null;r.hasNext();)if(i=r.match(/([\s]|[^\\]|\\\\)+/g),i&&(e+=i[0]),r.peek()==="\\"){if(r.next(),r.peek()==="x")i=r.match(/x([0-9A-Fa-f]{2})/g);else if(r.peek()==="u")i=r.match(/u([0-9A-Fa-f]{4})/g),i||(i=r.match(/u\{([0-9A-Fa-f]+)\}/g));else{e+="\\",r.hasNext()&&(e+=r.next());continue}if(!i||(n=parseInt(i[1],16),n>126&&n<=255&&i[0].indexOf("x")===0))return t;n>=0&&n<32||n>1114111?e+="\\"+i[0]:n===34||n===39||n===92?e+="\\"+String.fromCharCode(n):e+=String.fromCharCode(n)}return e}Co.prototype._read_string_recursive=function(t,e,n){var r,i;t==="'"?i=this.__patterns.single_quote:t==='"'?i=this.__patterns.double_quote:t==="`"?i=this.__patterns.template_text:t==="}"&&(i=this.__patterns.template_expression);for(var o=i.read(),a="";this._input.hasNext();){if(a=this._input.next(),a===t||!e&&ll.newline.test(a)){this._input.back();break}else a==="\\"&&this._input.hasNext()?(r=this._input.peek(),r==="x"||r==="u"?this.has_char_escapes=!0:r==="\r"&&this._input.peek(1)===`
  190. `&&this._input.next(),a+=this._input.next()):n&&(n==="${"&&a==="$"&&this._input.peek()==="{"&&(a+=this._input.next()),n===a&&(t==="`"?a+=this._read_string_recursive("}",e,"`"):a+=this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(a+=this._input.next())));a+=i.read(),o+=a}return o};qf.Tokenizer=Co;qf.TOKEN=En;qf.positionable_operators=ptt.slice();qf.line_starters=ZK.slice();var btt=DC.Output,_tt=VD.Token,ZS=jD,Ott=zD.Options,wtt=qf.Tokenizer,sb=qf.line_starters,hy=qf.positionable_operators,dt=qf.TOKEN;function Gn(t,e){return e.indexOf(t)!==-1}function Stt(t){return t.replace(/^\s+/g,"")}function xtt(t){for(var e={},n=0;n<t.length;n++)e[t[n].replace(/-/g,"_")]=t[n];return e}function el(t,e){return t&&t.type===dt.RESERVED&&t.text===e}function ri(t,e){return t&&t.type===dt.RESERVED&&Gn(t.text,e)}var BC=["case","return","do","if","throw","else","await","break","continue","async"],Ctt=["before-newline","after-newline","preserve-newline"],Zy=xtt(Ctt),GK=[Zy.before_newline,Zy.preserve_newline],In={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function KK(t,e){e.multiline_frame||e.mode===In.ForInitializer||e.mode===In.Conditional||t.remove_indent(e.start_line_index)}function Ett(t){t=t.replace(ZS.allLineBreaks,`
  191. `);for(var e=[],n=t.indexOf(`
  192. `);n!==-1;)e.push(t.substring(0,n)),t=t.substring(n+1),n=t.indexOf(`
  193. `);return t.length&&e.push(t),e}function Af(t){return t===In.ArrayLiteral}function Gy(t){return Gn(t,[In.Expression,In.ForInitializer,In.Conditional])}function Ttt(t,e){for(var n=0;n<t.length;n++){var r=t[n].trim();if(r.charAt(0)!==e)return!1}return!0}function ktt(t,e){for(var n=0,r=t.length,i;n<r;n++)if(i=t[n],i&&i.indexOf(e)!==0)return!1;return!0}function Ir(t,e){e=e||{},this._source_text=t||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new Ott(e)}Ir.prototype.create_flags=function(t,e){var n=0;t&&(n=t.indentation_level,!this._output.just_added_newline()&&t.line_indent_level>n&&(n=t.line_indent_level));var r={mode:e,parent:t,last_token:t?t.last_token:new _tt(dt.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0};return r};Ir.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new btt(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(In.BlockStatement);var n=new wtt(t,this._options);return this._tokens=n.tokenize(),t};Ir.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t,e=this._reset(this._source_text),n=this._options.eol;this._options.eol==="auto"&&(n=`
  194. `,e&&ZS.lineBreak.test(e||"")&&(n=e.match(ZS.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return t=this._output.get_code(n),t};Ir.prototype.handle_token=function(t,e){t.type===dt.START_EXPR?this.handle_start_expr(t):t.type===dt.END_EXPR?this.handle_end_expr(t):t.type===dt.START_BLOCK?this.handle_start_block(t):t.type===dt.END_BLOCK?this.handle_end_block(t):t.type===dt.WORD?this.handle_word(t):t.type===dt.RESERVED?this.handle_word(t):t.type===dt.SEMICOLON?this.handle_semicolon(t):t.type===dt.STRING?this.handle_string(t):t.type===dt.EQUALS?this.handle_equals(t):t.type===dt.OPERATOR?this.handle_operator(t):t.type===dt.COMMA?this.handle_comma(t):t.type===dt.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===dt.COMMENT?this.handle_comment(t,e):t.type===dt.DOT?this.handle_dot(t):t.type===dt.EOF?this.handle_eof(t):t.type===dt.UNKNOWN?this.handle_unknown(t,e):this.handle_unknown(t,e)};Ir.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,r=this._options.keep_array_indentation&&Af(this._flags.mode);if(t.comments_before)for(var i=t.comments_before.next();i;)this.handle_whitespace_and_comments(i,e),this.handle_token(i,e),i=t.comments_before.next();if(r)for(var o=0;o<n;o+=1)this.print_newline(o>0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var a=1;a<n;a+=1)this.print_newline(!0,e)}};var WD=["async","break","continue","return","throw","yield"];Ir.prototype.allow_wrap_or_preserved_newline=function(t,e){if(e=e===void 0?!1:e,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&t.newlines||e,r=Gn(this._flags.last_token.text,hy)||Gn(t.text,hy);if(r){var i=Gn(this._flags.last_token.text,hy)&&Gn(this._options.operator_position,GK)||Gn(t.text,hy);n=n&&i}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(ri(this._flags.last_token,WD))return;this._output.set_wrap_point()}}};Ir.prototype.print_newline=function(t,e){if(!e&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==dt.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var n=this._tokens.peek();this._flags.mode===In.Statement&&!(this._flags.if_block&&el(n,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(t)&&(this._flags.multiline_frame=!0)};Ir.prototype.print_token_line_indentation=function(t){this._output.just_added_newline()&&(this._options.keep_array_indentation&&t.newlines&&(t.text==="["||Af(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(t.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))};Ir.prototype.print_token=function(t){if(this._output.raw){this._output.add_raw_token(t);return}if(this._options.comma_first&&t.previous&&t.previous.type===dt.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var e=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(e),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(t),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(t),this._output.non_breaking_space=!0,this._output.add_token(t.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)};Ir.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};Ir.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Ir.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};Ir.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===In.Statement&&KK(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Ir.prototype.start_of_object_property=function(){return this._flags.parent.mode===In.ObjectLiteral&&this._flags.mode===In.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ri(this._flags.last_token,["get","set"]))};Ir.prototype.start_of_statement=function(t){var e=!1;return e=e||ri(this._flags.last_token,["var","let","const"])&&t.type===dt.WORD,e=e||el(this._flags.last_token,"do"),e=e||!(this._flags.parent.mode===In.ObjectLiteral&&this._flags.mode===In.Statement)&&ri(this._flags.last_token,WD)&&!t.newlines,e=e||el(this._flags.last_token,"else")&&!(el(t,"if")&&!t.comments_before),e=e||this._flags.last_token.type===dt.END_EXPR&&(this._previous_flags.mode===In.ForInitializer||this._previous_flags.mode===In.Conditional),e=e||this._flags.last_token.type===dt.WORD&&this._flags.mode===In.BlockStatement&&!this._flags.in_case&&!(t.text==="--"||t.text==="++")&&this._last_last_text!=="function"&&t.type!==dt.WORD&&t.type!==dt.RESERVED,e=e||this._flags.mode===In.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ri(this._flags.last_token,["get","set"])),e?(this.set_mode(In.Statement),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,ri(t,["do","for","if","while"])),!0):!1};Ir.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=In.Expression;if(t.text==="["){if(this._flags.last_token.type===dt.WORD||this._flags.last_token.text===")"){ri(this._flags.last_token,sb)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}e=In.ArrayLiteral,Af(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),Gn(this._flags.last_token.type,[dt.START_EXPR,dt.END_EXPR,dt.WORD,dt.OPERATOR,dt.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===dt.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,e=In.ForInitializer):Gn(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=In.Conditional):Gn(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&t.whitespace_before===""?this._output.space_before_token=!1:(Gn(this._flags.last_token.text,sb)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===dt.EQUALS||this._flags.last_token.type===dt.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===dt.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);ri(n,["async","function"])||n.text==="*"&&ri(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===In.ObjectLiteral?(n.text==="{"||n.text===","||n.text==="*"&&(r.text==="{"||r.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===dt.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(Gn(this._last_last_text,["function","yield"])||this._flags.mode===In.ObjectLiteral&&Gn(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===dt.START_BLOCK?this.print_newline():(this._flags.last_token.type===dt.END_EXPR||this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===dt.COMMA)&&this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()};Ir.prototype.handle_end_expr=function(t){for(;this._flags.mode===In.Statement;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,t.text==="]"&&Af(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===dt.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(t),this.restore_mode(),KK(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===In.Conditional&&(this._previous_flags.mode=In.Expression,this._flags.do_block=!1,this._flags.do_while=!1)};Ir.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===dt.END_EXPR?(this.set_mode(In.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(In.BlockStatement):n&&(Gn(n.text,[":",","])&&Gn(e.type,[dt.STRING,dt.WORD,dt.RESERVED])||Gn(e.text,["get","set","..."])&&Gn(n.type,[dt.WORD,dt.RESERVED]))?Gn(this._last_last_text,["class","interface"])&&!Gn(n.text,[":",","])?this.set_mode(In.BlockStatement):this.set_mode(In.ObjectLiteral):this._flags.last_token.type===dt.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(In.BlockStatement):Gn(this._flags.last_token.type,[dt.EQUALS,dt.START_EXPR,dt.COMMA,dt.OPERATOR])||ri(this._flags.last_token,["return","throw","import","default"])?this.set_mode(In.ObjectLiteral):this.set_mode(In.BlockStatement),this._flags.last_token&&ri(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!e.comments_before&&e.text==="}",i=r&&this._flags.last_word==="function"&&this._flags.last_token.type===dt.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do if(o+=1,a=this._tokens.peek(o-1),a.newlines){this._flags.inline_frame=!1;break}while(a.type!==dt.EOF&&!(a.type===dt.END_BLOCK&&a.opened===t))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==dt.OPERATOR&&(i||this._flags.last_token.type===dt.EQUALS||ri(this._flags.last_token,BC)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(Af(this._previous_flags.mode)&&(this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.COMMA)&&((this._flags.last_token.type===dt.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==dt.OPERATOR&&this._flags.last_token.type!==dt.START_EXPR&&(Gn(this._flags.last_token.type,[dt.START_BLOCK,dt.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),!r&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()};Ir.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===In.Statement;)this.restore_mode();var e=this._flags.last_token.type===dt.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:this._options.brace_style==="expand"?e||this.print_newline():e||(Af(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)};Ir.prototype.handle_word=function(t){if(t.type===dt.RESERVED){if(Gn(t.text,["set","get"])&&this._flags.mode!==In.ObjectLiteral)t.type=dt.WORD;else if(t.text==="import"&&Gn(this._tokens.peek().text,["(","."]))t.type=dt.WORD;else if(Gn(t.text,["as","from"])&&!this._flags.import_block)t.type=dt.WORD;else if(this._flags.mode===In.ObjectLiteral){var e=this._tokens.peek();e.text===":"&&(t.type=dt.WORD)}}if(this.start_of_statement(t)?ri(this._flags.last_token,["var","let","const"])&&t.type===dt.WORD&&(this._flags.declaration_statement=!0):t.newlines&&!Gy(this._flags.mode)&&(this._flags.last_token.type!==dt.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==dt.EQUALS&&(this._options.preserve_newlines||!ri(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(t),this.print_newline()):this.handle_whitespace_and_comments(t),this._flags.do_block&&!this._flags.do_while)if(el(t,"while")){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&el(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===In.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ri(t,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(t),this._flags.in_case=!0;return}if((this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.EQUALS||this._flags.last_token.type===dt.OPERATOR)&&!this.start_of_object_property()&&!(Gn(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===In.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(t),el(t,"function")){(Gn(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(Gn(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===dt.OPERATOR))&&!this._output.just_added_blankline()&&!t.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===dt.RESERVED||this._flags.last_token.type===dt.WORD?ri(this._flags.last_token,["get","set","new","export"])||ri(this._flags.last_token,WD)?this._output.space_before_token=!0:el(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===dt.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Gy(this._flags.mode)||Af(this._flags.mode))||this.print_newline(),this.print_token(t),this._flags.last_word=t.text;return}var n="NONE";if(this._flags.last_token.type===dt.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":ri(t,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===dt.SEMICOLON&&this._flags.mode===In.BlockStatement?n="NEWLINE":this._flags.last_token.type===dt.SEMICOLON&&Gy(this._flags.mode)?n="SPACE":this._flags.last_token.type===dt.STRING?n="NEWLINE":this._flags.last_token.type===dt.RESERVED||this._flags.last_token.type===dt.WORD||this._flags.last_token.text==="*"&&(Gn(this._last_last_text,["function","yield"])||this._flags.mode===In.ObjectLiteral&&Gn(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===dt.START_BLOCK?this._flags.inline_frame?n="SPACE":n="NEWLINE":this._flags.last_token.type===dt.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),ri(t,sb)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?n="SPACE":n="NEWLINE"),ri(t,["else","catch","finally"]))if((!(this._flags.last_token.type===dt.END_BLOCK&&this._previous_flags.mode===In.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var r=this._output.current_line;r.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else n==="NEWLINE"?ri(this._flags.last_token,BC)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ri(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==dt.END_EXPR?(this._flags.last_token.type!==dt.START_EXPR||!ri(t,["var","let","const"]))&&this._flags.last_token.text!==":"&&(el(t,"if")&&el(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ri(t,sb)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&Af(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():n==="SPACE"&&(this._output.space_before_token=!0);t.previous&&(t.previous.type===dt.WORD||t.previous.type===dt.RESERVED)&&(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===dt.RESERVED&&(t.text==="do"?this._flags.do_block=!0:t.text==="if"?this._flags.if_block=!0:t.text==="import"?this._flags.import_block=!0:this._flags.import_block&&el(t,"from")&&(this._flags.import_block=!1))};Ir.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();this._flags.mode===In.Statement&&!(this._flags.if_block&&el(e,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)};Ir.prototype.handle_string=function(t){t.text.startsWith("`")&&t.newlines===0&&t.whitespace_before===""&&(t.previous.text===")"||this._flags.last_token.type===dt.WORD)||(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===dt.RESERVED||this._flags.last_token.type===dt.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.EQUALS||this._flags.last_token.type===dt.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):t.text.startsWith("`")&&this._flags.last_token.type===dt.END_EXPR&&(t.previous.text==="]"||t.previous.text===")")&&t.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(t)};Ir.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0};Ir.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(Gy(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===In.ObjectLiteral||this._flags.mode===In.Statement&&this._flags.parent.mode===In.ObjectLiteral?(this._flags.mode===In.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)};Ir.prototype.handle_operator=function(t){var e=t.text==="*"&&(ri(this._flags.last_token,["function","yield"])||Gn(this._flags.last_token.type,[dt.START_BLOCK,dt.COMMA,dt.END_BLOCK,dt.SEMICOLON])),n=Gn(t.text,["-","+"])&&(Gn(this._flags.last_token.type,[dt.START_BLOCK,dt.START_EXPR,dt.EQUALS,dt.OPERATOR])||Gn(this._flags.last_token.text,sb)||this._flags.last_token.text===",");if(!this.start_of_statement(t)){var r=!e;this.handle_whitespace_and_comments(t,r)}if(t.text==="*"&&this._flags.last_token.type===dt.DOT){this.print_token(t);return}if(t.text==="::"){this.print_token(t);return}if(Gn(t.text,["-","+"])&&this.start_of_object_property()){this.print_token(t);return}if(this._flags.last_token.type===dt.OPERATOR&&Gn(this._options.operator_position,GK)&&this.allow_wrap_or_preserved_newline(t),t.text===":"&&this._flags.in_case){this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==dt.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var i=!0,o=!0,a=!1;if(t.text===":"?this._flags.ternary_depth===0?i=!1:(this._flags.ternary_depth-=1,a=!0):t.text==="?"&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&Gn(t.text,hy)){var s=t.text===":",l=s&&a,u=s&&!a;switch(this._options.operator_position){case Zy.before_newline:this._output.space_before_token=!u,this.print_token(t),(!s||l)&&this.allow_wrap_or_preserved_newline(t),this._output.space_before_token=!0;return;case Zy.after_newline:this._output.space_before_token=!0,!s||l?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),this._output.space_before_token=!0;return;case Zy.preserve_newline:u||this.allow_wrap_or_preserved_newline(t),i=!(this._output.just_added_newline()||u),this._output.space_before_token=i,this.print_token(t),this._output.space_before_token=!0;return}}if(e){this.allow_wrap_or_preserved_newline(t),i=!1;var c=this._tokens.peek();o=c&&Gn(c.type,[dt.WORD,dt.RESERVED])}else if(t.text==="...")this.allow_wrap_or_preserved_newline(t),i=this._flags.last_token.type===dt.START_BLOCK,o=!1;else if(Gn(t.text,["--","++","!","~"])||n){if((this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR)&&this.allow_wrap_or_preserved_newline(t),i=!1,o=!1,t.newlines&&(t.text==="--"||t.text==="++"||t.text==="~")){var d=ri(this._flags.last_token,BC)&&t.newlines;d&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(d,!0)}this._flags.last_token.text===";"&&Gy(this._flags.mode)&&(i=!0),this._flags.last_token.type===dt.RESERVED?i=!0:this._flags.last_token.type===dt.END_EXPR?i=!(this._flags.last_token.text==="]"&&(t.text==="--"||t.text==="++")):this._flags.last_token.type===dt.OPERATOR&&(i=Gn(t.text,["--","-","++","+"])&&Gn(this._flags.last_token.text,["--","-","++","+"]),Gn(t.text,["+","-"])&&Gn(this._flags.last_token.text,["--","++"])&&(o=!0)),(this._flags.mode===In.BlockStatement&&!this._flags.inline_frame||this._flags.mode===In.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(t),this._output.space_before_token=o};Ir.prototype.handle_block_comment=function(t,e){if(this._output.raw){this._output.add_raw_token(t),t.directives&&t.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(t.directives){this.print_newline(!1,e),this.print_token(t),t.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!ZS.newline.test(t.text)&&!t.newlines){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0;return}else this.print_block_commment(t,e)};Ir.prototype.print_block_commment=function(t,e){var n=Ett(t.text),r,i=!1,o=!1,a=t.whitespace_before,s=a.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(n[0]),this.print_newline(!1,e),n.length>1){for(n=n.slice(1),i=Ttt(n,"*"),o=ktt(n,a),i&&(this._flags.alignment=1),r=0;r<n.length;r++)i?(this.print_token_line_indentation(t),this._output.add_token(Stt(n[r]))):o&&n[r]?(this.print_token_line_indentation(t),this._output.add_token(n[r].substring(s))):(this._output.current_line.set_indent(-1),this._output.add_token(n[r])),this.print_newline(!1,e);this._flags.alignment=0}};Ir.prototype.handle_comment=function(t,e){t.newlines?this.print_newline(!1,e):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(t),this.print_newline(!1,e)};Ir.prototype.handle_dot=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),ri(this._flags.last_token,BC)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(t,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(t)};Ir.prototype.handle_unknown=function(t,e){this.print_token(t),t.text[t.text.length-1]===`
  195. `&&this.print_newline(!1,e)};Ir.prototype.handle_eof=function(t){for(;this._flags.mode===In.Statement;)this.restore_mode();this.handle_whitespace_and_comments(t)};FK.Beautifier=Ir;var Ptt=FK.Beautifier,Att=zD.Options;function Mtt(t,e){var n=new Ptt(t,e);return n.beautify()}FD.exports=Mtt;FD.exports.defaultOptions=function(){return new Att};var UD={exports:{}},JK={},qD={},eJ=lv.Options;function tJ(t){eJ.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var e=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||e;var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<n.length;r++)n[r]!=="expand"?this.brace_style="collapse":this.brace_style=n[r]}tJ.prototype=new eJ;qD.Options=tJ;var Rtt=qD.Options,$tt=DC.Output,Ntt=LC.InputScanner,Dtt=IC.Directives,xj=new Dtt(/\/\*/,/\*\//),Cj=/\r\n|[\r\n]/,Ltt=/\r\n|[\r\n]/g,GS=/\s/,Itt=/(?:\s|\n)+/g,Btt=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,Ftt=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function dd(t,e){this._source_text=t||"",this._options=new Rtt(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}dd.prototype.eatString=function(t){var e="";for(this._ch=this._input.next();this._ch;){if(e+=this._ch,this._ch==="\\")e+=this._input.next();else if(t.indexOf(this._ch)!==-1||this._ch===`
  196. `)break;this._ch=this._input.next()}return e};dd.prototype.eatWhitespace=function(t){for(var e=GS.test(this._input.peek()),n=0;GS.test(this._input.peek());)this._ch=this._input.next(),t&&this._ch===`
  197. `&&(n===0||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return e};dd.prototype.foundNestedPseudoClass=function(){for(var t=0,e=1,n=this._input.peek(e);n;){if(n==="{")return!0;if(n==="(")t+=1;else if(n===")"){if(t===0)return!1;t-=1}else if(n===";"||n==="}")return!1;e++,n=this._input.peek(e)}return!1};dd.prototype.print_string=function(t){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(t)};dd.prototype.preserveSingleSpace=function(t){t&&(this._output.space_before_token=!0)};dd.prototype.indent=function(){this._indentLevel++};dd.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--};dd.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;e==="auto"&&(e=`
  198. `,t&&Cj.test(t||"")&&(e=t.match(Cj)[0])),t=t.replace(Ltt,`
  199. `);var n=t.match(/^[\t ]*/)[0];this._output=new $tt(this._options,n),this._input=new Ntt(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r=0,i=!1,o=!1,a=!1,s=!1,l=!1,u=this._ch,c=!1,d,f,h;d=this._input.read(Itt),f=d!=="",h=u,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),u=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var m=this._input.read(Btt),g=xj.get_directives(m);g&&g.ignore==="start"&&(m+=xj.readIgnored(this._input)),this.print_string(m),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(Ftt)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(f),this.print_string(this._ch);var y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);y.match(/[ :]$/)&&(y=this.eatString(": ").replace(/\s+$/,""),this.print_string(y),this._output.space_before_token=!0),r===0&&y.indexOf(":")!==-1&&(o=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(f),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var b=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);b.match(/[ :]$/)&&(b=this.eatString(": ").replace(/\s+$/,""),this.print_string(b),this._output.space_before_token=!0),r===0&&b.indexOf(":")!==-1?(o=!0,this.indent()):b in this.NESTED_AT_RULE?(this._nestedLevel+=1,b in this.CONDITIONAL_GROUP_RULE&&(a=!0)):r===0&&!o&&(s=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")o&&(o=!1,this.outdent()),s=!1,a?(a=!1,i=this._indentLevel>=this._nestedLevel):i=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&i&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(h==="("?this._output.space_before_token=!1:h!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),h==="{"&&this._output.trim(!0),o&&(this.outdent(),o=!1),this.print_string(this._ch),i=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var w=0;w<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;w++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[w])){c=!0;break}(i||a)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!s&&r===0?(this.print_string(":"),o||(o=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var O=h==='"'||h==="'";this.preserveSingleSpace(O||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")c=!1,r===0?(o&&(this.outdent(),o=!1),s=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),r++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),r&&(r--,this.outdent()));else{var S=!1;this._input.lookBack("with")&&(S=!0),this.preserveSingleSpace(f||S),this.print_string(this._ch),o&&h==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),l=!0):(this.eatWhitespace(),r++,this.indent())}else if(this._ch===")")r&&(r--,this.outdent()),l&&this._input.peek()===";"&&this._options.selector_separator_newline&&(l=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!o||l)&&r===0&&!s?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!o&&r===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&GS.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(f),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),GS.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var x=h==='"'||h==="'";this.preserveSingleSpace(x||f),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
  200. `&&c&&this._output.add_new_line()}var C=this._output.get_code(e);return C};JK.Beautifier=dd;var Vtt=JK.Beautifier,jtt=qD.Options;function ztt(t,e){var n=new Vtt(t,e);return n.beautify()}UD.exports=ztt;UD.exports.defaultOptions=function(){return new jtt};var YD={exports:{}},nJ={},XD={},rJ=lv.Options;function iJ(t){rJ.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}iJ.prototype=new rJ;XD.Options=iJ;var FC={},oJ=uv.Tokenizer,I2=uv.TOKEN,Qtt=IC.Directives,Htt=HD.TemplatablePattern,Wtt=t_.Pattern,Ur={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:I2.START,RAW:I2.RAW,EOF:I2.EOF},Ej=new Qtt(/<\!--/,/-->/),Ho=function(t,e){oJ.call(this,t,e),this._current_tag_name="";var n=new Htt(this._input).read_options(this._options),r=new Wtt(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:r.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(/<!--/).until_after(/-->/),cdata:r.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:r.starting_with(/<!\[/).until_after(/]>/),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var i=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(i).until_after(i)}};Ho.prototype=new oJ;Ho.prototype._is_comment=function(t){return!1};Ho.prototype._is_opening=function(t){return t.type===Ur.TAG_OPEN||t.type===Ur.CONTROL_FLOW_OPEN};Ho.prototype._is_closing=function(t,e){return t.type===Ur.TAG_CLOSE&&e&&((t.text===">"||t.text==="/>")&&e.text[0]==="<"||t.text==="}}"&&e.text[0]==="{"&&e.text[1]==="{")||t.type===Ur.CONTROL_FLOW_CLOSE&&t.text==="}"&&e.text.endsWith("{")};Ho.prototype._reset=function(){this._current_tag_name=""};Ho.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(Ur.EOF,""):(n=n||this._read_open_handlebars(r,e),n=n||this._read_attribute(r,t,e),n=n||this._read_close(r,e),n=n||this._read_control_flows(r,e),n=n||this._read_raw_content(r,t,e),n=n||this._read_content_word(r,e),n=n||this._read_comment_or_cdata(r),n=n||this._read_processing(r),n=n||this._read_open(r,e),n=n||this._create_token(Ur.UNKNOWN,this._input.next()),n)};Ho.prototype._read_comment_or_cdata=function(t){var e=null,n=null,r=null;if(t==="<"){var i=this._input.peek(1);i==="!"&&(n=this.__patterns.comment.read(),n?(r=Ej.get_directives(n),r&&r.ignore==="start"&&(n+=Ej.readIgnored(this._input))):n=this.__patterns.cdata.read()),n&&(e=this._create_token(Ur.COMMENT,n),e.directives=r)}return e};Ho.prototype._read_processing=function(t){var e=null,n=null,r=null;if(t==="<"){var i=this._input.peek(1);(i==="!"||i==="?")&&(n=this.__patterns.conditional_comment.read(),n=n||this.__patterns.processing.read()),n&&(e=this._create_token(Ur.COMMENT,n),e.directives=r)}return e};Ho.prototype._read_open=function(t,e){var n=null,r=null;return(!e||e.type===Ur.CONTROL_FLOW_OPEN)&&t==="<"&&(n=this._input.next(),this._input.peek()==="/"&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(Ur.TAG_OPEN,n)),r};Ho.prototype._read_open_handlebars=function(t,e){var n=null,r=null;return(!e||e.type===Ur.CONTROL_FLOW_OPEN)&&this._options.indent_handlebars&&t==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(n=this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars.read(),r=this._create_token(Ur.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(Ur.TAG_OPEN,n))),r};Ho.prototype._read_control_flows=function(t,e){var n="",r=null;if(!this._options.templating.includes("angular")||!this._options.indent_handlebars)return r;if(t==="@"){if(n=this.__patterns.angular_control_flow_start.read(),n==="")return r;for(var i=n.endsWith("(")?1:0,o=0;!(n.endsWith("{")&&i===o);){var a=this._input.next();if(a===null)break;a==="("?i++:a===")"&&o++,n+=a}r=this._create_token(Ur.CONTROL_FLOW_OPEN,n)}else t==="}"&&e&&e.type===Ur.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(Ur.CONTROL_FLOW_CLOSE,n));return r};Ho.prototype._read_close=function(t,e){var n=null,r=null;return e&&e.type===Ur.TAG_OPEN&&(e.text[0]==="<"&&(t===">"||t==="/"&&this._input.peek(1)===">")?(n=this._input.next(),t==="/"&&(n+=this._input.next()),r=this._create_token(Ur.TAG_CLOSE,n)):e.text[0]==="{"&&t==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),r=this._create_token(Ur.TAG_CLOSE,"}}"))),r};Ho.prototype._read_attribute=function(t,e,n){var r=null,i="";if(n&&n.text[0]==="<")if(t==="=")r=this._create_token(Ur.EQUALS,this._input.next());else if(t==='"'||t==="'"){var o=this._input.next();t==='"'?o+=this.__patterns.double_quote.read():o+=this.__patterns.single_quote.read(),r=this._create_token(Ur.VALUE,o)}else i=this.__patterns.attribute.read(),i&&(e.type===Ur.EQUALS?r=this._create_token(Ur.VALUE,i):r=this._create_token(Ur.ATTRIBUTE,i));return r};Ho.prototype._is_content_unformatted=function(t){return this._options.void_elements.indexOf(t)===-1&&(this._options.content_unformatted.indexOf(t)!==-1||this._options.unformatted.indexOf(t)!==-1)};Ho.prototype._read_raw_content=function(t,e,n){var r="";if(n&&n.text[0]==="{")r=this.__patterns.handlebars_raw_close.read();else if(e.type===Ur.TAG_CLOSE&&e.opened.text[0]==="<"&&e.text[0]!=="/"){var i=e.opened.text.substr(1).toLowerCase();if(i==="script"||i==="style"){var o=this._read_comment_or_cdata(t);if(o)return o.type=Ur.TEXT,o;r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return r?this._create_token(Ur.TEXT,r):null};Ho.prototype._read_content_word=function(t,e){var n="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=e&&e.type===Ur.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n)return this._create_token(Ur.TEXT,n)};FC.Tokenizer=Ho;FC.TOKEN=Ur;var Utt=XD.Options,qtt=DC.Output,Ytt=FC.Tokenizer,Fr=FC.TOKEN,Tj=/\r\n|[\r\n]/,Xtt=/\r\n|[\r\n]/g,Fs=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new qtt(t,e)};Fs.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)};Fs.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e};Fs.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()};Fs.prototype.add_raw_token=function(t){this._output.add_raw_token(t)};Fs.prototype.print_preserved_newlines=function(t){var e=0;t.type!==Fr.TEXT&&t.previous.type!==Fr.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines<this.max_preserve_newlines+1?t.newlines:this.max_preserve_newlines+1);for(var n=0;n<e;n++)this.print_newline(n>0);return e!==0};Fs.prototype.traverse_whitespace=function(t){return t.whitespace_before||t.newlines?(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0):!1};Fs.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped};Fs.prototype.print_newline=function(t){this._output.add_new_line(t)};Fs.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))};Fs.prototype.indent=function(){this.indent_level++};Fs.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))};Fs.prototype.get_full_indent=function(t){return t=this.indent_level+(t||0),t<1?"":this._output.get_indent_string(t)};var Ztt=function(t){for(var e=null,n=t.next;n.type!==Fr.EOF&&t.closed!==n;){if(n.type===Fr.ATTRIBUTE&&n.text==="type"){n.next&&n.next.type===Fr.EQUALS&&n.next.next&&n.next.next.type===Fr.VALUE&&(e=n.next.next.text);break}n=n.next}return e},Gtt=function(t,e){var n=null,r=null;return e.closed?(t==="script"?n="text/javascript":t==="style"&&(n="text/css"),n=Ztt(e)||n,n.search("text/css")>-1?r="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?r="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?r="html":n.search(/test\/null/)>-1&&(r="null"),r):null};function py(t,e){return e.indexOf(t)!==-1}function Ktt(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function Cp(t){this._printer=t,this._current_frame=null}Cp.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null};Cp.prototype.record_tag=function(t){var e=new Ktt(this._current_frame,t,this._printer.indent_level);this._current_frame=e};Cp.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e};Cp.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&t.indexOf(n.tag)===-1;){if(e&&e.indexOf(n.tag)!==-1){n=null;break}n=n.parent}return n};Cp.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)};Cp.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)};function os(t,e,n,r){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var i=new Utt(e,"html");this._options=i,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}os.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;this._options.eol==="auto"&&(e=`
  201. `,t&&Tj.test(t)&&(e=t.match(Tj)[0])),t=t.replace(Xtt,`
  202. `);var n=t.match(/^[\t ]*/)[0],r={text:"",type:""},i=new aJ,o=new Fs(this._options,n),a=new Ytt(t,this._options).tokenize();this._tag_stack=new Cp(o);for(var s=null,l=a.next();l.type!==Fr.EOF;)l.type===Fr.TAG_OPEN||l.type===Fr.COMMENT?(s=this._handle_tag_open(o,l,i,r,a),i=s):l.type===Fr.ATTRIBUTE||l.type===Fr.EQUALS||l.type===Fr.VALUE||l.type===Fr.TEXT&&!i.tag_complete?s=this._handle_inside_tag(o,l,i,r):l.type===Fr.TAG_CLOSE?s=this._handle_tag_close(o,l,i):l.type===Fr.TEXT?s=this._handle_text(o,l,i):l.type===Fr.CONTROL_FLOW_OPEN?s=this._handle_control_flow_open(o,l):l.type===Fr.CONTROL_FLOW_CLOSE?s=this._handle_control_flow_close(o,l):o.add_raw_token(l),r=s,l=a.next();var u=o._output.get_code(e);return u};os.prototype._handle_control_flow_open=function(t,e){var n={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),t.print_token(e),t.indent(),n};os.prototype._handle_control_flow_close=function(t,e){var n={text:e.text,type:e.type};return t.deindent(),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),t.print_token(e),n};os.prototype._handle_tag_close=function(t,e,n){var r={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):(n.tag_start_char==="<"&&(t.set_space_before_token(e.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),n.indent_content&&!(n.is_unformatted||n.is_content_unformatted)&&(t.indent(),n.indent_content=!1),!n.is_inline_element&&!(n.is_unformatted||n.is_content_unformatted)&&t.set_wrap_point(),r};os.prototype._handle_inside_tag=function(t,e,n,r){var i=n.has_wrapped_attrs,o={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):n.tag_start_char==="{"&&e.type===Fr.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===Fr.ATTRIBUTE?t.set_space_before_token(!0):(e.type===Fr.EQUALS||e.type===Fr.VALUE&&e.previous.type===Fr.EQUALS)&&t.set_space_before_token(!1),e.type===Fr.ATTRIBUTE&&n.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),i=i||e.newlines!==0),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(r.type!==Fr.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),i=!0)),t.print_token(e),i=i||t.previous_token_wrapped(),n.has_wrapped_attrs=i),o};os.prototype._handle_text=function(t,e,n){var r={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),r};os.prototype._print_custom_beatifier_text=function(t,e,n){var r=this;if(e.text!==""){var i=e.text,o,a=1,s="",l="";n.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?o=this._js_beautify:n.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?o=this._css_beautify:n.custom_beautifier_name==="html"&&(o=function(m,g){var y=new os(m,g,r._js_beautify,r._css_beautify);return y.beautify()}),this._options.indent_scripts==="keep"?a=0:this._options.indent_scripts==="separate"&&(a=-t.indent_level);var u=t.get_full_indent(a);if(i=i.replace(/\n[ \t]*$/,""),n.custom_beautifier_name!=="html"&&i[0]==="<"&&i.match(/^(<!--|<!\[CDATA\[)/)){var c=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(i);if(!c){t.add_raw_token(e);return}s=u+c[1]+`
  203. `,i=c[4],c[5]&&(l=u+c[5]),i=i.replace(/\n[ \t]*$/,""),(c[2]||c[3].indexOf(`
  204. `)!==-1)&&(c=c[3].match(/[ \t]+$/),c&&(e.whitespace_before=c[0]))}if(i)if(o){var d=function(){this.eol=`
  205. `};d.prototype=this._options.raw_options;var f=new d;i=o(u+i,f)}else{var h=e.whitespace_before;h&&(i=i.replace(new RegExp(`
  206. (`+h+")?","g"),`
  207. `)),i=u+i.replace(/\n/g,`
  208. `+u)}s&&(i?i=s+i+`
  209. `+l:i=s+l),t.print_newline(!1),i&&(e.text=i,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}};os.prototype._handle_tag_open=function(t,e,n,r,i){var o=this._get_tag_open_token(e);if((n.is_unformatted||n.is_content_unformatted)&&!n.is_empty_element&&e.type===Fr.TAG_OPEN&&!o.is_start_tag?(t.add_raw_token(e),o.start_tag_token=this._tag_stack.try_pop(o.tag_name)):(t.traverse_whitespace(e),this._set_tag_position(t,e,o,n,r),o.is_inline_element||t.set_wrap_point(),t.print_token(e)),o.is_start_tag&&this._is_wrap_attributes_force){var a=0,s;do s=i.peek(a),s.type===Fr.ATTRIBUTE&&(o.attr_count+=1),a+=1;while(s.type!==Fr.EOF&&s.type!==Fr.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(o.alignment_size=e.text.length+1),!o.tag_complete&&!o.is_unformatted&&(t.alignment_size=o.alignment_size),o};var aJ=function(t,e){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!e)this.tag_complete=!0;else{var n;this.tag_start_char=e.text[0],this.text=e.text,this.tag_start_char==="<"?(n=e.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:""):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&e.next!==null?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===Fr.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&e.closed.text==="/>";var r=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(r=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(r)))}};os.prototype._get_tag_open_token=function(t){var e=new aJ(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||py(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&py(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&py(e.tag_check,this._options.content_unformatted),e.is_inline_element=py(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||e.tag_start_char==="{",e};os.prototype._set_tag_position=function(t,e,n,r,i){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),(n.tag_name==="script"||n.tag_name==="style")&&!(n.is_unformatted||n.is_content_unformatted)&&(n.custom_beautifier_name=Gtt(n.tag_check,e)))),py(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if(n.tag_start_char==="{"&&n.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0;var o=t.current_line_has_match(/{{#if/);o||t.print_newline(!1)}n.tag_name==="!--"&&i.type===Fr.TAG_CLOSE&&r.is_end_tag&&n.text.indexOf(`
  210. `)===-1||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var a=!1;a=n.start_tag_token&&n.start_tag_token.multiline_content,a=a||!n.is_inline_element&&!(r.is_inline_element||r.is_unformatted)&&!(i.type===Fr.TAG_CLOSE&&n.start_tag_token===r)&&i.type!=="TK_CONTENT",(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,n.tag_start_char==="<"&&(n.tag_name==="html"?n.indent_content=this._options.indent_inner_html:n.tag_name==="head"?n.indent_content=this._options.indent_head_inner_html:n.tag_name==="body"&&(n.indent_content=this._options.indent_body_inner_html)),!(n.is_inline_element||n.is_unformatted)&&(i.type!=="TK_CONTENT"||n.is_content_unformatted)&&t.print_newline(!1),this._calcluate_parent_multiline(t,n)};os.prototype._calcluate_parent_multiline=function(t,e){e.parent&&t._output.just_added_newline()&&!((e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element)&&(e.parent.multiline_content=!0)};var Jtt=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],ent=["a","audio","del","ins","map","noscript","video"];os.prototype._do_optional_end_element=function(t){var e=null;if(!(t.is_empty_element||!t.is_start_tag||!t.parent)){if(t.tag_name==="body")e=e||this._tag_stack.try_pop("head");else if(t.tag_name==="li")e=e||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(t.tag_name==="dd"||t.tag_name==="dt")e=e||this._tag_stack.try_pop("dt",["dl"]),e=e||this._tag_stack.try_pop("dd",["dl"]);else if(t.parent.tag_name==="p"&&Jtt.indexOf(t.tag_name)!==-1){var n=t.parent.parent;(!n||ent.indexOf(n.tag_name)===-1)&&(e=e||this._tag_stack.try_pop("p"))}else t.tag_name==="rp"||t.tag_name==="rt"?(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]),e=e||this._tag_stack.try_pop("rp",["ruby","rtc"])):t.tag_name==="optgroup"?e=e||this._tag_stack.try_pop("optgroup",["select"]):t.tag_name==="option"?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):t.tag_name==="colgroup"?e=e||this._tag_stack.try_pop("caption",["table"]):t.tag_name==="thead"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"])):t.tag_name==="tbody"||t.tag_name==="tfoot"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("thead",["table"]),e=e||this._tag_stack.try_pop("tbody",["table"])):t.tag_name==="tr"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(t.tag_name==="th"||t.tag_name==="td")&&(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),e=e||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}};nJ.Beautifier=os;var tnt=nJ.Beautifier,nnt=XD.Options;function rnt(t,e,n,r){var i=new tnt(t,e,n,r);return i.beautify()}YD.exports=rnt;YD.exports.defaultOptions=function(){return new nnt};var sJ=FD.exports,lJ=UD.exports,uJ=YD.exports;function cJ(t,e,n,r){return n=n||sJ,r=r||lJ,uJ(t,e,n,r)}cJ.defaultOptions=uJ.defaultOptions;NC.js=sJ;NC.css=lJ;NC.html=cJ;(function(t){function e(n,r,i){var o=function(a,s){return n.js_beautify(a,s)};return o.js=n.js_beautify,o.css=r.css_beautify,o.html=i.html_beautify,o.js_beautify=n.js_beautify,o.css_beautify=r.css_beautify,o.html_beautify=i.html_beautify,o}(function(n){var r=NC;r.js_beautify=r.js,r.css_beautify=r.css,r.html_beautify=r.html,n.exports=e(r,r,r)})(t)})(BK);var lb=BK.exports;const kj=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],zc=(()=>{if(typeof document=="undefined")return!1;const t=kj[0],e={};for(const n of kj)if((n==null?void 0:n[1])in document){for(const[i,o]of n.entries())e[t[i]]=o;return e}return!1})(),Pj={change:zc.fullscreenchange,error:zc.fullscreenerror};let Os={request(t=document.documentElement,e){return new Promise((n,r)=>{const i=()=>{Os.off("change",i),n()};Os.on("change",i);const o=t[zc.requestFullscreen](e);o instanceof Promise&&o.then(i).catch(r)})},exit(){return new Promise((t,e)=>{if(!Os.isFullscreen){t();return}const n=()=>{Os.off("change",n),t()};Os.on("change",n);const r=document[zc.exitFullscreen]();r instanceof Promise&&r.then(n).catch(e)})},toggle(t,e){return Os.isFullscreen?Os.exit():Os.request(t,e)},onchange(t){Os.on("change",t)},onerror(t){Os.on("error",t)},on(t,e){const n=Pj[t];n&&document.addEventListener(n,e,!1)},off(t,e){const n=Pj[t];n&&document.removeEventListener(n,e,!1)},raw:zc};Object.defineProperties(Os,{isFullscreen:{get:()=>Boolean(document[zc.fullscreenElement])},element:{enumerable:!0,get:()=>{var t;return(t=document[zc.fullscreenElement])!=null?t:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[zc.fullscreenEnabled])}});zc||(Os={isEnabled:!1});var Hr=Os;const int={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},ont={style:{flex:"auto"}},ant={__name:"ExportDialog",props:["show","data","ruleChainId","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=t,r=[sv()],{show:i,data:o,ruleChainId:a}=Ri(n),s=F(!1),l=F(null),u=F("450px"),c=()=>{let m=new Blob([o.value],{type:"text/plain;charset=utf-8"});NX.exports.saveAs(m,a.value+".json")},d=()=>{n.lf.getSnapshot(a.value+".png","#FFF")},f=()=>{e("close")},h=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():Hr.request(l.value[0]))};return Hr.on("change",()=>{Hr.isFullscreen?(u.value="100%",s.value=!0):(u.value="450px",s.value=!1)}),(m,g)=>{const y=ho,b=fo,w=lr,O=Ma;return R(),we(O,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:p(i)},{header:z(()=>[B(b,null,{default:z(()=>[B(y,{span:12},{default:z(()=>[qe("\u5BFC\u51FA\u6D41\u7A0BDSL")]),_:1})]),_:1})]),footer:z(()=>[J("div",ont,[B(w,{type:"primary",onClick:d},{default:z(()=>[qe("\u4E0B\u8F7D\u56FE\u7247")]),_:1}),B(w,{type:"primary",onClick:c},{default:z(()=>[qe("\u4E0B\u8F7D\u6570\u636E")]),_:1}),B(w,{onClick:f},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[J("div",int,[B(w,{icon:s.value?p(Lx):p(zm),size:"small",onClick:h,circle:""},null,8,["icon"])]),B(p(Vu),{modelValue:p(o),"onUpdate:modelValue":g[0]||(g[0]=S=>kr(o)?o.value=S:null),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u5B9A\u4E49JSON\u5185\u5BB9...",ref_key:"codeEditorRef",ref:l,style:mt({height:u.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:r},null,8,["modelValue","style"])]),_:1},8,["modelValue"])}}},snt=J("label",null,"\u5728\u4E0B\u65B9\u7C98\u8D34\u6D41\u7A0BDSL",-1),lnt={style:{flex:"auto","text-align":"right"}},unt={__name:"ImportDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=[sv()],r=F(),i=F(),o=F(!1),a=F(null),s=F("400px"),l=Sn({data:""});function u(g,y){y.value=y;const b=new FileReader;b.onload=w=>{try{l.data=w.target.result}catch(O){Vr.error("Invalid JSON format:"+O)}},b.readAsText(g.raw)}function c(g){return!1}const d=()=>{e("submit",l.data)},f=()=>{e("close")},h=function(){l.data=lb.js(l.data,{indent_size:2})},m=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():Hr.request(a.value[0]))};return Hr.on("change",()=>{Hr.isFullscreen?(s.value=window.innerHeight+"px",o.value=!0):(s.value="400px",o.value=!1)}),(g,y)=>{const b=lr,w=Iq,O=Tl,S=ho,x=fo,C=El,E=Ma;return R(),we(E,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{footer:z(()=>[J("div",lnt,[B(b,{type:"primary",size:"large",onClick:d},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(b,{size:"large",onClick:f},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(C,{model:l,ref_key:"formRef",ref:r,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:z(()=>[B(O,null,{default:z(()=>[B(w,{"file-list":i.value,"onUpdate:fileList":y[0]||(y[0]=T=>i.value=T),class:"upload-demo",action:null,"on-change":u,"before-upload":c,limit:1,accept:".json"},{default:z(()=>[B(b,{type:"default"},{default:z(()=>[qe("\u5BFC\u5165\u6D41\u7A0BDSL\u6587\u4EF6")]),_:1})]),_:1},8,["file-list"])]),_:1}),B(O,{label:"\u5728\u4E0B\u65B9\u7C98\u8D34\u6D41\u7A0BDSL",prop:"data"},{label:z(()=>[B(x,null,{default:z(()=>[B(S,{span:20},{default:z(()=>[snt]),_:1}),B(S,{span:4,style:{"text-align":"right"}},{default:z(()=>[B(b,{type:"info",size:"small",round:"",onClick:h},{default:z(()=>[qe("\u6574\u7406")]),_:1}),B(b,{icon:o.value?p(Lx):p(zm),size:"small",onClick:m,circle:""},null,8,["icon"])]),_:1})]),_:1})]),default:z(()=>[J("div",{ref_key:"codeEditorRef",ref:a,style:{width:"100%"}},[B(p(Vu),{modelValue:l.data,"onUpdate:modelValue":y[1]||(y[1]=T=>l.data=T),placeholder:"\u8BF7\u7C98\u8D34\u6D41\u7A0BDSL",style:mt({height:s.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:n},null,8,["modelValue","style"])],512)]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},cnt={__name:"NodeOperate",props:["currentElementPosition"],emits:["edit","delete"],setup(t,{emit:e}){const n=()=>{e("edit")},r=()=>{e("delete")};return(i,o)=>{const a=lr;return R(),G("div",{style:mt({position:"absolute",top:t.currentElementPosition.y+"px",left:t.currentElementPosition.x+"px"})},[B(a,{type:"danger",size:"small",icon:p(VQ),onClick:n,circle:""},null,8,["icon"]),B(a,{type:"danger",size:"small",icon:p(l$),onClick:r,circle:"",style:{"margin-left":"3px"}},null,8,["icon"])],4)}}},dnt=(t,e,n,r,i,o,a,s)=>{let l=t.url+t.executeApi,u=t.url+t.notifyApi,c="";n?c=l.replace(":msgType",i).replace(":id",e):c=u.replace(":msgType",i).replace(":id",e),c=c+"?msgId="+r+"&"+o;const d={method:"POST",headers:s.headers,body:a},f={data:null,headers:null};return new Promise((h,m)=>{fetch(c,d).then(g=>{const y={};for(const[b,w]of g.headers.entries())y[b]=w;return f.headers=y,g.text()}).then(g=>{try{f.data=JSON.parse(g)}catch{f.data=g}h(f)}).catch(g=>{h(g)})})},fnt={class:"log-data"},hnt={__name:"logs",props:["logData","ruleChain","lf"],setup(t){const e=t,n=F([]);Ve(()=>e.logData,()=>{n.value=e.logData.map(i=>i.nodeId)});function r(i){var o,a;return((a=(o=e.lf.getNodeDataById(i))==null?void 0:o.properties)==null?void 0:a.model)||{}}return(i,o)=>{const a=gt,s=Bs,l=Gx,u=Zx;return R(),G("view",fnt,[B(u,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=c=>n.value=c)},{default:z(()=>[(R(!0),G(ct,null,Wt(t.logData,c=>(R(),we(l,{name:c.nodeId,key:c.nodeId},{title:z(()=>[B(a,{color:"#13ce66",style:{"margin-right":"10px","font-size":"24px"}},{default:z(()=>[B(p(d$))]),_:1}),qe(je(r(c.nodeId).name)+" ",1),B(s,{style:{"margin-left":"20px"}},{default:z(()=>[qe(je(r(c.nodeId).type),1)]),_:2},1024)]),default:z(()=>[B(u,{"model-value":["\u65E5\u5FD7"]},{default:z(()=>[B(l,{title:"\u8F93\u5165"},{title:z(()=>[qe(" \u8F93\u5165 ")]),default:z(()=>[qe(" "+je(c.inMsg),1)]),_:2},1024),B(l,{title:"\u8F93\u5165"},{title:z(()=>[qe(" \u8F93\u51FA ")]),default:z(()=>[qe(" "+je(c.outMsg),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])])}}},pnt={style:{float:"right"}},gnt={__name:"RunPanel",props:["lf","show","data"],emits:["submit","close"],setup(t,{emit:e}){const{lf:n,show:r,data:i}=t,o=[sv()],a=F(!1),s=F("metadata"),l=F("response"),u=n.getRuleChain().id,c=Sn({data:"",headers:""}),d=F([]),f=F({}),h=F(""),m=F(),g=Sn({wait:!0,msgType:"testMsgType",headers:`{
  211. "Content-Type": "application/json"
  212. }`,metadata:"key1=value1&key2=value2",body:`{
  213. "temperature":68
  214. }`}),y=F(null);function b(){y&&y.value&&y.value.close();let C=BP();y.value=new WebSocket(window.allEnv.rule.wsServer+"/api/v1/logs/ws/"+u+"/"+C),y.value.onmessage=E=>{let T=f.value,P=JSON.parse(E.data),A=P.nodeId;if(P.chainId===u){if(P.flowType==="Log"){let N=T[A];N?N.logItems.push(P.msg.data):T[A]={nodeId:A,logItems:[]}}else if(P.flowType==="OUT"){let N=T[A];N?(N.outMsg=P.msg,N.err=P.err,N.relationType=P.relationType,N.endTs=E.ts||new Date().getTime()):T[A]={nodeId:A,outMsg:P.msg,relationType:P.relationType,err:P.err,logItems:[],endTs:E.ts||new Date().getTime()}}else if(P.flowType==="IN"){let N=T[A];N?(N.inMsg=P.msg,N.startTs=E.ts||new Date().getTime()):T[A]={nodeId:A,logItems:[],inMsg:P.msg,startTs:E.ts||new Date().getTime()}}f.value=T,d.value=Object.values(T).sort((N,$)=>N.startTs===$.startTs?N.endTs-$.endTs:N.startTs-$.startTs)}},y.value.onopen=()=>{console.log("WebSocket connected")},y.value.onerror=E=>{console.error("WebSocket error",E)},y.value.onclose=()=>{console.log("WebSocket disconnected")}}Bt(()=>{y.value&&y.value.close(),b()}),ed(()=>{y.value&&y.value.close()});const w=async(C,E,T,P,A,D)=>{try{l.value==="response"&&(a.value=!0),c.data="",c.headers="",h.value=BP(),d.value=[],f.value={};const N=n.getEditorSetting(),$=await dnt(N,E,C,h.value,T,P,A,D);$.data&&(c.data=JSON.stringify($.data,null," ")),c.headers=JSON.stringify($.headers,null," ")}catch(N){Vr({showClose:!0,message:N.response&&N.response.data||N.code,type:"error"})}finally{a.value=!1}},O=C=>{!C||C.validate(E=>{if(E){let T={headers:JSON.parse(g.headers)};w(g.wait,u,g.msgType,g.metadata,g.body,T)}else return!1})},S=()=>{l.value==="log"&&y&&y.value&&y.value.readyState===WebSocket.CLOSED&&(console.log("\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5..."),b())},x=()=>{e("close")};return(C,E)=>{const T=hi,P=Tl,A=Sp,D=wp,N=Is,$=lr,W=El,L=ho,I=fo,U=bP;return Ht((R(),G("div",null,[B(I,{gutter:20},{default:z(()=>[B(L,{span:10,class:"send-form"},{default:z(()=>[B(W,{model:g,ref_key:"formRef",ref:m,"label-position":"top","label-width":"auto"},{default:z(()=>[B(P,{label:"\u6D88\u606F\u7C7B\u578B",rules:[{required:!0,message:"\u6D88\u606F\u7C7B\u578B\u662F\u5FC5\u987B\u7684"}],prop:"msgType"},{default:z(()=>[B(T,{modelValue:g.msgType,"onUpdate:modelValue":E[0]||(E[0]=Q=>g.msgType=Q),placeholder:"\u8BF7\u8F93\u5165\u6D88\u606F\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),B(D,{modelValue:s.value,"onUpdate:modelValue":E[3]||(E[3]=Q=>s.value=Q)},{default:z(()=>[B(A,{label:"\u5143\u6570\u636E",name:"metadata"},{default:z(()=>[B(p(Vu),{modelValue:g.metadata,"onUpdate:modelValue":E[1]||(E[1]=Q=>g.metadata=Q),placeholder:"\u8BF7\u8F93\u5165\u5143\u6570\uFF0C\u636E\u683C\u5F0F\uFF1Akey1=value1&key2=value2",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(A,{label:"\u8BF7\u6C42\u5934",name:"headers"},{default:z(()=>[B(p(Vu),{modelValue:g.headers,"onUpdate:modelValue":E[2]||(E[2]=Q=>g.headers=Q),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u5934\u6570\u636E",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]),B(P,{label:"\u8BF7\u6C42\u4F53",prop:"body"},{default:z(()=>[B(p(Vu),{modelValue:g.body,"onUpdate:modelValue":E[4]||(E[4]=Q=>g.body=Q),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u4F53\u6570\u636E",style:{height:"200px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(P,null,{default:z(()=>[B(N,{modelValue:g.wait,"onUpdate:modelValue":E[5]||(E[5]=Q=>g.wait=Q),label:"\u8F93\u51FA\u7ED3\u679C"},null,8,["modelValue"])]),_:1}),J("div",pnt,[B($,{type:"default",onClick:E[6]||(E[6]=Q=>x())},{default:z(()=>[qe("\u5173\u95ED")]),_:1}),B($,{type:"primary",loading:a.value,onClick:E[7]||(E[7]=Q=>O(m.value))},{default:z(()=>[qe("\u53D1\u9001")]),_:1},8,["loading"])])]),_:1},8,["model"])]),_:1}),B(L,{span:14},{default:z(()=>[B(D,{type:"card",modelValue:l.value,"onUpdate:modelValue":E[10]||(E[10]=Q=>l.value=Q),onTabChange:S},{default:z(()=>[B(A,{label:"\u8F93\u51FA",name:"response"},{default:z(()=>[B(W,{"label-position":"top","label-width":"auto"},{default:z(()=>[B(P,{label:"\u54CD\u5E94\u5934"},{default:z(()=>[B(p(Vu),{modelValue:c.headers,"onUpdate:modelValue":E[8]||(E[8]=Q=>c.headers=Q),editable:!1,style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(P,{label:"\u54CD\u5E94\u4F53"},{default:z(()=>[B(p(Vu),{modelValue:c.data,"onUpdate:modelValue":E[9]||(E[9]=Q=>c.data=Q),placeholder:"",editable:!1,style:{height:"300px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B(A,{label:"\u65E5\u5FD7",name:"log"},{default:z(()=>{var Q;return[(Q=d.value)!=null&&Q.length?(R(),we(hnt,{key:0,lf:t.lf,logData:d.value,ruleChainId:p(u),msgId:h.value},null,8,["lf","logData","ruleChainId","msgId"])):_e("",!0)]}),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})])),[[U,a.value]])}}};var mnt=Pl(gnt,[["__scopeId","data-v-249a8b3f"]]);const vnt={__name:"RunDialog",props:["show","lf"],emits:["submit","close",'"operate"'],setup(t,{emit:e}){const{show:n,lf:r}=t,i=F(""),o=F(""),a=F(""),s=()=>{e("close")},l=(c,d)=>{e("operate",c,d)},u=()=>{i.value=r.getRuleChain().id;let c=r.getEditorSetting();o.value=c.url+c.executeApi,a.value=c.url+c.notifyApi};return(c,d)=>{const f=Ma;return R(),we(f,{"append-to-body":!0,"destroy-on-close":!1,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u},{header:z(()=>[qe(" \u8FD0\u884C\u6D41\u7A0B ")]),default:z(()=>[B(mnt,{lf:t.lf,onClose:s,onOperate:l},null,8,["lf"])]),_:1},8,["modelValue"])}}},ynt={style:{flex:"auto","text-align":"right"}},bnt={__name:"FlowForm",props:["show","lf","ruleChain","flowStatus"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r,ruleChain:i,flowStatus:o}=t,a=F(),s=()=>{if(o===0){e("submit",i);return}let u=r.getEditorSetting().url+r.getEditorSetting().chainsApi;fetch(u+`/${i.id}/base`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Bn(i))}).then(c=>c.ok?c.text():c.text().then(d=>{throw new Error(`${d}`)})).then(c=>{Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("submit",i)}).catch(c=>{Vr.error(`\u4FDD\u5B58\u5931\u8D25: ${c.message}`)})},l=()=>{e("close")};return(u,c)=>{const d=hi,f=Tl,h=Xm,m=lr,g=El;return R(),we(g,{model:t.ruleChain,ref_key:"formRef",ref:a,"label-position":"top","label-width":"auto"},{default:z(()=>[B(f,{label:"ID",prop:"id"},{default:z(()=>[B(d,{modelValue:t.ruleChain.id,"onUpdate:modelValue":c[0]||(c[0]=y=>t.ruleChain.id=y),disabled:""},null,8,["modelValue"])]),_:1}),B(f,{label:"\u540D\u79F0",prop:"name"},{default:z(()=>[B(d,{modelValue:t.ruleChain.name,"onUpdate:modelValue":c[1]||(c[1]=y=>t.ruleChain.name=y),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(f,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:z(()=>[B(h,{class:"ml-2",disabled:"",modelValue:t.ruleChain.root,"onUpdate:modelValue":c[2]||(c[2]=y=>t.ruleChain.root=y),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"])]),_:1}),B(f,{label:"\u63CF\u8FF0",prop:"description"},{default:z(()=>[B(d,{modelValue:t.ruleChain.additionalInfo.description,"onUpdate:modelValue":c[3]||(c[3]=y=>t.ruleChain.additionalInfo.description=y),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),J("div",ynt,[B(m,{type:"primary",onClick:s},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(m,{onClick:l},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),_:1},8,["model"])}}},_nt={style:{flex:"auto","text-align":"right"}},Ont={__name:"VarsForm",props:{show:Boolean,data:{type:Object,default:()=>F({key:"",value:""})},isNew:{type:Boolean,default:()=>!1}},emits:["submit","close"],setup(t,{emit:e}){const{show:n,data:r,isNew:i}=t,o=F(),a=r,s=u=>{!u||u.validate(c=>{if(c)e("submit",Bn(a));else return!1})},l=()=>{e("close")};return(u,c)=>{const d=hi,f=Tl,h=lr,m=El,g=Ma;return R(),we(g,{modelValue:t.show,"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"before-close":l},{default:z(()=>[B(m,{model:p(a),ref_key:"formRef",ref:o,"label-position":"top","label-width":"auto"},{default:z(()=>[B(f,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"key"},{default:z(()=>[B(d,{modelValue:p(a).key,"onUpdate:modelValue":c[0]||(c[0]=y=>p(a).key=y),disabled:!t.isNew,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","disabled"])]),_:1}),B(f,{label:"\u503C",rules:[{required:!0,message:"\u503C\u662F\u5FC5\u987B\u7684"}],prop:"value"},{default:z(()=>[B(d,{modelValue:p(a).value,"onUpdate:modelValue":c[1]||(c[1]=y=>p(a).value=y),type:"textarea",rows:"4",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue"])]),_:1}),J("div",_nt,[B(h,{type:"default",onClick:l},{default:z(()=>[qe("\u53D6\u6D88")]),_:1}),B(h,{type:"primary",onClick:c[2]||(c[2]=y=>s(o.value))},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1})])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},wnt={__name:"VarsTable",props:["ruleChain","varType","lf","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{ruleChain:r,varType:i,lf:o,flowStatus:a}=t,s=F(!1),l=F({}),u=F(!1),c=F([]),d=()=>{l.value={key:"",value:""},u.value=!0,s.value=!0},f=O=>{l.value=O,u.value=!0,s.value=!1},h=O=>{l.value=O;const S=c.value.findIndex(C=>C.key===O.key);S!==-1&&c.value.splice(S,1);const x=r.id;w(x,i,c.value)},m=()=>{u.value=!1},g=O=>{b(O)},y=O=>{const S=c.value.findIndex(C=>C.key===O.key);S!==-1?c.value[S].value=O.value:c.value.push(O);const x=r.id;w(x,i,c.value)},b=O=>{if(!O||!O.configuration||!O.configuration[i])return c.value=[],[];const S=Object.keys(O.configuration[i]).map(x=>({key:x,value:O.configuration[i][x]}));return c.value=S,S},w=async(O,S,x)=>{const C={};if(x.forEach(T=>{C[T.key]=T.value}),a===0){const T=Bn(r);T.configuration||(T.configuration={}),T.configuration[S]=C,m(),n("submit",T,"config");return}let E=o.getEditorSetting().url+o.getEditorSetting().chainsApi;fetch(E+`/${r.id}/config/${S}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}).then(T=>T.ok?T.text():T.text().then(P=>{throw new Error(`${P}`)})).then(T=>{Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),m();const P=Bn(r);P.configuration||(P.configuration={}),P.configuration[S]=C,n("submit",P,"config")}).catch(T=>{Vr.error(`\u4FDD\u5B58\u5931\u8D25: ${T.message}`)})};return e({updateData:g}),(O,S)=>{const x=lr,C=$b,E=Rb;return R(),G(ct,null,[B(x,{style:{float:"right"},onClick:d},{default:z(()=>[qe(je(t.varType==="vars"?"\u65B0\u5EFA\u53D8\u91CF":"\u65B0\u5EFA\u79D8\u94A5"),1)]),_:1}),B(E,{data:b(t.ruleChain),stripe:"",style:{width:"100%"}},{default:z(()=>[B(C,{prop:"key",label:"\u540D\u79F0"}),t.varType==="vars"?(R(),we(C,{key:0,prop:"value",label:"\u503C"})):_e("",!0),B(C,{fixed:"right",label:"\u64CD\u4F5C"},{default:z(({row:T})=>[t.varType==="vars"?(R(),we(x,{key:0,link:"",type:"primary",size:"small",onClick:P=>f(T)},{default:z(()=>[qe("\u7F16\u8F91")]),_:2},1032,["onClick"])):_e("",!0),B(x,{link:"",type:"primary",size:"small",onClick:P=>h(T)},{default:z(()=>[qe("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u.value?(R(),we(Ont,{key:0,isNew:s.value,data:l.value,show:u.value,varType:t.varType,onSubmit:y,onClose:m},null,8,["isNew","data","show","varType"])):_e("",!0)],64)}}},Snt={__name:"FlowInfoDialog",props:["show","lf","ruleChain","fromActiveName","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:i,lf:o,ruleChain:a,fromActiveName:s,flowStatus:l}=Ri(r),u=F("info");F();const c=F(),d=async y=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(y),Vr({showClose:!0,message:"\u590D\u5236\u6210\u529F",type:"success"});else{const b=document.createElement("textarea");b.value=y,document.body.appendChild(b),b.focus(),b.select();const w=document.execCommand("copy");Vr({showClose:!0,message:w?"\u590D\u5236\u6210\u529F":"\u590D\u5236\u5931\u8D25",type:w?"success":"error"}),document.body.removeChild(b)}}catch(b){console.error("Failed to copy: ",b)}},f=(y,b)=>{n("submit",y,b||"base")},h=()=>{n("close")},m=()=>{};return e({changeActiveName:y=>{u.value=y}}),(y,b)=>{const w=ho,O=fo,S=Sp,x=Bs,C=JW,E=KW,T=wp,P=Ma;return R(),we(P,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"60%",draggable:"",top:"10px","before-close":h,modelValue:p(i)},{header:z(()=>[B(O,null,{default:z(()=>[B(w,{span:12},{default:z(()=>[qe(je(p(a).name),1)]),_:1})]),_:1})]),default:z(()=>[B(T,{modelValue:u.value,"onUpdate:modelValue":b[2]||(b[2]=A=>u.value=A),"tab-position":"left",onTabChange:m},{default:z(()=>[B(S,{label:"\u57FA\u7840\u4FE1\u606F",name:"info"},{default:z(()=>[B(bnt,{lf:p(o),flowStatus:p(l),ruleChain:p(a),onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(S,{label:"\u53D8\u91CF",name:"vars"},{default:z(()=>[B(wnt,{lf:p(o),ref_key:"varsRef",ref:c,flowStatus:p(l),ruleChain:p(a),varType:"vars",onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(S,{label:"\u5E94\u7528\u96C6\u6210",name:"app"},{default:z(()=>[B(x,{style:{"margin-bottom":"20px"},size:"small",type:"info"},{default:z(()=>[qe("\u5E94\u7528\u901A\u8FC7\u8C03\u7528\u4EE5\u4E0B\u63A5\u53E3\u6267\u884C\u89C4\u5219\u94FE")]),_:1}),B(E,{column:"1",border:"",title:""},{default:z(()=>[B(C,{label:"\u540C\u6B65\u63A5\u53E3"},{default:z(()=>[J("span",{onClick:b[0]||(b[0]=A=>d("/api/v1/rules/"+p(a).id+"/execute/{msgType}"))}," POST /api/v1/rules/"+je(p(a).id)+"/execute/{msgType}",1),B(x,{size:"small",type:"info"},{default:z(()=>[qe("\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1}),B(C,{label:"\u5F02\u6B65\u63A5\u53E3"},{default:z(()=>[J("span",{onClick:b[1]||(b[1]=A=>d("/api/v1/rules/"+p(a).id+"/notify/{msgType}"))}," POST /api/v1/rules/"+je(p(a).id)+"/notify/{msgType}",1),B(x,{size:"small",type:"info"},{default:z(()=>[qe("\u4E0D\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},xnt={__name:"NodeMgtNodeTree",props:["show","lf"],emits:["updateNodeState"],setup(t,{expose:e,emit:n}){const{show:r,lf:i}=t;sv(),F("locals");const o=F([{id:1,label:"Level one 1",children:[{id:4,label:"Level two 1-1",children:[{id:9,label:"Level three 1-1-1"},{id:10,label:"Level three 1-1-2"}]}]}]);Bt(()=>{let c=i.getOptions();o.value=l(c.components)});const a=c=>{let d=o.value,f=[];d.forEach(h=>{h.type===c.type?(h.disabled=!h.disabled,f.push({type:h.type,disabled:h.disabled,category:h.category}),h.children&&h.children.length>0&&h.children.forEach(m=>{m.disabled=h.disabled,f.push({type:m.type,disabled:m.disabled,category:m.category})})):h.children&&h.children.length>0&&h.children.forEach(m=>{m.type===c.type&&(m.disabled=!m.disabled,f.push({type:m.type,disabled:m.disabled,category:m.category}))})}),n("updateNodeState",f),o.value=d},s=c=>c.map(d=>{var f;return{type:d.type,label:d.label,category:d.type,isTop:!0,background:d.background,disabled:(f=d.disabled)!=null?f:!1,children:d.components.map(h=>{var m;return{type:h.type,label:h.label,category:d.type,disabled:(m=h.disabled)!=null?m:!1,children:[]}})}}),l=c=>{let d=[];return Object.keys(c).forEach(f=>{let h=c[f];d.push({label:h.label,components:h.components,type:f})}),s(d)};return e({renderData:c=>{o.value=l(c)}}),(c,d)=>{const f=gt,h=lr,m=T0;return R(),we(m,{style:{"max-width":"600px"},data:o.value,"node-key":"type","default-expand-all":"","expand-on-click-node":!0},{default:z(({node:g,data:y})=>[J("span",{class:j({"item-is-disabled":y.disabled,"custom-tree-node":!0})},[J("span",null,[qe(je(y.label)+" ",1),B(f,null,{default:z(()=>[y.isTop?(R(),G("span",{key:0,class:"tree-node-icon",style:mt({backgroundImage:`url(${y.icon?y.icon:"/images/"+y.category+"-dark.svg"})`})},null,4)):_e("",!0)]),_:2},1024)]),J("span",null,[B(h,{size:"small",onClick:b=>a(y)},{default:z(()=>[qe(je(y.disabled?"\u542F\u7528":"\u7981\u7528"),1)]),_:2},1032,["onClick"])])],2)]),_:1},8,["data"])}}};var Cnt=Pl(xnt,[["__scopeId","data-v-6d2066a0"]]);const Ent={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},Tnt={__name:"NodeMgtDialog",props:["show","lf"],emits:["updateLocales","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,i=[sv()],o=F("installed"),a=F(),s=F("{}"),l=F(!1),u=F(null),c=F("450px"),d=()=>{if(o.value==="installed"){let x=r.getOptions();a.value.renderData(x.components)}},f=()=>{b()},h=()=>{y()},m=()=>{e("close")},g=x=>{let C=JSON.parse(s.value);C.component||(C.component={}),C.component.endpoints||(C.component.endpoints={}),C.component.nodes||(C.component.nodes={}),x&&x.forEach(E=>{E.category==="endpoints"?C.component.endpoints[E.type]?C.component.endpoints[E.type].disabled=E.disabled:C.component.endpoints[E.type]={type:E.type,disabled:E.disabled}:C.component.nodes[E.type]?C.component.nodes[E.type].disabled=E.disabled:C.component.nodes[E.type]={type:E.type,disabled:E.disabled}}),s.value=JSON.stringify(C,null,2),b()},y=async()=>{let x=r.getEditorSetting().url+"/api/v1/locales";fetch(x+"?&lang=zh_cn",{method:"GET",headers:{"Content-Type":"application/json"}}).then(C=>C.text()).then(C=>{s.value=C}).catch(C=>{s.value=C.message})},b=()=>{if(!w(s.value)){Vr.error("\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E");return}let C=r.getEditorSetting().url+"/api/v1/locales";fetch(C+"?&lang=zh_cn",{method:"POST",headers:{"Content-Type":"application/json"},body:s.value}).then(E=>{if(E.ok){Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"});let T=JSON.parse(s.value);r.setLocales(T),e("updateLocales")}else Vr.error("\u4FDD\u5B58\u5931\u8D25");return E}).catch(E=>{Vr.error(E.message)})},w=x=>{try{const C=JSON.parse(x);return!(typeof C!="object"||C===null)}catch{return!1}},O=function(){s.value=lb.js(s.value,{indent_size:2})},S=()=>{Hr.isEnabled&&(Hr.isFullscreen?(Hr.exit(),l.value=!1):(c.value="100%",Hr.request(u.value[0]),l.value=!0))};return Hr.on("change",()=>{Hr.isFullscreen?c.value="100%":c.value="450px"}),(x,C)=>{const E=ho,T=fo,P=Sp,A=Bs,D=lr,N=wp,$=Ma;return R(),we($,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px",width:"80%",class:"custom-dialog","before-close":m,modelValue:t.show,onOpen:h},{header:z(()=>[B(T,null,{default:z(()=>[B(E,{span:12},{default:z(()=>[qe("\u7EC4\u4EF6\u7BA1\u7406")]),_:1})]),_:1})]),default:z(()=>[B(N,{modelValue:o.value,"onUpdate:modelValue":C[2]||(C[2]=W=>o.value=W),"tab-position":"left",onClick:d},{default:z(()=>[B(P,{label:"\u5DF2\u5B89\u88C5",name:"installed"},{default:z(()=>[B(Cnt,{ref_key:"nodeTreeRef",ref:a,lf:t.lf,onUpdateNodeState:g},null,8,["lf"])]),_:1}),B(P,{label:"\u56FD\u9645\u5316\u914D\u7F6E",name:"locals"},{default:z(()=>[B(T,{style:{"margin-bottom":"10px"}},{default:z(()=>[B(E,{span:20},{default:z(()=>[B(A,{type:"info"},{default:z(()=>[qe("\u652F\u6301\u589E\u91CF\u914D\u7F6E\u7EC4\u4EF6\u8868\u5355\u914D\u7F6E")]),_:1})]),_:1}),B(E,{span:4,style:{float:"right","text-align":"right"}},{default:z(()=>[B(D,{type:"info",size:"small",round:"",onClick:C[0]||(C[0]=W=>O())},{default:z(()=>[qe("\u6574\u7406")]),_:1}),B(D,{icon:l.value?p(Lx):p(zm),size:"small",onClick:S,circle:""},null,8,["icon"])]),_:1})]),_:1}),B(p(Vu),{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=W=>s.value=W),placeholder:"\u8BF7\u8F93\u5165\u8BED\u8A00\u5305\u914D\u7F6E",ref_key:"codeEditorRef",ref:u,style:mt({height:c.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:i},null,8,["modelValue","style"]),J("div",Ent,[B(D,{type:"primary",onClick:f},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1}),B(D,{onClick:m},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},dJ="rulego-editor-config",knt=function(){try{const t=localStorage.getItem(dJ);t&&(window.rulegoEditorConfig=JSON.parse(t))}catch(t){console.error("\u4FDD\u5B58\u6570\u636E\u51FA\u9519:",t)}return window.rulegoEditorConfig},Pnt=t=>{try{localStorage.setItem(dJ,JSON.stringify(t)),window.rulegoEditorConfig=t}catch(e){console.error("\u66F4\u65B0\u6570\u636E\u51FA\u9519:",e)}},Ant=J("a",{href:"https://github.com/rulego/rulego/tree/main/examples/server",target:"_blank"},"examples/server",-1),Mnt=J("br",null,null,-1),Rnt=J("br",null,null,-1),$nt={style:{flex:"auto"}},Nnt={__name:"SettingDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,i=F(),o=Sn({baseUrl:r.getEditorSetting().url,toolbar:r.getEditorSetting().toolbar}),a=()=>{let u=Bn(o);e("submit",u),Pnt(u)},s=()=>{e("close")},l=()=>{o.baseUrl=r.getEditorSetting().url,o.toolbar=r.getEditorSetting().toolbar};return(u,c)=>{const d=ho,f=fo,h=kH,m=hi,g=Tl,y=El,b=lr,w=Ma;return R(),we(w,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:l},{header:z(()=>[B(f,null,{default:z(()=>[B(d,{span:12},{default:z(()=>[qe("RuleGo-Editor\u8BBE\u7F6E")]),_:1})]),_:1})]),footer:z(()=>[J("div",$nt,[B(b,{type:"primary",onClick:a},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(b,{onClick:s},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(h,{title:"",type:"info",style:{"margin-bottom":"10px","margin-top":"-10px"},center:""},{default:z(()=>[qe(" \u652F\u6301\u79BB\u7EBF\u8FD0\u884C\uFF0C\u5E76\u751F\u6210\u89C4\u5219\u94FE\u6570\u636E\u3002\u5982\u679C\u9700\u8981\u5BF9\u63A5\u540E\u53F0API\u3002\u8BF7\u5148\u8FD0\u884C\uFF1A"),Ant,qe("\u3002 ")]),_:1}),Mnt,Rnt,B(y,{model:o,ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:z(()=>[B(g,{label:"RuleGo\u540E\u53F0URL",prop:"url"},{default:z(()=>[B(m,{modelValue:o.baseUrl,"onUpdate:modelValue":c[0]||(c[0]=O=>o.baseUrl=O),placeholder:"\u793A\u4F8B:http://127.0.0.1:9090"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Dnt=J("p",{class:"text item"},"RuleGo-Editor \u4EC5\u4F9B\u5B66\u4E60\u4EA4\u6D41\u4F7F\u7528\uFF0C\u8BF7\u52FF\u7528\u4E8E\u5546\u4E1A\u7528\u9014\u3002",-1),Lnt=J("p",{class:"text item"},[qe("\u5546\u7528\u6388\u6743\u8BF7\u8054\u7CFB\u4F5C\u8005\u83B7\u53D6\u6388\u6743\uFF0C\u8BE6\u60C5\uFF1A"),J("a",{href:"https://app.rulego.cc",target:"_blank"},"https://app.rulego.cco")],-1),Int=J("p",{class:"text item"},"Email:rulego@outlook.com",-1),Bnt=J("p",{class:"text item"},"\u5FAE\u4FE1:rulegoteam",-1),Fnt={__name:"AboutDialog",props:["show","lf","ruleChain","fromActiveName"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:i,lf:o,ruleChain:a,fromActiveName:s}=Ri(r),l=F("info");F(),Ve(s,d=>{});const u=()=>{n("close")};return e({changeActiveName:d=>{l.value=d}}),(d,f)=>{const h=Ma;return R(),we(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"50%",draggable:"",top:"10px","before-close":u,modelValue:p(i)},{header:z(()=>[qe(" RuleGo-Editor v0.27.0 ")]),default:z(()=>[Dnt,Lnt,Int,Bnt]),_:1},8,["modelValue"])}}},Vnt={},jnt={t:"1733454332806",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1484",width:"200",height:"200"},znt=J("path",{d:"M385.47911111 902.59911111h83.74044444v41.41511111h-83.74044444zM217.99822222 902.59911111h83.74044445v41.41511111h-83.74044445zM113.55022222 881.89155555h-41.41511111v62.12266667H134.25777778v-41.41511111h-20.70755556zM72.13511111 546.816h41.41511111v83.74044445h-41.41511111zM72.13511111 211.85422222h41.41511111v83.74044445h-41.41511111zM72.13511111 714.41066667h41.41511111v83.74044444h-41.41511111zM72.13511111 379.33511111h41.41511111V463.07555555h-41.41511111zM72.13511111 128.11377778h41.41511111v-20.70755556H134.25777778V65.99111111h-62.12266667zM553.07377778 65.99111111h83.74044444v41.41511111h-83.74044444zM720.55466667 65.99111111h83.74044444v41.41511111h-83.74044444zM385.47911111 65.99111111h83.74044444v41.41511111h-83.74044444zM217.99822222 65.99111111h83.74044445v41.41511111h-83.74044445zM888.03555555 65.99111111v41.41511111h20.70755556v20.70755556h41.41511111V65.99111111zM908.74311111 379.33511111h41.41511111V463.07555555h-41.41511111zM908.74311111 211.85422222h41.41511111v83.74044445h-41.41511111zM738.75911111 637.26933333l70.08711111-54.272c5.23377778-4.096 8.07822222-10.46755555 7.50933333-17.06666666-0.56888889-6.59911111-4.43733333-12.51555555-10.24-15.58755556L451.47022222 359.424c-6.82666667-3.64088889-15.13244445-2.95822222-21.27644444 1.70666667-6.144 4.77866667-8.87466667 12.62933333-7.05422223 20.13866666l95.91466667 391.168c1.59288889 6.48533333 6.25777778 11.60533333 12.51555556 13.76711112 6.25777778 2.16177778 13.19822222 1.024 18.432-2.95822223l70.08711111-54.272 151.552 195.69777778c3.86844445 5.00622222 9.67111111 7.62311111 15.47377778 7.62311111 4.20977778 0 8.41955555-1.36533333 11.94666666-4.096l87.60888889-67.81155556c4.096-3.18577778 6.82666667-7.85066667 7.39555556-12.97066666 0.68266667-5.12-0.79644445-10.35377778-3.98222223-14.44977778l-151.32444444-195.69777778z","p-id":"1485",fill:"#2c2c2c"},null,-1),Qnt=[znt];function Hnt(t,e){return R(),G("svg",jnt,Qnt)}var Wnt=Pl(Vnt,[["render",Hnt]]);const Unt={},qnt={t:"1733456794249",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3806",width:"200",height:"200"},Ynt=J("path",{d:"M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z",fill:"#555555","p-id":"3807"},null,-1),Xnt=[Ynt];function Znt(t,e){return R(),G("svg",qnt,Xnt)}var Gnt=Pl(Unt,[["render",Znt]]);const Knt={name:"Undo"},Jnt={t:"1733456780307",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2833",width:"200",height:"200"},ert=J("path",{d:"M426.053024 331.626933l0-169.619142-331.490833 300.725132 331.490833 300.789601L426.053024 581.63394c92.097558 0 376.594077 0 499.373425 281.257755l0-31.251771C925.426449 706.636932 802.629705 305.014832 426.053024 331.626933z",fill:"#3D3B4F","p-id":"2834"},null,-1),trt=[ert];function nrt(t,e,n,r,i,o){return R(),G("svg",Jnt,trt)}var rrt=Pl(Knt,[["render",nrt]]);const irt=t=>(Jse("data-v-309ebd4f"),t=t(),ele(),t),ort={class:"up-toolbar"},art=irt(()=>J("div",{class:"logo"},[J("img",{class:"logoimg",src:Mqe,alt:"logo"}),qe("Sagoo Rule Editor")],-1)),srt={class:"title"},lrt={class:"over-toolbar"},urt={__name:"Toolbar",props:["lf"],setup(t){const{lf:e}=t,n=()=>{const ge=e.getGraphData().ruleChain;if(!ge.id)return Vr.info("\u8BF7\u5148\u4ECE sagoo-iot \u4E2D\u9009\u62E9\u4E00\u4E2A\u89C4\u5219\u94FE\u518D\u8FDB\u884C\u5BFC\u5165\u64CD\u4F5C");const Re=document.createElement("input");Re.type="file",Re.accept=".json",Re.onchange=()=>{const $e=Re.files[0],Z=new FileReader;Z.readAsText($e),Z.onload=()=>{var Te;const ce=JSON.parse(Z.result);ce.ruleChain.id=ge.id,ce.ruleChain.name=ge.name,ce.ruleChain.additionalInfo.description=(Te=ge.additionalInfo)==null?void 0:Te.description,e.graphModel.eventCenter.emit("rulego-editor:open",JSON.stringify(ce)),l.value=!0}},Re.click()},r=()=>{const te=e.getGraphData(),ge=te.ruleChain.id,Re=new Blob([JSON.stringify(te,null,2)],{type:"text/plain;charset=utf-8"});saveAs(Re,ge+".json")},i=F(null),o=F(null),a=F(!1),s=F(!1),l=F(!1),u=F(null),c=F(),d=F(),f=F(""),h=F(0),m=F(!1);let g=!0,y=F(!1);const b=F(!1),w=F(!1),O=F({}),S=F(""),x=F("info"),C=F({});let E=F({x:0,y:0}),T=F({x:0,y:0,targetNodeId:""});const P=F(!0),A=F(!1),D=F({toolbar:e.getEditorSetting().toolbar});e.on("history:change",te=>{l.value=!0,w.value=te.data.undoAble,b.value=te.data.redoAble}),e.on("rulego-editor:saveOk",()=>{l.value=!1,h.value===0&&(h.value=1)}),e.on("selection:selected,node:click,edge:click,blank:click",()=>{const{nodes:te,edges:ge}=e.getSelectElements();let Re=te.filter($e=>$e.type!=="start-node");s.value=Re.length>0||ge.length>0}),e.on("node:drag",({data:te,e:ge})=>{if(te.type!=="start-node"&&i.value&&te.id===i.value.id){let Re=e.getPointByClient(ge.clientX,ge.clientY);E.value.x=Re.domOverlayPosition.x+40,E.value.y=Re.domOverlayPosition.y-45}else if(o.value){let Re=e.getEdgeDataById(o.value.id);if(te.id!==Re.sourceNodeId&&te.id!==Re.targetNodeId)return;let $e=e.getPointByClient(ge.clientX,ge.clientY);T.value.x!==0&&T.value.y!==0&&T.value.targetNodeId===te.id&&(E.value.x=E.value.x-(T.value.x-$e.domOverlayPosition.x),E.value.y=E.value.y-(T.value.y-$e.domOverlayPosition.y)),T.value.x=$e.domOverlayPosition.x,T.value.y=$e.domOverlayPosition.y,T.value.targetNodeId=te.id}}),e.on("node:click",({data:te,position:ge})=>{te.type!=="start-node"?(i.value=te,o.value=null,E.value.x=ge.domOverlayPosition.x+40,E.value.y=ge.domOverlayPosition.y-45,T.value.x=0,T.value.y=0,T.value.targetNodeId=te.id,a.value=!0):a.value=!1}),e.on("edge:click",({data:te,position:ge})=>{i.value=null,o.value=te,E.value.x=ge.domOverlayPosition.x+10,E.value.y=ge.domOverlayPosition.y,T.value.x=0,T.value.y=0,T.value.targetNodeId="",a.value=!0}),e.on("blank:click",({})=>{i.value=null,o.value=null,a.value=!1}),e.on("graph:updated,graph:rendered",({})=>{I()}),e.on("rulego-editor:deleted",te=>{i.value=null,o.value=null,a.value=!1,s.value=!1}),e.on("rulego-editor:setting",te=>{D.value=te,P.value=te.showTest});const N=()=>{S.value="test"},$=()=>{S.value="",m.value=!1},W=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():Hr.request(document.documentElement),e.graphModel.eventCenter.emit("rulego-editor:fullScreen",A.value))};Hr.on("change",()=>{Hr.isFullscreen?A.value=!0:A.value=!1});const L=te=>{V({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:new",te),$(),I(!0)}})},I=(te=!1)=>{let ge=e.getRuleChain();ge&&(f.value=ge.name||ge.id,"disabled"in ge?h.value=ge.disabled?2:1:h.value=0,ge.id&&te&&(window.location.hash=ge.id))},U=()=>{y.value=!y.value,y.value?e.openSelectionSelect():e.closeSelectionSelect()},Q=()=>{g=!g,g?e.extension.miniMap.show():e.extension.miniMap.hide()},V=({message:te="\u5F53\u524D\u753B\u5E03\u5B58\u5728\u672A\u4FDD\u5B58\u6570\u636E\u3002\u786E\u5B9A\u653E\u5F03\u4FDD\u5B58\u5417\uFF1F",title:ge="\u786E\u8BA4",confirmButtonText:Re="\u786E\u5B9A",cancelButtonText:$e="\u53D6\u6D88",type:Z="warning",onConfirm:ce,onCancel:Te})=>{l.value?Mw.confirm(te,ge,{confirmButtonText:Re,cancelButtonText:$e,type:Z}).then(()=>{typeof ce=="function"&&ce()}).catch(()=>{typeof Te=="function"&&Te()}):typeof ce=="function"&&ce()},q=(te,ge)=>{V({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:open",te),$(),I(!0)}})},K=(te,ge)=>{let Re=e.getRuleChain();Re.id===te&&(ge==="start"?(Re.disabled=!1,h.value=1,e.graphModel.eventCenter.emit("rulego-editor:update",Re)):ge==="stop"?(Re.disabled=!0,h.value=2,e.graphModel.eventCenter.emit("rulego-editor:update",Re)):ge==="delete"&&(h.value=0,e.graphModel.eventCenter.emit("rulego-editor:new",{}))),l.value=!1},ie=(te,ge)=>{e.graphModel.eventCenter.emit("rulego-editor:update",te),l.value=!0,ge==="base"&&($(),I())},oe=te=>{e.graphModel.eventCenter.emit("rulego-editor:setting",te),$()},Se=()=>{e.graphModel.eventCenter.emit("rulego-editor:save")},ke=()=>{e.graphModel.eventCenter.emit("rulego-editor:deleteSelects"),a.value=!1},Y=()=>{e.graphModel.eventCenter.emit("rulego-editor:showEditPanel")},re=()=>{};return(te,ge)=>{const Re=Bs,$e=lr,Z=ho,ce=fo,Te=Ui;return R(),G(ct,null,[J("div",ort,[art,J("div",srt,[qe(je(f.value)+" ",1),B(Re,{size:"small",type:h.value===0?"info":h.value===1?"success":"danger"},{default:z(()=>[qe(je(h.value===0?"\u7F16\u8F91\u4E2D":h.value===1?"\u8FD0\u884C\u4E2D":"\u505C\u7528\u4E2D"),1)]),_:1},8,["type"])]),B(ce,null,{default:z(()=>[B(Z,{span:24},{default:z(()=>[B($e,{onClick:Se,type:"primary",icon:te.Check,size:"small",disabled:!l.value},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1},8,["icon","disabled"]),B($e,{onClick:N,type:"success",icon:te.CaretRight,size:"small"},{default:z(()=>[qe("\u8C03\u8BD5")]),_:1},8,["icon"]),B($e,{onClick:n,type:"info",plain:"",icon:te.Download,size:"small"},{default:z(()=>[qe("\u5BFC\u5165")]),_:1},8,["icon"]),B($e,{onClick:r,type:"info",icon:te.Upload,size:"small"},{default:z(()=>[qe("\u5BFC\u51FA")]),_:1},8,["icon"]),B($e,{onClick:te.closePage,type:"warning",icon:p(_a),size:"small"},{default:z(()=>[qe("\u5173\u95ED")]),_:1},8,["onClick","icon"])]),_:1})]),_:1})]),_e("",!0),a.value?(R(),we(cnt,{key:1,onDelete:ke,onEdit:Y,currentElementPosition:p(E)},null,8,["currentElementPosition"])):_e("",!0),B($X,{ref_key:"newFlowDialogRef",ref:O,lf:t.lf,show:m.value,onSubmit:L,onClose:$},null,8,["lf","show"]),B(Lqe,{lf:t.lf,show:S.value==="open",onNew:L,onOpen:q,onOperate:K,onClose:$},null,8,["lf","show"]),B(unt,{lf:t.lf,show:S.value==="import",onSubmit:q,onClose:$},null,8,["lf","show"]),B(ant,{lf:t.lf,show:S.value==="export",data:c.value,ruleChainId:d.value,onClose:$},null,8,["lf","show","data","ruleChainId"]),B(Nnt,{lf:t.lf,show:S.value==="setting",onSubmit:oe,onClose:$},null,8,["lf","show"]),B(vnt,{lf:t.lf,show:S.value==="test",onOperate:K,onClose:$},null,8,["lf","show"]),B(Snt,{ref_key:"flowInfoDialogRef",ref:u,lf:t.lf,flowStatus:h.value,show:S.value==="edit",fromActiveName:x.value,ruleChain:C.value,onSubmit:ie,onClose:$},null,8,["lf","flowStatus","show","fromActiveName","ruleChain"]),B(Tnt,{lf:t.lf,show:S.value==="nodeMgt",onUpdateLocales:re,onClose:$},null,8,["lf","show"]),B(Fnt,{lf:t.lf,show:S.value==="showAbout",onClose:$},null,8,["lf","show"]),J("div",lrt,[B(Te,{class:"box-item",effect:"dark",content:p(y)?"\u5173\u95ED\u6846\u9009":"\u6253\u5F00\u6846\u9009",placement:"bottom-start"},{default:z(()=>[B($e,{type:p(y)?"success":"",icon:Wnt,onClick:U,circle:""},null,8,["type"])]),_:1},8,["content"]),B(Te,{class:"box-item",effect:"dark",content:"\u64A4\u9500",placement:"bottom-start"},{default:z(()=>[B($e,{icon:rrt,onClick:ge[0]||(ge[0]=Ie=>t.lf.undo()),disabled:!w.value,circle:""},null,8,["disabled"])]),_:1}),B(Te,{class:"box-item",effect:"dark",content:"\u91CD\u505A",placement:"bottom-start"},{default:z(()=>[B($e,{icon:Gnt,onClick:ge[1]||(ge[1]=Ie=>t.lf.redo()),disabled:!b.value,circle:""},null,8,["disabled"])]),_:1}),B(Te,{class:"box-item",effect:"dark",content:"\u5C0F\u5730\u56FE",placement:"bottom-start"},{default:z(()=>[B($e,{icon:p(pCe),onClick:Q,circle:""},null,8,["icon"])]),_:1}),B(Te,{effect:"dark",content:A.value?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F",placement:"bottom-start"},{default:z(()=>[B($e,{icon:A.value?p(Lx):p(zm),onClick:W,circle:""},null,8,["icon"])]),_:1},8,["content"])])],64)}}};var crt=Pl(urt,[["__scopeId","data-v-309ebd4f"]]);class fJ{constructor({lf:e}){this.app=px(crt,{lf:e})}render(e,n){const r=document.createElement("div");n.appendChild(r),this.app.mount(r)}}JE(fJ,"pluginName","ControlExtension");const drt={style:{flex:"auto","text-align":"left"}},frt={__name:"EdgePropertyDrawer",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:i,relationTypeSplit:o,sourceNodeRelationTypeOptions:a}=t,s=F(),l=Sn({relationTypeOptions:[],relationTypeValues:[]});let u=r;l.relationTypeOptions=a||i&&i.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=i&&i.relationTypeAllowCreate;const c=h=>{!h||h.validate(m=>{if(m)i.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Xn.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Bn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,m)=>{const g=ho,y=fo,b=Yc,w=Ol,O=Tl,S=El,x=lr,C=K$;return R(),we(C,{modal:!1,"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,direction:"rtl",size:"580px","modal-class":"right-drawer-modal","before-close":f,modelValue:t.show},{header:z(()=>[B(y,{class:"setter-title"},{default:z(()=>[B(g,{span:12},{default:z(()=>[qe("\u89C4\u5219\u8282\u70B9\u94FE\u63A5\u8BE6\u60C5")]),_:1})]),_:1})]),footer:z(()=>[J("div",drt,[B(x,{type:"primary",size:"large",onClick:m[1]||(m[1]=E=>c(s.value))},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(x,{size:"large",onClick:d},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(S,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:z(()=>[B(O,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:z(()=>[B(w,{modelValue:l.relationTypeValues,"onUpdate:modelValue":m[0]||(m[0]=E=>l.relationTypeValues=E),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:z(()=>[(R(!0),G(ct,null,Wt(l.relationTypeOptions,E=>(R(),we(b,{key:E.value!==void 0&&E.value!==null?E.value:E,label:E.label||E,value:E.value!==void 0&&E.value!==null?E.value:E},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},hrt={style:{flex:"auto"}},prt={__name:"EdgePropertyDialog",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:i,relationTypeSplit:o,sourceNodeRelationTypeOptions:a}=t,s=F(),l=Sn({relationTypeAllowCreate:!1,relationTypeOptions:[],relationTypeValues:[]});let u=r;if(l.relationTypeOptions=a||i&&i.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=i&&i.relationTypeAllowCreate,!l.relationTypeValues){let h=l.relationTypeOptions&&l.relationTypeOptions.length>0?l.relationTypeOptions[0]:null;h?i.nodeType==="endpoint-node"?l.relationTypeValues=h.value!==void 0&&h.value!==null?h.value:h:l.relationTypeValues=[h.value!==void 0&&h.value!==null?h.value:h]:l.relationTypeValues=[]}const c=h=>{!h||h.validate(m=>{if(m)i.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Xn.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Bn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,m)=>{const g=Yc,y=Ol,b=Tl,w=El,O=lr,S=Ma;return R(),we(S,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"50%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{header:z(()=>[qe(" \u6DFB\u52A0\u94FE\u63A5 ")]),footer:z(()=>[J("div",hrt,[B(O,{type:"primary",size:"large",onClick:m[1]||(m[1]=x=>c(s.value))},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:d},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(w,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:z(()=>[B(b,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:z(()=>[B(y,{modelValue:l.relationTypeValues,"onUpdate:modelValue":m[0]||(m[0]=x=>l.relationTypeValues=x),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:z(()=>[(R(!0),G(ct,null,Wt(l.relationTypeOptions,x=>(R(),we(g,{key:x.value!==void 0&&x.value!==null?x.value:x,label:x.label||x,value:x.value!==void 0&&x.value!==null?x.value:x},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},grt=312,mrt=313,Aj=1,vrt=2,yrt=3,brt=4,_rt=314,Ort=316,wrt=317,Srt=5,xrt=6,Crt=0,_M=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],hJ=125,Ert=59,OM=47,Trt=42,krt=43,Prt=45,Art=60,Mrt=44,Rrt=63,$rt=46,Nrt=91,Drt=new Ket({start:!1,shift(t,e){return e==Srt||e==xrt||e==Ort?t:e==wrt},strict:!1}),Lrt=new Jb((t,e)=>{let{next:n}=t;(n==hJ||n==-1||e.context)&&t.acceptToken(_rt)},{contextual:!0,fallback:!0}),Irt=new Jb((t,e)=>{let{next:n}=t,r;_M.indexOf(n)>-1||n==OM&&((r=t.peek(1))==OM||r==Trt)||n!=hJ&&n!=Ert&&n!=-1&&!e.context&&t.acceptToken(grt)},{contextual:!0}),Brt=new Jb((t,e)=>{t.next==Nrt&&!e.context&&t.acceptToken(mrt)},{contextual:!0}),Frt=new Jb((t,e)=>{let{next:n}=t;if(n==krt||n==Prt){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(Aj);t.acceptToken(r?Aj:vrt)}}else n==Rrt&&t.peek(1)==$rt&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(yrt))},{contextual:!0});function B2(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Vrt=new Jb((t,e)=>{if(t.next!=Art||!e.dialectEnabled(Crt)||(t.advance(),t.next==OM))return;let n=0;for(;_M.indexOf(t.next)>-1;)t.advance(),n++;if(B2(t.next,!0)){for(t.advance(),n++;B2(t.next,!1);)t.advance(),n++;for(;_M.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Mrt)return;for(let r=0;;r++){if(r==7){if(!B2(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(brt,-n)}),jrt=yD({"get set async static":Je.modifier,"for while do if else switch try catch finally return throw break continue default case":Je.controlKeyword,"in of await yield void typeof delete instanceof":Je.operatorKeyword,"let var const using function class extends":Je.definitionKeyword,"import export from":Je.moduleKeyword,"with debugger as new":Je.keyword,TemplateString:Je.special(Je.string),super:Je.atom,BooleanLiteral:Je.bool,this:Je.self,null:Je.null,Star:Je.modifier,VariableName:Je.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Je.function(Je.variableName),VariableDefinition:Je.definition(Je.variableName),Label:Je.labelName,PropertyName:Je.propertyName,PrivatePropertyName:Je.special(Je.propertyName),"CallExpression/MemberExpression/PropertyName":Je.function(Je.propertyName),"FunctionDeclaration/VariableDefinition":Je.function(Je.definition(Je.variableName)),"ClassDeclaration/VariableDefinition":Je.definition(Je.className),PropertyDefinition:Je.definition(Je.propertyName),PrivatePropertyDefinition:Je.definition(Je.special(Je.propertyName)),UpdateOp:Je.updateOperator,"LineComment Hashbang":Je.lineComment,BlockComment:Je.blockComment,Number:Je.number,String:Je.string,Escape:Je.escape,ArithOp:Je.arithmeticOperator,LogicOp:Je.logicOperator,BitOp:Je.bitwiseOperator,CompareOp:Je.compareOperator,RegExp:Je.regexp,Equals:Je.definitionOperator,Arrow:Je.function(Je.punctuation),": Spread":Je.punctuation,"( )":Je.paren,"[ ]":Je.squareBracket,"{ }":Je.brace,"InterpolationStart InterpolationEnd":Je.special(Je.brace),".":Je.derefOperator,", ;":Je.separator,"@":Je.meta,TypeName:Je.typeName,TypeDefinition:Je.definition(Je.typeName),"type enum interface implements namespace module declare":Je.definitionKeyword,"abstract global Privacy readonly override":Je.modifier,"is keyof unique infer":Je.operatorKeyword,JSXAttributeValue:Je.attributeValue,JSXText:Je.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Je.angleBracket,"JSXIdentifier JSXNameSpacedName":Je.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Je.attributeName,"JSXBuiltin/JSXIdentifier":Je.standard(Je.tagName)}),zrt={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Qrt={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Hrt={__proto__:null,"<":187},Wrt=ob.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOO<nQ`O'#HRO>VQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-E<f-E<fO9^Q`O,5=[O!$^Q`O,5=[O!$cQlO,5;WO!&fQMhO'#EhO!(PQ`O,5;WO!(UQlO'#DvO!(`QpO,5;aO!(hQpO,5;aO%[QlO,5;aOOQ['#FS'#FSOOQ['#FU'#FUO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bO%[QlO,5;bOOQ['#FY'#FYO!(vQlO,5;sOOQ!0Lf,5;x,5;xOOQ!0Lf,5;y,5;yOOQ!0Lf,5;{,5;{O%[QlO'#IlO!*yQ!0LrO,5<gO%[QlO,5;bO!&fQMhO,5;bO!+hQMhO,5;bO!-YQMhO'#EZO%[QlO,5;vOOQ!0Lf,5;z,5;zO!-aQ,UO'#FiO!.^Q,UO'#KTO!-xQ,UO'#KTO!.eQ,UO'#KTOOQO'#KT'#KTO!.yQ,UO,5<ROOOW,5<_,5<_O!/[QlO'#FuOOOW'#Ik'#IkO7VO7dO,5<PO!/cQ,UO'#FwOOQ!0Lf,5<P,5<PO!0SQ$IUO'#CvOOQ!0Lh'#Cz'#CzO!0gO#@ItO'#DOO!1TQMjO,5<dO!1[Q`O,5<fO!2wQ(CWO'#GVO!3UQ`O'#GWO!3ZQ`O'#GWO!4yQ(CWO'#G[O!6OQpO'#G`OOQO'#Gk'#GkO!+oQMhO'#GjOOQO'#Gm'#GmO!+oQMhO'#GlO!6qQ$IUO'#JhOOQ!0Lh'#Jh'#JhO!6{Q`O'#JgO!7ZQ`O'#JfO!7cQ`O'#CuOOQ!0Lh'#Cx'#CxO!7kQ`O'#CzOOQ!0Lh'#DS'#DSOOQ!0Lh'#DU'#DUO1SQ`O'#DWO!+oQMhO'#F}O!+oQMhO'#GPO!7pQ`O'#GRO!7uQ`O'#GSO!3ZQ`O'#GYO!+oQMhO'#G_O!7zQ`O'#EnO!8iQ`O,5<eOOQ!0Lb'#Cr'#CrO!8qQ`O'#EoO!9kQpO'#EpOOQ!0Lb'#J}'#J}O!9rQ!0LrO'#K^O9hQ!0LrO,5=`O`QlO,5>pOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E<X-E<XO!;qQ!0MxO,5:_O!9fQpO,5:]O!>[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5<OO!ChQ`O,5=wO!CmQ`O,5=wO!CrQ`O,5=wO9hQ!0LrO,5=wO;wQ`O,5=gOOQO'#Cv'#CvO!DQQpO,5=dO!DYQMhO,5=eO!DeQ`O,5=gO!DjQ!bO,5=jO!DrQ`O'#K]O>tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-E<b-E<bO#(mQ!0MSO,5;OOCrQpO,5:oO#(wQpO,5:oOCrQpO,5;OO!BSQ!0LrO,5:oOOQ!0Lb'#Eg'#EgOOQO,5;O,5;OO%[QlO,5;OO#)UQ!0LrO,5;OO#)aQ!0LrO,5;OO!B_QpO,5:oOOQO,5;U,5;UO#)oQ!0LrO,5;OPOOO'#IY'#IYP#*TO&2DjO,58|POOO,58|,58|OOOO-E<Y-E<YOOQ!0Lh1G.p1G.pOOOO-E<Z-E<ZOOOO,59z,59zO#*`Q!bO,59zOOOO-E<]-E<]OOQ!0Lf1G/d1G/dO#*eQ!fO,5>zO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-E<d-E<dO#+]Q`O,5@jOOQ!0Lb1G0u1G0uOOQ!0Ln1G/u1G/uOOQ!0Ln1G0V1G0VO%[QlO,5@hO#+yQ!0LrO,5@hO#,[Q!0LrO,5@hO#,cQ`O,5@gO9WQ`O,5@gO#,kQ`O,5@gO#,yQ`O'#IiO#,cQ`O,5@gOOQ!0Lb1G0t1G0tO!(`QpO,5:rO!(kQpO,5:rOOQS,5:t,5:tO#-kQdO,5:tO#-sQMhO1G2vO9^Q`O1G2vOOQ!0Lf1G0r1G0rO#.RQ!0MxO1G0rO#/WQ!0MvO,5;SOOQ!0Lh'#GU'#GUO#/tQ!0MzO'#JhO!$cQlO1G0rO#2PQ!fO'#JsO%[QlO'#JsO#2ZQ`O,5:bOOQ!0Lh'#D['#D[OOQ!0Lf1G0{1G0{O%[QlO1G0{OOQ!0Lf1G1e1G1eO#2`Q`O1G0{O#4tQ!0MxO1G0|O#4{Q!0MxO1G0|O#7cQ!0MxO1G0|O#7jQ!0MxO1G0|O#:QQ!0MxO1G0|O#<hQ!0MxO1G0|O#<oQ!0MxO1G0|O#<vQ!0MxO1G0|O#?^Q!0MxO1G0|O#?eQ!0MxO1G0|O#ArQ?MtO'#CiO#CmQ?MtO1G1_O#CtQ?MtO'#JoO#DXQ!0MxO,5?WOOQ!0Lb-E<j-E<jO#FfQ!0MxO1G0|O#GcQ!0MzO1G0|OOQ!0Lf1G0|1G0|O#HfQMjO'#JxO#HpQ`O,5:uO#HuQ!0MxO1G1bO#IiQ,UO,5<VO#IqQ,UO,5<WO#IyQ,UO'#FnO#JbQ`O'#FmOOQO'#KU'#KUOOQO'#Ij'#IjO#JgQ,UO1G1mOOQ!0Lf1G1m1G1mOOOW1G1x1G1xO#JxQ?MtO'#JnO#KSQ`O,5<aO!(vQlO,5<aOOOW-E<i-E<iOOQ!0Lf1G1k1G1kO#KXQpO'#KTOOQ!0Lf,5<c,5<cO#KaQpO,5<cO#KfQMhO'#DQOOOO'#I^'#I^O#KmO#@ItO,59jOOQ!0Lh,59j,59jO%[QlO1G2OO!7uQ`O'#InO#KxQ`O,5<xOOQ!0Lh,5<u,5<uO!+oQMhO'#IqO#LfQMjO,5=UO!+oQMhO'#IsO#MXQMjO,5=WO!&fQMhO,5=YOOQO1G2Q1G2QO#McQ!dO'#CrO#MvQ(CWO'#EoO#N{QpO'#G`O$ cQ!dO,5<qO$ jQ`O'#KXO9WQ`O'#KXO$ xQ`O,5<sO!+oQMhO,5<rO$ }Q`O'#GXO$!`Q`O,5<rO$!eQ!dO'#GUO$!rQ!dO'#KYO$!|Q`O'#KYO!&fQMhO'#KYO$#RQ`O,5<vO$#WQlO'#JrO$#bQpO'#GaO##bQpO'#GaO$#sQ`O'#GeO!3ZQ`O'#GhO$#xQ!0LrO'#IpO$$TQpO,5<zOOQ!0Lp,5<z,5<zO$$[QpO'#GaO$$iQpO'#GbO$$zQpO'#GbO$%PQMjO,5=UO$%aQMjO,5=WOOQ!0Lh,5=Z,5=ZO!+oQMhO,5@RO!+oQMhO,5@RO$%qQ`O'#IuO$%|Q`O,5@QO$&UQ`O,59aOOQ!0Lh,59f,59fO$&{Q$IYO,59rOOQ!0Lh'#Jl'#JlO$'nQMjO,5<iO$(aQMjO,5<kO@fQ`O,5<mOOQ!0Lh,5<n,5<nO$(kQ`O,5<tO$(pQMjO,5<yO$)QQ`O'#J{O!$cQlO1G2PO$)VQ`O1G2PO9WQ`O'#KOO9WQ`O'#EqO%[QlO'#EqO9WQ`O'#IwO$)[Q!0LrO,5@xOOQ[1G2z1G2zOOQ[1G4[1G4[OOQ!0Lf1G/y1G/yOOQ!0Lf1G/w1G/wO$+^Q!0MxO1G0ROOQ[1G2v1G2vO!&fQMhO1G2vO%[QlO1G2vO#-vQ`O1G2vO$-bQMhO'#EhOOQ!0Lb,5@P,5@PO$-lQ!0LrO,5@POOQ[1G.u1G.uO!BSQ!0LrO1G.uO!B_QpO1G.uO!BgQMhO1G.uO$-}Q`O1G0rO$.SQ`O'#CiO$._Q`O'#KbO$.gQ`O,5=xO$.lQ`O'#KbO$.qQ`O'#KbO$/PQ`O'#I}O$/_Q`O,5@{O$/gQ!fO1G1hOOQ!0Lf1G1j1G1jO9^Q`O1G3cO@fQ`O1G3cO$/nQ`O1G3cO$/sQ`O1G3cOOQ[1G3c1G3cO!DeQ`O1G3RO!&fQMhO1G3OO$/xQ`O1G3OOOQ[1G3P1G3PO!&fQMhO1G3PO$/}Q`O1G3PO$0VQpO'#G}OOQ[1G3R1G3RO!5yQpO'#IyO!DjQ!bO1G3UOOQ[1G3U1G3UOOQ[,5=o,5=oO$0_QMhO,5=qO9^Q`O,5=qO$#sQ`O,5=sO9RQ`O,5=sO!B_QpO,5=sO!BgQMhO,5=sO:VQMhO,5=sO$0mQ`O'#K`O$0xQ`O,5=tOOQ[1G.k1G.kO$0}Q!0LrO1G.kO@fQ`O1G.kO$1YQ`O1G.kO9hQ!0LrO1G.kO$3bQ!fO,5@}O$3oQ`O,5@}O9WQ`O,5@}O$3zQlO,5={O$4RQ`O,5={OOQ[1G3e1G3eO`QlO1G3eOOQ[1G3k1G3kOOQ[1G3m1G3mO>oQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$<xQ`O,5@^O!(vQlO,5;]O9WQ`O,5;]O>tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-E<W-E<WPOOO1G.h1G.hOOOO1G/f1G/fO$?kQ!bO,5<gO$?sQ!fO1G4fOOQO1G4l1G4lO%[QlO,5>zO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E<g-E<gOOQS1G0^1G0^OOQS1G0`1G0`O#-nQ`O1G0`OOQ[7+(b7+(bO!&fQMhO7+(bO%[QlO7+(bO$BWQ`O7+(bO$BcQMhO7+(bO$BqQ!0MzO,5=UO$D|Q!0MzO,5=WO$GXQ!0MzO,5=UO$IjQ!0MzO,5=WO$K{Q!0MzO,59rO$NQQ!0MzO,5<iO%!]Q!0MzO,5<kO%$hQ!0MzO,5<yOOQ!0Lf7+&^7+&^O%&yQ!0MxO7+&^O%'mQlO'#IbO%'zQ`O,5@_O%(SQ!fO,5@_OOQ!0Lf1G/|1G/|O%(^Q`O7+&gOOQ!0Lf7+&g7+&gO%(cQ?MtO,5:cO%[QlO7+&yO%(mQ?MtO,5:_O%(zQ?MtO,5:gO%)UQ?MtO,5:iO%)`QMhO'#IeO%)jQ`O,5@dOOQ!0Lh1G0a1G0aOOQO1G1q1G1qOOQO1G1r1G1rO%)rQ!jO,5<YO!(vQlO,5<XOOQO-E<h-E<hOOQ!0Lf7+'X7+'XOOOW7+'d7+'dOOOW1G1{1G1{O%)}Q`O1G1{OOQ!0Lf1G1}1G1}OOOO,59l,59lO%*SQ!dO,59lOOOO-E<[-E<[OOQ!0Lh1G/U1G/UO%*ZQ!0MxO7+'jOOQ!0Lh,5?Y,5?YO%*}QMhO1G2dP%+UQ`O'#InPOQ!0Lh-E<l-E<lO%+rQMjO,5?]OOQ!0Lh-E<o-E<oO%,eQMjO,5?_OOQ!0Lh-E<q-E<qO%,oQ!dO1G2tO%,vQ!dO'#CrO%-^QMhO'#KOO$#WQlO'#JrOOQ!0Lh1G2]1G2]O%-eQ`O'#ImO%-yQ`O,5@sO%-yQ`O,5@sO%.RQ`O,5@sO%.^Q`O,5@sOOQO1G2_1G2_O%.lQMjO1G2^O!+oQMhO1G2^O%.|Q(CWO'#IoO%/ZQ`O,5@tO!&fQMhO,5@tO%/cQ!dO,5@tOOQ!0Lh1G2b1G2bO%1sQ!fO'#CiO%1}Q`O,5<}OOQ!0Lb,5<{,5<{O%2VQpO,5<{OOQ!0Lb,5<|,5<|OCcQ`O,5<{O%2bQpO,5<{OOQ!0Lb,5=P,5=PO$)QQ`O,5=SOOQO,5?[,5?[OOQO-E<n-E<nOOQ!0Lp1G2f1G2fO##bQpO,5<{O$#WQlO,5<}O%2pQ`O,5<|O%2{QpO,5<|O!+oQMhO'#IqO%3uQMjO1G2pO!+oQMhO'#IsO%4hQMjO1G2rO%4rQMjO1G5mO%4|QMjO1G5mOOQO,5?a,5?aOOQO-E<s-E<sOOQO1G.{1G.{O!9fQpO,59tO%[QlO,59tOOQ!0Lh,5<h,5<hO%5ZQ`O1G2XO!+oQMhO1G2`O%5`Q!0MxO7+'kOOQ!0Lf7+'k7+'kO!$cQlO7+'kO%6SQ`O,5;]OOQ!0Lb,5?c,5?cOOQ!0Lb-E<u-E<uO%6XQ!dO'#KZO#']Q`O7+(bO4UQ!fO7+(bO$BZQ`O7+(bO%6cQ!0MvO'#CiO%6vQ!0MvO,5=QO%7hQ`O,5=QOOQ!0Lb1G5k1G5kOOQ[7+$a7+$aO!BSQ!0LrO7+$aO!B_QpO7+$aO!$cQlO7+&^O%7mQ`O'#I|O%8UQ`O,5@|OOQO1G3d1G3dO9^Q`O,5@|O%8UQ`O,5@|O%8^Q`O,5@|OOQO,5?i,5?iOOQO-E<{-E<{OOQ!0Lf7+'S7+'SO%8cQ`O7+(}O9hQ!0LrO7+(}O9^Q`O7+(}O@fQ`O7+(}OOQ[7+(m7+(mO%8hQ!0MvO7+(jO!&fQMhO7+(jO!D`Q`O7+(kOOQ[7+(k7+(kO!&fQMhO7+(kO%8rQ`O'#K_O%8}Q`O,5=iOOQO,5?e,5?eOOQO-E<w-E<wOOQ[7+(p7+(pO%:aQpO'#HWOOQ[1G3]1G3]O!&fQMhO1G3]O%[QlO1G3]O%:hQ`O1G3]O%:sQMhO1G3]O9hQ!0LrO1G3_O$#sQ`O1G3_O9RQ`O1G3_O!B_QpO1G3_O!BgQMhO1G3_O%;RQ`O'#I{O%;gQ`O,5@zO%;oQpO,5@zOOQ!0Lb1G3`1G3`OOQ[7+$V7+$VO@fQ`O7+$VO9hQ!0LrO7+$VO%;zQ`O7+$VO%[QlO1G6iO%[QlO1G6jO%<PQ!0LrO1G6iO%<ZQlO1G3gO%<bQ`O1G3gO%<gQlO1G3gOOQ[7+)P7+)PO9hQ!0LrO7+)ZO`QlO7+)]OOQ['#Ke'#KeOOQ['#JO'#JOO%<nQlO,5>[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-E<e-E<eO!B_QpO1G/pOOQO-E<a-E<aOOQ!0Ln1G0Y1G0YOOQ!0Lf7+%r7+%rO#']Q`O7+%rOOQ!0Lf7+&]7+&]O>tQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<<K|O4UQ!fO<<K|O%?nQ`O<<K|OOQ[<<K|<<K|O!&fQMhO<<K|O%[QlO<<K|O%?vQ`O<<K|O%@RQ!0MzO,5?]O%B^Q!0MzO,5?_O%DiQ!0MzO1G2^O%FzQ!0MzO1G2pO%IVQ!0MzO1G2rO%KbQ!fO,5>|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<<JR<<JRO%KtQ?MtO1G0rO%M{Q?MtO1G0|O%NSQ?MtO1G0|O&!TQ?MtO1G0|O&![Q?MtO1G0|O&$]Q?MtO1G0|O&&^Q?MtO1G0|O&&eQ?MtO1G0|O&&lQ?MtO1G0|O&(mQ?MtO1G0|O&(tQ?MtO1G0|O&({Q!0MxO<<JeO&*sQ?MtO1G0|O&+pQ?MvO1G0|O&,sQ?MvO'#JhO&.yQ?MtO1G1bO&/WQ?MtO1G0RO&/bQMjO,5?POOQO-E<c-E<cO!(vQlO'#FpOOQO'#KV'#KVOOQO1G1t1G1tO&/lQ`O1G1sO&/qQ?MtO,5?WOOOW7+'g7+'gOOOO1G/W1G/WO&/{Q!dO1G4tOOQ!0Lh7+(O7+(OP!&fQMhO,5?YO!+oQMhO7+(`O&0SQ`O,5?XO9WQ`O,5?XOOQO-E<k-E<kO&0bQ`O1G6_O&0bQ`O1G6_O&0jQ`O1G6_O&0uQMjO7+'xO&1VQ!dO,5?ZO&1aQ`O,5?ZO!&fQMhO,5?ZOOQO-E<m-E<mO&1fQ!dO1G6`O&1pQ`O1G6`O&1xQ`O1G2iO!&fQMhO1G2iOOQ!0Lb1G2g1G2gOOQ!0Lb1G2h1G2hO%2VQpO1G2gO!B_QpO1G2gOCcQ`O1G2gOOQ!0Lb1G2n1G2nO&1}QpO1G2gO&2]Q`O1G2iO$)QQ`O1G2hOCcQ`O1G2hO$#WQlO1G2iO&2eQ`O1G2hO&3XQMjO,5?]OOQ!0Lh-E<p-E<pO&3zQMjO,5?_OOQ!0Lh-E<r-E<rO!+oQMhO7++XOOQ!0Lh1G/`1G/`O&4UQ`O1G/`OOQ!0Lh7+'s7+'sO&4ZQMjO7+'zO&4kQ!0MxO<<KVOOQ!0Lf<<KV<<KVO&5_Q`O1G0wO!&fQMhO'#IvO&5dQ`O,5@uO&7fQ!fO<<K|O!&fQMhO1G2lOOQ[<<G{<<G{O!BSQ!0LrO<<G{O&7mQ!0MxO<<IxOOQ!0Lf<<Ix<<IxOOQO,5?h,5?hO&8aQ`O,5?hO&8fQ`O,5?hOOQO-E<z-E<zO&8tQ`O1G6hO&8tQ`O1G6hO9^Q`O1G6hO@fQ`O<<LiOOQ[<<Li<<LiO&8|Q`O<<LiO9hQ!0LrO<<LiOOQ[<<LU<<LUO%8hQ!0MvO<<LUOOQ[<<LV<<LVO!D`Q`O<<LVO&9RQpO'#IxO&9^Q`O,5@yO!(vQlO,5@yOOQ[1G3T1G3TOOQO'#Iz'#IzO9hQ!0LrO'#IzO&9fQpO,5=rOOQ[,5=r,5=rO&9mQpO'#EdO&9tQpO'#GcO&9yQ`O7+(wO&:OQ`O7+(wOOQ[7+(w7+(wO!&fQMhO7+(wO%[QlO7+(wO&:WQ`O7+(wOOQ[7+(y7+(yO9hQ!0LrO7+(yO$#sQ`O7+(yO9RQ`O7+(yO!B_QpO7+(yO&:cQ`O,5?gOOQO-E<y-E<yOOQO'#HZ'#HZO&:nQ`O1G6fO9hQ!0LrO<<GqOOQ[<<Gq<<GqO@fQ`O<<GqO&:vQ`O7+,TO&:{Q`O7+,UO%[QlO7+,TO%[QlO7+,UOOQ[7+)R7+)RO&;QQ`O7+)RO&;VQlO7+)RO&;^Q`O7+)ROOQ[<<Lu<<LuOOQ[<<Lw<<LwOOQ[-E<|-E<|OOQ[1G3v1G3vO&;cQ`O,5>]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<<I^<<I^OOQ!0Lf<<Iw<<IwO>tQ`O<<IwOOQO<<Ip<<IpO$?aQ!0MxO<<IpO%[QlO<<IpOOQO<<Ia<<IaO!BSQ!0LrO<<IaO&;wQ!0LrO<<IpO&<SQ!0MxO<= YO&<dQ`O<= XOOQO7+*Z7+*ZO9WQ`O7+*ZOOQ[ANAhANAhO&<lQ!fOANAhO!&fQMhOANAhO#']Q`OANAhO4UQ!fOANAhO&<sQ`OANAhO%[QlOANAhO&<{Q!0MzO7+'xO&?^Q!0MzO,5?]O&AiQ!0MzO,5?_O&CtQ!0MzO7+'zO&FVQ!fO1G4hO&FaQ?MtO7+&^O&HeQ?MvO,5=UO&JlQ?MvO,5=WO&J|Q?MvO,5=UO&K^Q?MvO,5=WO&KnQ?MvO,59rO&MtQ?MvO,5<iO' wQ?MvO,5<kO'$]Q?MvO,5<yO'&RQ?MtO7+'jO'&`Q?MtO7+'kO'&mQ`O,5<[OOQO7+'_7+'_OOQ!0Lh7+*`7+*`O'&rQMjO<<KzOOQO1G4s1G4sO'&yQ`O1G4sO''UQ`O1G4sO''dQ`O7++yO''dQ`O7++yO!&fQMhO1G4uO''lQ!dO1G4uO''vQ`O7++zO'(OQ`O7+(TO'(ZQ!dO7+(TOOQ!0Lb7+(R7+(ROOQ!0Lb7+(S7+(SO!B_QpO7+(ROCcQ`O7+(RO'(eQ`O7+(TO!&fQMhO7+(TO$)QQ`O7+(SO'(jQ`O7+(TOCcQ`O7+(SO'(rQMjO<<NsOOQ!0Lh7+$z7+$zO'(|Q!dO,5?bOOQO-E<t-E<tO')WQ!0MvO7+(WOOQ[AN=gAN=gO9^Q`O1G5SOOQO1G5S1G5SO')hQ`O1G5SO')mQ`O7+,SO')mQ`O7+,SO9hQ!0LrOANBTO@fQ`OANBTOOQ[ANBTANBTOOQ[ANApANApOOQ[ANAqANAqO')uQ`O,5?dOOQO-E<v-E<vO'*QQ?MtO1G6eOOQO,5?f,5?fOOQO-E<x-E<xOOQ[1G3^1G3^O'*[Q`O,5<}OOQ[<<Lc<<LcO!&fQMhO<<LcO&9yQ`O<<LcO'*aQ`O<<LcO%[QlO<<LcOOQ[<<Le<<LeO9hQ!0LrO<<LeO$#sQ`O<<LeO9RQ`O<<LeO'*iQpO1G5RO'*tQ`O7+,QOOQ[AN=]AN=]O9hQ!0LrOAN=]OOQ[<= o<= oOOQ[<= p<= pO'*|Q`O<= oO'+RQ`O<= pOOQ[<<Lm<<LmO'+WQ`O<<LmO'+]QlO<<LmOOQ[1G3w1G3wO>tQ`O7+)hO'+dQ`O<<I}O'+oQ?MtO<<I}OOQO<<Hv<<HvOOQ!0LfAN?cAN?cOOQOAN?[AN?[O$?aQ!0MxOAN?[OOQOAN>{AN>{O%[QlOAN?[OOQO<<Mu<<MuOOQ[G27SG27SO!&fQMhOG27SO#']Q`OG27SO'+yQ!fOG27SO4UQ!fOG27SO',QQ`OG27SO',YQ?MtO<<JeO',gQ?MvO1G2^O'.]Q?MvO,5?]O'0`Q?MvO,5?_O'2cQ?MvO1G2pO'4fQ?MvO1G2rO'6iQ?MtO<<KVO'6vQ?MtO<<IxOOQO1G1v1G1vO!+oQMhOANAfOOQO7+*_7+*_O'7TQ`O7+*_O'7`Q`O<= eO'7hQ!dO7+*aOOQ!0Lb<<Ko<<KoO$)QQ`O<<KoOCcQ`O<<KoO'7rQ`O<<KoO!&fQMhO<<KoOOQ!0Lb<<Km<<KmO!B_QpO<<KmO'7}Q!dO<<KoOOQ!0Lb<<Kn<<KnO'8XQ`O<<KoO!&fQMhO<<KoO$)QQ`O<<KnOOQO7+*n7+*nO9^Q`O7+*nO'8^Q`O<= nOOQ[G27oG27oO9hQ!0LrOG27oO!(vQlO1G5OO'8fQ`O7+,PO'8nQ`O1G2iO&9yQ`OANA}OOQ[ANA}ANA}O!&fQMhOANA}O'8sQ`OANA}OOQ[ANBPANBPO9hQ!0LrOANBPO$#sQ`OANBPOOQO'#H['#H[OOQO7+*m7+*mOOQ[G22wG22wOOQ[ANEZANEZOOQ[ANE[ANE[OOQ[ANBXANBXO'8{Q`OANBXOOQ[<<MS<<MSO!(vQlOAN?iOOQOG24vG24vO$?aQ!0MxOG24vO#']Q`OLD,nOOQ[LD,nLD,nO!&fQMhOLD,nO'9QQ!fOLD,nO'9XQ?MvO7+'xO':}Q?MvO,5?]O'=QQ?MvO,5?_O'?TQ?MvO7+'zO'@yQMjOG27QOOQO<<My<<MyOOQ!0LbANAZANAZO$)QQ`OANAZOCcQ`OANAZO'AZQ!dOANAZOOQ!0LbANAXANAXO'AbQ`OANAZO!&fQMhOANAZO'AmQ!dOANAZOOQ!0LbANAYANAYOOQO<<NY<<NYOOQ[LD-ZLD-ZO'AwQ?MtO7+*jOOQO'#Gd'#GdOOQ[G27iG27iO&9yQ`OG27iO!&fQMhOG27iOOQ[G27kG27kO9hQ!0LrOG27kOOQ[G27sG27sO'BRQ?MtOG25TOOQOLD*bLD*bOOQ[!$(!Y!$(!YO#']Q`O!$(!YO!&fQMhO!$(!YO'B]Q!0MzOG27QOOQ!0LbG26uG26uO$)QQ`OG26uO'DnQ`OG26uOCcQ`OG26uO'DyQ!dOG26uO!&fQMhOG26uOOQ[LD-TLD-TO&9yQ`OLD-TOOQ[LD-VLD-VOOQ[!)9Et!)9EtO#']Q`O!)9EtOOQ!0LbLD,aLD,aO$)QQ`OLD,aOCcQ`OLD,aO'EQQ`OLD,aO'E]Q!dOLD,aOOQ[!$(!o!$(!oOOQ[!.K;`!.K;`O'EdQ?MvOG27QOOQ!0Lb!$( {!$( {O$)QQ`O!$( {OCcQ`O!$( {O'GYQ`O!$( {OOQ!0Lb!)9Eg!)9EgO$)QQ`O!)9EgOCcQ`O!)9EgOOQ!0Lb!.K;R!.K;RO$)QQ`O!.K;ROOQ!0Lb!4/0m!4/0mO!(vQlO'#DwO1PQ`O'#EUO'GeQ!fO'#JnO'GlQ!L^O'#DsO'GsQlO'#D{O'GzQ!fO'#CiO'JbQ!fO'#CiO!(vQlO'#D}O'JrQlO,5;WO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO,5;bO!(vQlO'#IlO'LuQ`O,5<gO!(vQlO,5;bO'L}QMhO,5;bO'NhQMhO,5;bO!(vQlO,5;vO!&fQMhO'#GjO'L}QMhO'#GjO!&fQMhO'#GlO'L}QMhO'#GlO1SQ`O'#DWO1SQ`O'#DWO!&fQMhO'#F}O'L}QMhO'#F}O!&fQMhO'#GPO'L}QMhO'#GPO!&fQMhO'#G_O'L}QMhO'#G_O!(vQlO,5:gO'NoQpO'#D[O'NyQpO'#JrO!(vQlO,5@kO'JrQlO1G0rO( TQ?MtO'#CiO!(vQlO1G2OO!&fQMhO'#IqO'L}QMhO'#IqO!&fQMhO'#IsO'L}QMhO'#IsO( _Q!dO'#CrO!&fQMhO,5<rO'L}QMhO,5<rO'JrQlO1G2PO!(vQlO7+&yO!&fQMhO1G2^O'L}QMhO1G2^O!&fQMhO'#IqO'L}QMhO'#IqO!&fQMhO'#IsO'L}QMhO'#IsO!&fQMhO1G2`O'L}QMhO1G2`O'JrQlO7+'kO'JrQlO7+&^O!&fQMhOANAfO'L}QMhOANAfO( rQ`O'#ElO( wQ`O'#ElO(!PQ`O'#F[O(!UQ`O'#EvO(!ZQ`O'#KPO(!fQ`O'#J}O(!qQ`O,5;WO(!vQMjO,5<dO(!}Q`O'#GWO(#SQ`O'#GWO(#XQ`O,5<eO(#aQ`O,5;WO(#iQ?MtO1G1_O(#pQ`O,5<rO(#uQ`O,5<rO(#zQ`O,5<tO($PQ`O,5<tO($UQ`O1G2PO($ZQ`O1G0rO($`QMjO<<KzO($gQMjO<<KzO7eQMhO'#FzO9RQ`O'#FyOAaQ`O'#EkO!(vQlO,5;sO!3ZQ`O'#GWO!3ZQ`O'#GWO!3ZQ`O'#GYO!3ZQ`O'#GYO!+oQMhO7+(`O!+oQMhO7+(`O%,oQ!dO1G2tO%,oQ!dO1G2tO!&fQMhO,5=YO!&fQMhO,5=Y",stateData:"(%k~O'xOS'yOSTOS'zRQ~OPYOQYOSfOY!VOaqOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!rwO!uxO!y]O#t!PO$V|O%e}O%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO&S!WO&Y!XO&[!YO&^!ZO&`![O&c!]O&i!^O&o!_O&q!`O&s!aO&u!bO&w!cO(PSO(RTO(UUO(]VO(k[O(ziO~OWtO~P`OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa!wOp!nO!P!oO!_!yO!`!vO!a!vO!y;kO#Q!pO#R!pO#S!xO#T!pO#U!pO#X!zO#Y!zO(Q!lO(RTO(UUO(a!mO(k!sO~O'z!{O~OP]XR]X[]Xa]Xo]X}]X!P]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X'v]X(]]X(n]X(u]X(v]X~O!d%PX~P(qO_!}O(R#PO(S!}O(T#PO~O_#QO(T#PO(U#PO(V#QO~Ou#SO!R#TO(^#TO(_#VO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(P;oO(RTO(UUO(]VO(k[O(ziO~O!X#ZO!Y#WO!V(dP!V(rP~P+}O!Z#cO~P`OPYOQYOSfOd!jOe!iOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(RTO(UUO(]VO(k[O(ziO~Om#mO!X#iO!y]O#f#lO#g#iO(P;pO!h(oP~P.iO!i#oO(P#nO~O!u#sO!y]O%e#tO~O#h#uO~O!d#vO#h#uO~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y$_O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO(]VO(n$YO(u#|O(v#}O~Oa(bX'v(bX's(bX!h(bX!V(bX![(bX%f(bX!d(bX~P1qO#P$dO#]$eO$P$eOP(cXR(cX[(cXo(cX}(cX!P(cX!Y(cX!i(cX!m(cX#O(cX#k(cX#l(cX#m(cX#n(cX#o(cX#p(cX#q(cX#r(cX#s(cX#u(cX#w(cX#y(cX#z(cX(](cX(n(cX(u(cX(v(cX![(cX%f(cX~Oa(cX'v(cX's(cX!V(cX!h(cXs(cX!d(cX~P4UO#]$eO~O$[$hO$^$gO$e$mO~OSfO![$nO$h$oO$j$qO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(P$sO(RTO(UUO(]$uO(u$}O(v%POg(YP~O!i%cO~O!P%fO![%gO(P%eO~O!d%kO~Oa%lO'v%lO~O}%pO~P%[O(Q!lO~P%[O%k%tO~P%[Oh%VO!i%cO(P%eO(Q!lO~Oe%{O!i%cO(P%eO~O#s$RO~O}&QO![%}O!i&PO%g&TO(P%eO(Q!lO(RTO(UUO`)TP~O!u#sO~O%p&VO!P)PX![)PX(P)PX~O(P&WO~O!r&]O#t!PO%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO~Od&bOe&aO!u&_O%e&`O%x&^O~P;|Od&eOeyO![&dO!r&]O!uxO!y]O#t!PO%e}O%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO~Ob&hO#]&kO%g&fO(Q!lO~P=RO!i&lO!r&pO~O!i#oO~O![XO~Oa%lO't&xO'v%lO~Oa%lO't&{O'v%lO~Oa%lO't&}O'v%lO~O's]X!V]Xs]X!h]X&W]X![]X%f]X!d]X~P(qO!_'[O!`'TO!a'TO(Q!lO(RTO(UUO~Op'RO!P'QO!X'UO(a'PO!Z(eP!Z(tP~P@YOk'_O![']O(P%eO~Oe'dO!i%cO(P%eO~O}&QO!i&PO~Op!nO!P!oO!y;kO#Q!pO#R!pO#T!pO#U!pO(Q!lO(RTO(UUO(a!mO(k!sO~O!_'jO!`'iO!a'iO#S!pO#X'kO#Y'kO~PAtOa%lOh%VO!d#vO!i%cO'v%lO(n'mO~O!m'qO#]'oO~PCSOp!nO!P!oO(RTO(UUO(a!mO(k!sO~O![XOp(iX!P(iX!_(iX!`(iX!a(iX!y(iX#Q(iX#R(iX#S(iX#T(iX#U(iX#X(iX#Y(iX(Q(iX(R(iX(U(iX(a(iX(k(iX~O!`'iO!a'iO(Q!lO~PCrO'{'uO'|'uO'}'wO~O_!}O(R'yO(S!}O(T'yO~O_#QO(T'yO(U'yO(V#QO~Os'{O~P%[Ou#SO!R#TO(^#TO(_(OO~O!X(QO!V'SX!V'YX!Y'SX!Y'YX~P+}O!Y(SO!V(dX~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y(SO!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO(]VO(n$YO(u#|O(v#}O~O!V(dX~PGmO!V(XO~O!V(qX!Y(qX!d(qX!h(qX(n(qX~O#](qX#h#aX!Z(qX~PIpO#](YO!V(sX!Y(sX~O!Y(ZO!V(rX~O!V(^O~O#]$eO~PIpO!Z(_O~P`OR#zO}#yO!P#{O!i#xO(]VOP!ka[!kao!ka!Y!ka!m!ka#O!ka#k!ka#l!ka#m!ka#n!ka#o!ka#p!ka#q!ka#r!ka#s!ka#u!ka#w!ka#y!ka#z!ka(n!ka(u!ka(v!ka~Oa!ka'v!ka's!ka!V!ka!h!kas!ka![!ka%f!ka!d!ka~PKWO!h(`O~O!d#vO#](aO(n'mO!Y(pXa(pX'v(pX~O!h(pX~PMsO!P%fO![%gO!y]O#f(fO#g(eO(P%eO~O!Y(gO!h(oX~O!h(iO~O!P%fO![%gO#g(eO(P%eO~OP(cXR(cX[(cXo(cX}(cX!P(cX!Y(cX!i(cX!m(cX#O(cX#k(cX#l(cX#m(cX#n(cX#o(cX#p(cX#q(cX#r(cX#s(cX#u(cX#w(cX#y(cX#z(cX(](cX(n(cX(u(cX(v(cX~O!d#vO!h(cX~P! aOR(kO}(jO!i#xO#P$dO!y!xa!P!xa~O!u!xa%e!xa![!xa#f!xa#g!xa(P!xa~P!#bO!u(oO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<XO!P${O![$|O!f=jO!i$xO#g<_O$V%_O$r<ZO$t<]O$w%`O(P(sO(RTO(UUO(]$uO(u$}O(v%PO~O#h(uO~O!X(wO!h(gP~P%[O(a(yO(k[O~O!P({O!i#xO(a(yO(k[O~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(P)YO(RTO(UUO(]VO(k[O(z=dO~O!Y$_Oa$oa'v$oa's$oa!h$oa!V$oa![$oa%f$oa!d$oa~O#t)aO~P!&fOh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(P(sO(RTO(UUO(]$uO(u$}O(v%PO~Og(lP~P!+oO})fO!d)eO![$]X$Y$]X$[$]X$^$]X$e$]X~O!d)eO![(wX$Y(wX$[(wX$^(wX$e(wX~O})fO~P!-xO})fO![(wX$Y(wX$[(wX$^(wX$e(wX~O![)hO$Y)lO$[)gO$^)gO$e)mO~O!X)pO~P!(vO$[$hO$^$gO$e)tO~Ok$xX}$xX#P$xX'u$xX(u$xX(v$xX~OgjXg$xXkjX!YjX#]jX~P!/nOu)vO(^)wO(_)yO~Ok*SO}){O'u)|O(u$}O(v%PO~Og)zO~P!0rOg*TO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<XO!P*VO![*WO!f=jO!i$xO#g<_O$V%_O$r<ZO$t<]O$w%`O(RTO(UUO(]$uO(u$}O(v%PO~O!X*ZO(P*UO!h({P~P!1aO#h*]O~O!i*^O~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<XO!P${O![$|O!f=jO!i$xO#g<_O$V%_O$r<ZO$t<]O$w%`O(P*`O(RTO(UUO(]$uO(u$}O(v%PO~O!X*cO!V(|P~P!3`Oo*oOp!nO!P*eO!_*mO!`*gO!a*gO!i*^O#X*nO%]*iO(Q!lO(RTO(UUO(a!mO~O!Z*lO~P!5TO#P$dOk([X}([X'u([X(u([X(v([X!Y([X#]([X~Og([X#}([X~P!6VOk*tO#]*sOg(ZX!Y(ZX~O!Y*uOg(YX~O(P&WOg(YP~Op*xO~O!i*}O~O(P(sO~Om+RO!P%fO!X#iO![%gO!y]O#f#lO#g#iO(P%eO!h(oP~O!d#vO#h+SO~O!P%fO!X+UO!Y(ZO![%gO(P%eO!V(rP~Op'XO!P+WO!X+VO(RTO(UUO(a(yO~O!Z(tP~P!9VO!Y+XOa)QX'v)QX~OP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO(]VO(n$YO(u#|O(v#}O~Oa!ga!Y!ga'v!ga's!ga!V!ga!h!gas!ga![!ga%f!ga!d!ga~P!9}OR#zO}#yO!P#{O!i#xO(]VOP!oa[!oao!oa!Y!oa!m!oa#O!oa#k!oa#l!oa#m!oa#n!oa#o!oa#p!oa#q!oa#r!oa#s!oa#u!oa#w!oa#y!oa#z!oa(n!oa(u!oa(v!oa~Oa!oa'v!oa's!oa!V!oa!h!oas!oa![!oa%f!oa!d!oa~P!<eOR#zO}#yO!P#{O!i#xO(]VOP!qa[!qao!qa!Y!qa!m!qa#O!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#s!qa#u!qa#w!qa#y!qa#z!qa(n!qa(u!qa(v!qa~Oa!qa'v!qa's!qa!V!qa!h!qas!qa![!qa%f!qa!d!qa~P!>{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P<fO~P##sO!Y-UO!Z(eX~O!Z-WO~O!d-OO#],}O!Y#eX!Z#eX~O!Y-XO!Z(tX~O!Z-ZO~O!`-[O!a-[O(Q!lO~P##bO!Z-_O~P'_Ok-bO![']O~O!V-gO~Op!xa!_!xa!`!xa!a!xa#Q!xa#R!xa#S!xa#T!xa#U!xa#X!xa#Y!xa(Q!xa(R!xa(U!xa(a!xa(k!xa~P!#bO!m-lO#]-jO~PCSO!`-nO!a-nO(Q!lO~PCrOa%lO#]-jO'v%lO~Oa%lO!d#vO#]-jO'v%lO~Oa%lO!d#vO!m-lO#]-jO'v%lO(n'mO~O'{'uO'|'uO'}-sO~Os-tO~O!V'Sa!Y'Sa~P!9}O!X-xO!V'SX!Y'SX~P%[O!Y(SO!V(da~O!V(da~PGmO!Y(ZO!V(ra~O!P%fO!X-|O![%gO(P%eO!V'YX!Y'YX~O#].OO!Y(pa!h(paa(pa'v(pa~O!d#vO~P#+yO!Y(gO!h(oa~O!P%fO![%gO#g.SO(P%eO~Om.XO!P%fO!X.UO![%gO!y]O#f.WO#g.UO(P%eO!Y']X!h']X~OR.]O!i#xO~Oh%VOk.`O![']O%f._O~Oa#`i!Y#`i'v#`i's#`i!V#`i!h#`is#`i![#`i%f#`i!d#`i~P!9}Ok=pO}){O'u)|O(u$}O(v%PO~O#h#[aa#[a#]#[a'v#[a!Y#[a!h#[a![#[a!V#[a~P#.uO#h([XP([XR([X[([Xa([Xo([X!P([X!i([X!m([X#O([X#k([X#l([X#m([X#n([X#o([X#p([X#q([X#r([X#s([X#u([X#w([X#y([X#z([X'v([X(]([X(n([X!h([X!V([X's([Xs([X![([X%f([X!d([X~P!6VO!Y.mO!h(gX~P!9}O!h.pO~O!V.rO~OP$[OR#zO}#yO!P#{O!i#xO!m$[O(]VO[#jia#jio#ji!Y#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'v#ji(n#ji(u#ji(v#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#k#ji~P#2eO#k$OO~P#2eOP$[OR#zOo$aO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO(]VO[#jia#ji!Y#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'v#ji(n#ji(u#ji(v#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#o#ji~P#5SO#o$QO~P#5SOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO(]VOa#ji!Y#ji#w#ji#y#ji#z#ji'v#ji(n#ji(u#ji(v#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#u#ji~P#7qOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO(]VO(v#}Oa#ji!Y#ji#y#ji#z#ji'v#ji(n#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#w$UO~P#:XO#w#ji~P#:XO#u$SO~P#7qOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO(]VO(u#|O(v#}Oa#ji!Y#ji#z#ji'v#ji(n#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#y#ji~P#<}O#y$WO~P#<}OP]XR]X[]Xo]X}]X!P]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X(]]X(n]X(u]X(v]X!Y]X!Z]X~O#}]X~P#?lOP$[OR#zO[<ROo<PO}#yO!P#{O!i#xO!m$[O#O;vO#k;sO#l;tO#m;tO#n;tO#o;uO#p;vO#q;vO#r<QO#s;vO#u;wO#w;yO#y;{O#z;|O(]VO(n$YO(u#|O(v#}O~O#}.tO~P#AyO#P$dO#]<SO$P<SO#}(cX!Z(cX~P! aOa'`a!Y'`a'v'`a's'`a!h'`a!V'`as'`a!['`a%f'`a!d'`a~P!9}O[#jia#jio#ji!Y#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'v#ji(n#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO(]VO(u#ji(v#ji~P#D{Ok=pO}){O'u)|O(u$}O(v%POP#jiR#ji!P#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji(]#ji~P#D{O!Y.xOg(lX~P!0rOg.zO~Oa$Oi!Y$Oi'v$Oi's$Oi!V$Oi!h$Ois$Oi![$Oi%f$Oi!d$Oi~P!9}O$[.{O$^.{O~O$[.|O$^.|O~O!d)eO#].}O![$bX$Y$bX$[$bX$^$bX$e$bX~O!X/OO~O![)hO$Y/QO$[)gO$^)gO$e/RO~O!Y;}O!Z(bX~P#AyO!Z/SO~O!d)eO$e(wX~O$e/UO~Os/VO~P!&fOu)vO(^)wO(_/YO~O!P/]O~O(u$}Ok%^a}%^a'u%^a(v%^a!Y%^a#]%^a~Og%^a#}%^a~P#K}O(v%POk%`a}%`a'u%`a(u%`a!Y%`a#]%`a~Og%`a#}%`a~P#LpO!YfX!dfX!hfX!h$xX(nfX~P!/nO!X/fO!Y(ZO(P/eO!V(rP!V(|P~P!1aOo*oO!_*mO!`*gO!a*gO!i*^O#X*nO%]*iO(Q!lO(RTO(UUO~Op<cO!P/gO!X+VO!Z*lO(a<bO!Z(tP~P#NZO!h/hO~P#.uO!Y/iO!d#vO(n'mO!h({X~O!h/nO~O!P%fO!X*ZO![%gO(P%eO!h({P~O#h/pO~O!V$xX!Y$xX!d%PX~P!/nO!Y/qO!V(|X~P#.uO!d/sO~O!V/uO~OmkO(P/vO~P.iOh%VOo/{O!d#vO!i%cO(n'mO~O!d+dO~Oa%lO!Y0PO'v%lO~O!Z0RO~P!5TO!`0SO!a0SO(Q!lO~P##bOp!nO!P0TO(RTO(UUO(a!mO~O#X0VO~Og%^a!Y%^a#]%^a#}%^a~P!0rOg%`a!Y%`a#]%`a#}%`a~P!0rO(P&WOg'iX!Y'iX~O!Y*uOg(Ya~Og0`O~OR0aO}0aO!P0bO#P$dOkza'uza(uza(vza!Yza#]za~Ogza#}za~P$&ZO}){O'u)|Ok$qa(u$qa(v$qa!Y$qa#]$qa~Og$qa#}$qa~P$'VO}){O'u)|Ok$sa(u$sa(v$sa!Y$sa#]$sa~Og$sa#}$sa~P$'xO#h0eO~Og%Ra!Y%Ra#]%Ra#}%Ra~P!0rO!d#vO~O#h0hO~O!Y+XOa)Qa'v)Qa~OR#zO}#yO!P#{O!i#xO(]VOP!oi[!oio!oi!Y!oi!m!oi#O!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#q!oi#r!oi#s!oi#u!oi#w!oi#y!oi#z!oi(n!oi(u!oi(v!oi~Oa!oi'v!oi's!oi!V!oi!h!ois!oi![!oi%f!oi!d!oi~P$)gOh%VOo%XOp$tOq$tOw%YOy%ZO{<XO!P${O![$|O!f=jO!i$xO#g<_O$V%_O$r<ZO$t<]O$w%`O(RTO(UUO(]$uO(u$}O(v%PO~Om0qO(P0pO~P$+}O!d+dOa(Xa![(Xa'v(Xa!Y(Xa~O#h0wO~O[]X!YfX!ZfX~O!Y0xO!Z)UX~O!Z0zO~O[0{O~Ob0}O(P+lO(RTO(UUO~O![%}O(P%eO`'qX!Y'qX~O!Y+qO`)Ta~O!h1QO~P!9}O[1TO~O`1UO~O#]1XO~Ok1[O![$|O~O(a(yO!Z)RP~Oh%VOk1eO![1bO%f1dO~O[1oO!Y1mO!Z)SX~O!Z1pO~O`1rOa%lO'v%lO~O(P#nO(RTO(UUO~O#P$dO#]$eO$P$eOP(cXR(cX[(cXo(cX}(cX!P(cX!Y(cX!i(cX!m(cX#O(cX#k(cX#l(cX#m(cX#n(cX#o(cX#p(cX#q(cX#r(cX#u(cX#w(cX#y(cX#z(cX(](cX(n(cX(u(cX(v(cX~O#s1uO&W1vOa(cX~P$1eO#]$eO#s1uO&W1vO~Oa1xO~P%[Oa1zO~O&a1}OP&_iQ&_iS&_iY&_ia&_id&_ie&_im&_io&_ip&_iq&_iw&_iy&_i{&_i!P&_i!T&_i!U&_i![&_i!f&_i!i&_i!l&_i!m&_i!n&_i!p&_i!r&_i!u&_i!y&_i#t&_i$V&_i%e&_i%g&_i%i&_i%j&_i%k&_i%n&_i%p&_i%s&_i%t&_i%v&_i&S&_i&Y&_i&[&_i&^&_i&`&_i&c&_i&i&_i&o&_i&q&_i&s&_i&u&_i&w&_i's&_i(P&_i(R&_i(U&_i(]&_i(k&_i(z&_i!Z&_ib&_i&f&_i~Ob2TO!Z2RO&f2SO~P`O![XO!i2VO~O&m,tOP&hiQ&hiS&hiY&hia&hid&hie&him&hio&hip&hiq&hiw&hiy&hi{&hi!P&hi!T&hi!U&hi![&hi!f&hi!i&hi!l&hi!m&hi!n&hi!p&hi!r&hi!u&hi!y&hi#t&hi$V&hi%e&hi%g&hi%i&hi%j&hi%k&hi%n&hi%p&hi%s&hi%t&hi%v&hi&S&hi&Y&hi&[&hi&^&hi&`&hi&c&hi&i&hi&o&hi&q&hi&s&hi&u&hi&w&hi's&hi(P&hi(R&hi(U&hi(]&hi(k&hi(z&hi!Z&hi&a&hib&hi&f&hi~O!V2]O~O!Y!^a!Z!^a~P#AyOp!nO!P!oO!X2cO(a!mO!Y'TX!Z'TX~P@YO!Y-UO!Z(ea~O!Y'ZX!Z'ZX~P!9VO!Y-XO!Z(ta~O!Z2jO~P'_Oa%lO#]2sO'v%lO~Oa%lO!d#vO#]2sO'v%lO~Oa%lO!d#vO!m2wO#]2sO'v%lO(n'mO~Oa%lO'v%lO~P!9}O!Y$_Os$oa~O!V'Si!Y'Si~P!9}O!Y(SO!V(di~O!Y(ZO!V(ri~O!V(si!Y(si~P!9}O!Y(pi!h(pia(pi'v(pi~P!9}O#]2yO!Y(pi!h(pia(pi'v(pi~O!Y(gO!h(oi~O!P%fO![%gO!y]O#f3OO#g2}O(P%eO~O!P%fO![%gO#g2}O(P%eO~Ok3VO![']O%f3UO~Oh%VOk3VO![']O%f3UO~O#h%^aP%^aR%^a[%^aa%^ao%^a!P%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'v%^a(]%^a(n%^a!h%^a!V%^a's%^as%^a![%^a%f%^a!d%^a~P#K}O#h%`aP%`aR%`a[%`aa%`ao%`a!P%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'v%`a(]%`a(n%`a!h%`a!V%`a's%`as%`a![%`a%f%`a!d%`a~P#LpO#h%^aP%^aR%^a[%^aa%^ao%^a!P%^a!Y%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'v%^a(]%^a(n%^a!h%^a!V%^a's%^a#]%^as%^a![%^a%f%^a!d%^a~P#.uO#h%`aP%`aR%`a[%`aa%`ao%`a!P%`a!Y%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'v%`a(]%`a(n%`a!h%`a!V%`a's%`a#]%`as%`a![%`a%f%`a!d%`a~P#.uO#hzaPza[zaazaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza'vza(]za(nza!hza!Vza'szasza![za%fza!dza~P$&ZO#h$qaP$qaR$qa[$qaa$qao$qa!P$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa'v$qa(]$qa(n$qa!h$qa!V$qa's$qas$qa![$qa%f$qa!d$qa~P$'VO#h$saP$saR$sa[$saa$sao$sa!P$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa'v$sa(]$sa(n$sa!h$sa!V$sa's$sas$sa![$sa%f$sa!d$sa~P$'xO#h%RaP%RaR%Ra[%Raa%Rao%Ra!P%Ra!Y%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra'v%Ra(]%Ra(n%Ra!h%Ra!V%Ra's%Ra#]%Ras%Ra![%Ra%f%Ra!d%Ra~P#.uOa#`q!Y#`q'v#`q's#`q!V#`q!h#`qs#`q![#`q%f#`q!d#`q~P!9}O!X3_O!Y'UX!h'UX~P%[O!Y.mO!h(ga~O!Y.mO!h(ga~P!9}O!V3bO~O#}!ka!Z!ka~PKWO#}!ga!Y!ga!Z!ga~P#AyO#}!oa!Z!oa~P!<eO#}!qa!Z!qa~P!>{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(P<lO~P!1aO!P%fO!X4SO![%gO(P%eO!Y'aX!h'aX~O!Y/iO!h({a~O!Y/iO!d#vO!h({a~O!Y/iO!d#vO(n'mO!h({a~Og$zi!Y$zi#]$zi#}$zi~P!0rO!X4[O!V'cX!Y'cX~P!3`O!Y/qO!V(|a~O!Y/qO!V(|a~P#.uOP]XR]X[]Xo]X}]X!P]X!V]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X(]]X(n]X(u]X(v]X~O!d%WX#s%WX~P%/mO!d#vO#s4aO~Oh%VO!d#vO!i%cO~Oh%VOo4fO!i%cO(n'mO~Oo4kO!d#vO(n'mO~Op!nO!P4lO(RTO(UUO(a!mO~O(u$}Ok%^i}%^i'u%^i(v%^i!Y%^i#]%^i~Og%^i#}%^i~P%3^O(v%POk%`i}%`i'u%`i(u%`i!Y%`i#]%`i~Og%`i#}%`i~P%4POg(Zi!Y(Zi~P!0rO#]4rOg(Zi!Y(Zi~P!0rO!h4uO~Oa$mq!Y$mq'v$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9}O!V4yO~O!Y4zO![(}X~P#.uOa$xX![$xX%Z]X'v$xX!Y$xX~P!/nO%Z4}OalXklX}lX![lX'ulX'vlX(ulX(vlX!YlX~O%Z4}O~Ob5TO%g5UO(P+lO(RTO(UUO!Y'pX!Z'pX~O!Y0xO!Z)Ua~O[5YO~O`5ZO~Oa%lO'v%lO~P#.uO!Y5cO#]5eO!Z)RX~O!Z5fO~Oo5lOp!nO!P*eO!_!yO!`!vO!a!vO!y;kO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5kO#Y!zO(Q!lO(RTO(UUO(a!mO(k!sO~O!Z5jO~P%9SOk5qO![1bO%f5pO~Oh%VOk5qO![1bO%f5pO~Ob5xO(P#nO(RTO(UUO!Y'oX!Z'oX~O!Y1mO!Z)Sa~O(RTO(UUO(a5zO~O`6OO~O#s6RO&W6SO~PMsO!h6TO~P%[Oa6VO~Oa6VO~P%[Ob2TO!Z6[O&f2SO~P`O!d6^O~O!d6`Oh(fi!Y(fi!Z(fi!d(fi!i(fio(fi(n(fi~O!Y#ei!Z#ei~P#AyO#]6aO!Y#ei!Z#ei~O!Y!^i!Z!^i~P#AyOa%lO#]6jO'v%lO~Oa%lO!d#vO#]6jO'v%lO~O!Y(pq!h(pqa(pq'v(pq~P!9}O!Y(gO!h(oq~O!P%fO![%gO#g6qO(P%eO~O![']O%f6tO~Ok6xO![']O%f6tO~O#h'eaP'eaR'ea['eaa'eao'ea!P'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'v'ea(]'ea(n'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%+ZO#h'gaP'gaR'ga['gaa'gao'ga!P'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'v'ga(]'ga(n'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%+|O#h$ziP$ziR$zi[$zia$zio$zi!P$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'v$zi(]$zi(n$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.uO#h%^iP%^iR%^i[%^ia%^io%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'v%^i(]%^i(n%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%3^O#h%`iP%`iR%`i[%`ia%`io%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'v%`i(]%`i(n%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%4PO!Y'Ua!h'Ua~P!9}O!Y.mO!h(gi~O#}#`i!Y#`i!Z#`i~P#AyOP$[OR#zO}#yO!P#{O!i#xO!m$[O(]VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(n#ji(u#ji(v#ji!Y#ji!Z#ji~O#k#ji~P%LRO#k;sO~P%LROP$[OR#zOo<PO}#yO!P#{O!i#xO!m$[O#k;sO#l;tO#m;tO#n;tO(]VO[#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(n#ji(u#ji(v#ji!Y#ji!Z#ji~O#o#ji~P%NZO#o;uO~P%NZOP$[OR#zO[<ROo<PO}#yO!P#{O!i#xO!m$[O#O;vO#k;sO#l;tO#m;tO#n;tO#o;uO#p;vO#q;vO#r<QO#s;vO(]VO#w#ji#y#ji#z#ji#}#ji(n#ji(u#ji(v#ji!Y#ji!Z#ji~O#u#ji~P&!cOP$[OR#zO[<ROo<PO}#yO!P#{O!i#xO!m$[O#O;vO#k;sO#l;tO#m;tO#n;tO#o;uO#p;vO#q;vO#r<QO#s;vO#u;wO(]VO(v#}O#y#ji#z#ji#}#ji(n#ji(u#ji!Y#ji!Z#ji~O#w;yO~P&$dO#w#ji~P&$dO#u;wO~P&!cOP$[OR#zO[<ROo<PO}#yO!P#{O!i#xO!m$[O#O;vO#k;sO#l;tO#m;tO#n;tO#o;uO#p;vO#q;vO#r<QO#s;vO#u;wO#w;yO(]VO(u#|O(v#}O#z#ji#}#ji(n#ji!Y#ji!Z#ji~O#y#ji~P&&sO#y;{O~P&&sOa#{y!Y#{y'v#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9}O[#jio#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(n#ji!Y#ji!Z#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k;sO#l;tO#m;tO#n;tO(]VO(u#ji(v#ji~P&)oOk=qO}){O'u)|O(u$}O(v%POP#jiR#ji!P#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji(]#ji~P&)oO#P$dOP([XR([X[([Xk([Xo([X}([X!P([X!i([X!m([X#O([X#k([X#l([X#m([X#n([X#o([X#p([X#q([X#r([X#s([X#u([X#w([X#y([X#z([X#}([X'u([X(]([X(n([X(u([X(v([X!Y([X!Z([X~O#}$Oi!Y$Oi!Z$Oi~P#AyO#}!oi!Z!oi~P$)gOg'Xa!Y'Xa~P!0rO!Z7[O~O!Y'`a!Z'`a~P#AyO!V7]O~P#.uO!d#vO(n'mO!Y'aa!h'aa~O!Y/iO!h({i~O!Y/iO!d#vO!h({i~Og$zq!Y$zq#]$zq#}$zq~P!0rO!V'ca!Y'ca~P#.uO!d7dO~O!Y/qO!V(|i~P#.uO!Y/qO!V(|i~O!V7gO~Oh%VOo7lO!i%cO(n'mO~O!d#vO#s7nO~Oo7qO!d#vO(n'mO~O}){O'u)|O(v%POk'fa(u'fa!Y'fa#]'fa~Og'fa#}'fa~P&2pO}){O'u)|Ok'ha(u'ha(v'ha!Y'ha#]'ha~Og'ha#}'ha~P&3cO!V7sO~Og$|q!Y$|q#]$|q#}$|q~P!0rOa$my!Y$my'v$my's$my!V$my!h$mys$my![$my%f$my!d$my~P!9}O!d6`O~O!Y4zO![(}a~O![']OP$SaR$Sa[$Sao$Sa}$Sa!P$Sa!Y$Sa!i$Sa!m$Sa#O$Sa#k$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#u$Sa#w$Sa#y$Sa#z$Sa(]$Sa(n$Sa(u$Sa(v$Sa~O%f6tO~P&5lOa#`y!Y#`y'v#`y's#`y!V#`y!h#`ys#`y![#`y%f#`y!d#`y~P!9}O[7xO~Ob7zO(P+lO(RTO(UUO~O!Y0xO!Z)Ui~O`8OO~O(a(yO!Y'lX!Z'lX~O!Y5cO!Z)Ra~O!Z8XO~P%9SO(k!sO~P$$iO#X8YO~O![1bO~O![1bO%f8[O~Ok8_O![1bO%f8[O~O[8dO!Y'oa!Z'oa~O!Y1mO!Z)Si~O!h8hO~O!h8iO~O!h8lO~O!h8lO~P%[Oa8nO~O!d8oO~O!h8pO~O!Y(si!Z(si~P#AyOa%lO#]8xO'v%lO~O!Y(py!h(pya(py'v(py~P!9}O!Y(gO!h(oy~O%f8{O~P&5lO![']O%f8{O~O#h$zqP$zqR$zq[$zqa$zqo$zq!P$zq!Y$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq'v$zq(]$zq(n$zq!h$zq!V$zq's$zq#]$zqs$zq![$zq%f$zq!d$zq~P#.uO#h'faP'faR'fa['faa'fao'fa!P'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa'v'fa(]'fa(n'fa!h'fa!V'fa's'fas'fa!['fa%f'fa!d'fa~P&2pO#h'haP'haR'ha['haa'hao'ha!P'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha'v'ha(]'ha(n'ha!h'ha!V'ha's'has'ha!['ha%f'ha!d'ha~P&3cO#h$|qP$|qR$|q[$|qa$|qo$|q!P$|q!Y$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q'v$|q(]$|q(n$|q!h$|q!V$|q's$|q#]$|qs$|q![$|q%f$|q!d$|q~P#.uO!Y'Ui!h'Ui~P!9}O#}#`q!Y#`q!Z#`q~P#AyO(u$}OP%^aR%^a[%^ao%^a!P%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a#}%^a(]%^a(n%^a!Y%^a!Z%^a~Ok%^a}%^a'u%^a(v%^a~P&FnO(v%POP%`aR%`a[%`ao%`a!P%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a#}%`a(]%`a(n%`a!Y%`a!Z%`a~Ok%`a}%`a'u%`a(u%`a~P&HuOk=qO}){O'u)|O(v%PO~P&FnOk=qO}){O'u)|O(u$}O~P&HuOR0aO}0aO!P0bO#P$dOPza[zakzaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza#}za'uza(]za(nza(uza(vza!Yza!Zza~O}){O'u)|OP$qaR$qa[$qak$qao$qa!P$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa#}$qa(]$qa(n$qa(u$qa(v$qa!Y$qa!Z$qa~O}){O'u)|OP$saR$sa[$sak$sao$sa!P$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa#}$sa(]$sa(n$sa(u$sa(v$sa!Y$sa!Z$sa~Ok=qO}){O'u)|O(u$}O(v%PO~OP%RaR%Ra[%Rao%Ra!P%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra#}%Ra(]%Ra(n%Ra!Y%Ra!Z%Ra~P'#zO#}$lq!Y$lq!Z$lq~P#AyO#}$mq!Y$mq!Z$mq~P#AyO!Z9YO~O#}9ZO~P!0rO!d#vO!Y'ai!h'ai~O!d#vO(n'mO!Y'ai!h'ai~O!Y/iO!h({q~O!V'ci!Y'ci~P#.uO!Y/qO!V(|q~Oo9bO!d#vO(n'mO~O[9dO!V9cO~P#.uO!V9cO~O!d#vO#s9jO~Og(Zy!Y(Zy~P!0rO!Y'ja!['ja~P#.uOa%Yq![%Yq'v%Yq!Y%Yq~P#.uO[9mO~O!Y0xO!Z)Uq~O#]9qO!Y'la!Z'la~O!Y5cO!Z)Ri~P#AyO!P9sO~O![1bO%f9vO~O(RTO(UUO(a9{O~O!Y1mO!Z)Sq~O!h:OO~O!h:PO~O!h:QO~O!h:QO~P%[O#]:TO!Y#ey!Z#ey~O!Y#ey!Z#ey~P#AyO%f:YO~P&5lO![']O%f:YO~O#}#{y!Y#{y!Z#{y~P#AyOP$ziR$zi[$zio$zi!P$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi#}$zi(]$zi(n$zi!Y$zi!Z$zi~P'#zO}){O'u)|O(v%POP'eaR'ea['eak'eao'ea!P'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea#}'ea(]'ea(n'ea(u'ea!Y'ea!Z'ea~O}){O'u)|OP'gaR'ga['gak'gao'ga!P'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga#}'ga(]'ga(n'ga(u'ga(v'ga!Y'ga!Z'ga~O(u$}OP%^iR%^i[%^ik%^io%^i}%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i#}%^i'u%^i(]%^i(n%^i(v%^i!Y%^i!Z%^i~O(v%POP%`iR%`i[%`ik%`io%`i}%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i#}%`i'u%`i(]%`i(n%`i(u%`i!Y%`i!Z%`i~O#}$my!Y$my!Z$my~P#AyO#}#`y!Y#`y!Z#`y~P#AyO!d#vO!Y'aq!h'aq~O!Y/iO!h({y~O!V'cq!Y'cq~P#.uOo:dO!d#vO(n'mO~O[:hO!V:gO~P#.uO!V:gO~O!Y0xO!Z)Uy~O!Y5cO!Z)Rq~O(P:nO~O![1bO%f:qO~O!h:tO~O%f:yO~P&5lOP$zqR$zq[$zqo$zq!P$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq#}$zq(]$zq(n$zq!Y$zq!Z$zq~P'#zO}){O'u)|O(v%POP'faR'fa['fak'fao'fa!P'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa#}'fa(]'fa(n'fa(u'fa!Y'fa!Z'fa~O}){O'u)|OP'haR'ha['hak'hao'ha!P'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha#}'ha(]'ha(n'ha(u'ha(v'ha!Y'ha!Z'ha~OP$|qR$|q[$|qo$|q!P$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q#}$|q(]$|q(n$|q!Y$|q!Z$|q~P'#zOg%b!Z!Y%b!Z#]%b!Z#}%b!Z~P!0rO!V:}O~P#.uOo;OO!d#vO(n'mO~O[;QO!V:}O~P#.uO!Y'lq!Z'lq~P#AyO!Y#e!Z!Z#e!Z~P#AyO#h%b!ZP%b!ZR%b!Z[%b!Za%b!Zo%b!Z!P%b!Z!Y%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z'v%b!Z(]%b!Z(n%b!Z!h%b!Z!V%b!Z's%b!Z#]%b!Zs%b!Z![%b!Z%f%b!Z!d%b!Z~P#.uOo;YO!d#vO(n'mO~O!V;ZO~P#.uOo;bO!d#vO(n'mO~O!V;cO~P#.uOP%b!ZR%b!Z[%b!Zo%b!Z!P%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z#}%b!Z(]%b!Z(n%b!Z!Y%b!Z!Z%b!Z~P'#zOo;fO!d#vO(n'mO~Os(bX~P1qO}%pO~P!(vO(Q!lO~P!(vO!VfX!YfX#]fX~P%/mOP]XR]X[]Xo]X}]X!P]X!Y]X!YfX!i]X!m]X#O]X#P]X#]]X#]fX#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X(]]X(n]X(u]X(v]X~O!dfX!h]X!hfX(nfX~P'HXOP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![XO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(P)YO(RTO(UUO(]VO(k[O(z=dO~O!Y;}O!Z$oa~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<YO!P${O![$|O!f=kO!i$xO#g<`O$V%_O$r<[O$t<^O$w%`O(P(sO(RTO(UUO(]$uO(u$}O(v%PO~O#t)aO~P'L}Oo!bX(n!bX~P# kOo(fX(n(fX~P#!^O!Z]X!ZfX~P'HXO!VfX!V$xX!YfX!Y$xX#]fX~P!/nO#h;rO~O!d#vO#h;rO~O#]<SO~O#s;vO~O#]<dO!Y(sX!Z(sX~O#]<SO!Y(qX!Z(qX~O#h<eO~Og<gO~P!0rO#h<mO~O#h<nO~O!d#vO#h<oO~O!d#vO#h<eO~O#}<pO~P#AyO#h<qO~O#h<rO~O#h<wO~O#h<xO~O#h<yO~O#h<zO~O#}<{O~P!0rO#}<|O~P!0rO#P#Q#R#T#U#X#f#g#r(z$r$t$w%Z%e%f%g%n%p%s%t%v%x~'zT#l!U'x(Q#mp#k#no}'y$['y(P$^(a~",goto:"$6w)YPPPPPP)ZPP)^P)oP+P/RPPPP6XPP6oPP<g@VP@jP@jPPP@jPBnP@jP@jP@jPBrPBwPCfPH`PPPHdPPPPHdKgPPPKmL_PHdPHdPPNmHdPPPHdPHdP!!tHdP!&[!'a!'jP!(^!(b!(^!+oPPPPPPP!,`!'aPP!,p!.bP!1nHdHd!1s!5P!9m!9m!=lPPP!=tHdPPPPPPPPPPP!ATP!BbPPHd!CsPHdPHdHdHdHdHdPHd!EVP!HaP!KgP!Kk!Ku!Ky!KyP!H^P!K}!K}P# TP# XHdHd# _#$dBr@jP@jP@j@jP#%q@j@j#(P@j#*s@j#,{@j@j#-k#/{#/{#0Q#0Z#/{#0fP#/{P@j#1O@j#4u@j@j6XPPP#8rPPP#9]#9]P#9]P#9s#9]PP#9yP#9pP#9p#:^#9p#:x#;O#;R)^#;U)^P#;]#;]#;]P)^P)^P)^P)^PP)^P#;c#;fP#;f)^P#;jP#;mP)^P)^P)^P)^P)^P)^)^PP#;s#;y#<U#<[#<b#<h#<n#<|#=S#=^#=d#=n#=t#>U#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R<a;n%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z*e+S+W,i,l,q-b-j-x.O.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3_4l5q6R6S6V6j8_8n8xS#q];k!r)[$Z$n'U)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gU*z%[<X<YQ+o%}Q,_&dQ,f&lQ0n+bQ0r+dQ0}+pQ1t,dQ3R.`Q5T0xQ5x1mQ6v3VQ7z5UR9O6x'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=g!S!nQ!r!v!y!z$|'T'[']'i'j'k*g*k*m*n-U-[-^-n0S0V1b5i5k%S$ti#v$b$c$d$x${%O%Q%]%^%b)v*O*Q*S*V*]*c*s*t+a+d+{,O._.x/]/f/p/q/s0W0Y0e1X1[1d3U4P4Q4[4a4r4z4}5p6t7d7n8[8{9Z9d9j9v:Y:h:q:y;Q<Q<R<T<U<V<W<Z<[<]<^<_<`<h<i<j<k<m<n<q<r<s<t<u<v<w<x<{<|=d=l=m=p=qQ&U|Q'R!eS'X%g-XQ+o%}Q,_&dQ0d*}Q0}+pQ1S+vQ1s,cQ1t,dQ5T0xQ5^1UQ5x1mQ5{1oQ5|1rQ7z5UQ7}5ZQ8g6OQ9p8OQ9|8dR<c*WrnOXst!V!Z#d%k&f&o&q&r&t,l,q1}2QR,a&h&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=f=g[#]WZ#W#Z'U(Q!b%hm#h#i#l$x%c%f(Z(e(f(g*V*Z*^+U+V+X,h-O-|.S.T.U.W/f/i2V2}3O4S6`6qQ%uxQ%yyS&O|&TQ&[!TQ'`!hQ'b!iQ(n#sS+i%z%{Q+m%}Q,W&_Q,[&aS-e'c'dQ.b(oQ0v+jQ0|+pQ1O+qQ1R+uQ1g,XS1k,],^Q2o-fQ5S0xQ5W0{Q5]1TQ5w1lQ7y5UQ7|5YQ9l7xR:k9m!O$zi$d%O%Q%]%^%b*O*Q*]*s*t.x/p0W0Y0e4Q4r9Z=d=l=m!^%wy!i!u%y%z%{'S'b'c'd'h'r*f+i+j-R-e-f-m/y/|0v2h2o2v4d4e4h7k9fQ+c%uQ+|&XQ,P&YQ,Z&aQ.a(nQ1f,WU1j,[,],^Q3W.bQ5r1gS5v1k1lQ8c5w#d=h#v$b$c$x${)v*S*V*c+a+d+{,O._/]/f/q/s1X1[1d3U4P4[4a4z4}5p6t7d7n8[8{9d9j9v:Y:h:q:y;Q<T<V<Z<]<_<h<j<m<q<s<u<w<{=p=qo=i<Q<R<U<W<[<^<`<i<k<n<r<t<v<x<|W%Ti%V*u=dS&X!Q&fQ&Y!RQ&Z!SR+z&V%T%Si#v$b$c$d$x${%O%Q%]%^%b)v*O*Q*S*V*]*c*s*t+a+d+{,O._.x/]/f/p/q/s0W0Y0e1X1[1d3U4P4Q4[4a4r4z4}5p6t7d7n8[8{9Z9d9j9v:Y:h:q:y;Q<Q<R<T<U<V<W<Z<[<]<^<_<`<h<i<j<k<m<n<q<r<s<t<u<v<w<x<{<|=d=l=m=p=qT)w$u)xV*z%[<X<YW'X!e%g*W-XS(z#y#zQ+^%pQ+t&QS.Z(j(kQ1],QQ4s0aR8S5c'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=g$i$^c#Y#e%o%q%s(P(V(q(v)O)P)Q)R)S)T)U)V)W)X)Z)])_)d)n+_+s-S-q-v-{-}.l.o.s.u.v.w/Z0f2^2a2q2x3^3c3d3e3f3g3h3i3j3k3l3m3n3o3r3s3z4w5Q6c6i6n6}7O7X7Y8U8r8v9Q9W9X:V:m:u;l=ZT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gQ'V!eR2d-U!W!nQ!e!r!v!y!z$|'T'[']'i'j'k*W*g*k*m*n-U-[-^-n0S0V1b5i5kR1_,SnqOXst!Z#d%k&o&q&r&t,l,q1}2QQ&v!^Q's!xS(p#u;rQ+g%xQ,U&[Q,V&^Q-c'aQ-p'lS.k(u<eS0g+S<oQ0t+hQ1a,TQ2U,sQ2W,tQ2`-PQ2m-dQ2p-hS4x0h<yQ5O0uS5R0w<zQ6b2bQ6f2nQ6k2uQ7w5PQ8s6dQ8t6gQ8w6lR:S8p$d$]c#Y#e%q%s(P(V(q(v)O)P)Q)R)S)T)U)V)W)X)Z)])_)d)n+_+s-S-q-v-{-}.l.o.s.v.w/Z0f2^2a2q2x3^3c3d3e3f3g3h3i3j3k3l3m3n3o3r3s3z4w5Q6c6i6n6}7O7X7Y8U8r8v9Q9W9X:V:m:u;l=ZS(l#p'fQ(|#zS+]%o.uS.[(k(mR3P.]'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gS#q];kQ&q!XQ&r!YQ&t![Q&u!]R1|,oQ'^!hQ+`%uQ-a'`S.^(n+cQ2k-`W3T.a.b0m0oQ6e2lW6r3Q3S3W4|U8z6s6u6wU:X8|8}9PS:w:W:ZQ;U:xR;^;VU!wQ']-^T5g1b5i!Q_OXZ`st!V!Z#d#h%c%k&f&h&o&q&r&t(g,l,q.T1}2Q]!pQ!r']-^1b5iT#q];k%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z*e+S+W+b,i,l,q-b-j-x.O.`.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3V3_4l5q6R6S6V6j6x8_8n8xS(z#y#zS.Z(j(k!s=Q$Z$n'U)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gU$fd)[,fS(m#p'fU*r%R(t3qU0c*y.g7TQ4|0nQ6s3RQ8}6vR:Z9Om!tQ!r!v!y!z']'i'j'k-^-n1b5i5kQ'q!uS(c#g1wS-l'h'tQ/l*YQ/y*fQ2w-oQ4W/mQ4d/{Q4e/|Q4j0UQ7`4RS7k4f4hS7o4k4mQ9]7aQ9a7gQ9f7lQ9k7qS:c9b9cS:|:d:gS;X:};OS;a;Y;ZS;e;b;cR;h;fQ#wbQ'p!uS(b#g1wS(d#m+RQ+T%dQ+e%vQ+k%|U-k'h'q'tQ.P(cQ/k*YQ/z*fQ/}*hQ0s+fQ1h,YS2t-l-oQ2|.XS4V/l/mQ4`/wS4c/y0UQ4g0OQ5t1iQ6m2wQ7_4RQ7c4WU7j4d4j4mQ7m4iQ8a5uS9[7`7aQ9`7gQ9h7oQ9i7pQ9y8bQ:a9]S:b9a9cQ:j9kQ:s9zS:{:c:gS;W:|:}S;`;X;ZS;d;a;cQ;g;eQ;i;hQ=T=OQ=`=XR=a=YV!wQ']-^%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z*e+S+W+b,i,l,q-b-j-x.O.`.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3V3_4l5q6R6S6V6j6x8_8n8xS#wz!j!r<}$Z$n'U)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gR=T=f%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z*e+S+W+b,i,l,q-b-j-x.O.`.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3V3_4l5q6R6S6V6j6x8_8n8xQ%dj!^%vy!i!u%y%z%{'S'b'c'd'h'r*f+i+j-R-e-f-m/y/|0v2h2o2v4d4e4h7k9fS%|z!jQ+f%wQ,Y&aW1i,Z,[,],^U5u1j1k1lS8b5v5wQ9z8c!r=O$Z$n'U)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gQ=X=eR=Y=f%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(S(Y(a(u(w({)z*e+S+W+b,i,l,q-b-j-x.O.`.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3V3_4l5q6R6S6V6j6x8_8n8xY#bWZ#W#Z(Q!b%hm#h#i#l$x%c%f(Z(e(f(g*V*Z*^+U+V+X,h-O-|.S.T.U.W/f/i2V2}3O4S6`6qQ,g&l!p=P$Z$n)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gR=S'UU'Y!e%g*WR2f-X%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z*e+S+W,i,l,q-b-j-x.O.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3_4l5q6R6S6V6j8_8n8x!r)[$Z$n'U)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gQ,f&lQ0n+bQ3R.`Q6v3VR9O6x!b$Tc#Y%o(P(V(q(v)W)X)])d+s-q-v-{-}.l.o/Z0f2q2x3^3n4w5Q6i6n6}8v:V;l!P;x)Z)n-S.u2^2a3c3l3m3r3z6c7O7X7Y8U8r9Q9W9X:m:u=Z!f$Vc#Y%o(P(V(q(v)T)U)W)X)])d+s-q-v-{-}.l.o/Z0f2q2x3^3n4w5Q6i6n6}8v:V;l!T;z)Z)n-S.u2^2a3c3i3j3l3m3r3z6c7O7X7Y8U8r9Q9W9X:m:u=Z!^$Zc#Y%o(P(V(q(v)])d+s-q-v-{-}.l.o/Z0f2q2x3^3n4w5Q6i6n6}8v:V;lQ4Q/dz=g)Z)n-S.u2^2a3c3r3z6c7O7X7Y8U8r9Q9W9X:m:u=ZQ=l=nR=m=o'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gS$oh$pR3w.}'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t.}/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gT$kf$qQ$ifS)g$l)kR)s$qT$jf$qT)i$l)k'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z*e+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t.}/O/g0T0b0h0w1e1u1v1x1z1}2Q2S2c2s2y3V3_3v4l5e5q6R6S6V6a6j6x8_8n8x9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=gT$oh$pQ$rhR)r$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z*e+S+W+b,i,l,q-b-j-x.O.`.m.t/g0T0b0h0w1e1u1v1x1z1}2Q2S2s2y3V3_4l5q6R6S6V6j6x8_8n8x!s=e$Z$n'U)p,}-Q/O2c3v5e6a9q:T;j;m;n;q;r;s;t;u;v;w;x;y;z;{;|;}<P<S<a<d<e<g<o<p<y<z=g#glOPXZst!Z!`!o#S#d#o#{$n%k&h&k&l&o&q&r&t&x'Q'_({)p*e+W+b,i,l,q-b.`/O/g0T0b1e1u1v1x1z1}2Q2S3V3v4l5q6R6S6V6x8_8n!O%Ri$d%O%Q%]%^%b*O*Q*]*s*t.x/p0W0Y0e4Q4r9Z=d=l=m#d(t#v$b$c$x${)v*S*V*c+a+d+{,O._/]/f/q/s1X1[1d3U4P4[4a4z4}5p6t7d7n8[8{9d9j9v:Y:h:q:y;Q<T<V<Z<]<_<h<j<m<q<s<u<w<{=p=qQ+O%`Q/[){o3q<Q<R<U<W<[<^<`<i<k<n<r<t<v<x<|!O$yi$d%O%Q%]%^%b*O*Q*]*s*t.x/p0W0Y0e4Q4r9Z=d=l=mQ*_$zU*h$|*W*kQ+P%aQ0O*i#d=V#v$b$c$x${)v*S*V*c+a+d+{,O._/]/f/q/s1X1[1d3U4P4[4a4z4}5p6t7d7n8[8{9d9j9v:Y:h:q:y;Q<T<V<Z<]<_<h<j<m<q<s<u<w<{=p=qn=W<Q<R<U<W<[<^<`<i<k<n<r<t<v<x<|Q=[=hQ=]=iQ=^=jR=_=k!O%Ri$d%O%Q%]%^%b*O*Q*]*s*t.x/p0W0Y0e4Q4r9Z=d=l=m#d(t#v$b$c$x${)v*S*V*c+a+d+{,O._/]/f/q/s1X1[1d3U4P4[4a4z4}5p6t7d7n8[8{9d9j9v:Y:h:q:y;Q<T<V<Z<]<_<h<j<m<q<s<u<w<{=p=qo3q<Q<R<U<W<[<^<`<i<k<n<r<t<v<x<|noOXst!Z#d%k&o&q&r&t,l,q1}2QS*b${*VQ,z&{Q,{&}R4Z/q%S%Si#v$b$c$d$x${%O%Q%]%^%b)v*O*Q*S*V*]*c*s*t+a+d+{,O._.x/]/f/p/q/s0W0Y0e1X1[1d3U4P4Q4[4a4r4z4}5p6t7d7n8[8{9Z9d9j9v:Y:h:q:y;Q<Q<R<T<U<V<W<Z<[<]<^<_<`<h<i<j<k<m<n<q<r<s<t<u<v<w<x<{<|=d=l=m=p=qQ+}&YQ1Z,PQ5a1YR8R5bV*j$|*W*kU*j$|*W*kT5h1b5iS/w*e/gQ4i0TT7p4l9sQ+e%vQ/}*hQ0s+fQ1h,YQ5t1iQ8a5uQ9y8bR:s9z!O%Oi$d%O%Q%]%^%b*O*Q*]*s*t.x/p0W0Y0e4Q4r9Z=d=l=mr*O$v)b*P*q+Q/o0[0]3t4X4v7^7r:`=U=b=cS0W*p0X#d<T#v$b$c$x${)v*S*V*c+a+d+{,O._/]/f/q/s1X1[1d3U4P4[4a4z4}5p6t7d7n8[8{9d9j9v:Y:h:q:y;Q<T<V<Z<]<_<h<j<m<q<s<u<w<{=p=qn<U<Q<R<U<W<[<^<`<i<k<n<r<t<v<x<|!b<h(r)`*X*a.c.f.j/W/d/t0l1W3Z3}4Y4^5`6y6|7e7h7t7v9_9g:e:i:z;P;[=n=o`<i3p7P7S7W9R:[:_;_S<s.e3[T<t7R9U!O%Qi$d%O%Q%]%^%b*O*Q*]*s*t.x/p0W0Y0e4Q4r9Z=d=l=mv*Q$v)b*R*p+Q/`/o0[0]3t4X4n4v7^7r:`=U=b=cS0Y*q0Z#d<V#v$b$c$x${)v*S*V*c+a+d+{,O._/]/f/q/s1X1[1d3U4P4[4a4z4}5p6t7d7n8[8{9d9j9v:Y:h:q:y;Q<T<V<Z<]<_<h<j<m<q<s<u<w<{=p=qn<W<Q<R<U<W<[<^<`<i<k<n<r<t<v<x<|!f<j(r)`*X*a.d.e.j/W/d/t0l1W3X3Z3}4Y4^5`6y6z6|7e7h7t7v9_9g:e:i:z;P;[=n=od<k3p7Q7R7W9R9S:[:]:_;_S<u.f3]T<v7S9VrnOXst!V!Z#d%k&f&o&q&r&t,l,q1}2QQ&c!UR,i&lrnOXst!V!Z#d%k&f&o&q&r&t,l,q1}2QR&c!UQ,R&ZR1V+zsnOXst!V!Z#d%k&f&o&q&r&t,l,q1}2QQ1c,WS5o1f1gU8Z5m5n5rS9u8]8^S:o9t9wQ;R:pR;];SQ&j!VR,b&fR5{1oR9|8dS&O|&TR1O+qQ&o!WR,l&pR,r&uT2O,q2QR,v&vQ,u&vR2X,vQ'v!{R-r'vSsOtQ#dXT%ns#dQ#OTR'x#OQ#RUR'z#RQ)x$uR/X)xQ#UVR'}#UQ#XWU(T#X(U-yQ(U#YR-y(VQ-V'VR2e-VQ.n(vS3`.n3aR3a.oQ-^']R2i-^Y!rQ']-^1b5iR'g!rQ.y)bR3u.yU#_W%f*VU([#_(]-zQ(]#`R-z(WQ-Y'YR2g-Yt`OXst!V!Z#d%k&f&h&o&q&r&t,l,q1}2QS#hZ%cU#r`#h.TR.T(gQ(h#jQ.Q(dW.Y(h.Q2z6oQ2z.RR6o2{Q)k$lR/P)kQ$phR)q$pQ$`cU)^$`-u<OQ-u;lR<O)nQ/j*YW4T/j4U7b9^U4U/k/l/mS7b4V4WR9^7c$])}$v(r)`)b*X*a*p*q*{*|+Q.e.f.h.i.j/W/`/b/d/o/t0[0]0l1W3X3Y3Z3p3t3}4X4Y4^4n4p4v5`6y6z6{6|7R7S7U7V7W7^7e7h7r7t7v9R9S9T9_9g:[:]:^:_:`:e:i:z;P;[;_=U=b=c=n=oQ/r*aU4]/r4_7fQ4_/tR7f4^S*k$|*WR0Q*kr*P$v)b*p*q+Q/o0[0]3t4X4v7^7r:`=U=b=c!b.c(r)`*X*a.e.f.j/W/d/t0l1W3Z3}4Y4^5`6y6|7e7h7t7v9_9g:e:i:z;P;[=n=oU/a*P.c7Pa7P3p7R7S7W9R:[:_;_Q0X*pQ3[.eU4o0X3[9UR9U7Rv*R$v)b*p*q+Q/`/o0[0]3t4X4n4v7^7r:`=U=b=c!f.d(r)`*X*a.e.f.j/W/d/t0l1W3X3Z3}4Y4^5`6y6z6|7e7h7t7v9_9g:e:i:z;P;[=n=oU/c*R.d7Qe7Q3p7R7S7W9R9S:[:]:_;_Q0Z*qQ3].fU4q0Z3]9VR9V7SQ*v%UR0_*vQ4{0lR7u4{Q+Y%iR0k+YQ5d1]S8T5d9rR9r8UQ,T&[R1`,TQ5i1bR8W5iQ1n,_S5y1n8eR8e5{Q0y+mW5V0y5X7{9nQ5X0|Q7{5WR9n7|Q+r&OR1P+rQ2Q,qR6Z2QYrOXst#dQ&s!ZQ+[%kQ,k&oQ,m&qQ,n&rQ,p&tQ1{,lS2O,q2QR6Y1}Q%mpQ&w!_Q&z!aQ&|!bQ'O!cQ'n!uQ+Z%jQ+g%xQ+y&UQ,a&jQ,x&yW-i'h'p'q'tQ-p'lQ0P*jQ0t+hS1q,b,eQ2Y,wQ2Z,zQ2[,{Q2p-hW2r-k-l-o-qQ5O0uQ5[1SQ5_1WQ5s1hQ5}1sQ6X1|U6h2q2t2wQ6k2uQ7w5PQ8P5^Q8Q5`Q8V5hQ8`5tQ8f5|S8u6i6mQ8w6lQ9o7}Q9x8aQ9}8gQ:U8vQ:l9pQ:r9yQ:v:VR;T:sQ%xyQ'a!iQ'l!uU+h%y%z%{Q-P'SU-d'b'c'dS-h'h'rQ/x*fS0u+i+jQ2b-RS2n-e-fQ2u-mS4b/y/|Q5P0vQ6d2hQ6g2oQ6l2vU7i4d4e4hQ9e7kR:f9fS$wi=dR*w%VU%Ui%V=dR0^*uQ$viS(r#v+dS)`$b$cQ)b$dQ*X$xS*a${*VQ*p%OQ*q%QQ*{%]Q*|%^Q+Q%bQ.e<TQ.f<VQ.h<ZQ.i<]Q.j<_Q/W)vQ/`*OQ/b*QQ/d*SQ/o*]S/t*c/fQ0[*sQ0]*tl0l+a,O._1[1d3U5p6t8[8{9v:Y:q:yQ1W+{Q3X<hQ3Y<jQ3Z<mS3p<Q<RQ3t.xS3}/]4PQ4X/pQ4Y/qQ4^/sQ4n0WQ4p0YQ4v0eQ5`1XQ6y<qQ6z<sQ6{<uQ6|<wQ7R<UQ7S<WQ7U<[Q7V<^Q7W<`Q7^4QQ7e4[Q7h4aQ7r4rQ7t4zQ7v4}Q9R<nQ9S<iQ9T<kQ9_7dQ9g7nQ:[<rQ:]<tQ:^<vQ:_<xQ:`9ZQ:e9dQ:i9jQ:z<{Q;P:hQ;[;QQ;_<|Q=U=dQ=b=lQ=c=mQ=n=pR=o=qQ*y%[Q.g<XR7T<YnpOXst!Z#d%k&o&q&r&t,l,q1}2QQ!fPS#fZ#oQ&y!`W'e!o*e0T4lQ'|#SQ(}#{Q)o$nS,e&h&kQ,j&lQ,w&xS,|'Q/gQ-`'_Q.q({Q/T)pQ0i+WQ0o+bQ1y,iQ2l-bQ3S.`Q3y/OQ4t0bQ5n1eQ6P1uQ6Q1vQ6U1xQ6W1zQ6]2SQ6w3VQ7Z3vQ8^5qQ8j6RQ8k6SQ8m6VQ9P6xQ9w8_R:R8n#[cOPXZst!Z!`!o#d#o#{%k&h&k&l&o&q&r&t&x'Q'_({*e+W+b,i,l,q-b.`/g0T0b1e1u1v1x1z1}2Q2S3V4l5q6R6S6V6x8_8nQ#YWQ#eYQ%ouQ%qvS%sw!gS(P#W(SQ(V#ZQ(q#uQ(v#xQ)O$OQ)P$PQ)Q$QQ)R$RQ)S$SQ)T$TQ)U$UQ)V$VQ)W$WQ)X$XQ)Z$ZQ)]$_Q)_$aQ)d$eW)n$n)p/O3vQ+_%rQ+s&PS-S'U2cQ-q'oS-v(Q-xQ-{(YQ-}(aQ.l(uQ.o(wQ.s;jQ.u;mQ.v;nQ.w;qQ/Z)zQ0f+SQ2^,}Q2a-QQ2q-jQ2x.OQ3^.mQ3c;rQ3d;sQ3e;tQ3f;uQ3g;vQ3h;wQ3i;xQ3j;yQ3k;zQ3l;{Q3m;|Q3n.tQ3o<PQ3r<SQ3s<aQ3z;}Q4w0hQ5Q0wQ6c<dQ6i2sQ6n2yQ6}3_Q7O<eQ7X<gQ7Y<oQ8U5eQ8r6aQ8v6jQ9Q<pQ9W<yQ9X<zQ:V8xQ:m9qQ:u:TQ;l#SR=Z=gR#[WR'W!el!tQ!r!v!y!z']'i'j'k-^-n1b5i5kS'S!e-UU*f$|*W*kS-R'T'[S/|*g*mQ0U*nQ2h-[Q4h0SR4m0VR(x#xQ!fQT-]']-^]!qQ!r']-^1b5iQ#p]R'f;kR)c$dY!uQ']-^1b5iQ'h!rS'r!v!yS't!z5kS-m'i'jQ-o'kR2v-nT#kZ%cS#jZ%cS%im,hU(d#h#i#lS.R(e(fQ.V(gQ0j+XQ2{.SU2|.T.U.WS6p2}3OR8y6qd#^W#W#Z%f(Q(Z*V+U-|/fr#gZm#h#i#l%c(e(f(g+X.S.T.U.W2}3O6qS*Y$x*^Q/m*ZQ1w,hQ2_-OQ4R/iQ6_2VQ7a4SQ8q6`T=R'U+VV#aW%f*VU#`W%f*VS(R#W(ZU(W#Z+U/fS-T'U+VT-w(Q-|V'Z!e%g*WQ$lfR)u$qT)j$l)kR3x.}T*[$x*^T*d${*VQ0m+aQ1Y,OQ3Q._Q5b1[Q5m1dQ6u3UQ8]5pQ8|6tQ9t8[Q:W8{Q:p9vQ:x:YQ;S:qR;V:ynqOXst!Z#d%k&o&q&r&t,l,q1}2QQ&i!VR,a&ftmOXst!U!V!Z#d%k&f&o&q&r&t,l,q1}2QR,h&lT%jm,hR1^,QR,`&dQ&S|R+x&TR+n%}T&m!W&pT&n!W&pT2P,q2Q",nodeNames:"\u26A0 ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:Drt,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[jrt],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Sp(V!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(V!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(k%1l(Sp(V!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Sp(V!b$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Sp(V!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Sp(V!b#m(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(v+JY$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(U';W$h&j(SpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(SpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(SpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!i/.^$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!h!Lf$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Sp(V!b(Q%&f#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Sp(V!b#k(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Sp(V!bo+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Y+Jf$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Sp(V!b}.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!X!L^$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Sp(V!b#l(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Sp(V!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(V!b!U7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!U7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Sp!U7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Sp!U7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Sp!U7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Sp!U7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(SpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(SpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Sp(V!b!U7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Sp(V!b!U7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Sp(V!b!U7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Sp(V!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Sp(V!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Sp(V!b'z0/l!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Sp(V!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(V!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(V!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(SpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(SpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Sp(V!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Sp(V!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Sp(V!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-<U(Sp(V!b(z7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#o(Ch(Sp(V!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#p(Ch(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#]*!Y$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#h(Cl$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#p(Ch$e#|$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#p(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#o(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#o(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(n(Ct$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!y$Ip$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!P0,v$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!V#)l$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Sp(V!b(]+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Sp(V!b(P,2j$^#t(a$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Sp(V!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X![#Hb(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(u+JY$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Irt,Brt,Frt,Vrt,2,3,4,5,6,7,8,9,10,11,12,13,14,Lrt,new vM("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new vM("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:t=>zrt[t]||-1},{term:339,get:t=>Qrt[t]||-1},{term:92,get:t=>Hrt[t]||-1}],tokenPrec:15004}),pJ=[Va("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Va("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Va("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Va("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Va("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Va(`try {
  215. \${}
  216. } catch (\${error}) {
  217. \${}
  218. }`,{label:"try",detail:"/ catch block",type:"keyword"}),Va("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Va(`if (\${}) {
  219. \${}
  220. } else {
  221. \${}
  222. }`,{label:"if",detail:"/ else block",type:"keyword"}),Va(`class \${name} {
  223. constructor(\${params}) {
  224. \${}
  225. }
  226. }`,{label:"class",detail:"definition",type:"keyword"}),Va('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Va('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Urt=pJ.concat([Va("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Va("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Va("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Mj=new jZe,gJ=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Zv(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const qrt=["FunctionDeclaration"],Yrt={FunctionDeclaration:Zv("function"),ClassDeclaration:Zv("class"),ClassExpression:()=>!0,EnumDeclaration:Zv("constant"),TypeAliasDeclaration:Zv("type"),NamespaceDeclaration:Zv("namespace"),VariableDefinition(t,e){t.matchContext(qrt)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function mJ(t,e){let n=Mj.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(ao.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=Yrt[a.name];if(s&&s(a,o)||gJ.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of mJ(t,a.node))r.push(s);return!1}}),Mj.set(e,r),r}const Rj=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,vJ=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Xrt(t){let e=uo(t.state).resolveInner(t.pos,-1);if(vJ.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Rj.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)gJ.has(i.name)&&(r=r.concat(mJ(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Rj}}const Yh=G0.define({name:"javascript",parser:Wrt.configure({props:[OD.add({IfStatement:Xy({except:/^\s*({|else\b)/}),TryStatement:Xy({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:sGe,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:aGe({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Xy({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),SD.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":bG,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),yJ={test:t=>/^JSX/.test(t.name),facet:pG({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Zrt=Yh.configure({dialect:"ts"},"typescript"),Grt=Yh.configure({dialect:"jsx",props:[bD.add(t=>t.isTop?[yJ]:void 0)]}),Krt=Yh.configure({dialect:"jsx ts",props:[bD.add(t=>t.isTop?[yJ]:void 0)]},"typescript");let bJ=t=>({label:t,type:"keyword"});const _J="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(bJ),Jrt=_J.concat(["declare","implements","private","protected","public"].map(bJ));function OJ(t={}){let e=t.jsx?t.typescript?Krt:Grt:t.typescript?Zrt:Yh,n=t.typescript?Urt.concat(Jrt):pJ.concat(_J);return new mG(e,[Yh.data.of({autocomplete:EJe(vJ,_K(n))}),Yh.data.of({autocomplete:Xrt}),t.jsx?nit:[]])}function eit(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function $j(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const tit=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),nit=Ut.inputHandler.of((t,e,n,r,i)=>{if((tit?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Yh.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var u;let{head:c}=l,d=uo(a).resolveInner(c-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(c-1,c)!=r||d.name=="JSXAttributeValue"&&d.to>c)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:"</>"}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,m=h.parent;if(m&&h.from==c-2&&((f=$j(a.doc,m.firstChild,c))||((u=m.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let g=`${f}>`;return{range:yt.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(r==">"){let h=eit(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(f=$j(a.doc,h,c)))return{range:l,changes:{from:c,insert:`</${f}>`}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function wJ(t,e){return function(){return t.apply(e,arguments)}}const{toString:rit}=Object.prototype,{getPrototypeOf:ZD}=Object,VC=(t=>e=>{const n=rit.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yu=t=>(t=t.toLowerCase(),e=>VC(e)===t),jC=t=>e=>typeof e===t,{isArray:cv}=Array,ub=jC("undefined");function iit(t){return t!==null&&!ub(t)&&t.constructor!==null&&!ub(t.constructor)&&Rs(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const SJ=yu("ArrayBuffer");function oit(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&SJ(t.buffer),e}const ait=jC("string"),Rs=jC("function"),xJ=jC("number"),zC=t=>t!==null&&typeof t=="object",sit=t=>t===!0||t===!1,G1=t=>{if(VC(t)!=="object")return!1;const e=ZD(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},lit=yu("Date"),uit=yu("File"),cit=yu("Blob"),dit=yu("FileList"),fit=t=>zC(t)&&Rs(t.pipe),hit=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Rs(t.append)&&((e=VC(t))==="formdata"||e==="object"&&Rs(t.toString)&&t.toString()==="[object FormData]"))},pit=yu("URLSearchParams"),[git,mit,vit,yit]=["ReadableStream","Request","Response","Headers"].map(yu),bit=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function n_(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let r,i;if(typeof t!="object"&&(t=[t]),cv(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length;let s;for(r=0;r<a;r++)s=o[r],e.call(null,t[s],s,t)}}function CJ(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Ih=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),EJ=t=>!ub(t)&&t!==Ih;function wM(){const{caseless:t}=EJ(this)&&this||{},e={},n=(r,i)=>{const o=t&&CJ(e,i)||i;G1(e[o])&&G1(r)?e[o]=wM(e[o],r):G1(r)?e[o]=wM({},r):cv(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&n_(arguments[r],n);return e}const _it=(t,e,n,{allOwnKeys:r}={})=>(n_(e,(i,o)=>{n&&Rs(i)?t[o]=wJ(i,n):t[o]=i},{allOwnKeys:r}),t),Oit=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),wit=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Sit=(t,e,n,r)=>{let i,o,a;const s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!r||r(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=n!==!1&&ZD(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},xit=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Cit=t=>{if(!t)return null;if(cv(t))return t;let e=t.length;if(!xJ(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Eit=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&ZD(Uint8Array)),Tit=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},kit=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Pit=yu("HTMLFormElement"),Ait=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Nj=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Mit=yu("RegExp"),TJ=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};n_(n,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(r[o]=a||i)}),Object.defineProperties(t,r)},Rit=t=>{TJ(t,(e,n)=>{if(Rs(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(!!Rs(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$it=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return cv(t)?r(t):r(String(t).split(e)),n},Nit=()=>{},Dit=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,F2="abcdefghijklmnopqrstuvwxyz",Dj="0123456789",kJ={DIGIT:Dj,ALPHA:F2,ALPHA_DIGIT:F2+F2.toUpperCase()+Dj},Lit=(t=16,e=kJ.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Iit(t){return!!(t&&Rs(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Bit=t=>{const e=new Array(10),n=(r,i)=>{if(zC(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=cv(r)?[]:{};return n_(r,(a,s)=>{const l=n(a,i+1);!ub(l)&&(o[s]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Fit=yu("AsyncFunction"),Vit=t=>t&&(zC(t)||Rs(t))&&Rs(t.then)&&Rs(t.catch),PJ=((t,e)=>t?setImmediate:e?((n,r)=>(Ih.addEventListener("message",({source:i,data:o})=>{i===Ih&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ih.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rs(Ih.postMessage)),jit=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Ih):typeof process!="undefined"&&process.nextTick||PJ;var lt={isArray:cv,isArrayBuffer:SJ,isBuffer:iit,isFormData:hit,isArrayBufferView:oit,isString:ait,isNumber:xJ,isBoolean:sit,isObject:zC,isPlainObject:G1,isReadableStream:git,isRequest:mit,isResponse:vit,isHeaders:yit,isUndefined:ub,isDate:lit,isFile:uit,isBlob:cit,isRegExp:Mit,isFunction:Rs,isStream:fit,isURLSearchParams:pit,isTypedArray:Eit,isFileList:dit,forEach:n_,merge:wM,extend:_it,trim:bit,stripBOM:Oit,inherits:wit,toFlatObject:Sit,kindOf:VC,kindOfTest:yu,endsWith:xit,toArray:Cit,forEachEntry:Tit,matchAll:kit,isHTMLForm:Pit,hasOwnProperty:Nj,hasOwnProp:Nj,reduceDescriptors:TJ,freezeMethods:Rit,toObjectSet:$it,toCamelCase:Ait,noop:Nit,toFiniteNumber:Dit,findKey:CJ,global:Ih,isContextDefined:EJ,ALPHABET:kJ,generateString:Lit,isSpecCompliantForm:Iit,toJSONObject:Bit,isAsyncFn:Fit,isThenable:Vit,setImmediate:PJ,asap:jit};function Jn(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}lt.inherits(Jn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:lt.toJSONObject(this.config),code:this.code,status:this.status}}});const AJ=Jn.prototype,MJ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{MJ[t]={value:t}});Object.defineProperties(Jn,MJ);Object.defineProperty(AJ,"isAxiosError",{value:!0});Jn.from=(t,e,n,r,i,o)=>{const a=Object.create(AJ);return lt.toFlatObject(t,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Jn.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};var zit=null;function SM(t){return lt.isPlainObject(t)||lt.isArray(t)}function RJ(t){return lt.endsWith(t,"[]")?t.slice(0,-2):t}function Lj(t,e,n){return t?t.concat(e).map(function(i,o){return i=RJ(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Qit(t){return lt.isArray(t)&&!t.some(SM)}const Hit=lt.toFlatObject(lt,{},null,function(e){return/^is[A-Z]/.test(e)});function QC(t,e,n){if(!lt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=lt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!lt.isUndefined(y[g])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&lt.isSpecCompliantForm(e);if(!lt.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(lt.isDate(m))return m.toISOString();if(!l&&lt.isBlob(m))throw new Jn("Blob is not supported. Use a Buffer instead.");return lt.isArrayBuffer(m)||lt.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,g,y){let b=m;if(m&&!y&&typeof m=="object"){if(lt.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(lt.isArray(m)&&Qit(m)||(lt.isFileList(m)||lt.endsWith(g,"[]"))&&(b=lt.toArray(m)))return g=RJ(g),b.forEach(function(O,S){!(lt.isUndefined(O)||O===null)&&e.append(a===!0?Lj([g],S,o):a===null?g:g+"[]",u(O))}),!1}return SM(m)?!0:(e.append(Lj(y,g,o),u(m)),!1)}const d=[],f=Object.assign(Hit,{defaultVisitor:c,convertValue:u,isVisitable:SM});function h(m,g){if(!lt.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),lt.forEach(m,function(b,w){(!(lt.isUndefined(b)||b===null)&&i.call(e,b,lt.isString(w)?w.trim():w,g,f))===!0&&h(b,g?g.concat(w):[w])}),d.pop()}}if(!lt.isObject(t))throw new TypeError("data must be an object");return h(t),e}function Ij(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function GD(t,e){this._pairs=[],t&&QC(t,this,e)}const $J=GD.prototype;$J.append=function(e,n){this._pairs.push([e,n])};$J.toString=function(e){const n=e?function(r){return e.call(this,r,Ij)}:Ij;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Wit(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function NJ(t,e,n){if(!e)return t;const r=n&&n.encode||Wit;lt.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=lt.isURLSearchParams(e)?e.toString():new GD(e,n).toString(r),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Uit{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){lt.forEach(this.handlers,function(r){r!==null&&e(r)})}}var Bj=Uit,DJ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qit=typeof URLSearchParams!="undefined"?URLSearchParams:GD,Yit=typeof FormData!="undefined"?FormData:null,Xit=typeof Blob!="undefined"?Blob:null,Zit={isBrowser:!0,classes:{URLSearchParams:qit,FormData:Yit,Blob:Xit},protocols:["http","https","file","blob","url","data"]};const KD=typeof window!="undefined"&&typeof document!="undefined",xM=typeof navigator=="object"&&navigator||void 0,Git=KD&&(!xM||["ReactNative","NativeScript","NS"].indexOf(xM.product)<0),Kit=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Jit=KD&&window.location.href||"http://localhost";var eot=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:KD,hasStandardBrowserWebWorkerEnv:Kit,hasStandardBrowserEnv:Git,navigator:xM,origin:Jit},Symbol.toStringTag,{value:"Module"})),ia={...eot,...Zit};function tot(t,e){return QC(t,new ia.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return ia.isNode&&lt.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function not(t){return lt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function rot(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function LJ(t){function e(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&lt.isArray(i)?i.length:a,l?(lt.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!lt.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],o)&&lt.isArray(i[a])&&(i[a]=rot(i[a])),!s)}if(lt.isFormData(t)&&lt.isFunction(t.entries)){const n={};return lt.forEachEntry(t,(r,i)=>{e(not(r),i,n,0)}),n}return null}function iot(t,e,n){if(lt.isString(t))try{return(e||JSON.parse)(t),lt.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const JD={transitional:DJ,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=lt.isObject(e);if(o&&lt.isHTMLForm(e)&&(e=new FormData(e)),lt.isFormData(e))return i?JSON.stringify(LJ(e)):e;if(lt.isArrayBuffer(e)||lt.isBuffer(e)||lt.isStream(e)||lt.isFile(e)||lt.isBlob(e)||lt.isReadableStream(e))return e;if(lt.isArrayBufferView(e))return e.buffer;if(lt.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tot(e,this.formSerializer).toString();if((s=lt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return QC(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),iot(e)):e}],transformResponse:[function(e){const n=this.transitional||JD.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(lt.isResponse(e)||lt.isReadableStream(e))return e;if(e&&lt.isString(e)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?Jn.from(s,Jn.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ia.classes.FormData,Blob:ia.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};lt.forEach(["delete","get","head","post","put","patch"],t=>{JD.headers[t]={}});var eL=JD;const oot=lt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var aot=t=>{const e={};let n,r,i;return t&&t.split(`
  227. `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||e[n]&&oot[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};const Fj=Symbol("internals");function Gv(t){return t&&String(t).trim().toLowerCase()}function K1(t){return t===!1||t==null?t:lt.isArray(t)?t.map(K1):String(t)}function sot(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const lot=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function V2(t,e,n,r,i){if(lt.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!lt.isString(e)){if(lt.isString(r))return e.indexOf(r)!==-1;if(lt.isRegExp(r))return r.test(e)}}function uot(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function cot(t,e){const n=lt.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,a){return this[r].call(this,e,i,o,a)},configurable:!0})})}class HC{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(s,l,u){const c=Gv(l);if(!c)throw new Error("header name must be a non-empty string");const d=lt.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=K1(s))}const a=(s,l)=>lt.forEach(s,(u,c)=>o(u,c,l));if(lt.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(lt.isString(e)&&(e=e.trim())&&!lot(e))a(aot(e),n);else if(lt.isHeaders(e))for(const[s,l]of e.entries())o(l,s,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=Gv(e),e){const r=lt.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return sot(i);if(lt.isFunction(n))return n.call(this,i,r);if(lt.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Gv(e),e){const r=lt.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||V2(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(a){if(a=Gv(a),a){const s=lt.findKey(r,a);s&&(!n||V2(r,r[s],s,n))&&(delete r[s],i=!0)}}return lt.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||V2(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return lt.forEach(this,(i,o)=>{const a=lt.findKey(r,o);if(a){n[a]=K1(i),delete n[o];return}const s=e?uot(o):String(o).trim();s!==o&&delete n[o],n[s]=K1(i),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return lt.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&lt.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
  228. `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Fj]=this[Fj]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Gv(a);r[s]||(cot(i,a),r[s]=!0)}return lt.isArray(e)?e.forEach(o):o(e),this}}HC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);lt.reduceDescriptors(HC.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});lt.freezeMethods(HC);var ou=HC;function j2(t,e){const n=this||eL,r=e||n,i=ou.from(r.headers);let o=r.data;return lt.forEach(t,function(s){o=s.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function IJ(t){return!!(t&&t.__CANCEL__)}function dv(t,e,n){Jn.call(this,t==null?"canceled":t,Jn.ERR_CANCELED,e,n),this.name="CanceledError"}lt.inherits(dv,Jn,{__CANCEL__:!0});function BJ(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Jn("Request failed with status code "+n.status,[Jn.ERR_BAD_REQUEST,Jn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dot(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fot(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[o];a||(a=u),n[i]=l,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-a<e)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function hot(t,e){let n=0,r=1e3/e,i,o;const a=(u,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),t.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const KS=(t,e,n=3)=>{let r=0;const i=fot(50,250);return hot(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,u=i(l),c=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-a)/u:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},n)},Vj=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},jj=t=>(...e)=>lt.asap(()=>t(...e));var pot=ia.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ia.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ia.origin),ia.navigator&&/(msie|trident)/i.test(ia.navigator.userAgent)):()=>!0,got=ia.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const a=[t+"="+encodeURIComponent(e)];lt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),lt.isString(r)&&a.push("path="+r),lt.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mot(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function vot(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function FJ(t,e){return t&&!mot(e)?vot(t,e):e}const zj=t=>t instanceof ou?{...t}:t;function gp(t,e){e=e||{};const n={};function r(u,c,d,f){return lt.isPlainObject(u)&&lt.isPlainObject(c)?lt.merge.call({caseless:f},u,c):lt.isPlainObject(c)?lt.merge({},c):lt.isArray(c)?c.slice():c}function i(u,c,d,f){if(lt.isUndefined(c)){if(!lt.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function o(u,c){if(!lt.isUndefined(c))return r(void 0,c)}function a(u,c){if(lt.isUndefined(c)){if(!lt.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(d in e)return r(u,c);if(d in t)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>i(zj(u),zj(c),d,!0)};return lt.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||i,f=d(t[c],e[c],c);lt.isUndefined(f)&&d!==s||(n[c]=f)}),n}var VJ=t=>{const e=gp({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;e.headers=a=ou.from(a),e.url=NJ(FJ(e.baseURL,e.url),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(lt.isFormData(n)){if(ia.hasStandardBrowserEnv||ia.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(ia.hasStandardBrowserEnv&&(r&&lt.isFunction(r)&&(r=r(e)),r||r!==!1&&pot(e.url))){const u=i&&o&&got.read(o);u&&a.set(i,u)}return e};const yot=typeof XMLHttpRequest!="undefined";var bot=yot&&function(t){return new Promise(function(n,r){const i=VJ(t);let o=i.data;const a=ou.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,m;function g(){h&&h(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function b(){if(!y)return;const O=ou.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:t,request:y};BJ(function(E){n(E),g()},function(E){r(E),g()},x),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){!y||(r(new Jn("Request aborted",Jn.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Jn("Network Error",Jn.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||DJ;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Jn(S,x.clarifyTimeoutError?Jn.ETIMEDOUT:Jn.ECONNABORTED,t,y)),y=null},o===void 0&&a.setContentType(null),"setRequestHeader"in y&&lt.forEach(a.toJSON(),function(S,x){y.setRequestHeader(x,S)}),lt.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),s&&s!=="json"&&(y.responseType=i.responseType),u&&([f,m]=KS(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,h]=KS(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=O=>{!y||(r(!O||O.type?new dv(null,t,y):O),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=dot(i.url);if(w&&ia.protocols.indexOf(w)===-1){r(new Jn("Unsupported protocol "+w+":",Jn.ERR_BAD_REQUEST,t));return}y.send(o||null)})};const _ot=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Jn?c:new dv(c instanceof Error?c.message:c))}};let a=e&&setTimeout(()=>{a=null,o(new Jn(`timeout ${e} of ms exceeded`,Jn.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>lt.asap(s),l}};var Oot=_ot;const wot=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Sot=async function*(t,e){for await(const n of xot(t))yield*wot(n,e)},xot=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Qj=(t,e,n,r)=>{const i=Sot(t,e);let o=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},WC=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",jJ=WC&&typeof ReadableStream=="function",Cot=WC&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),zJ=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Eot=jJ&&zJ(()=>{let t=!1;const e=new Request(ia.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Hj=64*1024,CM=jJ&&zJ(()=>lt.isReadableStream(new Response("").body)),JS={stream:CM&&(t=>t.body)};WC&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!JS[e]&&(JS[e]=lt.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Jn(`Response type '${e}' is not supported`,Jn.ERR_NOT_SUPPORT,r)})})})(new Response);const Tot=async t=>{if(t==null)return 0;if(lt.isBlob(t))return t.size;if(lt.isSpecCompliantForm(t))return(await new Request(ia.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(lt.isArrayBufferView(t)||lt.isArrayBuffer(t))return t.byteLength;if(lt.isURLSearchParams(t)&&(t=t+""),lt.isString(t))return(await Cot(t)).byteLength},kot=async(t,e)=>{const n=lt.toFiniteNumber(t.getContentLength());return n==null?Tot(e):n};var Pot=WC&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=VJ(t);u=u?(u+"").toLowerCase():"text";let h=Oot([i,o&&o.toAbortSignal()],a),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(l&&Eot&&n!=="get"&&n!=="head"&&(y=await kot(c,r))!==0){let x=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(lt.isFormData(r)&&(C=x.headers.get("content-type"))&&c.setContentType(C),x.body){const[E,T]=Vj(y,KS(jj(l)));r=Qj(x.body,Hj,E,T)}}lt.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let w=await fetch(m);const O=CM&&(u==="stream"||u==="response");if(CM&&(s||O&&g)){const x={};["status","statusText","headers"].forEach(P=>{x[P]=w[P]});const C=lt.toFiniteNumber(w.headers.get("content-length")),[E,T]=s&&Vj(C,KS(jj(s),!0))||[];w=new Response(Qj(w.body,Hj,E,()=>{T&&T(),g&&g()}),x)}u=u||"text";let S=await JS[lt.findKey(JS,u)||"text"](w,t);return!O&&g&&g(),await new Promise((x,C)=>{BJ(x,C,{data:S,headers:ou.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:m})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Jn("Network Error",Jn.ERR_NETWORK,t,m),{cause:b.cause||b}):Jn.from(b,b&&b.code,t,m)}});const EM={http:zit,xhr:bot,fetch:Pot};lt.forEach(EM,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Wj=t=>`- ${t}`,Aot=t=>lt.isFunction(t)||t===null||t===!1;var QJ={getAdapter:t=>{t=lt.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let a;if(r=n,!Aot(n)&&(r=EM[(a=String(n)).toLowerCase()],r===void 0))throw new Jn(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since :
  229. `+o.map(Wj).join(`
  230. `):" "+Wj(o[0]):"as no adapter specified";throw new Jn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:EM};function z2(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new dv(null,t)}function Uj(t){return z2(t),t.headers=ou.from(t.headers),t.data=j2.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),QJ.getAdapter(t.adapter||eL.adapter)(t).then(function(r){return z2(t),r.data=j2.call(t,t.transformResponse,r),r.headers=ou.from(r.headers),r},function(r){return IJ(r)||(z2(t),r&&r.response&&(r.response.data=j2.call(t,t.transformResponse,r.response),r.response.headers=ou.from(r.response.headers))),Promise.reject(r)})}const HJ="1.7.9",UC={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{UC[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qj={};UC.transitional=function(e,n,r){function i(o,a){return"[Axios v"+HJ+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(e===!1)throw new Jn(i(a," has been removed"+(n?" in "+n:"")),Jn.ERR_DEPRECATED);return n&&!qj[a]&&(qj[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,a,s):!0}};UC.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Mot(t,e,n){if(typeof t!="object")throw new Jn("options must be an object",Jn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const s=t[o],l=s===void 0||a(s,o,t);if(l!==!0)throw new Jn("option "+o+" must be "+l,Jn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Jn("Unknown option "+o,Jn.ERR_BAD_OPTION)}}var J1={assertOptions:Mot,validators:UC};const ku=J1.validators;class ex{constructor(e){this.defaults=e,this.interceptors={request:new Bj,response:new Bj}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
  231. `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=gp(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&J1.assertOptions(r,{silentJSONParsing:ku.transitional(ku.boolean),forcedJSONParsing:ku.transitional(ku.boolean),clarifyTimeoutError:ku.transitional(ku.boolean)},!1),i!=null&&(lt.isFunction(i)?n.paramsSerializer={serialize:i}:J1.assertOptions(i,{encode:ku.function,serialize:ku.function},!0)),J1.assertOptions(n,{baseUrl:ku.spelling("baseURL"),withXsrfToken:ku.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&lt.merge(o.common,o[n.method]);o&&lt.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ou.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!l){const m=[Uj.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,u),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let h=n;for(d=0;d<f;){const m=s[d++],g=s[d++];try{h=m(h)}catch(y){g.call(this,y);break}}try{c=Uj.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=gp(this.defaults,e);const n=FJ(e.baseURL,e.url);return NJ(n,e.params,e.paramsSerializer)}}lt.forEach(["delete","get","head","options"],function(e){ex.prototype[e]=function(n,r){return this.request(gp(r||{},{method:e,url:n,data:(r||{}).data}))}});lt.forEach(["post","put","patch"],function(e){function n(r){return function(o,a,s){return this.request(gp(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}ex.prototype[e]=n(),ex.prototype[e+"Form"]=n(!0)});var ew=ex;class tL{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,s){r.reason||(r.reason=new dv(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new tL(function(i){e=i}),cancel:e}}}var Rot=tL;function $ot(t){return function(n){return t.apply(null,n)}}function Not(t){return lt.isObject(t)&&t.isAxiosError===!0}const TM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(TM).forEach(([t,e])=>{TM[e]=t});var Dot=TM;function WJ(t){const e=new ew(t),n=wJ(ew.prototype.request,e);return lt.extend(n,ew.prototype,e,{allOwnKeys:!0}),lt.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return WJ(gp(t,i))},n}const Ki=WJ(eL);Ki.Axios=ew;Ki.CanceledError=dv;Ki.CancelToken=Rot;Ki.isCancel=IJ;Ki.VERSION=HJ;Ki.toFormData=QC;Ki.AxiosError=Jn;Ki.Cancel=Ki.CanceledError;Ki.all=function(e){return Promise.all(e)};Ki.spread=$ot;Ki.isAxiosError=Not;Ki.mergeConfig=gp;Ki.AxiosHeaders=ou;Ki.formToJSON=t=>LJ(lt.isHTMLForm(t)?new FormData(t):t);Ki.getAdapter=QJ.getAdapter;Ki.HttpStatusCode=Dot;Ki.default=Ki;var Lot=Ki;const Iot=localStorage.getItem("token"),Bot=Lot.create({baseURL:window.allEnv.rule.iotServer,timeout:6e4,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Iot}`}});function Yj(t,e){return Bot.get(t,{params:e})}const Fot={class:"node-property-item"},Vot={key:0},jot={key:1},zot={class:"pair-content"},Qot={key:2},Hot={key:3},Wot={key:4},Uot={class:"pair-content"},qot={key:5},Yot={class:"pair-content"},Xot={key:6},Zot={class:"node-property-sub-item"},Got={key:7},Kot={key:8},Jot={key:9},eat={key:10},tat={__name:"NodePropertyItem",props:["nodePropertyForm","configuration","fields","parentField","currentNodeModel","lf"],setup(t,{expose:e}){const{nodePropertyForm:n,configuration:r,fields:i,parentField:o,currentNodeModel:a,lf:s}=t;F("");const l=[OJ()],u=F(),c=F(),d=F([]);F({}),F({});const f=F(null),h=F("300px");(i||[]).forEach(N=>{if(N.component&&N.component.type==="select"&&N.component.defineOptions&&(N.component.options=N.component.defineOptions||[]),N.component&&N.component.type==="select"&&N.component.optionApi&&N.component.autoGetData){N.component.loading=!0,Yj(N.component.optionApi,N.component.apiParams).then(L=>{N.component.options=(N.component.defineOptions||[]).concat(L.data.data[N.component.resDataKey]||[])}).finally(()=>N.component.loading=!1);const $=r[N.name],W=N.component.onChangeGetDataKey;W&&g($,W,!0)}});function g(N,$,W=!1){if(!N)return;const L=i.find(I=>I.name===$);!L||(W||(r[$]=L.component.defineOptions?L.component.defineOptions[0].value:null),L.component.options=L.component.defineOptions||[],L.component.loading=!0,Yj(L.component.optionApi,{[L.component.getDataByKey]:N}).then(I=>{L.component.options=(L.component.defineOptions||[]).concat(I.data.data[L.component.resDataKey]||[])}).finally(()=>L.component.loading=!1))}const y=function(N){r[N]=lb.js(r[N],{indent_size:2})},b=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():(h.value="100%",Hr.request(f.value[0])))};Hr.on("change",()=>{Hr.isFullscreen?h.value="100%":h.value="300px"}),function(){let N={};if(i&&i.forEach($=>{N[$.name]=$}),r){let $={},W={};for(let L in r){let I=Bn(r[L]),U=N[L];if(!(!U||U.component)){if(I&&I instanceof Array)$[L]=[],I.forEach(Q=>{$[L].push({key:Q})});else if(I&&typeof I=="object"&&U.type!=="struct"){W[L]=[];for(let Q in I)W[L].push({key:Q,value:I[Q]})}}}r.arrayItemValues=$,r.mapItemValues=W}}();const O=N=>{r.mapItemValues[N]?r.mapItemValues[N].push({key:"",value:""}):r.mapItemValues[N]=[{key:"",value:""}]},S=(N,$)=>{r.mapItemValues[N]&&r.mapItemValues[N].splice($,1)},x=N=>{r.arrayItemValues[N]?r.arrayItemValues[N].push({key:"",value:""}):r.arrayItemValues[N]=[{key:"",value:""}]},C=(N,$)=>{r.arrayItemValues[N]&&r.arrayItemValues[N].splice($,1)},E=N=>{r[N]||(r[N]=[]),r[N].push({case:"",then:""})},T=(N,$)=>{r[N]&&r[N].length>$&&r[N].splice($,1)},P=N=>N.indexOf("int")>-1,A=N=>N.indexOf("float")>-1;return e({submit:N=>{if(!u.value){N&&N(!1);return}return u.value.validate($=>(N&&N($),$))}}),(N,$)=>{const W=Xm,L=iC,I=Tl,U=ho,Q=fo,V=hi,q=lr,K=Yc,ie=Ol,oe=Gx,Se=Zx,ke=El;return R(),we(ke,{model:t.configuration,ref_key:"propertyItemFormRef",ref:u,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:z(()=>[(R(!0),G(ct,null,Wt(t.fields,(Y,re)=>(R(),G("div",Fot,[Y.type==="Boolean"||Y.type==="bool"?(R(),G("div",Vot,[B(I,{label:Y.label||Y.name,prop:Y.name},{default:z(()=>[B(W,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,class:"ml-2",style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},{default:z(()=>[qe(je(Y.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]),B(L,{class:"mx-1"},{default:z(()=>[qe(je(Y.label),1)]),_:2},1024),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","prop"])])):Y.component&&Y.component.type==="switchNode"?(R(),G("div",jot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[J("div",zot,[B(Q,{class:"pair-item-header"},{default:z(()=>[B(U,{span:12},{default:z(()=>[qe(" \u6761\u4EF6 ")]),_:1}),B(U,{span:6,offset:1},{default:z(()=>[qe(" \u8DEF\u7531 ")]),_:1})]),_:1}),(R(!0),G(ct,null,Wt(t.configuration[Y.name],(te,ge)=>(R(),we(Q,{key:ge,class:"pair-item"},{default:z(()=>[B(U,{span:12},{default:z(()=>[B(V,{modelValue:te.case,"onUpdate:modelValue":Re=>te.case=Re,rules:[{required:!0,message:"\u6761\u4EF6\u662F\u5FC5\u987B\u7684"}],prop:Y.name+"["+ge+"].case",placeholder:"\u8F93\u5165\u5224\u65AD\u6761\u4EF6\uFF0C\u5982\uFF1Amsg.temperature > 50"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(U,{span:6,offset:1},{default:z(()=>[B(V,{modelValue:te.then,"onUpdate:modelValue":Re=>te.then=Re,rules:[{required:!0,message:"\u8DEF\u7531\u662F\u5FC5\u987B\u7684"}],prop:Y.name+"["+ge+"].then",placeholder:"\u8F93\u5165\u8DEF\u7531\uFF1A\u5982\uFF1ACase1"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(U,{span:2,offset:1},{default:z(()=>[B(q,{icon:p(_a),onClick:Re=>T(Y.name,ge),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:z(()=>[B(U,{span:24},{default:z(()=>[B(q,{type:"primary",onClick:te=>E(Y.name),icon:"el-icon-plus"},{default:z(()=>[qe("\u6DFB\u52A0\u5206\u652F")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):Y.component&&Y.component.type==="select"?(R(),G("div",Qot,[!Y.component.getDataByKey||t.configuration[Y.component.getDataByKey]?(R(),we(I,{key:0,label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[B(ie,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,multiple:Y.component&&Y.component.multiple,filterable:Y.component&&Y.component.filterable,"allow-create":Y.component&&Y.component.allowCreate,placeholder:Y.component&&Y.component.placeholder,onChange:te=>g(te,Y.component.onChangeGetDataKey)},{default:z(()=>[(R(!0),G(ct,null,Wt(Y.component.options,te=>(R(),we(K,{key:te.value!==void 0&&te.value!==null?te.value:te,label:te[Y.component.resDataLabelKey]||te.label||te,value:te[Y.component.resDataValueKey]||(te.value!==void 0&&te.value!==null?te.value:te)},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder","onChange"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])):_e("",!0)])):Y.component&&Y.component.type==="textarea"?(R(),G("div",Hot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>{var te;return[B(V,{type:"textarea",rows:((te=Y==null?void 0:Y.component)==null?void 0:te.rows)||2,modelValue:t.configuration[Y.name],"onUpdate:modelValue":ge=>t.configuration[Y.name]=ge},null,8,["rows","modelValue","onUpdate:modelValue"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]}),_:2},1032,["label","rules","prop"])])):Y.type==="map"?(R(),G("div",Wot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:"mapItemValues["+Y.name+"]"},{default:z(()=>[J("div",Uot,[B(Q,{class:"pair-item-header"},{default:z(()=>[B(U,{span:8},{default:z(()=>[qe(" \u952E ")]),_:1}),B(U,{span:8,offset:2},{default:z(()=>[qe(" \u503C ")]),_:1})]),_:1}),(R(!0),G(ct,null,Wt(t.configuration.mapItemValues[Y.name],(te,ge)=>(R(),we(Q,{key:ge,class:"pair-item"},{default:z(()=>[B(U,{span:8},{default:z(()=>[B(V,{modelValue:te.key,"onUpdate:modelValue":Re=>te.key=Re,rules:[{required:!0,message:"key\u662F\u5FC5\u987B\u7684"}],prop:"mapItemValues["+Y.name+"]["+te.key+"]",placeholder:"\u8BF7\u8F93\u5165\u952E"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(U,{span:8,offset:2},{default:z(()=>[B(V,{modelValue:te.value,"onUpdate:modelValue":Re=>te.value=Re,rules:[{required:!0,message:"value\u662F\u5FC5\u987B\u7684"}],prop:"configuration[item.name][pair.key]",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(U,{span:4,offset:2},{default:z(()=>[B(q,{icon:p(_a),onClick:Re=>S(Y.name,ge),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:z(()=>[B(q,{type:"primary",icon:p(pw),onClick:te=>O(Y.name)},{default:z(()=>[qe("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)])]),_:2},1032,["label","rules","prop"])])):Y.type==="array"?(R(),G("div",qot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:"arrayItemValues["+Y.name+"].0.key"},{default:z(()=>[J("div",Yot,[(R(!0),G(ct,null,Wt(t.configuration.arrayItemValues[Y.name],(te,ge)=>(R(),we(Q,{key:ge,class:"pair-item"},{default:z(()=>[B(U,{span:12},{default:z(()=>[B(V,{modelValue:te.key,"onUpdate:modelValue":Re=>te.key=Re,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(U,{span:4,offset:2},{default:z(()=>[B(q,{icon:p(_a),onClick:Re=>C(Y.name,ge),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:z(()=>[B(q,{type:"primary",icon:p(pw),onClick:te=>x(Y.name)},{default:z(()=>[qe("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024)]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):Y.type==="struct"?(R(),G("div",Xot,[B(Se,{modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=te=>d.value=te)},{default:z(()=>[B(oe,{name:Y.name},{title:z(()=>[qe(je(Y.label||Y.name),1)]),default:z(()=>[J("div",Zot,[B(UJ,{ref_for:!0,ref_key:"subPropertyItemFormRef",ref:c,configuration:t.configuration[Y.name],fields:Y.fields},null,8,["configuration","fields"])])]),_:2},1032,["name"])]),_:2},1032,["modelValue"])])):Y.name==="jsScript"||Y.name==="JsScript"||Y.name==="script"||Y.component&&Y.component.type==="codeEditor"?(R(),G("div",Got,[B(I,{rules:Y.rules,prop:"item.name"},{label:z(()=>[B(Q,null,{default:z(()=>[B(U,{span:20},{default:z(()=>[J("label",null,je(Y.label||Y.name),1)]),_:2},1024),B(U,{span:4,style:{"text-align":"right"}},{default:z(()=>[B(q,{type:"info",size:"small",round:"",onClick:te=>y(Y.name)},{default:z(()=>[qe("\u6574\u7406")]),_:2},1032,["onClick"]),B(q,{icon:p(zm),size:"small",onClick:b,circle:""},null,8,["icon"])]),_:2},1024)]),_:2},1024)]),default:z(()=>[B(Q,{style:{height:"300px",width:"100%"}},{default:z(()=>[B(U,{span:24},{default:z(()=>[J("div",{ref_for:!0,ref_key:"codeEditorRef",ref:f},[B(p(Vu),{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9...",style:mt({height:h.value,width:"100%",background:"#ffff"}),autofocus:!0,tabSize:2,extensions:l},null,8,["modelValue","onUpdate:modelValue","style"])],512)]),_:2},1024)]),_:2},1024),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["rules"])])):P(Y.type)?(R(),G("div",Kot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[B(V,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,modelModifiers:{number:!0}},null,8,["modelValue","onUpdate:modelValue"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):A(Y.type)?(R(),G("div",Jot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[B(V,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te},null,8,["modelValue","onUpdate:modelValue"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):(R(),G("div",eat,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[Y.component&&Y.component.type==="select"?(R(),we(ie,{key:0,modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,multiple:Y.component&&Y.component.multiple,filterable:Y.component&&Y.component.filterable,"allow-create":Y.component&&Y.component.allowCreate,placeholder:Y.component&&Y.component.placeholder},{default:z(()=>[(R(!0),G(ct,null,Wt(Y.component.options,te=>(R(),we(K,{key:te.value!==void 0&&te.value!==null?te.value:te,label:te.label||te,value:te.value!==void 0&&te.value!==null?te.value:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder"])):(R(),we(V,{key:1,modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te},null,8,["modelValue","onUpdate:modelValue"])),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])]))]))),256))]),_:1},8,["model"])}}};var UJ=Pl(tat,[["__scopeId","data-v-40d221cb"]]);const nat={class:""},rat={__name:"NodePropertyForm",props:["showDrawer","currentNodeModel","currentNodeView","lf"],setup(t,{expose:e}){const{showDrawer:n,currentNodeModel:r,currentNodeView:i,lf:o}=t;F(""),OJ();const a=F(),s=F();F({}),F({});const l=Sn({nodeId:r.nodeId,id:r.id,type:r.type,name:r.name,configuration:r.configuration||{},debugMode:r.debugMode,additionalInfo:r.additionalInfo||{}});(function(){r.configuration||(r.configuration={}),i.fields&&(i.fields.forEach(h=>{!r.configuration.hasOwnProperty(h.name)&&(h.defaultValue||h.defaultValue===0)&&(r.configuration[h.name]=h.defaultValue)}),l.configuration=r.configuration)})();const c=()=>(d(l.configuration),l),d=h=>{for(let m in h.mapItemValues){let g=h.mapItemValues[m];g&&(h[m]={},g.forEach(y=>{y.key!==""&&(h[m][y.key]=y.value)}))}for(let m in h.arrayItemValues){let g=h.arrayItemValues[m];g&&(h[m]=[],g.forEach(y=>{y.key!==""&&h[m].push(y.key)}))}delete h.mapItemValues,delete h.arrayItemValues;for(let m in h)typeof h[m]=="object"&&d(h[m]);return h};return e({getFormModel:c,submit:h=>(a.value||h&&h(!1),a.value.validate(m=>m?s.value.submit(h):(h&&h(m),m)))}),(h,m)=>{const g=hi,y=ho,b=Xm,w=iC,O=fo,S=Tl,x=El;return R(),G("div",nat,[B(x,{model:l,ref_key:"nodePropertyFormRef",ref:a,"label-position":"top","label-width":"auto"},{default:z(()=>[B(S,{label:"\u8282\u70B9ID",rules:[{required:!0,message:"ID\u662F\u5FC5\u987B\u7684"}],prop:"id"},{default:z(()=>[B(O,{style:{width:"100%"}},{default:z(()=>[B(y,{span:16},{default:z(()=>[B(g,{modelValue:l.id,"onUpdate:modelValue":m[0]||(m[0]=C=>l.id=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9ID"},null,8,["modelValue"])]),_:1}),B(y,{span:7,offset:1},{default:z(()=>[B(b,{class:"ml-2",modelValue:l.debugMode,"onUpdate:modelValue":m[1]||(m[1]=C=>l.debugMode=C),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(w,{class:"mx-1",prop:"debugMode",onClick:m[2]||(m[2]=C=>l.debugMode=!l.debugMode)},{default:z(()=>[qe(" \u8C03\u8BD5\u6A21\u5F0F ")]),_:1})]),_:1})]),_:1})]),_:1}),B(S,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"name"},{default:z(()=>[B(O,{style:{width:"100%"}},{default:z(()=>[B(y,{span:24},{default:z(()=>[B(g,{modelValue:l.name,"onUpdate:modelValue":m[3]||(m[3]=C=>l.name=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B(UJ,{ref_key:"nodePropertyItemFormRef",ref:s,lf:t.lf,currentNodeModel:t.currentNodeModel,configuration:Sn(l.configuration),fields:t.currentNodeView.fields},null,8,["lf","currentNodeModel","configuration","fields"]),B(S,{label:"\u63CF\u8FF0",prop:"desc"},{default:z(()=>[B(g,{modelValue:l.additionalInfo.description,"onUpdate:modelValue":m[4]||(m[4]=C=>l.additionalInfo.description=C),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])}}};var kM=Pl(rat,[["__scopeId","data-v-647b04d4"]]);const iat={style:{flex:"auto"}},oat={__name:"DebugDataPanel",props:["url","chainId","nodeId"],setup(t){const{url:e,chainId:n,nodeId:r}=t,i=[sv(),vr.readOnly.of(!0)],o=F([]),a=F(!1),s=F(""),l=F(""),u=F({page:1,size:20,total:0}),c=w=>{u.value.size=w,u.value.page=1,f()},d=w=>{u.value.page=w,f()},f=()=>{fetch(e+"?chainId="+n+"&nodeId="+r+"&size="+u.value.size+"&page="+u.value.page).then(w=>w.json()).then(w=>{o.value=w.items||[],u.value={size:w.size||20,page:w.page,total:w.total}}).catch(w=>{Vr.error(w.message)})};Bt(()=>{f()});const h=(w,O)=>It(w.ts).format("YYYY-MM-DD HH:mm:ss"),m=w=>{s.value="\u6570\u636E",l.value=lb.js(w.data,{indent_size:2}),a.value=!0},g=w=>{s.value="\u5143\u6570\u636E",l.value=lb.js(JSON.stringify(w.metadata),{indent_size:2}),a.value=!0},y=w=>{s.value="\u9519\u8BEF",l.value=w||"",a.value=!0},b=()=>{a.value=!1};return(w,O)=>{const S=lr,x=Ui,C=ho,E=fo,T=$b,P=Rb,A=eC,D=Ma;return R(),G(ct,null,[B(E,null,{default:z(()=>[B(C,{span:4,offset:20},{default:z(()=>[B(x,{class:"box-item",effect:"dark",content:"\u5237\u65B0",placement:"top-start"},{default:z(()=>[B(S,{icon:p(jQ),onClick:f,circle:""},null,8,["icon"])]),_:1})]),_:1})]),_:1}),B(P,{data:o.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:z(()=>[B(T,{prop:"ts",label:"\u4E8B\u4EF6\u65F6\u95F4",width:"90",formatter:h}),B(T,{prop:"flowType",label:"\u7C7B\u578B",width:"60"}),B(T,{prop:"msg.id",label:"\u6D88\u606FID",width:"130"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:N.row.msg.id,placement:"top-start"},{default:z(()=>[qe(je(N.row.msg.id.length>14?N.row.msg.id.substring(0,14)+"...":N.row.msg.id),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"msg.type",label:"\u6D88\u606F\u7C7B\u578B",width:"130"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:N.row.msg.type,placement:"top-start"},{default:z(()=>[qe(je(N.row.msg.type.length>10?N.row.msg.type.substring(0,10)+"...":N.row.msg.type),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"relationType",label:"\u5173\u7CFB\u7C7B\u578B",width:"90"}),B(T,{prop:"msg.data",label:"\u6570\u636E",width:"60"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:z(()=>[B(S,{icon:p(Oy),onClick:$=>m(N.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"msg.metadata",label:"\u5143\u6570\u636E",width:"80"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:z(()=>[B(S,{icon:p(Oy),onClick:$=>g(N.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"err",label:"\u9519\u8BEF",width:"80"},{default:z(N=>[N.row.err?(R(),we(x,{key:0,class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:z(()=>[N.row.err?(R(),we(S,{key:0,icon:p(Oy),onClick:$=>y(N.row.err),link:""},null,8,["icon","onClick"])):_e("",!0)]),_:2},1024)):_e("",!0)]),_:1})]),_:1},8,["data"]),B(A,{currentPage:u.value.page,"onUpdate:currentPage":O[0]||(O[0]=N=>u.value.page=N),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"]),B(D,{"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":b,modelValue:a.value},{header:z(()=>[B(E,null,{default:z(()=>[B(C,{span:12},{default:z(()=>[qe(je(s.value),1)]),_:1})]),_:1})]),footer:z(()=>[J("div",iat,[B(S,{onClick:b},{default:z(()=>[qe("\u5173\u95ED")]),_:1})])]),default:z(()=>[B(p(Vu),{modelValue:l.value,"onUpdate:modelValue":O[1]||(O[1]=N=>l.value=N),placeholder:"\u65E0\u6570\u636E",style:{height:"400px",width:"100%"},autofocus:!0,tabSize:2,extensions:i},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},aat={class:""},sat={__name:"RouterItemForm",props:["showDrawer","currentRouter","currentNodeView","currentNodeModel"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentRouter:i,currentNodeView:o,currentNodeModel:a}=t;F(["headersToMetadata"]),F(["responseToBody"]);const s=F(["POST","GET","DELETE","PUT","PATCH"]),l={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},u=Sn(i),c=F(l);if(o.router){let m={...l};m=Object.assign(m,o.router),m.from.processors||(m.from.processors=l.from.processors),m.to.processors||(m.to.processors=l.to.processors),c.value=m,o.type==="endpoint/http"&&(!u.params||u.params.length===0)&&(u.params=["POST"])}const d=F();return Sn({showPopover:!1,cronValue:""}),e({submit:()=>d.value.validate(m=>(m&&a.routers&&a.routers.forEach(g=>{if(Xn.toFromPath(g)===Xn.toFromPath(u)&&g.id!==u.id)return Vr.error(Xn.toFromPath(u)+" \u5DF2\u7ECF\u5B58\u5728"),m=!1,!1}),m&&n("submit",Bn(u)),m)),getRouterView:()=>c}),(m,g)=>{const y=Yc,b=Ol,w=hi,O=iC,S=ho,x=fo,C=Tl,E=Xm,T=El;return R(),G("div",aat,[B(T,{model:u,ref_key:"formRef",ref:d,"label-position":"top","label-width":"auto"},{default:z(()=>{var P,A,D,N,$,W;return[B(C,{label:c.value.from.path.label,rules:c.value.from.path.rules,prop:"from.path"},{default:z(()=>[B(x,{style:{width:"100%"}},{default:z(()=>[B(S,{span:24},{default:z(()=>[t.currentNodeView.type==="endpoint/sagoo/devicein"?(R(),we(b,{key:0,modelValue:u.from.path,"onUpdate:modelValue":g[0]||(g[0]=L=>u.from.path=L),filterable:""},{default:z(()=>[(R(!0),G(ct,null,Wt(c.value.from.path.options,L=>(R(),we(y,{key:L,label:L.label,value:L.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):(R(),G(ct,{key:1},[B(w,{modelValue:u.from.path,"onUpdate:modelValue":g[2]||(g[2]=L=>u.from.path=L),placeholder:"\u8BF7\u8F93\u5165"+c.value.from.path.label},ts({_:2},[t.currentNodeView.type==="endpoint/http"?{name:"prepend",fn:z(()=>[B(b,{modelValue:u.params[0],"onUpdate:modelValue":g[1]||(g[1]=L=>u.params[0]=L),filterable:"",style:{width:"150px"}},{default:z(()=>[(R(!0),G(ct,null,Wt(s.value,L=>(R(),we(y,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe(je(c.value.from.path.desc),1)]),_:1})],64))]),_:1})]),_:1})]),_:1},8,["label","rules"]),c.value.from.processors.hide?_e("",!0):(R(),we(C,{key:0,label:c.value.from.processors.label,prop:"from.processors"},{default:z(()=>[B(b,{modelValue:u.from.processors,"onUpdate:modelValue":g[3]||(g[3]=L=>u.from.processors=L),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.from.processors.label},{default:z(()=>[(R(!0),G(ct,null,Wt(c.value.options.inProcessors,L=>(R(),we(y,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe(je(c.value.from.processors.desc),1)]),_:1})]),_:1},8,["label"])),(D=(A=(P=c.value)==null?void 0:P.to)==null?void 0:A.processors)!=null&&D.hide?_e("",!0):(R(),we(C,{key:1,label:(W=($=(N=c.value)==null?void 0:N.to)==null?void 0:$.processors)==null?void 0:W.label,prop:"to.processors"},{default:z(()=>[B(b,{modelValue:u.to.processors,"onUpdate:modelValue":g[4]||(g[4]=L=>u.to.processors=L),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.to.processors.label},{default:z(()=>[(R(!0),G(ct,null,Wt(c.value.options.outProcessors,L=>(R(),we(y,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe(je(c.value.to.processors.desc),1)]),_:1})]),_:1},8,["label"])),t.currentNodeView.type==="endpoint/http"?(R(),we(C,{key:2,label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",prop:"to.wait"},{default:z(()=>[B(E,{modelValue:u.to.wait,"onUpdate:modelValue":g[5]||(g[5]=L=>u.to.wait=L),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe("\u5982\u679C\u5F00\u542F\u5219\u4F1A\u628A\u89C4\u5219\u94FE\u6267\u884C\u7ED3\u679C\u54CD\u5E94\u5230\u5BA2\u6237\u7AEF")]),_:1})]),_:1})):_e("",!0)]}),_:1},8,["model"])])}}},qJ={__name:"RouterPropertyTable",props:["showDrawer","currentNodeModel","currentNodeView"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentNodeModel:i,currentNodeView:o}=t,a=F({}),s=F(!1),l=F(!1),u=F(),c={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},d=F(c);if(o.router){let T={...c};T=Object.assign(T,o.router),d.value=T}const f=F({current:1,pageSize:12,total:i.routers&&i.routers.length}),h=T=>{f.value.pageSize=T,f.value.current=1},m=T=>{f.value.current=T},g=T=>{if(l.value){const P=i.routers.findIndex(A=>A.id===T.id||Xn.toFromPath(A)===Xn.toFromPath(T));P!==-1&&i.routers.splice(P,1,T)}else i.routers||(i.routers=[]),i.routers.push(T);s.value=!1},y=()=>i,b=()=>{n("cancel")},w=(T,P)=>Xn.toFromPath(T,P),O=(T,P)=>T.to&&T.to.wait?"\u662F":"\u5426",S=()=>{a.value={id:Xn.genId(),params:[],from:{path:"",processors:[]},to:{path:"",processors:[],wait:!1}},l.value=!1,s.value=!0},x=T=>{a.value={...T},l.value=!0,s.value=!0},C=T=>{i.routers&&(i.routers=i.routers.filter(P=>P.id!==T.id&&Xn.toFromPath(P)!==Xn.toFromPath(T)))},E=()=>{u.value.submit()};return e({getFormModel:y}),(T,P)=>{const A=lr,D=$b,N=Bs,$=Rb,W=eC,L=Ma;return R(),G(ct,null,[B(A,{type:"primary",onClick:S},{default:z(()=>[qe("\u65B0\u589E")]),_:1}),B($,{data:t.currentNodeModel.routers,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"50px"}},{default:z(()=>{var I,U,Q,V;return[B(D,{prop:"from.path",label:d.value.from.path.label,formatter:function(q){return w(q,t.currentNodeModel.type)}},null,8,["label","formatter"]),(U=(I=d.value.from)==null?void 0:I.processors)!=null&&U.hide?_e("",!0):(R(),we(D,{key:0,prop:"from.processors",label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:z(q=>[(R(!0),G(ct,null,Wt(q.row.from.processors,K=>(R(),we(N,{key:K,style:{"margin-right":"5px"}},{default:z(()=>[qe(je(K),1)]),_:2},1024))),128))]),_:1})),(V=(Q=d.value.to)==null?void 0:Q.processors)!=null&&V.hide?_e("",!0):(R(),we(D,{key:1,prop:"to.processors",label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:z(q=>[(R(!0),G(ct,null,Wt(q.row.to.processors,K=>(R(),we(N,{key:K,style:{"margin-right":"5px"}},{default:z(()=>[qe(je(K),1)]),_:2},1024))),128))]),_:1})),t.currentNodeView.type==="endpoint/http"?(R(),we(D,{key:2,prop:"to.wait",label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",formatter:O})):_e("",!0),B(D,{label:"\u64CD\u4F5C"},{default:z(({row:q})=>[B(A,{type:"primary",size:"small",onClick:K=>x(q)},{default:z(()=>[qe("\u7F16\u8F91")]),_:2},1032,["onClick"]),B(A,{type:"danger",size:"small",onClick:K=>C(q)},{default:z(()=>[qe("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]}),_:1},8,["data"]),B(W,{currentPage:f.value.current,"onUpdate:currentPage":P[0]||(P[0]=I=>f.value.current=I),style:{"margin-top":"10px"},class:"float-right","page-size":f.value.pageSize,total:f.value.total,"page-sizes":[12,24,36],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:h,onCurrentChange:m},null,8,["currentPage","page-size","total"]),B(L,{modelValue:s.value,"onUpdate:modelValue":P[2]||(P[2]=I=>s.value=I),"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,title:l.value.value?"\u7F16\u8F91\u7F16\u8F91":"\u65B0\u589E\u8DEF\u7531"},{footer:z(()=>[B(A,{onClick:P[1]||(P[1]=I=>s.value=!1)},{default:z(()=>[qe("\u53D6\u6D88")]),_:1}),B(A,{type:"primary",onClick:E},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1})]),default:z(()=>[B(sat,{ref_key:"routerItemFormRef",ref:u,currentRouter:a.value,currentNodeView:t.currentNodeView,currentNodeModel:t.currentNodeModel,onSubmit:g,onCancel:b},null,8,["currentRouter","currentNodeView","currentNodeModel"])]),_:1},8,["modelValue","title"])],64)}}},lat=["innerHTML"],uat={style:{"text-align":"left"}},cat={__name:"NodePropertyDrawer",props:["show","currentNodeModel","currentNodeView","chainId","debugDataUrl","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:i,chainId:o,debugDataUrl:a,lf:s}=t,l=F(),u=F(),c=F("detail"),d=async()=>{let g;if(u.value&&!i.router.hide){if(g=u.value.getFormModel().routers,!g||g.length===0){c.value="router",Vr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else g=[{from:{path:"*"},to:{}}];l.value.submit(y=>{if(!y)c.value="detail";else{const b=l.value.getFormModel();g&&(b.routers=g),e("submit",b)}})},f=()=>{e("cancel")},h=()=>{f()},m=()=>{};return(g,y)=>{const b=Bs,w=ho,O=fo,S=Sp,x=wp,C=lr,E=K$;return R(),we(E,{modal:!1,"close-on-click-modal":!1,"close-on-press-escape":!1,direction:"rtl",size:"580px","modal-class":"right-drawer-modal","before-close":h,modelValue:t.show},ts({header:z(()=>[B(O,{class:"setter-title"},{default:z(()=>[B(w,{span:12},{default:z(()=>[qe("\u8282\u70B9\u8BE6\u60C5 "),B(b,{class:"ml-2",type:"info"},{default:z(()=>[qe(je(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),default:z(()=>[B(x,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=T=>c.value=T),onTabClick:m},{default:z(()=>[B(S,{label:"\u8BE6\u60C5",name:"detail"},{default:z(()=>[B(kM,{ref_key:"nodePropertyFormRef",ref:l,lf:t.lf,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["lf","currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.nodeType==="endpoint-node"&&!t.currentNodeView.router.hide?(R(),we(S,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:z(()=>[B(qJ,{ref_key:"routerPropertyFormRef",ref:u,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["currentNodeModel","currentNodeView"])]),_:1})):_e("",!0),t.currentNodeView.nodeType!=="endpoint-node"?(R(),we(S,{key:1,label:"\u8C03\u8BD5\u65E5\u5FD7",name:"debug"},{default:z(()=>[c.value==="debug"?(R(),we(oat,{key:0,url:t.debugDataUrl,chainId:t.chainId,nodeId:t.currentNodeModel.id},null,8,["url","chainId","nodeId"])):_e("",!0)]),_:1})):_e("",!0),B(S,{label:"\u5E2E\u52A9",name:"help"},{default:z(()=>[J("div",{innerHTML:t.currentNodeView.desc},null,8,lat)]),_:1})]),_:1},8,["modelValue"])]),_:2},[c.value==="detail"||c.value==="router"?{name:"footer",fn:z(()=>[J("div",uat,[B(C,{type:"primary",size:"large",onClick:d},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(C,{size:"large",onClick:f},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),key:"0"}:void 0]),1032,["modelValue"])}}};var dat=Pl(cat,[["__scopeId","data-v-f76fd896"]]);const fat={style:{flex:"auto"}},hat={__name:"NodePropertyDialog",props:["show","currentNodeModel","currentNodeView","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:i,lf:o}=t,a=F(),s=F(),l=F("detail"),u=async()=>{let f;if(s.value&&!i.router.hide){if(f=s.value.getFormModel().routers,!f||f.length===0){l.value="router",Vr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else f=[{from:{path:"*"},to:{}}];a.value.submit(h=>{if(!h)l.value="detail";else{const m=a.value.getFormModel();f&&(m.routers=f),e("submit",m)}})},c=()=>{e("cancel")},d=()=>{c()};return(f,h)=>{const m=Bs,g=ho,y=fo,b=Sp,w=wp,O=lr,S=Ma;return R(),we(S,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!0,width:"55%",draggable:"",top:"10px","before-close":d,modelValue:t.show},{header:z(()=>[B(y,{class:"setter-title"},{default:z(()=>[B(g,{span:12},{default:z(()=>[qe("\u8282\u70B9\u8BE6\u60C5\u914D\u7F6E "),B(m,{class:"ml-2",type:"info"},{default:z(()=>[qe(je(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),footer:z(()=>[J("div",fat,[B(O,{type:"primary",size:"large",onClick:u},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:c},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[t.currentNodeView.nodeType!=="endpoint-node"?(R(),we(kM,{key:0,ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,editorOptions:f.editorOptions,lf:t.lf,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView","editorOptions","lf"])):_e("",!0),t.currentNodeView.nodeType==="endpoint-node"?(R(),we(w,{key:1,modelValue:l.value,"onUpdate:modelValue":h[0]||(h[0]=x=>l.value=x)},{default:z(()=>[B(b,{label:"\u8BE6\u60C5",name:"detail"},{default:z(()=>[B(kM,{ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.router.hide?_e("",!0):(R(),we(b,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:z(()=>[B(qJ,{ref_key:"routerPropertyFormRef",ref:s,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}))]),_:1},8,["modelValue"])):_e("",!0)]),_:1},8,["modelValue"])}}},pat={builtins:{endpoints:{inProcessors:["toHex","headersToMetadata","setJsonDataType"],outProcessors:["responseToBody","metadataToHeaders"]},functions:{functionName:[]},nodePool:{}},endpoints:[{type:"endpoint/kafka",category:"endpoint/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"sagoo",label:"",desc:"",validate:"",fields:null}],label:"Kafka",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/nats",category:"endpoint/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Nats",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/rabbitmq",category:"endpoint/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"RabbitMQ",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis",category:"endpoint/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis/stream",category:"endpoint/redis_stream",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/mqtt",category:"github.com/rulego/rulego/endpoint/mqtt",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"Duration",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Mqtt",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/net",category:"github.com/rulego/rulego/endpoint/net",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:":6335",label:"",desc:"",validate:"",fields:null},{name:"readTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"encode",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Net",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/http",category:"github.com/rulego/rulego/endpoint/rest",fields:[{name:"server",type:"string",defaultValue:":6333",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Rest",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/schedule",category:"github.com/rulego/rulego/endpoint/schedule",fields:null,label:"Schedule",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/ws",category:"github.com/rulego/rulego/endpoint/websocket",fields:[{name:"server",type:"string",defaultValue:":6334",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Websocket",desc:"",icon:"",relationTypes:["Success","Failure"]}],nodes:[{type:"comment",category:"action",fields:null,label:"CommentNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"delay",category:"action",fields:[{name:"maxPendingMsgs",type:"int",defaultValue:1e3,label:"",desc:"",validate:"",fields:null},{name:"periodInSeconds",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"periodInSecondsPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"overwrite",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DelayNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exec",category:"action",fields:[{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"args",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"log",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"replaceData",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ExecCommandNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"for",category:"action",fields:[{name:"range",type:"string",defaultValue:"1..3",label:"",desc:"",validate:"",fields:null},{name:"do",type:"string",defaultValue:"s3",label:"",desc:"",validate:"",fields:null},{name:"mode",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ForNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"functions",category:"action",fields:[{name:"functionName",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null}],label:"FunctionsNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupAction",category:"action",fields:[{name:"matchRelationType",type:"string",defaultValue:"Success",label:"",desc:"",validate:"",fields:null},{name:"matchNum",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupActionNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"iterator",category:"action",fields:[{name:"fieldName",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"jsScript",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"IteratorNode",desc:"",icon:"",relationTypes:["True","False","Success","Failure"]},{type:"join",category:"action",fields:[{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"JoinNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"log",category:"action",fields:[{name:"jsScript",type:"string",defaultValue:"return 'Incoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",label:"",desc:"",validate:"",fields:null}],label:"LogNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"dbClient",category:"external",fields:[{name:"driverName",type:"string",defaultValue:"mysql",label:"",desc:"",validate:"",fields:null},{name:"dsn",type:"string",defaultValue:"root:root@tcp(127.0.0.1:3306)/test",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"sql",type:"string",defaultValue:"select * from test",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"getOne",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DbClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"mqttClient",category:"external",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"MqttClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"net",category:"external",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"connectTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"heartbeatInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null}],label:"NetNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"restApiCall",category:"external",fields:[{name:"restEndpointUrlPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"requestMethod",type:"string",defaultValue:"POST",label:"",desc:"",validate:"",fields:null},{name:"withoutRequestBody",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:{"Content-Type":"application/json"},label:"",desc:"",validate:"",fields:null},{name:"readTimeoutMs",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"insecureSkipVerify",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"maxParallelRequestsCount",type:"int",defaultValue:200,label:"",desc:"",validate:"",fields:null},{name:"enableProxy",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"useSystemProxyProperties",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"proxyScheme",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"proxyUser",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPassword",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RestApiCallNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"sendEmail",category:"external",fields:[{name:"smtpHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"smtpPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"enableTls",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"email",type:"struct",defaultValue:{from:"",to:"",cc:"",bcc:"",subject:"",body:""},label:"",desc:"",validate:"",fields:[{name:"from",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"to",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"bcc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"subject",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"body",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}]},{name:"connectTimeout",type:"int",defaultValue:10,label:"",desc:"",validate:"",fields:null}],label:"SendEmailNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ssh",category:"external",fields:[{name:"host",type:"string",defaultValue:"127.0.0.1",label:"",desc:"",validate:"",fields:null},{name:"port",type:"int",defaultValue:22,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"root",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"password",label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"SshNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/grpcClient",category:"external/grpc",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:50051",label:"",desc:"",validate:"",fields:null},{name:"service",type:"string",defaultValue:"helloworld.Greeter",label:"",desc:"",validate:"",fields:null},{name:"method",type:"string",defaultValue:"SayHello",label:"",desc:"",validate:"",fields:null},{name:"request",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/kafkaProducer",category:"external/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"partition",type:"int32",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ProducerNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/mongodbClient",category:"external/mongodb",fields:[{name:"server",type:"string",defaultValue:"mongodb://localhost:27017",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null},{name:"collection",type:"string",defaultValue:"user",label:"",desc:"",validate:"",fields:null},{name:"opType",type:"string",defaultValue:"QUERY",label:"",desc:"",validate:"",fields:null},{name:"filter",type:"string",defaultValue:'{"age": {"$gte": 18}}',label:"",desc:"",validate:"",fields:null},{name:"doc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"one",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/natsClient",category:"external/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiQuery",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"command",type:"string",defaultValue:"select * from cpu_load",label:"",desc:"",validate:"",fields:null}],label:"QueryNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiWrite",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"WriteNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/rabbitmqClient",category:"external/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"device.msg.request",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisClient",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"GET",label:"",desc:"",validate:"",fields:null},{name:"paramsExpr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:["${metadata.key}"],label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisPub",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"channel",type:"string",defaultValue:"default",label:"",desc:"",validate:"",fields:null}],label:"PublisherNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprFilter",category:"filter",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"ExprFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fieldFilter",category:"filter",fields:[{name:"checkAllKeys",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"dataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"metadataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"FieldFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fork",category:"filter",fields:null,label:"ForkNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupFilter",category:"filter",fields:[{name:"allMatches",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsFilter",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return msg.temperature > 50;",label:"",desc:"",validate:"",fields:null}],label:"JsFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsSwitch",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return ['msgType1','msgType2'];",label:"",desc:"",validate:"",fields:null}],label:"JsSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"msgTypeSwitch",category:"filter",fields:null,label:"MsgTypeSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"switch",category:"filter",fields:[{name:"cases",type:"array",defaultValue:[{case:"msg.temperature>=20 && msg.temperature<=50",then:"Case1"},{case:"msg.temperature>50",then:"Case2"}],label:"",desc:"",validate:"",fields:null}],label:"SwitchNode",desc:"",icon:"",relationTypes:[]},{type:"x/luaFilter",category:"filter",fields:[{name:"script",type:"string",defaultValue:"return msg.temperature > 50",label:"",desc:"",validate:"",fields:null}],label:"LuaFilter",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"flow",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"extend",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ChainNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ref",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RefNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprTransform",category:"transform",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"mapping",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ExprTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"jsTransform",category:"transform",fields:[{name:"jsScript",type:"string",defaultValue:"return {'msg':msg,'metadata':metadata,'msgType':msgType};",label:"",desc:"",validate:"",fields:null}],label:"JsTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"metadataTransform",category:"transform",fields:[{name:"mapping",type:"map",defaultValue:{temperature:"msg.temperature"},label:"",desc:"",validate:"",fields:null},{name:"isNew",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"MetadataTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"text/template",category:"transform",fields:[{name:"template",type:"string",defaultValue:`"id": "{{ .id}}"
  232. "ts": "{{ .ts}}"
  233. "type": "{{ .type}}"
  234. "msgType": "{{ .msgType}}"
  235. "data": "{{ .data | escape}}"
  236. "dataType": "{{ .dataType}}"
  237. `,label:"",desc:"",validate:"",fields:null}],label:"TemplateNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/luaTransform",category:"transform",fields:[{name:"script",type:"string",defaultValue:"return msg, metadata, msgType",label:"",desc:"",validate:"",fields:null}],label:"LuaTransform",desc:"",icon:"",relationTypes:["Success","Failure"]}]},gat={class:"flow-chart"},mat={__name:"RuleGoEditor",props:["options","data"],emits:["saveOk","saveError","reset","updateLocales"],setup(t,{expose:e,emit:n}){const r=t,i=F(),o=F(null),a=F(null),s=F({}),l=F({}),u=F({}),c=F(null),d=F(!1),f=F(!1),h=F(!1),m=F(!1),g=F(!1),y=F({url:window.allEnv.rule.server,toolbar:{}});let b={},w=F({}),O={},S={},x={},C=[],E=[];const T=F(r.data),P=r.options;let A={setting:{},relationTypeSplit:"/",endpointRelationTypeSplit:`
  238. `,url:window.allEnv.rule.server,componentsApi:"/api/v1/components",debugDataApi:"/api/v1/logs/debug",executeApi:"/api/v1/rules/:id/execute/:msgType",notifyApi:"/api/v1/rules/:id/notify/msgType",chainsApi:"/api/v1/rules",startX:280,startY:280,loadComponentsFromApi:!0,loadEndpointComponents:!0,locales:{},builtinComponents:{builtins:{},endpoints:[],nodes:[]},components:{endpoints:[],nodes:[]},adapterComponents:function(ae){return A.loadEndpointComponents||(ae.endpoints=[]),A.builtinComponents=ae,Xn.adapterComponents(ae,A.locales)},toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0},container:i.value,grid:{visible:!0,type:"mesh",size:10,config:{color:"#eeeeee"}},adjustEdge:!0,adjustEdgeStartAndEnd:!0,textEdit:!1,stopMoveGraph:!1,hoverOutline:!1,edgeSelectedOutline:!1,allowResize:!0,keyboard:{enabled:!0,shortcuts:[{keys:["delete","backspace"],callback:ae=>{!ae.target||ae.target.tagName!=="DIV"&&ae.target.tagName!=="div"||Se()}},{keys:["cmd + c","ctrl + c"],callback:ae=>{if(!ae.target||ae.target.tagName!=="DIV"&&ae.target.tagName!=="div")return;if(!o.value){Xn.copyToClipboard("");return}O.currentCloneNodeId=o.value.id;let me=o.value.properties&&o.value.properties.model||{};Xn.copyToClipboard(JSON.stringify(me))}},{keys:["cmd + v","ctrl + v"],callback:ae=>{!ae.target||ae.target.tagName!=="DIV"&&ae.target.tagName!=="div"||K()}}]},idGenerator:function(ae){return ae==="flow-link"?(O.edgeCount++,"edge_"+O.edgeCount):(O.nodeCount++,"node_"+O.nodeCount)},plugins:[EUe,SUe,RX,fJ,CUe,oUe]},D=null;Bt(()=>{N()});const N=()=>{A.components&&A.components.nodes&&A.components.nodes.length>0?(A.components=A.adapterComponents(A.components),b=Z(A.components),$()):(A.components=A.adapterComponents(pat),b=Z(A.components),$()),A.loadComponentsFromApi&&$e().then(ae=>{A.components=ae,b=Z(A.components),$()})},$=()=>{te(),Object.assign(A,P),y.value={url:A.url,componentsApi:A.componentsApi,debugDataApi:A.debugDataApi,executeApi:A.executeApi,notifyApi:A.notifyApi,chainsApi:A.chainsApi,toolbar:A.toolbar},A.ruleChain&&(w.value=w),A.container=i.value,D=new oX(A),D.getRuleChain=function(){return w.value},D.getEditorSetting=function(){return y.value},D.getOptions=function(){return A},D.nodeComponents=function(){return b},D.setLocales=function(ae){Ie(ae)},D.extension.selectionSelect.setSelectionSense(!0,!1),D.adapterIn=function(ae){kr(ae)&&(ae=ae.value),ae||(ae={});let me={};ae.ruleChain&&(w.value=ae.ruleChain,me=ae.ruleChain.additionalInfo||{});let Ae=[],X=[],ee=parseInt(me.layoutX||A.startX)||A.startX,le=parseInt(me.layoutY||A.startY)||A.startY;Ae.push({id:O.startNodeId,type:"start-node",x:ee,y:le,text:Ng("Input")});let Ce=null,fe=0,Ee=ae.metadata&&ae.metadata.firstNodeIndex||0;ae&&ae.metadata&&ae.metadata.nodes&&ae.metadata.nodes.forEach((Xe,Ke)=>{let tt=Xn.getNodeSeq(Xe.id);tt>fe&&(fe=tt),O.nodeCount++;let Dt=b[Xe.type],jt="simple-node";Dt&&Dt.nodeType&&(jt=Dt.nodeType),Ee===Ke&&(Ce=Xe),ee=ee+150;let Me=Xe.additionalInfo||{},nt=Me.layoutX||ee,de=Me.layoutY||le;Ae.push({id:Xe.id,type:jt,x:nt,y:de,text:Xe.name,properties:{view:b[Xe.type],model:Xe}})}),ae&&ae.metadata&&ae.metadata.endpoints&&ae.metadata.endpoints.forEach((Xe,Ke)=>{let tt=Xn.getNodeSeq(Xe.id);tt>fe&&(fe=tt),O.nodeCount++,ee=ee+150;let Dt=Xe.additionalInfo||{},jt=Dt.layoutX||ee,Me=Dt.layoutY||le;Ae.push({id:Xe.id,type:"endpoint-node",x:jt,y:Me,text:Xe.name,properties:{view:b[Xe.type],model:Xe}})}),O.nodeCount+=fe;let be=[];Ce&&(be=[{fromId:O.startNodeId,toId:Ce.id}]),ae.metadata&&ae.metadata.endpoints&&ae.metadata.endpoints.forEach((Xe,Ke)=>{be=be.concat(Xn.getEndpointConnections(Xe.id,Xe,Ce))});let Be=be;return ae&&ae.metadata&&ae.metadata.connections&&(Be=Be.concat(ae.metadata.connections)),Be.forEach(Xe=>{O.edgeCount++;let Ke=Xn.getEdgeBySourceNodeIdAndTargetNodeId(X,Xe.fromId,Xe.toId);Ke?(Xe.nodeType==="endpoint-node"?Ke.text=Ke.text+A.endpointRelationTypeSplit+Ng(Xe.type,"relationTypes"):Ke.text=Ke.text+A.relationTypeSplit+Ng(Xe.type,"relationTypes"),Ke.properties.model.relationTypes||(Ke.properties.model.relationTypes=[]),Ke.properties.model.relationTypes.push(Xe.type),Xe.routerId&&(Ke.properties.model.routerId=Xe.routerId)):(Xe.relationTypes=[Xe.type],Ke=Xn.createEdge(O,Ae,Xe),X.push(Ke))}),{edges:X,nodes:Ae}},D.adapterOut=function(ae){w.value&&!w.value.id&&(w.value.id=Xn.genId());let me=[],Ae=[],X=[],ee=null,le=[];ae&&ae.edges&&ae.edges.forEach(fe=>{if(fe.sourceNodeId!==O.startNodeId){let Ee=ce(fe.sourceNodeId),be=ce(fe.targetNodeId);Ee===""&&Vr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+Ee),be===""&&Vr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+be);let Be=D.getNodeDataById(fe.sourceNodeId),Xe=fe.properties.model||{fromId:Ee,toId:be,type:""};Xe.fromId=Ee,Xe.toId=be,Xe.relationTypes.forEach(Ke=>{let tt={};Object.assign(tt,Xe),tt.type=Ke,delete tt.id,delete tt.relationTypes,delete tt.relationTypesLabel,Be.type==="endpoint-node"?le.push(tt):X.push(tt)})}else ee=fe.targetNodeId}),ae&&ae.nodes&&ae.nodes.forEach(fe=>{if(fe.id===O.startNodeId)w.value.additionalInfo?(w.value.additionalInfo.layoutX=String(fe.x),w.value.additionalInfo.layoutY=String(fe.y)):w.value.additionalInfo={layoutX:String(fe.x),layoutY:String(fe.y)};else{let Ee=fe.properties.model;if(Ee){let be=Ee.additionalInfo;be?(be.layoutX=fe.x,be.layoutY=fe.y):Ee.additionalInfo={layoutX:fe.x,layoutY:fe.y},delete Ee.nodeId,fe.type==="endpoint-node"?(Xn.updateEndpointRouterToPath(Ee,w.value.id,le),me.push(Ee)):!ee&&fe.type==="simple-node"||fe.id===ee?Ae.unshift(Ee):Ae.push(Ee)}}});let Ce={endpoints:me,nodes:Ae,connections:X};return{ruleChain:w.value,metadata:Ce}},T?D.render(T):(w.value.id=Xn.genId(),D.render({})),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components),D.on("blank:mousemove",({e:ae})=>{O.mouseX=ae.offsetX,O.mouseY=ae.offsetY}),D.on("blank:mousedown",({e:ae})=>{O.mouseX=ae.offsetX,O.mouseY=ae.offsetY}),D.on("node:click",({data:ae})=>{Y(),Ot(()=>{ae.type!=="start-node"?(o.value=ae,a.value=null,ke(),f.value=!0):(o.value=null,a.value=null)})}),D.on("node:dbclick",({data:ae})=>{Y(),Ot(()=>{ae.type!=="start-node"&&(o.value=ae,a.value=null,ke(),f.value=!0)})}),D.on("edge:click",({data:ae})=>{Y(),Ot(()=>{o.value=null,a.value=ae,f.value=!1,h.value=!1})}),D.on("edge:dbclick",({data:ae})=>{Y(),Ot(()=>{a.value=ae,o.value=null,ke()})}),D.on("node:dnd-add",({data:ae})=>{Y(),Ot(()=>{if(S=ae,o.value=ae,a.value=null,ke(!0),ae.type==="group-node"){const me=D.addNode({type:"start-node",moveRules:[function(Ae,X,ee){return!1}],x:ae.x-100,y:ae.y,text:"\u5F00\u59CB"});ae.addChild(me.id)}})}),D.on("node:add",({data:ae})=>{let me=ae.properties.model;const Ae=D.getNodeModelById(ae.id);me&&Ae&&(me.id=ae.id,Ae.setProperty("model",me))}),D.on("edge:add",({data:ae})=>{let me=D.getNodeEdges(ae.sourceNodeId);me&&me.length>1&&D.getNodeDataById(ae.sourceNodeId).type==="start-node"&&D.deleteEdge(ae.id)}),D.on("edge:add",({data:ae})=>{x=ae,a.value=ae,o.value=null,ae.sourceNodeId!==O.startNodeId&&ke(!0)}),D.on("node:drop",({data:ae})=>{let me=ae.properties.model;me&&(me.additionalInfo?(me.layoutX=ae.x,me.layoutY=ae.y):me.additionalInfo={layoutX:ae.x,layoutY:ae.y})}),D.on("rulego-editor:new",ae=>{Re();let me=typeof ae=="string"?JSON.parse(ae):ae;me.id||(me.id=Xn.genId()),w.value=me}),D.on("rulego-editor:open",ae=>{let me=typeof ae=="string"?JSON.parse(ae):ae;ge(me)}),D.on("rulego-editor:update",ae=>{let me=typeof ae=="string"?JSON.parse(ae):ae;w.name=me.name,w.root=me.root||!0,w.disabled=me.disabled,w.additionalInfo=me.additionalInfo}),D.on("rulego-editor:setting",ae=>{ae.baseUrl&&ae.baseUrl!==y.value.url?(y.value.url=ae.baseUrl,y.value.toolbar=ae.toolbar,$e().then(me=>{A.components=me,b=Z(A.components),$()})):(y.value.url=ae.baseUrl,y.value.toolbar=ae.toolbar)}),D.on("rulego-editor:fullScreen",()=>{console.info("rulego-editor:fullScreen")}),D.on("rulego-editor:save",()=>{oe()}),D.on("rulego-editor:reset",()=>{console.info("rulego-editor:deleteSelects")}),D.on("rulego-editor:deleteSelects",()=>{Se()}),D.on("rulego-editor:showEditPanel",()=>{ke(!1)}),D.on("history:change",ae=>{C=ae.data.undos,E=ae.data.redos}),D.on("rulego-editor:loadComponents",ae=>{A.components=A.adapterComponents(ae),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components)})},W=ae=>{o.value=ae;let me=ae.properties.model;!me.type&&ae.properties.view&&(me.type=ae.properties.view.type),l.value=b[me.type]||ae.properties.view,me.id=me.id||ae.id,me.nodeId=ae.id,me.additionalInfo?(me.layoutX=ae.x,me.layoutY=ae.y):me.additionalInfo={layoutX:ae.x,layoutY:ae.y},s.value=me||{}},L=ae=>{const me=D.getNodeModelById(ae.nodeId);me&&(o.value=me,me.setProperty("model",ae),me.updateText(ae.name));let Ae=me.getData();if(Ae.type==="endpoint-node")V(ae.nodeId,ae);else{let X=Ae.properties||{};q(ae.nodeId,X.view||{},ae)}S=null,d.value=!1,f.value=!1},I=()=>{S&&(D.deleteNode(S.id),S=null),re()},U=ae=>{const me=D.getEdgeModelById(ae.id);me&&(a.value=me,D.getNodeDataById(me.sourceNodeId).type==="endpoint-node"?(ae.routerId=ae.relationTypes[0],me.updateText(ae.relationTypesLabel.join(A.endpointRelationTypeSplit))):me.updateText(ae.relationTypesLabel.join(A.relationTypeSplit)),me.setProperty("model",ae)),x=null,g.value=!1,h.value=!1},Q=()=>{x&&(D.deleteEdge(x.id),x=null),re()},V=(ae,me)=>{D.getEdgeModels({sourceNodeId:ae}).forEach(X=>{let ee=X.properties.model||{},le=Xn.getRouterRelationTypeLabel(me,ee.routerId||ee.relationTypes);if(le.length===0)D.deleteEdge(X.id);else{let Ce=le.map(fe=>fe.label);X.updateText(Ce.join(A.endpointRelationTypeSplit))}})},q=(ae,me,Ae)=>{if(!me.relationTypeDynamics)return;let X=D.getEdgeModels({sourceNodeId:ae}),ee=Xn.getRelationTypeOptionsFromNode(me,Ae);X.forEach(le=>{(le.properties.model||{}).relationTypes.every(Ee=>ee.find(be=>be.value===Ee))||D.deleteEdge(le.id)})},K=()=>{Xn.readFromClipboard().then(ae=>{!ie(ae)&&O.currentCloneNodeId&&D.cloneNode(O.currentCloneNodeId)}).catch(ae=>{O.currentCloneNodeId&&D.cloneNode(O.currentCloneNodeId)})},ie=ae=>{if(!ae)return!1;try{let me=JSON.parse(ae);if(!me.type)return!1;O.nodeCount++,me.id="node_"+O.nodeCount;let Ae=O.mouseX,X=O.mouseY,ee=b[me.type];return ee?(D.addNode({id:me.id,type:ee.nodeType||"simple-node",x:Ae,y:X,text:me.name,properties:{view:ee,model:me}}),!0):!1}catch{return!1}},oe=()=>{let ae=D.getGraphData(),me=y.value.url+A.chainsApi+"/"+w.value.id;fetch(me,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ae)}).then(Ae=>Ae.ok?Ae:Ae.text().then(X=>{throw new Error("\u4FDD\u5B58\u5931\u8D25: "+X)})).then(Ae=>{Vr({showClose:!0,message:"\u4FDD\u5B58\u6210\u529F",type:"success"}),n("saveOk",Ae),D.graphModel.eventCenter.emit("rulego-editor:saveOk",Ae)}).catch(Ae=>{Vr.error(Ae.message),n("saveError",ae,Ae)})},Se=()=>{const{nodes:ae,edges:me}=D.getSelectElements();me&&me.forEach(Ae=>{D.deleteEdge(Ae.id)}),ae&&ae.forEach(Ae=>{Ae.type!=="start-node"&&D.deleteNode(Ae.id)}),D.graphModel.eventCenter.emit("rulego-editor:deleted"),Y()},ke=ae=>{if(o.value){let me=o.value;me.type!=="start-node"&&(W(me),ae?d.value=!0:f.value=!0,h.value=!1)}else{let me=a.value,Ae=D.getNodeDataById(me.sourceNodeId);if(Ae.type==="start-node")return;let X=Ae.properties.model||{},ee=X.type;l.value=b[ee];let le=D.getEdgeModels({sourceNodeId:Ae.id}),Ce=[];if(Ae.type==="endpoint-node"){if(Ce=Xn.getRelationTypeOptionsFromRouters(le,X,me.id),Ae.type==="endpoint-node"&&Ce.length===0){Vr.error("\u8F93\u5165\u7AEF\u6BCF\u4E2A\u8DEF\u7531\u53EA\u5141\u8BB8\u4E00\u6761\u8FB9"),D.deleteEdge(me.id);return}}else Ce=Xn.getRelationTypeOptionsFromNode(Ae.properties.view||{},X);c.value=Ce.length>0?Ce:null,u.value=me.properties.model||{id:me.id,fromId:me.sourceNodeId,toId:me.targetNodeId,type:""},u.value.id=me.id,d.value=!1,f.value=!1,ae?g.value=!0:h.value=!0}},Y=()=>{o.value=null,a.value=null,S=null,x=null,re()},re=()=>{d.value=!1,f.value=!1,g.value=!1,h.value=!1},te=()=>{O={nodeCount:0,edgeCount:0,startNodeId:"$node_start_input",nodeWidth:100,currentCloneNodeId:""},o.value=null,a.value=null,d.value=!1,f.value=!1,h.value=!1,m.value=!1,w.value={}},ge=ae=>{T.value=ae,te(),D||N(),D.render(ae),C.length=0,E.length=0,D.extension.miniMap.show()},Re=()=>{D.clearData(),ge({})},$e=async()=>{let ae=y.value.url+A.componentsApi;const Ae=await(await fetch(ae)).json();return A.adapterComponents(Ae)},Z=ae=>{let me={};for(let Ae in ae)ae[Ae].components&&ae[Ae].components.forEach(X=>{me[X.type]=X});return me},ce=ae=>{let me=D.getNodeModelById(ae);return me&&me.properties&&me.properties.model?me.properties.model.id:""},Te=()=>D.getGraphData(),Ie=ae=>{A.locales=ae,A.components=A.adapterComponents(A.builtinComponents),b=Z(A.components),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components)};return e({render:ge,save:oe,lf:D,getData:Te,setLocales:Ie}),(ae,me)=>(R(),G("div",gat,[J("div",{ref_key:"container",ref:i,class:"container"},null,512),f.value?(R(),we(dat,{key:0,show:f.value,currentNodeModel:s.value,currentNodeView:l.value,debugDataUrl:y.value.url+p(A).debugDataApi,chainId:p(w).id,lf:p(D),onSubmit:L,onCancel:I},null,8,["show","currentNodeModel","currentNodeView","debugDataUrl","chainId","lf"])):_e("",!0),d.value?(R(),we(hat,{key:1,show:d.value,currentNodeModel:s.value,currentNodeView:l.value,lf:p(D),onSubmit:L,onCancel:I},null,8,["show","currentNodeModel","currentNodeView","lf"])):_e("",!0),h.value?(R(),we(frt,{key:2,show:h.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(A).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,onSubmit:U,onCancel:Q},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"])):_e("",!0),g.value?(R(),we(prt,{key:3,show:g.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(A).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,lf:p(D),onSubmit:U,onCancel:Q},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions","lf"])):_e("",!0)]))}};var vat=Pl(mat,[["__scopeId","data-v-4b2a8223"]]);const yat={__name:"App",setup(t){const e=F(),n=F(!1),r=F({url:window.allEnv.rule.server,toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0}});F({});let i=window.location.hash.slice(1);Bt(()=>{try{const l=knt();l&&(r.value.url=l.baseUrl||r.value.url)}catch(l){console.error("\u8BFB\u53D6\u6570\u636E\u51FA\u9519:",l)}finally{n.value=!0}let a=r.value.url+"/api/v1/rules/"+i,s=r.value.url+"/api/v1/locales";if(i!==""&&i!=="#undefined")o(a,s);else{let l=r.value.url+"/api/v1/rules/get/latest";o(l,s)}});const o=async(a,s)=>{var c;let l,u;try{l=await fetch(s).then(d=>d.json()),e.value.setLocales(l),u=await fetch(a).then(d=>d.json()),window.location.hash=(c=u==null?void 0:u.ruleChain)==null?void 0:c.id,e.value.render(u,l)}catch(d){Vr.closeAll(),Vr.error("\u89C4\u5219\u94FE\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u66F4\u6362 ID \u518D\u6B21\u5C1D\u8BD5"),console.error("Error fetching data:",d)}};return(a,s)=>n.value?(R(),we(vat,{key:0,ref_key:"ruleGoEditorRef",ref:e,data:null,options:r.value},null,8,["options"])):_e("",!0)}},YJ=px(yat);YJ.use(qje,{locale:Uq});YJ.mount("#app")});export default bat();