Current Path :
/
home
/
develito
/
.trash
/
v6
/
media
/
com_workflow
/
js
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//home/develito/.trash/v6/media/com_workflow/js/workflow-graph.min.js
import aa from"joomla.dialog";/** * @vue/shared v3.5.30 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Jr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ke={},Vn=[],Tt=()=>{},ua=()=>!1,_i=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qr=e=>e.startsWith("onUpdate:"),Ue=Object.assign,es=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},uh=Object.prototype.hasOwnProperty,Ne=(e,t)=>uh.call(e,t),me=Array.isArray,Kn=e=>_o(e)==="[object Map]",ca=e=>_o(e)==="[object Set]",fa=e=>_o(e)==="[object Date]",ye=e=>typeof e=="function",He=e=>typeof e=="string",mt=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",da=e=>(Te(e)||ye(e))&&ye(e.then)&&ye(e.catch),ha=Object.prototype.toString,_o=e=>ha.call(e),ch=e=>_o(e).slice(8,-1),ga=e=>_o(e)==="[object Object]",wi=e=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wo=Jr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},fh=/-\w/g,et=bi(e=>e.replace(fh,t=>t.slice(1).toUpperCase())),dh=/\B([A-Z])/g,cn=bi(e=>e.replace(dh,"-$1").toLowerCase()),Si=bi(e=>e.charAt(0).toUpperCase()+e.slice(1)),ts=bi(e=>e?"on"+Si(e):""),yt=(e,t)=>!Object.is(e,t),ns=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];for(let r=0;r<t.length;r++)t[r](...o)},pa=function(t,n,o,i){i===void 0&&(i=!1),Object.defineProperty(t,n,{configurable:!0,enumerable:!1,writable:i,value:o})},hh=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let va;const bo=()=>va||(va=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ye(e){if(me(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=He(o)?mh(o):Ye(o);if(i)for(const r in i)t[r]=i[r]}return t}else if(He(e)||Te(e))return e}const gh=/;(?![^(]*\))/g,ph=/:([^]+)/,vh=/\/\*[^]*?\*\//g;function mh(e){const t={};return e.replace(vh,"").split(gh).forEach(n=>{if(n){const o=n.split(ph);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function We(e){let t="";if(He(e))t=e;else if(me(e))for(let n=0;n<e.length;n++){const o=We(e[n]);o&&(t+=o+" ")}else if(Te(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function yh(e){if(!e)return null;let{class:t,style:n}=e;return t&&!He(t)&&(e.class=We(t)),n&&(e.style=Ye(n)),e}const _h="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wh=Jr(_h);function ma(e){return!!e||e===""}function bh(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=os(e[o],t[o]);return n}function os(e,t){if(e===t)return!0;let n=fa(e),o=fa(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=mt(e),o=mt(t),n||o)return e===t;if(n=me(e),o=me(t),n||o)return n&&o?bh(e,t):!1;if(n=Te(e),o=Te(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),a=t.hasOwnProperty(s);if(l&&!a||!l&&a||!os(e[s],t[s]))return!1}}return String(e)===String(t)}const ya=e=>!!(e&&e.__v_isRef===!0),pe=e=>He(e)?e:e==null?"":me(e)||Te(e)&&(e.toString===ha||!ye(e.toString))?ya(e)?pe(e.value):JSON.stringify(e,_a,2):String(e),_a=(e,t)=>ya(t)?_a(e,t.value):Kn(t)?{["Map("+t.size+")"]:[...t.entries()].reduce((n,o,i)=>{let[r,s]=o;return n[is(r,i)+" =>"]=s,n},{})}:ca(t)?{["Set("+t.size+")"]:[...t.values()].map(n=>is(n))}:mt(t)?is(t):Te(t)&&!me(t)&&!ga(t)?String(t):t,is=function(t,n){n===void 0&&(n="");var o;return mt(t)?"Symbol("+((o=t.description)!=null?o:n)+")":t};/** * @vue/reactivity v3.5.30 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let je;class wa{constructor(t){t===void 0&&(t=!1),this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=je,!t&&je&&(this.index=(je.scopes||(je.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=je;try{return je=this,t()}finally{je=n}}}on(){++this._on===1&&(this.prevScope=je,je=this)}off(){this._on>0&&--this._on===0&&(je=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function rs(e){return new wa(e)}function ss(){return je}function Ei(e,t){je&&je.cleanups.push(e)}let $e;const ls=new WeakSet;class ba{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,je&&je.active&&je.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ls.has(this)&&(ls.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ea(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Na(this),xa(this);const t=$e,n=_t;$e=this,_t=!0;try{return this.fn()}finally{Aa(this),$e=t,_t=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)fs(t);this.deps=this.depsTail=void 0,Na(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){cs(this)&&this.run()}get dirty(){return cs(this)}}let Sa=0,So,Eo;function Ea(e,t){if(t===void 0&&(t=!1),e.flags|=8,t){e.next=Eo,Eo=e;return}e.next=So,So=e}function as(){Sa++}function us(){if(--Sa>0)return;if(Eo){let t=Eo;for(Eo=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;So;){let t=So;for(So=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function xa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Aa(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),fs(o),Sh(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function cs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Oa(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Oa(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===xo)||(e.globalVersion=xo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!cs(e))))return;e.flags|=2;const t=e.dep,n=$e,o=_t;$e=e,_t=!0;try{xa(e);const i=e.fn(e._value);(t.version===0||yt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{$e=n,_t=o,Aa(e),e.flags&=-3}}function fs(e,t){t===void 0&&(t=!1);const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)fs(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Sh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let _t=!0;const Ca=[];function Mt(){Ca.push(_t),_t=!1}function It(){const e=Ca.pop();_t=e===void 0?!0:e}function Na(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=$e;$e=void 0;try{t()}finally{$e=n}}}let xo=0;class Eh{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!$e||!_t||$e===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==$e)n=this.activeLink=new Eh($e,this),$e.deps?(n.prevDep=$e.depsTail,$e.depsTail.nextDep=n,$e.depsTail=n):$e.deps=$e.depsTail=n,Ta(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=$e.depsTail,n.nextDep=void 0,$e.depsTail.nextDep=n,$e.depsTail=n,$e.deps===n&&($e.deps=o)}return n}trigger(t){this.version++,xo++,this.notify(t)}notify(t){as();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{us()}}}function Ta(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Ta(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ai=new WeakMap,On=Symbol(""),ds=Symbol(""),Ao=Symbol("");function Ze(e,t,n){if(_t&&$e){let o=Ai.get(e);o||Ai.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new xi),i.map=o,i.key=n),i.track()}}function Yt(e,t,n,o,i,r){const s=Ai.get(e);if(!s){xo++;return}const l=a=>{a&&a.trigger()};if(as(),t==="clear")s.forEach(l);else{const a=me(e),u=a&&wi(n);if(a&&n==="length"){const c=Number(o);s.forEach((f,d)=>{(d==="length"||d===Ao||!mt(d)&&d>=c)&&l(f)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(Ao)),t){case"add":a?u&&l(s.get("length")):(l(s.get(On)),Kn(e)&&l(s.get(ds)));break;case"delete":a||(l(s.get(On)),Kn(e)&&l(s.get(ds)));break;case"set":Kn(e)&&l(s.get(On));break}}us()}function xh(e,t){const n=Ai.get(e);return n&&n.get(t)}function Un(e){const t=Ae(e);return t===e?t:(Ze(t,"iterate",Ao),ct(e)?t:t.map(wt))}function Oi(e){return Ze(e=Ae(e),"iterate",Ao),e}function Pt(e,t){return qt(e)?Yn(Cn(e)?wt(t):t):wt(t)}const Ah={__proto__:null,[Symbol.iterator](){return hs(this,Symbol.iterator,e=>Pt(this,e))},concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Un(this).concat(...t.map(o=>me(o)?Un(o):o))},entries(){return hs(this,"entries",e=>(e[1]=Pt(this,e[1]),e))},every(e,t){return Xt(this,"every",e,t,void 0,arguments)},filter(e,t){return Xt(this,"filter",e,t,n=>n.map(o=>Pt(this,o)),arguments)},find(e,t){return Xt(this,"find",e,t,n=>Pt(this,n),arguments)},findIndex(e,t){return Xt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xt(this,"findLast",e,t,n=>Pt(this,n),arguments)},findLastIndex(e,t){return Xt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xt(this,"forEach",e,t,void 0,arguments)},includes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return gs(this,"includes",t)},indexOf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return gs(this,"indexOf",t)},join(e){return Un(this).join(e)},lastIndexOf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return gs(this,"lastIndexOf",t)},map(e,t){return Xt(this,"map",e,t,void 0,arguments)},pop(){return Oo(this,"pop")},push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oo(this,"push",t)},reduce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Ma(this,"reduce",e,n)},reduceRight(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Ma(this,"reduceRight",e,n)},shift(){return Oo(this,"shift")},some(e,t){return Xt(this,"some",e,t,void 0,arguments)},splice(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oo(this,"splice",t)},toReversed(){return Un(this).toReversed()},toSorted(e){return Un(this).toSorted(e)},toSpliced(){return Un(this).toSpliced(...arguments)},unshift(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oo(this,"unshift",t)},values(){return hs(this,"values",e=>Pt(this,e))}};function hs(e,t,n){const o=Oi(e),i=o[t]();return o!==e&&!ct(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const Oh=Array.prototype;function Xt(e,t,n,o,i,r){const s=Oi(e),l=s!==e&&!ct(e),a=s[t];if(a!==Oh[t]){const f=a.apply(e,r);return l?wt(f):f}let u=n;s!==e&&(l?u=function(d,h){return n.call(this,Pt(e,d),h,e)}:n.length>2&&(u=function(d,h){return n.call(this,d,h,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Ma(e,t,n,o){const i=Oi(e),r=i!==e&&!ct(e);let s=n,l=!1;i!==e&&(r?(l=o.length===0,s=function(c,f,d){return l&&(l=!1,c=Pt(e,c)),n.call(this,c,Pt(e,f),d,e)}):n.length>3&&(s=function(c,f,d){return n.call(this,c,f,d,e)}));const a=i[t](s,...o);return l?Pt(e,a):a}function gs(e,t,n){const o=Ae(e);Ze(o,"iterate",Ao);const i=o[t](...n);return(i===-1||i===!1)&&Pi(n[0])?(n[0]=Ae(n[0]),o[t](...n)):i}function Oo(e,t,n){n===void 0&&(n=[]),Mt(),as();const o=Ae(e)[t].apply(e,n);return us(),It(),o}const Ch=Jr("__proto__,__v_isRef,__isVue"),Ia=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(mt));function Nh(e){mt(e)||(e=String(e));const t=Ae(this);return Ze(t,"has",e),t.hasOwnProperty(e)}class Pa{constructor(t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Fa:La:r?$a:ka).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=me(t);if(!i){let a;if(s&&(a=Ah[n]))return a;if(n==="hasOwnProperty")return Nh}const l=Reflect.get(t,n,Be(t)?t:o);if((mt(n)?Ia.has(n):Ch(n))||(i||Ze(t,"get",n),r))return l;if(Be(l)){const a=s&&wi(n)?l:l.value;return i&&Te(a)?Mi(a):a}return Te(l)?i?Mi(l):Co(l):l}}class Ra extends Pa{constructor(t){t===void 0&&(t=!1),super(!1,t)}set(t,n,o,i){let r=t[n];const s=me(t)&&wi(n);if(!this._isShallow){const u=qt(r);if(!ct(o)&&!qt(o)&&(r=Ae(r),o=Ae(o)),!s&&Be(r)&&!Be(o))return u||(r.value=o),!0}const l=s?Number(n)<t.length:Ne(t,n),a=Reflect.set(t,n,o,Be(t)?t:i);return t===Ae(i)&&(l?yt(o,r)&&Yt(t,"set",n,o):Yt(t,"add",n,o)),a}deleteProperty(t,n){const o=Ne(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Yt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!mt(n)||!Ia.has(n))&&Ze(t,"has",n),o}ownKeys(t){return Ze(t,"iterate",me(t)?"length":On),Reflect.ownKeys(t)}}class Da extends Pa{constructor(t){t===void 0&&(t=!1),super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Th=new Ra,Mh=new Da,Ih=new Ra(!0),Ph=new Da(!0),ps=e=>e,Ci=e=>Reflect.getPrototypeOf(e);function Rh(e,t,n){return function(){const o=this.__v_raw,i=Ae(o),r=Kn(i),s=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,a=o[e](...arguments),u=n?ps:t?Yn:wt;return!t&&Ze(i,"iterate",l?ds:On),Ue(Object.create(a),{next(){const{value:c,done:f}=a.next();return f?{value:c,done:f}:{value:s?[u(c[0]),u(c[1])]:u(c),done:f}}})}}function Ni(e){return function(){return e==="delete"?!1:e==="clear"?void 0:this}}function Dh(e,t){const n={get(i){const r=this.__v_raw,s=Ae(r),l=Ae(i);e||(yt(i,l)&&Ze(s,"get",i),Ze(s,"get",l));const{has:a}=Ci(s),u=t?ps:e?Yn:wt;if(a.call(s,i))return u(r.get(i));if(a.call(s,l))return u(r.get(l));r!==s&&r.get(i)},get size(){const i=this.__v_raw;return!e&&Ze(Ae(i),"iterate",On),i.size},has(i){const r=this.__v_raw,s=Ae(r),l=Ae(i);return e||(yt(i,l)&&Ze(s,"has",i),Ze(s,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const s=this,l=s.__v_raw,a=Ae(l),u=t?ps:e?Yn:wt;return!e&&Ze(a,"iterate",On),l.forEach((c,f)=>i.call(r,u(c),u(f),s))}};return Ue(n,e?{add:Ni("add"),set:Ni("set"),delete:Ni("delete"),clear:Ni("clear")}:{add(i){const r=Ae(this),s=Ci(r),l=Ae(i),a=!t&&!ct(i)&&!qt(i)?l:i;return s.has.call(r,a)||yt(i,a)&&s.has.call(r,i)||yt(l,a)&&s.has.call(r,l)||(r.add(a),Yt(r,"add",a,a)),this},set(i,r){!t&&!ct(r)&&!qt(r)&&(r=Ae(r));const s=Ae(this),{has:l,get:a}=Ci(s);let u=l.call(s,i);u||(i=Ae(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?yt(r,c)&&Yt(s,"set",i,r):Yt(s,"add",i,r),this},delete(i){const r=Ae(this),{has:s,get:l}=Ci(r);let a=s.call(r,i);a||(i=Ae(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Yt(r,"delete",i,void 0),u},clear(){const i=Ae(this),r=i.size!==0,s=i.clear();return r&&Yt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Rh(i,e,t)}),n}function Ti(e,t){const n=Dh(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Ne(n,i)&&i in o?n:o,i,r)}const kh={get:Ti(!1,!1)},$h={get:Ti(!1,!0)},Lh={get:Ti(!0,!1)},Fh={get:Ti(!0,!0)},ka=new WeakMap,$a=new WeakMap,La=new WeakMap,Fa=new WeakMap;function Hh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wh(e){return e.__v_skip||!Object.isExtensible(e)?0:Hh(ch(e))}function Co(e){return qt(e)?e:Ii(e,!1,Th,kh,ka)}function Bh(e){return Ii(e,!1,Ih,$h,$a)}function Mi(e){return Ii(e,!0,Mh,Lh,La)}function gO(e){return Ii(e,!0,Ph,Fh,Fa)}function Ii(e,t,n,o,i){if(!Te(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Wh(e);if(r===0)return e;const s=i.get(e);if(s)return s;const l=new Proxy(e,r===2?o:n);return i.set(e,l),l}function Cn(e){return qt(e)?Cn(e.__v_raw):!!(e&&e.__v_isReactive)}function qt(e){return!!(e&&e.__v_isReadonly)}function ct(e){return!!(e&&e.__v_isShallow)}function Pi(e){return e?!!e.__v_raw:!1}function Ae(e){const t=e&&e.__v_raw;return t?Ae(t):e}function No(e){return!Ne(e,"__v_skip")&&Object.isExtensible(e)&&pa(e,"__v_skip",!0),e}const wt=e=>Te(e)?Co(e):e,Yn=e=>Te(e)?Mi(e):e;function Be(e){return e?e.__v_isRef===!0:!1}function Oe(e){return Ha(e,!1)}function fn(e){return Ha(e,!0)}function Ha(e,t){return Be(e)?e:new zh(e,t)}class zh{constructor(t,n){this.dep=new xi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ae(t),this._value=n?t:wt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ct(t)||qt(t);t=o?t:Ae(t),yt(t,n)&&(this._rawValue=t,this._value=o?t:wt(t),this.dep.trigger())}}function ue(e){return Be(e)?e.value:e}function Ee(e){return ye(e)?e():ue(e)}const Gh={get:(e,t,n)=>t==="__v_raw"?e:ue(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return Be(i)&&!Be(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Wa(e){return Cn(e)?e:new Proxy(e,Gh)}class Vh{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new xi,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Kh(e){return new Vh(e)}function Uh(e){const t=me(e)?new Array(e.length):{};for(const n in e)t[n]=Ba(e,n);return t}class Yh{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._raw=Ae(t);let i=!0,r=t;if(!me(t)||!wi(String(n)))do i=!Pi(r)||ct(r);while(i&&(r=r.__v_raw));this._shallow=i}get value(){let t=this._object[this._key];return this._shallow&&(t=ue(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Be(this._raw[this._key])){const n=this._object[this._key];if(Be(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return xh(this._raw,this._key)}}class Xh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Pe(e,t,n){return Be(e)?e:ye(e)?new Xh(e):Te(e)&&arguments.length>1?Ba(e,t,n):Oe(e)}function Ba(e,t,n){return new Yh(e,t,n)}class qh{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new xi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&$e!==this)return Ea(this,!0),!0}get value(){const t=this.dep.track();return Oa(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function jh(e,t,n){n===void 0&&(n=!1);let o,i;return ye(e)?o=e:(o=e.get,i=e.set),new qh(o,i,n)}const Ri={},Di=new WeakMap;let Nn;function Zh(e,t,n){if(n===void 0&&(n=Nn),n){let o=Di.get(n);o||Di.set(n,o=[]),o.push(e)}}function Jh(e,t,n){n===void 0&&(n=ke);const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=O=>i?O:ct(O)||i===!1||i===0?dn(O,1):dn(O);let c,f,d,h,x=!1,b=!1;if(Be(e)?(f=()=>e.value,x=ct(e)):Cn(e)?(f=()=>u(e),x=!0):me(e)?(b=!0,x=e.some(O=>Cn(O)||ct(O)),f=()=>e.map(O=>{if(Be(O))return O.value;if(Cn(O))return u(O);if(ye(O))return a?a(O,2):O()})):ye(e)?t?f=a?()=>a(e,2):e:f=()=>{if(d){Mt();try{d()}finally{It()}}const O=Nn;Nn=c;try{return a?a(e,3,[h]):e(h)}finally{Nn=O}}:f=Tt,t&&i){const O=f,B=i===!0?1/0:i;f=()=>dn(O(),B)}const A=ss(),E=()=>{c.stop(),A&&A.active&&es(A.effects,c)};if(r&&t){const O=t;t=function(){O(...arguments),E()}}let D=b?new Array(e.length).fill(Ri):Ri;const S=O=>{if(!(!(c.flags&1)||!c.dirty&&!O))if(t){const B=c.run();if(i||x||(b?B.some((U,J)=>yt(U,D[J])):yt(B,D))){d&&d();const U=Nn;Nn=c;try{const J=[B,D===Ri?void 0:b&&D[0]===Ri?[]:D,h];D=B,a?a(t,3,J):t(...J)}finally{Nn=U}}}else c.run()};return l&&l(S),c=new ba(f),c.scheduler=s?()=>s(S,!1):S,h=O=>Zh(O,!1,c),d=c.onStop=()=>{const O=Di.get(c);if(O){if(a)a(O,4);else for(const B of O)B();Di.delete(c)}},t?o?S(!0):D=c.run():s?s(S.bind(null,!0),!0):c.run(),E.pause=c.pause.bind(c),E.resume=c.resume.bind(c),E.stop=E,E}function dn(e,t,n){if(t===void 0&&(t=1/0),t<=0||!Te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Be(e))dn(e.value,t,n);else if(me(e))for(let o=0;o<e.length;o++)dn(e[o],t,n);else if(ca(e)||Kn(e))e.forEach(o=>{dn(o,t,n)});else if(ga(e)){for(const o in e)dn(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&dn(e[o],t,n)}return e}/** * @vue/runtime-core v3.5.30 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const To=[];let vs=!1;function pO(e){if(vs)return;vs=!0,Mt();const t=To.length?To[To.length-1].component:null,n=t&&t.appContext.config.warnHandler,o=Qh();for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];if(n)Xn(n,t,11,[e+r.map(l=>{var a,u;return(u=(a=l.toString)==null?void 0:a.call(l))!=null?u:JSON.stringify(l)}).join(""),t&&t.proxy,o.map(l=>{let{vnode:a}=l;return"at <"+Xu(t,a.type)+">"}).join(` `),o]);else{const l=["[Vue warn]: "+e,...r];o.length&&l.push(` `,...eg(o)),console.warn(...l)}It(),vs=!1}function Qh(){let e=To[To.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function eg(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[` `],...tg(n))}),t}function tg(e){let{vnode:t,recurseCount:n}=e;const o=n>0?"... ("+n+" recursive calls)":"",i=t.component?t.component.parent==null:!1,r=" at <"+Xu(t.component,t.type,i),s=">"+o;return t.props?[r,...ng(t.props),s]:[r+s]}function ng(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...za(o,e[o]))}),n.length>3&&t.push(" ..."),t}function za(e,t,n){return He(t)?(t=JSON.stringify(t),n?t:[e+"="+t]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[e+"="+t]:Be(t)?(t=za(e,Ae(t.value),!0),n?t:[e+"=Ref<",t,">"]):ye(t)?[e+"=fn"+(t.name?"<"+t.name+">":"")]:(t=Ae(t),n?t:[e+"=",t])}function Xn(e,t,n,o){try{return o?e(...o):e()}catch(i){ki(i,t,n)}}function Rt(e,t,n,o){if(ye(e)){const i=Xn(e,t,n,o);return i&&da(i)&&i.catch(r=>{ki(r,t,n)}),i}if(me(e)){const i=[];for(let r=0;r<e.length;r++)i.push(Rt(e[r],t,n,o));return i}}function ki(e,t,n,o){o===void 0&&(o=!0);const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||ke;if(t){let l=t.parent;const a=t.proxy,u="https://vuejs.org/error-reference/#runtime-"+n;for(;l;){const c=l.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,a,u)===!1)return}l=l.parent}if(r){Mt(),Xn(r,null,10,[e,a,u]),It();return}}og(e,n,i,o,s)}function og(e,t,n,o,i){if(i===void 0&&(i=!1),i)throw e;console.error(e)}const tt=[];let Dt=-1;const qn=[];let hn=null,jn=0;const Ga=Promise.resolve();let $i=null;function kt(e){const t=$i||Ga;return e?t.then(this?e.bind(this):e):t}function ig(e){let t=Dt+1,n=tt.length;for(;t<n;){const o=t+n>>>1,i=tt[o],r=Mo(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function ms(e){if(!(e.flags&1)){const t=Mo(e),n=tt[tt.length-1];!n||!(e.flags&2)&&t>=Mo(n)?tt.push(e):tt.splice(ig(t),0,e),e.flags|=1,Va()}}function Va(){$i||($i=Ga.then(Ya))}function rg(e){me(e)?qn.push(...e):hn&&e.id===-1?hn.splice(jn+1,0,e):e.flags&1||(qn.push(e),e.flags|=1),Va()}function Ka(e,t,n){for(n===void 0&&(n=Dt+1);n<tt.length;n++){const o=tt[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;tt.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function Ua(e){if(qn.length){const t=[...new Set(qn)].sort((n,o)=>Mo(n)-Mo(o));if(qn.length=0,hn){hn.push(...t);return}for(hn=t,jn=0;jn<hn.length;jn++){const n=hn[jn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}hn=null,jn=0}}const Mo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ya(e){const t=Tt;try{for(Dt=0;Dt<tt.length;Dt++){const n=tt[Dt];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Xn(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Dt<tt.length;Dt++){const n=tt[Dt];n&&(n.flags&=-2)}Dt=-1,tt.length=0,Ua(),$i=null,(tt.length||qn.length)&&Ya()}}let nt=null,Xa=null;function Li(e){const t=nt;return nt=e,Xa=e&&e.type.__scopeId||null,t}function gn(e,t,n){if(t===void 0&&(t=nt),!t||e._n)return e;const o=function(){o._d&&Ui(-1);const r=Li(t);let s;try{s=e(...arguments)}finally{Li(r),o._d&&Ui(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Tn(e,t,n,o){const i=e.dirs,r=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];r&&(l.oldValue=r[s].value);let a=l.dir[o];a&&(Mt(),Rt(a,n,8,[e.el,l,e,t]),It())}}function pn(e,t){if(Qe){let n=Qe.provides;const o=Qe.parent&&Qe.parent.provides;o===n&&(n=Qe.provides=Object.create(o)),n[e]=t}}function pt(e,t,n){n===void 0&&(n=!1);const o=vn();if(o||Qn){let i=Qn?Qn._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&ye(t)?t.call(o&&o.proxy):t}}const sg=Symbol.for("v-scx"),lg=()=>pt(sg);function ag(e,t){return ys(e,null,t)}function xe(e,t,n){return ys(e,t,n)}function ys(e,t,n){n===void 0&&(n=ke);const{immediate:o,deep:i,flush:r,once:s}=n,l=Ue({},n),a=t&&o||!t&&r!=="post";let u;if(Wo){if(r==="sync"){const h=lg();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=Tt,h.resume=Tt,h.pause=Tt,h}}const c=Qe;l.call=(h,x,b)=>Rt(h,c,x,b);let f=!1;r==="post"?l.scheduler=h=>{Je(h,c&&c.suspense)}:r!=="sync"&&(f=!0,l.scheduler=(h,x)=>{x?h():ms(h)}),l.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=Jh(e,t,l);return Wo&&(u?u.push(d):a&&d()),d}function ug(e,t,n){const o=this.proxy,i=He(e)?e.includes(".")?qa(o,e):()=>o[e]:e.bind(o,o);let r;ye(t)?r=t:(r=t.handler,n=t);const s=Ho(this),l=ys(i,r.bind(o),n);return s(),l}function qa(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}const ja=Symbol("_vte"),cg=e=>e.__isTeleport,Io=e=>e&&(e.disabled||e.disabled===""),Za=e=>e&&(e.defer||e.defer===""),Ja=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Qa=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_s=(e,t)=>{const n=e&&e.to;return He(n)?t?t(n):null:n},eu={name:"Teleport",__isTeleport:!0,process(e,t,n,o,i,r,s,l,a,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:x,createText:b,createComment:A}}=u,E=Io(t.props);let{shapeFlag:D,children:S,dynamicChildren:O}=t;if(e==null){const B=t.el=b(""),U=t.anchor=b("");h(B,n,o),h(U,n,o);const J=(ee,te)=>{D&16&&c(S,ee,te,i,r,s,l,a)},G=()=>{const ee=t.target=_s(t.props,x),te=ws(ee,t,b,h);ee&&(s!=="svg"&&Ja(ee)?s="svg":s!=="mathml"&&Qa(ee)&&(s="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(ee),E||(J(ee,te),Hi(t,!1)))};E&&(J(n,U),Hi(t,!0)),Za(t.props)?(t.el.__isMounted=!1,Je(()=>{G(),delete t.el.__isMounted},r)):G()}else{if(Za(t.props)&&e.el.__isMounted===!1){Je(()=>{eu.process(e,t,n,o,i,r,s,l,a,u)},r);return}t.el=e.el,t.targetStart=e.targetStart;const B=t.anchor=e.anchor,U=t.target=e.target,J=t.targetAnchor=e.targetAnchor,G=Io(e.props),ee=G?n:U,te=G?B:J;if(s==="svg"||Ja(U)?s="svg":(s==="mathml"||Qa(U))&&(s="mathml"),O?(d(e.dynamicChildren,O,ee,i,r,s,l),Du(e,t)):a||f(e,t,ee,te,i,r,s,l,!1),E)G?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fi(t,n,B,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const X=t.target=_s(t.props,x);X&&Fi(t,X,null,u,0)}else G&&Fi(t,U,J,u,1);Hi(t,E)}},remove(e,t,n,o,i){let{um:r,o:{remove:s}}=o;const{shapeFlag:l,children:a,anchor:u,targetStart:c,targetAnchor:f,target:d,props:h}=e;if(d&&(s(c),s(f)),i&&s(u),l&16){const x=i||!Io(h);for(let b=0;b<a.length;b++){const A=a[b];r(A,t,n,x,!!A.dynamicChildren)}}},move:Fi,hydrate:fg};function Fi(e,t,n,o,i){let{o:{insert:r},m:s}=o;i===void 0&&(i=2),i===0&&r(e.targetAnchor,t,n);const{el:l,anchor:a,shapeFlag:u,children:c,props:f}=e,d=i===2;if(d&&r(l,t,n),(!d||Io(f))&&u&16)for(let h=0;h<c.length;h++)s(c[h],t,n,2);d&&r(a,t,n)}function fg(e,t,n,o,i,r,s,l){let{o:{nextSibling:a,parentNode:u,querySelector:c,insert:f,createText:d}}=s;function h(E,D){let S=D;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,E._lpa=t.targetAnchor&&a(t.targetAnchor);break}}S=a(S)}}function x(E,D){D.anchor=l(a(E),D,u(E),n,o,i,r)}const b=t.target=_s(t.props,c),A=Io(t.props);if(b){const E=b._lpa||b.firstChild;t.shapeFlag&16&&(A?(x(e,t),h(b,E),t.targetAnchor||ws(b,t,d,f,u(e)===b?e:null)):(t.anchor=a(e),h(b,E),t.targetAnchor||ws(b,t,d,f),l(E&&a(E),t,b,n,o,i,r))),Hi(t,A)}else A&&t.shapeFlag&16&&(x(e,t),t.targetStart=e,t.targetAnchor=a(e));return t.anchor&&a(t.anchor)}const dg=eu;function Hi(e,t){const n=e.ctx;if(n&&n.ut){let o,i;for(t?(o=e.el,i=e.anchor):(o=e.targetStart,i=e.targetAnchor);o&&o!==i;)o.nodeType===1&&o.setAttribute("data-v-owner",n.uid),o=o.nextSibling;n.ut()}}function ws(e,t,n,o,i){i===void 0&&(i=null);const r=t.targetStart=n(""),s=t.targetAnchor=n("");return r[ja]=s,e&&(o(r,e,i),o(s,e,i)),s}const hg=Symbol("_leaveCb");function bs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function De(e,t){return ye(e)?Ue({name:e.name},t,{setup:e}):e}function tu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nu(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Wi=new WeakMap;function Po(e,t,n,o,i){if(i===void 0&&(i=!1),me(e)){e.forEach((b,A)=>Po(b,t&&(me(t)?t[A]:t),n,o,i));return}if(Zn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Po(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?$s(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===ke?l.refs={}:l.refs,f=l.setupState,d=Ae(f),h=f===ke?ua:b=>nu(c,b)?!1:Ne(d,b),x=(b,A)=>!(A&&nu(c,A));if(u!=null&&u!==a){if(ou(t),He(u))c[u]=null,h(u)&&(f[u]=null);else if(Be(u)){const b=t;x(u,b.k)&&(u.value=null),b.k&&(c[b.k]=null)}}if(ye(a))Xn(a,l,12,[s,c]);else{const b=He(a),A=Be(a);if(b||A){const E=()=>{if(e.f){const D=b?h(a)?f[a]:c[a]:x()||!e.k?a.value:c[e.k];if(i)me(D)&&es(D,r);else if(me(D))D.includes(r)||D.push(r);else if(b)c[a]=[r],h(a)&&(f[a]=c[a]);else{const S=[r];x(a,e.k)&&(a.value=S),e.k&&(c[e.k]=S)}}else b?(c[a]=s,h(a)&&(f[a]=s)):A&&(x(a,e.k)&&(a.value=s),e.k&&(c[e.k]=s))};if(s){const D=()=>{E(),Wi.delete(e)};D.id=-1,Wi.set(e,D),Je(D,n)}else ou(e),E()}}}function ou(e){const t=Wi.get(e);t&&(t.flags|=8,Wi.delete(e))}bo().requestIdleCallback,bo().cancelIdleCallback;const Zn=e=>!!e.type.__asyncLoader,iu=e=>e.type.__isKeepAlive;function gg(e,t){ru(e,"a",t)}function pg(e,t){ru(e,"da",t)}function ru(e,t,n){n===void 0&&(n=Qe);const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Bi(t,o,n),n){let i=n.parent;for(;i&&i.parent;)iu(i.parent.vnode)&&vg(o,t,n,i),i=i.parent}}function vg(e,t,n,o){const i=Bi(t,e,o,!0);zi(()=>{es(o[t],i)},n)}function Bi(e,t,n,o){if(n===void 0&&(n=Qe),o===void 0&&(o=!1),n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=function(){Mt();const s=Ho(n);for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];const c=Rt(t,n,e,a);return s(),It(),c});return o?i.unshift(r):i.push(r),r}}const jt=e=>function(t,n){n===void 0&&(n=Qe),(!Wo||e==="sp")&&Bi(e,function(){return t(...arguments)},n)},su=jt("bm"),bt=jt("m"),mg=jt("bu"),yg=jt("u"),Ss=jt("bum"),zi=jt("um"),_g=jt("sp"),wg=jt("rtg"),bg=jt("rtc");function Sg(e,t){t===void 0&&(t=Qe),Bi("ec",e,t)}const lu="components";function $t(e,t){return cu(lu,e,!0,t)||e}const au=Symbol.for("v-ndc");function uu(e){return He(e)?cu(lu,e)||e:e||au}function cu(e,t,n,o){o===void 0&&(o=!1);const i=nt||Qe;if(i){const r=i.type;{const l=Yu(r,!1);if(l&&(l===t||l===et(t)||l===Si(et(t))))return r}const s=fu(i[e]||r[e],t)||fu(i.appContext[e],t);return!s&&o?r:s}}function fu(e,t){return e&&(e[t]||e[et(t)]||e[Si(et(t))])}function Jn(e,t,n,o){let i;const r=n&&n[o],s=me(e);if(s||He(e)){const l=s&&Cn(e);let a=!1,u=!1;l&&(a=!ct(e),u=qt(e),e=Oi(e)),i=new Array(e.length);for(let c=0,f=e.length;c<f;c++)i[c]=t(a?u?Yn(wt(e[c])):wt(e[c]):e[c],c,void 0,r&&r[c])}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r&&r[l])}else if(Te(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,r&&r[a]));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=t(e[c],c,a,r&&r[a])}}else i=[];return n&&(n[o]=i),i}function vt(e,t,n,o,i){if(n===void 0&&(n={}),nt.ce||nt.parent&&Zn(nt.parent)&&nt.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),re(),Xe(Le,null,[Ce("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),re();const s=r&&du(r(n)),l=n.key||s&&s.key,a=Xe(Le,{key:(l&&!mt(l)?l:"_"+t)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function du(e){return e.some(t=>$o(t)?!(t.type===Zt||t.type===Le&&!du(t.children)):!0)?e:null}const Es=e=>e?zu(e)?$s(e):Es(e.parent):null,Ro=Ue(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Es(e.parent),$root:e=>Es(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Cs(e),$forceUpdate:e=>e.f||(e.f=()=>{ms(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>ug.bind(e)}),xs=(e,t)=>e!==ke&&!e.__isScriptSetup&&Ne(e,t),Eg={get(e,t){let{_:n}=e;if(t==="__v_skip")return!0;const{ctx:o,setupState:i,data:r,props:s,accessCache:l,type:a,appContext:u}=n;if(t[0]!=="$"){const h=l[t];if(h!==void 0)switch(h){case 1:return i[t];case 2:return r[t];case 4:return o[t];case 3:return s[t]}else{if(xs(i,t))return l[t]=1,i[t];if(r!==ke&&Ne(r,t))return l[t]=2,r[t];if(Ne(s,t))return l[t]=3,s[t];if(o!==ke&&Ne(o,t))return l[t]=4,o[t];Os&&(l[t]=0)}}const c=Ro[t];let f,d;if(c)return t==="$attrs"&&Ze(n.attrs,"get",""),c(n);if((f=a.__cssModules)&&(f=f[t]))return f;if(o!==ke&&Ne(o,t))return l[t]=4,o[t];if(d=u.config.globalProperties,Ne(d,t))return d[t]},set(e,t,n){let{_:o}=e;const{data:i,setupState:r,ctx:s}=o;return xs(r,t)?(r[t]=n,!0):i!==ke&&Ne(i,t)?(i[t]=n,!0):Ne(o.props,t)||t[0]==="$"&&t.slice(1)in o?!1:(s[t]=n,!0)},has(e,t){let{_:{data:n,setupState:o,accessCache:i,ctx:r,appContext:s,props:l,type:a}}=e,u;return!!(i[t]||n!==ke&&t[0]!=="$"&&Ne(n,t)||xs(o,t)||Ne(l,t)||Ne(r,t)||Ne(Ro,t)||Ne(s.config.globalProperties,t)||(u=a.__cssModules)&&u[t])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function hu(){return gu().slots}function As(){return gu().attrs}function gu(e){const t=vn();return t.setupContext||(t.setupContext=Uu(t))}function pu(e){return me(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function xg(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}let Os=!0;function Ag(e){const t=Cs(e),n=e.proxy,o=e.ctx;Os=!1,t.beforeCreate&&vu(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:l,provide:a,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:x,activated:b,deactivated:A,beforeDestroy:E,beforeUnmount:D,destroyed:S,unmounted:O,render:B,renderTracked:U,renderTriggered:J,errorCaptured:G,serverPrefetch:ee,expose:te,inheritAttrs:X,components:P,directives:oe,filters:m}=t;if(u&&Og(u,o),s)for(const R in s){const I=s[R];ye(I)&&(o[R]=I.bind(n))}if(i){const R=i.call(n,n);Te(R)&&(e.data=Co(R))}if(Os=!0,r)for(const R in r){const I=r[R],C=ye(I)?I.bind(n,n):ye(I.get)?I.get.bind(n,n):Tt,k=!ye(I)&&ye(I.set)?I.set.bind(n):Tt,H=fe({get:C,set:k});Object.defineProperty(o,R,{enumerable:!0,configurable:!0,get:()=>H.value,set:$=>H.value=$})}if(l)for(const R in l)mu(l[R],o,n,R);if(a){const R=ye(a)?a.call(n):a;Reflect.ownKeys(R).forEach(I=>{pn(I,R[I])})}c&&vu(c,e,"c");function T(R,I){me(I)?I.forEach(C=>R(C.bind(n))):I&&R(I.bind(n))}if(T(su,f),T(bt,d),T(mg,h),T(yg,x),T(gg,b),T(pg,A),T(Sg,G),T(bg,U),T(wg,J),T(Ss,D),T(zi,O),T(_g,ee),me(te))if(te.length){const R=e.exposed||(e.exposed={});te.forEach(I=>{Object.defineProperty(R,I,{get:()=>n[I],set:C=>n[I]=C,enumerable:!0})})}else e.exposed||(e.exposed={});B&&e.render===Tt&&(e.render=B),X!=null&&(e.inheritAttrs=X),P&&(e.components=P),oe&&(e.directives=oe),ee&&tu(e)}function Og(e,t,n){me(e)&&(e=Ns(e));for(const o in e){const i=e[o];let r;Te(i)?"default"in i?r=pt(i.from||o,i.default,!0):r=pt(i.from||o):r=pt(i),Be(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function vu(e,t,n){Rt(me(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function mu(e,t,n,o){let i=o.includes(".")?qa(n,o):()=>n[o];if(He(e)){const r=t[e];ye(r)&&xe(i,r)}else if(ye(e))xe(i,e.bind(n));else if(Te(e))if(me(e))e.forEach(r=>mu(r,t,n,o));else{const r=ye(e.handler)?e.handler.bind(n):t[e.handler];ye(r)&&xe(i,r,e)}}function Cs(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>Gi(a,u,s,!0)),Gi(a,t,s)),Te(t)&&r.set(t,a),a}function Gi(e,t,n,o){o===void 0&&(o=!1);const{mixins:i,extends:r}=t;r&&Gi(e,r,n,!0),i&&i.forEach(s=>Gi(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=Cg[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const Cg={data:yu,props:_u,emits:_u,methods:Do,computed:Do,beforeCreate:ot,created:ot,beforeMount:ot,mounted:ot,beforeUpdate:ot,updated:ot,beforeDestroy:ot,beforeUnmount:ot,destroyed:ot,unmounted:ot,activated:ot,deactivated:ot,errorCaptured:ot,serverPrefetch:ot,components:Do,directives:Do,watch:Tg,provide:yu,inject:Ng};function yu(e,t){return t?e?function(){return Ue(ye(e)?e.call(this,this):e,ye(t)?t.call(this,this):t)}:t:e}function Ng(e,t){return Do(Ns(e),Ns(t))}function Ns(e){if(me(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ot(e,t){return e?[...new Set([].concat(e,t))]:t}function Do(e,t){return e?Ue(Object.create(null),e,t):t}function _u(e,t){return e?me(e)&&me(t)?[...new Set([...e,...t])]:Ue(Object.create(null),pu(e),pu(t??{})):t}function Tg(e,t){if(!e)return t;if(!t)return e;const n=Ue(Object.create(null),e);for(const o in t)n[o]=ot(e[o],t[o]);return n}function wu(){return{app:null,config:{isNativeTag:ua,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 Mg=0;function Ig(e,t){return function(o,i){i===void 0&&(i=null),ye(o)||(o=Ue({},o)),i!=null&&!Te(i)&&(i=null);const r=wu(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:Mg++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:cp,get config(){return r.config},set config(c){},use(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),h=1;h<f;h++)d[h-1]=arguments[h];return s.has(c)||(c&&ye(c.install)?(s.add(c),c.install(u,...d)):ye(c)&&(s.add(c),c(u,...d))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,f){return f?(r.components[c]=f,u):r.components[c]},directive(c,f){return f?(r.directives[c]=f,u):r.directives[c]},mount(c,f,d){if(!a){const h=u._ceVNode||Ce(o,i);return h.appContext=r,d===!0?d="svg":d===!1&&(d=void 0),e(h,c,d),a=!0,u._container=c,c.__vue_app__=u,$s(h.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Rt(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,f){return r.provides[c]=f,u},runWithContext(c){const f=Qn;Qn=u;try{return c()}finally{Qn=f}}};return u}}let Qn=null;const Pg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[t+"Modifiers"]||e[et(t)+"Modifiers"]||e[cn(t)+"Modifiers"];function Rg(e,t){if(e.isUnmounted)return;const n=e.vnode.props||ke;for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];let s=i;const l=t.startsWith("update:"),a=l&&Pg(n,t.slice(7));a&&(a.trim&&(s=i.map(d=>He(d)?d.trim():d)),a.number&&(s=i.map(hh)));let u,c=n[u=ts(t)]||n[u=ts(et(t))];!c&&l&&(c=n[u=ts(cn(t))]),c&&Rt(c,e,6,s);const f=n[u+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Rt(f,e,6,s)}}const Dg=new WeakMap;function bu(e,t,n){n===void 0&&(n=!1);const o=n?Dg:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!ye(e)){const a=u=>{const c=bu(u,t,!0);c&&(l=!0,Ue(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Te(e)&&o.set(e,null),null):(me(r)?r.forEach(a=>s[a]=null):Ue(s,r),Te(e)&&o.set(e,s),s)}function Vi(e,t){return!e||!_i(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,cn(t))||Ne(e,t))}function vO(){}function Su(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[r],slots:s,attrs:l,emit:a,render:u,renderCache:c,props:f,data:d,setupState:h,ctx:x,inheritAttrs:b}=e,A=Li(e);let E,D;try{if(n.shapeFlag&4){const O=i||o,B=O;E=Ft(u.call(B,O,c,f,h,d,x)),D=l}else{const O=t;E=Ft(O.length>1?O(f,{attrs:l,slots:s,emit:a}):O(f,null)),D=t.props?l:kg(l)}}catch(O){ko.length=0,ki(O,e,1),E=Ce(Zt)}let S=E;if(D&&b!==!1){const O=Object.keys(D),{shapeFlag:B}=S;O.length&&B&7&&(r&&O.some(Qr)&&(D=$g(D,r)),S=to(S,D,!1,!0))}return n.dirs&&(S=to(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&bs(S,n.transition),E=S,Li(A),E}const kg=e=>{let t;for(const n in e)(n==="class"||n==="style"||_i(n))&&((t||(t={}))[n]=e[n]);return t},$g=(e,t)=>{const n={};for(const o in e)(!Qr(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Lg(e,t,n){const{props:o,children:i,component:r}=e,{props:s,children:l,patchFlag:a}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?Eu(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(xu(s,o,d)&&!Vi(u,d))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?Eu(o,s,u):!0:!!s;return!1}function Eu(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const r=o[i];if(xu(t,e,r)&&!Vi(n,r))return!0}return!1}function xu(e,t,n){const o=e[n],i=t[n];return n==="style"&&Te(o)&&Te(i)?!os(o,i):o!==i}function Fg(e,t){let{vnode:n,parent:o}=e;for(;o;){const i=o.subTree;if(i.suspense&&i.suspense.activeBranch===n&&(i.el=n.el),i===n)(n=o.vnode).el=t,o=o.parent;else break}}const Au={},Ou=()=>Object.create(Au),Cu=e=>Object.getPrototypeOf(e)===Au;function Hg(e,t,n,o){o===void 0&&(o=!1);const i={},r=Ou();e.propsDefaults=Object.create(null),Nu(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:Bh(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function Wg(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=Ae(i),[a]=e.propsOptions;let u=!1;if((o||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(Vi(e.emitsOptions,d))continue;const h=t[d];if(a)if(Ne(r,d))h!==r[d]&&(r[d]=h,u=!0);else{const x=et(d);i[x]=Ts(a,l,x,h,e,!1)}else h!==r[d]&&(r[d]=h,u=!0)}}}else{Nu(e,t,i,r)&&(u=!0);let c;for(const f in l)(!t||!Ne(t,f)&&((c=cn(f))===f||!Ne(t,c)))&&(a?n&&(n[f]!==void 0||n[c]!==void 0)&&(i[f]=Ts(a,l,f,void 0,e,!0)):delete i[f]);if(r!==l)for(const f in r)(!t||!Ne(t,f))&&(delete r[f],u=!0)}u&&Yt(e.attrs,"set","")}function Nu(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(wo(a))continue;const u=t[a];let c;i&&Ne(i,c=et(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:Vi(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=Ae(n),u=l||ke;for(let c=0;c<r.length;c++){const f=r[c];n[f]=Ts(i,a,f,u[f],e,!Ne(u,f))}}return s}function Ts(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=Ne(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&ye(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=Ho(i);o=u[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===cn(n))&&(o=!0))}return o}const Bg=new WeakMap;function Tu(e,t,n){n===void 0&&(n=!1);const o=n?Bg:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!ye(e)){const c=f=>{a=!0;const[d,h]=Tu(f,t,!0);Ue(s,d),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return Te(e)&&o.set(e,Vn),Vn;if(me(r))for(let c=0;c<r.length;c++){const f=et(r[c]);Mu(f)&&(s[f]=ke)}else if(r)for(const c in r){const f=et(c);if(Mu(f)){const d=r[c],h=s[f]=me(d)||ye(d)?{type:d}:Ue({},d),x=h.type;let b=!1,A=!0;if(me(x))for(let E=0;E<x.length;++E){const D=x[E],S=ye(D)&&D.name;if(S==="Boolean"){b=!0;break}else S==="String"&&(A=!1)}else b=ye(x)&&x.name==="Boolean";h[0]=b,h[1]=A,(b||Ne(h,"default"))&&l.push(f)}}const u=[s,l];return Te(e)&&o.set(e,u),u}function Mu(e){return e[0]!=="$"&&!wo(e)}const Ms=e=>e==="_"||e==="_ctx"||e==="$stable",Is=e=>me(e)?e.map(Ft):[Ft(e)],zg=(e,t,n)=>{if(t._n)return t;const o=gn(function(){return Is(t(...arguments))},n);return o._c=!1,o},Iu=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Ms(i))continue;const r=e[i];if(ye(r))t[i]=zg(i,r,o);else if(r!=null){const s=Is(r);t[i]=()=>s}}},Pu=(e,t)=>{const n=Is(t);e.slots.default=()=>n},Ru=(e,t,n)=>{for(const o in t)(n||!Ms(o))&&(e[o]=t[o])},Gg=(e,t,n)=>{const o=e.slots=Ou();if(e.vnode.shapeFlag&32){const i=t._;i?(Ru(o,t,n),n&&pa(o,"_",i,!0)):Iu(t,o)}else t&&Pu(e,t)},Vg=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=ke;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Ru(i,t,n):(r=!t.$stable,Iu(t,i)),s=t}else t&&(Pu(e,t),s={default:1});if(r)for(const l in i)!Ms(l)&&s[l]==null&&delete i[l]};function Kg(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(bo().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const Je=jg;function Ug(e){return Yg(e)}function Yg(e,t){Kg();const n=bo();n.__VUE__=!0;const{insert:o,remove:i,patchProp:r,createElement:s,createText:l,createComment:a,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=Tt,insertStaticContent:x}=e,b=function(w,v,p,g,_,N,L,F,M){if(g===void 0&&(g=null),_===void 0&&(_=null),N===void 0&&(N=null),L===void 0&&(L=void 0),F===void 0&&(F=null),M===void 0&&(M=!!v.dynamicChildren),w===v)return;w&&!Lo(w,v)&&(g=j(w),W(w,_,N,!0),w=null),v.patchFlag===-2&&(M=!1,v.dynamicChildren=null);const{type:z,ref:V,shapeFlag:K}=v;switch(z){case Ki:A(w,v,p,g);break;case Zt:E(w,v,p,g);break;case Rs:w==null&&D(v,p,g,L);break;case Le:P(w,v,p,g,_,N,L,F,M);break;default:K&1?B(w,v,p,g,_,N,L,F,M):K&6?oe(w,v,p,g,_,N,L,F,M):(K&64||K&128)&&z.process(w,v,p,g,_,N,L,F,M,ge)}V!=null&&_?Po(V,w&&w.ref,N,v||w,!v):V==null&&w&&w.ref!=null&&Po(w.ref,null,N,w,!0)},A=(y,w,v,p)=>{if(y==null)o(w.el=l(w.children),v,p);else{const g=w.el=y.el;w.children!==y.children&&u(g,w.children)}},E=(y,w,v,p)=>{y==null?o(w.el=a(w.children||""),v,p):w.el=y.el},D=(y,w,v,p)=>{[y.el,y.anchor]=x(y.children,w,v,p,y.el,y.anchor)},S=(y,w,v)=>{let{el:p,anchor:g}=y,_;for(;p&&p!==g;)_=d(p),o(p,w,v),p=_;o(g,w,v)},O=y=>{let{el:w,anchor:v}=y,p;for(;w&&w!==v;)p=d(w),i(w),w=p;i(v)},B=(y,w,v,p,g,_,N,L,F)=>{if(w.type==="svg"?N="svg":w.type==="math"&&(N="mathml"),y==null)U(w,v,p,g,_,N,L,F);else{const M=y.el&&y.el._isVueCE?y.el:null;try{M&&M._beginPatch(),ee(y,w,g,_,N,L,F)}finally{M&&M._endPatch()}}},U=(y,w,v,p,g,_,N,L)=>{let F,M;const{props:z,shapeFlag:V,transition:K,dirs:Z}=y;if(F=y.el=s(y.type,_,z&&z.is,z),V&8?c(F,y.children):V&16&&G(y.children,F,null,p,g,Ps(y,_),N,L),Z&&Tn(y,null,p,"created"),J(F,y,y.scopeId,N,p),z){for(const _e in z)_e!=="value"&&!wo(_e)&&r(F,_e,null,z[_e],_,p);"value"in z&&r(F,"value",null,z.value,_),(M=z.onVnodeBeforeMount)&&Ht(M,p,y)}Z&&Tn(y,null,p,"beforeMount");const le=Xg(g,K);le&&K.beforeEnter(F),o(F,w,v),((M=z&&z.onVnodeMounted)||le||Z)&&Je(()=>{M&&Ht(M,p,y),le&&K.enter(F),Z&&Tn(y,null,p,"mounted")},g)},J=(y,w,v,p,g)=>{if(v&&h(y,v),p)for(let _=0;_<p.length;_++)h(y,p[_]);if(g){let _=g.subTree;if(w===_||Fu(_.type)&&(_.ssContent===w||_.ssFallback===w)){const N=g.vnode;J(y,N,N.scopeId,N.slotScopeIds,g.parent)}}},G=function(w,v,p,g,_,N,L,F,M){M===void 0&&(M=0);for(let z=M;z<w.length;z++){const V=w[z]=F?Jt(w[z]):Ft(w[z]);b(null,V,v,p,g,_,N,L,F)}},ee=(y,w,v,p,g,_,N)=>{const L=w.el=y.el;let{patchFlag:F,dynamicChildren:M,dirs:z}=w;F|=y.patchFlag&16;const V=y.props||ke,K=w.props||ke;let Z;if(v&&Mn(v,!1),(Z=K.onVnodeBeforeUpdate)&&Ht(Z,v,w,y),z&&Tn(w,y,v,"beforeUpdate"),v&&Mn(v,!0),(V.innerHTML&&K.innerHTML==null||V.textContent&&K.textContent==null)&&c(L,""),M?te(y.dynamicChildren,M,L,v,p,Ps(w,g),_):N||C(y,w,L,null,v,p,Ps(w,g),_,!1),F>0){if(F&16)X(L,V,K,v,g);else if(F&2&&V.class!==K.class&&r(L,"class",null,K.class,g),F&4&&r(L,"style",V.style,K.style,g),F&8){const le=w.dynamicProps;for(let _e=0;_e<le.length;_e++){const Se=le[_e],Fe=V[Se],Ge=K[Se];(Ge!==Fe||Se==="value")&&r(L,Se,Fe,Ge,g,v)}}F&1&&y.children!==w.children&&c(L,w.children)}else!N&&M==null&&X(L,V,K,v,g);((Z=K.onVnodeUpdated)||z)&&Je(()=>{Z&&Ht(Z,v,w,y),z&&Tn(w,y,v,"updated")},p)},te=(y,w,v,p,g,_,N)=>{for(let L=0;L<w.length;L++){const F=y[L],M=w[L],z=F.el&&(F.type===Le||!Lo(F,M)||F.shapeFlag&198)?f(F.el):v;b(F,M,z,null,p,g,_,N,!0)}},X=(y,w,v,p,g)=>{if(w!==v){if(w!==ke)for(const _ in w)!wo(_)&&!(_ in v)&&r(y,_,w[_],null,g,p);for(const _ in v){if(wo(_))continue;const N=v[_],L=w[_];N!==L&&_!=="value"&&r(y,_,L,N,g,p)}"value"in v&&r(y,"value",w.value,v.value,g)}},P=(y,w,v,p,g,_,N,L,F)=>{const M=w.el=y?y.el:l(""),z=w.anchor=y?y.anchor:l("");let{patchFlag:V,dynamicChildren:K,slotScopeIds:Z}=w;Z&&(L=L?L.concat(Z):Z),y==null?(o(M,v,p),o(z,v,p),G(w.children||[],v,z,g,_,N,L,F)):V>0&&V&64&&K&&y.dynamicChildren&&y.dynamicChildren.length===K.length?(te(y.dynamicChildren,K,v,g,_,N,L),(w.key!=null||g&&w===g.subTree)&&Du(y,w)):C(y,w,v,z,g,_,N,L,F)},oe=(y,w,v,p,g,_,N,L,F)=>{w.slotScopeIds=L,y==null?w.shapeFlag&512?g.ctx.activate(w,v,p,N,F):m(w,v,p,g,_,N,F):T(y,w,F)},m=(y,w,v,p,g,_,N)=>{const L=y.component=np(y,p,g);if(iu(y)&&(L.ctx.renderer=ge),op(L,!1,N),L.asyncDep){if(g&&g.registerDep(L,R,N),!y.el){const F=L.subTree=Ce(Zt);E(null,F,w,v),y.placeholder=F.el}}else R(L,y,w,v,g,_,N)},T=(y,w,v)=>{const p=w.component=y.component;if(Lg(y,w,v))if(p.asyncDep&&!p.asyncResolved){I(p,w,v);return}else p.next=w,p.update();else w.el=y.el,p.vnode=w},R=(y,w,v,p,g,_,N)=>{const L=()=>{if(y.isMounted){let{next:V,bu:K,u:Z,parent:le,vnode:_e}=y;{const gt=ku(y);if(gt){V&&(V.el=_e.el,I(y,V,N)),gt.asyncDep.then(()=>{Je(()=>{y.isUnmounted||M()},g)});return}}let Se=V,Fe;Mn(y,!1),V?(V.el=_e.el,I(y,V,N)):V=_e,K&&ns(K),(Fe=V.props&&V.props.onVnodeBeforeUpdate)&&Ht(Fe,le,V,_e),Mn(y,!0);const Ge=Su(y),ht=y.subTree;y.subTree=Ge,b(ht,Ge,f(ht.el),j(ht),y,g,_),V.el=Ge.el,Se===null&&Fg(y,Ge.el),Z&&Je(Z,g),(Fe=V.props&&V.props.onVnodeUpdated)&&Je(()=>Ht(Fe,le,V,_e),g)}else{let V;const{el:K,props:Z}=w,{bm:le,m:_e,parent:Se,root:Fe,type:Ge}=y,ht=Zn(w);Mn(y,!1),le&&ns(le),!ht&&(V=Z&&Z.onVnodeBeforeMount)&&Ht(V,Se,w),Mn(y,!0);{Fe.ce&&Fe.ce._hasShadowRoot()&&Fe.ce._injectChildStyle(Ge,y.parent?y.parent.type:void 0);const gt=y.subTree=Su(y);b(null,gt,v,p,y,g,_),w.el=gt.el}if(_e&&Je(_e,g),!ht&&(V=Z&&Z.onVnodeMounted)){const gt=w;Je(()=>Ht(V,Se,gt),g)}(w.shapeFlag&256||Se&&Zn(Se.vnode)&&Se.vnode.shapeFlag&256)&&y.a&&Je(y.a,g),y.isMounted=!0,w=v=p=null}};y.scope.on();const F=y.effect=new ba(L);y.scope.off();const M=y.update=F.run.bind(F),z=y.job=F.runIfDirty.bind(F);z.i=y,z.id=y.uid,F.scheduler=()=>ms(z),Mn(y,!0),M()},I=(y,w,v)=>{w.component=y;const p=y.vnode.props;y.vnode=w,y.next=null,Wg(y,w.props,p,v),Vg(y,w.children,v),Mt(),Ka(y),It()},C=function(w,v,p,g,_,N,L,F,M){M===void 0&&(M=!1);const z=w&&w.children,V=w?w.shapeFlag:0,K=v.children,{patchFlag:Z,shapeFlag:le}=v;if(Z>0){if(Z&128){H(z,K,p,g,_,N,L,F,M);return}else if(Z&256){k(z,K,p,g,_,N,L,F,M);return}}le&8?(V&16&&Y(z,_,N),K!==z&&c(p,K)):V&16?le&16?H(z,K,p,g,_,N,L,F,M):Y(z,_,N,!0):(V&8&&c(p,""),le&16&&G(K,p,g,_,N,L,F,M))},k=(y,w,v,p,g,_,N,L,F)=>{y=y||Vn,w=w||Vn;const M=y.length,z=w.length,V=Math.min(M,z);let K;for(K=0;K<V;K++){const Z=w[K]=F?Jt(w[K]):Ft(w[K]);b(y[K],Z,v,null,g,_,N,L,F)}M>z?Y(y,g,_,!0,!1,V):G(w,v,p,g,_,N,L,F,V)},H=(y,w,v,p,g,_,N,L,F)=>{let M=0;const z=w.length;let V=y.length-1,K=z-1;for(;M<=V&&M<=K;){const Z=y[M],le=w[M]=F?Jt(w[M]):Ft(w[M]);if(Lo(Z,le))b(Z,le,v,null,g,_,N,L,F);else break;M++}for(;M<=V&&M<=K;){const Z=y[V],le=w[K]=F?Jt(w[K]):Ft(w[K]);if(Lo(Z,le))b(Z,le,v,null,g,_,N,L,F);else break;V--,K--}if(M>V){if(M<=K){const Z=K+1,le=Z<z?w[Z].el:p;for(;M<=K;)b(null,w[M]=F?Jt(w[M]):Ft(w[M]),v,le,g,_,N,L,F),M++}}else if(M>K)for(;M<=V;)W(y[M],g,_,!0),M++;else{const Z=M,le=M,_e=new Map;for(M=le;M<=K;M++){const ut=w[M]=F?Jt(w[M]):Ft(w[M]);ut.key!=null&&_e.set(ut.key,M)}let Se,Fe=0;const Ge=K-le+1;let ht=!1,gt=0;const An=new Array(Ge);for(M=0;M<Ge;M++)An[M]=0;for(M=Z;M<=V;M++){const ut=y[M];if(Fe>=Ge){W(ut,g,_,!0);continue}let Nt;if(ut.key!=null)Nt=_e.get(ut.key);else for(Se=le;Se<=K;Se++)if(An[Se-le]===0&&Lo(ut,w[Se])){Nt=Se;break}Nt===void 0?W(ut,g,_,!0):(An[Nt-le]=M+1,Nt>=gt?gt=Nt:ht=!0,b(ut,w[Nt],v,null,g,_,N,L,F),Fe++)}const ra=ht?qg(An):Vn;for(Se=ra.length-1,M=Ge-1;M>=0;M--){const ut=le+M,Nt=w[ut],sa=w[ut+1],la=ut+1<z?sa.el||Lu(sa):p;An[M]===0?b(null,Nt,v,la,g,_,N,L,F):ht&&(Se<0||M!==ra[Se]?$(Nt,v,la,2):Se--)}}},$=function(w,v,p,g,_){_===void 0&&(_=null);const{el:N,type:L,transition:F,children:M,shapeFlag:z}=w;if(z&6){$(w.component.subTree,v,p,g);return}if(z&128){w.suspense.move(v,p,g);return}if(z&64){L.move(w,v,p,ge);return}if(L===Le){o(N,v,p);for(let K=0;K<M.length;K++)$(M[K],v,p,g);o(w.anchor,v,p);return}if(L===Rs){S(w,v,p);return}if(g!==2&&z&1&&F)if(g===0)F.beforeEnter(N),o(N,v,p),Je(()=>F.enter(N),_);else{const{leave:K,delayLeave:Z,afterLeave:le}=F,_e=()=>{w.ctx.isUnmounted?i(N):o(N,v,p)},Se=()=>{N._isLeaving&&N[hg](!0),K(N,()=>{_e(),le&&le()})};Z?Z(N,_e,Se):Se()}else o(N,v,p)},W=function(w,v,p,g,_){g===void 0&&(g=!1),_===void 0&&(_=!1);const{type:N,props:L,ref:F,children:M,dynamicChildren:z,shapeFlag:V,patchFlag:K,dirs:Z,cacheIndex:le}=w;if(K===-2&&(_=!1),F!=null&&(Mt(),Po(F,null,p,w,!0),It()),le!=null&&(v.renderCache[le]=void 0),V&256){v.ctx.deactivate(w);return}const _e=V&1&&Z,Se=!Zn(w);let Fe;if(Se&&(Fe=L&&L.onVnodeBeforeUnmount)&&Ht(Fe,v,w),V&6)q(w.component,p,g);else{if(V&128){w.suspense.unmount(p,g);return}_e&&Tn(w,null,v,"beforeUnmount"),V&64?w.type.remove(w,v,p,ge,g):z&&!z.hasOnce&&(N!==Le||K>0&&K&64)?Y(z,v,p,!1,!0):(N===Le&&K&384||!_&&V&16)&&Y(M,v,p),g&&ne(w)}(Se&&(Fe=L&&L.onVnodeUnmounted)||_e)&&Je(()=>{Fe&&Ht(Fe,v,w),_e&&Tn(w,null,v,"unmounted")},p)},ne=y=>{const{type:w,el:v,anchor:p,transition:g}=y;if(w===Le){se(v,p);return}if(w===Rs){O(y);return}const _=()=>{i(v),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(y.shapeFlag&1&&g&&!g.persisted){const{leave:N,delayLeave:L}=g,F=()=>N(v,_);L?L(y.el,_,F):F()}else _()},se=(y,w)=>{let v;for(;y!==w;)v=d(y),i(y),y=v;i(w)},q=(y,w,v)=>{const{bum:p,scope:g,job:_,subTree:N,um:L,m:F,a:M}=y;$u(F),$u(M),p&&ns(p),g.stop(),_&&(_.flags|=8,W(N,y,w,v)),L&&Je(L,w),Je(()=>{y.isUnmounted=!0},w)},Y=function(w,v,p,g,_,N){g===void 0&&(g=!1),_===void 0&&(_=!1),N===void 0&&(N=0);for(let L=N;L<w.length;L++)W(w[L],v,p,g,_)},j=y=>{if(y.shapeFlag&6)return j(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const w=d(y.anchor||y.el),v=w&&w[ja];return v?d(v):w};let ce=!1;const ve=(y,w,v)=>{let p;y==null?w._vnode&&(W(w._vnode,null,null,!0),p=w._vnode.component):b(w._vnode||null,y,w,null,null,null,v),w._vnode=y,ce||(ce=!0,Ka(p),Ua(),ce=!1)},ge={p:b,um:W,m:$,r:ne,mt:m,mc:G,pc:C,pbc:te,n:j,o:e};return{render:ve,hydrate:void 0,createApp:Ig(ve)}}function Ps(e,t){let{type:n,props:o}=e;return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&o&&o.encoding&&o.encoding.includes("html")?void 0:t}function Mn(e,t){let{effect:n,job:o}=e;t?(n.flags|=32,o.flags|=4):(n.flags&=-33,o.flags&=-5)}function Xg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Du(e,t,n){const o=e.children,i=t.children;if(me(o)&&me(i))for(let r=0;r<o.length;r++){const s=o[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&(l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=Jt(i[r]),l.el=s.el),l.type===Ki&&(l.patchFlag===-1&&(l=i[r]=Jt(l)),l.el=s.el),l.type===Zt&&!l.el&&(l.el=s.el)}}function qg(e){const t=e.slice(),n=[0];let o,i,r,s,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<u?r=l+1:s=l;u<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function ku(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ku(t)}function $u(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Lu(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Lu(t.subTree):null}const Fu=e=>e.__isSuspense;function jg(e,t){t&&t.pendingBranch?me(e)?t.effects.push(...e):t.effects.push(e):rg(e)}const Le=Symbol.for("v-fgt"),Ki=Symbol.for("v-txt"),Zt=Symbol.for("v-cmt"),Rs=Symbol.for("v-stc"),ko=[];let it=null;function re(e){e===void 0&&(e=!1),ko.push(it=e?null:[])}function Zg(){ko.pop(),it=ko[ko.length-1]||null}let eo=1;function Ui(e,t){t===void 0&&(t=!1),eo+=e,e<0&&it&&t&&(it.hasOnce=!0)}function Hu(e){return e.dynamicChildren=eo>0?it||Vn:null,Zg(),eo>0&&it&&it.push(e),e}function he(e,t,n,o,i,r){return Hu(Q(e,t,n,o,i,r,!0))}function Xe(e,t,n,o,i){return Hu(Ce(e,t,n,o,i,!0))}function $o(e){return e?e.__v_isVNode===!0:!1}function Lo(e,t){return e.type===t.type&&e.key===t.key}const Wu=e=>{let{key:t}=e;return t??null},Yi=e=>{let{ref:t,ref_key:n,ref_for:o}=e;return typeof t=="number"&&(t=""+t),t!=null?He(t)||Be(t)||ye(t)?{i:nt,r:t,k:n,f:!!o}:t:null};function Q(e,t,n,o,i,r,s,l){t===void 0&&(t=null),n===void 0&&(n=null),o===void 0&&(o=0),i===void 0&&(i=null),r===void 0&&(r=e===Le?0:1),s===void 0&&(s=!1),l===void 0&&(l=!1);const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wu(t),ref:t&&Yi(t),scopeId:Xa,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nt};return l?(Ds(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=He(n)?8:16),eo>0&&!s&&it&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&it.push(a),a}const Ce=Jg;function Jg(e,t,n,o,i,r){if(t===void 0&&(t=null),n===void 0&&(n=null),o===void 0&&(o=0),i===void 0&&(i=null),r===void 0&&(r=!1),(!e||e===au)&&(e=Zt),$o(e)){const l=to(e,t,!0);return n&&Ds(l,n),eo>0&&!r&&it&&(l.shapeFlag&6?it[it.indexOf(e)]=l:it.push(l)),l.patchFlag=-2,l}if(ap(e)&&(e=e.__vccOpts),t){t=Qg(t);let{class:l,style:a}=t;l&&!He(l)&&(t.class=We(l)),Te(a)&&(Pi(a)&&!me(a)&&(a=Ue({},a)),t.style=Ye(a))}const s=He(e)?1:Fu(e)?128:cg(e)?64:Te(e)?4:ye(e)?2:0;return Q(e,t,n,o,i,s,r,!0)}function Qg(e){return e?Pi(e)||Cu(e)?Ue({},e):e:null}function to(e,t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?Fo(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Wu(u),ref:t&&t.ref?n&&r?me(r)?r.concat(Yi(t)):[r,Yi(t)]:Yi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&to(e.ssContent),ssFallback:e.ssFallback&&to(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&bs(c,a.clone(c)),c}function Lt(e,t){return e===void 0&&(e=" "),t===void 0&&(t=0),Ce(Ki,null,e,t)}function we(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),t?(re(),Xe(Zt,null,e)):Ce(Zt,null,e)}function Ft(e){return e==null||typeof e=="boolean"?Ce(Zt):me(e)?Ce(Le,null,e.slice()):$o(e)?Jt(e):Ce(Ki,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:to(e)}function Ds(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(me(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Ds(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Cu(t)?t._ctx=nt:i===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ye(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),o&64?(n=16,t=[Lt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Fo(){const e={};for(let t=0;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];for(const o in n)if(o==="class")e.class!==n.class&&(e.class=We([e.class,n.class]));else if(o==="style")e.style=Ye([e.style,n.style]);else if(_i(o)){const i=e[o],r=n[o];r&&i!==r&&!(me(i)&&i.includes(r))&&(e[o]=i?[].concat(i,r):r)}else o!==""&&(e[o]=n[o])}return e}function Ht(e,t,n,o){o===void 0&&(o=null),Rt(e,t,7,[n,o])}const ep=wu();let tp=0;function np(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||ep,r={uid:tp++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new wa(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Tu(o,i),emitsOptions:bu(o,i),emit:null,emitted:null,propsDefaults:ke,inheritAttrs:o.inheritAttrs,ctx:ke,data:ke,props:ke,attrs:ke,slots:ke,refs:ke,setupState:ke,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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Rg.bind(null,r),e.ce&&e.ce(r),r}let Qe=null;const vn=()=>Qe||nt;let Xi,ks;{const e=bo(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};Xi=t("__VUE_INSTANCE_SETTERS__",n=>Qe=n),ks=t("__VUE_SSR_SETTERS__",n=>Wo=n)}const Ho=e=>{const t=Qe;return Xi(e),e.scope.on(),()=>{e.scope.off(),Xi(t)}},Bu=()=>{Qe&&Qe.scope.off(),Xi(null)};function zu(e){return e.vnode.shapeFlag&4}let Wo=!1;function op(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),t&&ks(t);const{props:o,children:i}=e.vnode,r=zu(e);Hg(e,o,r,t),Gg(e,i,n||t);const s=r?ip(e,t):void 0;return t&&ks(!1),s}function ip(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Eg);const{setup:o}=n;if(o){Mt();const i=e.setupContext=o.length>1?Uu(e):null,r=Ho(e),s=Xn(o,e,0,[e.props,i]),l=da(s);if(It(),r(),(l||e.sp)&&!Zn(e)&&tu(e),l){if(s.then(Bu,Bu),t)return s.then(a=>{Gu(e,a,t)}).catch(a=>{ki(a,e,0)});e.asyncDep=s}else Gu(e,s,t)}else Ku(e,t)}function Gu(e,t,n){ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=Wa(t)),Ku(e,n)}let Vu;function Ku(e,t,n){const o=e.type;if(!e.render){if(!t&&Vu&&!o.render){const i=o.template||Cs(e).template;if(i){const{isCustomElement:r,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,u=Ue(Ue({isCustomElement:r,delimiters:l},s),a);o.render=Vu(i,u)}}e.render=o.render||Tt}{const i=Ho(e);Mt();try{Ag(e)}finally{It(),i()}}}const rp={get(e,t){return Ze(e,"get",""),e[t]}};function Uu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,rp),slots:e.slots,emit:e.emit,expose:t}}function $s(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Wa(No(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ro)return Ro[n](e)},has(t,n){return n in t||n in Ro}})):e.proxy}const sp=/(?:^|[-_])\w/g,lp=e=>e.replace(sp,t=>t.toUpperCase()).replace(/[-_]/g,"");function Yu(e,t){return t===void 0&&(t=!0),ye(e)?e.displayName||e.name:e.name||t&&e.__name}function Xu(e,t,n){n===void 0&&(n=!1);let o=Yu(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e){const i=r=>{for(const s in r)if(r[s]===t)return s};o=i(e.components)||e.parent&&i(e.parent.type.components)||i(e.appContext.components)}return o?lp(o):n?"App":"Anonymous"}function ap(e){return ye(e)&&"__vccOpts"in e}const fe=(e,t)=>jh(e,t,Wo);function Me(e,t,n){try{Ui(-1);const o=arguments.length;return o===2?Te(t)&&!me(t)?$o(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&$o(n)&&(n=[n]),Ce(e,t,n))}finally{Ui(1)}}function up(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(yt(n[o],t[o]))return!1;return eo>0&&it&&it.push(e),!0}const cp="3.5.30";/** * @vue/runtime-dom v3.5.30 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Ls;const qu=typeof window<"u"&&window.trustedTypes;if(qu)try{Ls=qu.createPolicy("vue",{createHTML:e=>e})}catch{}const ju=Ls?e=>Ls.createHTML(e):e=>e,fp="http://www.w3.org/2000/svg",dp="http://www.w3.org/1998/Math/MathML",Qt=typeof document<"u"?document:null,Zu=Qt&&Qt.createElement("template"),hp={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?Qt.createElementNS(fp,e):t==="mathml"?Qt.createElementNS(dp,e):n?Qt.createElement(e,{is:n}):Qt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Qt.createTextNode(e),createComment:e=>Qt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{Zu.innerHTML=ju(o==="svg"?"<svg>"+e+"</svg>":o==="mathml"?"<math>"+e+"</math>":e);const l=Zu.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},gp=Symbol("_vtc");function pp(e,t,n){const o=e[gp];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ju=Symbol("_vod"),vp=Symbol("_vsh"),mp=Symbol(""),yp=/(?:^|;)\s*display\s*:/;function _p(e,t,n){const o=e.style,i=He(n);let r=!1;if(n&&!i){if(t)if(He(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&qi(o,l,"")}else for(const s in t)n[s]==null&&qi(o,s,"");for(const s in n)s==="display"&&(r=!0),qi(o,s,n[s])}else if(i){if(t!==n){const s=o[mp];s&&(n+=";"+s),o.cssText=n,r=yp.test(n)}}else t&&e.removeAttribute("style");Ju in e&&(e[Ju]=r?o.display:"",e[vp]&&(o.display="none"))}const Qu=/\s*!important$/;function qi(e,t,n){if(me(n))n.forEach(o=>qi(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=wp(e,t);Qu.test(n)?e.setProperty(cn(o),n.replace(Qu,""),"important"):e[o]=n}}const ec=["Webkit","Moz","ms"],Fs={};function wp(e,t){const n=Fs[t];if(n)return n;let o=et(t);if(o!=="filter"&&o in e)return Fs[t]=o;o=Si(o);for(let i=0;i<ec.length;i++){const r=ec[i]+o;if(r in e)return Fs[t]=r}return t}const tc="http://www.w3.org/1999/xlink";function nc(e,t,n,o,i,r){r===void 0&&(r=wh(t)),o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(tc,t.slice(6,t.length)):e.setAttributeNS(tc,t,n):n==null||r&&!ma(n)?e.removeAttribute(t):e.setAttribute(t,r?"":mt(n)?String(n):n)}function oc(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ju(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=ma(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function bp(e,t,n,o){e.addEventListener(t,n,o)}function Sp(e,t,n,o){e.removeEventListener(t,n,o)}const ic=Symbol("_vei");function Ep(e,t,n,o,i){i===void 0&&(i=null);const r=e[ic]||(e[ic]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=xp(t);if(o){const u=r[t]=Cp(o,i);bp(e,l,u,a)}else s&&(Sp(e,l,s,a),r[t]=void 0)}}const rc=/(?:Once|Passive|Capture)$/;function xp(e){let t;if(rc.test(e)){t={};let o;for(;o=e.match(rc);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):cn(e.slice(2)),t]}let Hs=0;const Ap=Promise.resolve(),Op=()=>Hs||(Ap.then(()=>Hs=0),Hs=Date.now());function Cp(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Rt(Np(o,n.value),t,5,[o])};return n.value=e,n.attached=Op(),n}function Np(e,t){if(me(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const sc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Tp=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?pp(e,o,s):t==="style"?_p(e,n,o):_i(t)?Qr(t)||Ep(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Mp(e,t,o,s))?(oc(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nc(e,t,o,s,r,t!=="value")):e._isVueCE&&(Ip(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!He(o)))?oc(e,et(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),nc(e,t,o,s))};function Mp(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&sc(t)&&ye(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return sc(t)&&He(n)?!1:t in e}function Ip(e,t){const n=e._def.props;if(!n)return!1;const o=et(t);return Array.isArray(n)?n.some(i=>et(i)===o):Object.keys(n).some(i=>et(i)===o)}const Pp=["ctrl","shift","alt","meta"],Rp={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Pp.some(n=>e[n+"Key"]&&!t.includes(n))},ze=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=function(i){for(let a=0;a<t.length;a++){const u=Rp[t[a]];if(u&&u(i,t))return}for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;l<r;l++)s[l-1]=arguments[l];return e(i,...s)})},Dp={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ie=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=cn(i.key);if(t.some(s=>s===r||Dp[s]===r))return e(i)})},kp=Ue({patchProp:Tp},hp);let lc;function $p(){return lc||(lc=Ug(kp))}const Lp=function(){const t=$p().createApp(...arguments),{mount:n}=t;return t.mount=o=>{const i=Hp(o);if(!i)return;const r=t._component;!ye(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Fp(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Fp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hp(e){return He(e)?document.querySelector(e):e}function Wp(){return ac().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ac(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Bp=typeof Proxy=="function",zp="devtools-plugin:setup",Gp="plugin:settings:set";let no,Ws;function Vp(){var e;return no!==void 0||(typeof window<"u"&&window.performance?(no=!0,Ws=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(no=!0,Ws=globalThis.perf_hooks.performance):no=!1),no}function Kp(){return Vp()?Ws.now():Date.now()}class Up{constructor(t,n){var o=this;this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const i={};if(t.settings)for(const l in t.settings){const a=t.settings[l];i[l]=a.defaultValue}const r="__vue-devtools-plugin-settings__"+t.id;let s=Object.assign({},i);try{const l=localStorage.getItem(r),a=JSON.parse(l);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(l){try{localStorage.setItem(r,JSON.stringify(l))}catch{}s=l},now(){return Kp()}},n&&n.on(Gp,(l,a)=>{l===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(l,a)=>this.target?this.target.on[a]:function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];o.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(l,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];return o.targetQueue.push({method:a,args:c,resolve:()=>{}}),o.fallbacks[a](...c)}:function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];return new Promise(d=>{o.targetQueue.push({method:a,args:c,resolve:d})})}})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Yp(e,t){const n=e,o=ac(),i=Wp(),r=Bp&&n.enableEarlyProxy;if(i&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))i.emit(zp,e,t);else{const s=r?new Up(n,i):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*! * vuex v4.1.0 * (c) 2022 Evan You * @license MIT */var uc="store";function cc(e){return e===void 0&&(e=null),pt(e!==null?e:uc)}function oo(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function Xp(e){return e!==null&&typeof e=="object"}function qp(e){return e&&typeof e.then=="function"}function jp(e,t){return function(){return e(t)}}function fc(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var o=t.indexOf(e);o>-1&&t.splice(o,1)}}function dc(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;ji(e,n,[],e._modules.root,!0),Bs(e,n,t)}function Bs(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,s={},l={},a=rs(!0);a.run(function(){oo(r,function(u,c){s[c]=jp(u,e),l[c]=fe(function(){return s[c]()}),Object.defineProperty(e.getters,c,{get:function(){return l[c].value},enumerable:!0})})}),e._state=Co({data:t}),e._scope=a,e.strict&&tv(e),o&&n&&e._withCommit(function(){o.data=null}),i&&i.stop()}function ji(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var l=zs(t,n.slice(0,-1)),a=n[n.length-1];e._withCommit(function(){l[a]=o.state})}var u=o.context=Zp(e,s,n);o.forEachMutation(function(c,f){var d=s+f;Jp(e,d,c,u)}),o.forEachAction(function(c,f){var d=c.root?f:s+f,h=c.handler||c;Qp(e,d,h,u)}),o.forEachGetter(function(c,f){var d=s+f;ev(e,d,c,u)}),o.forEachChild(function(c,f){ji(e,t,n.concat(f),c,i)})}function Zp(e,t,n){var o=t==="",i={dispatch:o?e.dispatch:function(r,s,l){var a=Zi(r,s,l),u=a.payload,c=a.options,f=a.type;return(!c||!c.root)&&(f=t+f),e.dispatch(f,u)},commit:o?e.commit:function(r,s,l){var a=Zi(r,s,l),u=a.payload,c=a.options,f=a.type;(!c||!c.root)&&(f=t+f),e.commit(f,u,c)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return hc(e,t)}},state:{get:function(){return zs(e.state,n)}}}),i}function hc(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach(function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Jp(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(s){n.call(e,o.state,s)})}function Qp(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push(function(s){var l=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},s);return qp(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):l})}function ev(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(r){return n(o.state,o.getters,r.state,r.getters)})}function tv(e){xe(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function zs(e,t){return t.reduce(function(n,o){return n[o]},e)}function Zi(e,t,n){return Xp(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var nv="vuex bindings",gc="vuex:mutations",Gs="vuex:actions",io="vuex",ov=0;function iv(e,t){Yp({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[nv]},function(n){n.addTimelineLayer({id:gc,label:"Vuex Mutations",color:pc}),n.addTimelineLayer({id:Gs,label:"Vuex Actions",color:pc}),n.addInspector({id:io,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(o){if(o.app===e&&o.inspectorId===io)if(o.filter){var i=[];_c(i,t._modules.root,o.filter,""),o.rootNodes=i}else o.rootNodes=[yc(t._modules.root,"")]}),n.on.getInspectorState(function(o){if(o.app===e&&o.inspectorId===io){var i=o.nodeId;hc(t,i),o.state=lv(uv(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(o){if(o.app===e&&o.inspectorId===io){var i=o.nodeId,r=o.path;i!=="root"&&(r=i.split("/").filter(Boolean).concat(r)),t._withCommit(function(){o.set(t._state.data,r,o.state.value)})}}),t.subscribe(function(o,i){var r={};o.payload&&(r.payload=o.payload),r.state=i,n.notifyComponentUpdate(),n.sendInspectorTree(io),n.sendInspectorState(io),n.addTimelineEvent({layerId:gc,event:{time:Date.now(),title:o.type,data:r}})}),t.subscribeAction({before:function(i,r){var s={};i.payload&&(s.payload=i.payload),i._id=ov++,i._time=Date.now(),s.state=r,n.addTimelineEvent({layerId:Gs,event:{time:i._time,title:i.type,groupId:i._id,subtitle:"start",data:s}})},after:function(i,r){var s={},l=Date.now()-i._time;s.duration={_custom:{type:"duration",display:l+"ms",tooltip:"Action duration",value:l}},i.payload&&(s.payload=i.payload),s.state=r,n.addTimelineEvent({layerId:Gs,event:{time:Date.now(),title:i.type,groupId:i._id,subtitle:"end",data:s}})}})})}var pc=8702998,rv=6710886,sv=16777215,vc={label:"namespaced",textColor:sv,backgroundColor:rv};function mc(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function yc(e,t){return{id:t||"root",label:mc(t),tags:e.namespaced?[vc]:[],children:Object.keys(e._children).map(function(n){return yc(e._children[n],t+n+"/")})}}function _c(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[vc]:[]}),Object.keys(t._children).forEach(function(i){_c(e,t._children[i],n,o+i+"/")})}function lv(e,t,n){t=n==="root"?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map(function(s){return{key:s,editable:!0,value:e.state[s]}})};if(o.length){var r=av(t);i.getters=Object.keys(r).map(function(s){return{key:s.endsWith("/")?mc(s):s,editable:!1,value:Vs(function(){return r[s]})}})}return i}function av(e){var t={};return Object.keys(e).forEach(function(n){var o=n.split("/");if(o.length>1){var i=t,r=o.pop();o.forEach(function(s){i[s]||(i[s]={_custom:{value:{},display:s,tooltip:"Module",abstract:!0}}),i=i[s]._custom.value}),i[r]=Vs(function(){return e[n]})}else t[n]=Vs(function(){return e[n]})}),t}function uv(e,t){var n=t.split("/").filter(function(o){return o});return n.reduce(function(o,i,r){var s=o[i];if(!s)throw new Error('Missing module "'+i+'" for path "'+t+'".');return r===n.length-1?s:s._children},t==="root"?e:e.root._children)}function Vs(e){try{return e()}catch(t){return t}}var St=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var o=t.state;this.state=(typeof o=="function"?o():o)||{}},wc={namespaced:{configurable:!0}};wc.namespaced.get=function(){return!!this._rawModule.namespaced},St.prototype.addChild=function(t,n){this._children[t]=n},St.prototype.removeChild=function(t){delete this._children[t]},St.prototype.getChild=function(t){return this._children[t]},St.prototype.hasChild=function(t){return t in this._children},St.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},St.prototype.forEachChild=function(t){oo(this._children,t)},St.prototype.forEachGetter=function(t){this._rawModule.getters&&oo(this._rawModule.getters,t)},St.prototype.forEachAction=function(t){this._rawModule.actions&&oo(this._rawModule.actions,t)},St.prototype.forEachMutation=function(t){this._rawModule.mutations&&oo(this._rawModule.mutations,t)},Object.defineProperties(St.prototype,wc);var In=function(t){this.register([],t,!1)};In.prototype.get=function(t){return t.reduce(function(n,o){return n.getChild(o)},this.root)},In.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(o,i){return n=n.getChild(i),o+(n.namespaced?i+"/":"")},"")},In.prototype.update=function(t){bc([],this.root,t)},In.prototype.register=function(t,n,o){var i=this;o===void 0&&(o=!0);var r=new St(n,o);if(t.length===0)this.root=r;else{var s=this.get(t.slice(0,-1));s.addChild(t[t.length-1],r)}n.modules&&oo(n.modules,function(l,a){i.register(t.concat(a),l,o)})},In.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),o=t[t.length-1],i=n.getChild(o);i&&i.runtime&&n.removeChild(o)},In.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),o=t[t.length-1];return n?n.hasChild(o):!1};function bc(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;bc(e.concat(o),t.getChild(o),n.modules[o])}}function cv(e){return new rt(e)}var rt=function(t){var n=this;t===void 0&&(t={});var o=t.plugins;o===void 0&&(o=[]);var i=t.strict;i===void 0&&(i=!1);var r=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new In(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=r;var s=this,l=this,a=l.dispatch,u=l.commit;this.dispatch=function(d,h){return a.call(s,d,h)},this.commit=function(d,h,x){return u.call(s,d,h,x)},this.strict=i;var c=this._modules.root.state;ji(this,c,[],this._modules.root),Bs(this,c),o.forEach(function(f){return f(n)})},Ks={state:{configurable:!0}};rt.prototype.install=function(t,n){t.provide(n||uc,this),t.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:!1;o&&iv(t,this)},Ks.state.get=function(){return this._state.data},Ks.state.set=function(e){},rt.prototype.commit=function(t,n,o){var i=this,r=Zi(t,n,o),s=r.type,l=r.payload,a={type:s,payload:l},u=this._mutations[s];u&&(this._withCommit(function(){u.forEach(function(f){f(l)})}),this._subscribers.slice().forEach(function(c){return c(a,i.state)}))},rt.prototype.dispatch=function(t,n){var o=this,i=Zi(t,n),r=i.type,s=i.payload,l={type:r,payload:s},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter(function(c){return c.before}).forEach(function(c){return c.before(l,o.state)})}catch{}var u=a.length>1?Promise.all(a.map(function(c){return c(s)})):a[0](s);return new Promise(function(c,f){u.then(function(d){try{o._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(l,o.state)})}catch{}c(d)},function(d){try{o._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(l,o.state,d)})}catch{}f(d)})})}},rt.prototype.subscribe=function(t,n){return fc(t,this._subscribers,n)},rt.prototype.subscribeAction=function(t,n){var o=typeof t=="function"?{before:t}:t;return fc(o,this._actionSubscribers,n)},rt.prototype.watch=function(t,n,o){var i=this;return xe(function(){return t(i.state,i.getters)},n,Object.assign({},o))},rt.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})},rt.prototype.registerModule=function(t,n,o){o===void 0&&(o={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),ji(this,this.state,t,this._modules.get(t),o.preserveState),Bs(this,this.state)},rt.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var o=zs(n.state,t.slice(0,-1));delete o[t[t.length-1]]}),dc(this)},rt.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)},rt.prototype.hotUpdate=function(t){this._modules.update(t),dc(this,!0)},rt.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n},Object.defineProperties(rt.prototype,Ks);var Us={name:"WorkflowTitlebar",props:{saveStatus:{type:String,default:"upToDate"}},computed:{workflow(){return this.$store.getters.workflow||{title:"COM_WORKFLOW_GRAPH_LOADING",published:!1}},stagesCount(){return this.$store.getters.stages?.length||0},transitionsCount(){return this.$store.getters.transitions?.length||0}}};const fv={class:"d-flex flex-wrap align-items-center justify-content-between","aria-labelledby":"workflow-main-title"},dv={class:"col-md-6 d-flex flex-column"},hv={id:"workflow-main-title",class:"mb-2"},gv={class:"d-flex align-items-center flex-wrap mb-0","aria-label":"Workflow Details"},pv={class:"visually-hidden"},vv={class:"me-3 mb-1 d-flex mb-0"},mv=["aria-label"],yv={class:"visually-hidden"},_v={class:"me-3 mb-1 d-flex mb-0"},wv={class:"visually-hidden"},bv={class:"me-3 mb-1 d-flex mb-0"},Sv=["aria-label"];function Ev(e,t,n,o,i,r){return re(),he("section",fv,[Q("div",dv,[Q("h1",hv,pe(e.translate(r.workflow?.title)),1),Q("dl",gv,[Q("dt",pv,pe(e.translate("COM_WORKFLOW_GRAPH_STATUS")),1),Q("dd",vv,[Q("span",{class:We(["badge",r.workflow.published?"bg-success":"bg-warning"]),role:"status","aria-label":`${r.workflow.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")}`},pe(r.workflow.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")),11,mv)]),Q("dt",yv,pe(e.translate("COM_WORKFLOW_GRAPH_STAGE_COUNT")),1),Q("dd",_v,[Q("span",null,pe(r.stagesCount)+" "+pe(r.stagesCount===1?e.translate("COM_WORKFLOW_GRAPH_STAGE"):e.translate("COM_WORKFLOW_GRAPH_STAGES")),1)]),Q("dt",wv,pe(e.translate("COM_WORKFLOW_GRAPH_TRANSITION_COUNT")),1),Q("dd",bv,[Q("span",null,pe(r.transitionsCount)+" "+pe(r.transitionsCount===1?e.translate("COM_WORKFLOW_GRAPH_TRANSITION"):e.translate("COM_WORKFLOW_GRAPH_TRANSITIONS")),1)])])]),Q("div",{id:"save-status",class:We(["mb-2 fw-bold",{"text-warning":n.saveStatus?.value==="unsaved"}]),role:"status","aria-live":"polite","aria-label":e.translate(n.saveStatus?.value==="unsaved"?"COM_WORKFLOW_GRAPH_UNSAVED_CHANGES":"COM_WORKFLOW_GRAPH_UP_TO_DATE")},pe(n.saveStatus.value==="unsaved"?e.translate("COM_WORKFLOW_GRAPH_UNSAVED_CHANGES"):e.translate("COM_WORKFLOW_GRAPH_UP_TO_DATE")),11,Sv)])}Us.render=Ev,Us.__file="administrator/components/com_workflow/resources/scripts/components/Titlebar.vue";function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ie.apply(null,arguments)}function Bo(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}const xv=["eventFilter"],Av=["eventFilter"],Ov=["id"],Cv=["computedPosition","handleBounds","selected","dimensions","isParent","resizing","dragging","events"],Nv=["selected","sourceNode","targetNode","events"];function zo(e){return ss()?(Ei(e),!0):!1}function en(e){return typeof e=="function"?e():ue(e)}const Tv=typeof window<"u"&&typeof document<"u",Mv=e=>typeof e<"u",Iv=Object.prototype.toString,Pv=e=>Iv.call(e)==="[object Object]",Rv=()=>{};function Dv(e,t){function n(){for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return new Promise((s,l)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(s).catch(l)})}return n}const Sc=e=>e();function kv(e){e===void 0&&(e=Sc);const t=Oe(!0);function n(){t.value=!1}function o(){t.value=!0}return{isActive:Mi(t),pause:n,resume:o,eventFilter:function(){t.value&&e(...arguments)}}}function Ec(e,t,n){return t===void 0&&(t=!1),n===void 0&&(n="Timeout"),new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function $v(e,t,n){n===void 0&&(n={});const{eventFilter:o=Sc}=n,i=Bo(n,xv);return xe(e,Dv(o,t),i)}function ro(e,t,n){n===void 0&&(n={});const{eventFilter:o}=n,i=Bo(n,Av),{eventFilter:r,pause:s,resume:l,isActive:a}=kv(o);return{stop:$v(e,t,ie({},i,{eventFilter:r})),pause:s,resume:l,isActive:a}}function Lv(e,t){if(t===void 0&&(t={}),!Be(e))return Uh(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Kh(()=>({get(){return e.value[o]},set(i){var r;if((r=en(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=i,e.value=l}else{const l=ie({},e.value,{[o]:i});Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=i}}));return n}function Ys(e,t){t===void 0&&(t=!1);function n(f,d){let{flush:h="sync",deep:x=!1,timeout:b,throwOnTimeout:A}=d===void 0?{}:d,E=null;const S=[new Promise(O=>{E=xe(e,B=>{f(B)!==t&&(E?.(),O(B))},{flush:h,deep:x,immediate:!0})})];return b!=null&&S.push(Ec(b,A).then(()=>en(e)).finally(()=>E?.())),Promise.race(S)}function o(f,d){if(!Be(f))return n(O=>O===f,d);const{flush:h="sync",deep:x=!1,timeout:b,throwOnTimeout:A}=d??{};let E=null;const S=[new Promise(O=>{E=xe([e,f],B=>{let[U,J]=B;t!==(U===J)&&(E?.(),O(U))},{flush:h,deep:x,immediate:!0})})];return b!=null&&S.push(Ec(b,A).then(()=>en(e)).finally(()=>(E?.(),en(e)))),Promise.race(S)}function i(f){return n(d=>!!d,f)}function r(f){return o(null,f)}function s(f){return o(void 0,f)}function l(f){return n(Number.isNaN,f)}function a(f,d){return n(h=>{const x=Array.from(h);return x.includes(f)||x.includes(en(f))},d)}function u(f){return c(1,f)}function c(f,d){f===void 0&&(f=1);let h=-1;return n(()=>(h+=1,h>=f),d)}return Array.isArray(en(e))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return Ys(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:l,toBeUndefined:s,changed:u,changedTimes:c,get not(){return Ys(e,!t)}}}function Xs(e){return Ys(e)}function Fv(e){var t;const n=en(e);return(t=n?.$el)!=null?t:n}const xc=Tv?window:void 0;function Ac(){let e,t,n,o;for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];if(typeof r[0]=="string"||Array.isArray(r[0])?([t,n,o]=r,e=xc):[e,t,n,o]=r,!e)return Rv;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const l=[],a=()=>{l.forEach(d=>d()),l.length=0},u=(d,h,x,b)=>(d.addEventListener(h,x,b),()=>d.removeEventListener(h,x,b)),c=xe(()=>[Fv(e),en(o)],d=>{let[h,x]=d;if(a(),!h)return;const b=Pv(x)?ie({},x):x;l.push(...t.flatMap(A=>n.map(E=>u(h,A,E,b))))},{immediate:!0,flush:"post"}),f=()=>{c(),a()};return zo(f),f}function Hv(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Oc(){let e,t,n={};arguments.length===3?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):arguments.length===2?typeof(arguments.length<=1?void 0:arguments[1])=="object"?(e=!0,t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1]):(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1]):(e=!0,t=arguments.length<=0?void 0:arguments[0]);const{target:o=xc,eventName:i="keydown",passive:r=!1,dedupe:s=!1}=n,l=Hv(e);return Ac(o,i,u=>{u.repeat&&en(s)||l(u)&&t(u)},r)}function Wv(e){return JSON.parse(JSON.stringify(e))}function qs(e,t,n,o){o===void 0&&(o={});var i,r,s;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:f,shouldEmit:d}=o,h=vn(),x=n||h?.emit||((i=h?.$emit)==null?void 0:i.bind(h))||((s=(r=h?.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(h?.proxy));let b=u;t||(t="modelValue"),b=b||"update:"+t.toString();const A=S=>l?typeof l=="function"?l(S):Wv(S):S,E=()=>Mv(e[t])?A(e[t]):f,D=S=>{d?d(S)&&x(b,S):x(b,S)};if(a){const S=E(),O=Oe(S);let B=!1;return xe(()=>e[t],U=>{B||(B=!0,O.value=A(U),kt(()=>B=!1))}),xe(O,U=>{!B&&(U!==e[t]||c)&&D(U)},{deep:c}),O}else return fe({get(){return E()},set(S){D(S)}})}var Bv={value:()=>{}};function Ji(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Qi(n)}function Qi(e){this._=e}function zv(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Qi.prototype=Ji.prototype={constructor:Qi,on:function(t,n){var o=this._,i=zv(t+"",o),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=Gv(o[r],t.name)))return r;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<l;)if(r=(t=i[s]).type)o[r]=Cc(o[r],t.name,n);else if(n==null)for(r in o)o[r]=Cc(o[r],t.name,null);return this},copy:function(){var t={},n=this._;for(var o in n)t[o]=n[o].slice();return new Qi(t)},call:function(t,n){if((r=arguments.length-2)>0)for(var o=new Array(r),i=0,r,s;i<r;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(n,o)},apply:function(t,n,o){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(n,o)}};function Gv(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Cc(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Bv,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var js="http://www.w3.org/1999/xhtml";const Nc={svg:"http://www.w3.org/2000/svg",xhtml:js,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function er(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Nc.hasOwnProperty(t)?{space:Nc[t],local:e}:e}function Vv(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===js&&t.documentElement.namespaceURI===js?t.createElement(e):t.createElementNS(n,e)}}function Kv(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Tc(e){var t=er(e);return(t.local?Kv:Vv)(t)}function Uv(){}function Zs(e){return e==null?Uv:function(){return this.querySelector(e)}}function Yv(e){typeof e!="function"&&(e=Zs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=new Array(s),a,u,c=0;c<s;++c)(a=r[c])&&(u=e.call(a,a.__data__,c,r))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new ft(o,this._parents)}function Xv(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function qv(){return[]}function Mc(e){return e==null?qv:function(){return this.querySelectorAll(e)}}function jv(e){return function(){return Xv(e.apply(this,arguments))}}function Zv(e){typeof e=="function"?e=jv(e):e=Mc(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(o.push(e.call(a,a.__data__,u,s)),i.push(a));return new ft(o,i)}function Ic(e){return function(){return this.matches(e)}}function Pc(e){return function(t){return t.matches(e)}}var Jv=Array.prototype.find;function Qv(e){return function(){return Jv.call(this.children,e)}}function em(){return this.firstElementChild}function tm(e){return this.select(e==null?em:Qv(typeof e=="function"?e:Pc(e)))}var nm=Array.prototype.filter;function om(){return Array.from(this.children)}function im(e){return function(){return nm.call(this.children,e)}}function rm(e){return this.selectAll(e==null?om:im(typeof e=="function"?e:Pc(e)))}function sm(e){typeof e!="function"&&(e=Ic(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new ft(o,this._parents)}function Rc(e){return new Array(e.length)}function lm(){return new ft(this._enter||this._groups.map(Rc),this._parents)}function tr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}tr.prototype={constructor:tr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function am(e){return function(){return e}}function um(e,t,n,o,i,r){for(var s=0,l,a=t.length,u=r.length;s<u;++s)(l=t[s])?(l.__data__=r[s],o[s]=l):n[s]=new tr(e,r[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function cm(e,t,n,o,i,r,s){var l,a,u=new Map,c=t.length,f=r.length,d=new Array(c),h;for(l=0;l<c;++l)(a=t[l])&&(d[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?i[l]=a:u.set(h,a));for(l=0;l<f;++l)h=s.call(e,r[l],l,r)+"",(a=u.get(h))?(o[l]=a,a.__data__=r[l],u.delete(h)):n[l]=new tr(e,r[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(d[l])===a&&(i[l]=a)}function fm(e){return e.__data__}function dm(e,t){if(!arguments.length)return Array.from(this,fm);var n=t?cm:um,o=this._parents,i=this._groups;typeof e!="function"&&(e=am(e));for(var r=i.length,s=new Array(r),l=new Array(r),a=new Array(r),u=0;u<r;++u){var c=o[u],f=i[u],d=f.length,h=hm(e.call(c,c&&c.__data__,u,o)),x=h.length,b=l[u]=new Array(x),A=s[u]=new Array(x),E=a[u]=new Array(d);n(c,f,b,A,E,h,t);for(var D=0,S=0,O,B;D<x;++D)if(O=b[D]){for(D>=S&&(S=D+1);!(B=A[S])&&++S<x;);O._next=B||null}}return s=new ft(s,o),s._enter=l,s._exit=a,s}function hm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gm(){return new ft(this._exit||this._groups.map(Rc),this._parents)}function pm(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function vm(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),l=new Array(i),a=0;a<s;++a)for(var u=n[a],c=o[a],f=u.length,d=l[a]=new Array(f),h,x=0;x<f;++x)(h=u[x]||c[x])&&(d[x]=h);for(;a<i;++a)l[a]=n[a];return new ft(l,this._parents)}function mm(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function ym(e){e||(e=_m);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],l=s.length,a=i[r]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new ft(i,this._parents).order()}function _m(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function bm(){return Array.from(this)}function Sm(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var s=o[i];if(s)return s}return null}function Em(){let e=0;for(const t of this)++e;return e}function xm(){return!this.node()}function Am(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,l;r<s;++r)(l=i[r])&&e.call(l,l.__data__,r,i);return this}function Om(e){return function(){this.removeAttribute(e)}}function Cm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nm(e,t){return function(){this.setAttribute(e,t)}}function Tm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Mm(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Im(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Pm(e,t){var n=er(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Cm:Om:typeof t=="function"?n.local?Im:Mm:n.local?Tm:Nm)(n,t))}function Dc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Rm(e){return function(){this.style.removeProperty(e)}}function Dm(e,t,n){return function(){this.style.setProperty(e,t,n)}}function km(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function $m(e,t,n){return arguments.length>1?this.each((t==null?Rm:typeof t=="function"?km:Dm)(e,t,n??"")):so(this.node(),e)}function so(e,t){return e.style.getPropertyValue(t)||Dc(e).getComputedStyle(e,null).getPropertyValue(t)}function Lm(e){return function(){delete this[e]}}function Fm(e,t){return function(){this[e]=t}}function Hm(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Wm(e,t){return arguments.length>1?this.each((t==null?Lm:typeof t=="function"?Hm:Fm)(e,t)):this.node()[e]}function kc(e){return e.trim().split(/^|\s+/)}function Js(e){return e.classList||new $c(e)}function $c(e){this._node=e,this._names=kc(e.getAttribute("class")||"")}$c.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Lc(e,t){for(var n=Js(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Fc(e,t){for(var n=Js(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Bm(e){return function(){Lc(this,e)}}function zm(e){return function(){Fc(this,e)}}function Gm(e,t){return function(){(t.apply(this,arguments)?Lc:Fc)(this,e)}}function Vm(e,t){var n=kc(e+"");if(arguments.length<2){for(var o=Js(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Gm:t?Bm:zm)(n,t))}function Km(){this.textContent=""}function Um(e){return function(){this.textContent=e}}function Ym(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Xm(e){return arguments.length?this.each(e==null?Km:(typeof e=="function"?Ym:Um)(e)):this.node().textContent}function qm(){this.innerHTML=""}function jm(e){return function(){this.innerHTML=e}}function Zm(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Jm(e){return arguments.length?this.each(e==null?qm:(typeof e=="function"?Zm:jm)(e)):this.node().innerHTML}function Qm(){this.nextSibling&&this.parentNode.appendChild(this)}function ey(){return this.each(Qm)}function ty(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ny(){return this.each(ty)}function oy(e){var t=typeof e=="function"?e:Tc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function iy(){return null}function ry(e,t){var n=typeof e=="function"?e:Tc(e),o=t==null?iy:typeof t=="function"?t:Zs(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function sy(){var e=this.parentNode;e&&e.removeChild(this)}function ly(){return this.each(sy)}function ay(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function uy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cy(e){return this.select(e?uy:ay)}function fy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function dy(e){return function(t){e.call(this,t,this.__data__)}}function hy(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function gy(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function py(e,t,n){return function(){var o=this.__on,i,r=dy(t);if(o){for(var s=0,l=o.length;s<l;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function vy(e,t,n){var o=hy(e+""),i,r=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(i=0,c=l[a];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?py:gy,i=0;i<r;++i)this.each(l(o[i],t,n));return this}function Hc(e,t,n){var o=Dc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function my(e,t){return function(){return Hc(this,e,t)}}function yy(e,t){return function(){return Hc(this,e,t.apply(this,arguments))}}function _y(e,t){return this.each((typeof t=="function"?yy:my)(e,t))}function*wy(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var Wc=[null];function ft(e,t){this._groups=e,this._parents=t}function Go(){return new ft([[document.documentElement]],Wc)}function by(){return this}ft.prototype=Go.prototype={constructor:ft,select:Yv,selectAll:Zv,selectChild:tm,selectChildren:rm,filter:sm,data:dm,enter:lm,exit:gm,join:pm,merge:vm,selection:by,order:mm,sort:ym,call:wm,nodes:bm,node:Sm,size:Em,empty:xm,each:Am,attr:Pm,style:$m,property:Wm,classed:Vm,text:Xm,html:Jm,raise:ey,lower:ny,append:oy,insert:ry,remove:ly,clone:cy,datum:fy,on:vy,dispatch:_y,[Symbol.iterator]:wy};function Et(e){return typeof e=="string"?new ft([[document.querySelector(e)]],[document.documentElement]):new ft([[e]],Wc)}function Sy(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Wt(e,t){if(e=Sy(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Ey={passive:!1},Vo={capture:!0,passive:!1};function Qs(e){e.stopImmediatePropagation()}function lo(e){e.preventDefault(),e.stopImmediatePropagation()}function Bc(e){var t=e.document.documentElement,n=Et(e).on("dragstart.drag",lo,Vo);"onselectstart"in t?n.on("selectstart.drag",lo,Vo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function zc(e,t){var n=e.document.documentElement,o=Et(e).on("dragstart.drag",null);t&&(o.on("click.drag",lo,Vo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const nr=e=>()=>e;function el(e,t){let{sourceEvent:n,subject:o,target:i,identifier:r,active:s,x:l,y:a,dx:u,dy:c,dispatch:f}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:f}})}el.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function xy(e){return!e.ctrlKey&&!e.button}function Ay(){return this.parentNode}function Oy(e,t){return t??{x:e.x,y:e.y}}function Cy(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ny(){var e=xy,t=Ay,n=Oy,o=Cy,i={},r=Ji("start","drag","end"),s=0,l,a,u,c,f=0;function d(O){O.on("mousedown.drag",h).filter(o).on("touchstart.drag",A).on("touchmove.drag",E,Ey).on("touchend.drag touchcancel.drag",D).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(O,B){if(!(c||!e.call(this,O,B))){var U=S(this,t.call(this,O,B),O,B,"mouse");U&&(Et(O.view).on("mousemove.drag",x,Vo).on("mouseup.drag",b,Vo),Bc(O.view),Qs(O),u=!1,l=O.clientX,a=O.clientY,U("start",O))}}function x(O){if(lo(O),!u){var B=O.clientX-l,U=O.clientY-a;u=B*B+U*U>f}i.mouse("drag",O)}function b(O){Et(O.view).on("mousemove.drag mouseup.drag",null),zc(O.view,u),lo(O),i.mouse("end",O)}function A(O,B){if(e.call(this,O,B)){var U=O.changedTouches,J=t.call(this,O,B),G=U.length,ee,te;for(ee=0;ee<G;++ee)(te=S(this,J,O,B,U[ee].identifier,U[ee]))&&(Qs(O),te("start",O,U[ee]))}}function E(O){var B=O.changedTouches,U=B.length,J,G;for(J=0;J<U;++J)(G=i[B[J].identifier])&&(lo(O),G("drag",O,B[J]))}function D(O){var B=O.changedTouches,U=B.length,J,G;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),J=0;J<U;++J)(G=i[B[J].identifier])&&(Qs(O),G("end",O,B[J]))}function S(O,B,U,J,G,ee){var te=r.copy(),X=Wt(ee||U,B),P,oe,m;if((m=n.call(O,new el("beforestart",{sourceEvent:U,target:d,identifier:G,active:s,x:X[0],y:X[1],dx:0,dy:0,dispatch:te}),J))!=null)return P=m.x-X[0]||0,oe=m.y-X[1]||0,function T(R,I,C){var k=X,H;switch(R){case"start":i[G]=T,H=s++;break;case"end":delete i[G],--s;case"drag":X=Wt(C||I,B),H=s;break}te.call(R,O,new el(R,{sourceEvent:I,subject:m,target:d,identifier:G,active:H,x:X[0]+P,y:X[1]+oe,dx:X[0]-k[0],dy:X[1]-k[1],dispatch:te}),J)}}return d.filter=function(O){return arguments.length?(e=typeof O=="function"?O:nr(!!O),d):e},d.container=function(O){return arguments.length?(t=typeof O=="function"?O:nr(O),d):t},d.subject=function(O){return arguments.length?(n=typeof O=="function"?O:nr(O),d):n},d.touchable=function(O){return arguments.length?(o=typeof O=="function"?O:nr(!!O),d):o},d.on=function(){var O=r.on.apply(r,arguments);return O===r?d:O},d.clickDistance=function(O){return arguments.length?(f=(O=+O)*O,d):Math.sqrt(f)},d}function tl(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Gc(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ko(){}var Uo=.7,or=1/Uo,ao="\\s*([+-]?\\d+)\\s*",Yo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ty=/^#([0-9a-f]{3,8})$/,My=new RegExp("^rgb\\("+ao+","+ao+","+ao+"\\)$"),Iy=new RegExp("^rgb\\("+Bt+","+Bt+","+Bt+"\\)$"),Py=new RegExp("^rgba\\("+ao+","+ao+","+ao+","+Yo+"\\)$"),Ry=new RegExp("^rgba\\("+Bt+","+Bt+","+Bt+","+Yo+"\\)$"),Dy=new RegExp("^hsl\\("+Yo+","+Bt+","+Bt+"\\)$"),ky=new RegExp("^hsla\\("+Yo+","+Bt+","+Bt+","+Yo+"\\)$"),Vc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};tl(Ko,Pn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Kc,formatHex:Kc,formatHex8:$y,formatHsl:Ly,formatRgb:Uc,toString:Uc});function Kc(){return this.rgb().formatHex()}function $y(){return this.rgb().formatHex8()}function Ly(){return Zc(this).formatHsl()}function Uc(){return this.rgb().formatRgb()}function Pn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ty.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Yc(t):n===3?new st(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ir(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ir(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=My.exec(e))?new st(t[1],t[2],t[3],1):(t=Iy.exec(e))?new st(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Py.exec(e))?ir(t[1],t[2],t[3],t[4]):(t=Ry.exec(e))?ir(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dy.exec(e))?jc(t[1],t[2]/100,t[3]/100,1):(t=ky.exec(e))?jc(t[1],t[2]/100,t[3]/100,t[4]):Vc.hasOwnProperty(e)?Yc(Vc[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function Yc(e){return new st(e>>16&255,e>>8&255,e&255,1)}function ir(e,t,n,o){return o<=0&&(e=t=n=NaN),new st(e,t,n,o)}function Fy(e){return e instanceof Ko||(e=Pn(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function nl(e,t,n,o){return arguments.length===1?Fy(e):new st(e,t,n,o??1)}function st(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}tl(st,nl,Gc(Ko,{brighter(e){return e=e==null?or:Math.pow(or,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new st(Rn(this.r),Rn(this.g),Rn(this.b),rr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xc,formatHex:Xc,formatHex8:Hy,formatRgb:qc,toString:qc}));function Xc(){return"#"+Dn(this.r)+Dn(this.g)+Dn(this.b)}function Hy(){return"#"+Dn(this.r)+Dn(this.g)+Dn(this.b)+Dn((isNaN(this.opacity)?1:this.opacity)*255)}function qc(){const e=rr(this.opacity);return(e===1?"rgb(":"rgba(")+Rn(this.r)+", "+Rn(this.g)+", "+Rn(this.b)+(e===1?")":", "+e+")")}function rr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dn(e){return e=Rn(e),(e<16?"0":"")+e.toString(16)}function jc(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xt(e,t,n,o)}function Zc(e){if(e instanceof xt)return new xt(e.h,e.s,e.l,e.opacity);if(e instanceof Ko||(e=Pn(e)),!e)return new xt;if(e instanceof xt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,l=r-i,a=(r+i)/2;return l?(t===r?s=(n-o)/l+(n<o)*6:n===r?s=(o-t)/l+2:s=(t-n)/l+4,l/=a<.5?r+i:2-r-i,s*=60):l=a>0&&a<1?0:s,new xt(s,l,a,e.opacity)}function Wy(e,t,n,o){return arguments.length===1?Zc(e):new xt(e,t,n,o??1)}function xt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}tl(xt,Wy,Gc(Ko,{brighter(e){return e=e==null?or:Math.pow(or,e),new xt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new xt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new st(ol(e>=240?e-240:e+120,i,o),ol(e,i,o),ol(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new xt(Jc(this.h),sr(this.s),sr(this.l),rr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=rr(this.opacity);return(e===1?"hsl(":"hsla(")+Jc(this.h)+", "+sr(this.s)*100+"%, "+sr(this.l)*100+"%"+(e===1?")":", "+e+")")}}));function Jc(e){return e=(e||0)%360,e<0?e+360:e}function sr(e){return Math.max(0,Math.min(1,e||0))}function ol(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const il=e=>()=>e;function By(e,t){return function(n){return e+n*t}}function zy(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Gy(e){return(e=+e)==1?Qc:function(t,n){return n-t?zy(t,n,e):il(isNaN(t)?n:t)}}function Qc(e,t){var n=t-e;return n?By(e,n):il(isNaN(e)?t:e)}const lr=(function e(t){var n=Gy(t);function o(i,r){var s=n((i=nl(i)).r,(r=nl(r)).r),l=n(i.g,r.g),a=n(i.b,r.b),u=Qc(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function Vy(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(r){for(i=0;i<n;++i)o[i]=e[i]*(1-r)+t[i]*r;return o}}function Ky(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Uy(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),r=new Array(n),s;for(s=0;s<o;++s)i[s]=Xo(e[s],t[s]);for(;s<n;++s)r[s]=t[s];return function(l){for(s=0;s<o;++s)r[s]=i[s](l);return r}}function Yy(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function zt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Xy(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Xo(e[i],t[i]):o[i]=t[i];return function(r){for(i in n)o[i]=n[i](r);return o}}var rl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(rl.source,"g");function qy(e){return function(){return e}}function jy(e){return function(t){return e(t)+""}}function ef(e,t){var n=rl.lastIndex=sl.lastIndex=0,o,i,r,s=-1,l=[],a=[];for(e=e+"",t=t+"";(o=rl.exec(e))&&(i=sl.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(o=o[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,a.push({i:s,x:zt(o,i)})),n=sl.lastIndex;return n<t.length&&(r=t.slice(n),l[s]?l[s]+=r:l[++s]=r),l.length<2?a[0]?jy(a[0].x):qy(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)l[(f=a[c]).i]=f.x(u);return l.join("")})}function Xo(e,t){var n=typeof t,o;return t==null||n==="boolean"?il(t):(n==="number"?zt:n==="string"?(o=Pn(t))?(t=o,lr):ef:t instanceof Pn?lr:t instanceof Date?Yy:Ky(t)?Vy:Array.isArray(t)?Uy:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Xy:zt)(e,t)}var tf=180/Math.PI,ll={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function nf(e,t,n,o,i,r){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*o)&&(n-=e*a,o-=t*a),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,a/=l),e*o<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*tf,skewX:Math.atan(a)*tf,scaleX:s,scaleY:l}}var ar;function Zy(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ll:nf(t.a,t.b,t.c,t.d,t.e,t.f)}function Jy(e){return e==null||(ar||(ar=document.createElementNS("http://www.w3.org/2000/svg","g")),ar.setAttribute("transform",e),!(e=ar.transform.baseVal.consolidate()))?ll:(e=e.matrix,nf(e.a,e.b,e.c,e.d,e.e,e.f))}function of(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,f,d,h,x){if(u!==f||c!==d){var b=h.push("translate(",null,t,null,n);x.push({i:b-4,x:zt(u,f)},{i:b-2,x:zt(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function s(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,o)-2,x:zt(u,c)})):c&&f.push(i(f)+"rotate("+c+o)}function l(u,c,f,d){u!==c?d.push({i:f.push(i(f)+"skewX(",null,o)-2,x:zt(u,c)}):c&&f.push(i(f)+"skewX("+c+o)}function a(u,c,f,d,h,x){if(u!==f||c!==d){var b=h.push(i(h)+"scale(",null,",",null,")");x.push({i:b-4,x:zt(u,f)},{i:b-2,x:zt(c,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),l(u.skewX,c.skewX,f,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var x=-1,b=d.length,A;++x<b;)f[(A=d[x]).i]=A.x(h);return f.join("")}}}var Qy=of(Zy,"px, ","px)","deg)"),e0=of(Jy,", ",")",")"),t0=1e-12;function rf(e){return((e=Math.exp(e))+1/e)/2}function n0(e){return((e=Math.exp(e))-1/e)/2}function o0(e){return((e=Math.exp(2*e))-1)/(e+1)}const ur=(function e(t,n,o){function i(r,s){var l=r[0],a=r[1],u=r[2],c=s[0],f=s[1],d=s[2],h=c-l,x=f-a,b=h*h+x*x,A,E;if(b<t0)E=Math.log(d/u)/t,A=function(G){return[l+G*h,a+G*x,u*Math.exp(t*G*E)]};else{var D=Math.sqrt(b),S=(d*d-u*u+o*b)/(2*u*n*D),O=(d*d-u*u-o*b)/(2*d*n*D),B=Math.log(Math.sqrt(S*S+1)-S),U=Math.log(Math.sqrt(O*O+1)-O);E=(U-B)/t,A=function(G){var ee=G*E,te=rf(B),X=u/(n*D)*(te*o0(t*ee+B)-n0(B));return[l+X*h,a+X*x,u*te/rf(t*ee+B)]}}return A.duration=E*1e3*t/Math.SQRT2,A}return i.rho=function(r){var s=Math.max(.001,+r),l=s*s,a=l*l;return e(s,l,a)},i})(Math.SQRT2,2,4);var uo=0,qo=0,jo=0,sf=1e3,cr,Zo,fr=0,kn=0,dr=0,Jo=typeof performance=="object"&&performance.now?performance:Date,lf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function al(){return kn||(lf(i0),kn=Jo.now()+dr)}function i0(){kn=0}function hr(){this._call=this._time=this._next=null}hr.prototype=af.prototype={constructor:hr,restart:function(t,n,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?al():+o)+(n==null?0:+n),!this._next&&Zo!==this&&(Zo?Zo._next=this:cr=this,Zo=this),this._call=t,this._time=o,ul()},stop:function(){this._call&&(this._call=null,this._time=1/0,ul())}};function af(e,t,n){var o=new hr;return o.restart(e,t,n),o}function r0(){al(),++uo;for(var e=cr,t;e;)(t=kn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--uo}function uf(){kn=(fr=Jo.now())+dr,uo=qo=0;try{r0()}finally{uo=0,l0(),kn=0}}function s0(){var e=Jo.now(),t=e-fr;t>sf&&(dr-=t,fr=e)}function l0(){for(var e,t=cr,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:cr=n);Zo=e,ul(o)}function ul(e){if(!uo){qo&&(qo=clearTimeout(qo));var t=e-kn;t>24?(e<1/0&&(qo=setTimeout(uf,e-Jo.now()-dr)),jo&&(jo=clearInterval(jo))):(jo||(fr=Jo.now(),jo=setInterval(s0,sf)),uo=1,lf(uf))}}function cf(e,t,n){var o=new hr;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var a0=Ji("start","end","cancel","interrupt"),u0=[],ff=0,df=1,cl=2,gr=3,hf=4,fl=5,pr=6;function vr(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;c0(e,n,{name:t,index:o,group:i,on:a0,tween:u0,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:ff})}function dl(e,t){var n=At(e,t);if(n.state>ff)throw new Error("too late; already scheduled");return n}function Gt(e,t){var n=At(e,t);if(n.state>gr)throw new Error("too late; already running");return n}function At(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function c0(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=af(r,0,n.time);function r(u){n.state=df,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==df)return a();for(c in o)if(h=o[c],h.name===n.name){if(h.state===gr)return cf(s);h.state===hf?(h.state=pr,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=pr,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(cf(function(){n.state===gr&&(n.state=hf,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=cl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===cl){for(n.state=gr,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=h);i.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=fl,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===fl&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=pr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function mr(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>cl&&o.state<fl,o.state=pr,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function f0(e){return this.each(function(){mr(this,e)})}function d0(e,t){var n,o;return function(){var i=Gt(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function h0(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Gt(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var l={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=l;break}a===u&&i.push(l)}r.tween=i}}function g0(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=At(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?d0:h0)(n,e,t))}function hl(e,t,n){var o=e._id;return e.each(function(){var i=Gt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return At(i,o).value[t]}}function gf(e,t){var n;return(typeof t=="number"?zt:t instanceof Pn?lr:(n=Pn(t))?(t=n,lr):ef)(e,t)}function p0(e){return function(){this.removeAttribute(e)}}function v0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function m0(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function y0(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function _0(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function w0(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function b0(e,t){var n=er(e),o=n==="transform"?e0:gf;return this.attrTween(e,typeof t=="function"?(n.local?w0:_0)(n,o,hl(this,"attr."+e,t)):t==null?(n.local?v0:p0)(n):(n.local?y0:m0)(n,o,t))}function S0(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function E0(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function x0(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&E0(e,r)),n}return i._value=t,i}function A0(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&S0(e,r)),n}return i._value=t,i}function O0(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=er(e);return this.tween(n,(o.local?x0:A0)(o,t))}function C0(e,t){return function(){dl(this,e).delay=+t.apply(this,arguments)}}function N0(e,t){return t=+t,function(){dl(this,e).delay=t}}function T0(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?C0:N0)(t,e)):At(this.node(),t).delay}function M0(e,t){return function(){Gt(this,e).duration=+t.apply(this,arguments)}}function I0(e,t){return t=+t,function(){Gt(this,e).duration=t}}function P0(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?M0:I0)(t,e)):At(this.node(),t).duration}function R0(e,t){if(typeof t!="function")throw new Error;return function(){Gt(this,e).ease=t}}function D0(e){var t=this._id;return arguments.length?this.each(R0(t,e)):At(this.node(),t).ease}function k0(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Gt(this,e).ease=n}}function $0(e){if(typeof e!="function")throw new Error;return this.each(k0(this._id,e))}function L0(e){typeof e!="function"&&(e=Ic(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new tn(o,this._parents,this._name,this._id)}function F0(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),s=new Array(o),l=0;l<r;++l)for(var a=t[l],u=n[l],c=a.length,f=s[l]=new Array(c),d,h=0;h<c;++h)(d=a[h]||u[h])&&(f[h]=d);for(;l<o;++l)s[l]=t[l];return new tn(s,this._parents,this._name,this._id)}function H0(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function W0(e,t,n){var o,i,r=H0(t)?dl:Gt;return function(){var s=r(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function B0(e,t){var n=this._id;return arguments.length<2?At(this.node(),n).on.on(e):this.each(W0(n,e,t))}function z0(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function G0(){return this.on("end.remove",z0(this._id))}function V0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zs(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var l=o[s],a=l.length,u=r[s]=new Array(a),c,f,d=0;d<a;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,vr(u[d],t,n,d,u,At(c,n)));return new tn(r,this._parents,t,n)}function K0(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Mc(e));for(var o=this._groups,i=o.length,r=[],s=[],l=0;l<i;++l)for(var a=o[l],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var d=e.call(c,c.__data__,f,a),h,x=At(c,n),b=0,A=d.length;b<A;++b)(h=d[b])&&vr(h,t,n,b,d,x);r.push(d),s.push(c)}return new tn(r,s,t,n)}var U0=Go.prototype.constructor;function Y0(){return new U0(this._groups,this._parents)}function X0(e,t){var n,o,i;return function(){var r=so(this,e),s=(this.style.removeProperty(e),so(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function pf(e){return function(){this.style.removeProperty(e)}}function q0(e,t,n){var o,i=n+"",r;return function(){var s=so(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function j0(e,t,n){var o,i,r;return function(){var s=so(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),so(this,e))),s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l))}}function Z0(e,t){var n,o,i,r="style."+t,s="end."+r,l;return function(){var a=Gt(this,e),u=a.on,c=a.value[r]==null?l||(l=pf(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),a.on=o}}function J0(e,t,n){var o=(e+="")=="transform"?Qy:gf;return t==null?this.styleTween(e,X0(e,o)).on("end.style."+e,pf(e)):typeof t=="function"?this.styleTween(e,j0(e,o,hl(this,"style."+e,t))).each(Z0(this._id,e)):this.styleTween(e,q0(e,o,t),n).on("end.style."+e,null)}function Q0(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function e_(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&Q0(e,s,n)),o}return r._value=t,r}function t_(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,e_(e,t,n??""))}function n_(e){return function(){this.textContent=e}}function o_(e){return function(){var t=e(this);this.textContent=t??""}}function i_(e){return this.tween("text",typeof e=="function"?o_(hl(this,"text",e)):n_(e==null?"":e+""))}function r_(e){return function(t){this.textContent=e.call(this,t)}}function s_(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&r_(i)),t}return o._value=e,o}function l_(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,s_(e))}function a_(){for(var e=this._name,t=this._id,n=vf(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=At(a,t);vr(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tn(o,this._parents,e,n)}function u_(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var l={value:s},a={value:function(){--i===0&&r()}};n.each(function(){var u=Gt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),i===0&&r()})}var c_=0;function tn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function vf(){return++c_}var nn=Go.prototype;tn.prototype={constructor:tn,select:V0,selectAll:K0,selectChild:nn.selectChild,selectChildren:nn.selectChildren,filter:L0,merge:F0,selection:Y0,transition:a_,call:nn.call,nodes:nn.nodes,node:nn.node,size:nn.size,empty:nn.empty,each:nn.each,on:B0,attr:b0,attrTween:O0,style:J0,styleTween:t_,text:i_,textTween:l_,remove:G0,tween:g0,delay:T0,duration:P0,ease:D0,easeVarying:$0,end:u_,[Symbol.iterator]:nn[Symbol.iterator]};function f_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var d_={time:null,delay:0,duration:250,ease:f_};function h_(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition "+t+" not found");return n}function g_(e){var t,n;e instanceof tn?(t=e._id,e=e._name):(t=vf(),(n=d_).time=al(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&vr(a,e,t,u,s,n||h_(a,t));return new tn(o,this._parents,e,t)}Go.prototype.interrupt=f0,Go.prototype.transition=g_;const yr=e=>()=>e;function p_(e,t){let{sourceEvent:n,target:o,transform:i,dispatch:r}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function on(e,t,n){this.k=e,this.x=t,this.y=n}on.prototype={constructor:on,scale:function(t){return t===1?this:new on(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new on(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var co=new on(1,0,0);on.prototype;function gl(e){e.stopImmediatePropagation()}function Qo(e){e.preventDefault(),e.stopImmediatePropagation()}function v_(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function m_(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function mf(){return this.__zoom||co}function y_(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function __(){return navigator.maxTouchPoints||"ontouchstart"in this}function w_(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function b_(){var e=v_,t=m_,n=w_,o=y_,i=__,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=ur,u=Ji("start","zoom","end"),c,f,d,h=500,x=150,b=0,A=10;function E(m){m.property("__zoom",mf).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",ee).on("dblclick.zoom",te).filter(i).on("touchstart.zoom",X).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(m,T,R,I){var C=m.selection?m.selection():m;C.property("__zoom",mf),m!==C?B(m,T,R,I):C.interrupt().each(function(){U(this,arguments).event(I).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},E.scaleBy=function(m,T,R,I){E.scaleTo(m,function(){var C=this.__zoom.k,k=typeof T=="function"?T.apply(this,arguments):T;return C*k},R,I)},E.scaleTo=function(m,T,R,I){E.transform(m,function(){var C=t.apply(this,arguments),k=this.__zoom,H=R==null?O(C):typeof R=="function"?R.apply(this,arguments):R,$=k.invert(H),W=typeof T=="function"?T.apply(this,arguments):T;return n(S(D(k,W),H,$),C,s)},R,I)},E.translateBy=function(m,T,R,I){E.transform(m,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,I)},E.translateTo=function(m,T,R,I,C){E.transform(m,function(){var k=t.apply(this,arguments),H=this.__zoom,$=I==null?O(k):typeof I=="function"?I.apply(this,arguments):I;return n(co.translate($[0],$[1]).scale(H.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof R=="function"?-R.apply(this,arguments):-R),k,s)},I,C)};function D(m,T){return T=Math.max(r[0],Math.min(r[1],T)),T===m.k?m:new on(T,m.x,m.y)}function S(m,T,R){var I=T[0]-R[0]*m.k,C=T[1]-R[1]*m.k;return I===m.x&&C===m.y?m:new on(m.k,I,C)}function O(m){return[(+m[0][0]+ +m[1][0])/2,(+m[0][1]+ +m[1][1])/2]}function B(m,T,R,I){m.on("start.zoom",function(){U(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(I).end()}).tween("zoom",function(){var C=this,k=arguments,H=U(C,k).event(I),$=t.apply(C,k),W=R==null?O($):typeof R=="function"?R.apply(C,k):R,ne=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),se=C.__zoom,q=typeof T=="function"?T.apply(C,k):T,Y=a(se.invert(W).concat(ne/se.k),q.invert(W).concat(ne/q.k));return function(j){if(j===1)j=q;else{var ce=Y(j),ve=ne/ce[2];j=new on(ve,W[0]-ce[0]*ve,W[1]-ce[1]*ve)}H.zoom(null,j)}})}function U(m,T,R){return!R&&m.__zooming||new J(m,T)}function J(m,T){this.that=m,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(m,T),this.taps=0}J.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,R){return this.mouse&&T!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var R=Et(this.that).datum();u.call(T,this.that,new p_(T,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:u}),R)}};function G(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(!e.apply(this,arguments))return;var C=U(this,R).event(m),k=this.__zoom,H=Math.max(r[0],Math.min(r[1],k.k*Math.pow(2,o.apply(this,arguments)))),$=Wt(m);if(C.wheel)(C.mouse[0][0]!==$[0]||C.mouse[0][1]!==$[1])&&(C.mouse[1]=k.invert(C.mouse[0]=$)),clearTimeout(C.wheel);else{if(k.k===H)return;C.mouse=[$,k.invert($)],mr(this),C.start()}Qo(m),C.wheel=setTimeout(W,x),C.zoom("mouse",n(S(D(k,H),C.mouse[0],C.mouse[1]),C.extent,s));function W(){C.wheel=null,C.end()}}function ee(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(d||!e.apply(this,arguments))return;var C=m.currentTarget,k=U(this,R,!0).event(m),H=Et(m.view).on("mousemove.zoom",se,!0).on("mouseup.zoom",q,!0),$=Wt(m,C),W=m.clientX,ne=m.clientY;Bc(m.view),gl(m),k.mouse=[$,this.__zoom.invert($)],mr(this),k.start();function se(Y){if(Qo(Y),!k.moved){var j=Y.clientX-W,ce=Y.clientY-ne;k.moved=j*j+ce*ce>b}k.event(Y).zoom("mouse",n(S(k.that.__zoom,k.mouse[0]=Wt(Y,C),k.mouse[1]),k.extent,s))}function q(Y){H.on("mousemove.zoom mouseup.zoom",null),zc(Y.view,k.moved),Qo(Y),k.event(Y).end()}}function te(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(e.apply(this,arguments)){var C=this.__zoom,k=Wt(m.changedTouches?m.changedTouches[0]:m,this),H=C.invert(k),$=C.k*(m.shiftKey?.5:2),W=n(S(D(C,$),k,H),t.apply(this,R),s);Qo(m),l>0?Et(this).transition().duration(l).call(B,W,k,m):Et(this).call(E.transform,W,k,m)}}function X(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(e.apply(this,arguments)){var C=m.touches,k=C.length,H=U(this,R,m.changedTouches.length===k).event(m),$,W,ne,se;for(gl(m),W=0;W<k;++W)ne=C[W],se=Wt(ne,this),se=[se,this.__zoom.invert(se),ne.identifier],H.touch0?!H.touch1&&H.touch0[2]!==se[2]&&(H.touch1=se,H.taps=0):(H.touch0=se,$=!0,H.taps=1+!!c);c&&(c=clearTimeout(c)),$&&(H.taps<2&&(f=se[0],c=setTimeout(function(){c=null},h)),mr(this),H.start())}}function P(m){if(this.__zooming){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];var C=U(this,R).event(m),k=m.changedTouches,H=k.length,$,W,ne,se;for(Qo(m),$=0;$<H;++$)W=k[$],ne=Wt(W,this),C.touch0&&C.touch0[2]===W.identifier?C.touch0[0]=ne:C.touch1&&C.touch1[2]===W.identifier&&(C.touch1[0]=ne);if(W=C.that.__zoom,C.touch1){var q=C.touch0[0],Y=C.touch0[1],j=C.touch1[0],ce=C.touch1[1],ve=(ve=j[0]-q[0])*ve+(ve=j[1]-q[1])*ve,ge=(ge=ce[0]-Y[0])*ge+(ge=ce[1]-Y[1])*ge;W=D(W,Math.sqrt(ve/ge)),ne=[(q[0]+j[0])/2,(q[1]+j[1])/2],se=[(Y[0]+ce[0])/2,(Y[1]+ce[1])/2]}else if(C.touch0)ne=C.touch0[0],se=C.touch0[1];else return;C.zoom("touch",n(S(W,ne,se),C.extent,s))}}function oe(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(this.__zooming){var C=U(this,R).event(m),k=m.changedTouches,H=k.length,$,W;for(gl(m),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),$=0;$<H;++$)W=k[$],C.touch0&&C.touch0[2]===W.identifier?delete C.touch0:C.touch1&&C.touch1[2]===W.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(W=Wt(W,this),Math.hypot(f[0]-W[0],f[1]-W[1])<A)){var ne=Et(this).on("dblclick.zoom");ne&&ne.apply(this,arguments)}}}return E.wheelDelta=function(m){return arguments.length?(o=typeof m=="function"?m:yr(+m),E):o},E.filter=function(m){return arguments.length?(e=typeof m=="function"?m:yr(!!m),E):e},E.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:yr(!!m),E):i},E.extent=function(m){return arguments.length?(t=typeof m=="function"?m:yr([[+m[0][0],+m[0][1]],[+m[1][0],+m[1][1]]]),E):t},E.scaleExtent=function(m){return arguments.length?(r[0]=+m[0],r[1]=+m[1],E):[r[0],r[1]]},E.translateExtent=function(m){return arguments.length?(s[0][0]=+m[0][0],s[1][0]=+m[1][0],s[0][1]=+m[0][1],s[1][1]=+m[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function(m){return arguments.length?(n=m,E):n},E.duration=function(m){return arguments.length?(l=+m,E):l},E.interpolate=function(m){return arguments.length?(a=m,E):a},E.on=function(){var m=u.on.apply(u,arguments);return m===u?E:m},E.clickDistance=function(m){return arguments.length?(b=(m=+m)*m,E):Math.sqrt(b)},E.tapDistance=function(m){return arguments.length?(A=+m,E):A},E}var de=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(de||{}),pl=(e=>(e.Partial="partial",e.Full="full",e))(pl||{}),$n=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))($n||{}),mn=(e=>(e.Strict="strict",e.Loose="loose",e))(mn||{}),vl=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(vl||{}),ei=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(ei||{});const S_=["INPUT","SELECT","TEXTAREA"],E_=typeof document<"u"?document:null;function ml(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,r=typeof o?.closest=="function"?o.closest(".nokey"):null;return S_.includes(o?.nodeName)||i||!!r}function x_(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function yf(e,t,n,o){const i=t.replace("+",` `).replace(` `,` +`).split(` `).map(s=>s.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const r=i.every((s,l)=>n.has(s)&&Array.from(n.values())[l]===i[l]);return o&&n.delete(e.toLowerCase()),r}function A_(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=O_(n.code,e);return Array.isArray(e)?e.some(i=>yf(n[o],i,t,n.type==="keyup")):yf(n[o],e,t,n.type==="keyup")}}function O_(e,t){return t.includes(e)?"code":"key"}function ti(e,t){const n=fe(()=>{var u;return(u=Ee(t?.target))!=null?u:E_}),o=fn(Ee(e)===!0);let i=!1;const r=new Set;let s=a(Ee(e));xe(()=>Ee(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&l(),s=a(u)},{immediate:!0}),Ac(["blur","contextmenu"],l),Oc(function(){return s(...arguments)},u=>{var c,f,d,h;const x=(c=Ee(t?.actInsideInputWithModifier))!=null?c:!0,b=(f=Ee(t?.preventDefault))!=null?f:!1;if(i=x_(u),(!i||i&&!x)&&ml(u))return;const E=((h=(d=u.composedPath)==null?void 0:d.call(u))==null?void 0:h[0])||u.target,D=E?.nodeName==="BUTTON"||E?.nodeName==="A";!b&&(i||!D)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),Oc(function(){return s(...arguments)},u=>{var c;const f=(c=Ee(t?.actInsideInputWithModifier))!=null?c:!0;if(o.value){if((!i||i&&!f)&&ml(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){i=!1,r.clear(),o.value=Ee(e)===!0}function a(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?A_(u,r):u}return o}const _f="vue-flow__node-desc",wf="vue-flow__edge-desc",C_="vue-flow__aria-live",bf=["Enter"," ","Escape"],fo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function _r(e){return ie({},e.computedPosition||{x:0,y:0},{width:e.dimensions.width||0,height:e.dimensions.height||0})}function wr(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function br(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Ln(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),Math.min(Math.max(e,t),n)}function Sf(e,t){return{x:Ln(e.x,t[0][0],t[1][0]),y:Ln(e.y,t[0][1],t[1][1])}}function Ef(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function yn(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Fn(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!yn(e)}function ni(e){return Fn(e)&&"computedPosition"in e}function Sr(e){return!Number.isNaN(e)&&Number.isFinite(e)}function N_(e){return Sr(e.width)&&Sr(e.height)&&Sr(e.x)&&Sr(e.y)}function T_(e,t,n){var o;const i={id:e.id.toString(),type:(o=e.type)!=null?o:"default",dimensions:No({width:0,height:0}),computedPosition:No(ie({z:0},e.position)),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ke(e.data)?e.data:{},events:No(Ke(e.events)?e.events:{})};return Object.assign(t??i,e,{id:e.id.toString(),parentNode:n})}function xf(e,t,n){var o,i,r,s,l,a,u,c,f;const d=ie({id:e.id.toString(),type:(o=(i=e.type)!=null?i:t?.type)!=null?o:"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(c=e.sourceHandle)==null?void 0:c.toString(),targetHandle:(f=e.targetHandle)==null?void 0:f.toString(),updatable:(r=e.updatable)!=null?r:n?.updatable,selectable:(s=e.selectable)!=null?s:n?.selectable,focusable:(l=e.focusable)!=null?l:n?.focusable,data:Ke(e.data)?e.data:{},events:No(Ke(e.events)?e.events:{}),label:(a=e.label)!=null?a:"",interactionWidth:(u=e.interactionWidth)!=null?u:n?.interactionWidth},n??{});return Object.assign(t??d,e,{id:e.id.toString()})}function Af(e,t,n,o){const i=typeof e=="string"?e:e.id,r=new Set,s=o==="source"?"target":"source";for(const l of n)l[s]===i&&r.add(l[o]);return t.filter(l=>r.has(l.id))}function M_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===3){const[l,a,u]=t;return Af(l,a,u,"target")}const[o,i]=t,r=typeof o=="string"?o:o.id;return i.filter(l=>yn(l)&&l.source===r).map(l=>i.find(a=>Fn(a)&&a.id===l.target))}function I_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===3){const[l,a,u]=t;return Af(l,a,u,"source")}const[o,i]=t,r=typeof o=="string"?o:o.id;return i.filter(l=>yn(l)&&l.target===r).map(l=>i.find(a=>Fn(a)&&a.id===l.source))}function Of(e){let{source:t,sourceHandle:n,target:o,targetHandle:i}=e;return"vueflow__edge-"+t+(n??"")+"-"+o+(i??"")}function P_(e,t){return t.some(n=>yn(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function oi(e,t){let{x:n,y:o}=e,{x:i,y:r,zoom:s}=t;return{x:n*s+i,y:o*s+r}}function ii(e,t,n,o){let{x:i,y:r}=e,{x:s,y:l,zoom:a}=t;n===void 0&&(n=!1),o===void 0&&(o=[1,1]);const u={x:(i-s)/a,y:(r-l)/a};return n?xr(u,o):u}function Cf(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function Er(e){let{x:t,y:n,width:o,height:i}=e;return{x:t,y:n,x2:t+o,y2:n+i}}function Nf(e){let{x:t,y:n,x2:o,y2:i}=e;return{x:t,y:n,width:o-t,height:i-n}}function R_(e,t){return Nf(Cf(Er(e),Er(t)))}function yl(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=Cf(t,Er(ie({},o.computedPosition,o.dimensions)))}return Nf(t)}function Tf(e,t,n,o,i){n===void 0&&(n={x:0,y:0,zoom:1}),o===void 0&&(o=!1),i===void 0&&(i=!1);const r=ie({},ii(t,n),{width:t.width/n.zoom,height:t.height/n.zoom}),s=[];for(const f of e){var l,a,u,c;const{dimensions:d,selectable:h=!0,hidden:x=!1}=f,b=(l=(a=d.width)!=null?a:f.width)!=null?l:null,A=(u=(c=d.height)!=null?c:f.height)!=null?u:null;if(i&&!h||x)continue;const E=wr(r,_r(f)),D=b===null||A===null,S=o&&E>0,O=(b??0)*(A??0);(D||S||E>=O||f.dragging)&&s.push(f)}return s}function Hn(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function ho(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return li('The padding value "'+e+'" is invalid. Please provide a number or a string with a valid unit (px or %).'),0}function D_(e,t,n){if(typeof e=="string"||typeof e=="number"){const f=ho(e,n),d=ho(e,t);return{top:f,right:d,bottom:f,left:d,x:d*2,y:f*2}}if(typeof e=="object"){var o,i,r,s,l,a,u,c;const f=ho((o=(i=e.top)!=null?i:e.y)!=null?o:0,n),d=ho((r=(s=e.bottom)!=null?s:e.y)!=null?r:0,n),h=ho((l=(a=e.left)!=null?a:e.x)!=null?l:0,t),x=ho((u=(c=e.right)!=null?c:e.x)!=null?u:0,t);return{top:f,right:x,bottom:d,left:h,x:h+x,y:f+d}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function k_(e,t,n,o,i,r){const{x:s,y:l}=oi(e,{x:t,y:n,zoom:o}),{x:a,y:u}=oi({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=i-a,f=r-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(f)}}function Mf(e,t,n,o,i,r){r===void 0&&(r=.1);const s=D_(r,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=Ln(u,o,i),f=e.x+e.width/2,d=e.y+e.height/2,h=t/2-f*c,x=n/2-d*c,b=k_(e,h,x,c,t,n),A={left:Math.min(b.left-s.left,0),top:Math.min(b.top-s.top,0),right:Math.min(b.right-s.right,0),bottom:Math.min(b.bottom-s.bottom,0)};return{x:h-A.left+A.right,y:x-A.top+A.bottom,zoom:c}}function $_(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function If(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:If(n,t):!1}function ri(e,t){return typeof e>"u"?"":typeof e=="string"?e:""+(t?t+"__":"")+Object.keys(e).sort().map(o=>o+"="+e[o]).join("&")}function _l(e){const t=e.ctrlKey&&si()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Pf(e,t,n){return e<t?Ln(Math.abs(e-t),1,t)/t:e>n?-Ln(Math.abs(e-n),1,t)/t:0}function Rf(e,t,n,o){n===void 0&&(n=15),o===void 0&&(o=40);const i=Pf(e.x,o,t.width-o)*n,r=Pf(e.y,o,t.height-o)*n;return[i,r]}function wl(e,t){if(t){const i=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(i>0||r>0||e.position.x<0||e.position.y<0){var n,o;let s={};if(typeof t.style=="function"?s=ie({},t.style(t)):t.style&&(s=ie({},t.style)),s.width=(n=s.width)!=null?n:t.dimensions.width+"px",s.height=(o=s.height)!=null?o:t.dimensions.height+"px",i>0)if(typeof s.width=="string"){const l=Number(s.width.replace("px",""));s.width=l+i+"px"}else s.width+=i;if(r>0)if(typeof s.height=="string"){const l=Number(s.height.replace("px",""));s.height=l+r+"px"}else s.height+=r;if(e.position.x<0){const l=Math.abs(e.position.x);if(t.position.x=t.position.x-l,typeof s.width=="string"){const a=Number(s.width.replace("px",""));s.width=a+l+"px"}else s.width+=l;e.position.x=0}if(e.position.y<0){const l=Math.abs(e.position.y);if(t.position.y=t.position.y-l,typeof s.height=="string"){const a=Number(s.height.replace("px",""));s.height=a+l+"px"}else s.height+=l;e.position.y=0}t.dimensions.width=Number(s.width.toString().replace("px","")),t.dimensions.height=Number(s.height.toString().replace("px","")),typeof t.style=="function"?t.style=l=>{const a=t.style;return ie({},a(l),s)}:t.style=ie({},t.style,s)}}}function Df(e,t){var n,o;const i=e.filter(s=>s.type==="add"||s.type==="remove");for(const s of i)if(s.type==="add")t.findIndex(a=>a.id===s.item.id)===-1&&t.push(s.item);else if(s.type==="remove"){const l=t.findIndex(a=>a.id===s.id);l!==-1&&t.splice(l,1)}const r=t.map(s=>s.id);for(const s of t)for(const l of e)if(l.id===s.id)switch(l.type){case"select":s.selected=l.selected;break;case"position":if(ni(s)&&(typeof l.position<"u"&&(s.position=l.position),typeof l.dragging<"u"&&(s.dragging=l.dragging),s.expandParent&&s.parentNode)){const a=t[r.indexOf(s.parentNode)];a&&ni(a)&&wl(s,a)}break;case"dimensions":if(ni(s)&&(typeof l.dimensions<"u"&&(s.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(s.style=ie({},s.style||{},{width:((n=l.dimensions)==null?void 0:n.width)+"px",height:((o=l.dimensions)==null?void 0:o.height)+"px"})),typeof l.resizing<"u"&&(s.resizing=l.resizing),s.expandParent&&s.parentNode)){const a=t[r.indexOf(s.parentNode)];a&&ni(a)&&(!!a.dimensions.width&&!!a.dimensions.height?wl(s,a):kt(()=>{wl(s,a)}))}break}return t}function _n(e,t){return{id:e,type:"select",selected:t}}function kf(e){return{item:e,type:"add"}}function $f(e){return{id:e,type:"remove"}}function Lf(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function wn(e,t,n){t===void 0&&(t=new Set),n===void 0&&(n=!1);const o=[];for(const[i,r]of e){const s=t.has(i);!(r.selected===void 0&&!s)&&r.selected!==s&&(n&&(r.selected=s),o.push(_n(r.id,s)))}return o}const Ff=()=>{};function ae(e){const t=new Set;let n=Ff,o=()=>!1;const i=()=>t.size>0||o(),r=d=>{n=d},s=()=>{n=Ff},l=d=>{o=d},a=()=>{o=()=>!1},u=d=>{t.delete(d)};return{on:d=>{t.add(d);const h=()=>u(d);return zo(h),{off:h}},off:u,trigger:d=>{const h=[n];return i()?h.push(...t):e&&h.push(e),Promise.allSettled(h.map(x=>x(d)))},hasListeners:i,listeners:t,setEmitter:r,removeEmitter:s,setHasEmitListeners:l,removeHasEmitListeners:a}}function Hf(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function L_(e,t,n,o){var i,r;const s=new Map;for(const[l,a]of e)(a.selected||a.id===o)&&(!a.parentNode||!If(a,e))&&(a.draggable||t&&typeof a.draggable>"u")&&e.get(l)&&s.set(l,{id:a.id,position:a.position||{x:0,y:0},distance:{x:n.x-((i=a.computedPosition)==null?void 0:i.x)||0,y:n.y-((r=a.computedPosition)==null?void 0:r.y)||0},from:{x:a.computedPosition.x,y:a.computedPosition.y},extent:a.extent,parentNode:a.parentNode,dimensions:ie({},a.dimensions),expandParent:a.expandParent});return Array.from(s.values())}function bl(e){let{id:t,dragItems:n,findNode:o}=e;const i=[];for(const r of n){const s=o(r.id);s&&i.push(s)}return[t?i.find(r=>r.id===t):i[0],i]}function Wf(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function F_(e,t,n){const[o,i,r,s]=typeof e!="string"?Wf(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+s,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-r]]:!1}function H_(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&i?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=F_(i,e,o);r&&(i=r)}else t(new qe(Ve.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=o?.computedPosition.x||0,s=o?.computedPosition.y||0;i=[[i[0][0]+r,i[0][1]+s],[i[1][0]+r,i[1][1]+s]]}else if(i!=="parent"&&i?.range&&Array.isArray(i.range)){const[r,s,l,a]=Wf(i.padding),u=o?.computedPosition.x||0,c=o?.computedPosition.y||0;i=[[i.range[0][0]+u+a,i.range[0][1]+c+r],[i.range[1][0]+u-s,i.range[1][1]+c-l]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function W_(e,t){let{width:n,height:o}=e;return[t[0],[t[1][0]-(n||0),t[1][1]-(o||0)]]}function Sl(e,t,n,o,i){const r=W_(e.dimensions,H_(e,n,o,i)),s=Sf(t,r);return{position:{x:s.x-(i?.computedPosition.x||0),y:s.y-(i?.computedPosition.y||0)},computedPosition:s}}function go(e,t,n,o){var i,r,s;n===void 0&&(n=de.Left),o===void 0&&(o=!1);const l=((i=t?.x)!=null?i:0)+e.computedPosition.x,a=((r=t?.y)!=null?r:0)+e.computedPosition.y,{width:u,height:c}=t??V_(e);if(o)return{x:l+u/2,y:a+c/2};switch((s=t?.position)!=null?s:n){case de.Top:return{x:l+u/2,y:a};case de.Right:return{x:l+u,y:a+c/2};case de.Bottom:return{x:l+u/2,y:a+c};case de.Left:return{x:l,y:a+c/2}}}function Bf(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function B_(e){let{sourcePos:t,targetPos:n,sourceWidth:o,sourceHeight:i,targetWidth:r,targetHeight:s,width:l,height:a,viewport:u}=e;const c={x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),x2:Math.max(t.x+o,n.x+r),y2:Math.max(t.y+i,n.y+s)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const f=Er({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:l/u.zoom,height:a/u.zoom}),d=Math.max(0,Math.min(f.x2,c.x2)-Math.max(f.x,c.x)),h=Math.max(0,Math.min(f.y2,c.y2)-Math.max(f.y,c.y));return Math.ceil(d*h)>0}function z_(e,t,n){n===void 0&&(n=!1);const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const r=t(e.source),s=t(e.target);return!r||!s?0:(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,s.computedPosition.z||0)),i)}var Ve=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Ve||{});const zf={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid Node: `+e,NODE_NOT_FOUND:e=>`Node not found Node: `+e,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent Node: `+e+` Parent: `+t,NODE_TYPE_MISSING:e=>`Node type is missing Type: `+e,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent Node: `+e,EDGE_INVALID:e=>`An edge needs a source and a target Edge: `+e,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing Edge: `+e+` Source: `+t,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing Edge: `+e+` Target: `+t,EDGE_TYPE_MISSING:e=>`Edge type is missing Type: `+e,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same Edge: `+e+` Source: `+t+` Target: `+n,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing Edge: `+e+` Source: `+t+` Target: `+n,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed Edge: `+e,EDGE_NOT_FOUND:e=>`Edge not found Edge: `+e,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class qe extends Error{constructor(t){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),r=1;r<o;r++)i[r-1]=arguments[r];super((n=zf[t])==null?void 0:n.call(zf,...i)),this.name="VueFlowError",this.code=t,this.args=i}}function El(e){return"clientX"in e}function G_(e){return"sourceEvent"in e}function Vt(e,t){var n,o;const i=El(e);let r,s;return i?(r=e.clientX,s=e.clientY):"touches"in e&&e.touches.length>0?(r=e.touches[0].clientX,s=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,s=e.changedTouches[0].clientY):(r=0,s=0),{x:r-((n=t?.left)!=null?n:0),y:s-((o=t?.top)!=null?o:0)}}const si=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function V_(e){var t,n,o,i,r,s;return{width:(t=(n=(r=e.dimensions)==null?void 0:r.width)!=null?n:e.width)!=null?t:0,height:(o=(i=(s=e.dimensions)==null?void 0:s.height)!=null?i:e.height)!=null?o:0}}function xr(e,t){return t===void 0&&(t=[1,1]),{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const K_=()=>!0;function xl(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function U_(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const r of t.values())wr(i,_r(r))>0&&o.push(r);return o}const Y_=250;function X_(e,t,n,o){var i,r;let s=[],l=Number.POSITIVE_INFINITY;const a=U_(e,n,t+Y_);for(const d of a){var u,c;const h=[...(u=(i=d.handleBounds)==null?void 0:i.source)!=null?u:[],...(c=(r=d.handleBounds)==null?void 0:r.target)!=null?c:[]];for(const x of h){if(o.nodeId===x.nodeId&&o.type===x.type&&o.id===x.id)continue;const{x:b,y:A}=go(d,x,x.position,!0),E=Math.sqrt((b-e.x)**2+(A-e.y)**2);E>t||(E<l?(s=[ie({},x,{x:b,y:A})],l=E):E===l&&s.push(ie({},x,{x:b,y:A})))}}if(!s.length)return null;if(s.length>1){var f;const d=o.type==="source"?"target":"source";return(f=s.find(h=>h.type===d))!=null?f:s[0]}return s[0]}function Gf(e,t,n,o,i,r){let{handle:s,connectionMode:l,fromNodeId:a,fromHandleId:u,fromType:c,doc:f,lib:d,flowId:h,isValidConnection:x=K_}=t;const b=c==="target",A=s?f.querySelector("."+d+'-flow__handle[data-id="'+h+"-"+s?.nodeId+"-"+s?.id+"-"+s?.type+'"]'):null,{x:E,y:D}=Vt(e),S=f.elementFromPoint(E,D),O=S?.classList.contains(d+"-flow__handle")?S:A,B={handleDomNode:O,isValid:!1,connection:null,toHandle:null};if(O){const U=Vf(void 0,O),J=O.getAttribute("data-nodeid"),G=O.getAttribute("data-handleid"),ee=O.classList.contains("connectable"),te=O.classList.contains("connectableend");if(!J||!U)return B;const X={source:b?J:a,sourceHandle:b?G:u,target:b?a:J,targetHandle:b?u:G};B.connection=X;const oe=ee&&te&&(l===mn.Strict?b&&U==="source"||!b&&U==="target":J!==a||G!==u);B.isValid=oe&&x(X,{nodes:o,edges:n,sourceNode:i(X.source),targetNode:i(X.target)}),B.toHandle=Kf(J,U,G,r,l,!0)}return B}function Vf(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function q_(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function j_(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Kf(e,t,n,o,i,r){var s,l,a;r===void 0&&(r=!1);var u,c,f;const d=o.get(e);if(!d)return null;const h=i===mn.Strict?(u=d.handleBounds)==null?void 0:u[t]:[...(s=(c=d.handleBounds)==null?void 0:c.source)!=null?s:[],...(l=(f=d.handleBounds)==null?void 0:f.target)!=null?l:[]],x=(a=n?h?.find(b=>b.id===n):h?.[0])!=null?a:null;return x&&r?ie({},x,go(d,x,x.position,!0)):x}const Al={[de.Left]:de.Right,[de.Right]:de.Left,[de.Top]:de.Bottom,[de.Bottom]:de.Top},Z_=["production","prod"];function li(e){if(Uf()){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];console.warn("[Vue Flow]: "+e,...n)}}function Uf(){return!Z_.includes("production")}function Yf(e,t,n,o,i){const r=t.querySelectorAll(".vue-flow__handle."+e);return r?.length?Array.from(r).map(s=>{const l=s.getBoundingClientRect();return ie({id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o},br(s))}):null}function Ol(e,t,n,o,i,r,s){r===void 0&&(r=!1),i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),kt(()=>{s.blur()})):n([e])}function Ke(e){return typeof ue(e)<"u"}function J_(e,t,n,o){if(!e||!e.source||!e.target){var i;return n(new qe(Ve.EDGE_INVALID,(i=e?.id)!=null?i:"[ID UNKNOWN]")),!1}let r;return yn(e)?r=e:r=ie({},e,{id:Of(e)}),r=xf(r,void 0,o),P_(r,t)?!1:r}function Q_(e,t,n,o,i){if(!t.source||!t.target)return i(new qe(Ve.EDGE_INVALID,e.id)),!1;if(!n)return i(new qe(Ve.EDGE_NOT_FOUND,e.id)),!1;const{id:r}=e,s=Bo(e,Ov);return ie({},s,{id:o?Of(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})}function Xf(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const s=e[r];if(!Fn(s)){n(new qe(Ve.NODE_INVALID,s?.id)||"[ID UNKNOWN|INDEX "+r+"]");continue}const l=T_(s,t(s.id),s.parentNode);s.parentNode&&(o[s.parentNode]=!0),i[r]=l}for(const r of i){const s=t(r.parentNode)||i.find(l=>l.id===r.parentNode);r.parentNode&&!s&&n(new qe(Ve.NODE_MISSING_PARENT,r.id,r.parentNode)),(r.parentNode||o[r.id])&&(o[r.id]&&(r.isParent=!0),s&&(s.isParent=!0))}return i}function qf(e,t,n,o,i,r){let s=i;const l=o.get(s)||new Map;o.set(s,l.set(n,t)),s=i+"-"+e;const a=o.get(s)||new Map;if(o.set(s,a.set(n,t)),r){s=i+"-"+e+"-"+r;const u=o.get(s)||new Map;o.set(s,u.set(n,t))}}function Cl(e,t,n){e.clear();for(const o of n){const{source:i,target:r,sourceHandle:s=null,targetHandle:l=null}=o,a={edgeId:o.id,source:i,target:r,sourceHandle:s,targetHandle:l},u=i+"-"+s+"--"+r+"-"+l,c=r+"-"+l+"--"+i+"-"+s;qf("source",a,c,e,i,s),qf("target",a,u,e,r,l)}}function jf(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Nl(e,t,n,o,i,r,s,l){const a=[];for(const u of e){const c=yn(u)?u:J_(u,l,i,r);if(!c)continue;const f=n(c.source),d=n(c.target);if(!f||!d){i(new qe(Ve.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!f){i(new qe(Ve.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!d){i(new qe(Ve.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:l,nodes:s,sourceNode:f,targetNode:d})){i(new qe(Ve.EDGE_INVALID,c.id));continue}const h=o(c.id);a.push(ie({},xf(c,h,r),{sourceNode:f,targetNode:d}))}return a}const Zf=Symbol("vueFlow"),Jf=Symbol("nodeId"),Qf=Symbol("nodeRef"),e1=Symbol("edgeId"),t1=Symbol("edgeRef"),Ar=Symbol("slots");function ed(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodeLookup:r,nodeExtent:s,nodeDragThreshold:l,viewport:a,autoPanOnNodeDrag:u,autoPanSpeed:c,nodesDraggable:f,panBy:d,findNode:h,multiSelectionActive:x,nodesSelectionActive:b,selectNodesOnDrag:A,removeSelectedElements:E,addSelectedNodes:D,updateNodePositions:S,emits:O}=Re(),{onStart:B,onDrag:U,onStop:J,onClick:G,el:ee,disabled:te,id:X,selectable:P,dragHandle:oe}=e,m=fn(!1);let T=[],R,I=null,C={x:void 0,y:void 0},k={x:0,y:0},H=null,$=!1,W=!1,ne=0,se=!1;const q=i1(),Y=y=>{let{x:w,y:v}=y;C={x:w,y:v};let p=!1;if(T=T.map(g=>{const _={x:w-g.distance.x,y:v-g.distance.y},{computedPosition:N}=Sl(g,n.value?xr(_,o.value):_,O.error,s.value,g.parentNode?h(g.parentNode):void 0);return p=p||g.position.x!==N.x||g.position.y!==N.y,g.position=N,g}),W=W||p,!!p&&(S(T,!0,!0),m.value=!0,H)){const[g,_]=bl({id:X,dragItems:T,findNode:h});U({event:H,node:g,nodes:_})}},j=()=>{if(!I)return;const[y,w]=Rf(k,I,c.value);if(y!==0||w!==0){var v,p;const g={x:((v=C.x)!=null?v:0)-y/a.value.zoom,y:((p=C.y)!=null?p:0)-w/a.value.zoom};d({x:y,y:w})&&Y(g)}ne=requestAnimationFrame(j)},ce=(y,w)=>{$=!0;const v=h(X);!A.value&&!x.value&&v&&(v.selected||E()),v&&Ee(P)&&A.value&&Ol(v,x.value,D,E,b,!1,w);const p=q(y.sourceEvent);if(C=p,T=L_(r.value,f.value,p,X),T.length){const[g,_]=bl({id:X,dragItems:T,findNode:h});B({event:y.sourceEvent,node:g,nodes:_})}},ve=(y,w)=>{var v;y.sourceEvent.type==="touchmove"&&y.sourceEvent.touches.length>1||(W=!1,l.value===0&&ce(y,w),C=q(y.sourceEvent),I=((v=t.value)==null?void 0:v.getBoundingClientRect())||null,k=Vt(y.sourceEvent,I))},ge=(y,w)=>{const v=q(y.sourceEvent);if(!se&&$&&u.value&&(se=!0,j()),!$){var p,g;const _=v.xSnapped-((p=C.x)!=null?p:0),N=v.ySnapped-((g=C.y)!=null?g:0);Math.sqrt(_*_+N*N)>l.value&&ce(y,w)}(C.x!==v.xSnapped||C.y!==v.ySnapped)&&T.length&&$&&(H=y.sourceEvent,k=Vt(y.sourceEvent,I),Y(v))},be=y=>{let w=!1;if(!$&&!m.value&&!x.value){var v,p;const g=y.sourceEvent,_=q(g),N=_.xSnapped-((v=C.x)!=null?v:0),L=_.ySnapped-((p=C.y)!=null?p:0),F=Math.sqrt(N*N+L*L);F!==0&&F<=l.value&&(G?.(g),w=!0)}if(T.length&&!w){W&&(S(T,!1,!1),W=!1);const[g,_]=bl({id:X,dragItems:T,findNode:h});J({event:y.sourceEvent,node:g,nodes:_})}T=[],m.value=!1,se=!1,$=!1,C={x:void 0,y:void 0},cancelAnimationFrame(ne)};return xe([()=>Ee(te),ee],(y,w,v)=>{let[p,g]=y;if(g){const _=Et(g);p||(R=Ny().on("start",N=>ve(N,g)).on("drag",N=>ge(N,g)).on("end",N=>be(N)).filter(N=>{const L=N.target,F=Ee(oe);return!N.button&&(!i.value||!Hf(L,"."+i.value,g)&&(!F||Hf(L,F,g)))}),_.call(R)),v(()=>{_.on(".drag",null),R&&(R.on("start",null),R.on("drag",null),R.on("end",null))})}}),m}function n1(){return{doubleClick:ae(),click:ae(),mouseEnter:ae(),mouseMove:ae(),mouseLeave:ae(),contextMenu:ae(),updateStart:ae(),update:ae(),updateEnd:ae()}}function o1(e,t){const n=n1();return n.doubleClick.on(o=>{var i,r;t.edgeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.edgeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.edgeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.edgeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.edgeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.edgeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.updateStart.on(o=>{var i,r;t.edgeUpdateStart(o),(r=(i=e.events)==null?void 0:i.updateStart)==null||r.call(i,o)}),n.update.on(o=>{var i,r;t.edgeUpdate(o),(r=(i=e.events)==null?void 0:i.update)==null||r.call(i,o)}),n.updateEnd.on(o=>{var i,r;t.edgeUpdateEnd(o),(r=(i=e.events)==null?void 0:i.updateEnd)==null||r.call(i,o)}),Object.entries(n).reduce((o,i)=>{let[r,s]=i;return o.emit[r]=s.trigger,o.on[r]=s.on,o},{emit:{},on:{}})}function i1(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Re();return i=>{var r,s;const l=(r=(s=o.value)==null?void 0:s.getBoundingClientRect())!=null?r:{left:0,top:0},a=G_(i)?i.sourceEvent:i,{x:u,y:c}=Vt(a,l),f=ii({x:u,y:c},e.value),{x:d,y:h}=n.value?xr(f,t.value):f;return ie({xSnapped:d,ySnapped:h},f)}}function Or(){return!0}function td(e){let{handleId:t,nodeId:n,type:o,isValidConnection:i,edgeUpdaterType:r,onEdgeUpdate:s,onEdgeUpdateEnd:l}=e;const{id:a,vueFlowRef:u,connectionMode:c,connectionRadius:f,connectOnClick:d,connectionClickStartHandle:h,nodesConnectable:x,autoPanOnConnect:b,autoPanSpeed:A,findNode:E,panBy:D,startConnection:S,updateConnection:O,endConnection:B,emits:U,viewport:J,edges:G,nodes:ee,isValidConnection:te,nodeLookup:X}=Re();let P=null,oe=!1,m=null;function T(I){var C;const k=Ee(o)==="target",H=El(I),$=Ef(I.target),W=I.currentTarget;if(W&&(H&&I.button===0||!H)){let ne=function(K){p=Vt(K,y),j=X_(ii(p,J.value,!1,[1,1]),f.value,X.value,N),g||(_(),g=!0);const Z=Gf(K,{handle:j,connectionMode:c.value,fromNodeId:Ee(n),fromHandleId:Ee(t),fromType:k?"target":"source",isValidConnection:Y,doc:$,lib:"vue",flowId:a,nodeLookup:X.value},G.value,ee.value,E,X.value);m=Z.handleDomNode,P=Z.connection,oe=j_(!!j,Z.isValid);const le=ie({},z,{isValid:oe,to:Z.toHandle&&oe?oi({x:Z.toHandle.x,y:Z.toHandle.y},J.value):p,toHandle:Z.toHandle,toPosition:oe&&Z.toHandle?Z.toHandle.position:Al[N.position],toNode:Z.toHandle?X.value.get(Z.toHandle.nodeId):null});if(oe&&j&&z?.toHandle&&le.toHandle&&z.toHandle.type===le.toHandle.type&&z.toHandle.nodeId===le.toHandle.nodeId&&z.toHandle.id===le.toHandle.id&&z.to.x===le.to.x&&z.to.y===le.to.y)return;const _e=j??Z.toHandle;if(O(_e&&oe?oi({x:_e.x,y:_e.y},J.value):p,_e,q_(!!_e,oe)),z=le,!j&&!oe&&!m)return xl(v);P&&P.source!==P.target&&m&&(xl(v),v=m,m.classList.add("connecting","vue-flow__handle-connecting"),m.classList.toggle("valid",!!oe),m.classList.toggle("vue-flow__handle-valid",!!oe))},se=function(K){"touches"in K&&K.touches.length>0||((j||m)&&P&&oe&&(s?s(K,P):U.connect(P)),U.connectEnd(K),r&&l?.(K),xl(v),cancelAnimationFrame(ce),B(K),g=!1,oe=!1,P=null,m=null,$.removeEventListener("mousemove",ne),$.removeEventListener("mouseup",se),$.removeEventListener("touchmove",ne),$.removeEventListener("touchend",se))};const q=E(Ee(n));let Y=Ee(i)||te.value||Or;!Y&&q&&(Y=(k?q.isValidSourcePos:q.isValidTargetPos)||Or);let j,ce=0;const{x:ve,y:ge}=Vt(I),be=Vf(Ee(r),W),y=(C=u.value)==null?void 0:C.getBoundingClientRect();if(!y||!be)return;const w=Kf(Ee(n),be,Ee(t),X.value,c.value);if(!w)return;let v,p=Vt(I,y),g=!1;const _=()=>{if(!b.value)return;const[V,K]=Rf(p,y,A.value);D({x:V,y:K}),ce=requestAnimationFrame(_)},N=ie({},w,{nodeId:Ee(n),type:be,position:w.position}),L=X.value.get(Ee(n)),M={inProgress:!0,isValid:null,from:go(L,N,de.Left,!0),fromHandle:N,fromPosition:N.position,fromNode:L,to:p,toHandle:null,toPosition:Al[N.position],toNode:null};S(ie({nodeId:Ee(n),id:Ee(t),type:be,position:W?.getAttribute("data-handlepos")||de.Top},p),{x:ve-y.left,y:ge-y.top}),U.connectStart({event:I,nodeId:Ee(n),handleId:Ee(t),handleType:be});let z=M;$.addEventListener("mousemove",ne),$.addEventListener("mouseup",se),$.addEventListener("touchmove",ne),$.addEventListener("touchend",se)}}function R(I){var C,k,H;if(!d.value)return;const $=Ee(o)==="target";if(!h.value){U.clickConnectStart({event:I,nodeId:Ee(n),handleId:Ee(t)}),S(ie({nodeId:Ee(n),type:Ee(o),id:Ee(t),position:de.Top},Vt(I)),void 0,!0);return}let W=Ee(i)||te.value||Or;const ne=E(Ee(n));if(!W&&ne&&(W=($?ne.isValidSourcePos:ne.isValidTargetPos)||Or),ne&&(typeof ne.connectable>"u"?x.value:ne.connectable)===!1)return;const se=Ef(I.target),q=Gf(I,{handle:ie({nodeId:Ee(n),id:Ee(t),type:Ee(o),position:de.Top},Vt(I)),connectionMode:c.value,fromNodeId:h.value.nodeId,fromHandleId:(C=h.value.id)!=null?C:null,fromType:h.value.type,isValidConnection:W,doc:se,lib:"vue",flowId:a,nodeLookup:X.value},G.value,ee.value,E,X.value),Y=((k=q.connection)==null?void 0:k.source)===((H=q.connection)==null?void 0:H.target);q.isValid&&q.connection&&!Y&&U.connect(q.connection),U.clickConnectEnd(I),B(I,!0)}return{handlePointerDown:T,handleClick:R}}function r1(){return pt(Jf,"")}function nd(e){var t;const n=(t=e??r1())!=null?t:"",o=pt(Qf,Oe(null)),{findNode:i,edges:r,emits:s}=Re(),l=i(n);return l||s.error(new qe(Ve.NODE_NOT_FOUND,n)),{id:n,nodeEl:o,node:l,parentNode:fe(()=>i(l.parentNode)),connectedEdges:fe(()=>Hn([l],r.value))}}function s1(){return{doubleClick:ae(),click:ae(),mouseEnter:ae(),mouseMove:ae(),mouseLeave:ae(),contextMenu:ae(),dragStart:ae(),drag:ae(),dragStop:ae()}}function l1(e,t){const n=s1();return n.doubleClick.on(o=>{var i,r;t.nodeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.nodeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.nodeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.nodeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.nodeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.nodeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.dragStart.on(o=>{var i,r;t.nodeDragStart(o),(r=(i=e.events)==null?void 0:i.dragStart)==null||r.call(i,o)}),n.drag.on(o=>{var i,r;t.nodeDrag(o),(r=(i=e.events)==null?void 0:i.drag)==null||r.call(i,o)}),n.dragStop.on(o=>{var i,r;t.nodeDragStop(o),(r=(i=e.events)==null?void 0:i.dragStop)==null||r.call(i,o)}),Object.entries(n).reduce((o,i)=>{let[r,s]=i;return o.emit[r]=s.trigger,o.on[r]=s.on,o},{emit:{},on:{}})}function od(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:r,nodesDraggable:s,emits:l}=Re();return function(a,u){u===void 0&&(u=!1);const c=r.value?i.value[0]:5,f=r.value?i.value[1]:5,d=u?4:1,h=a.x*c*d,x=a.y*f*d,b=[];for(const A of e.value)if(A.draggable||s&&typeof A.draggable>"u"){const E={x:A.computedPosition.x+h,y:A.computedPosition.y+x},{position:D}=Sl(A,E,l.error,t.value,A.parentNode?o(A.parentNode):void 0);b.push({id:A.id,position:D,from:A.position,distance:{x:a.x,y:a.y},dimensions:A.dimensions})}n(b,!0,!1)}}const Cr=.1,a1=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function bn(){return li("Viewport not initialized yet."),Promise.resolve(!1)}const u1={zoomIn:bn,zoomOut:bn,zoomTo:bn,fitView:bn,setCenter:bn,fitBounds:bn,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:bn,setTransform:bn,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function c1(e){function t(o,i){return new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?Xo:ur).scaleBy(Tl(e.d3Selection,i?.duration,i?.ease,()=>{r(!0)}),o):r(!1)})}function n(o,i,r,s){return new Promise(l=>{var a;const{x:u,y:c}=Sf({x:-o,y:-i},e.translateExtent),f=co.translate(-u,-c).scale(r);e.d3Selection&&e.d3Zoom?(a=e.d3Zoom)==null||a.interpolate(s?.interpolate==="linear"?Xo:ur).transform(Tl(e.d3Selection,s?.duration,s?.ease,()=>{l(!0)}),f):l(!1)})}return fe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i),zoomOut:i=>t(1/1.2,i),zoomTo:(i,r)=>new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?Xo:ur).scaleTo(Tl(e.d3Selection,r?.duration,r?.ease,()=>{s(!0)}),i):s(!1)}),setViewport:(i,r)=>n(i.x,i.y,i.zoom,r),setTransform:(i,r)=>n(i.x,i.y,i.zoom,r),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:function(r){var s,l,a;r===void 0&&(r={padding:Cr,includeHiddenNodes:!1,duration:0});var u,c;const f=[];for(const A of e.nodes)A.dimensions.width&&A.dimensions.height&&(r?.includeHiddenNodes||!A.hidden)&&(!((u=r.nodes)!=null&&u.length)||(c=r.nodes)!=null&&c.length&&r.nodes.includes(A.id))&&f.push(A);if(!f.length)return Promise.resolve(!1);const d=yl(f),{x:h,y:x,zoom:b}=Mf(d,e.dimensions.width,e.dimensions.height,(s=r.minZoom)!=null?s:e.minZoom,(l=r.maxZoom)!=null?l:e.maxZoom,(a=r.padding)!=null?a:Cr);return n(h,x,b,r)},setCenter:(i,r,s)=>{const l=typeof s?.zoom<"u"?s.zoom:e.maxZoom,a=e.dimensions.width/2-i*l,u=e.dimensions.height/2-r*l;return n(a,u,l,s)},fitBounds:function(r,s){var l;s===void 0&&(s={padding:Cr});const{x:a,y:u,zoom:c}=Mf(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,(l=s.padding)!=null?l:Cr);return n(a,u,c,s)},project:i=>ii(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:r,y:s}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x-r,y:i.y-s};return ii(l,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:r,y:s}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x+r,y:i.y+s};return oi(l,e.viewport)}return{x:0,y:0}}}:u1)}function Tl(e,t,n,o){t===void 0&&(t=0),n===void 0&&(n=a1),o===void 0&&(o=()=>{});const i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function f1(e,t,n){const o=rs(!0);return o.run(()=>{const i=()=>{o.run(()=>{let b,A,E=!!(n.nodes.value.length||n.edges.value.length);b=ro([e.modelValue,()=>{var D,S;return(S=(D=e.modelValue)==null?void 0:D.value)==null?void 0:S.length}],D=>{let[S]=D;S&&Array.isArray(S)&&(A?.pause(),n.setElements(S),!A&&!E&&S.length?E=!0:A?.resume())}),A=ro([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],D=>{let[S,O]=D;var B;(B=e.modelValue)!=null&&B.value&&Array.isArray(e.modelValue.value)&&(b?.pause(),e.modelValue.value=[...S,...O],kt(()=>{b?.resume()}))},{immediate:E}),Ei(()=>{b?.stop(),A?.stop()})})},r=()=>{o.run(()=>{let b,A,E=!!n.nodes.value.length;b=ro([e.nodes,()=>{var D,S;return(S=(D=e.nodes)==null?void 0:D.value)==null?void 0:S.length}],D=>{let[S]=D;S&&Array.isArray(S)&&(A?.pause(),n.setNodes(S),!A&&!E&&S.length?E=!0:A?.resume())}),A=ro([n.nodes,()=>n.nodes.value.length],D=>{let[S]=D;var O;(O=e.nodes)!=null&&O.value&&Array.isArray(e.nodes.value)&&(b?.pause(),e.nodes.value=[...S],kt(()=>{b?.resume()}))},{immediate:E}),Ei(()=>{b?.stop(),A?.stop()})})},s=()=>{o.run(()=>{let b,A,E=!!n.edges.value.length;b=ro([e.edges,()=>{var D,S;return(S=(D=e.edges)==null?void 0:D.value)==null?void 0:S.length}],D=>{let[S]=D;S&&Array.isArray(S)&&(A?.pause(),n.setEdges(S),!A&&!E&&S.length?E=!0:A?.resume())}),A=ro([n.edges,()=>n.edges.value.length],D=>{let[S]=D;var O;(O=e.edges)!=null&&O.value&&Array.isArray(e.edges.value)&&(b?.pause(),e.edges.value=[...S],kt(()=>{b?.resume()}))},{immediate:E}),Ei(()=>{b?.stop(),A?.stop()})})},l=()=>{o.run(()=>{xe(()=>t.maxZoom,()=>{t.maxZoom&&Ke(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{o.run(()=>{xe(()=>t.minZoom,()=>{t.minZoom&&Ke(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{xe(()=>t.translateExtent,()=>{t.translateExtent&&Ke(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{xe(()=>t.nodeExtent,()=>{t.nodeExtent&&Ke(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},f=()=>{o.run(()=>{xe(()=>t.applyDefault,()=>{Ke(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},d=()=>{o.run(()=>{const b=async A=>{let E=A;typeof t.autoConnect=="function"&&(E=await t.autoConnect(A)),E!==!1&&n.addEdges([E])};xe(()=>t.autoConnect,()=>{Ke(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),xe(n.autoConnect,(A,E,D)=>{A?n.onConnect(b):n.hooks.value.connect.off(b),D(()=>{n.hooks.value.connect.off(b)})},{immediate:!0})})},h=()=>{const b=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const A of Object.keys(t)){const E=A;if(!b.includes(E)){const D=Pe(()=>t[E]),S=n[E];Be(S)&&o.run(()=>{xe(D,O=>{Ke(O)&&(S.value=O)},{immediate:!0})})}}};i(),r(),s(),a(),l(),u(),c(),f(),d(),h()}),()=>o.stop()}function d1(){return{edgesChange:ae(),nodesChange:ae(),nodeDoubleClick:ae(),nodeClick:ae(),nodeMouseEnter:ae(),nodeMouseMove:ae(),nodeMouseLeave:ae(),nodeContextMenu:ae(),nodeDragStart:ae(),nodeDrag:ae(),nodeDragStop:ae(),nodesInitialized:ae(),miniMapNodeClick:ae(),miniMapNodeDoubleClick:ae(),miniMapNodeMouseEnter:ae(),miniMapNodeMouseMove:ae(),miniMapNodeMouseLeave:ae(),connect:ae(),connectStart:ae(),connectEnd:ae(),clickConnectStart:ae(),clickConnectEnd:ae(),paneReady:ae(),init:ae(),move:ae(),moveStart:ae(),moveEnd:ae(),selectionDragStart:ae(),selectionDrag:ae(),selectionDragStop:ae(),selectionContextMenu:ae(),selectionStart:ae(),selectionEnd:ae(),viewportChangeStart:ae(),viewportChange:ae(),viewportChangeEnd:ae(),paneScroll:ae(),paneClick:ae(),paneContextMenu:ae(),paneMouseEnter:ae(),paneMouseMove:ae(),paneMouseLeave:ae(),edgeContextMenu:ae(),edgeMouseEnter:ae(),edgeMouseMove:ae(),edgeMouseLeave:ae(),edgeDoubleClick:ae(),edgeClick:ae(),edgeUpdateStart:ae(),edgeUpdate:ae(),edgeUpdateEnd:ae(),updateNodeInternals:ae(),error:ae(e=>li(e.message))}}function h1(e,t){const n=vn();su(()=>{for(const[i,r]of Object.entries(t.value)){const s=l=>{e(i,l)};r.setEmitter(s),zo(r.removeEmitter),r.setHasEmitListeners(()=>o(i)),zo(r.removeHasEmitListeners)}});function o(i){var r;const s=g1(i);return!!((r=n?.vnode.props)==null?void 0:r[s])}}function g1(e){const[t,...n]=e.split(":");return"on"+t.replace(/(?:^|-)(\w)/g,(i,r)=>r.toUpperCase())+(n.length?":"+n.join(":"):"")}function id(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:pl.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:ei.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:$n.Bezier,style:{}},connectionMode:mn.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:si()?"Meta":"Control",zoomActivationKeyCode:si()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:d1(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const p1=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function v1(e,t,n){const o=c1(e),i=v=>{const p=v??[];e.hooks.updateNodeInternals.trigger(p)},r=v=>I_(v,e.nodes,e.edges),s=v=>M_(v,e.nodes,e.edges),l=v=>Hn(v,e.edges),a=v=>{var p;let{id:g,type:_,nodeId:N}=v;var L;const F=g?"-"+_+"-"+g:"-"+_;return Array.from((p=(L=e.connectionLookup.get(""+N+F))==null?void 0:L.values())!=null?p:[])},u=v=>{if(v)return t.value.get(v)},c=v=>{if(v)return n.value.get(v)},f=(v,p,g)=>{var _,N;const L=[];for(const z of v){const V={id:z.id,type:"position",dragging:g,from:z.from};if(p&&(V.position=z.position,z.parentNode)){var F,M;const K=u(z.parentNode);V.position={x:V.position.x-((F=(_=K?.computedPosition)==null?void 0:_.x)!=null?F:0),y:V.position.y-((M=(N=K?.computedPosition)==null?void 0:N.y)!=null?M:0)}}L.push(V)}L?.length&&e.hooks.nodesChange.trigger(L)},d=v=>{if(!e.vueFlowRef)return;const p=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const g=window.getComputedStyle(p),{m22:_}=new window.DOMMatrixReadOnly(g.transform),N=[];for(const L of v){const F=L,M=u(F.id);if(M){const z=br(F.nodeElement);if(!!(z.width&&z.height&&(M.dimensions.width!==z.width||M.dimensions.height!==z.height||F.forceUpdate))){const K=F.nodeElement.getBoundingClientRect();M.dimensions=z,M.handleBounds.source=Yf("source",F.nodeElement,K,_,M.id),M.handleBounds.target=Yf("target",F.nodeElement,K,_,M.id),N.push({id:M.id,type:"dimensions",dimensions:z})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),N.length&&e.hooks.nodesChange.trigger(N)},h=(v,p)=>{const g=new Set,_=new Set;for(const F of v)Fn(F)?g.add(F.id):yn(F)&&_.add(F.id);const N=wn(t.value,g,!0),L=wn(n.value,_);if(e.multiSelectionActive){for(const F of g)N.push(_n(F,p));for(const F of _)L.push(_n(F,p))}N.length&&e.hooks.nodesChange.trigger(N),L.length&&e.hooks.edgesChange.trigger(L)},x=v=>{if(e.multiSelectionActive){const p=v.map(g=>_n(g.id,!0));e.hooks.nodesChange.trigger(p);return}e.hooks.nodesChange.trigger(wn(t.value,new Set(v.map(p=>p.id)),!0)),e.hooks.edgesChange.trigger(wn(n.value))},b=v=>{if(e.multiSelectionActive){const p=v.map(g=>_n(g.id,!0));e.hooks.edgesChange.trigger(p);return}e.hooks.edgesChange.trigger(wn(n.value,new Set(v.map(p=>p.id)))),e.hooks.nodesChange.trigger(wn(t.value,new Set,!0))},A=v=>{h(v,!0)},E=v=>{const g=(v||e.nodes).map(_=>(_.selected=!1,_n(_.id,!1)));e.hooks.nodesChange.trigger(g)},D=v=>{const g=(v||e.edges).map(_=>(_.selected=!1,_n(_.id,!1)));e.hooks.edgesChange.trigger(g)},S=v=>{if(!v||!v.length)return h([],!1);const p=v.reduce((g,_)=>{const N=_n(_.id,!1);return Fn(_)?g.nodes.push(N):g.edges.push(N),g},{nodes:[],edges:[]});p.nodes.length&&e.hooks.nodesChange.trigger(p.nodes),p.edges.length&&e.hooks.edgesChange.trigger(p.edges)},O=v=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([v,e.maxZoom]),e.minZoom=v},B=v=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([e.minZoom,v]),e.maxZoom=v},U=v=>{var p;(p=e.d3Zoom)==null||p.translateExtent(v),e.translateExtent=v},J=v=>{e.nodeExtent=v,i()},G=v=>{var p;(p=e.d3Zoom)==null||p.clickDistance(v)},ee=v=>{e.nodesDraggable=v,e.nodesConnectable=v,e.elementsSelectable=v},te=v=>{const p=v instanceof Function?v(e.nodes):v;!e.initialized&&!p.length||(e.nodes=Xf(p,u,e.hooks.error.trigger))},X=v=>{const p=v instanceof Function?v(e.edges):v;if(!e.initialized&&!p.length)return;const g=Nl(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Cl(e.connectionLookup,n.value,g),e.edges=g},P=v=>{const p=v instanceof Function?v([...e.nodes,...e.edges]):v;!e.initialized&&!p.length||(te(p.filter(Fn)),X(p.filter(yn)))},oe=v=>{let p=v instanceof Function?v(e.nodes):v;p=Array.isArray(p)?p:[p];const g=Xf(p,u,e.hooks.error.trigger),_=[];for(const N of g)_.push(kf(N));_.length&&e.hooks.nodesChange.trigger(_)},m=v=>{let p=v instanceof Function?v(e.edges):v;p=Array.isArray(p)?p:[p];const g=Nl(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),_=[];for(const N of g)_.push(kf(N));_.length&&e.hooks.edgesChange.trigger(_)},T=function(p,g,_){g===void 0&&(g=!0),_===void 0&&(_=!1);const N=p instanceof Function?p(e.nodes):p,L=Array.isArray(N)?N:[N],F=[],M=[];function z(K){const Z=l(K);for(const le of Z)(!Ke(le.deletable)||le.deletable)&&M.push(Lf(le.id,le.source,le.target,le.sourceHandle,le.targetHandle))}function V(K){const Z=[];for(const le of e.nodes)le.parentNode===K&&Z.push(le);if(Z.length){for(const le of Z)F.push($f(le.id));g&&z(Z);for(const le of Z)V(le.id)}}for(const K of L){const Z=typeof K=="string"?u(K):K;Z&&(Ke(Z.deletable)&&!Z.deletable||(F.push($f(Z.id)),g&&z([Z]),_&&V(Z.id)))}M.length&&e.hooks.edgesChange.trigger(M),F.length&&e.hooks.nodesChange.trigger(F)},R=v=>{const p=v instanceof Function?v(e.edges):v,g=Array.isArray(p)?p:[p],_=[];for(const N of g){const L=typeof N=="string"?c(N):N;L&&(Ke(L.deletable)&&!L.deletable||_.push(Lf(typeof N=="string"?N:N.id,L.source,L.target,L.sourceHandle,L.targetHandle)))}e.hooks.edgesChange.trigger(_)},I=function(p,g,_){_===void 0&&(_=!0);const N=c(p.id);if(!N)return!1;const L=e.edges.indexOf(N),F=Q_(p,g,N,_,e.hooks.error.trigger);if(F){const[M]=Nl([F],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((z,V)=>V===L?M:z),Cl(e.connectionLookup,n.value,[M]),M}return!1},C=function(p,g,_){_===void 0&&(_={replace:!1});const N=c(p);if(!N)return;const L=typeof g=="function"?g(N):g;N.data=_.replace?L:ie({},N.data,L)},k=v=>Df(v,e.nodes),H=v=>{const p=Df(v,e.edges);return Cl(e.connectionLookup,n.value,p),p},$=function(p,g,_){_===void 0&&(_={replace:!1});const N=u(p);if(!N)return;const L=typeof g=="function"?g(N):g;_.replace?e.nodes.splice(e.nodes.indexOf(N),1,L):Object.assign(N,L)},W=function(p,g,_){_===void 0&&(_={replace:!1});const N=u(p);if(!N)return;const L=typeof g=="function"?g(N):g;N.data=_.replace?L:ie({},N.data,L)},ne=function(p,g,_){_===void 0&&(_=!1),_?e.connectionClickStartHandle=p:e.connectionStartHandle=p,e.connectionEndHandle=null,e.connectionStatus=null,g&&(e.connectionPosition=g)},se=function(p,g,_){g===void 0&&(g=null),_===void 0&&(_=null),e.connectionStartHandle&&(e.connectionPosition=p,e.connectionEndHandle=g,e.connectionStatus=_)},q=(v,p)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,p?e.connectionClickStartHandle=null:e.connectionStartHandle=null},Y=v=>{const p=N_(v),g=p?null:ni(v)?v:u(v.id);return!p&&!g?[null,null,p]:[p?v:_r(g),g,p]},j=function(p,g,_){g===void 0&&(g=!0),_===void 0&&(_=e.nodes);const[N,L,F]=Y(p);if(!N)return[];const M=[];for(const z of _||e.nodes){if(!F&&(z.id===L.id||!z.computedPosition))continue;const V=_r(z),K=wr(V,N);(g&&K>0||K>=V.width*V.height||K>=Number(N.width)*Number(N.height))&&M.push(z)}return M},ce=function(p,g,_){_===void 0&&(_=!0);const[N]=Y(p);if(!N)return!1;const L=wr(N,g);return _&&L>0||L>=Number(N.width)*Number(N.height)},ve=v=>{const{viewport:p,dimensions:g,d3Zoom:_,d3Selection:N,translateExtent:L}=e;if(!_||!N||!v.x&&!v.y)return!1;const F=co.translate(p.x+v.x,p.y+v.y).scale(p.zoom),M=[[0,0],[g.width,g.height]],z=_.constrain()(F,M,L),V=e.viewport.x!==z.x||e.viewport.y!==z.y||e.viewport.zoom!==z.k;return _.transform(N,z),V},ge=v=>{const p=v instanceof Function?v(e):v,g=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ke(p.defaultEdgeOptions)&&(e.defaultEdgeOptions=p.defaultEdgeOptions);const _=p.modelValue||p.nodes||p.edges?[]:void 0;_&&(p.modelValue&&_.push(...p.modelValue),p.nodes&&_.push(...p.nodes),p.edges&&_.push(...p.edges),P(_));const N=()=>{Ke(p.maxZoom)&&B(p.maxZoom),Ke(p.minZoom)&&O(p.minZoom),Ke(p.translateExtent)&&U(p.translateExtent)};for(const L of Object.keys(p)){const F=L,M=p[F];![...p1,...g].includes(F)&&Ke(M)&&(e[F]=M)}Xs(()=>e.d3Zoom).not.toBeNull().then(N),e.initialized||(e.initialized=!0)};return{updateNodePositions:f,updateNodeDimensions:d,setElements:P,setNodes:te,setEdges:X,addNodes:oe,addEdges:m,removeNodes:T,removeEdges:R,findNode:u,findEdge:c,updateEdge:I,updateEdgeData:C,updateNode:$,updateNodeData:W,applyEdgeChanges:H,applyNodeChanges:k,addSelectedElements:A,addSelectedNodes:x,addSelectedEdges:b,setMinZoom:O,setMaxZoom:B,setTranslateExtent:U,setNodeExtent:J,setPaneClickDistance:G,removeSelectedElements:S,removeSelectedNodes:E,removeSelectedEdges:D,startConnection:ne,updateConnection:se,endConnection:q,setInteractive:ee,setState:ge,getIntersectingNodes:j,getIncomers:r,getOutgoers:s,getConnectedEdges:l,getHandleConnections:a,isNodeIntersecting:ce,panBy:ve,fitView:v=>o.value.fitView(v),zoomIn:v=>o.value.zoomIn(v),zoomOut:v=>o.value.zoomOut(v),zoomTo:(v,p)=>o.value.zoomTo(v,p),setViewport:(v,p)=>o.value.setViewport(v,p),setTransform:(v,p)=>o.value.setTransform(v,p),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(v,p,g)=>o.value.setCenter(v,p,g),fitBounds:(v,p)=>o.value.fitBounds(v,p),project:v=>o.value.project(v),screenToFlowCoordinate:v=>o.value.screenToFlowCoordinate(v),flowToScreenCoordinate:v=>o.value.flowToScreenCoordinate(v),toObject:()=>{const v=[],p=[];for(const g of e.nodes){const _=Bo(g,Cv);v.push(_)}for(const g of e.edges){const _=Bo(g,Nv);p.push(_)}return JSON.parse(JSON.stringify({nodes:v,edges:p,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:v=>new Promise(p=>{const{nodes:g,edges:_,position:N,zoom:L,viewport:F}=v;g&&te(g),_&&X(_);const[M,z]=F?.x&&F?.y?[F.x,F.y]:N??[null,null];if(M&&z){const V=F?.zoom||L||e.viewport.zoom;return Xs(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:M,y:z,zoom:V}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const v=id();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){var p,g,_;const N=co.translate((p=v.defaultViewport.x)!=null?p:0,(g=v.defaultViewport.y)!=null?g:0).scale(Ln((_=v.defaultViewport.zoom)!=null?_:1,v.minZoom,v.maxZoom)),L=e.viewportRef.getBoundingClientRect(),F=[[0,0],[L.width,L.height]],M=e.d3Zoom.constrain()(N,F,v.translateExtent);e.d3Zoom.transform(e.d3Selection,M)}ge(v)},$destroy:()=>{}}}const m1=["data-id","data-handleid","data-nodeid","data-handlepos"],y1={name:"Handle",compatConfig:{MODE:3}},ai=De(ie({},y1,{props:{id:{default:null},type:{},position:{default:()=>de.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,t){let{expose:n}=t;const o=xg(e,["position","connectable","connectableStart","connectableEnd","id"]),i=Pe(()=>{var P;return(P=o.type)!=null?P:"source"}),r=Pe(()=>{var P;return(P=o.isValidConnection)!=null?P:null}),{id:s,connectionStartHandle:l,connectionClickStartHandle:a,connectionEndHandle:u,vueFlowRef:c,nodesConnectable:f,noDragClassName:d,noPanClassName:h}=Re(),{id:x,node:b,nodeEl:A,connectedEdges:E}=nd(),D=Oe(),S=Pe(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),O=Pe(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),B=Pe(()=>{var P,oe,m,T,R,I;return((P=l.value)==null?void 0:P.nodeId)===x&&((oe=l.value)==null?void 0:oe.id)===e.id&&((m=l.value)==null?void 0:m.type)===i.value||((T=u.value)==null?void 0:T.nodeId)===x&&((R=u.value)==null?void 0:R.id)===e.id&&((I=u.value)==null?void 0:I.type)===i.value}),U=Pe(()=>{var P,oe,m;return((P=a.value)==null?void 0:P.nodeId)===x&&((oe=a.value)==null?void 0:oe.id)===e.id&&((m=a.value)==null?void 0:m.type)===i.value}),{handlePointerDown:J,handleClick:G}=td({nodeId:x,handleId:e.id,isValidConnection:r,type:i}),ee=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!E.value.some(P=>{const oe=P[i.value+"Handle"];return P[i.value]!==x?!1:oe?oe===e.id:!0}):typeof e.connectable=="number"?E.value.filter(P=>{const oe=P[i.value+"Handle"];return P[i.value]!==x?!1:oe?oe===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(b,E.value):Ke(e.connectable)?e.connectable:f.value);bt(()=>{var P,oe;if(!b.dimensions.width||!b.dimensions.height)return;const m=(oe=b.handleBounds[i.value])==null?void 0:oe.find($=>$.id===e.id);if(!c.value||m)return;const T=c.value.querySelector(".vue-flow__transformationpane");if(!A.value||!D.value||!T||!e.id)return;const R=A.value.getBoundingClientRect(),I=D.value.getBoundingClientRect(),C=window.getComputedStyle(T),{m22:k}=new window.DOMMatrixReadOnly(C.transform),H=ie({id:e.id,position:e.position,x:(I.left-R.left)/k,y:(I.top-R.top)/k,type:i.value,nodeId:x},br(D.value));b.handleBounds[i.value]=[...(P=b.handleBounds[i.value])!=null?P:[],H]});function te(P){const oe=El(P);ee.value&&S.value&&(oe&&P.button===0||!oe)&&J(P)}function X(P){!x||!a.value&&!S.value||ee.value&&G(P)}return n({handleClick:G,handlePointerDown:J,onClick:X,onPointerDown:te}),(P,oe)=>(re(),he("div",{ref_key:"handle",ref:D,"data-id":ue(s)+"-"+ue(x)+"-"+e.id+"-"+i.value,"data-handleid":e.id,"data-nodeid":ue(x),"data-handlepos":P.position,class:We(["vue-flow__handle",["vue-flow__handle-"+P.position,"vue-flow__handle-"+e.id,ue(d),ue(h),i.value,{connectable:ee.value,connecting:U.value,connectablestart:S.value,connectableend:O.value,connectionindicator:ee.value&&(S.value&&!B.value||O.value&&B.value)}]]),onMousedown:te,onTouchstartPassive:te,onClick:X},[vt(P.$slots,"default",{id:P.id})],42,m1))}})),Nr=function(t){var n;let{sourcePosition:o=de.Bottom,targetPosition:i=de.Top,label:r,connectable:s=!0,isValidTargetPos:l,isValidSourcePos:a,data:u}=t;const c=(n=u.label)!=null?n:r;return[Me(ai,{type:"target",position:i,connectable:s,isValidConnection:l}),typeof c!="string"&&c?Me(c):Me(Le,[c]),Me(ai,{type:"source",position:o,connectable:s,isValidConnection:a})]};Nr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Nr.inheritAttrs=!1,Nr.compatConfig={MODE:3};const _1=Nr,Tr=function(t){var n;let{targetPosition:o=de.Top,label:i,connectable:r=!0,isValidTargetPos:s,data:l}=t;const a=(n=l.label)!=null?n:i;return[Me(ai,{type:"target",position:o,connectable:r,isValidConnection:s}),typeof a!="string"&&a?Me(a):Me(Le,[a])]};Tr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Tr.inheritAttrs=!1,Tr.compatConfig={MODE:3};const w1=Tr,Mr=function(t){var n;let{sourcePosition:o=de.Bottom,label:i,connectable:r=!0,isValidSourcePos:s,data:l}=t;const a=(n=l.label)!=null?n:i;return[typeof a!="string"&&a?Me(a):Me(Le,[a]),Me(ai,{type:"source",position:o,connectable:r,isValidConnection:s})]};Mr.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Mr.inheritAttrs=!1,Mr.compatConfig={MODE:3};const b1=Mr,S1=["transform"],E1=["width","height","x","y","rx","ry"],x1=["y"],A1={name:"EdgeText",compatConfig:{MODE:3}},O1=De(ie({},A1,{props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=Oe({x:0,y:0,width:0,height:0}),n=Oe(null),o=fe(()=>"translate("+(e.x-t.value.width/2)+" "+(e.y-t.value.height/2)+")");bt(i),xe([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const r=n.value.getBBox();(r.width!==t.value.width||r.height!==t.value.height)&&(t.value=r)}return(r,s)=>(re(),he("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(re(),he("rect",{key:0,class:"vue-flow__edge-textbg",width:t.value.width+2*r.labelBgPadding[0]+"px",height:t.value.height+2*r.labelBgPadding[1]+"px",x:-r.labelBgPadding[0],y:-r.labelBgPadding[1],style:Ye(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,E1)):we("",!0),Q("text",Fo(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[vt(r.$slots,"default",{},()=>[typeof r.label!="string"?(re(),Xe(uu(r.label),{key:0})):(re(),he(Le,{key:1},[Lt(pe(r.label),1)],64))])],16,x1)],8,S1))}})),C1=["id","d","marker-end","marker-start"],N1=["d","stroke-width"],T1={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Ir=De(ie({},T1,{props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,t){let{expose:n}=t;const o=Oe(null),i=Oe(null),r=Oe(null),s=As();return n({pathEl:o,interactionEl:i,labelEl:r}),(l,a)=>(re(),he(Le,null,[Q("path",Fo(ue(s),{id:l.id,ref_key:"pathEl",ref:o,d:l.path,class:"vue-flow__edge-path","marker-end":l.markerEnd,"marker-start":l.markerStart}),null,16,C1),l.interactionWidth?(re(),he("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:l.path,"stroke-width":l.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,N1)):we("",!0),l.label&&l.labelX&&l.labelY?(re(),Xe(O1,{key:1,ref_key:"labelEl",ref:r,x:l.labelX,y:l.labelY,label:l.label,"label-show-bg":l.labelShowBg,"label-bg-style":l.labelBgStyle,"label-bg-padding":l.labelBgPadding,"label-bg-border-radius":l.labelBgBorderRadius,"label-style":l.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):we("",!0)],64))}}));function rd(e){let{sourceX:t,sourceY:n,targetX:o,targetY:i}=e;const r=Math.abs(o-t)/2,s=o<t?o+r:o-r,l=Math.abs(i-n)/2,a=i<n?i+l:i-l;return[s,a,r,l]}function sd(e){let{sourceX:t,sourceY:n,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:l,targetControlY:a}=e;const u=t*.125+r*.375+l*.375+o*.125,c=n*.125+s*.375+a*.375+i*.125,f=Math.abs(u-t),d=Math.abs(c-n);return[u,c,f,d]}function Pr(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ld(e){let{pos:t,x1:n,y1:o,x2:i,y2:r,c:s}=e,l,a;switch(t){case de.Left:l=n-Pr(n-i,s),a=o;break;case de.Right:l=n+Pr(i-n,s),a=o;break;case de.Top:l=n,a=o-Pr(o-r,s);break;case de.Bottom:l=n,a=o+Pr(r-o,s);break}return[l,a]}function ad(e){const{sourceX:t,sourceY:n,sourcePosition:o=de.Bottom,targetX:i,targetY:r,targetPosition:s=de.Top,curvature:l=.25}=e,[a,u]=ld({pos:o,x1:t,y1:n,x2:i,y2:r,c:l}),[c,f]=ld({pos:s,x1:i,y1:r,x2:t,y2:n,c:l}),[d,h,x,b]=sd({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:a,sourceControlY:u,targetControlX:c,targetControlY:f});return["M"+t+","+n+" C"+a+","+u+" "+c+","+f+" "+i+","+r,d,h,x,b]}function ud(e){let{pos:t,x1:n,y1:o,x2:i,y2:r}=e,s,l;switch(t){case de.Left:case de.Right:s=.5*(n+i),l=o;break;case de.Top:case de.Bottom:s=n,l=.5*(o+r);break}return[s,l]}function cd(e){const{sourceX:t,sourceY:n,sourcePosition:o=de.Bottom,targetX:i,targetY:r,targetPosition:s=de.Top}=e,[l,a]=ud({pos:o,x1:t,y1:n,x2:i,y2:r}),[u,c]=ud({pos:s,x1:i,y1:r,x2:t,y2:n}),[f,d,h,x]=sd({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return["M"+t+","+n+" C"+l+","+a+" "+u+","+c+" "+i+","+r,f,d,h,x]}const fd={[de.Left]:{x:-1,y:0},[de.Right]:{x:1,y:0},[de.Top]:{x:0,y:-1},[de.Bottom]:{x:0,y:1}};function M1(e){let{source:t,sourcePosition:n=de.Bottom,target:o}=e;return n===de.Left||n===de.Right?t.x<o.x?{x:1,y:0}:{x:-1,y:0}:t.y<o.y?{x:0,y:1}:{x:0,y:-1}}function dd(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function I1(e){let{source:t,sourcePosition:n=de.Bottom,target:o,targetPosition:i=de.Top,center:r,offset:s}=e;const l=fd[n],a=fd[i],u={x:t.x+l.x*s,y:t.y+l.y*s},c={x:o.x+a.x*s,y:o.y+a.y*s},f=M1({source:u,sourcePosition:n,target:c}),d=f.x!==0?"x":"y",h=f[d];let x,b,A;const E={x:0,y:0},D={x:0,y:0},[S,O,B,U]=rd({sourceX:t.x,sourceY:t.y,targetX:o.x,targetY:o.y});if(l[d]*a[d]===-1){var J,G;b=(J=r.x)!=null?J:S,A=(G=r.y)!=null?G:O;const te=[{x:b,y:u.y},{x:b,y:c.y}],X=[{x:u.x,y:A},{x:c.x,y:A}];l[d]===h?x=d==="x"?te:X:x=d==="x"?X:te}else{const te=[{x:u.x,y:c.y}],X=[{x:c.x,y:u.y}];if(d==="x"?x=l.x===h?X:te:x=l.y===h?te:X,n===i){const R=Math.abs(t[d]-o[d]);if(R<=s){const I=Math.min(s-1,s-R);l[d]===h?E[d]=(u[d]>t[d]?-1:1)*I:D[d]=(c[d]>o[d]?-1:1)*I}}if(n!==i){const R=d==="x"?"y":"x",I=l[d]===a[R],C=u[R]>c[R],k=u[R]<c[R];(l[d]===1&&(!I&&C||I&&k)||l[d]!==1&&(!I&&k||I&&C))&&(x=d==="x"?te:X)}const P={x:u.x+E.x,y:u.y+E.y},oe={x:c.x+D.x,y:c.y+D.y},m=Math.max(Math.abs(P.x-x[0].x),Math.abs(oe.x-x[0].x)),T=Math.max(Math.abs(P.y-x[0].y),Math.abs(oe.y-x[0].y));m>=T?(b=(P.x+oe.x)/2,A=x[0].y):(b=x[0].x,A=(P.y+oe.y)/2)}return[[t,{x:u.x+E.x,y:u.y+E.y},...x,{x:c.x+D.x,y:c.y+D.y},o],b,A,B,U]}function P1(e,t,n,o){const i=Math.min(dd(e,t)/2,dd(t,n)/2,o),{x:r,y:s}=t;if(e.x===r&&r===n.x||e.y===s&&s===n.y)return"L"+r+" "+s;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return"L "+(r+i*u)+","+s+"Q "+r+","+s+" "+r+","+(s+i*c)}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return"L "+r+","+(s+i*a)+"Q "+r+","+s+" "+(r+i*l)+","+s}function Rr(e){const{sourceX:t,sourceY:n,sourcePosition:o=de.Bottom,targetX:i,targetY:r,targetPosition:s=de.Top,borderRadius:l=5,centerX:a,centerY:u,offset:c=20}=e,[f,d,h,x,b]=I1({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:r},targetPosition:s,center:{x:a,y:u},offset:c});return[f.reduce((E,D,S)=>{let O;return S>0&&S<f.length-1?O=P1(f[S-1],D,f[S+1],l):O=(S===0?"M":"L")+D.x+" "+D.y,E+=O,E},""),d,h,x,b]}function R1(e){const{sourceX:t,sourceY:n,targetX:o,targetY:i}=e,[r,s,l,a]=rd({sourceX:t,sourceY:n,targetX:o,targetY:i});return["M "+t+","+n+"L "+o+","+i,r,s,l,a]}const D1=De({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,t){let{attrs:n}=t;return()=>{const[o,i,r]=R1(e);return Me(Ir,ie({path:o,labelX:i,labelY:r},n,e))}}}),k1=D1,$1=De({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,t){let{attrs:n}=t;return()=>{var o,i;const[r,s,l]=Rr(ie({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:de.Bottom,targetPosition:(i=e.targetPosition)!=null?i:de.Top}));return Me(Ir,ie({path:r,labelX:s,labelY:l},n,e))}}}),hd=$1,L1=De({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,t){let{attrs:n}=t;return()=>Me(hd,ie({},e,n,{borderRadius:0}))}}),F1=L1,H1=De({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,t){let{attrs:n}=t;return()=>{var o,i;const[r,s,l]=ad(ie({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:de.Bottom,targetPosition:(i=e.targetPosition)!=null?i:de.Top}));return Me(Ir,ie({path:r,labelX:s,labelY:l},n,e))}}}),W1=H1,B1=De({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,t){let{attrs:n}=t;return()=>{var o,i;const[r,s,l]=cd(ie({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:de.Bottom,targetPosition:(i=e.targetPosition)!=null?i:de.Top}));return Me(Ir,ie({path:r,labelX:s,labelY:l},n,e))}}}),z1=B1,G1={input:b1,default:_1,output:w1},V1={default:W1,straight:k1,step:F1,smoothstep:hd,simplebezier:z1};function K1(e,t,n){const o=fe(()=>b=>t.value.get(b)),i=fe(()=>b=>n.value.get(b)),r=fe(()=>{const b=ie({},V1,e.edgeTypes),A=Object.keys(b);for(const E of e.edges)E.type&&!A.includes(E.type)&&(b[E.type]=E.type);return b}),s=fe(()=>{const b=ie({},G1,e.nodeTypes),A=Object.keys(b);for(const E of e.nodes)E.type&&!A.includes(E.type)&&(b[E.type]=E.type);return b}),l=fe(()=>e.onlyRenderVisibleElements?Tf(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=fe(()=>{if(e.onlyRenderVisibleElements){const b=[];for(const A of e.edges){const E=t.value.get(A.source),D=t.value.get(A.target);B_({sourcePos:E.computedPosition||{x:0,y:0},targetPos:D.computedPosition||{x:0,y:0},sourceWidth:E.dimensions.width,sourceHeight:E.dimensions.height,targetWidth:D.dimensions.width,targetHeight:D.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&b.push(A)}return b}return e.edges}),u=fe(()=>[...l.value,...a.value]),c=fe(()=>{const b=[];for(const A of e.nodes)A.selected&&b.push(A);return b}),f=fe(()=>{const b=[];for(const A of e.edges)A.selected&&b.push(A);return b}),d=fe(()=>[...c.value,...f.value]),h=fe(()=>{const b=[];for(const A of e.nodes)A.dimensions.width&&A.dimensions.height&&A.handleBounds!==void 0&&b.push(A);return b}),x=fe(()=>l.value.length>0&&h.value.length===l.value.length);return{getNode:o,getEdge:i,getElements:u,getEdgeTypes:r,getNodeTypes:s,getEdges:a,getNodes:l,getSelectedElements:d,getSelectedNodes:c,getSelectedEdges:f,getNodesInitialized:h,areNodesInitialized:x}}class Gn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t,n;const o=(n=vn())==null?void 0:n.appContext.app,i=(t=o?.config.globalProperties.$vueFlowStorage)!=null?t:Gn.instance;return Gn.instance=i??new Gn,o&&(o.config.globalProperties.$vueFlowStorage=Gn.instance),Gn.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=id(),i=Co(o),r={};for(const[d,h]of Object.entries(i.hooks)){const x="on"+(d.charAt(0).toUpperCase()+d.slice(1));r[x]=h.on}const s={};for(const[d,h]of Object.entries(i.hooks))s[d]=h.trigger;const l=fe(()=>{const d=new Map;for(const h of i.nodes)d.set(h.id,h);return d}),a=fe(()=>{const d=new Map;for(const h of i.edges)d.set(h.id,h);return d}),u=K1(i,l,a),c=v1(i,l,a);c.setState(ie({},i,n));const f=ie({},r,u,c,Lv(i),{nodeLookup:l,edgeLookup:a,emits:s,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}});return this.set(t,f),f}getId(){return"vue-flow-"+this.currentId++}}function Re(e){const t=Gn.getInstance(),n=ss(),o=typeof e=="object",i=o?e:{id:e},r=i.id,s=r??n?.vueFlowId;let l;if(n){const a=pt(Zf,null);typeof a<"u"&&a!==null&&(!s||a.id===s)&&(l=a)}if(l||s&&(l=t.get(s)),!l||s&&l.id!==s){const a=r??t.getId(),u=t.create(a,i);l=u,(n??rs(!0)).run(()=>{xe(u.applyDefault,(f,d,h)=>{const x=A=>{u.applyNodeChanges(A)},b=A=>{u.applyEdgeChanges(A)};f?(u.onNodesChange(x),u.onEdgesChange(b)):(u.hooks.value.nodesChange.off(x),u.hooks.value.edgesChange.off(b)),h(()=>{u.hooks.value.nodesChange.off(x),u.hooks.value.edgesChange.off(b)})},{immediate:!0}),zo(()=>{if(l){const f=t.get(l.id);f?f.$destroy():li("No store instance found for id "+l.id+" in storage.")}})})}else o&&l.setState(i);if(n&&(pn(Zf,l),n.vueFlowId=l.id),o){const a=vn();a?.type.name!=="VueFlow"&&l.emits.error(new qe(Ve.USEVUEFLOW_OPTIONS))}return l}function U1(e){const{emits:t,dimensions:n}=Re();let o;bt(()=>{const i=()=>{var r,s,l;if(!e.value||!((r=(l=(s=e.value).checkVisibility)==null?void 0:l.call(s))==null||r))return;const a=br(e.value);(a.width===0||a.height===0)&&t.error(new qe(Ve.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:a.width||500,height:a.height||500}};i(),window.addEventListener("resize",i),e.value&&(o=new ResizeObserver(()=>i()),o.observe(e.value)),Ss(()=>{window.removeEventListener("resize",i),o&&e.value&&o.unobserve(e.value)})})}const Y1={name:"UserSelection",compatConfig:{MODE:3}},X1=De(ie({},Y1,{props:{userSelectionRect:{}},setup(e){return(t,n)=>(re(),he("div",{class:"vue-flow__selection vue-flow__container",style:Ye({width:t.userSelectionRect.width+"px",height:t.userSelectionRect.height+"px",transform:"translate("+t.userSelectionRect.x+"px, "+t.userSelectionRect.y+"px)"})},null,4))}})),q1=["tabIndex"],j1={name:"NodesSelection",compatConfig:{MODE:3}},Z1=De(ie({},j1,{setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:r,userSelectionActive:s}=Re(),l=od(),a=Oe(null),u=ed({el:a,onStart(x){t.selectionDragStart(x),t.nodeDragStart(x)},onDrag(x){t.selectionDrag(x),t.nodeDrag(x)},onStop(x){t.selectionDragStop(x),t.nodeDragStop(x)}});bt(()=>{var x;r.value||(x=a.value)==null||x.focus({preventScroll:!0})});const c=fe(()=>yl(o.value)),f=fe(()=>({width:c.value.width+"px",height:c.value.height+"px",top:c.value.y+"px",left:c.value.x+"px"}));function d(x){t.selectionContextMenu({event:x,nodes:o.value})}function h(x){r.value||fo[x.key]&&(x.preventDefault(),l({x:fo[x.key].x,y:fo[x.key].y},x.shiftKey))}return(x,b)=>!ue(s)&&c.value.width&&c.value.height?(re(),he("div",{key:0,class:We(["vue-flow__nodesselection vue-flow__container",ue(i)]),style:Ye({transform:"translate("+ue(n).x+"px,"+ue(n).y+"px) scale("+ue(n).zoom+")"})},[Q("div",{ref_key:"el",ref:a,class:We([{dragging:ue(u)},"vue-flow__nodesselection-rect"]),style:Ye(f.value),tabIndex:ue(r)?void 0:-1,onContextmenu:d,onKeydown:h},null,46,q1)],6)):we("",!0)}}));function J1(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Q1={name:"Pane",compatConfig:{MODE:3}},ew=De(ie({},Q1,{props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:i,userSelectionActive:r,removeSelectedElements:s,userSelectionRect:l,elementsSelectable:a,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:f,removeNodes:d,removeEdges:h,selectionMode:x,deleteKeyCode:b,multiSelectionKeyCode:A,multiSelectionActive:E,edgeLookup:D,nodeLookup:S,connectionLookup:O,defaultEdgeOptions:B,connectionStartHandle:U,panOnDrag:J}=Re(),G=fn(null),ee=fn(new Set),te=fn(new Set),X=fn(null),P=Pe(()=>a.value&&(e.isSelecting||r.value)),oe=Pe(()=>U.value!==null);let m=!1,T=!1;const R=ti(b,{actInsideInputWithModifier:!1}),I=ti(A);xe(R,q=>{q&&(d(f.value),h(c.value),u.value=!1)}),xe(I,q=>{E.value=q});function C(q,Y){return j=>{j.target===Y&&q?.(j)}}function k(q){if(m||oe.value){m=!1;return}i.paneClick(q),s(),u.value=!1}function H(q){var Y;if(Array.isArray(J.value)&&((Y=J.value)!=null&&Y.includes(2))){q.preventDefault();return}i.paneContextMenu(q)}function $(q){i.paneScroll(q)}function W(q){var Y,j,ce,ve;if(X.value=(Y=(j=t.value)==null?void 0:j.getBoundingClientRect())!=null?Y:null,!a.value||!e.isSelecting||q.button!==0||q.target!==G.value||!X.value)return;(ve=(ce=q.target)==null?void 0:ce.setPointerCapture)==null||ve.call(ce,q.pointerId);const{x:ge,y:be}=J1(q,X.value);T=!0,m=!1,s(),l.value={width:0,height:0,startX:ge,startY:be,x:ge,y:be},i.selectionStart(q)}function ne(q){var Y,j;if(!X.value||!l.value)return;m=!0;const{x:ce,y:ve}=Vt(q,X.value),{startX:ge=0,startY:be=0}=l.value,y={startX:ge,startY:be,x:ce<ge?ce:ge,y:ve<be?ve:be,width:Math.abs(ce-ge),height:Math.abs(ve-be)},w=ee.value,v=te.value;ee.value=new Set(Tf(n.value,y,o.value,x.value===pl.Partial,!0).map(_=>_.id)),te.value=new Set;const p=(Y=(j=B.value)==null?void 0:j.selectable)!=null?Y:!0;for(const _ of ee.value){const N=O.value.get(_);if(N)for(const{edgeId:L}of N.values()){var g;const F=D.value.get(L);F&&((g=F.selectable)!=null?g:p)&&te.value.add(L)}}if(!jf(w,ee.value)){const _=wn(S.value,ee.value,!0);i.nodesChange(_)}if(!jf(v,te.value)){const _=wn(D.value,te.value);i.edgesChange(_)}l.value=y,r.value=!0,u.value=!1}function se(q){var Y;q.button!==0||!T||((Y=q.target)==null||Y.releasePointerCapture(q.pointerId),!r.value&&l.value&&q.target===G.value&&k(q),r.value=!1,l.value=null,u.value=ee.value.size>0,i.selectionEnd(q),e.selectionKeyPressed&&(m=!1),T=!1)}return(q,Y)=>(re(),he("div",{ref_key:"container",ref:G,class:We(["vue-flow__pane vue-flow__container",{selection:q.isSelecting}]),onClick:Y[0]||(Y[0]=j=>P.value?void 0:C(k,G.value)(j)),onContextmenu:Y[1]||(Y[1]=j=>C(H,G.value)(j)),onWheelPassive:Y[2]||(Y[2]=j=>C($,G.value)(j)),onPointerenter:Y[3]||(Y[3]=j=>P.value?void 0:ue(i).paneMouseEnter(j)),onPointerdown:Y[4]||(Y[4]=j=>P.value?W(j):ue(i).paneMouseMove(j)),onPointermove:Y[5]||(Y[5]=j=>P.value?ne(j):ue(i).paneMouseMove(j)),onPointerup:Y[6]||(Y[6]=j=>P.value?se(j):void 0),onPointerleave:Y[7]||(Y[7]=j=>ue(i).paneMouseLeave(j))},[vt(q.$slots,"default"),ue(r)&&ue(l)?(re(),Xe(X1,{key:0,"user-selection-rect":ue(l)},null,8,["user-selection-rect"])):we("",!0),ue(u)&&ue(f).length?(re(),Xe(Z1,{key:1})):we("",!0)],34))}})),tw={name:"Transform",compatConfig:{MODE:3}},nw=De(ie({},tw,{setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Re(),i=fe(()=>n.value?!o.value:!1),r=fe(()=>"translate("+t.value.x+"px,"+t.value.y+"px) scale("+t.value.zoom+")");return(s,l)=>(re(),he("div",{class:"vue-flow__transformationpane vue-flow__container",style:Ye({transform:r.value,opacity:i.value?0:void 0})},[vt(s.$slots,"default")],4))}})),ow={name:"Viewport",compatConfig:{MODE:3}},iw=De(ie({},ow,{setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:r,selectionKeyCode:s,panActivationKeyCode:l,panOnScroll:a,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:f,zoomOnDoubleClick:d,zoomOnPinch:h,zoomOnScroll:x,preventScrolling:b,noWheelClassName:A,noPanClassName:E,emits:D,connectionStartHandle:S,userSelectionActive:O,paneDragging:B,d3Zoom:U,d3Selection:J,d3ZoomHandler:G,viewport:ee,viewportRef:te,paneClickDistance:X}=Re();U1(te);const P=fn(!1),oe=fn(!1);let m=null,T=!1,R=0,I={x:0,y:0,zoom:0};const C=ti(l),k=ti(s),H=ti(r),$=Pe(()=>(!k.value||k.value&&s.value===!0)&&(C.value||f.value)),W=Pe(()=>C.value||a.value),ne=Pe(()=>s.value===!0&&$.value!==!0),se=Pe(()=>k.value&&s.value!==!0||O.value||ne.value),q=Pe(()=>S.value!==null);bt(()=>{var ge,be,y;if(!te.value){li("Viewport element is missing");return}const w=te.value,v=w.getBoundingClientRect(),p=b_().clickDistance(X.value).scaleExtent([t.value,n.value]).translateExtent(i.value),g=Et(w).call(p),_=g.on("wheel.zoom"),N=co.translate((ge=o.value.x)!=null?ge:0,(be=o.value.y)!=null?be:0).scale(Ln((y=o.value.zoom)!=null?y:1,t.value,n.value)),L=[[0,0],[v.width,v.height]],F=p.constrain()(N,L,i.value);p.transform(g,F),p.wheelDelta(_l),U.value=p,J.value=g,G.value=_,ee.value={x:F.x,y:F.y,zoom:F.k},p.on("start",M=>{var z;if(!M.sourceEvent)return null;R=M.sourceEvent.button,P.value=!0;const V=ce(M.transform);((z=M.sourceEvent)==null?void 0:z.type)==="mousedown"&&(B.value=!0),I=V,D.viewportChangeStart(V),D.moveStart({event:M,flowTransform:V})}),p.on("end",M=>{if(!M.sourceEvent)return null;if(P.value=!1,B.value=!1,Y($.value,R??0)&&!T&&D.paneContextMenu(M.sourceEvent),T=!1,j(I,M.transform)){const z=ce(M.transform);I=z,D.viewportChangeEnd(z),D.moveEnd({event:M,flowTransform:z})}}),p.filter(M=>{var z;const V=H.value||x.value,K=h.value&&M.ctrlKey,Z=M.button,le=M.type==="wheel";if(Z===1&&M.type==="mousedown"&&(ve(M,"vue-flow__node")||ve(M,"vue-flow__edge")))return!0;if(!$.value&&!V&&!W.value&&!d.value&&!h.value||O.value||q.value&&!le||!d.value&&M.type==="dblclick"||ve(M,A.value)&&le||ve(M,E.value)&&(!le||W.value&&le&&!H.value)||!h.value&&M.ctrlKey&&le||!V&&!W.value&&!K&&le)return!1;if(!h&&M.type==="touchstart"&&((z=M.touches)==null?void 0:z.length)>1)return M.preventDefault(),!1;if(!$.value&&(M.type==="mousedown"||M.type==="touchstart")||ne.value&&Array.isArray(f.value)&&f.value.includes(0)&&Z===0||Array.isArray(f.value)&&!f.value.includes(Z)&&(M.type==="mousedown"||M.type==="touchstart"))return!1;const _e=Array.isArray(f.value)&&f.value.includes(Z)||s.value===!0&&Array.isArray(f.value)&&!f.value.includes(0)||!Z||Z<=1;return(!M.ctrlKey||C.value||le)&&_e}),xe([O,$],()=>{O.value&&!P.value?p.on("zoom",null):O.value||p.on("zoom",M=>{ee.value={x:M.transform.x,y:M.transform.y,zoom:M.transform.k};const z=ce(M.transform);T=Y($.value,R??0),D.viewportChange(z),D.move({event:M,flowTransform:z})})},{immediate:!0}),xe([O,W,u,H,h,b,A],()=>{W.value&&!H.value&&!O.value?g.on("wheel.zoom",M=>{if(ve(M,A.value))return!1;const z=H.value||x.value,V=h.value&&M.ctrlKey;if(!(!b.value||W.value||z||V))return!1;M.preventDefault(),M.stopImmediatePropagation();const Z=g.property("__zoom").k||1,le=si();if(!C.value&&M.ctrlKey&&h.value&&le){const ht=Wt(M),gt=_l(M),An=Z*2**gt;p.scaleTo(g,An,ht,M);return}const _e=M.deltaMode===1?20:1;let Se=u.value===ei.Vertical?0:M.deltaX*_e,Fe=u.value===ei.Horizontal?0:M.deltaY*_e;!le&&M.shiftKey&&u.value!==ei.Vertical&&!Se&&Fe&&(Se=Fe,Fe=0),p.translateBy(g,-(Se/Z)*c.value,-(Fe/Z)*c.value);const Ge=ce(g.property("__zoom"));m&&clearTimeout(m),oe.value?(D.move({event:M,flowTransform:Ge}),D.viewportChange(Ge),m=setTimeout(()=>{D.moveEnd({event:M,flowTransform:Ge}),D.viewportChangeEnd(Ge),oe.value=!1},150)):(oe.value=!0,D.moveStart({event:M,flowTransform:Ge}),D.viewportChangeStart(Ge))},{passive:!1}):typeof _<"u"&&g.on("wheel.zoom",function(M,z){const V=!b.value&&M.type==="wheel"&&!M.ctrlKey,K=H.value||x.value,Z=h.value&&M.ctrlKey;if(!K&&!a.value&&!Z&&M.type==="wheel"||V||ve(M,A.value))return null;M.preventDefault(),_.call(this,M,z)},{passive:!1})},{immediate:!0})});function Y(ge,be){return be===2&&Array.isArray(ge)&&ge.includes(2)}function j(ge,be){return ge.x!==be.x&&!Number.isNaN(be.x)||ge.y!==be.y&&!Number.isNaN(be.y)||ge.zoom!==be.k&&!Number.isNaN(be.k)}function ce(ge){return{x:ge.x,y:ge.y,zoom:ge.k}}function ve(ge,be){return ge.target.closest("."+be)}return(ge,be)=>(re(),he("div",{ref_key:"viewportRef",ref:te,class:"vue-flow__viewport vue-flow__container"},[Ce(ew,{"is-selecting":se.value,"selection-key-pressed":ue(k),class:We({connecting:q.value,dragging:ue(B),draggable:ue(f)===!0||Array.isArray(ue(f))&&ue(f).includes(0)})},{default:gn(()=>[Ce(nw,null,{default:gn(()=>[vt(ge.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}})),rw=["id"],sw=["id"],lw=["id"],aw={name:"A11yDescriptions",compatConfig:{MODE:3}},uw=De(ie({},aw,{setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Re();return(i,r)=>(re(),he(Le,null,[Q("div",{id:ue(_f)+"-"+ue(t),style:{display:"none"}}," Press enter or space to select a node. "+pe(ue(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,rw),Q("div",{id:ue(wf)+"-"+ue(t),style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,sw),ue(n)?we("",!0):(re(),he("div",{key:0,id:ue(C_)+"-"+ue(t),"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},pe(ue(o)),9,lw))],64))}}));function cw(){const e=Re();xe(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function fw(e,t,n){return n===de.Left?e-t:n===de.Right?e+t:e}function dw(e,t,n){return n===de.Top?e-t:n===de.Bottom?e+t:e}const Ml=function(t){let{radius:n=10,centerX:o=0,centerY:i=0,position:r=de.Top,type:s}=t;return Me("circle",{class:"vue-flow__edgeupdater vue-flow__edgeupdater-"+s,cx:fw(o,n,r),cy:dw(i,n,r),r:n,stroke:"transparent",fill:"transparent"})};Ml.props=["radius","centerX","centerY","position","type"],Ml.compatConfig={MODE:3};const gd=Ml,hw=De({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:r,nodesSelectionActive:s,noPanClassName:l,getEdgeTypes:a,removeSelectedEdges:u,findEdge:c,findNode:f,isValidConnection:d,multiSelectionActive:h,disableKeyboardA11y:x,elementsSelectable:b,edgesUpdatable:A,edgesFocusable:E,hooks:D}=Re(),S=fe(()=>c(e.id)),{emit:O,on:B}=o1(S.value,r),U=pt(Ar),J=vn(),G=Oe(!1),ee=Oe(!1),te=Oe(""),X=Oe(null),P=Oe("source"),oe=Oe(null),m=Pe(()=>typeof S.value.selectable>"u"?b.value:S.value.selectable),T=Pe(()=>typeof S.value.updatable>"u"?A.value:S.value.updatable),R=Pe(()=>typeof S.value.focusable>"u"?E.value:S.value.focusable);pn(e1,e.id),pn(t1,oe);const I=fe(()=>S.value.class instanceof Function?S.value.class(S.value):S.value.class),C=fe(()=>S.value.style instanceof Function?S.value.style(S.value):S.value.style),k=fe(()=>{var p;const g=S.value.type||"default",_=U?.["edge-"+g];if(_)return _;let N=(p=S.value.template)!=null?p:a.value[g];if(typeof N=="string"&&J){const L=Object.keys(J.appContext.components);L&&L.includes(g)&&(N=$t(g,!1))}return N&&typeof N!="string"?N:(r.error(new qe(Ve.EDGE_TYPE_MISSING,N)),!1)}),{handlePointerDown:H}=td({nodeId:te,handleId:X,type:P,isValidConnection:d,edgeUpdaterType:P,onEdgeUpdate:ne,onEdgeUpdateEnd:se});return()=>{var p;const g=f(S.value.source),_=f(S.value.target),N="pathOptions"in S.value?S.value.pathOptions:{};if(!g&&!_)return r.error(new qe(Ve.EDGE_SOURCE_TARGET_MISSING,S.value.id,S.value.source,S.value.target)),null;if(!g)return r.error(new qe(Ve.EDGE_SOURCE_MISSING,S.value.id,S.value.source)),null;if(!_)return r.error(new qe(Ve.EDGE_TARGET_MISSING,S.value.id,S.value.target)),null;if(!S.value||S.value.hidden||g.hidden||_.hidden)return null;let L;o.value===mn.Strict?L=g.handleBounds.source:L=[...g.handleBounds.source||[],...g.handleBounds.target||[]];const F=Bf(L,S.value.sourceHandle);let M;o.value===mn.Strict?M=_.handleBounds.target:M=[..._.handleBounds.target||[],..._.handleBounds.source||[]];const z=Bf(M,S.value.targetHandle),V=F?.position||de.Bottom,K=z?.position||de.Top,{x:Z,y:le}=go(g,F,V),{x:_e,y:Se}=go(_,z,K);return S.value.sourceX=Z,S.value.sourceY=le,S.value.targetX=_e,S.value.targetY=Se,Me("g",ie({ref:oe,key:e.id,"data-id":e.id,class:["vue-flow__edge","vue-flow__edge-"+(k.value===!1?"default":S.value.type||"default"),l.value,I.value,{updating:G.value,selected:S.value.selected,animated:S.value.animated,inactive:!m.value&&!D.value.edgeClick.hasListeners()}],tabIndex:R.value?0:void 0,"aria-label":S.value.ariaLabel===null?void 0:(p=S.value.ariaLabel)!=null?p:"Edge from "+S.value.source+" to "+S.value.target,"aria-describedby":R.value?wf+"-"+t:void 0,"aria-roledescription":"edge",role:R.value?"group":"img"},S.value.domAttributes,{onClick:Y,onContextmenu:j,onDblclick:ce,onMouseenter:ve,onMousemove:ge,onMouseleave:be,onKeyDown:R.value?v:void 0}),[ee.value?null:Me(k.value===!1?a.value.default:k.value,ie({id:e.id,sourceNode:g,targetNode:_,source:S.value.source,target:S.value.target,type:S.value.type,updatable:T.value,selected:S.value.selected,animated:S.value.animated,label:S.value.label,labelStyle:S.value.labelStyle,labelShowBg:S.value.labelShowBg,labelBgStyle:S.value.labelBgStyle,labelBgPadding:S.value.labelBgPadding,labelBgBorderRadius:S.value.labelBgBorderRadius,data:S.value.data,events:ie({},S.value.events,B),style:C.value,markerStart:"url('#"+ri(S.value.markerStart,t)+"')",markerEnd:"url('#"+ri(S.value.markerEnd,t)+"')",sourcePosition:V,targetPosition:K,sourceX:Z,sourceY:le,targetX:_e,targetY:Se,sourceHandleId:S.value.sourceHandle,targetHandleId:S.value.targetHandle,interactionWidth:S.value.interactionWidth},N)),[T.value==="source"||T.value===!0?[Me("g",{onMousedown:y,onMouseenter:$,onMouseout:W},Me(gd,{position:V,centerX:Z,centerY:le,radius:i.value,type:"source","data-type":"source"}))]:null,T.value==="target"||T.value===!0?[Me("g",{onMousedown:w,onMouseenter:$,onMouseout:W},Me(gd,{position:K,centerX:_e,centerY:Se,radius:i.value,type:"target","data-type":"target"}))]:null]])};function $(){G.value=!0}function W(){G.value=!1}function ne(p,g){O.update({event:p,edge:S.value,connection:g})}function se(p){O.updateEnd({event:p,edge:S.value}),ee.value=!1}function q(p,g){var _;p.button===0&&(ee.value=!0,te.value=g?S.value.target:S.value.source,X.value=(_=g?S.value.targetHandle:S.value.sourceHandle)!=null?_:null,P.value=g?"target":"source",O.updateStart({event:p,edge:S.value}),H(p))}function Y(p){var g;const _={event:p,edge:S.value};m.value&&(s.value=!1,S.value.selected&&h.value?(u([S.value]),(g=oe.value)==null||g.blur()):n([S.value])),O.click(_)}function j(p){O.contextMenu({event:p,edge:S.value})}function ce(p){O.doubleClick({event:p,edge:S.value})}function ve(p){O.mouseEnter({event:p,edge:S.value})}function ge(p){O.mouseMove({event:p,edge:S.value})}function be(p){O.mouseLeave({event:p,edge:S.value})}function y(p){q(p,!0)}function w(p){q(p,!1)}function v(p){var g;!x.value&&bf.includes(p.key)&&m.value&&(p.key==="Escape"?((g=oe.value)==null||g.blur(),u([c(e.id)])):n([c(e.id)]))}}}),gw=hw,pw=De({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:r,connectionLineType:s,connectionLineStyle:l,connectionLineOptions:a,connectionStatus:u,viewport:c,findNode:f}=Re(),d=(e=pt(Ar))==null?void 0:e["connection-line"],h=fe(()=>{var D;return f((D=o.value)==null?void 0:D.nodeId)}),x=fe(()=>{var D,S;return(D=f((S=i.value)==null?void 0:S.nodeId))!=null?D:null}),b=fe(()=>({x:(r.value.x-c.value.x)/c.value.zoom,y:(r.value.y-c.value.y)/c.value.zoom})),A=fe(()=>a.value.markerStart?"url(#"+ri(a.value.markerStart,t)+")":""),E=fe(()=>a.value.markerEnd?"url(#"+ri(a.value.markerEnd,t)+")":"");return()=>{var D,S,O,B,U,J,G,ee,te;if(!h.value||!o.value)return null;const X=o.value.id,P=o.value.type,oe=h.value.handleBounds;let m=(D=oe?.[P])!=null?D:[];if(n.value===mn.Loose){var T;const j=(T=oe?.[P==="source"?"target":"source"])!=null?T:[];m=[...m,...j]}if(!m)return null;const R=(S=X?m.find(j=>j.id===X):m[0])!=null?S:null,I=(O=R?.position)!=null?O:de.Top,{x:C,y:k}=go(h.value,R,I);let H=null;if(x.value)if(n.value===mn.Strict)H=((G=x.value.handleBounds[P==="source"?"target":"source"])==null?void 0:G.find(j=>{var ce;return j.id===((ce=i.value)==null?void 0:ce.id)}))||null;else{var $,W;H=((ee=[...($=x.value.handleBounds.source)!=null?$:[],...(W=x.value.handleBounds.target)!=null?W:[]])==null?void 0:ee.find(j=>{var ce;return j.id===((ce=i.value)==null?void 0:ce.id)}))||null}const ne=(B=(te=i.value)==null?void 0:te.position)!=null?B:I?Al[I]:null;if(!I||!ne)return null;const se=(U=(J=s.value)!=null?J:a.value.type)!=null?U:$n.Bezier;let q="";const Y={sourceX:C,sourceY:k,sourcePosition:I,targetX:b.value.x,targetY:b.value.y,targetPosition:ne};return se===$n.Bezier?[q]=ad(Y):se===$n.Step?[q]=Rr(ie({},Y,{borderRadius:0})):se===$n.SmoothStep?[q]=Rr(Y):se===$n.SimpleBezier?[q]=cd(Y):q="M"+C+","+k+" "+b.value.x+","+b.value.y,Me("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Me("g",{class:"vue-flow__connection"},d?Me(d,{sourceX:C,sourceY:k,sourcePosition:I,targetX:b.value.x,targetY:b.value.y,targetPosition:ne,sourceNode:h.value,sourceHandle:R,targetNode:x.value,targetHandle:H,markerEnd:E.value,markerStart:A.value,connectionStatus:u.value}):Me("path",{d:q,class:[a.value.class,u.value,"vue-flow__connection-path"],style:ie({},l.value,a.value.style),"marker-end":E.value,"marker-start":A.value})))}}}),vw=pw,mw=["id","markerWidth","markerHeight","markerUnits","orient"],yw={name:"MarkerType",compatConfig:{MODE:3}},_w=De(ie({},yw,{props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(re(),he("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:""+t.width,markerHeight:""+t.height,markerUnits:t.markerUnits,orient:t.orient},[t.type===ue(vl).ArrowClosed?(re(),he("polyline",{key:0,style:Ye({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):we("",!0),t.type===ue(vl).Arrow?(re(),he("polyline",{key:1,style:Ye({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):we("",!0)],8,mw))}})),ww={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},bw={name:"MarkerDefinitions",compatConfig:{MODE:3}},Sw=De(ie({},bw,{setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=Re(),r=fe(()=>{const s=new Set,l=[],a=u=>{if(u){const c=ri(u,t);s.has(c)||(typeof u=="object"?l.push(ie({},u,{id:c,color:u.color||i.value})):l.push({id:c,color:i.value,type:u}),s.add(c))}};for(const u of[o.value.markerEnd,o.value.markerStart])a(u);for(const u of n.value)for(const c of[u.markerStart,u.markerEnd])a(c);return l.sort((u,c)=>u.id.localeCompare(c.id))});return(s,l)=>(re(),he("svg",ww,[Q("defs",null,[(re(!0),he(Le,null,Jn(r.value,a=>(re(),Xe(_w,{id:a.id,key:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,"stroke-width":a.strokeWidth,orient:a.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}})),Ew={name:"Edges",compatConfig:{MODE:3}},xw=De(ie({},Ew,{setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Re();return(i,r)=>(re(),he(Le,null,[Ce(Sw),(re(!0),he(Le,null,Jn(ue(n),s=>(re(),he("svg",{key:s.id,class:"vue-flow__edges vue-flow__container",style:Ye({zIndex:ue(z_)(s,ue(t),ue(o))})},[Ce(ue(gw),{id:s.id},null,8,["id"])],4))),128)),Ce(ue(vw))],64))}})),Aw=De({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:r,emits:s,removeSelectedNodes:l,addSelectedNodes:a,updateNodeDimensions:u,onUpdateNodeInternals:c,getNodeTypes:f,nodeExtent:d,elevateNodesOnSelect:h,disableKeyboardA11y:x,ariaLiveMessage:b,snapToGrid:A,snapGrid:E,nodeDragThreshold:D,nodesDraggable:S,elementsSelectable:O,nodesConnectable:B,nodesFocusable:U,hooks:J}=Re(),G=Oe(null);pn(Qf,G),pn(Jf,e.id);const ee=pt(Ar),te=vn(),X=od(),{node:P,parentNode:oe}=nd(e.id),{emit:m,on:T}=l1(P,s),R=Pe(()=>typeof P.draggable>"u"?S.value:P.draggable),I=Pe(()=>typeof P.selectable>"u"?O.value:P.selectable),C=Pe(()=>typeof P.connectable>"u"?B.value:P.connectable),k=Pe(()=>typeof P.focusable>"u"?U.value:P.focusable),H=fe(()=>I.value||R.value||J.value.nodeClick.hasListeners()||J.value.nodeDoubleClick.hasListeners()||J.value.nodeMouseEnter.hasListeners()||J.value.nodeMouseMove.hasListeners()||J.value.nodeMouseLeave.hasListeners()),$=Pe(()=>!!P.dimensions.width&&!!P.dimensions.height),W=fe(()=>{const g=P.type||"default",_=ee?.["node-"+g];if(_)return _;let N=P.template||f.value[g];if(typeof N=="string"&&te){const L=Object.keys(te.appContext.components);L&&L.includes(g)&&(N=$t(g,!1))}return N&&typeof N!="string"?N:(s.error(new qe(Ve.NODE_TYPE_MISSING,N)),!1)}),ne=ed({id:e.id,el:G,disabled:()=>!R.value,selectable:I,dragHandle:()=>P.dragHandle,onStart(g){m.dragStart(g)},onDrag(g){m.drag(g)},onStop(g){m.dragStop(g)},onClick(g){v(g)}}),se=fe(()=>P.class instanceof Function?P.class(P):P.class),q=fe(()=>{const g=(P.style instanceof Function?P.style(P):P.style)||{},_=P.width instanceof Function?P.width(P):P.width,N=P.height instanceof Function?P.height(P):P.height;return!g.width&&_&&(g.width=typeof _=="string"?_:_+"px"),!g.height&&N&&(g.height=typeof N=="string"?N:N+"px"),g}),Y=Pe(()=>{var g,_;return Number((g=(_=P.zIndex)!=null?_:q.value.zIndex)!=null?g:0)});return c(g=>{(g.includes(e.id)||!g.length)&&ce()}),bt(()=>{xe(()=>P.hidden,function(g,_,N){g===void 0&&(g=!1),!g&&G.value&&(e.resizeObserver.observe(G.value),N(()=>{G.value&&e.resizeObserver.unobserve(G.value)}))},{immediate:!0,flush:"post"})}),xe([()=>P.type,()=>P.sourcePosition,()=>P.targetPosition],()=>{kt(()=>{u([{id:e.id,nodeElement:G.value,forceUpdate:!0}])})}),xe([()=>P.position.x,()=>P.position.y,()=>{var g;return(g=oe.value)==null?void 0:g.computedPosition.x},()=>{var g;return(g=oe.value)==null?void 0:g.computedPosition.y},()=>{var g;return(g=oe.value)==null?void 0:g.computedPosition.z},Y,()=>P.selected,()=>P.dimensions.height,()=>P.dimensions.width,()=>{var g;return(g=oe.value)==null?void 0:g.dimensions.height},()=>{var g;return(g=oe.value)==null?void 0:g.dimensions.width}],g=>{let[_,N,L,F,M,z]=g;const V={x:_,y:N,z:z+(h.value&&P.selected?1e3:0)};typeof L<"u"&&typeof F<"u"?P.computedPosition=$_({x:L,y:F,z:M},V):P.computedPosition=V},{flush:"post",immediate:!0}),xe([()=>P.extent,d],(g,_)=>{let[N,L]=g,[F,M]=_;(N!==F||L!==M)&&j()}),P.extent==="parent"||typeof P.extent=="object"&&"range"in P.extent&&P.extent.range==="parent"?Xs(()=>$).toBe(!0).then(j):j(),()=>{var g,_;return P.hidden?null:Me("div",ie({ref:G,"data-id":P.id,class:["vue-flow__node","vue-flow__node-"+(W.value===!1?"default":P.type||"default"),{[n.value]:R.value,dragging:ne?.value,draggable:R.value,selected:P.selected,selectable:I.value,parent:P.isParent},se.value],style:ie({visibility:$.value?"visible":"hidden",zIndex:(g=P.computedPosition.z)!=null?g:Y.value,transform:"translate("+P.computedPosition.x+"px,"+P.computedPosition.y+"px)",pointerEvents:H.value?"all":"none"},q.value),tabIndex:k.value?0:void 0,role:k.value?"group":void 0,"aria-describedby":x.value?void 0:_f+"-"+t,"aria-label":P.ariaLabel,"aria-roledescription":"node"},P.domAttributes,{onMouseenter:ve,onMousemove:ge,onMouseleave:be,onContextmenu:y,onClick:v,onDblclick:w,onKeydown:p}),[Me(W.value===!1?f.value.default:W.value,{id:P.id,type:P.type,data:P.data,events:ie({},P.events,T),selected:P.selected,resizing:P.resizing,dragging:ne.value,connectable:C.value,position:P.computedPosition,dimensions:P.dimensions,isValidTargetPos:P.isValidTargetPos,isValidSourcePos:P.isValidSourcePos,parent:P.parentNode,parentNodeId:P.parentNode,zIndex:(_=P.computedPosition.z)!=null?_:Y.value,targetPosition:P.targetPosition,sourcePosition:P.sourcePosition,label:P.label,dragHandle:P.dragHandle,onUpdateNodeInternals:ce})])};function j(){const g=P.computedPosition,{computedPosition:_,position:N}=Sl(P,A.value?xr(g,E.value):g,s.error,d.value,oe.value);(P.computedPosition.x!==_.x||P.computedPosition.y!==_.y)&&(P.computedPosition=ie({},P.computedPosition,_)),(P.position.x!==N.x||P.position.y!==N.y)&&(P.position=N)}function ce(){G.value&&u([{id:e.id,nodeElement:G.value,forceUpdate:!0}])}function ve(g){ne?.value||m.mouseEnter({event:g,node:P})}function ge(g){ne?.value||m.mouseMove({event:g,node:P})}function be(g){ne?.value||m.mouseLeave({event:g,node:P})}function y(g){return m.contextMenu({event:g,node:P})}function w(g){return m.doubleClick({event:g,node:P})}function v(g){I.value&&(!o.value||!R.value||D.value>0)&&Ol(P,r.value,a,l,i,!1,G.value),m.click({event:g,node:P})}function p(g){if(!(ml(g)||x.value))if(bf.includes(g.key)&&I.value){const _=g.key==="Escape";Ol(P,r.value,a,l,i,_,G.value)}else R.value&&P.selected&&fo[g.key]&&(g.preventDefault(),b.value="Moved selected node "+g.key.replace("Arrow","").toLowerCase()+". New position, x: "+~~P.position.x+", y: "+~~P.position.y,X({x:fo[g.key].x,y:fo[g.key].y},g.shiftKey))}}}),Ow=Aw,Cw={height:"0",width:"0"},Nw={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},Tw=De(ie({},Nw,{setup(e){const{viewportRef:t}=Re(),n=Pe(()=>{var o;return(o=t.value)==null?void 0:o.getElementsByClassName("vue-flow__edge-labels")[0]});return(o,i)=>(re(),he("svg",null,[(re(),he("foreignObject",Cw,[(re(),Xe(dg,{to:n.value,disabled:!n.value},[vt(o.$slots,"default")],8,["to","disabled"]))]))]))}}));function Mw(e){e===void 0&&(e={includeHiddenNodes:!1});const{nodes:t}=Re();return fe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const Iw={class:"vue-flow__nodes vue-flow__container"},Pw={name:"Nodes",compatConfig:{MODE:3}},Rw=De(ie({},Pw,{setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Re(),i=Mw(),r=Oe();return xe(i,s=>{s&&kt(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),bt(()=>{r.value=new ResizeObserver(s=>{const l=s.map(a=>({id:a.target.getAttribute("data-id"),nodeElement:a.target,forceUpdate:!0}));kt(()=>n(l))})}),Ss(()=>{var s;return(s=r.value)==null?void 0:s.disconnect()}),(s,l)=>(re(),he("div",Iw,[r.value?(re(!0),he(Le,{key:0},Jn(ue(t),(a,u,c,f)=>{const d=[a.id];if(f&&f.key===a.id&&up(f,d))return f;const h=(re(),Xe(ue(Ow),{id:a.id,key:a.id,"resize-observer":r.value},null,8,["id","resize-observer"]));return h.memo=d,h},l,0),128)):we("",!0)]))}}));function Dw(){const{emits:e}=Re();bt(()=>{if(Uf()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new qe(Ve.MISSING_STYLES))}})}const kw=Q("div",{class:"vue-flow__edge-labels"},null,-1),$w={name:"VueFlow",compatConfig:{MODE:3}},Lw=De(ie({},$w,{props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,t){let{expose:n,emit:o}=t;const i=e,r=hu(),s=qs(i,"modelValue",o),l=qs(i,"nodes",o),a=qs(i,"edges",o),u=Re(i),c=f1({modelValue:s,nodes:l,edges:a},i,u);return h1(o,u.hooks),cw(),Dw(),pn(Ar,r),zi(c),n(u),(f,d)=>(re(),he("div",{ref:ue(u).vueFlowRef,class:"vue-flow"},[Ce(iw,null,{default:gn(()=>[Ce(xw),kw,Ce(Rw),vt(f.$slots,"zoom-pane")]),_:3}),vt(f.$slots,"default"),Ce(uw)],512))}})),Fw={name:"Panel",compatConfig:{MODE:3}},pd=De(ie({},Fw,{props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Re(),o=fe(()=>(""+t.position).split("-"));return(i,r)=>(re(),he("div",{class:We(["vue-flow__panel",o.value]),style:Ye({pointerEvents:ue(n)?"none":"all"})},[vt(i.$slots,"default")],6))}}));var rn=(e=>(e.Lines="lines",e.Dots="dots",e))(rn||{});const vd=function(t){let{dimensions:n,size:o,color:i}=t;return Me("path",{stroke:i,"stroke-width":o,d:"M"+n[0]/2+" 0 V"+n[1]+" M0 "+n[1]/2+" H"+n[0]})},md=function(t){let{radius:n,color:o}=t;return Me("circle",{cx:n,cy:n,r:n,fill:o})};rn.Lines+"",rn.Dots+"";const Hw={[rn.Dots]:"#81818a",[rn.Lines]:"#eee"},Ww=["id","x","y","width","height","patternTransform"],Bw={key:2,height:"100",width:"100"},zw=["fill"],Gw=["x","y","fill"],Vw={name:"Background",compatConfig:{MODE:3}},Kw=De(ie({},Vw,{props:{id:{},variant:{default:()=>rn.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Re(),o=fe(()=>{const s=n.value.zoom,[l,a]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=[l*s||1,a*s||1],c=e.size*s,[f,d]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[f*s||1+u[0]/2,d*s||1+u[1]/2];return{scaledGap:u,offset:h,size:c}}),i=Pe(()=>"pattern-"+t+(e.id?"-"+e.id:"")),r=Pe(()=>e.color||e.patternColor||Hw[e.variant||rn.Dots]);return(s,l)=>(re(),he("svg",{class:"vue-flow__background vue-flow__container",style:Ye({height:(s.height>100?100:s.height)+"%",width:(s.width>100?100:s.width)+"%"})},[vt(s.$slots,"pattern-container",{id:i.value},()=>[Q("pattern",{id:i.value,x:ue(n).x%o.value.scaledGap[0],y:ue(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:"translate(-"+o.value.offset[0]+",-"+o.value.offset[1]+")",patternUnits:"userSpaceOnUse"},[vt(s.$slots,"pattern",{},()=>[s.variant===ue(rn).Lines?(re(),Xe(ue(vd),{key:0,size:s.lineWidth,color:r.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):s.variant===ue(rn).Dots?(re(),Xe(ue(md),{key:1,color:r.value,radius:o.value.size/2},null,8,["color","radius"])):we("",!0),s.bgColor?(re(),he("svg",Bw,[Q("rect",{width:"100%",height:"100%",fill:s.bgColor},null,8,zw)])):we("",!0)])],8,Ww)]),Q("rect",{x:s.x,y:s.y,width:"100%",height:"100%",fill:"url(#"+i.value+")"},null,8,Gw),vt(s.$slots,"default",{id:i.value})],4))}}));var Uw={value:()=>{}};function Il(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Dr(n)}function Dr(e){this._=e}function Yw(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Dr.prototype=Il.prototype={constructor:Dr,on:function(t,n){var o=this._,i=Yw(t+"",o),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=Xw(o[r],t.name)))return r;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<l;)if(r=(t=i[s]).type)o[r]=yd(o[r],t.name,n);else if(n==null)for(r in o)o[r]=yd(o[r],t.name,null);return this},copy:function(){var t={},n=this._;for(var o in n)t[o]=n[o].slice();return new Dr(t)},call:function(t,n){if((r=arguments.length-2)>0)for(var o=new Array(r),i=0,r,s;i<r;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(n,o)},apply:function(t,n,o){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(n,o)}};function Xw(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function yd(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Uw,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Pl="http://www.w3.org/1999/xhtml";const _d={svg:"http://www.w3.org/2000/svg",xhtml:Pl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),_d.hasOwnProperty(t)?{space:_d[t],local:e}:e}function qw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pl&&t.documentElement.namespaceURI===Pl?t.createElement(e):t.createElementNS(n,e)}}function jw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function wd(e){var t=kr(e);return(t.local?jw:qw)(t)}function Zw(){}function Rl(e){return e==null?Zw:function(){return this.querySelector(e)}}function Jw(e){typeof e!="function"&&(e=Rl(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=new Array(s),a,u,c=0;c<s;++c)(a=r[c])&&(u=e.call(a,a.__data__,c,r))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new dt(o,this._parents)}function Qw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function eb(){return[]}function bd(e){return e==null?eb:function(){return this.querySelectorAll(e)}}function tb(e){return function(){return Qw(e.apply(this,arguments))}}function nb(e){typeof e=="function"?e=tb(e):e=bd(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(o.push(e.call(a,a.__data__,u,s)),i.push(a));return new dt(o,i)}function Sd(e){return function(){return this.matches(e)}}function Ed(e){return function(t){return t.matches(e)}}var ob=Array.prototype.find;function ib(e){return function(){return ob.call(this.children,e)}}function rb(){return this.firstElementChild}function sb(e){return this.select(e==null?rb:ib(typeof e=="function"?e:Ed(e)))}var lb=Array.prototype.filter;function ab(){return Array.from(this.children)}function ub(e){return function(){return lb.call(this.children,e)}}function cb(e){return this.selectAll(e==null?ab:ub(typeof e=="function"?e:Ed(e)))}function fb(e){typeof e!="function"&&(e=Sd(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new dt(o,this._parents)}function xd(e){return new Array(e.length)}function db(){return new dt(this._enter||this._groups.map(xd),this._parents)}function $r(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}$r.prototype={constructor:$r,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function hb(e){return function(){return e}}function gb(e,t,n,o,i,r){for(var s=0,l,a=t.length,u=r.length;s<u;++s)(l=t[s])?(l.__data__=r[s],o[s]=l):n[s]=new $r(e,r[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function pb(e,t,n,o,i,r,s){var l,a,u=new Map,c=t.length,f=r.length,d=new Array(c),h;for(l=0;l<c;++l)(a=t[l])&&(d[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?i[l]=a:u.set(h,a));for(l=0;l<f;++l)h=s.call(e,r[l],l,r)+"",(a=u.get(h))?(o[l]=a,a.__data__=r[l],u.delete(h)):n[l]=new $r(e,r[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(d[l])===a&&(i[l]=a)}function vb(e){return e.__data__}function mb(e,t){if(!arguments.length)return Array.from(this,vb);var n=t?pb:gb,o=this._parents,i=this._groups;typeof e!="function"&&(e=hb(e));for(var r=i.length,s=new Array(r),l=new Array(r),a=new Array(r),u=0;u<r;++u){var c=o[u],f=i[u],d=f.length,h=yb(e.call(c,c&&c.__data__,u,o)),x=h.length,b=l[u]=new Array(x),A=s[u]=new Array(x),E=a[u]=new Array(d);n(c,f,b,A,E,h,t);for(var D=0,S=0,O,B;D<x;++D)if(O=b[D]){for(D>=S&&(S=D+1);!(B=A[S])&&++S<x;);O._next=B||null}}return s=new dt(s,o),s._enter=l,s._exit=a,s}function yb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _b(){return new dt(this._exit||this._groups.map(xd),this._parents)}function wb(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function bb(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),l=new Array(i),a=0;a<s;++a)for(var u=n[a],c=o[a],f=u.length,d=l[a]=new Array(f),h,x=0;x<f;++x)(h=u[x]||c[x])&&(d[x]=h);for(;a<i;++a)l[a]=n[a];return new dt(l,this._parents)}function Sb(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function Eb(e){e||(e=xb);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],l=s.length,a=i[r]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new dt(i,this._parents).order()}function xb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ab(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ob(){return Array.from(this)}function Cb(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var s=o[i];if(s)return s}return null}function Nb(){let e=0;for(const t of this)++e;return e}function Tb(){return!this.node()}function Mb(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,l;r<s;++r)(l=i[r])&&e.call(l,l.__data__,r,i);return this}function Ib(e){return function(){this.removeAttribute(e)}}function Pb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rb(e,t){return function(){this.setAttribute(e,t)}}function Db(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kb(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function $b(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Lb(e,t){var n=kr(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Pb:Ib:typeof t=="function"?n.local?$b:kb:n.local?Db:Rb)(n,t))}function Ad(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Fb(e){return function(){this.style.removeProperty(e)}}function Hb(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Wb(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Bb(e,t,n){return arguments.length>1?this.each((t==null?Fb:typeof t=="function"?Wb:Hb)(e,t,n??"")):po(this.node(),e)}function po(e,t){return e.style.getPropertyValue(t)||Ad(e).getComputedStyle(e,null).getPropertyValue(t)}function zb(e){return function(){delete this[e]}}function Gb(e,t){return function(){this[e]=t}}function Vb(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Kb(e,t){return arguments.length>1?this.each((t==null?zb:typeof t=="function"?Vb:Gb)(e,t)):this.node()[e]}function Od(e){return e.trim().split(/^|\s+/)}function Dl(e){return e.classList||new Cd(e)}function Cd(e){this._node=e,this._names=Od(e.getAttribute("class")||"")}Cd.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Nd(e,t){for(var n=Dl(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Td(e,t){for(var n=Dl(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Ub(e){return function(){Nd(this,e)}}function Yb(e){return function(){Td(this,e)}}function Xb(e,t){return function(){(t.apply(this,arguments)?Nd:Td)(this,e)}}function qb(e,t){var n=Od(e+"");if(arguments.length<2){for(var o=Dl(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Xb:t?Ub:Yb)(n,t))}function jb(){this.textContent=""}function Zb(e){return function(){this.textContent=e}}function Jb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Qb(e){return arguments.length?this.each(e==null?jb:(typeof e=="function"?Jb:Zb)(e)):this.node().textContent}function eS(){this.innerHTML=""}function tS(e){return function(){this.innerHTML=e}}function nS(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function oS(e){return arguments.length?this.each(e==null?eS:(typeof e=="function"?nS:tS)(e)):this.node().innerHTML}function iS(){this.nextSibling&&this.parentNode.appendChild(this)}function rS(){return this.each(iS)}function sS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lS(){return this.each(sS)}function aS(e){var t=typeof e=="function"?e:wd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function uS(){return null}function cS(e,t){var n=typeof e=="function"?e:wd(e),o=t==null?uS:typeof t=="function"?t:Rl(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function fS(){var e=this.parentNode;e&&e.removeChild(this)}function dS(){return this.each(fS)}function hS(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gS(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function pS(e){return this.select(e?gS:hS)}function vS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mS(e){return function(t){e.call(this,t,this.__data__)}}function yS(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function _S(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function wS(e,t,n){return function(){var o=this.__on,i,r=mS(t);if(o){for(var s=0,l=o.length;s<l;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function bS(e,t,n){var o=yS(e+""),i,r=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(i=0,c=l[a];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?wS:_S,i=0;i<r;++i)this.each(l(o[i],t,n));return this}function Md(e,t,n){var o=Ad(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function SS(e,t){return function(){return Md(this,e,t)}}function ES(e,t){return function(){return Md(this,e,t.apply(this,arguments))}}function xS(e,t){return this.each((typeof t=="function"?ES:SS)(e,t))}function*AS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var Id=[null];function dt(e,t){this._groups=e,this._parents=t}function ui(){return new dt([[document.documentElement]],Id)}function OS(){return this}dt.prototype=ui.prototype={constructor:dt,select:Jw,selectAll:nb,selectChild:sb,selectChildren:cb,filter:fb,data:mb,enter:db,exit:_b,join:wb,merge:bb,selection:OS,order:Sb,sort:Eb,call:Ab,nodes:Ob,node:Cb,size:Nb,empty:Tb,each:Mb,attr:Lb,style:Bb,property:Kb,classed:qb,text:Qb,html:oS,raise:rS,lower:lS,append:aS,insert:cS,remove:dS,clone:pS,datum:vS,on:bS,dispatch:xS,[Symbol.iterator]:AS};function Sn(e){return typeof e=="string"?new dt([[document.querySelector(e)]],[document.documentElement]):new dt([[e]],Id)}function CS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function En(e,t){if(e=CS(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const kl={capture:!0,passive:!1};function $l(e){e.preventDefault(),e.stopImmediatePropagation()}function NS(e){var t=e.document.documentElement,n=Sn(e).on("dragstart.drag",$l,kl);"onselectstart"in t?n.on("selectstart.drag",$l,kl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function TS(e,t){var n=e.document.documentElement,o=Sn(e).on("dragstart.drag",null);t&&(o.on("click.drag",$l,kl),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Ll(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pd(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function ci(){}var fi=.7,Lr=1/fi,vo="\\s*([+-]?\\d+)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",MS=/^#([0-9a-f]{3,8})$/,IS=new RegExp("^rgb\\("+vo+","+vo+","+vo+"\\)$"),PS=new RegExp("^rgb\\("+Kt+","+Kt+","+Kt+"\\)$"),RS=new RegExp("^rgba\\("+vo+","+vo+","+vo+","+di+"\\)$"),DS=new RegExp("^rgba\\("+Kt+","+Kt+","+Kt+","+di+"\\)$"),kS=new RegExp("^hsl\\("+di+","+Kt+","+Kt+"\\)$"),$S=new RegExp("^hsla\\("+di+","+Kt+","+Kt+","+di+"\\)$"),Rd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ll(ci,hi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dd,formatHex:Dd,formatHex8:LS,formatHsl:FS,formatRgb:kd,toString:kd});function Dd(){return this.rgb().formatHex()}function LS(){return this.rgb().formatHex8()}function FS(){return Wd(this).formatHsl()}function kd(){return this.rgb().formatRgb()}function hi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=MS.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$d(t):n===3?new lt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=IS.exec(e))?new lt(t[1],t[2],t[3],1):(t=PS.exec(e))?new lt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=RS.exec(e))?Fr(t[1],t[2],t[3],t[4]):(t=DS.exec(e))?Fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kS.exec(e))?Hd(t[1],t[2]/100,t[3]/100,1):(t=$S.exec(e))?Hd(t[1],t[2]/100,t[3]/100,t[4]):Rd.hasOwnProperty(e)?$d(Rd[e]):e==="transparent"?new lt(NaN,NaN,NaN,0):null}function $d(e){return new lt(e>>16&255,e>>8&255,e&255,1)}function Fr(e,t,n,o){return o<=0&&(e=t=n=NaN),new lt(e,t,n,o)}function HS(e){return e instanceof ci||(e=hi(e)),e?(e=e.rgb(),new lt(e.r,e.g,e.b,e.opacity)):new lt}function Fl(e,t,n,o){return arguments.length===1?HS(e):new lt(e,t,n,o??1)}function lt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Ll(lt,Fl,Pd(ci,{brighter(e){return e=e==null?Lr:Math.pow(Lr,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lt(Wn(this.r),Wn(this.g),Wn(this.b),Hr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ld,formatHex:Ld,formatHex8:WS,formatRgb:Fd,toString:Fd}));function Ld(){return"#"+Bn(this.r)+Bn(this.g)+Bn(this.b)}function WS(){return"#"+Bn(this.r)+Bn(this.g)+Bn(this.b)+Bn((isNaN(this.opacity)?1:this.opacity)*255)}function Fd(){const e=Hr(this.opacity);return(e===1?"rgb(":"rgba(")+Wn(this.r)+", "+Wn(this.g)+", "+Wn(this.b)+(e===1?")":", "+e+")")}function Hr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bn(e){return e=Wn(e),(e<16?"0":"")+e.toString(16)}function Hd(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,n,o)}function Wd(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof ci||(e=hi(e)),!e)return new Ot;if(e instanceof Ot)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,l=r-i,a=(r+i)/2;return l?(t===r?s=(n-o)/l+(n<o)*6:n===r?s=(o-t)/l+2:s=(t-n)/l+4,l/=a<.5?r+i:2-r-i,s*=60):l=a>0&&a<1?0:s,new Ot(s,l,a,e.opacity)}function BS(e,t,n,o){return arguments.length===1?Wd(e):new Ot(e,t,n,o??1)}function Ot(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Ll(Ot,BS,Pd(ci,{brighter(e){return e=e==null?Lr:Math.pow(Lr,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new Ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new lt(Hl(e>=240?e-240:e+120,i,o),Hl(e,i,o),Hl(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ot(Bd(this.h),Wr(this.s),Wr(this.l),Hr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Hr(this.opacity);return(e===1?"hsl(":"hsla(")+Bd(this.h)+", "+Wr(this.s)*100+"%, "+Wr(this.l)*100+"%"+(e===1?")":", "+e+")")}}));function Bd(e){return e=(e||0)%360,e<0?e+360:e}function Wr(e){return Math.max(0,Math.min(1,e||0))}function Hl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const zd=e=>()=>e;function zS(e,t){return function(n){return e+n*t}}function GS(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function VS(e){return(e=+e)==1?Gd:function(t,n){return n-t?GS(t,n,e):zd(isNaN(t)?n:t)}}function Gd(e,t){var n=t-e;return n?zS(e,n):zd(isNaN(e)?t:e)}const Vd=(function e(t){var n=VS(t);function o(i,r){var s=n((i=Fl(i)).r,(r=Fl(r)).r),l=n(i.g,r.g),a=n(i.b,r.b),u=Gd(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function xn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Wl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bl=new RegExp(Wl.source,"g");function KS(e){return function(){return e}}function US(e){return function(t){return e(t)+""}}function YS(e,t){var n=Wl.lastIndex=Bl.lastIndex=0,o,i,r,s=-1,l=[],a=[];for(e=e+"",t=t+"";(o=Wl.exec(e))&&(i=Bl.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(o=o[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,a.push({i:s,x:xn(o,i)})),n=Bl.lastIndex;return n<t.length&&(r=t.slice(n),l[s]?l[s]+=r:l[++s]=r),l.length<2?a[0]?US(a[0].x):KS(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)l[(f=a[c]).i]=f.x(u);return l.join("")})}var Kd=180/Math.PI,zl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ud(e,t,n,o,i,r){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*o)&&(n-=e*a,o-=t*a),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,a/=l),e*o<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Kd,skewX:Math.atan(a)*Kd,scaleX:s,scaleY:l}}var Br;function XS(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zl:Ud(t.a,t.b,t.c,t.d,t.e,t.f)}function qS(e){return e==null||(Br||(Br=document.createElementNS("http://www.w3.org/2000/svg","g")),Br.setAttribute("transform",e),!(e=Br.transform.baseVal.consolidate()))?zl:(e=e.matrix,Ud(e.a,e.b,e.c,e.d,e.e,e.f))}function Yd(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,f,d,h,x){if(u!==f||c!==d){var b=h.push("translate(",null,t,null,n);x.push({i:b-4,x:xn(u,f)},{i:b-2,x:xn(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function s(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,o)-2,x:xn(u,c)})):c&&f.push(i(f)+"rotate("+c+o)}function l(u,c,f,d){u!==c?d.push({i:f.push(i(f)+"skewX(",null,o)-2,x:xn(u,c)}):c&&f.push(i(f)+"skewX("+c+o)}function a(u,c,f,d,h,x){if(u!==f||c!==d){var b=h.push(i(h)+"scale(",null,",",null,")");x.push({i:b-4,x:xn(u,f)},{i:b-2,x:xn(c,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),l(u.skewX,c.skewX,f,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var x=-1,b=d.length,A;++x<b;)f[(A=d[x]).i]=A.x(h);return f.join("")}}}var jS=Yd(XS,"px, ","px)","deg)"),ZS=Yd(qS,", ",")",")"),JS=1e-12;function Xd(e){return((e=Math.exp(e))+1/e)/2}function QS(e){return((e=Math.exp(e))-1/e)/2}function eE(e){return((e=Math.exp(2*e))-1)/(e+1)}const tE=(function e(t,n,o){function i(r,s){var l=r[0],a=r[1],u=r[2],c=s[0],f=s[1],d=s[2],h=c-l,x=f-a,b=h*h+x*x,A,E;if(b<JS)E=Math.log(d/u)/t,A=function(G){return[l+G*h,a+G*x,u*Math.exp(t*G*E)]};else{var D=Math.sqrt(b),S=(d*d-u*u+o*b)/(2*u*n*D),O=(d*d-u*u-o*b)/(2*d*n*D),B=Math.log(Math.sqrt(S*S+1)-S),U=Math.log(Math.sqrt(O*O+1)-O);E=(U-B)/t,A=function(G){var ee=G*E,te=Xd(B),X=u/(n*D)*(te*eE(t*ee+B)-QS(B));return[l+X*h,a+X*x,u*te/Xd(t*ee+B)]}}return A.duration=E*1e3*t/Math.SQRT2,A}return i.rho=function(r){var s=Math.max(.001,+r),l=s*s,a=l*l;return e(s,l,a)},i})(Math.SQRT2,2,4);var mo=0,gi=0,pi=0,qd=1e3,zr,vi,Gr=0,zn=0,Vr=0,mi=typeof performance=="object"&&performance.now?performance:Date,jd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gl(){return zn||(jd(nE),zn=mi.now()+Vr)}function nE(){zn=0}function Kr(){this._call=this._time=this._next=null}Kr.prototype=Zd.prototype={constructor:Kr,restart:function(t,n,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?Gl():+o)+(n==null?0:+n),!this._next&&vi!==this&&(vi?vi._next=this:zr=this,vi=this),this._call=t,this._time=o,Vl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vl())}};function Zd(e,t,n){var o=new Kr;return o.restart(e,t,n),o}function oE(){Gl(),++mo;for(var e=zr,t;e;)(t=zn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--mo}function Jd(){zn=(Gr=mi.now())+Vr,mo=gi=0;try{oE()}finally{mo=0,rE(),zn=0}}function iE(){var e=mi.now(),t=e-Gr;t>qd&&(Vr-=t,Gr=e)}function rE(){for(var e,t=zr,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:zr=n);vi=e,Vl(o)}function Vl(e){if(!mo){gi&&(gi=clearTimeout(gi));var t=e-zn;t>24?(e<1/0&&(gi=setTimeout(Jd,e-mi.now()-Vr)),pi&&(pi=clearInterval(pi))):(pi||(Gr=mi.now(),pi=setInterval(iE,qd)),mo=1,jd(Jd))}}function Qd(e,t,n){var o=new Kr;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var sE=Il("start","end","cancel","interrupt"),lE=[],eh=0,th=1,Kl=2,Ur=3,nh=4,Ul=5,Yr=6;function Xr(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;aE(e,n,{name:t,index:o,group:i,on:sE,tween:lE,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:eh})}function Yl(e,t){var n=Ct(e,t);if(n.state>eh)throw new Error("too late; already scheduled");return n}function Ut(e,t){var n=Ct(e,t);if(n.state>Ur)throw new Error("too late; already running");return n}function Ct(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function aE(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Zd(r,0,n.time);function r(u){n.state=th,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==th)return a();for(c in o)if(h=o[c],h.name===n.name){if(h.state===Ur)return Qd(s);h.state===nh?(h.state=Yr,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Yr,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(Qd(function(){n.state===Ur&&(n.state=nh,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Kl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Kl){for(n.state=Ur,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=h);i.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=Ul,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===Ul&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Yr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function qr(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>Kl&&o.state<Ul,o.state=Yr,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function uE(e){return this.each(function(){qr(this,e)})}function cE(e,t){var n,o;return function(){var i=Ut(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function fE(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Ut(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var l={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=l;break}a===u&&i.push(l)}r.tween=i}}function dE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Ct(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?cE:fE)(n,e,t))}function Xl(e,t,n){var o=e._id;return e.each(function(){var i=Ut(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ct(i,o).value[t]}}function oh(e,t){var n;return(typeof t=="number"?xn:t instanceof hi?Vd:(n=hi(t))?(t=n,Vd):YS)(e,t)}function hE(e){return function(){this.removeAttribute(e)}}function gE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pE(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function vE(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function mE(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function yE(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function _E(e,t){var n=kr(e),o=n==="transform"?ZS:oh;return this.attrTween(e,typeof t=="function"?(n.local?yE:mE)(n,o,Xl(this,"attr."+e,t)):t==null?(n.local?gE:hE)(n):(n.local?vE:pE)(n,o,t))}function wE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function bE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function SE(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&bE(e,r)),n}return i._value=t,i}function EE(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&wE(e,r)),n}return i._value=t,i}function xE(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=kr(e);return this.tween(n,(o.local?SE:EE)(o,t))}function AE(e,t){return function(){Yl(this,e).delay=+t.apply(this,arguments)}}function OE(e,t){return t=+t,function(){Yl(this,e).delay=t}}function CE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?AE:OE)(t,e)):Ct(this.node(),t).delay}function NE(e,t){return function(){Ut(this,e).duration=+t.apply(this,arguments)}}function TE(e,t){return t=+t,function(){Ut(this,e).duration=t}}function ME(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?NE:TE)(t,e)):Ct(this.node(),t).duration}function IE(e,t){if(typeof t!="function")throw new Error;return function(){Ut(this,e).ease=t}}function PE(e){var t=this._id;return arguments.length?this.each(IE(t,e)):Ct(this.node(),t).ease}function RE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ut(this,e).ease=n}}function DE(e){if(typeof e!="function")throw new Error;return this.each(RE(this._id,e))}function kE(e){typeof e!="function"&&(e=Sd(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new sn(o,this._parents,this._name,this._id)}function $E(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),s=new Array(o),l=0;l<r;++l)for(var a=t[l],u=n[l],c=a.length,f=s[l]=new Array(c),d,h=0;h<c;++h)(d=a[h]||u[h])&&(f[h]=d);for(;l<o;++l)s[l]=t[l];return new sn(s,this._parents,this._name,this._id)}function LE(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function FE(e,t,n){var o,i,r=LE(t)?Yl:Ut;return function(){var s=r(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function HE(e,t){var n=this._id;return arguments.length<2?Ct(this.node(),n).on.on(e):this.each(FE(n,e,t))}function WE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function BE(){return this.on("end.remove",WE(this._id))}function zE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Rl(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var l=o[s],a=l.length,u=r[s]=new Array(a),c,f,d=0;d<a;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Xr(u[d],t,n,d,u,Ct(c,n)));return new sn(r,this._parents,t,n)}function GE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bd(e));for(var o=this._groups,i=o.length,r=[],s=[],l=0;l<i;++l)for(var a=o[l],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var d=e.call(c,c.__data__,f,a),h,x=Ct(c,n),b=0,A=d.length;b<A;++b)(h=d[b])&&Xr(h,t,n,b,d,x);r.push(d),s.push(c)}return new sn(r,s,t,n)}var VE=ui.prototype.constructor;function KE(){return new VE(this._groups,this._parents)}function UE(e,t){var n,o,i;return function(){var r=po(this,e),s=(this.style.removeProperty(e),po(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function ih(e){return function(){this.style.removeProperty(e)}}function YE(e,t,n){var o,i=n+"",r;return function(){var s=po(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function XE(e,t,n){var o,i,r;return function(){var s=po(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),po(this,e))),s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l))}}function qE(e,t){var n,o,i,r="style."+t,s="end."+r,l;return function(){var a=Ut(this,e),u=a.on,c=a.value[r]==null?l||(l=ih(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),a.on=o}}function jE(e,t,n){var o=(e+="")=="transform"?jS:oh;return t==null?this.styleTween(e,UE(e,o)).on("end.style."+e,ih(e)):typeof t=="function"?this.styleTween(e,XE(e,o,Xl(this,"style."+e,t))).each(qE(this._id,e)):this.styleTween(e,YE(e,o,t),n).on("end.style."+e,null)}function ZE(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function JE(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&ZE(e,s,n)),o}return r._value=t,r}function QE(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,JE(e,t,n??""))}function ex(e){return function(){this.textContent=e}}function tx(e){return function(){var t=e(this);this.textContent=t??""}}function nx(e){return this.tween("text",typeof e=="function"?tx(Xl(this,"text",e)):ex(e==null?"":e+""))}function ox(e){return function(t){this.textContent=e.call(this,t)}}function ix(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&ox(i)),t}return o._value=e,o}function rx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,ix(e))}function sx(){for(var e=this._name,t=this._id,n=rh(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=Ct(a,t);Xr(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new sn(o,this._parents,e,n)}function lx(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var l={value:s},a={value:function(){--i===0&&r()}};n.each(function(){var u=Ut(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),i===0&&r()})}var ax=0;function sn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function rh(){return++ax}var ln=ui.prototype;sn.prototype={constructor:sn,select:zE,selectAll:GE,selectChild:ln.selectChild,selectChildren:ln.selectChildren,filter:kE,merge:$E,selection:KE,transition:sx,call:ln.call,nodes:ln.nodes,node:ln.node,size:ln.size,empty:ln.empty,each:ln.each,on:HE,attr:_E,attrTween:xE,style:jE,styleTween:QE,text:nx,textTween:rx,remove:BE,tween:dE,delay:CE,duration:ME,ease:PE,easeVarying:DE,end:lx,[Symbol.iterator]:ln[Symbol.iterator]};function ux(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var cx={time:null,delay:0,duration:250,ease:ux};function fx(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition "+t+" not found");return n}function dx(e){var t,n;e instanceof sn?(t=e._id,e=e._name):(t=rh(),(n=cx).time=Gl(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&Xr(a,e,t,u,s,n||fx(a,t));return new sn(o,this._parents,e,t)}ui.prototype.interrupt=uE,ui.prototype.transition=dx;const jr=e=>()=>e;function hx(e,t){let{sourceEvent:n,target:o,transform:i,dispatch:r}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function an(e,t,n){this.k=e,this.x=t,this.y=n}an.prototype={constructor:an,scale:function(t){return t===1?this:new an(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new an(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ql=new an(1,0,0);an.prototype;function jl(e){e.stopImmediatePropagation()}function yi(e){e.preventDefault(),e.stopImmediatePropagation()}function gx(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function px(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function sh(){return this.__zoom||ql}function vx(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function mx(){return navigator.maxTouchPoints||"ontouchstart"in this}function yx(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function _x(){var e=gx,t=px,n=yx,o=vx,i=mx,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=tE,u=Il("start","zoom","end"),c,f,d,h=500,x=150,b=0,A=10;function E(m){m.property("__zoom",sh).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",ee).on("dblclick.zoom",te).filter(i).on("touchstart.zoom",X).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(m,T,R,I){var C=m.selection?m.selection():m;C.property("__zoom",sh),m!==C?B(m,T,R,I):C.interrupt().each(function(){U(this,arguments).event(I).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},E.scaleBy=function(m,T,R,I){E.scaleTo(m,function(){var C=this.__zoom.k,k=typeof T=="function"?T.apply(this,arguments):T;return C*k},R,I)},E.scaleTo=function(m,T,R,I){E.transform(m,function(){var C=t.apply(this,arguments),k=this.__zoom,H=R==null?O(C):typeof R=="function"?R.apply(this,arguments):R,$=k.invert(H),W=typeof T=="function"?T.apply(this,arguments):T;return n(S(D(k,W),H,$),C,s)},R,I)},E.translateBy=function(m,T,R,I){E.transform(m,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,I)},E.translateTo=function(m,T,R,I,C){E.transform(m,function(){var k=t.apply(this,arguments),H=this.__zoom,$=I==null?O(k):typeof I=="function"?I.apply(this,arguments):I;return n(ql.translate($[0],$[1]).scale(H.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof R=="function"?-R.apply(this,arguments):-R),k,s)},I,C)};function D(m,T){return T=Math.max(r[0],Math.min(r[1],T)),T===m.k?m:new an(T,m.x,m.y)}function S(m,T,R){var I=T[0]-R[0]*m.k,C=T[1]-R[1]*m.k;return I===m.x&&C===m.y?m:new an(m.k,I,C)}function O(m){return[(+m[0][0]+ +m[1][0])/2,(+m[0][1]+ +m[1][1])/2]}function B(m,T,R,I){m.on("start.zoom",function(){U(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(I).end()}).tween("zoom",function(){var C=this,k=arguments,H=U(C,k).event(I),$=t.apply(C,k),W=R==null?O($):typeof R=="function"?R.apply(C,k):R,ne=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),se=C.__zoom,q=typeof T=="function"?T.apply(C,k):T,Y=a(se.invert(W).concat(ne/se.k),q.invert(W).concat(ne/q.k));return function(j){if(j===1)j=q;else{var ce=Y(j),ve=ne/ce[2];j=new an(ve,W[0]-ce[0]*ve,W[1]-ce[1]*ve)}H.zoom(null,j)}})}function U(m,T,R){return!R&&m.__zooming||new J(m,T)}function J(m,T){this.that=m,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(m,T),this.taps=0}J.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,R){return this.mouse&&T!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var R=Sn(this.that).datum();u.call(T,this.that,new hx(T,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:u}),R)}};function G(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(!e.apply(this,arguments))return;var C=U(this,R).event(m),k=this.__zoom,H=Math.max(r[0],Math.min(r[1],k.k*Math.pow(2,o.apply(this,arguments)))),$=En(m);if(C.wheel)(C.mouse[0][0]!==$[0]||C.mouse[0][1]!==$[1])&&(C.mouse[1]=k.invert(C.mouse[0]=$)),clearTimeout(C.wheel);else{if(k.k===H)return;C.mouse=[$,k.invert($)],qr(this),C.start()}yi(m),C.wheel=setTimeout(W,x),C.zoom("mouse",n(S(D(k,H),C.mouse[0],C.mouse[1]),C.extent,s));function W(){C.wheel=null,C.end()}}function ee(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(d||!e.apply(this,arguments))return;var C=m.currentTarget,k=U(this,R,!0).event(m),H=Sn(m.view).on("mousemove.zoom",se,!0).on("mouseup.zoom",q,!0),$=En(m,C),W=m.clientX,ne=m.clientY;NS(m.view),jl(m),k.mouse=[$,this.__zoom.invert($)],qr(this),k.start();function se(Y){if(yi(Y),!k.moved){var j=Y.clientX-W,ce=Y.clientY-ne;k.moved=j*j+ce*ce>b}k.event(Y).zoom("mouse",n(S(k.that.__zoom,k.mouse[0]=En(Y,C),k.mouse[1]),k.extent,s))}function q(Y){H.on("mousemove.zoom mouseup.zoom",null),TS(Y.view,k.moved),yi(Y),k.event(Y).end()}}function te(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(e.apply(this,arguments)){var C=this.__zoom,k=En(m.changedTouches?m.changedTouches[0]:m,this),H=C.invert(k),$=C.k*(m.shiftKey?.5:2),W=n(S(D(C,$),k,H),t.apply(this,R),s);yi(m),l>0?Sn(this).transition().duration(l).call(B,W,k,m):Sn(this).call(E.transform,W,k,m)}}function X(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(e.apply(this,arguments)){var C=m.touches,k=C.length,H=U(this,R,m.changedTouches.length===k).event(m),$,W,ne,se;for(jl(m),W=0;W<k;++W)ne=C[W],se=En(ne,this),se=[se,this.__zoom.invert(se),ne.identifier],H.touch0?!H.touch1&&H.touch0[2]!==se[2]&&(H.touch1=se,H.taps=0):(H.touch0=se,$=!0,H.taps=1+!!c);c&&(c=clearTimeout(c)),$&&(H.taps<2&&(f=se[0],c=setTimeout(function(){c=null},h)),qr(this),H.start())}}function P(m){if(this.__zooming){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];var C=U(this,R).event(m),k=m.changedTouches,H=k.length,$,W,ne,se;for(yi(m),$=0;$<H;++$)W=k[$],ne=En(W,this),C.touch0&&C.touch0[2]===W.identifier?C.touch0[0]=ne:C.touch1&&C.touch1[2]===W.identifier&&(C.touch1[0]=ne);if(W=C.that.__zoom,C.touch1){var q=C.touch0[0],Y=C.touch0[1],j=C.touch1[0],ce=C.touch1[1],ve=(ve=j[0]-q[0])*ve+(ve=j[1]-q[1])*ve,ge=(ge=ce[0]-Y[0])*ge+(ge=ce[1]-Y[1])*ge;W=D(W,Math.sqrt(ve/ge)),ne=[(q[0]+j[0])/2,(q[1]+j[1])/2],se=[(Y[0]+ce[0])/2,(Y[1]+ce[1])/2]}else if(C.touch0)ne=C.touch0[0],se=C.touch0[1];else return;C.zoom("touch",n(S(W,ne,se),C.extent,s))}}function oe(m){for(var T=arguments.length,R=new Array(T>1?T-1:0),I=1;I<T;I++)R[I-1]=arguments[I];if(this.__zooming){var C=U(this,R).event(m),k=m.changedTouches,H=k.length,$,W;for(jl(m),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),$=0;$<H;++$)W=k[$],C.touch0&&C.touch0[2]===W.identifier?delete C.touch0:C.touch1&&C.touch1[2]===W.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(W=En(W,this),Math.hypot(f[0]-W[0],f[1]-W[1])<A)){var ne=Sn(this).on("dblclick.zoom");ne&&ne.apply(this,arguments)}}}return E.wheelDelta=function(m){return arguments.length?(o=typeof m=="function"?m:jr(+m),E):o},E.filter=function(m){return arguments.length?(e=typeof m=="function"?m:jr(!!m),E):e},E.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:jr(!!m),E):i},E.extent=function(m){return arguments.length?(t=typeof m=="function"?m:jr([[+m[0][0],+m[0][1]],[+m[1][0],+m[1][1]]]),E):t},E.scaleExtent=function(m){return arguments.length?(r[0]=+m[0],r[1]=+m[1],E):[r[0],r[1]]},E.translateExtent=function(m){return arguments.length?(s[0][0]=+m[0][0],s[1][0]=+m[1][0],s[0][1]=+m[0][1],s[1][1]=+m[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function(m){return arguments.length?(n=m,E):n},E.duration=function(m){return arguments.length?(l=+m,E):l},E.interpolate=function(m){return arguments.length?(a=m,E):a},E.on=function(){var m=u.on.apply(u,arguments);return m===u?E:m},E.clickDistance=function(m){return arguments.length?(b=(m=+m)*m,E):Math.sqrt(b)},E.tapDistance=function(m){return arguments.length?(A=+m,E):A},E}const lh=Symbol("MiniMapSlots"),wx=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],bx={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},Sx=De(ie({},bx,{props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,t){let{emit:n}=t;const o=e,i=pt(lh),r=As(),s=Pe(()=>{var d;return(d=r.style)!=null?d:{}});function l(d){n("click",d)}function a(d){n("dblclick",d)}function u(d){n("mouseenter",d)}function c(d){n("mousemove",d)}function f(d){n("mouseleave",d)}return(d,h)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(re(),he(Le,{key:0},[ue(i)["node-"+o.type]?(re(),Xe(uu(ue(i)["node-"+o.type]),yh(Fo({key:0},ie({},o,d.$attrs))),null,16)):(re(),he("rect",Fo({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||s.value.background||s.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:l,onDblclick:a,onMouseenter:u,onMousemove:c,onMouseleave:f}),null,16,wx))],64)):we("",!0)}})),Ex=["width","height","viewBox","aria-labelledby"],xx=["id"],Ax=["d","fill","stroke","stroke-width"],Ox={name:"MiniMap",compatConfig:{MODE:3}},Cx=De(ie({},Ox,{props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,t){let{emit:n}=t;const o=hu(),i=As(),r=200,s=150,{id:l,edges:a,viewport:u,translateExtent:c,dimensions:f,emits:d,d3Selection:h,d3Zoom:x,getNodesInitialized:b}=Re(),A=Oe();pn(lh,o);const E=Pe(()=>{var k,H,$;return(k=(H=e.width)!=null?H:($=i.style)==null?void 0:$.width)!=null?k:r}),D=Pe(()=>{var k,H,$;return(k=(H=e.height)!=null?H:($=i.style)==null?void 0:$.height)!=null?k:s}),S=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",O=fe(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),B=fe(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),U=fe(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),J=fe(()=>yl(b.value.filter(k=>!k.hidden))),G=fe(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:f.value.width/u.value.zoom,height:f.value.height/u.value.zoom})),ee=fe(()=>b.value&&b.value.length?R_(J.value,G.value):G.value),te=fe(()=>{const k=ee.value.width/E.value,H=ee.value.height/D.value;return Math.max(k,H)}),X=fe(()=>{const k=te.value*E.value,H=te.value*D.value,$=e.offsetScale*te.value;return{offset:$,x:ee.value.x-(k-ee.value.width)/2-$,y:ee.value.y-(H-ee.value.height)/2-$,width:k+$*2,height:H+$*2}}),P=fe(()=>!X.value.x||!X.value.y?"":` M`+(X.value.x-X.value.offset)+","+(X.value.y-X.value.offset)+` h`+(X.value.width+X.value.offset*2)+` v`+(X.value.height+X.value.offset*2)+` h`+(-X.value.width-X.value.offset*2)+`z M`+(G.value.x+e.maskBorderRadius)+","+G.value.y+` h`+(G.value.width-2*e.maskBorderRadius)+` a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 "+e.maskBorderRadius+","+e.maskBorderRadius+` v`+(G.value.height-2*e.maskBorderRadius)+` a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 -"+e.maskBorderRadius+","+e.maskBorderRadius+` h`+-(G.value.width-2*e.maskBorderRadius)+` a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 -"+e.maskBorderRadius+",-"+e.maskBorderRadius+` v`+-(G.value.height-2*e.maskBorderRadius)+` a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 "+e.maskBorderRadius+",-"+e.maskBorderRadius+"z");ag(k=>{if(A.value){const H=Sn(A.value),$=se=>{if(se.sourceEvent.type!=="wheel"||!h.value||!x.value)return;const q=se.sourceEvent.ctrlKey&&si()?10:1,Y=-se.sourceEvent.deltaY*(se.sourceEvent.deltaMode===1?.05:se.sourceEvent.deltaMode?1:.002)*e.zoomStep,j=u.value.zoom*2**(Y*q);x.value.scaleTo(h.value,j)},W=se=>{if(se.sourceEvent.type!=="mousemove"||!h.value||!x.value)return;const q=te.value*Math.max(1,u.value.zoom)*(e.inversePan?-1:1),Y={x:u.value.x-se.sourceEvent.movementX*q,y:u.value.y-se.sourceEvent.movementY*q},j=[[0,0],[f.value.width,f.value.height]],ce=ql.translate(Y.x,Y.y).scale(u.value.zoom),ve=x.value.constrain()(ce,j,c.value);x.value.transform(h.value,ve)},ne=_x().wheelDelta(se=>_l(se)*(e.zoomStep/10)).on("zoom",e.pannable?W:()=>{}).on("zoom.wheel",e.zoomable?$:()=>{});H.call(ne),k(()=>{H.on("zoom",null)})}},{flush:"post"});function oe(k){const[H,$]=En(k);n("click",{event:k,position:{x:H,y:$}})}function m(k,H){const $={event:k,node:H,connectedEdges:Hn([H],a.value)};d.miniMapNodeClick($),n("nodeClick",$)}function T(k,H){const $={event:k,node:H,connectedEdges:Hn([H],a.value)};d.miniMapNodeDoubleClick($),n("nodeDblclick",$)}function R(k,H){const $={event:k,node:H,connectedEdges:Hn([H],a.value)};d.miniMapNodeMouseEnter($),n("nodeMouseenter",$)}function I(k,H){const $={event:k,node:H,connectedEdges:Hn([H],a.value)};d.miniMapNodeMouseMove($),n("nodeMousemove",$)}function C(k,H){const $={event:k,node:H,connectedEdges:Hn([H],a.value)};d.miniMapNodeMouseLeave($),n("nodeMouseleave",$)}return(k,H)=>(re(),Xe(ue(pd),{position:k.position,class:We(["vue-flow__minimap",{pannable:k.pannable,zoomable:k.zoomable}])},{default:gn(()=>[(re(),he("svg",{ref_key:"el",ref:A,width:E.value,height:D.value,viewBox:[X.value.x,X.value.y,X.value.width,X.value.height].join(" "),role:"img","aria-labelledby":"vue-flow__minimap-"+ue(l),onClick:oe},[k.ariaLabel?(re(),he("title",{key:0,id:"vue-flow__minimap-"+ue(l)},pe(k.ariaLabel),9,xx)):we("",!0),(re(!0),he(Le,null,Jn(ue(b),$=>(re(),Xe(Sx,{id:$.id,key:$.id,f:"",position:$.computedPosition,dimensions:$.dimensions,selected:$.selected,dragging:$.dragging,style:Ye($.style),class:We(U.value($)),color:O.value($),"border-radius":k.nodeBorderRadius,"stroke-color":B.value($),"stroke-width":k.nodeStrokeWidth,"shape-rendering":ue(S),type:$.type,hidden:$.hidden,onClick:W=>m(W,$),onDblclick:W=>T(W,$),onMouseenter:W=>R(W,$),onMousemove:W=>I(W,$),onMouseleave:W=>C(W,$)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","hidden","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),Q("path",{class:"vue-flow__minimap-mask",d:P.value,fill:k.maskColor,stroke:k.maskStrokeColor,"stroke-width":k.maskStrokeWidth,"fill-rule":"evenodd"},null,8,Ax)],8,Ex))]),_:1},8,["position","class"]))}}));var Zl={name:"StageNode",setup(){const{connectionStartHandle:e}=Re();return{connectionStartHandle:e}},components:{Handle:ai},props:{data:{type:Object,required:!0}},data(){return{showActions:!1,isHoveredOrFocused:!1,hoverTimeout:null,blurTimeout:null}},computed:{isConnecting(){return!!this.connectionStartHandle},Position(){return de},stage(){return this.data.stage},isSelected(){return this.data.isSelected},stageStyle(){return{borderColor:"var(--code-color) !important",borderWidth:this.isSelected?"3px !important":"0 !important",background:this.data.isSpecial?"purple !important":"rgb(var(--primary-rgb)) !important",padding:this.isSelected?"4px !important":"6px !important"}},onSelected(){return this.data.onSelect?.()},onEscape(){return this.data.onEscape?.()}},methods:{toggleActions(){this.showActions?this.closeActions():this.openActions()},openActions(){this.data.onSelect?.(),this.showActions=!0,this.$nextTick(()=>{const e=this.$refs.editButton||this.$refs.deleteButton;e&&e.focus()}),document.addEventListener("click",this.closeActions)},closeActions(){this.showActions&&document.removeEventListener("click",this.closeActions),this.data.onEscape?.(),clearTimeout(this.hoverTimeout),clearTimeout(this.blurTimeout),this.showActions=!1,this.$nextTick(()=>{this.$refs.menuButton&&this.$refs.menuButton.focus()})},handleEdit(){this.closeActions(),this.data?.onEdit?.()},handleDelete(){this.closeActions(),this.data?.onDelete?.()},onNodeEnter(){clearTimeout(this.hoverTimeout),this.isHoveredOrFocused=!0},onNodeLeave(){this.hoverTimeout=setTimeout(()=>{this.showActions||(this.isHoveredOrFocused=!1)},100)},onDropdownEnter(){clearTimeout(this.blurTimeout)}}};const Nx=["data-stage-id","aria-describedby"],Tx={key:0,class:"position-absolute top-25-px end-20-px h-100 rounded bg-secondary bg-opacity-75 z-2 pe-none","aria-hidden":"true"},Mx=["id","aria-labelledby"],Ix={class:"visually-hidden"},Px=["title"],Rx=["title"],Dx={key:2,class:"stage-handles","aria-hidden":"true"},kx={class:"card-header d-flex justify-content-between align-items-start p-1 pe-0 z-1 position-relative"},$x={class:"flex-fill w-75 me-3"},Lx=["title"],Fx=["id","title"],Hx={key:0,class:"stage-card-actions align-items-center d-flex position-relative"},Wx=["id","title","aria-expanded","aria-controls"],Bx={class:"visually-hidden"},zx={class:"card-body px-1 py-0 z-1 position-relative"},Gx={class:"d-flex justify-content-between align-items-center"},Vx={key:0,class:"badge bg-warning bg-opacity-10 rounded-pill p-1"};function Kx(e,t,n,o,i,r){const s=$t("Handle");return re(),he("div",{class:"stage-node card border shadow-sm position-relative",tabindex:"0",role:"button",style:Ye(r.stageStyle),"data-stage-id":r.stage?.id,"aria-describedby":`stage-${r.stage?.id}-description`,onMouseenter:t[10]||(t[10]=(...l)=>r.onNodeEnter&&r.onNodeEnter(...l)),onMouseleave:t[11]||(t[11]=(...l)=>r.onNodeLeave&&r.onNodeLeave(...l)),onClick:t[12]||(t[12]=(...l)=>r.onSelected&&r.onSelected(...l)),onKeydown:[t[13]||(t[13]=Ie(ze((...l)=>r.openActions&&r.openActions(...l),["stop","prevent"]),["enter"])),t[14]||(t[14]=Ie(ze((...l)=>r.openActions&&r.openActions(...l),["prevent","stop"]),["space"])),t[15]||(t[15]=Ie((...l)=>r.closeActions&&r.closeActions(...l),["esc"])),t[16]||(t[16]=Ie((...l)=>r.closeActions&&r.closeActions(...l),["tab"]))]},[we(" Dropdown Overlay "),i.showActions?(re(),he("div",Tx)):we("v-if",!0),we(" Actions Dropdown "),i.showActions?(re(),he("nav",{key:1,id:`stage-actions-menu-${r.stage?.id}`,ref:"actionsMenu",class:"workflow-browser-actions-list position-absolute top-25-px end-20-px opacity-100 d-flex flex-column border rounded shadow-sm z-3 p-1","aria-orientation":"vertical","aria-labelledby":`stage-${r.stage?.id}-menu-button`,onMouseenter:t[6]||(t[6]=(...l)=>r.onDropdownEnter&&r.onDropdownEnter(...l))},[Q("span",Ix,pe(e.sprintf("COM_WORKFLOW_GRAPH_STAGE_ACTIONS",r.stage?.title)),1),r.stage?.permissions?.edit?(re(),he("button",{key:0,ref:"editButton",class:"btn btn-sm btn-secondary text-start text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_EDIT_STAGE"),onClick:t[0]||(t[0]=(...l)=>r.handleEdit&&r.handleEdit(...l)),onKeydown:[t[1]||(t[1]=Ie((...l)=>r.handleEdit&&r.handleEdit(...l),["enter"])),t[2]||(t[2]=Ie((...l)=>r.handleEdit&&r.handleEdit(...l),["space"]))]},[t[17]||(t[17]=Q("span",{class:"icon icon-pencil-alt me-1","aria-hidden":"true"},null,-1)),Lt(" "+pe(e.translate("COM_WORKFLOW_GRAPH_EDIT_STAGE")),1)],40,Px)):we("v-if",!0),r.stage?.permissions?.delete&&!r.stage.default?(re(),he("button",{key:1,ref:"deleteButton",class:"btn btn-sm btn-danger mt-1 text-start text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_TRASH_STAGE"),onClick:t[3]||(t[3]=(...l)=>r.handleDelete&&r.handleDelete(...l)),onKeydown:[t[4]||(t[4]=Ie((...l)=>r.handleDelete&&r.handleDelete(...l),["enter"])),t[5]||(t[5]=Ie(ze((...l)=>r.handleDelete&&r.handleDelete(...l),["prevent","stop"]),["space"]))]},[t[18]||(t[18]=Q("span",{class:"icon icon-trash me-1","aria-hidden":"true"},null,-1)),Lt(" "+pe(e.translate("COM_WORKFLOW_GRAPH_TRASH_STAGE")),1)],40,Rx)):we("v-if",!0)],40,Mx)):we("v-if",!0),we(" Connection Handles "),r.stage.published?(re(),he("div",Dx,[Ce(s,{type:"target",class:We(["edge-handler bg-success position-absolute top-0 start-50 translate-middle-x rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions||!r.isConnecting}]),position:r.Position.Top,"aria-hidden":"true"},null,8,["class","position"]),Ce(s,{type:"source",class:We(["edge-handler bg-success position-absolute bottom-0 start-50 translate-middle-x rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions}]),position:r.Position.Bottom,"aria-hidden":"true"},null,8,["class","position"]),Ce(s,{type:"target",class:We(["edge-handler bg-success position-absolute top-50 start-0 translate-middle-y rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions||!r.isConnecting}]),position:r.Position.Left,"aria-hidden":"true"},null,8,["class","position"]),Ce(s,{type:"source",class:We(["edge-handler bg-success position-absolute top-50 end-0 translate-middle-y rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions}]),position:r.Position.Right,"aria-hidden":"true"},null,8,["position","class"])])):we("v-if",!0),Q("div",kx,[Q("div",$x,[Q("span",{class:"h3 d-block card-title mb-1 text-white fw-semibold text-truncate",title:e.translate(r.stage?.title)},pe(e.translate(r.stage.title)),9,Lx),Q("span",{id:`stage-${r.stage?.id}-description`,class:"card-text text-white-50 mb-0 text-truncate d-block",title:e.translate(r.stage?.description?r.stage.description:"")},pe(e.translate(r.stage.description?r.stage.description:"")),9,Fx)]),we(" Actions Button "),n.data?.isSpecial?we("v-if",!0):(re(),he("div",Hx,[Q("button",{id:`stage-${r.stage?.id}-menu-button`,ref:"menuButton",class:We(["btn btn-sm btn-light px-1 py-0",{invisible:!i.isHoveredOrFocused&&!i.showActions}]),style:{transition:"opacity 0.2s ease"},title:i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",r.stage?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",r.stage?.title),"aria-haspopup":"true","aria-expanded":i.showActions,"aria-controls":`stage-actions-menu-${r.stage?.id}`,onClick:t[7]||(t[7]=ze((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"])),onKeydown:[t[8]||(t[8]=Ie(ze((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"]),["enter"])),t[9]||(t[9]=Ie(ze((...l)=>r.toggleActions&&r.toggleActions(...l),["prevent","stop"]),["space"]))]},[Q("span",{class:We(i.showActions?"icon icon-times":"icon icon-ellipsis-h"),"aria-hidden":"true"},null,2),Q("span",Bx,pe(i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",r.stage?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",r.stage?.title)),1)],42,Wx)]))]),we(" Body "),Q("div",zx,[Q("div",Gx,[Q("span",{class:We([r.stage.published?"bg-success":"bg-danger","badge rounded-pill p-1"])},pe(r.stage.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")),3),r.stage.default?(re(),he("span",Vx,pe(e.translate("COM_WORKFLOW_GRAPH_DEFAULT")),1)):we("v-if",!0)])])],44,Nx)}Zl.render=Kx,Zl.__file="administrator/components/com_workflow/resources/scripts/components/nodes/StageNode.vue";var Jl={name:"CustomEdge",components:{EdgeLabelRenderer:Tw},props:{id:{type:String,default:""},sourceX:{type:Number,default:0},sourceY:{type:Number,default:0},targetX:{type:Number,default:0},targetY:{type:Number,default:0},sourcePosition:{type:String,default:""},targetPosition:{type:String,default:""},style:{type:Object,default:()=>({})},markerEnd:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},data(){return{showActions:!1,isHovered:!1,maxWidth:100,blurTimeout:null,hoverTimeout:null}},computed:{edgeData(){const e=this.data?.offsetIndex||0,t=this.targetX-this.sourceX,n=this.targetY-this.sourceY,o=Math.sqrt(t*t+n*n)||1,i=-n/o,r=t/o,s=40*e,l=(this.sourceX+this.targetX)/2+i*s,a=(this.sourceY+this.targetY)/2+r*s;return Rr({sourceX:this.sourceX,sourceY:this.sourceY,targetX:this.targetX,targetY:this.targetY,sourcePosition:this.sourcePosition,targetPosition:this.targetPosition,centerX:l,centerY:a,borderRadius:10,offset:10})},edgePath(){return this.edgeData[0]},labelX(){return this.edgeData[1]+((this.data?.isBiDirectional&&this.sourceY<this.targetY&&this.data?.offsetIndex?this.data?.offsetIndex:0)||0)*this.maxWidth},labelY(){return this.edgeData[2]+((this.data?.isBiDirectional&&this.sourceY>this.targetY&&this.data?.offsetIndex?this.data?.offsetIndex:0)||0)*75},sourceStageTitle(){return this.data?.from_stage_title||`JSTAGE ${this.data?.from_stage_id||"Unknown"}`},targetStageTitle(){return this.data?.to_stage_title||`JSTAGE ${this.data?.to_stage_id||"Unknown"}`},menuItems(){const e=[];return this.data?.permissions?.edit&&this.$refs.editButton&&e.push(this.$refs.editButton),this.data?.permissions?.delete&&this.$refs.deleteButton&&e.push(this.$refs.deleteButton),e}},watch:{"data.title":{handler:"updateLabelWidth",immediate:!0}},mounted(){this.updateLabelWidth()},beforeUnmount(){this.blurTimeout&&clearTimeout(this.blurTimeout),this.hoverTimeout&&clearTimeout(this.hoverTimeout)},methods:{toggleActions(){this.showActions?this.closeActions():this.openActions()},openActions(){this.data?.onSelect?.(),this.showActions=!0,this.$nextTick(()=>{const e=this.$refs.editButton||this.$refs.deleteButton;e&&e.focus()}),document.addEventListener("click",this.closeActions)},closeActions(){this.showActions&&document.removeEventListener("click",this.closeActions),this.data.onEscape?.(),clearTimeout(this.hoverTimeout),clearTimeout(this.blurTimeout),this.showActions=!1,this.$nextTick(()=>{this.$refs.menuButton&&this.$refs.menuButton.focus()})},handleEdit(){this.closeActions(),this.data?.onEdit?.()},handleDelete(){this.closeActions(),this.data?.onDelete?.()},onNodeEnter(){clearTimeout(this.hoverTimeout),this.isHovered=!0},onNodeLeave(){this.hoverTimeout=setTimeout(()=>{this.showActions||(this.isHovered=!1)},100)},onDropdownEnter(){clearTimeout(this.blurTimeout)},onSelected(){return this.data?.onSelect?.()},updateLabelWidth(){this.$nextTick(()=>{if(this.$refs.textMeasurer){const e=this.$refs.textMeasurer.offsetWidth;this.maxWidth=Math.min(e+50,300)}})}}};const Ux=["aria-label"],Yx=["d","aria-label","stroke","stroke-width","stroke-dasharray","marker-end"],Xx=["data-edge-id","aria-pressed"],qx={key:0,class:"position-absolute top-25-px end-20-px h-100 rounded bg-secondary bg-opacity-75 pe-none","aria-hidden":"true"},jx={class:"custom-edge d-flex flex-column border rounded shadow-sm position-absolute"},Zx=["id","aria-labelledby"],Jx={class:"visually-hidden"},Qx=["title"],eA=["title"],tA={class:"d-flex justify-content-around align-items-center p-1 pe-1 z-1 position-relative"},nA=["title"],oA={class:"align-items-center d-flex position-relative"},iA=["id","title","aria-expanded","aria-controls"],rA={class:"visually-hidden"};function sA(e,t,n,o,i,r){const s=$t("EdgeLabelRenderer");return re(),he("g",{role:"group","aria-label":e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION",n.data?.title,r.sourceStageTitle,r.targetStageTitle)},[Q("path",{d:r.edgePath,fill:"none",role:"img","aria-label":e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_PATH",n.data?.title),stroke:n.style?.stroke||"#333","stroke-width":n.style?.strokeWidth||2,"stroke-dasharray":n.style?.strokeDasharray,"marker-end":n.markerEnd},null,8,Yx),Ce(s,null,{default:gn(()=>[Q("div",{ref:"edgeLabel",class:"edge-label position-absolute cursor-pointer",tabindex:"0",role:"button","data-edge-id":n.data?.id,"aria-pressed":n.data?.isSelected?"true":"false",style:Ye({width:i.maxWidth+10+"px",height:"30px",transform:"translate(-50%, -50%)",left:r.labelX+"px",top:r.labelY+"px",pointerEvents:"all",zIndex:i.showActions?20:10}),onMouseenter:t[10]||(t[10]=(...l)=>r.onNodeEnter&&r.onNodeEnter(...l)),onMouseleave:t[11]||(t[11]=(...l)=>r.onNodeLeave&&r.onNodeLeave(...l)),onClick:t[12]||(t[12]=(...l)=>r.onSelected&&r.onSelected(...l)),onKeydown:[t[13]||(t[13]=Ie(ze((...l)=>r.openActions&&r.openActions(...l),["stop","prevent"]),["enter"])),t[14]||(t[14]=Ie(ze((...l)=>r.openActions&&r.openActions(...l),["prevent","stop"]),["space"])),t[15]||(t[15]=Ie((...l)=>r.closeActions&&r.closeActions(...l),["esc"])),t[16]||(t[16]=Ie((...l)=>r.closeActions&&r.closeActions(...l),["tab"]))]},[i.showActions?(re(),he("div",qx)):we("v-if",!0),Q("div",jx,[i.showActions?(re(),he("nav",{key:0,id:`edge-actions-menu-${n.data?.id}`,ref:"actionsMenu",class:"workflow-browser-actions-list position-absolute top-25-px end-20-px opacity-100 d-flex flex-column border rounded shadow-sm p-1",role:"menu","aria-orientation":"vertical","aria-labelledby":`transition-${n.data?.id}-menu-button`,onMouseenter:t[6]||(t[6]=(...l)=>r.onDropdownEnter&&r.onDropdownEnter(...l))},[Q("span",Jx,pe(e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_ACTIONS",n.data?.title)),1),n.data?.permissions?.edit?(re(),he("button",{key:0,ref:"editButton",class:"btn btn-sm btn-secondary text-start text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_EDIT_TRANSITION"),onClick:t[0]||(t[0]=(...l)=>r.handleEdit&&r.handleEdit(...l)),onKeydown:[t[1]||(t[1]=Ie(ze((...l)=>r.handleEdit&&r.handleEdit(...l),["stop","prevent"]),["enter"])),t[2]||(t[2]=Ie(ze((...l)=>r.handleEdit&&r.handleEdit(...l),["prevent","stop"]),["space"]))]},[t[17]||(t[17]=Q("span",{class:"icon icon-pencil-alt me-1","aria-hidden":"true"},null,-1)),Lt(" "+pe(e.translate("COM_WORKFLOW_GRAPH_EDIT_TRANSITION")),1)],40,Qx)):we("v-if",!0),n.data?.permissions?.delete?(re(),he("button",{key:1,ref:"deleteButton",class:"btn btn-sm btn-danger text-start mt-1 text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_TRASH_TRANSITION"),onClick:t[3]||(t[3]=(...l)=>r.handleDelete&&r.handleDelete(...l)),onKeydown:[t[4]||(t[4]=Ie(ze((...l)=>r.handleDelete&&r.handleDelete(...l),["stop","prevent"]),["enter"])),t[5]||(t[5]=Ie(ze((...l)=>r.handleDelete&&r.handleDelete(...l),["prevent","stop"]),["space"]))]},[t[18]||(t[18]=Q("span",{class:"icon icon-trash me-1","aria-hidden":"true"},null,-1)),Lt(" "+pe(e.translate("COM_WORKFLOW_GRAPH_TRASH_TRANSITION")),1)],40,eA)):we("v-if",!0)],40,Zx)):we("v-if",!0),Q("div",tA,[Q("span",{class:"h4 d-block card-title text-white fw-semibold text-truncate ms-4",title:e.translate(n.data?.title)},pe(e.translate(n.data?.title)),9,nA),Q("div",oA,[Q("button",{id:`transition-${n.data?.id}-menu-button`,ref:"menuButton",class:We(["btn btn-sm btn-secondary ms-1 px-1 py-0",{invisible:!i.isHovered&&!i.showActions}]),style:Ye({transition:"opacity 0.2s ease",zIndex:i.showActions?30:11,position:"relative"}),title:i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",n.data?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",n.data?.title),"aria-haspopup":"true","aria-expanded":i.showActions,"aria-controls":`edge-actions-menu-${n.data?.id}`,onClick:t[7]||(t[7]=ze((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"])),onKeydown:[t[8]||(t[8]=Ie(ze((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"]),["enter"])),t[9]||(t[9]=Ie(ze((...l)=>r.toggleActions&&r.toggleActions(...l),["prevent","stop"]),["space"]))]},[Q("span",{class:We(i.showActions?"icon icon-times":"icon icon-ellipsis-h"),"aria-hidden":"true"},null,2),Q("span",rA,pe(i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",n.data?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",n.data?.title)),1)],46,iA)])])]),we(" Hidden measurer "),Q("span",{ref:"textMeasurer",class:"fw-semibold invisible position-absolute",style:{"white-space":"nowrap","font-size":"1rem","font-family":"inherit"},"aria-hidden":"true"},pe(e.translate(n.data?.title)),513)],44,Xx)]),_:1})],8,Ux)}Jl.render=sA,Jl.__file="administrator/components/com_workflow/resources/scripts/components/edges/CustomEdge.vue";var Ql={name:"CustomControls",setup(){const{zoomIn:e,zoomOut:t,fitView:n}=Re();function o(){n({padding:.5,duration:300})}return{zoomIn:e,zoomOut:t,controlsContainer:Oe(null),customFitView:o}}};const lA={ref:"controlsContainer",class:"custom-controls position-absolute z-10 p-1",role:"list","aria-labelledby":"canvas-controls-title"},aA={id:"canvas-controls-title",class:"visually-hidden"},uA={class:"d-flex flex-column gap-1 list-unstyled mb-0 px-0"},cA=["title"],fA={class:"visually-hidden"},dA=["title"],hA={class:"visually-hidden"},gA=["title"],pA={class:"visually-hidden"};function vA(e,t,n,o,i,r){return re(),he("div",lA,[Q("span",aA,pe(e.translate("COM_WORKFLOW_GRAPH_CANVAS_VIEW_CONTROLS")),1),Q("ul",uA,[Q("li",null,[Q("button",{class:"toolbar-button custom-controls-button",title:e.translate("COM_WORKFLOW_GRAPH_ZOOM_IN"),onClick:t[0]||(t[0]=(...s)=>o.zoomIn&&o.zoomIn(...s)),onKeydown:[t[1]||(t[1]=Ie((...s)=>o.zoomIn&&o.zoomIn(...s),["enter"])),t[2]||(t[2]=Ie(ze((...s)=>o.zoomIn&&o.zoomIn(...s),["prevent"]),["space"]))]},[t[9]||(t[9]=Q("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),Q("span",fA,pe(e.translate("COM_WORKFLOW_GRAPH_ZOOM_IN")),1)],40,cA)]),Q("li",null,[Q("button",{class:"toolbar-button custom-controls-button",title:e.translate("COM_WORKFLOW_GRAPH_ZOOM_OUT"),onClick:t[3]||(t[3]=(...s)=>o.zoomOut&&o.zoomOut(...s)),onKeydown:[t[4]||(t[4]=Ie((...s)=>o.zoomOut&&o.zoomOut(...s),["enter"])),t[5]||(t[5]=Ie(ze((...s)=>o.zoomOut&&o.zoomOut(...s),["prevent"]),["space"]))]},[t[10]||(t[10]=Q("span",{class:"icon icon-minus","aria-hidden":"true"},null,-1)),Q("span",hA,pe(e.translate("COM_WORKFLOW_GRAPH_ZOOM_OUT")),1)],40,dA)]),Q("li",null,[Q("button",{class:"toolbar-button custom-controls-button",title:e.translate("COM_WORKFLOW_GRAPH_FIT_VIEW"),onClick:t[6]||(t[6]=(...s)=>o.customFitView&&o.customFitView(...s)),onKeydown:[t[7]||(t[7]=Ie((...s)=>o.customFitView&&o.customFitView(...s),["enter"])),t[8]||(t[8]=Ie(ze((...s)=>o.customFitView&&o.customFitView(...s),["prevent"]),["space"]))]},[t[11]||(t[11]=Q("span",{class:"icon icon-expand","aria-hidden":"true"},null,-1)),Q("span",pA,pe(e.translate("COM_WORKFLOW_GRAPH_FIT_VIEW")),1)],40,gA)])])],512)}Ql.render=vA,Ql.__file="administrator/components/com_workflow/resources/scripts/components/canvas/CustomControls.vue";function mA(e){return e?.color||"rgb(var(--primary-rgb))"}function yA(e){return"hsl("+parseInt(e?.id,10)*199%360+", 70%, 60%)"}function _A(e,t){return t?yA(e):e!=null&&e.published?"#3B82F6":e.from_stage_id===-1||e.to_stage_id===-1?"#F97316":"#10B981"}function wA(e,t){let n;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function bA(){return document.dir==="rtl"}var ea={name:"ControlsPanel",components:{Panel:pd},emits:["add-stage","add-transition"],computed:{panelPosition(){return bA()?"top-right":"top-left"}}};const SA={id:"controls-panel-title",class:"visually-hidden"},EA=["aria-label","title"],xA=["aria-label","title"];function AA(e,t,n,o,i,r){const s=$t("Panel");return re(),Xe(s,{position:r.panelPosition,role:"list","aria-labelledby":"controls-panel-title",class:"d-flex gap-2 p-2"},{default:gn(()=>[Q("span",SA,pe(e.translate("COM_WORKFLOW_GRAPH_CONTROLS")),1),Q("button",{class:"toolbar-button btn btn-primary d-flex align-items-center gap-1","aria-label":e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE"),title:`${e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE")} (Alt+N)`,onClick:t[0]||(t[0]=l=>e.$emit("add-stage")),onKeydown:[t[1]||(t[1]=Ie(ze(l=>e.$emit("add-stage"),["prevent"]),["enter"])),t[2]||(t[2]=Ie(ze(l=>e.$emit("add-stage"),["prevent"]),["space"]))]},[t[6]||(t[6]=Q("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),Lt(" "+pe(e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE")),1)],40,EA),Q("button",{class:"toolbar-button btn btn-info d-flex align-items-center gap-1","aria-label":e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION"),title:`${e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION")} (Alt+M)`,onClick:t[3]||(t[3]=l=>e.$emit("add-transition")),onKeydown:[t[4]||(t[4]=Ie(ze(l=>e.$emit("add-transition"),["prevent"]),["enter"])),t[5]||(t[5]=Ie(ze(l=>e.$emit("add-transition"),["prevent"]),["space"]))]},[t[7]||(t[7]=Q("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),Lt(" "+pe(e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION")),1)],40,xA)]),_:1},8,["position"])}ea.render=AA,ea.__file="administrator/components/com_workflow/resources/scripts/components/canvas/ControlsPanel.vue";function un(e,t){!e||!t||(e.textContent="",setTimeout(()=>{e.textContent=t},10))}function ta(e,t){t===void 0&&(t=!1);const n=Array.from(document.querySelectorAll(e));if(!n.length)return;const o=n.indexOf(document.activeElement);let i;t?i=o<=0?n.length-1:o-1:i=o>=n.length-1?0:o+1,n[i].focus()}function OA(e,t,n){const i=(e.indexOf(t.value)+1)%e.length;t.value=e[i]}function CA(e){try{e.focus();const t=e.contentDocument||e.contentWindow.document;if(t){const n=t.querySelector('input:not([type="hidden"]), select, textarea');n?n.focus():t.body.focus(),t.addEventListener("keydown",o=>{if(o.code==="Escape"){o.preventDefault();const i=document.querySelector("joomla-dialog dialog[open]");i&&i.close&&i.close()}})}}catch{e.focus()}}function NA(e,t){e.value&&(e.value.focus(),e.value=null),t.dispatch("loadWorkflow",t.getters.workflowId)}function TA(e){if(e.code==="Escape"){e.preventDefault();const t=e.currentTarget;t&&t.close&&t.close()}}function MA(e,t){setTimeout(()=>{const n=document.querySelector("joomla-dialog dialog[open]");if(n){n.focus();const o=n.querySelector("iframe");o&&o.addEventListener("load",()=>{CA(o)}),n.addEventListener("close",()=>{NA(e,t)}),n.addEventListener("keydown",TA)}},100)}function IA(e,t){t===void 0&&(t={});const{gapX:n=400,gapY:o=300,paddingX:i=100,paddingY:r=100}=t,s=Math.min(4,Math.ceil(Math.sqrt(e?.length||0))+1);return e.map((l,a)=>{const u=a%s,c=Math.floor(a/s),f=l?.position||{x:u*n+i,y:c*o+r};return{id:String(l.id),type:"stage",position:f,data:{stage:ie({},l,{color:mA(l)}),isSelected:!1,onSelect:()=>{},onEdit:()=>{},onDelete:()=>{}},draggable:!0}})}function PA(e,t,n,o,i,r){return i===void 0&&(i=()=>{}),{id:e,type:"stage",position:t,data:{stage:{id:e,title:o,published:!0,color:n},isSpecial:!0,onSelect:i},draggable:r}}function RA(e,t){t===void 0&&(t={});const{selectedId:n=null}=t,o={};e.forEach(r=>{const s=r.from_stage_id===-1?"from_any":String(r.from_stage_id),l=String(r.to_stage_id),a=s+"__"+l;o[a]||(o[a]=[]),o[a].push(r)});const i=new Map;return Object.entries(o).forEach(r=>{let[s,l]=r;l.forEach((a,u)=>{i.set(a.id,u-(l.length-1)/2)})}),e.map(r=>{const s=r.from_stage_id===-1?"from_any":String(r.from_stage_id),l=String(r.to_stage_id),a=r.id===n,u=e.some(h=>h.from_stage_id===r.to_stage_id&&h.to_stage_id===r.from_stage_id);let c=i.get(r.id)||0;u&&(c+=r.from_stage_id>r.to_stage_id?1:-1);const f=_A(r,a),d=a?5:3;return{id:String(r.id),source:s,target:l,type:"custom",animated:a,style:{stroke:f,strokeWidth:d,strokeDasharray:r.published?void 0:"5,5",zIndex:a?1e3:1},markerEnd:{type:"arrow",width:10,height:10,color:f},data:ie({},r,{isSelected:a,isBiDirectional:u,offsetIndex:c,onEdit:()=>{},onDelete:()=>{}})}})}function DA(e){let{addStage:t,addTransition:n,editItem:o,deleteItem:i,setSaveStatus:r,updateSaveMessage:s,saveNodePosition:l,clearSelection:a,zoomIn:u,zoomOut:c,fitView:f,viewport:d,state:h,store:x}=e;function b(A){const E=document.querySelector("joomla-dialog dialog[open]");if(E){if(A.code==="Escape"){A.preventDefault(),E.close();return}return}const D={buttons:'button, button:not([tabindex="-1"])',stages:".stage-node",transitions:".edge-label",toolbar:".toolbar-button",actions:".action-button",links:'a[href], a[href]:not([tabindex="-1"])'};function S(O,B,U){if(!document.querySelector(".stage-node[data-stage-id='"+O+"']")||!x)return;const G=20,ee=x.getters.stages.findIndex(oe=>oe.id===parseInt(O,10));if(ee===-1)return;const te=x.getters.stages[ee].position||{x:0,y:0};if(!te)return;let{x:X,y:P}=te;switch(B){case"ArrowUp":P-=G;break;case"ArrowDown":P+=G;break;case"ArrowLeft":X-=G;break;case"ArrowRight":X+=G;break;default:return}x.dispatch("updateStagePosition",{id:O,x:X,y:P}),r("unsaved"),s(),l()}switch(!0){case(A.altKey&&A.code==="KeyN"):A.preventDefault(),t(),un(h.liveRegion,"Add stage");break;case(A.altKey&&A.code==="KeyM"):A.preventDefault(),n(),un(h.liveRegion,"Add transition");break;case A.code==="KeyE":A.preventDefault(),o();break;case(A.code==="Delete"||A.code==="Backspace"):A.preventDefault(),i();break;case A.code==="Escape":A.preventDefault(),a();break;case A.code==="Equal":A.preventDefault(),u();break;case A.code==="Minus":A.preventDefault(),c();break;case A.code==="KeyF":A.preventDefault(),f({padding:.5,duration:300});break;case A.code==="Tab":{A.preventDefault(),OA(["buttons","stages","transitions","toolbar","actions","links"],h.currentFocusMode,h.liveRegion);const O=D[h.currentFocusMode.value];if(O){const B=document.querySelector(O);B&&B.focus()}break}case["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(A.code):if(A.preventDefault(),h.selectedStage.value)if(A.shiftKey)S(h.selectedStage.value.toString(),A.code);else{const O=".stage-node[data-stage-id='"+h.selectedStage.value+`'] button[tabindex="0"]`;O&&ta(O,0)}else if(h.selectedTransition.value){const O=".edge-label[data-edge-id='"+h.selectedTransition.value+`'] button[tabindex="0"]`;O&&ta(O,0)}else if(A.shiftKey)switch(A.code){case"ArrowUp":d.value.y+=20;break;case"ArrowDown":d.value.y-=20;break;case"ArrowLeft":d.value.x+=20;break;case"ArrowRight":d.value.x-=20;break}else{const O=["ArrowLeft","ArrowUp"].includes(A.code),B=D[h.currentFocusMode.value];B&&ta(B,O)}break}}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}}class na{constructor(){this.observer=null,this.processedElements=new WeakSet}init(){this.fixVueFlowAccessibility(),this.setupMutationObserver(),this.setupVueFlowObserver()}fixVueFlowAccessibility(){this.fixSVGElements(),this.fixTabbableGroups(),this.fixGraphicsDocuments(),this.fixButtonAccessibleNames(),this.fixDuplicateSVGIds()}fixSVGElements(){[".vue-flow svg",'.vue-flow [role="graphics-document"]',".vue-flow__background svg",".vue-flow__minimap svg",".vue-flow__edge svg",".vue-flow__nodes svg",".vue-flow__edges svg",'svg[role="graphics-document"]','g[role="group"] svg','g[role="group"] [role="graphics-document"]'].forEach(n=>{document.querySelectorAll(n).forEach(i=>{this.processedElements.has(i)||(this.hideSVGFromScreenReaders(i),this.processedElements.add(i))})})}hideSVGFromScreenReaders(t){this.isInvalidForAriaHidden(t)||t.setAttribute("aria-hidden","true"),this.isInvalidForPresentationRole(t)||t.setAttribute("role","presentation"),this.isInvalidForAriaAttributes(t)||(t.removeAttribute("aria-label"),t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),t.querySelectorAll("*").forEach(o=>{this.isInvalidForAriaHidden(o)||o.setAttribute("aria-hidden","true"),this.isInvalidForPresentationRole(o)||o.setAttribute("role","presentation"),this.isInvalidForAriaAttributes(o)||(o.removeAttribute("aria-label"),o.removeAttribute("aria-labelledby"),o.removeAttribute("aria-describedby"))})}isInvalidForPresentationRole(t){var n;return["title","desc","metadata"].includes((n=t.tagName)==null?void 0:n.toLowerCase())}isInvalidForAriaHidden(t){var n;const o=(n=t.tagName)==null?void 0:n.toLowerCase();return o==="title"&&t.getAttribute("role")==="none"?!0:["title","desc","metadata"].includes(o)}isInvalidForAriaAttributes(t){var n;const o=(n=t.tagName)==null?void 0:n.toLowerCase();return["title","desc","metadata"].includes(o)}fixTabbableGroups(){document.querySelectorAll('.vue-flow [role="group"][tabindex], [role="group"][tabindex]').forEach(n=>{this.processedElements.has(n)||(n.querySelector('button, [role="button"], [role="menuitem"], input, select, textarea, a[href]')?(n.removeAttribute("tabindex"),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.mozUserSelect="none"):(n.removeAttribute("tabindex"),n.style.pointerEvents="none"),this.processedElements.add(n))})}fixGraphicsDocuments(){document.querySelectorAll('[role="graphics-document"]').forEach(n=>{this.processedElements.has(n)||(this.hideSVGFromScreenReaders(n),this.processedElements.add(n))})}fixButtonAccessibleNames(){document.querySelectorAll('.stage-node[role="button"], .edge-label[role="button"]').forEach(n=>{if(!this.processedElements.has(n)){const o=n.getAttribute("aria-label"),i=this.getVisibleText(n);o&&i&&!i.includes(o)&&!o.includes(i)&&n.removeAttribute("aria-label"),this.processedElements.add(n)}})}fixDuplicateSVGIds(){const t=new Set;document.querySelectorAll("svg [id], .vue-flow [id]").forEach(o=>{const i=o.id;if(i&&t.has(i)){const r=this.generateUniqueId(i,t);o.id=r,t.add(r)}else i&&t.add(i)})}generateUniqueId(t,n){let o=1,i=t+"-"+o;for(;n.has(i);)o++,i=t+"-"+o;return i}getVisibleText(t){const n=t.querySelector(".card-title");if(n)return n.textContent.trim();const o=t.querySelector("header .card-title");return o?o.textContent.trim():t.textContent.trim().split(` `)[0].trim()}setupMutationObserver(){this.observer=new MutationObserver(t=>{let n=!1;t.forEach(o=>{o.type==="childList"&&o.addedNodes.length>0&&o.addedNodes.forEach(i=>{i.nodeType===Node.ELEMENT_NODE&&i.matches&&(i.matches(".vue-flow *")||i.matches("svg")||i.matches('[role="graphics-document"]')||i.matches('[role="group"]')||i.querySelector('.vue-flow *, svg, [role="graphics-document"], [role="group"]'))&&(n=!0)})}),n&&(clearTimeout(this.processTimeout),this.processTimeout=setTimeout(()=>{this.fixVueFlowAccessibility()},100))}),this.observer.observe(document.body,{childList:!0,subtree:!0})}setupVueFlowObserver(){const t=document.querySelector(".vue-flow");t&&new MutationObserver(()=>{clearTimeout(this.vueFlowTimeout),this.vueFlowTimeout=setTimeout(()=>{this.fixVueFlowAccessibility()},200)}).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["role","tabindex","aria-label","aria-hidden"]})}destroy(){this.observer&&this.observer.disconnect(),clearTimeout(this.processTimeout),clearTimeout(this.vueFlowTimeout)}}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",()=>{const e=new na;e.init(),window.workflowAccessibilityFixer=e});else{const e=new na;e.init(),window.workflowAccessibilityFixer=e}function oa(e,t){let n;t.type==="message"&&(n=3e3),Joomla.renderMessages({[t.type]:[Joomla.Text._(e)]},void 0,!0,n)}const at={success:(e,t)=>{oa(e,ie({type:"message",dismiss:!0},t))},error:(e,t)=>{oa(e,ie({type:"error",dismiss:!0},t))},notify:(e,t)=>{oa(e,ie({type:"message",dismiss:!0},t))},ask:e=>window.confirm(e)};var ia={name:"WorkflowCanvas",components:{VueFlow:Lw,Background:Kw,MiniMap:Cx,CustomControls:Ql,ControlsPanel:ea},props:{nodeTypes:{type:Object,default:()=>({stage:Zl})},edgeTypes:{type:Object,default:()=>({custom:Jl})},saveStatus:{type:Object,required:!0},setSaveStatus:{type:Function,required:!0}},setup(e,{emit:t}){const n=cc(),{fitView:o,zoomIn:i,zoomOut:r,viewport:s,setViewport:l,onViewportChange:a}=Re(),u=Oe(!1),c=Oe(null),f=Oe(null),d=Oe(null),h=Oe("upToDate"),x=Oe("links"),b=Oe(null),A=Oe(null),E=Oe(!0),D=fe(()=>n.getters.workflow||{}),S=fe(()=>n.getters.stages||[]),O=fe(()=>n.getters.transitions||[]),B=fe(()=>n.getters.loading),U=fe(()=>n.getters.error),J=fe(()=>n.getters.workflowId);function G(y){return Joomla.Text._(y)}function ee(y,...w){const v=Joomla.Text._(y);let p=0;return v.replace(/%((%)|s|d)/g,g=>{let _=w[p];return g==="%d"&&(_=parseFloat(_),Number.isNaN(_)&&(_=0)),p+=1,_})}function te(y,w=null,v={}){b.value=document.activeElement;const p=Joomla.getOptions("com_workflow",{})?.extension||"",g=`index.php?option=com_workflow&view=${y}&workflow_id=${J.value}&extension=${p}&layout=modal&tmpl=component`,_=w?`${g}&id=${w}`:g,N=Object.entries(v).map(([V,K])=>`${encodeURIComponent(V)}=${encodeURIComponent(K)}`).join("&"),L=N?`${_}&${N}`:_,F=G(w?`COM_WORKFLOW_GRAPH_EDIT_${y.toUpperCase()}`:`COM_WORKFLOW_GRAPH_ADD_${y.toUpperCase()}`),M=new aa({popupType:"iframe",textHeader:F,src:L}),z=V=>{try{V.source===(M.getBodyContent().contentWindow||window)&&(V.data&&V.data.messageType)==="joomla:content-select"&&M.close()}catch{}};window.addEventListener("message",z),M.addEventListener("joomla-dialog:close",()=>{window.removeEventListener("message",z),M.destroy()}),M.show(),MA(b,n)}function X(y,w="stage"){return w==="stage"?S.value.find(p=>p.id===parseInt(y,10))?.permissions?.edit:w==="transition"?O.value.find(p=>p.id===parseInt(y,10))?.permissions?.edit:!1}function P(y,w="stage"){return w==="stage"?S.value.find(p=>p.id===parseInt(y,10))?.permissions?.delete:w==="transition"?O.value.find(p=>p.id===parseInt(y,10))?.permissions?.delete:!1}function oe(y){u.value=!1,c.value=parseInt(y,10),f.value=null,un(d.value,ee("COM_WORKFLOW_GRAPH_STAGE_SELECTED",S?.value?.find(w=>w.id===parseInt(y,10))?.title||y))}function m(y){u.value=!0,f.value=parseInt(y,10),c.value=null,un(d.value,ee("COM_WORKFLOW_GRAPH_TRANSITION_SELECTED",O?.value?.find(w=>w.id===parseInt(y,10))?.title||y))}function T(y){X(y,"stage")&&te("stage",y)}function R(y){X(y,"transition")&&te("transition",y)}function I(){c.value=null,f.value=null,u.value=!1,un(d.value,G("COM_WORKFLOW_GRAPH_SELECTION_CLEARED"))}function C(y){P(y,"stage")&&(n.dispatch("deleteStage",{id:y,workflowId:J.value}),c.value=null)}function k(y){P(y,"transition")&&(n.dispatch("deleteTransition",{id:y,workflowId:J.value}),f.value=null)}function H(y,w){y==="stage"?C(w.toString()):k(w.toString())}function $(y,w){if(!P(w,"stage")&&y==="stage"||!P(w,"transition")&&y==="transition")return;const v=G(y==="stage"?"COM_WORKFLOW_GRAPH_TRASH_STAGE":"COM_WORKFLOW_GRAPH_TRASH_TRANSITION"),p=G(y==="stage"?ee("COM_WORKFLOW_GRAPH_TRASH_STAGE_CONFIRM",S?.value?.find(g=>g.id===parseInt(w,10))?.title||w):ee("COM_WORKFLOW_GRAPH_TRASH_TRANSITION_CONFIRM",O?.value?.find(g=>g.id===parseInt(w,10))?.title||w));aa.confirm(p,v).then(g=>{g&&H(y,w)})}function W(){D?.value?.canCreate&&(te("stage"),un(d.value,G("COM_WORKFLOW_GRAPH_ADD_STAGE_DIALOG_OPENED")))}function ne(){D?.value?.canCreate&&(te("transition"),un(d.value,G("COM_WORKFLOW_GRAPH_ADD_TRANSITION_DIALOG_OPENED")))}function se({source:y,target:w}){D?.value?.canCreate&&y&&w&&(te("transition",null,{from_stage_id:y,to_stage_id:w}),un(d.value,ee("COM_WORKFLOW_GRAPH_CREATING_TRANSITION",S?.value?.find(v=>v.id===parseInt(y,10))?.title||y,S?.value?.find(v=>v.id===parseInt(w,10))?.title||w)))}function q({edge:y}){m(y?.id)}function Y(){const y=document.getElementById("save-status");y&&(h.value==="unsaved"?(y.classList.add("text-warning"),y.textContent=G("COM_WORKFLOW_GRAPH_UNSAVED_CHANGES")):(y.classList.remove("text-warning"),y.textContent=G("COM_WORKFLOW_GRAPH_UP_TO_DATE")))}const j=wA(async()=>{await n.dispatch("updateStagePositionAjax")?(h.value="upToDate",Y(),un(d.value,G("COM_WORKFLOW_GRAPH_STAGE_POSITIONS_UPDATED"))):at.error(G("COM_WORKFLOW_GRAPH_ERROR_FAILED_TO_UPDATE_STAGE_POSITIONS"))},3e3);async function ce({node:y}){if(!y||!y.id||y.id==="from_any")return;const w=n.getters.stages.find(_=>_.id===parseInt(y.id,10))?.position,v=y.computedPosition||w||{x:0,y:0},{x:p,y:g}=v;h.value="unsaved",Y(),await n.dispatch("updateStagePosition",{id:y.id,x:p,y:g}),j()}const ve=fe(()=>{const y=IA(S.value),w=PA("from_any",{x:600,y:-200},"purple",G("COM_WORKFLOW_GRAPH_FROM_ANY"),oe,!1);return[...y.map(v=>({...v,data:{...v.data,isSelected:c.value===parseInt(v.id,10),onSelect:()=>oe(v.id),onEscape:()=>I(),onEdit:()=>T(v.id),onDelete:()=>$("stage",v.id)}})),w]}),ge=fe(()=>RA(O.value,{selectedId:f.value}).map(y=>({...y,data:{...y.data,onSelect:()=>m(y.id),onEscape:()=>I(),onDelete:()=>$("transition",y.id),onEdit:()=>R(y.id)}})));bt(()=>{A.value=new na,A.value.init();const y=DA({addStage:W,addTransition:ne,editItem:()=>{c.value?T(c.value):f.value&&R(f.value)},deleteItem:()=>{c.value?$("stage",c.value):f.value&&$("transition",f.value)},clearSelection:I,zoomIn:i,zoomOut:r,fitView:o,viewport:s,state:{selectedStage:c,selectedTransition:f,isTransitionMode:u,currentFocusMode:x,liveRegion:d.value},setSaveStatus:w=>{h.value=w},updateSaveMessage:Y,saveNodePosition:j,store:n});zi(()=>{y(),A.value&&A.value.destroy()})});let be=!1;return xe([B,U],()=>{setTimeout(()=>{if(B.value||U.value)return;const{panX:y,panY:w,zoom:v}=n.getters.canvas??{};typeof y=="number"&&!Number.isNaN(y)&&typeof w=="number"&&!Number.isNaN(w)&&typeof v=="number"&&!Number.isNaN(v)?(be=!0,Promise.resolve().then(()=>l({x:y,y:w,zoom:v})).finally(()=>{be=!1})):o({padding:.4,duration:300})},0)},{immediate:!0}),a(({x:y,y:w,zoom:v})=>{be||[y,w,v].some(p=>typeof p!="number"||Number.isNaN(p))||n.dispatch("updateCanvasViewport",{panX:y,panY:w,zoom:v})}),{loading:B,error:U,showMiniMap:E,workflow:D,stages:S,positionedNodes:ve,styledEdges:ge,liveRegion:d,handleConnect:se,selectEdge:q,handleDeleteConfirm:H,addStage:W,addTransition:ne,clearSelection:I,handleNodeDragStop:ce}}};const kA={class:"w-100 h-100 position-relative",role:"application","aria-label":"Workflow Graph"},$A={id:"workflow-controls","aria-label":"Canvas Controls",class:"workflow-controls-section"},LA={class:"visually-hidden"},FA=["title","aria-pressed"],HA={key:0,class:"fa fa-close","aria-hidden":"true"},WA={key:1,class:"icon icon-expand-2","aria-hidden":"true"},BA={class:"visually-hidden"},zA={id:"workflow-stages",class:"visually-hidden"},GA=["id"],VA={key:0},KA={id:"workflow-transitions",class:"visually-hidden"},UA=["id"],YA={key:1,class:"d-flex justify-content-center align-items-center h-100",role:"status","aria-live":"polite"},XA={class:"spinner-border",role:"status"},qA={class:"visually-hidden"},jA={class:"ms-2"},ZA={ref:"liveRegion","aria-live":"polite",role:"status",class:"visually-hidden","aria-atomic":"true"};function JA(e,t,n,o,i,r){const s=$t("Background"),l=$t("MiniMap"),a=$t("CustomControls"),u=$t("ControlsPanel"),c=$t("VueFlow");return re(),he("div",kA,[!o.loading&&!o.error?(re(),Xe(c,{key:0,class:"workflow-canvas","max-zoom":"2.5","min-zoom":".3",edges:o.styledEdges,nodes:o.positionedNodes,"node-types":n.nodeTypes,"edge-types":n.edgeTypes,"nodes-connectable":o.workflow?.canCreate,"elements-selectable":!0,"snap-to-grid":!0,"snap-grid":[40,40],"disable-keyboard-a11y":!0,role:"application","aria-label":e.translate("COM_WORKFLOW_GRAPH_CANVAS_LABEL"),onConnect:o.handleConnect,onPaneClick:o.clearSelection,onEdgeClick:o.selectEdge,onNodeDragStop:o.handleNodeDragStop},{default:gn(()=>[Ce(s,{"pattern-color":"var(--body-color)",gap:16,"aria-label":e.translate("COM_WORKFLOW_GRAPH_BACKGROUND"),title:e.translate("COM_WORKFLOW_GRAPH_BACKGROUND")},null,8,["aria-label","title"]),we(" Controls Section "),Q("section",$A,[Q("span",LA,pe(e.translate("COM_WORKFLOW_GRAPH_CONTROLS")),1),we(" Minimap Toggle "),Q("button",{id:"toggle-minimap",class:"toolbar-button custom-controls-button position-absolute z-20 ps-2 pe-2",tabindex:"0",style:Ye(o.showMiniMap?"bottom: 130px; left: 175px;":"bottom: 10px; left: 10px;"),title:o.showMiniMap?e.translate("COM_WORKFLOW_GRAPH_MINIMAP_HIDE"):e.translate("COM_WORKFLOW_GRAPH_MINIMAP_SHOW"),"aria-pressed":o.showMiniMap?"true":"false",onClick:t[0]||(t[0]=f=>o.showMiniMap=!o.showMiniMap)},[o.showMiniMap?(re(),he("span",HA)):(re(),he("span",WA)),Q("span",BA,pe(o.showMiniMap?e.translate("COM_WORKFLOW_GRAPH_MINIMAP_HIDE"):e.translate("COM_WORKFLOW_GRAPH_MINIMAP_SHOW")),1)],12,FA),o.showMiniMap?(re(),Xe(l,{key:0,class:"z-10",position:"bottom-left",pannable:"",zoomable:"","aria-label":e.translate("COM_WORKFLOW_GRAPH_MINIMAP_LABEL"),"node-color":f=>f.data?.stage?.color||"#0d6efd","mask-color":"rgba(255, 255, 255, .6)"},null,8,["aria-label","node-color"])):we("v-if",!0),Ce(a,{"aria-label":e.translate("COM_WORKFLOW_GRAPH_CONTROLS")},null,8,["aria-label"]),o.workflow?.canCreate?(re(),Xe(u,{key:1,class:"canvas-controls-panel",onAddStage:o.addStage,onAddTransition:o.addTransition},null,8,["onAddStage","onAddTransition"])):we("v-if",!0)]),we(" Workflow Content Sections "),Q("section",zA,[Q("span",null,"("+pe(o.positionedNodes.length)+" "+pe(o.positionedNodes.length===1?e.translate("COM_WORKFLOW_GRAPH_STAGE"):e.translate("COM_WORKFLOW_GRAPH_STAGES"))+")",1),Q("ul",null,[(re(!0),he(Le,null,Jn(o.positionedNodes,f=>(re(),he("li",{key:`stage-${f.id}`,id:`stage-list-${f.id}`},[Lt(pe(e.sprintf("COM_WORKFLOW_GRAPH_STAGE_REF",f.data.stage?.title))+" - "+pe(f.data.stage.published?e.sprintf("COM_WORKFLOW_GRAPH_STAGE_STATUS_ENABLED",f.data.stage?.title):e.sprintf("COM_WORKFLOW_GRAPH_STAGE_STATUS_DISABLED",f.data.stage?.title))+". ",1),f.data.stage.default?(re(),he("span",VA,"("+pe(e.translate("COM_WORKFLOW_GRAPH_STAGE_DEFAULT"))+")",1)):we("v-if",!0),Lt(" "+pe(f.data.stage?.description?e.sprintf("COM_WORKFLOW_GRAPH_STAGE_DESCRIPTION",f.data.stage?.description):""),1)],8,GA))),128))])]),Q("section",KA,[Q("span",null,"("+pe(o.styledEdges.length)+" "+pe(o.styledEdges.length===1?e.translate("COM_WORKFLOW_GRAPH_TRANSITION"):e.translate("COM_WORKFLOW_GRAPH_TRANSITIONS"))+")",1),Q("ul",null,[(re(!0),he(Le,null,Jn(o.styledEdges,f=>(re(),he("li",{key:`transition-${f.id}`,id:`transition-list-${f.id}`},pe(e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_REF",f.data.title,o.stages.find(d=>d.id===parseInt(f.source,10))?.title||e.translate("COM_WORKFLOW_GRAPH_FROM_ANY"),o.stages.find(d=>d.id===parseInt(f.target,10))?.title))+" "+pe(f.data.published?e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_STATUS_ENABLED",f.data.title):e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_STATUS_DISABLED",f.data.title)),9,UA))),128))])])]),_:1},8,["edges","nodes","node-types","edge-types","nodes-connectable","aria-label","onConnect","onPaneClick","onEdgeClick","onNodeDragStop"])):we("v-if",!0),we(" Loading State "),o.loading?(re(),he("div",YA,[Q("div",XA,[Q("span",qA,pe(e.translate("COM_WORKFLOW_GRAPH_LOADING")),1)]),Q("span",jA,pe(e.translate("COM_WORKFLOW_GRAPH_LOADING")),1)])):we("v-if",!0),we(" Accessibility Live Region "),Q("div",ZA,null,512)])}ia.render=JA,ia.__file="administrator/components/com_workflow/resources/scripts/components/canvas/WorkflowCanvas.vue";const QA={id:"workflow-app",class:"d-flex flex-column flex-grow-1 min-vh-80","aria-labelledby":"workflow-main-title"},eO={id:"workflow-header",class:"d-flex flex-column flex-shrink-0"},tO={class:"d-flex flex-grow-1 overflow-hidden"},nO={id:"main-canvas",class:"flex-grow-1 position-relative","aria-describedby":"canvas-description"},oO={id:"canvas-description",class:"visually-hidden"},iO={name:"WorkflowGraphApp"};var ah=Object.assign(iO,{setup(e){const t=cc(),n=Oe("upToDate");function o(s){n.value=s}const i=Oe(null);function r(){i.value?.focus()}return bt(()=>{const{workflowId:s=null}=Joomla.getOptions("com_workflow",{}),l=parseInt(new URL(window.location.href).searchParams.get("id"),10),a=s||l;if(a!==null&&!Number.isNaN(a))t.dispatch("loadWorkflow",a);else throw new Error("COM_WORKFLOW_GRAPH_ERROR_INVALID_ID")}),(s,l)=>(re(),he("main",QA,[Q("header",eO,[Ce(Us,{"save-status":n.value},null,8,["save-status"])]),Q("div",tO,[Q("section",nO,[Q("div",oO,pe(s.translate("COM_WORKFLOW_GRAPH_CANVAS_DESCRIPTION")),1),Ce(ia,{ref_key:"canvas",ref:i,"save-status":n.value,"set-save-status":o,onFocusRequest:r},null,8,["save-status"])])])]))}});ah.__file="administrator/components/com_workflow/resources/scripts/components/App.vue";var rO=new class{constructor(){this.events={}}fire(t,n){n===void 0&&(n=null),(this.events[t]||[]).forEach(o=>o(n))}listen(t,n){this.events[t]||(this.events[t]=[]),this.events[t].push(n)}off(t,n){this.events[t]&&(this.events[t]=this.events[t].filter(o=>o!==n))}},sO={workflowId:null,workflow:null,stages:[],transitions:[],loading:!1,error:null,canvas:{zoom:null,panX:null,panY:null}},lO={SET_WORKFLOW_ID(e,t){e.workflowId=t},SET_WORKFLOW(e,t){e.workflow=t},SET_STAGES(e,t){e.stages=t.map((n,o)=>{var i,r;return ie({},n,{position:{x:typeof(n==null||(i=n.position)==null?void 0:i.x)=="number"&&!Number.isNaN(n.position.x)?n.position.x:100+o%4*400,y:typeof(n==null||(r=n.position)==null?void 0:r.y)=="number"&&!Number.isNaN(n.position.y)?n.position.y:100+Math.floor(o/4)*300}})})},SET_TRANSITIONS(e,t){e.transitions=t},SET_LOADING(e,t){e.loading=t},SET_ERROR(e,t){e.error=t},UPDATE_STAGE_POSITION(e,t){let{id:n,x:o,y:i}=t;e.stages=e.stages.map(r=>r.id.toString()===n?ie({},r,{position:{x:o,y:i}}):r)},SET_CANVAS_VIEWPORT(e,t){let{zoom:n,panX:o,panY:i}=t;e.canvas.zoom=n,e.canvas.panX=o,e.canvas.panY=i}};class aO{constructor(){const{apiBaseUrl:t,extension:n}=Joomla.getOptions("com_workflow",{});if(!t||!n)throw new TypeError(Joomla.Text._("COM_WORKFLOW_GRAPH_API_NOT_SET"));if(this.baseUrl=t,this.extension=n,this.csrfToken=Joomla.getOptions("csrf.token",null),!this.csrfToken)throw new TypeError(Joomla.Text._("COM_WORKFLOW_GRAPH_ERROR_CSRF_TOKEN_NOT_SET"))}async makeRequest(t,n){n===void 0&&(n={});const o=n.headers||{};return o["X-Requested-With"]="XMLHttpRequest",n.headers=o,n[this.csrfToken]=1,new Promise((i,r)=>{Joomla.request(ie({url:""+this.baseUrl+t+"&extension="+this.extension},n,{onSuccess:s=>{const l=JSON.parse(s);i(l)},onError:s=>{let l="COM_WORKFLOW_GRAPH_ERROR_UNKNOWN";try{const a=JSON.parse(s.responseText);l=a.data||a.message||l}catch{l=s.statusText||l}at.error(l),r(new Error(Joomla.Text._(l)))}}))})}async getWorkflow(t){return this.makeRequest("&task=graph.getWorkflow&workflow_id="+t+"&format=json")}async getStages(t){return this.makeRequest("&task=graph.getStages&workflow_id="+t+"&format=json")}async getTransitions(t){return this.makeRequest("&task=graph.getTransitions&workflow_id="+t+"&format=json")}async deleteStage(t,n,o){o===void 0&&(o=!1);try{const r=new FormData;r.append("cid[]",t),r.append("workflow_id",n),r.append("type","stage"),r.append(this.csrfToken,"1");const s=await this.makeRequest("&task="+(o?"graph.delete":"graph.trash")+"&workflow_id="+n+"&format=json",{method:"POST",data:r});if(s&&s.success){var i;at.success((s==null||(i=s.data)==null?void 0:i.message)||s?.message)}}catch(r){throw at.error(r.message),r}}async deleteTransition(t,n,o){o===void 0&&(o=!1);try{const r=new FormData;r.append("cid[]",t),r.append("workflow_id",n),r.append("type","transition"),r.append(this.csrfToken,"1");const s=await this.makeRequest("&task="+(o?"graph.delete":"graph.trash")+"&workflow_id="+n+"&format=json",{method:"POST",data:r});if(s&&s.success){var i;at.success((s==null||(i=s.data)==null?void 0:i.message)||s?.message)}}catch(r){throw at.error(r.message),r}}async updateStagePosition(t,n){try{const o=new FormData;if(o.append("workflow_id",t),o.append(this.csrfToken,"1"),n===null||Object.keys(n).length===0)return!0;Object.entries(n).forEach(r=>{let[s,l]=r;o.append("positions["+s+"][x]",l.x),o.append("positions["+s+"][y]",l.y)});const i=await this.makeRequest("&task=stages.updateStagesPosition&format=json",{method:"POST",data:o});return!!(i&&i.success)}catch(o){throw at.error(o.message),o}}}var yo=new aO,uO={async loadWorkflow(e,t){let{commit:n}=e;n("SET_LOADING",!0),n("SET_ERROR",null);try{const[i,r,s]=await Promise.all([await yo.getWorkflow(t),await yo.getStages(t),await yo.getTransitions(t)]);n("SET_WORKFLOW_ID",t),n("SET_WORKFLOW",i?.data),n("SET_STAGES",r?.data),n("SET_TRANSITIONS",s?.data)}catch(i){var o;at.error((i==null||(o=i.response)==null||(o=o.data)==null?void 0:o.message)||i?.message||"COM_WORKFLOW_GRAPH_ERROR_UNKNOWN")}finally{n("SET_LOADING",!1)}},async deleteStage(e,t){let{commit:n,dispatch:o,state:i}=e,{id:r,workflowId:s}=t;n("SET_LOADING",!0),n("SET_ERROR",null);try{const a=i.transitions.filter(c=>c.from_stage_id.toString()===r||c.to_stage_id.toString()===r);if(i.stages.length<=1||i.stages.find(c=>c.id.toString()===r).default){at.error("COM_WORKFLOW_GRAPH_ERROR_STAGE_DEFAULT_CANT_DELETED");return}if(a.length>0){at.error("COM_WORKFLOW_GRAPH_ERROR_STAGE_HAS_TRANSITIONS");return}const u=i.stages.find(c=>c.id.toString()===r).published===-1;await yo.deleteStage(r,s,u)}catch(a){var l;at.error((a==null||(l=a.response)==null||(l=l.data)==null?void 0:l.message)||a?.message||"COM_WORKFLOW_GRAPH_TRASH_STAGE_FAILED")}finally{n("SET_LOADING",!1),await o("loadWorkflow",s)}},async deleteTransition(e,t){let{commit:n,dispatch:o,state:i}=e,{id:r,workflowId:s}=t;n("SET_LOADING",!0),n("SET_ERROR",null);try{const a=i.transitions.find(u=>u.id.toString()===r).published===-1;await yo.deleteTransition(r,s,a)}catch(a){var l;at.error((a==null||(l=a.response)==null||(l=l.data)==null?void 0:l.message)||a?.message||"COM_WORKFLOW_GRAPH_TRASH_TRANSITION_FAILED")}finally{n("SET_LOADING",!1),await o("loadWorkflow",s)}},updateStagePosition(e,t){let{commit:n}=e,{id:o,x:i,y:r}=t;n("UPDATE_STAGE_POSITION",{id:o,x:i,y:r})},async updateStagePositionAjax(e){let{commit:t,state:n}=e;return await yo.updateStagePosition(n.workflowId,n.stages.reduce((i,r)=>(r.position&&(i[r.id]={x:r.position.x,y:r.position.y}),i),{}))?(t("SET_ERROR",null),!0):(at.error("COM_WORKFLOW_GRAPH_UPDATE_STAGE_POSITION_FAILED"),!1)},updateCanvasViewport(e,t){let{commit:n}=e,{zoom:o,panX:i,panY:r}=t;n("SET_CANVAS_VIEWPORT",{zoom:o,panX:i,panY:r})}},cO={workflowId:e=>e.workflowId,workflow:e=>e.workflow,stages:e=>e.stages,transitions:e=>e.transitions,loading:e=>e.loading,error:e=>e.error,canvas:e=>e.canvas};function fO(e){let{key:t="vuex",paths:n=[]}=e===void 0?{}:e;return o=>{try{const i=localStorage.getItem(t);if(i){const r=JSON.parse(i);n.forEach(s=>{r[s]!==void 0&&(o.state[s]=r[s])})}o.subscribe((r,s)=>{const l={};n.forEach(a=>{l[a]=s[a]}),localStorage.setItem(t,JSON.stringify(l))})}catch(i){window.Joomla&&window.Joomla.renderMessages&&window.Joomla.renderMessages({error:[i]})}}}var dO=cv({state:sO,mutations:lO,actions:uO,getters:cO,plugins:[fO({key:"workflow-graph-state",paths:["workflowId","stages","transitions"]})]});const Zr={translate:e=>Joomla.Text._(e,e),sprintf:function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];const r=Zr.translate(t);let s=0;return r.replace(/%((%)|s|d)/g,l=>{let a=o[s];return l==="%d"&&(a=parseFloat(a),Number.isNaN(a)&&(a=0)),s+=1,a})},install:e=>e.mixin({methods:{translate(t){return Zr.translate(t)},sprintf(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Zr.sprintf(t,...o)}}})};window.WorkflowGraph=window.WorkflowGraph||{},window.WorkflowGraph.Event=rO,document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("workflow-graph-root");if(e){const t=Lp(ah);t.use(dO),t.use(Zr),t.mount(e)}else at.error("COM_WORKFLOW_GRAPH_API_NOT_SET")});