@ubean/devtools 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-BByt7975.js +387 -0
- package/dist/client/index.html +1 -1
- package/dist/index.js +60 -40
- package/package.json +9 -9
- package/dist/client/assets/index-BLUNHNMx.js +0 -384
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ne=/-\w/g,re=te(e=>e.replace(ne,e=>e.slice(1).toUpperCase())),ie=/\B([A-Z])/g,ae=te(e=>e.replace(ie,`-$1`).toLowerCase()),oe=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),se=te(e=>e?`on${oe(e)}`:``),T=(e,t)=>!Object.is(e,t),ce=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},le=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},E=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ue=e=>{let t=g(e)?Number(e):NaN;return isNaN(t)?e:t},de,fe=()=>de||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function pe(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?_e(r):pe(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(g(e)||v(e))return e}var me=/;(?![^(]*\))/g,he=/:([^]+)/,ge=/\/\*[^]*?\*\//g;function _e(e){let t={};return e.replace(ge,``).split(me).forEach(e=>{if(e){let n=e.split(he);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function D(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=D(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function ve(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=D(t)),n&&(e.style=pe(n)),e}var ye=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,be=e(ye);ye+``;function xe(e){return!!e||e===``}function Se(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Ce(e[r],t[r]);return n}function Ce(e,t){if(e===t)return!0;let n=m(e),r=m(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=_(e),r=_(t),n||r)return e===t;if(n=d(e),r=d(t),n||r)return n&&r?Se(e,t):!1;if(n=v(e),r=v(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!Ce(e[n],t[n]))return!1}}return String(e)===String(t)}function we(e,t){return e.findIndex(e=>Ce(e,t))}var Te=e=>!!(e&&e.__v_isRef===!0),O=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?Te(e)?O(e.value):JSON.stringify(e,Ee,2):String(e),Ee=(e,t)=>Te(t)?Ee(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[De(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>De(e))}:_(t)?De(t):v(t)&&!d(t)&&!C(t)?String(t):t,De=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,Oe,ke=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Oe&&(Oe.active?(this.parent=Oe,this.index=(Oe.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=Oe;try{return Oe=this,e()}finally{Oe=t}}}on(){++this._on===1&&(this.prevScope=Oe,Oe=this)}off(){if(this._on>0&&--this._on===0){if(Oe===this)Oe=this.prevScope;else{let e=Oe;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ae(){return Oe}function je(e,t=!1){Oe&&Oe.cleanups.push(e)}var Me,Ne=new WeakSet,Pe=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Oe&&(Oe.active?Oe.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ne.has(this)&&(Ne.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Re(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ze(this),Ve(this);let e=Me,t=qe;Me=this,qe=!0;try{return this.fn()}finally{He(this),Me=e,qe=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ge(e);this.deps=this.depsTail=void 0,Ze(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ne.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ue(this)&&this.run()}get dirty(){return Ue(this)}},Fe=0,Ie,Le;function Re(e,t=!1){if(e.flags|=8,t){e.next=Le,Le=e;return}e.next=Ie,Ie=e}function ze(){Fe++}function Be(){if(--Fe>0)return;if(Le){let e=Le;for(Le=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ie;){let t=Ie;for(Ie=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ve(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function He(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ge(r),Ke(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ue(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(We(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function We(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qe)||(e.globalVersion=Qe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ue(e))))return;e.flags|=2;let t=e.dep,n=Me,r=qe;Me=e,qe=!0;try{Ve(e);let n=e.fn(e._value);(t.version===0||T(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Me=n,qe=r,He(e),e.flags&=-3}}function Ge(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ge(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ke(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var qe=!0,Je=[];function Ye(){Je.push(qe),qe=!1}function Xe(){let e=Je.pop();qe=e===void 0||e}function Ze(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Me;Me=void 0;try{t()}finally{Me=e}}}var Qe=0,eee=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},$e=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Me||!qe||Me===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Me)t=this.activeLink=new eee(Me,this),Me.deps?(t.prevDep=Me.depsTail,Me.depsTail.nextDep=t,Me.depsTail=t):Me.deps=Me.depsTail=t,et(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Me.depsTail,t.nextDep=void 0,Me.depsTail.nextDep=t,Me.depsTail=t,Me.deps===t&&(Me.deps=e)}return t}trigger(e){this.version++,Qe++,this.notify(e)}notify(e){ze();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Be()}}};function et(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)et(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var tt=new WeakMap,nt=Symbol(``),rt=Symbol(``),it=Symbol(``);function at(e,t,n){if(qe&&Me){let t=tt.get(e);t||tt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new $e),r.map=t,r.key=n),r.track()}}function ot(e,t,n,r,i,a){let o=tt.get(e);if(!o){Qe++;return}let s=e=>{e&&e.trigger()};if(ze(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===it||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(it)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(nt)),f(e)&&s(o.get(rt)));break;case`delete`:i||(s(o.get(nt)),f(e)&&s(o.get(rt)));break;case`set`:f(e)&&s(o.get(nt));break}}Be()}function st(e){let t=Jt(e);return t===e?t:(at(t,`iterate`,it),Kt(e)?t:t.map(Xt))}function ct(e){return at(e=Jt(e),`iterate`,it),e}function lt(e,t){return Gt(e)?Zt(Wt(e)?Xt(t):t):Xt(t)}var ut={__proto__:null,[Symbol.iterator](){return dt(this,Symbol.iterator,e=>lt(this,e))},concat(...e){return st(this).concat(...e.map(e=>d(e)?st(e):e))},entries(){return dt(this,`entries`,e=>(e[1]=lt(this,e[1]),e))},every(e,t){return pt(this,`every`,e,t,void 0,arguments)},filter(e,t){return pt(this,`filter`,e,t,e=>e.map(e=>lt(this,e)),arguments)},find(e,t){return pt(this,`find`,e,t,e=>lt(this,e),arguments)},findIndex(e,t){return pt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return pt(this,`findLast`,e,t,e=>lt(this,e),arguments)},findLastIndex(e,t){return pt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return pt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ht(this,`includes`,e)},indexOf(...e){return ht(this,`indexOf`,e)},join(e){return st(this).join(e)},lastIndexOf(...e){return ht(this,`lastIndexOf`,e)},map(e,t){return pt(this,`map`,e,t,void 0,arguments)},pop(){return gt(this,`pop`)},push(...e){return gt(this,`push`,e)},reduce(e,...t){return mt(this,`reduce`,e,t)},reduceRight(e,...t){return mt(this,`reduceRight`,e,t)},shift(){return gt(this,`shift`)},some(e,t){return pt(this,`some`,e,t,void 0,arguments)},splice(...e){return gt(this,`splice`,e)},toReversed(){return st(this).toReversed()},toSorted(e){return st(this).toSorted(e)},toSpliced(...e){return st(this).toSpliced(...e)},unshift(...e){return gt(this,`unshift`,e)},values(){return dt(this,`values`,e=>lt(this,e))}};function dt(e,t,n){let r=ct(e),i=r[t]();return r!==e&&!Kt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var ft=Array.prototype;function pt(e,t,n,r,i,a){let o=ct(e),s=o!==e&&!Kt(e),c=o[t];if(c!==ft[t]){let t=c.apply(e,a);return s?Xt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,lt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function mt(e,t,n,r){let i=ct(e),a=i!==e&&!Kt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=lt(e,t)),n.call(this,t,lt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?lt(e,c):c}function ht(e,t,n){let r=Jt(e);at(r,`iterate`,it);let i=r[t](...n);return(i===-1||i===!1)&&qt(n[0])?(n[0]=Jt(n[0]),r[t](...n)):i}function gt(e,t,n=[]){Ye(),ze();let r=Jt(e)[t].apply(e,n);return Be(),Xe(),r}var _t=e(`__proto__,__v_isRef,__isVue`),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function yt(e){_(e)||(e=String(e));let t=Jt(this);return at(t,`has`,e),t.hasOwnProperty(e)}var bt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Lt:It:i?Ft:Pt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=ut[t]))return e;if(t===`hasOwnProperty`)return yt}let o=Reflect.get(e,t,Qt(e)?e:n);if((_(t)?vt.has(t):_t(t))||(r||at(e,`get`,t),i))return o;if(Qt(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Vt(e):e}return v(o)?r?Vt(o):zt(o):o}},xt=class extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Gt(i);if(!Kt(n)&&!Gt(n)&&(i=Jt(i),n=Jt(n)),!a&&Qt(i)&&!Qt(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,Qt(e)?e:r);return e===Jt(r)&&s&&(o?T(n,i)&&ot(e,`set`,t,n,i):ot(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&ot(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!_(t)||!vt.has(t))&&at(e,`has`,t),n}ownKeys(e){return at(e,`iterate`,d(e)?`length`:nt),Reflect.ownKeys(e)}},St=class extends bt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Ct=new xt,wt=new St,Tt=new xt(!0),Et=new St(!0),Dt=e=>e,Ot=e=>Reflect.getPrototypeOf(e);function kt(e,t,n){return function(...r){let i=this.__v_raw,a=Jt(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?Dt:t?Zt:Xt;return!t&&at(a,`iterate`,l?rt:nt),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function At(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function jt(e,t){let n={get(n){let r=this.__v_raw,i=Jt(r),a=Jt(n);e||(T(n,a)&&at(i,`get`,n),at(i,`get`,a));let{has:o}=Ot(i),s=t?Dt:e?Zt:Xt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&at(Jt(t),`iterate`,nt),t.size},has(t){let n=this.__v_raw,r=Jt(n),i=Jt(t);return e||(T(t,i)&&at(r,`has`,t),at(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=Jt(a),s=t?Dt:e?Zt:Xt;return!e&&at(o,`iterate`,nt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:At(`add`),set:At(`set`),delete:At(`delete`),clear:At(`clear`)}:{add(e){let n=Jt(this),r=Ot(n),i=Jt(e),a=!t&&!Kt(e)&&!Gt(e)?i:e;return r.has.call(n,a)||T(e,a)&&r.has.call(n,e)||T(i,a)&&r.has.call(n,i)||(n.add(a),ot(n,`add`,a,a)),this},set(e,n){!t&&!Kt(n)&&!Gt(n)&&(n=Jt(n));let r=Jt(this),{has:i,get:a}=Ot(r),o=i.call(r,e);o||=(e=Jt(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?T(n,s)&&ot(r,`set`,e,n,s):ot(r,`add`,e,n),this},delete(e){let t=Jt(this),{has:n,get:r}=Ot(t),i=n.call(t,e);i||=(e=Jt(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&ot(t,`delete`,e,void 0,a),o},clear(){let e=Jt(this),t=e.size!==0,n=e.clear();return t&&ot(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=kt(r,e,t)}),n}function Mt(e,t){let n=jt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Nt={get:Mt(!1,!1)},tee={get:Mt(!1,!0)},nee={get:Mt(!0,!1)},ree={get:Mt(!0,!0)},Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap;function Rt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function zt(e){return Gt(e)?e:Ut(e,!1,Ct,Nt,Pt)}function Bt(e){return Ut(e,!1,Tt,tee,Ft)}function Vt(e){return Ut(e,!0,wt,nee,It)}function Ht(e){return Ut(e,!0,Et,ree,Lt)}function Ut(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Rt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Wt(e){return Gt(e)?Wt(e.__v_raw):!!(e&&e.__v_isReactive)}function Gt(e){return!!(e&&e.__v_isReadonly)}function Kt(e){return!!(e&&e.__v_isShallow)}function qt(e){return e?!!e.__v_raw:!1}function Jt(e){let t=e&&e.__v_raw;return t?Jt(t):e}function Yt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&le(e,`__v_skip`,!0),e}var Xt=e=>v(e)?zt(e):e,Zt=e=>v(e)?Vt(e):e;function Qt(e){return e?e.__v_isRef===!0:!1}function k(e){return $t(e,!1)}function A(e){return $t(e,!0)}function $t(e,t){return Qt(e)?e:new en(e,t)}var en=class{constructor(e,t){this.dep=new $e,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Jt(e),this._value=t?e:Xt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Kt(e)||Gt(e);e=n?e:Jt(e),T(e,t)&&(this._rawValue=e,this._value=n?e:Xt(e),this.dep.trigger())}};function j(e){return Qt(e)?e.value:e}function tn(e){return h(e)?e():j(e)}var nn={get:(e,t,n)=>t===`__v_raw`?e:j(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return Qt(i)&&!Qt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function rn(e){return Wt(e)?e:new Proxy(e,nn)}var an=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new $e,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function on(e){return new an(e)}var sn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new $e(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return Re(this,!0),!0}get value(){let e=this.dep.track();return We(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function cn(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new sn(r,i,n)}var ln={},un=new WeakMap,dn=void 0;function fn(e,t=!1,n=dn){if(n){let t=un.get(n);t||un.set(n,t=[]),t.push(e)}}function pn(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Kt(e)||o===!1||o===0?mn(e,1):mn(e),m,g,_,v,y=!1,b=!1;if(Qt(e)?(g=()=>e.value,y=Kt(e)):Wt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Wt(e)||Kt(e)),g=()=>e.map(e=>{if(Qt(e))return e.value;if(Wt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Ye();try{_()}finally{Xe()}}let t=dn;dn=m;try{return f?f(e,3,[v]):e(v)}finally{dn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>mn(e(),t)}let x=Ae(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(ln):ln,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>T(e,C[t])):T(t,C))){_&&_();let e=dn;dn=m;try{let e=[t,C===ln?void 0:b&&C[0]===ln?[]:C,v];C=t,f?f(n,3,e):n(...e)}finally{dn=e}}}else m.run()};return u&&u(w),m=new Pe(g),m.scheduler=l?()=>l(w,!1):w,v=e=>fn(e,!1,m),_=m.onStop=()=>{let e=un.get(m);if(e){if(f)f(e,4);else for(let t of e)t();un.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function mn(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Qt(e))mn(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)mn(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{mn(e,t,n)});else if(C(e)){for(let r in e)mn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&mn(e[r],t,n)}return e}function hn(e,t,n,r){try{return r?e(...r):e()}catch(e){_n(e,t,n)}}function gn(e,t,n,r){if(h(e)){let i=hn(e,t,n,r);return i&&y(i)&&i.catch(e=>{_n(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(gn(e[a],t,n,r));return i}}function _n(e,n,r,i=!0){let a=n?n.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=n&&n.appContext.config||t;if(n){let t=n.parent,i=n.proxy,a=`https://vuejs.org/error-reference/#runtime-${r}`;for(;t;){let n=t.ec;if(n){for(let t=0;t<n.length;t++)if(n[t](e,i,a)===!1)return}t=t.parent}if(o){Ye(),hn(o,null,10,[e,i,a]),Xe();return}}vn(e,r,a,i,s)}function vn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var yn=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=yn.length;for(;t<n;){let r=t+n>>>1,i=yn[r],a=Nn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Nn(e),n=yn[yn.length-1];!n||!(e.flags&2)&&t>=Nn(n)?yn.push(e):yn.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(Pn)}function An(e){d(e)?xn.push(...e):Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),kn()}function jn(e,t,n=bn+1){for(;n<yn.length;n++){let t=yn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;yn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Mn(e){if(xn.length){let e=[...new Set(xn)].sort((e,t)=>Nn(e)-Nn(t));if(xn.length=0,Sn){Sn.push(...e);return}for(Sn=e,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pn(e){try{for(bn=0;bn<yn.length;bn++){let e=yn[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),hn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<yn.length;bn++){let e=yn[bn];e&&(e.flags&=-2)}bn=-1,yn.length=0,Mn(e),Tn=null,(yn.length||xn.length)&&Pn(e)}}var Fn=null,In=null;function Ln(e){let t=Fn;return Fn=e,In=e&&e.type.__scopeId||null,t}function Rn(e,t=Fn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Sa(-1);let i=Ln(t),a=va.length,o;try{o=e(...n)}finally{for(let e=va.length;e>a;e--)ba();Ln(i),r._d&&Sa(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function zn(e,n){if(Fn===null)return e;let r=ro(Fn),i=e.dirs||=[];for(let e=0;e<n.length;e++){let[a,o,s,c=t]=n[e];a&&(h(a)&&(a={mounted:a,updated:a}),a.deep&&mn(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Bn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(Ye(),gn(c,n,8,[e.el,s,e,t]),Xe())}}function Vn(e,t){if(Va){let n=Va.provides,r=Va.parent&&Va.parent.provides;r===n&&(n=Va.provides=Object.create(r)),n[e]=t}}function Hn(e,t,n=!1){let r=Ha();if(r||ki){let i=ki?ki._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&h(t)?t.call(r&&r.proxy):t}}var Un=Symbol.for(`v-scx`),Wn=()=>Hn(Un);function Gn(e,t){return Jn(e,null,t)}function Kn(e,t){return Jn(e,null,{flush:`post`})}function qn(e,t,n){return Jn(e,t,n)}function Jn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(Ja){if(c===`sync`){let e=Wn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Va;u.call=(e,t,n)=>gn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{ra(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():On(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=pn(e,n,u);return Ja&&(f?f.push(h):d&&h()),h}function Yn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Xn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=Ga(this),s=Jn(i,a.bind(r),n);return o(),s}function Xn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Zn=new WeakMap,Qn=Symbol(`_vte`),$n=e=>e.__isTeleport,er=e=>e&&(e.disabled||e.disabled===``),iee=e=>e&&(e.defer||e.defer===``),tr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,nr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,rr=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},ir={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=er(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=er(e.props),r=e.target=rr(e.props,m),a=lr(r,e,h,p);r&&(o!==`svg`&&tr(r)?o=`svg`:o!==`mathml`&&nr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),cr(e,!1)))},S=e=>{let t=()=>{if(Zn.get(e)===t){if(Zn.delete(e),er(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),cr(e,!0)}x(e)}};Zn.set(e,t),ra(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),iee(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),cr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Zn.get(e);if(u){u.flags|=8,Zn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=er(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||tr(p)?o=`svg`:(o===`mathml`||nr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),sa(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ar(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=rr(t.props,m);e&&(t.target=e,ar(t,e,null,l,0))}else g&&ar(t,p,h,l,1);cr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=er(f),m=a||!p,h=Zn.get(e);if(h&&(h.flags|=8,Zn.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,m,!!i.dynamicChildren)}},move:ar,hydrate:or};function ar(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Zn.has(e)&&(!d||er(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function or(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=rr(t.props,c),h=er(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||lr(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||lr(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),cr(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var sr=ir;function cr(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function lr(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Qn]=o,e&&(r(a,e,i),r(o,e,i)),o}var ur=Symbol(`_leaveCb`),dr=Symbol(`_enterCb`);function fr(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vr(()=>{e.isMounted=!0}),Hr(()=>{e.isUnmounting=!0}),e}var pr=[Function,Array],mr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:pr,onEnter:pr,onAfterEnter:pr,onEnterCancelled:pr,onBeforeLeave:pr,onLeave:pr,onAfterLeave:pr,onLeaveCancelled:pr,onBeforeAppear:pr,onAppear:pr,onAfterAppear:pr,onAppearCancelled:pr},hr=e=>{let t=e.subTree;return t.component?hr(t.component):t},gr={name:`BaseTransition`,props:mr,setup(e,{slots:t}){let n=Ha(),r=fr();return()=>{let i=t.default&&wr(t.default(),!0),a=i&&i.length?_r(i):n.subTree?I():void 0;if(!a)return;let o=Jt(e),{mode:s}=o;if(r.isLeaving)return xr(a);let c=Sr(a);if(!c)return xr(a);let l=br(c,o,r,n,e=>l=e);c.type!==ga&&Cr(c,l);let u=n.subTree&&Sr(n.subTree);if(u&&u.type!==ga&&!Ea(u,c)&&hr(n).type!==ga){let e=br(u,o,r,n);if(Cr(u,e),s===`out-in`&&c.type!==ga)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},xr(a);s===`in-out`&&c.type!==ga?e.delayLeave=(e,t,n)=>{let i=yr(r,u);i[String(u.key)]=u,e[ur]=()=>{t(),e[ur]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function _r(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ga){t=n;break}}return t}var vr=gr;function yr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function br(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=yr(n,e),C=(e,t)=>{e&&gn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},ee={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[ur]&&t[ur](!0);let i=S[x];i&&Ea(e,i)&&i.el[ur]&&i.el[ur](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=f;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||f;else return;let s=!1;t[dr]=e=>{s||(s=!0,C(e?o:i,[t]),ee.delayedLeave&&ee.delayedLeave(),t[dr]=void 0)};let c=t[dr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[dr]&&t[dr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[ur]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[ur]=void 0,S[i]===e&&delete S[i])};let o=t[ur].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=br(e,t,n,r,i);return i&&i(a),a}};return ee}function xr(e){if(Pr(e))return e=ja(e),e.children=null,e}function Sr(e){if(!Pr(e))return $n(e.type)&&e.children?_r(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function Cr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Cr(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 wr(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a],s=n==null?o.key:String(n)+String(o.key==null?a:o.key);o.type===ma?(o.patchFlag&128&&i++,r=r.concat(wr(o.children,t,s))):(t||o.type!==ga)&&r.push(s==null?o:ja(o,{key:s}))}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function Tr(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Er(){let e=Ha();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+e.ids[1]++:``}function Dr(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Or(e){let n=Ha(),r=A(null);if(n){let i=n.refs===t?n.refs={}:n.refs;Object.defineProperty(i,e,{enumerable:!0,get:()=>r.value,set:e=>r.value=e})}return r}function kr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Ar=new WeakMap;function jr(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>jr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Nr(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&jr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ro(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=Jt(v),b=v===t?i:e=>!kr(_,e)&&u(y,e),x=(e,t)=>!(t&&kr(_,t));if(m!=null&&m!==p){if(Mr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(Qt(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))hn(p,f,12,[l,_]);else{let t=g(p),n=Qt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Ar.delete(e)};t.id=-1,Ar.set(e,t),ra(t,r)}else Mr(e),i()}}}function Mr(e){let t=Ar.get(e);t&&(t.flags|=8,Ar.delete(e))}fe().requestIdleCallback,fe().cancelIdleCallback;var Nr=e=>!!e.type.__asyncLoader,Pr=e=>e.type.__isKeepAlive;function Fr(e,t){Lr(e,`a`,t)}function Ir(e,t){Lr(e,`da`,t)}function Lr(e,t,n=Va){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(zr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Pr(e.parent.vnode)&&Rr(r,t,n,e),e=e.parent}}function Rr(e,t,n,r){let i=zr(t,e,r,!0);Ur(()=>{c(r[t],i)},n)}function zr(e,t,n=Va,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ye();let i=Ga(n),a=gn(t,n,e,r);return i(),Xe(),a};return r?i.unshift(a):i.push(a),a}}var Br=e=>(t,n=Va)=>{(!Ja||e===`sp`)&&zr(e,(...e)=>t(...e),n)},aee=Br(`bm`),Vr=Br(`m`),oee=Br(`bu`),see=Br(`u`),Hr=Br(`bum`),Ur=Br(`um`),cee=Br(`sp`),lee=Br(`rtg`),Wr=Br(`rtc`);function Gr(e,t=Va){zr(`ec`,e,t)}var Kr=`components`,qr=Symbol.for(`v-ndc`);function Jr(e){return g(e)?Yr(Kr,e,!1)||e:e||qr}function Yr(e,t,n=!0,r=!1){let i=Fn||Va;if(i){let n=i.type;if(e===Kr){let e=io(n,!1);if(e&&(e===t||e===re(t)||e===oe(re(t))))return n}let a=Xr(i[e]||n[e],t)||Xr(i.appContext[e],t);return!a&&r?n:a}}function Xr(e,t){return e&&(e[t]||e[re(t)]||e[oe(re(t))])}function Zr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Wt(e),r=!1,s=!1;n&&(r=!Kt(e),s=Gt(e),e=ct(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Zt(Xt(e[n])):Xt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(v(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}else i=[];return n&&(n[r]=i),i}function Qr(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(d(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.key?(...e)=>{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function $r(e,t,n={},r,i,a){if(Fn.ce||Fn.parent&&Nr(Fn.parent)&&Fn.parent.ce){let e=a!=null&&n.key==null?s({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),M(),wa(ma,null,[F(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=va.length;M();let l;try{let i=o&&ei(o(n)),s=n.key||a||i&&i.key;l=wa(ma,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=va.length;e>c;e--)ba();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function ei(e){return e.some(e=>!Ta(e)||!(e.type===ga||e.type===ma&&!ei(e.children)))?e:null}function ti(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:se(r)]=e[r];return n}var ni=e=>e?qa(e)?ro(e):ni(e.parent):null,ri=s(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=>ni(e.parent),$root:e=>ni(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gi(e),$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>Yn.bind(e)}),ii=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),ai={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(ii(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else di&&(s[n]=0)}let d=ri[n],f,p;if(d)return n===`$attrs`&&at(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return ii(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||ii(n,c)||u(o,c)||u(i,c)||u(ri,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function oi(){return ci(`useSlots`).slots}function si(){return ci(`useAttrs`).attrs}function ci(e){let t=Ha();return t.setupContext||=no(t)}function li(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function ui(e,t){let n=li(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?d(r)||h(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}var di=!0;function fi(e){let t=gi(e),n=e.proxy,i=e.ctx;di=!1,t.beforeCreate&&mi(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:te,renderTriggered:ne,errorCaptured:re,serverPrefetch:ie,expose:ae,inheritAttrs:oe,components:se,directives:T,filters:ce}=t;if(u&&pi(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=zt(t))}if(di=!0,o)for(let e in o){let t=o[e],a=L({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)hi(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Vn(t,e[t])})}f&&mi(f,e,`c`);function le(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(le(aee,p),le(Vr,m),le(oee,g),le(see,_),le(Fr,y),le(Ir,b),le(Gr,re),le(Wr,te),le(lee,ne),le(Hr,S),le(Ur,w),le(cee,ie),d(ae))if(ae.length){let t=e.exposed||={};ae.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};ee&&e.render===r&&(e.render=ee),oe!=null&&(e.inheritAttrs=oe),se&&(e.components=se),T&&(e.directives=T),ie&&Dr(e)}function pi(e,t,n=r){d(e)&&(e=xi(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Hn(r.from||n,r.default,!0):Hn(r.from||n):Hn(r),Qt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function mi(e,t,n){gn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function hi(e,t,n,r){let i=r.includes(`.`)?Xn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&qn(i,n)}else if(h(e))qn(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>hi(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&qn(i,r,e)}}function gi(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>_i(c,e,o,!0)),_i(c,t,o)),v(t)&&a.set(t,c),c}function _i(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&_i(e,a,n,!0),i&&i.forEach(t=>_i(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=vi[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var vi={data:yi,props:wi,emits:wi,methods:Ci,computed:Ci,beforeCreate:Si,created:Si,beforeMount:Si,mounted:Si,beforeUpdate:Si,updated:Si,beforeDestroy:Si,beforeUnmount:Si,destroyed:Si,unmounted:Si,activated:Si,deactivated:Si,errorCaptured:Si,serverPrefetch:Si,components:Ci,directives:Ci,watch:Ti,provide:yi,inject:bi};function yi(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function bi(e,t){return Ci(xi(e),xi(t))}function xi(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Si(e,t){return e?[...new Set([].concat(e,t))]:t}function Ci(e,t){return e?s(Object.create(null),e,t):t}function wi(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),li(e),li(t??{})):t}function Ti(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=Si(e[r],t[r]);return n}function Ei(){return{app:null,config:{isNativeTag:i,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}}var Di=0;function Oi(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=Ei(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:Di++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:so,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&h(e.install)?(a.add(e),e.install(l,...t)):h(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,s){if(!c){let u=l._ceVNode||F(n,r);return u.appContext=i,s===!0?s=`svg`:s===!1&&(s=void 0),o&&t?t(u,a):e(u,a,s),c=!0,l._container=a,a.__vue_app__=l,ro(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(gn(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=ki;ki=l;try{return e()}finally{ki=t}}};return l}}var ki=null,Ai=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${re(t)}Modifiers`]||e[`${ae(t)}Modifiers`];function ji(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ai(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(E)));let c,l=i[c=se(n)]||i[c=se(re(n))];!l&&o&&(l=i[c=se(ae(n))]),l&&gn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,gn(u,e,6,a)}}var Mi=new WeakMap;function Ni(e,t,n=!1){let r=n?Mi:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Ni(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Pi(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,ae(t))||u(e,t))}function Fi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Ln(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Na(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Na(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:Ii(c)}}catch(t){va.length=0,_n(t,e,1),v=F(ga)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Li(y,a)),b=ja(b,y,!1,!0))}return n.dirs&&(b=ja(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Cr(b,n.transition),v=b,Ln(_),v}var Ii=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Li=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Ri(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?zi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Bi(o,r,n)&&!Pi(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||zi(r,o,l):!!o;return!1}function zi(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Bi(t,e,a)&&!Pi(n,a))return!0}return!1}function Bi(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!Ce(r,i):r!==i}function Vi({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Hi={},Ui=()=>Object.create(Hi),Wi=e=>Object.getPrototypeOf(e)===Hi;function Gi(e,t,n,r=!1){let i={},a=Ui();e.propsDefaults=Object.create(null),qi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Bt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function Ki(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=Jt(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Pi(e.emitsOptions,o))continue;let d=t[o];if(c)if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=re(o);i[t]=Ji(c,s,t,d,e,!1)}else d!==a[o]&&(a[o]=d,l=!0)}}}else{qi(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!u(t,a)&&((r=ae(a))===a||!u(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Ji(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!u(t,e))&&(delete a[e],l=!0)}l&&ot(e.attrs,`set`,``)}function qi(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(ee(t))continue;let l=n[t],d;a&&u(a,d=re(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:Pi(e.emitsOptions,t)||(!(t in i)||l!==i[t])&&(i[t]=l,s=!0)}if(o){let n=Jt(r),i=c||t;for(let t=0;t<o.length;t++){let s=o[t];r[s]=Ji(a,n,s,i[s],e,!u(i,s))}}return s}function Ji(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=u(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&h(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Ga(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===ae(n))&&(r=!0))}return r}var Yi=new WeakMap;function Xi(e,r,i=!1){let a=i?Yi:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=Xi(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=re(c[e]);Zi(n)&&(l[n]=t)}else if(c)for(let e in c){let t=re(e);if(Zi(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}else n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function Zi(e){return e[0]!==`$`&&!ee(e)}var Qi=e=>e===`_`||e===`_ctx`||e===`$stable`,$i=e=>d(e)?e.map(Na):[Na(e)],uee=(e,t,n)=>{if(t._n)return t;let r=Rn((...e)=>$i(t(...e)),n);return r._c=!1,r},ea=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Qi(n))continue;let i=e[n];if(h(i))t[n]=uee(n,i,r);else if(i!=null){let e=$i(i);t[n]=()=>e}}},ta=(e,t)=>{let n=$i(t);e.slots.default=()=>n},na=(e,t,n)=>{for(let r in t)(n||!Qi(r))&&(e[r]=t[r])},dee=(e,t,n)=>{let r=e.slots=Ui();if(e.vnode.shapeFlag&32){let e=t._;e?(na(r,t,n),n&&le(r,`_`,e,!0)):ea(t,r)}else t&&ta(e,t)},fee=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:na(a,n,r):(o=!n.$stable,ea(n,a)),s=n}else n&&(ta(e,n),s={default:1});if(o)for(let e in a)!Qi(e)&&s[e]==null&&delete a[e]},ra=pa;function pee(e){return mee(e)}function mee(e,i){let a=fe();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ea(e,t)&&(r=xe(e),_e(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case ha:y(e,t,n,r);break;case ga:b(e,t,n,r);break;case _a:e??x(t,n,r,o);break;case ma:se(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?T(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,we)}u!=null&&i?jr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&jr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ie(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&re(e.children,d,null,r,i,ia(e,a),s,u),_&&Bn(e,null,r,`created`),ne(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ee(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&La(f,r,e)}_&&Bn(e,null,r,`beforeMount`);let v=oa(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&ra(()=>{try{f&&La(f,r,e),v&&g.enter(d),_&&Bn(e,null,r,`mounted`)}finally{}},i)},ne=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||fa(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ne(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},re=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Pa(e[l]):Na(e[l]);v(null,c,t,n,r,i,a,o,s)}},ie=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&aa(r,!1),(g=h.onVnodeBeforeUpdate)&&La(g,r,n,e),f&&Bn(n,e,r,`beforeUpdate`),r&&aa(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?ae(e.dynamicChildren,d,l,r,i,ia(n,a),o):s||pe(e,n,l,null,r,i,ia(n,a),o,!1),u>0){if(u&16)oe(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else!s&&d==null&&oe(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&ra(()=>{g&&La(g,r,n,e),f&&Bn(n,e,r,`updated`)},i)},ae=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===ma||!Ea(c,l)||c.shapeFlag&198)?m(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},oe=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!ee(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ee(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},se=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),re(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ae(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&sa(e,t,!0)):pe(e,t,n,f,i,a,s,c,l)},T=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):le(t,n,r,i,a,o,c):E(e,t,c)},le=(e,t,n,r,i,a,o)=>{let s=e.component=Ba(e,r,i);if(Pr(e)&&(s.ctx.renderer=we),Ya(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ue,o),!e.el){let r=s.subTree=F(ga);b(null,r,t,n),e.placeholder=r.el}}else ue(s,e,t,n,i,a,o)},E=(e,t,n)=>{let r=t.component=e.component;if(Ri(e,t,n))if(r.asyncDep&&!r.asyncResolved){de(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},ue=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=la(e);if(n){t&&(t.el=c.el,de(e,t,o)),n.asyncDep.then(()=>{ra(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;aa(e,!1),t?(t.el=c.el,de(e,t,o)):t=c,n&&ce(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&La(d,s,t,c),aa(e,!0);let f=Fi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),xe(p),e,i,a),t.el=f.el,u===null&&Vi(e,f.el),r&&ra(r,i),(d=t.props&&t.props.onVnodeUpdated)&&ra(()=>La(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Nr(t);if(aa(e,!1),l&&ce(l),!m&&(o=c&&c.onVnodeBeforeMount)&&La(o,d,t),aa(e,!0),s&&O){let t=()=>{e.subTree=Fi(e),O(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Fi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&ra(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;ra(()=>La(o,d,e),i)}(t.shapeFlag&256||d&&Nr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&ra(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Pe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>On(u),aa(e,!0),l()},de=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ki(e,t.props,r,n),fee(e,t.children,n),Ye(),jn(e),Xe()},pe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){he(l,d,n,r,i,a,o,s,c);return}else if(f&256){me(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&be(l,i,a),d!==l&&p(n,d)):u&16?m&16?he(l,d,n,r,i,a,o,s,c):be(l,i,a,!0):(u&8&&p(n,``),m&16&&re(d,n,r,i,a,o,s,c))},me=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;p<f;p++){let n=t[p]=l?Pa(t[p]):Na(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?be(e,a,o,!0,!1,f):re(t,r,i,a,o,s,c,l,f)},he=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?Pa(t[u]):Na(t[u]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?Pa(t[p]):Na(t[p]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?Pa(t[u]):Na(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)_e(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Pa(t[u]):Na(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let n=e[u];if(y>=b){_e(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ea(n,t[_])){i=_;break}i===void 0?_e(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?ca(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||da(f):i;C[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==w[_]?ge(n,r,p,2):_--)}}},ge=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ge(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,we);return}if(c===ma){o(a,t,n);for(let e=0;e<u.length;e++)ge(u[e],t,n,r);o(e.anchor,t,n);return}if(c===_a){S(e,t,n);return}if(r!==2&&d&1&&l)if(r===0)l.persisted&&!a[ur]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),ra(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[ur];a._isLeaving&&a[ur](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},_e=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Ye(),jr(s,null,n,e,!0),Xe()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Nr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&La(_,t,e),u&6)ye(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Bn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,we,r):l&&!l.hasOnce&&(a!==ma||d>0&&d&64)?be(l,t,n,!1,!0):(a===ma&&d&384||!i&&u&16)&&be(c,t,n),r&&D(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&ra(()=>{_&&La(_,t,e),h&&Bn(e,null,t,`unmounted`),v&&(e.el=null)},n)},D=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===ma){ve(n,r);return}if(t===_a){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ve=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ye=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ua(c),ua(l),r&&ce(r),i.stop(),a&&(a.flags|=8,_e(o,e,t,n)),s&&ra(s,t),ra(()=>{e.isUnmounted=!0},t)},be=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)_e(e[o],t,n,r,i)},xe=e=>{if(e.shapeFlag&6)return xe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Qn];return n?h(n):t},Se=!1,Ce=(e,t,n)=>{let r;e==null?t._vnode&&(_e(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,Se||=(Se=!0,jn(r),Mn(),!1)},we={p:v,um:_e,m:ge,r:D,mt:le,mc:re,pc:pe,pbc:ae,n:xe,o:e},Te,O;return i&&([Te,O]=i(we)),{render:Ce,hydrate:Te,createApp:Oi(Ce,Te)}}function ia({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function aa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function oa(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sa(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Pa(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&sa(t,a)),a.type===ha&&(a.patchFlag===-1&&(a=i[e]=Pa(a)),a.el=t.el),a.type===ga&&!a.el&&(a.el=t.el)}}function ca(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function la(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:la(t)}function ua(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function da(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?da(t.subTree):null}var fa=e=>e.__isSuspense;function pa(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):An(e)}var ma=Symbol.for(`v-fgt`),ha=Symbol.for(`v-txt`),ga=Symbol.for(`v-cmt`),_a=Symbol.for(`v-stc`),va=[],ya=null;function M(e=!1){va.push(ya=e?null:[])}function ba(){va.pop(),ya=va[va.length-1]||null}var xa=1;function Sa(e,t=!1){xa+=e,e<0&&ya&&t&&(ya.hasOnce=!0)}function Ca(e){return e.dynamicChildren=xa>0?ya||n:null,ba(),xa>0&&ya&&ya.push(e),e}function N(e,t,n,r,i,a){return Ca(P(e,t,n,r,i,a,!0))}function wa(e,t,n,r,i){return Ca(F(e,t,n,r,i,!0))}function Ta(e){return e?e.__v_isVNode===!0:!1}function Ea(e,t){return e.type===t.type&&e.key===t.key}var Da=({key:e})=>e??null,Oa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||Qt(e)||h(e)?{i:Fn,r:e,k:t,f:!!n}:e);function P(e,t=null,n=null,r=0,i=null,a=e===ma?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Da(t),ref:t&&Oa(t),scopeId:In,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:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Fn};return s?(Fa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),xa>0&&!o&&ya&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&ya.push(c),c}var F=ka;function ka(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===qr)&&(e=ga),Ta(e)){let r=ja(e,t,!0);return n&&Fa(r,n),xa>0&&!a&&ya&&(r.shapeFlag&6?ya[ya.indexOf(e)]=r:ya.push(r)),r.patchFlag=-2,r}if(ao(e)&&(e=e.__vccOpts),t){t=Aa(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=D(e)),v(n)&&(qt(n)&&!d(n)&&(n=s({},n)),t.style=pe(n))}let o=g(e)?1:fa(e)?128:$n(e)?64:v(e)?4:h(e)?2:0;return P(e,t,n,r,i,o,a,!0)}function Aa(e){return e?qt(e)||Wi(e)?s({},e):e:null}function ja(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Ia(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Da(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Oa(t)):[a,Oa(t)]:Oa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ma?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ja(e.ssContent),ssFallback:e.ssFallback&&ja(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Cr(u,c.clone(u)),u}function Ma(e=` `,t=0){return F(ha,null,e,t)}function I(e=``,t=!1){return t?(M(),wa(ga,null,e)):F(ga,null,e)}function Na(e){return e==null||typeof e==`boolean`?F(ga):d(e)?F(ma,null,e.slice()):Ta(e)?Pa(e):F(ha,null,String(e))}function Pa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ja(e)}function Fa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Fa(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Wi(t)?t._ctx=Fn:r===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(h(t)){if(r&65){Fa(e,{default:t});return}t={default:t,_ctx:Fn},n=32}else t=String(t),r&64?(n=16,t=[Ma(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ia(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=D([t.class,r.class]));else if(e===`style`)t.style=pe([t.style,r.style]);else if(a(e)){let n=t[e],i=r[e];i&&n!==i&&!(d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!o(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function La(e,t,n,r=null){gn(e,t,7,[n,r])}var Ra=Ei(),za=0;function Ba(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||Ra,o={uid:za++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ke(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(a.provides),ids:n?n.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Xi(i,a),emitsOptions:Ni(i,a),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=ji.bind(null,o),e.ce&&e.ce(o),o}var Va=null,Ha=()=>Va||Fn,Ua,Wa;{let e=fe(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ua=t(`__VUE_INSTANCE_SETTERS__`,e=>Va=e),Wa=t(`__VUE_SSR_SETTERS__`,e=>Ja=e)}var Ga=e=>{let t=Va;return Ua(e),e.scope.on(),()=>{e.scope.off(),Ua(t)}},Ka=()=>{Va&&Va.scope.off(),Ua(null)};function qa(e){return e.vnode.shapeFlag&4}var Ja=!1;function Ya(e,t=!1,n=!1){t&&Wa(t);let{props:r,children:i}=e.vnode,a=qa(e);Gi(e,r,a,t),dee(e,i,n||t);let o=a?Xa(e,t):void 0;return t&&Wa(!1),o}function Xa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ai);let{setup:r}=n;if(r){Ye();let n=e.setupContext=r.length>1?no(e):null,i=Ga(e),a=hn(r,e,0,[e.props,n]),o=y(a);if(Xe(),i(),(o||e.sp)&&!Nr(e)&&Dr(e),o){if(a.then(Ka,Ka),t)return a.then(n=>{Za(e,n,t)}).catch(t=>{_n(t,e,0)});e.asyncDep=a}else Za(e,a,t)}else eo(e,t)}function Za(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=rn(t)),eo(e,n)}var Qa,$a;function eo(e,t,n){let i=e.type;if(!e.render){if(!t&&Qa&&!i.render){let t=i.template||gi(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=Qa(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,$a&&$a(e)}{let t=Ga(e);Ye();try{fi(e)}finally{Xe(),t()}}}var to={get(e,t){return at(e,`get`,``),e[t]}};function no(e){return{attrs:new Proxy(e.attrs,to),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ro(e){return e.exposed?e.exposeProxy||=new Proxy(rn(Yt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ri)return ri[n](e)},has(e,t){return t in e||t in ri}}):e.proxy}function io(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function ao(e){return h(e)&&`__vccOpts`in e}var L=(e,t)=>cn(e,t,Ja);function oo(e,t,n){try{Sa(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?Ta(t)?F(e,null,[t]):F(e,t):F(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ta(n)&&(n=[n]),F(e,t,n))}finally{Sa(1)}}var so=`3.5.40`,co=void 0,lo=typeof window<`u`&&window.trustedTypes;if(lo)try{co=lo.createPolicy(`vue`,{createHTML:e=>e})}catch{}var uo=co?e=>co.createHTML(e):e=>e,fo=`http://www.w3.org/2000/svg`,po=`http://www.w3.org/1998/Math/MathML`,mo=typeof document<`u`?document:null,ho=mo&&mo.createElement(`template`),go={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?mo.createElementNS(fo,e):t===`mathml`?mo.createElementNS(po,e):n?mo.createElement(e,{is:n}):mo.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>mo.createTextNode(e),createComment:e=>mo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mo.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{ho.innerHTML=uo(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ho.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},_o=`transition`,vo=`animation`,yo=Symbol(`_vtc`),bo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xo=s({},mr,bo),So=(e=>(e.displayName=`Transition`,e.props=xo,e))((e,{slots:t})=>oo(vr,To(e),t)),Co=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},wo=e=>e?d(e)?e.some(e=>e.length>1):e.length>1:!1;function To(e){let t={};for(let n in e)n in bo||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Eo(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:ee=b}=t,te=(e,t,n,r)=>{e._enterCancelled=r,ko(e,t?d:c),ko(e,t?u:o),n&&n()},ne=(e,t)=>{e._isLeaving=!1,ko(e,f),ko(e,m),ko(e,p),t&&t()},re=e=>(t,n)=>{let i=e?w:y,o=()=>te(t,e,n);Co(i,[t,o]),Ao(()=>{ko(t,e?l:a),Oo(t,e?d:c),wo(i)||jo(t,r,g,o)})};return s(t,{onBeforeEnter(e){Co(v,[e]),Oo(e,a),Oo(e,o)},onBeforeAppear(e){Co(C,[e]),Oo(e,l),Oo(e,u)},onEnter:re(!1),onAppear:re(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>ne(e,t);Oo(e,f),e._enterCancelled?(Oo(e,p),Po(e)):(Po(e),Oo(e,p)),Ao(()=>{e._isLeaving&&(ko(e,f),Oo(e,m),wo(x)||jo(e,r,_,n))}),Co(x,[e,n])},onEnterCancelled(e){te(e,!1,void 0,!0),Co(b,[e])},onAppearCancelled(e){te(e,!0,void 0,!0),Co(ee,[e])},onLeaveCancelled(e){ne(e),Co(S,[e])}})}function Eo(e){if(e==null)return null;if(v(e))return[Do(e.enter),Do(e.leave)];{let t=Do(e);return[t,t]}}function Do(e){return ue(e)}function Oo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[yo]||(e[yo]=new Set)).add(t)}function ko(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[yo];n&&(n.delete(t),n.size||(e[yo]=void 0))}function Ao(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var hee=0;function jo(e,t,n,r){let i=e._endId=++hee,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=gee(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function gee(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${_o}Delay`),a=r(`${_o}Duration`),o=Mo(i,a),s=r(`${vo}Delay`),c=r(`${vo}Duration`),l=Mo(s,c),u=null,d=0,f=0;t===_o?o>0&&(u=_o,d=o,f=a.length):t===vo?l>0&&(u=vo,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?_o:vo:null,f=u?u===_o?a.length:c.length:0);let p=u===_o&&/\b(?:transform|all)(?:,|$)/.test(r(`${_o}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Mo(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>No(t)+No(e[n])))}function No(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Po(e){return(e?e.ownerDocument:document).body.offsetHeight}function _ee(e,t,n){let r=e[yo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Fo=Symbol(`_vod`),Io=Symbol(`_vsh`),Lo={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Fo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Ro(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ro(e,!0),r.enter(e)):r.leave(e,()=>{Ro(e,!1)}):Ro(e,t))},beforeUnmount(e,{value:t}){Ro(e,t)}};function Ro(e,t){e.style.display=t?e[Fo]:`none`,e[Io]=!t}var vee=Symbol(``),yee=/(?:^|;)\s*display\s*:/;function bee(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Bo(r,t,``)}else for(let e in t)n[e]??Bo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Bo(r,i,``):Wo(e,i,!g(t)&&t?t[i]:void 0,o)||Bo(r,i,o)}}else if(i){if(t!==n){let e=r[vee];e&&(n+=`;`+e),r.cssText=n,a=yee.test(n)}}else t&&e.removeAttribute(`style`);Fo in e&&(e[Fo]=a?r.display:``,e[Io]&&(r.display=`none`))}var zo=/\s*!important$/;function Bo(e,t,n){if(d(n))n.forEach(n=>Bo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Uo(e,t);zo.test(n)?e.setProperty(ae(r),n.replace(zo,``),`important`):e[r]=n}}var Vo=[`Webkit`,`Moz`,`ms`],Ho={};function Uo(e,t){let n=Ho[t];if(n)return n;let r=re(t);if(r!==`filter`&&r in e)return Ho[t]=r;r=oe(r);for(let n=0;n<Vo.length;n++){let i=Vo[n]+r;if(i in e)return Ho[t]=i}return t}function Wo(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Go=`http://www.w3.org/1999/xlink`;function Ko(e,t,n,r,i,a=be(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Go,t.slice(6,t.length)):e.setAttributeNS(Go,t,n):n==null||a&&!xe(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function qo(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?uo(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=xe(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Jo(e,t,n,r){e.addEventListener(t,n,r)}function Yo(e,t,n,r){e.removeEventListener(t,n,r)}var Xo=Symbol(`_vei`);function Zo(e,t,n,r,i=null){let a=e[Xo]||(e[Xo]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=es(t);r?Jo(e,n,a[t]=is(r,i),s):o&&(Yo(e,n,o,s),a[t]=void 0)}}var Qo=/(Once|Passive|Capture)$/,$o=/^on:?(?:Once|Passive|Capture)$/;function es(e){let t,n;for(;(n=e.match(Qo))&&!$o.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):ae(e.slice(2)),t]}var ts=0,ns=Promise.resolve(),rs=()=>ts||=(ns.then(()=>ts=0),Date.now());function is(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&gn(e,t,5,a)}}else gn(r,t,5,[e])};return n.value=e,n.attached=rs(),n}var as=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,os=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?_ee(e,r,c):t===`style`?bee(e,n,r):a(t)?o(t)||Zo(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ss(e,t,r,c))?(qo(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Ko(e,t,r,c,s,t!==`value`)):e._isVueCE&&(cs(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?qo(e,re(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Ko(e,t,r,c))};function ss(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&as(t)&&h(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`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return as(t)&&g(n)?!1:t in e}function cs(e,t){let n=e._def.props;if(!n)return!1;let r=re(t);return Array.isArray(n)?n.some(e=>re(e)===r):Object.keys(n).some(e=>re(e)===r)}var ls=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>ce(t,e):t};function us(e){e.target.composing=!0}function ds(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var fs=Symbol(`_assign`);function ps(e,t,n){return t&&(e=e.trim()),n&&(e=E(e)),e}var ms={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[fs]=ls(i);let a=r||i.props&&i.props.type===`number`;Jo(e,t?`change`:`input`,t=>{t.target.composing||e[fs](ps(e.value,n,a))}),(n||a)&&Jo(e,`change`,()=>{e.value=ps(e.value,n,a)}),t||(Jo(e,`compositionstart`,us),Jo(e,`compositionend`,ds),Jo(e,`change`,ds))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[fs]=ls(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?E(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},hs={deep:!0,created(e,t,n){e[fs]=ls(n),Jo(e,`change`,()=>{let t=e._modelValue,n=ys(e),r=e.checked,i=e[fs];if(d(t)){let e=we(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(bs(e,r))})},mounted:gs,beforeUpdate(e,t,n){e[fs]=ls(n),gs(e,t,n)}};function gs(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=we(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=Ce(t,bs(e,!0))}e.checked!==i&&(e.checked=i)}var _s={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Jo(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?E(ys(e)):ys(e));e[fs](e.multiple?p(e._modelValue)?new Set(t):t:t[0]),e._assigning=!0,En(()=>{e._assigning=!1})}),e[fs]=ls(r)},mounted(e,{value:t}){vs(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[fs]=ls(n)},updated(e,{value:t}){e._assigning||vs(e,t)}};function vs(e,t){let n=e.multiple,r=d(t);if(!(n&&!r&&!p(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=ys(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=we(t,o)>-1}else a.selected=t.has(o);else if(Ce(ys(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ys(e){return`_value`in e?e._value:e.value}function bs(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var xs=[`ctrl`,`shift`,`alt`,`meta`],Ss={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)=>xs.some(n=>e[`${n}Key`]&&!t.includes(n))},Cs=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Ss[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},ws={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},Ts=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ae(n.key);if(t.some(e=>e===r||ws[e]===r))return e(n)}))},Es=s({patchProp:os},go),Ds;function Os(){return Ds||=pee(Es)}var ks=((...e)=>{let t=Os().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=js(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,As(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function As(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function js(e){return g(e)?document.querySelector(e):e}var Ms=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ns=(e,t)=>({classGroupId:e,validator:t}),Ps=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fs=`-`,Is=[],Ls=`arbitrary..`,Rs=e=>{let t=Vs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Bs(e);let n=e.split(Fs);return zs(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ms(i,t):t:i||Is}return n[e]||Is}}},zs=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=zs(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Fs):e.slice(t).join(Fs),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Bs=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ls+r:void 0})(),Vs=e=>{let{theme:t,classGroups:n}=e;return Hs(n,t)},Hs=(e,t)=>{let n=Ps();for(let r in e){let i=e[r];Us(i,n,r,t)}return n},Us=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ws(i,t,n,r)}},Ws=(e,t,n,r)=>{if(typeof e==`string`){Gs(e,t,n);return}if(typeof e==`function`){Ks(e,t,n,r);return}qs(e,t,n,r)},Gs=(e,t,n)=>{let r=e===``?t:Js(t,e);r.classGroupId=n},Ks=(e,t,n,r)=>{if(Ys(e)){Us(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ns(n,e))},qs=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Us(o,Js(t,a),n,r)}},Js=(e,t)=>{let n=e,r=t.split(Fs),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Ps(),n.nextPart.set(t,i)),n=i}return n},Ys=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Xs=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Zs=`!`,Qs=`:`,$s=[],ec=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),tc=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Qs){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Zs)?(c=s.slice(0,-1),l=!0):s.startsWith(Zs)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ec(t,l,c,u)};if(t){let e=t+Qs,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ec($s,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},nc=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},rc=e=>({cache:Xs(e.cacheSize),parseClassName:tc(e),sortModifiers:nc(e),postfixLookupClassGroupIds:ic(e),...Rs(e)}),ic=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ac=/\s+/,oc=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ac),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Zs:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},sc=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=cc(n))&&(i&&(i+=` `),i+=r);return i},cc=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=cc(e[r]))&&(n&&(n+=` `),n+=t);return n},lc=(e,...t)=>{let n,r,i,a,o=o=>(n=rc(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=oc(e,n);return i(e,a),a};return a=o,(...e)=>a(sc(...e))},uc=[],dc=e=>{let t=t=>t[e]||uc;return t.isThemeGetter=!0,t},fc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,pc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mc=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_c=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bc=e=>mc.test(e),xc=e=>!!e&&!Number.isNaN(Number(e)),Sc=e=>!!e&&Number.isInteger(Number(e)),Cc=e=>e.endsWith(`%`)&&xc(e.slice(0,-1)),wc=e=>hc.test(e),Tc=()=>!0,Ec=e=>gc.test(e)&&!_c.test(e),Dc=()=>!1,Oc=e=>vc.test(e),kc=e=>yc.test(e),Ac=e=>!Nc(e)&&!Vc(e),jc=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Mc=e=>Yc(e,$c,Dc),Nc=e=>fc.test(e),Pc=e=>Yc(e,el,Ec),Fc=e=>Yc(e,tl,xc),Ic=e=>Yc(e,rl,Tc),Lc=e=>Yc(e,nl,Dc),Rc=e=>Yc(e,Zc,Dc),zc=e=>Yc(e,Qc,kc),Bc=e=>Yc(e,il,Oc),Vc=e=>pc.test(e),Hc=e=>Xc(e,el),Uc=e=>Xc(e,nl),Wc=e=>Xc(e,Zc),Gc=e=>Xc(e,$c),Kc=e=>Xc(e,Qc),qc=e=>Xc(e,il,!0),Jc=e=>Xc(e,rl,!0),Yc=(e,t,n)=>{let r=fc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Xc=(e,t,n=!1)=>{let r=pc.exec(e);return r?r[1]?t(r[1]):n:!1},Zc=e=>e===`position`||e===`percentage`,Qc=e=>e===`image`||e===`url`,$c=e=>e===`length`||e===`size`||e===`bg-size`,el=e=>e===`length`,tl=e=>e===`number`,nl=e=>e===`family-name`,rl=e=>e===`number`||e===`weight`,il=e=>e===`shadow`,al=lc(()=>{let e=dc(`color`),t=dc(`font`),n=dc(`text`),r=dc(`font-weight`),i=dc(`tracking`),a=dc(`leading`),o=dc(`breakpoint`),s=dc(`container`),c=dc(`spacing`),l=dc(`radius`),u=dc(`shadow`),d=dc(`inset-shadow`),f=dc(`text-shadow`),p=dc(`drop-shadow`),m=dc(`blur`),h=dc(`perspective`),g=dc(`aspect`),_=dc(`ease`),v=dc(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Vc,Nc],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Vc,Nc,c],ee=()=>[bc,`full`,`auto`,...w()],te=()=>[Sc,`none`,`subgrid`,Vc,Nc],ne=()=>[`auto`,{span:[`full`,Sc,Vc,Nc]},Sc,Vc,Nc],re=()=>[Sc,`auto`,Vc,Nc],ie=()=>[`auto`,`min`,`max`,`fr`,Vc,Nc],ae=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],oe=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],se=()=>[`auto`,...w()],T=()=>[bc,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[bc,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[bc,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,Vc,Nc],ue=()=>[...b(),Wc,Rc,{position:[Vc,Nc]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Gc,Mc,{size:[Vc,Nc]}],pe=()=>[Cc,Hc,Pc],me=()=>[``,`none`,`full`,l,Vc,Nc],he=()=>[``,xc,Hc,Pc],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],D=()=>[xc,Cc,Wc,Rc],ve=()=>[``,`none`,m,Vc,Nc],ye=()=>[`none`,xc,Vc,Nc],be=()=>[`none`,xc,Vc,Nc],xe=()=>[xc,Vc,Nc],Se=()=>[bc,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[wc],breakpoint:[wc],color:[Tc],container:[wc],"drop-shadow":[wc],ease:[`in`,`out`,`in-out`],font:[Ac],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[wc],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[wc],shadow:[wc],spacing:[`px`,xc],text:[wc],"text-shadow":[wc],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,bc,Nc,Vc,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Vc,Nc]}],"container-named":[jc],columns:[{columns:[xc,Nc,Vc,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Sc,`auto`,Vc,Nc]}],basis:[{basis:[bc,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[xc,bc,`auto`,`initial`,`none`,Nc]}],grow:[{grow:[``,xc,Vc,Nc]}],shrink:[{shrink:[``,xc,Vc,Nc]}],order:[{order:[Sc,`first`,`last`,`none`,Vc,Nc]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ae(),`normal`]}],"justify-items":[{"justify-items":[...oe(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...oe()]}],"align-content":[{content:[`normal`,...ae()]}],"align-items":[{items:[...oe(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...oe(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...oe(),`baseline`]}],"place-self":[{"place-self":[`auto`,...oe()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:se()}],mx:[{mx:se()}],my:[{my:se()}],ms:[{ms:se()}],me:[{me:se()}],mbs:[{mbs:se()}],mbe:[{mbe:se()}],mt:[{mt:se()}],mr:[{mr:se()}],mb:[{mb:se()}],ml:[{ml:se()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:T()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...T()]}],"min-w":[{"min-w":[s,`screen`,`none`,...T()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...T()]}],h:[{h:[`screen`,`lh`,...T()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...T()]}],"max-h":[{"max-h":[`screen`,`lh`,...T()]}],"font-size":[{text:[`base`,n,Hc,Pc]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Jc,Ic]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Cc,Nc]}],"font-family":[{font:[Uc,Lc,t]}],"font-features":[{"font-features":[Nc]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Vc,Nc]}],"line-clamp":[{"line-clamp":[xc,`none`,Vc,Fc]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Vc,Nc]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Vc,Nc]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[xc,`from-font`,`auto`,Vc,Pc]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[xc,`auto`,Vc,Nc]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Sc,Vc,Nc]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Vc,Nc]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Vc,Nc]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Sc,Vc,Nc],radial:[``,Vc,Nc],conic:[Sc,Vc,Nc]},Kc,zc]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[xc,Vc,Nc]}],"outline-w":[{outline:[``,xc,Hc,Pc]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,qc,Bc]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,qc,Bc]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[xc,Pc]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,qc,Bc]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[xc,Vc,Nc]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[xc]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Vc,Nc]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[xc]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Vc,Nc]}],filter:[{filter:[``,`none`,Vc,Nc]}],blur:[{blur:ve()}],brightness:[{brightness:[xc,Vc,Nc]}],contrast:[{contrast:[xc,Vc,Nc]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,qc,Bc]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,xc,Vc,Nc]}],"hue-rotate":[{"hue-rotate":[xc,Vc,Nc]}],invert:[{invert:[``,xc,Vc,Nc]}],saturate:[{saturate:[xc,Vc,Nc]}],sepia:[{sepia:[``,xc,Vc,Nc]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Vc,Nc]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[xc,Vc,Nc]}],"backdrop-contrast":[{"backdrop-contrast":[xc,Vc,Nc]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,xc,Vc,Nc]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xc,Vc,Nc]}],"backdrop-invert":[{"backdrop-invert":[``,xc,Vc,Nc]}],"backdrop-opacity":[{"backdrop-opacity":[xc,Vc,Nc]}],"backdrop-saturate":[{"backdrop-saturate":[xc,Vc,Nc]}],"backdrop-sepia":[{"backdrop-sepia":[``,xc,Vc,Nc]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Vc,Nc]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[xc,`initial`,Vc,Nc]}],ease:[{ease:[`linear`,`initial`,_,Vc,Nc]}],delay:[{delay:[xc,Vc,Nc]}],animate:[{animate:[`none`,v,Vc,Nc]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Vc,Nc]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":[`scale-3d`],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[Vc,Nc,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":[`translate-none`],zoom:[{zoom:[Sc,Vc,Nc]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Vc,Nc]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Vc,Nc]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[xc,Hc,Pc,Fc]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),ol=Symbol.for(`@soybeanjs/cva.metadata`),sl=[];function cl(e,t){return Object.defineProperty(e,ol,{configurable:!1,enumerable:!1,value:t,writable:!1}),e}function ll(){return sl[sl.length-1]}function ul(e,t){sl.push(e);try{return t()}finally{sl.pop()}}function dl(e){if(typeof e==`function`)return e[ol]}function fl(e){let t=dl(e);return t?.kind===`cv`?t:void 0}function pl(e){let t=dl(e);return t?.kind===`scv`?t:void 0}function ml(e,t){return t[e]??e}function hl(e,t,n){if(n.length===0)return;let r=e[t];if(r){r.push(...n);return}e[t]=[...n]}function gl(e,t){let n={};for(let[r,i]of Object.entries(e))hl(n,ml(r,t),i);return n}function _l(e,t,n,r){let i=t.indexOf(n);i>=0&&t.splice(i,1),t.push(n),e[n]=r}function vl(e,t,n){let r=[],i={};for(let a of e)_l(i,r,ml(a,n),t[a]);return{slotOrder:r,slotPlan:i}}function yl(e,t){let n=vl(e.slotOrder,e.slotPlan,t);return{inheritedShared:gl(e.inheritedShared,t),inheritedUnique:gl(e.inheritedUnique,t),localShared:gl(e.localShared,t),localUnique:gl(e.localUnique,t),slotOrder:n.slotOrder,slotPlan:n.slotPlan}}function bl(e,t){let n={};for(let[r,i]of Object.entries(e))n[ml(r,t)]=i;return n}function xl(e){let t={};for(let[n,r]of Object.entries(e))t[r]=n;return t}function Sl(e,t){let n={};for(let[r,i]of Object.entries(e))n[ml(r,t)]=i;return n}function Cl(e,t){let n=pl(e);if(!n)throw TypeError(`alias only accepts scv results.`);let r=Object.fromEntries(Object.entries(t).filter(e=>typeof e[1]==`string`)),i=xl(r),a=vl(n.slotOrder,n.slotPlan,r);return cl((t,...n)=>bl(e(t,...n.filter(Boolean).map(e=>Sl(e,i))),r),{...n,resolveRaw:e=>yl(n.resolveRaw(e),r),slotOrder:a.slotOrder,slotPlan:a.slotPlan})}function wl(e){if(typeof e==`string`)return e;if(typeof e==`number`)return String(e);if(e==null||typeof e==`boolean`)return``;let t=``;if(Array.isArray(e)){let n=0,r,i;for(;n<e.length;n++)(r=e[n])&&(i=wl(r))&&(t&&(t+=` `),t+=i);return t}for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t}function Tl(...e){let t=``,n=0,r,i;for(;n<e.length;n++)(r=e[n])&&(i=wl(r))&&(t&&(t+=` `),t+=i);return t}function El(e){return e.length===0?``:al(Tl(...e))}function Dl(e,t){return Object.fromEntries(Object.entries(e??{}).map(([e,n])=>[e,Object.fromEntries(Object.entries(n).map(([e,n])=>[e,t(n)]))]))}function Ol(e){if(e!=null){if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`||typeof e==`string`)return String(e)}}function kl(e){let t={};for(let[n,r]of Object.entries(e??{})){let e=Ol(r);e!==void 0&&(t[n]=e)}return t}function Al(e){let t={};for(let[n,r]of Object.entries(e??{}))Ol(r)!==void 0&&(t[n]=r);return t}function jl(e){let t={};for(let[n,r]of Object.entries(e)){if(n===`class`||n===`className`)continue;let e=Array.isArray(r)?r.map(e=>Ol(e)).filter(e=>e!==void 0):[Ol(r)].filter(e=>e!==void 0);e.length>0&&(t[n]=e)}return t}function Ml(e,t){let n={...t};if(!e)return n;for(let[t,r]of Object.entries(e)){let e=Ol(r);e!==void 0&&(n[t]=e)}return n}function Nl(e,t,n){let r={...t};for(let[t,n]of Object.entries(e??{}))n!=null&&(r[t]=n);for(let[e,t]of Object.entries(n))e in r||(r[e]=t);return r}function Pl(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(!t||!r.includes(t))return!1}return!0}function Fl(e,t){let n={};for(let t of e)for(let[e,r]of Object.entries(t.defaultVariants))n[e]=r;for(let[e,r]of Object.entries(kl(t)))n[e]=r;return n}function Il(e,t){let n={};for(let t of e)for(let[e,r]of Object.entries(t.runtimeDefaultVariants))n[e]=r;for(let[e,r]of Object.entries(Al(t)))n[e]=r;return n}function Ll(e){let t=[];for(let n of e??[]){let e=fl(n);if(!e)throw TypeError(`cv.extend only accepts cv results.`);t.push(e)}return t}function Rl(e){let t=e.extend,n=Ll(t),r=Tl(e.base),i=e.extendBase,a=Fl(n,e.defaultVariants),o=Il(n,e.defaultVariants),s=Dl(e.variants,e=>Tl(e)),c=(e.compoundVariants??[]).map(e=>({className:Tl(e.class??e.className),conditions:jl(e)})),l={config:e,defaultVariants:a,runtimeDefaultVariants:o,kind:`cv`,resolveRaw:e=>{let t=Ml(e,a),l=Nl(e,o,t),u=[];for(let e of n)u.push(...e.resolveRaw(l));let d=ul(l,()=>Tl(i?.(l)));d&&u.push(d),r&&u.push(r);for(let[e,n]of Object.entries(s)){let r=t[e];if(!r)continue;let i=n[r];i&&u.push(i)}for(let e of c)Pl(t,e.conditions)&&e.className&&u.push(e.className);return u}};return cl((e,...t)=>{let n=e??ll(),r=l.resolveRaw(n);if(t.length===0)return Tl(r);let i=[...r];for(let e of t){let t=Tl(e);t&&i.push(t)}return El(i)},l)}function zl(e,t){let n={...e};for(let[e,r]of Object.entries(t??{}))r!=null&&(n[e]=r);return n}function Bl(e,t){let n=zl(void 0,t);return zl(n,e(n))}function xee(e,t,n){return cl((t,...r)=>e(Bl(n,t??ll()),...r),{...t,resolveRaw:e=>t.resolveRaw(Bl(n,e))})}function See(e,t,n){return cl((t,...r)=>e(Bl(n,t??ll()),...r),{...t,resolveRaw:e=>t.resolveRaw(Bl(n,e))})}function Vl(e,t){let n=fl(e);if(n)return xee(e,n,t);let r=pl(e);if(r)return See(e,r,t);throw TypeError(`derive only accepts cv or scv results.`)}function Hl(e,t,n){if(n.length===0)return;let r=e[t];if(r){r.push(...n);return}e[t]=[...n]}function Ul(e,t,n,r){let i=t.indexOf(n);i>=0&&t.splice(i,1),t.push(n),e[n]=r}function Cee(e){let t=[],n={};for(let r of e)if(r.kind===`scv`)for(let e of r.meta.slotOrder)Ul(n,t,e,r.meta.slotPlan[e]);return{slotOrder:t,slotPlan:n}}function wee(e,t,n){let{slotOrder:r,slotPlan:i}=Cee(t),a=[...e];for(let e of n)a.includes(e)||a.push(e);a.length===0&&r.length===0&&t.some(e=>e.kind===`cv`)&&a.push(`root`);let o={},s=[];for(let e of a)s.push(e),o[e]={};let c=[],l={};for(let e of r)c.push(e),l[e]=i[e];for(let e of s)Ul(l,c,e,o[e]);return c.length===0&&(c.push(`root`),l.root={}),{slotOrder:c,slotPlan:l}}function Tee(e,t){return{inheritedShared:{},inheritedUnique:{},localShared:{},localUnique:{},slotOrder:e,slotPlan:t}}function Eee(e,t){for(let[n,r]of Object.entries(t.inheritedShared))Hl(e.inheritedShared,n,r);for(let[n,r]of Object.entries(t.localShared))Hl(e.inheritedShared,n,r);for(let[n,r]of Object.entries(t.inheritedUnique))n in e.slotPlan&&Hl(e.inheritedUnique,n,r);for(let[n,r]of Object.entries(t.localUnique))n in e.slotPlan&&Hl(e.inheritedUnique,n,r)}function Wl(e,t,n){Hl(e,t,n)}function Gl(e){let t={};for(let[n,r]of Object.entries(e??{})){let e=Tl(r);e&&(t[n]=[e])}return{slots:t}}function Kl(e,t,n){let r=n===`inherited`?e.inheritedShared:e.localShared;for(let[n,i]of Object.entries(t.slots))n in e.slotPlan&&Wl(r,n,i)}function Dee(e,t){let n={};for(let t of e){let e=t.meta.defaultVariants;for(let[t,r]of Object.entries(e))n[t]=r}for(let[e,r]of Object.entries(kl(t)))n[e]=r;return n}function Oee(e,t){let n={};for(let t of e){let e=t.meta.runtimeDefaultVariants;for(let[t,r]of Object.entries(e))n[t]=r}for(let[e,r]of Object.entries(Al(t)))n[e]=r;return n}function ql(e){let t=[];for(let n of e??[]){let e=pl(n);if(e){t.push({kind:`scv`,meta:e});continue}if(fl(n))throw TypeError(`scv.extend does not accept cv results directly. Map them to a slot key, for example { root: recipe }.`);for(let[e,r]of Object.entries(n)){let n=fl(r);n&&t.push({kind:`cv`,meta:n,slot:e})}}return t}function kee(e){let t=[];for(let n of e??[])if(!pl(n)){if(fl(n))throw TypeError(`scv.extend does not accept cv results directly. Map them to a slot key, for example { root: recipe }.`);for(let e of Object.keys(n))t.includes(e)||t.push(e)}return t}function Aee(e,t){let n={};if(!e)return n;for(let r of e)if(r)for(let[e,i]of Object.entries(r)){if(!(e in t))continue;let r=n[e]??[];r.push(Tl(i)),n[e]=r}return n}function jee(e){return Object.keys(e??{})}function Jl(e){let t=e.extend,n=jee(e.slots),r=e.extendBase,i=kee(t),{slotOrder:a,slotPlan:o}=wee(n,ql(t),i),s=new Set(e.extendIgnore??[]),c=Gl(e.slots),l=Dl(e.variants,e=>Gl(e)),u=(e.compoundVariants??[]).map(e=>({classParts:Gl(e.class??e.className),conditions:jl(e)})),d=ql(t),f=Dee(d,e.defaultVariants),p=Oee(d,e.defaultVariants),m={config:e,defaultVariants:f,runtimeDefaultVariants:p,kind:`scv`,preparedExtends:d,resolveRaw:e=>{let t=Tee(a,o),n=Ml(e,f),i=Nl(e,p,n);for(let e of d){if(e.kind===`scv`){Eee(t,e.meta.resolveRaw(i));continue}let n=e.meta.resolveRaw(i);Wl(t.inheritedShared,e.slot,n)}Kl(t,ul(i,()=>Gl(r?.(i))),`local`),Kl(t,c,`local`);for(let[e,r]of Object.entries(l)){let i=n[e];if(!i)continue;let a=r[i];a&&Kl(t,a,`local`)}for(let e of u)Pl(n,e.conditions)&&Kl(t,e.classParts,`local`);for(let e of a){let n=s.has(e)?[]:[...t.inheritedShared[e]??[]],r=[...t.localShared[e]??[]];t.localUnique[e]=[...n,...r],s.has(e)&&(delete t.inheritedShared[e],delete t.inheritedUnique[e])}return t},slotOrder:a,slotPlan:o};return cl((e,...t)=>{let n=e??ll(),r=m.resolveRaw(n),i=t.length===0?void 0:Aee(t,r.slotPlan),a=r.slotOrder.map(e=>{let t=r.localUnique[e]??[],n=i?[...t,...i[e]??[]]:t;return[e,i?El(n):Tl(n)]});return Object.fromEntries(a)},m)}function Yl(e,t){let n={...e};for(let[e,r]of Object.entries(t??{}))r!=null&&(n[e]=r);return n}function Xl(e,t){return{...e,...kl(t)}}function Zl(e,t){return{...e,...Al(t)}}function Mee(e,t,n){let r=Xl(t.defaultVariants,n),i=Zl(t.runtimeDefaultVariants,n);return cl((t,...n)=>e(Yl(i,t??ll()),...n),{...t,config:{...t.config,defaultVariants:i},defaultVariants:r,runtimeDefaultVariants:i,resolveRaw:e=>t.resolveRaw(Yl(i,e))})}function Nee(e,t,n){let r=Xl(t.defaultVariants,n),i=Zl(t.runtimeDefaultVariants,n);return cl((t,...n)=>e(Yl(i,t??ll()),...n),{...t,config:{...t.config,defaultVariants:i},defaultVariants:r,runtimeDefaultVariants:i,resolveRaw:e=>t.resolveRaw(Yl(i,e))})}function Pee(e,t){let n=fl(e);if(n)return Mee(e,n,t);let r=pl(e);if(r)return Nee(e,r,t);throw TypeError(`defaults only accepts cv or scv results.`)}Jl({slots:{root:``,item:`border-b`,header:`flex`,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`],description:`m-0`,trigger:[`flex-1 flex items-center justify-start font-medium transition-all-200 bg-transparent`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`hover:underline [&[data-state=open]>.trigger-icon]:rotate-180`],triggerLeadingIcon:`shrink-0`,triggerIcon:`trigger-icon ms-auto shrink-0 text-muted-foreground transition-transform-200`},variants:{size:{xs:{root:`text-2xs`,description:`pb-3`,trigger:`py-3 gap-2.5`},sm:{root:`text-xs`,description:`pb-3.5`,trigger:`py-3.5 gap-3`},md:{root:`text-sm`,description:`pb-4`,trigger:`py-4 gap-3.5`},lg:{root:`text-base`,description:`pb-4.5`,trigger:`py-4.5 gap-4`},xl:{root:`text-lg`,description:`pb-5`,trigger:`py-5 gap-4.5`},"2xl":{root:`text-2xl`,description:`pb-6`,trigger:`py-6 gap-5`}}},defaultVariants:{size:`md`}});function Ql(e){return e==null}function $l(e){return typeof e==`string`?`'${e}'`:new Fee().serialize(e)}var Fee=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function eu(e,t){return e===t||$l(e)===$l(t)}function Iee(e,t){let n={};for(let r in e){let i=r;t.includes(i)||(n[i]=e[i])}return n}function tu(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Lee(e,t,n){if(!e?.length||!t)return;let r=t.length>1&&t[0]?.repeat(t.length)===t?t[0]:t,i=r.toLowerCase(),a=r.length===1,o=n?e.indexOf(n):-1,s=Math.max(o,0),c=e.length;for(let t=0;t<c;t++){let r=e[(s+t)%c];if((!a||r!==n)&&r?.toLowerCase().startsWith(i))return r===n?void 0:r}}function Ree(e,t,n){let r=e.findIndex(e=>eu(e,t)),i=e.findIndex(e=>eu(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}function zee(e){return e?e.reduce((e,t)=>(e.push(t),t.children&&e.push(...zee(t.children)),e),[]):[]}function nu(e){return e===`indeterminate`}function ru(e){return nu(e)?`indeterminate`:e?`checked`:`unchecked`}function iu(e){return e?`open`:`closed`}function au(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function ou(e,t){let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=10**a;n=Math.round(n*e)/e}return n}function su(e,t,n,r){let i=Number(t),a=Number(n),o=(e-(Number.isNaN(i)?0:i))%r,s=ou(Math.abs(o)*2>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return Number.isNaN(i)?!Number.isNaN(a)&&s>a&&(s=Math.floor(ou(a/r,r))*r):s<i?s=i:!Number.isNaN(a)&&s>a&&(s=i+Math.floor(ou((a-i)/r,r))*r),s=ou(s,r),s}function R(e,t){let n=typeof e==`string`?e:e.name,r=typeof e==`string`?Symbol(e):e.key;return[(...e)=>{let n=t?.(...e)??e[0];return Vn(r,n),n},(e,t)=>{let i=Hn(r,t)??null;if(e!=null&&i===null)throw Error(`\`${e}\` must be used within \`${n}\``);return i}]}function cu(e,t){return Ql(e)||Ql(t)?!1:Array.isArray(e)?e.includes(t):e===t}var lu={grad:360/400,turn:360,rad:360/(Math.PI*2)},uu={x:.95047,y:1,z:1.08883},du={x:.96422,y:1,z:.82521},fu=[[.4122214708,.5363325363,.0514459929],[.2119034982,.6806995451,.1073969566],[.0883024619,.2817188376,.6299787005]],pu=[[4.076741661347993,-3.3077115904081937,.2309699287294278],[-1.2684380040921763,2.609757400663372,-.3413193963102196],[-.0041960865418371,-.7034186144594495,1.7076147009309446]],mu=[[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],hu=[[.9999999984505198,.3963377921737678,.2158037580607588],[1.0000000088817607,-.1055613423236563,-.0638541747717059],[1.0000000546724108,-.0894841820949657,-1.2914855378640917]],gu=[[.4124564391,.3575760776,.1804374833],[.2126728514,.7151521552,.0721749934],[.0193338956,.1191920259,.9503040785]],_u=[[3.2404541621,-1.5371385127,-.4985314095],[-.9692660305,1.8760108454,.0415560175],[.055643431,-.2040259135,1.0572251882]],vu=[[1.0478112,.0228866,-.050127],[.0295424,.9904844,-.0170491],[-.0092345,.0150436,.7521316]],yu=[[.9555766,-.0230393,.0631636],[-.0282895,1.0099416,.0210077],[.0122982,-.020483,1.3299098]],bu=e=>typeof e==`string`?e.length>0:typeof e==`number`,xu=(e,t=0)=>{let n=10**t;return Math.round(n*e)/n+0},Su=(e,t=0,n=1)=>e>n?n:e<t?t:e,Cu=e=>{let t=Number.isFinite(e)?e%360:0;return t>0?t:t+360},wu=(e,t=`deg`)=>Number.parseFloat(e)*(lu[t]||1);function Tu(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function Eu(e){if(!e)return 1;let t=Number.parseFloat(e);return e.endsWith(`%`)&&(t/=100),t}function Du(e){let t=Number.parseFloat(e);return e.endsWith(`%`)||t>1?Su(t/100):Su(t)}var Ou=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:Su(t,0,255),g:Su(n,0,255),b:Su(r,0,255),alpha:Su(i)}},ku=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:xu(t,2),g:xu(n,2),b:xu(r,2),alpha:xu(i,3)}},Au=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:Su(t),g:Su(n),b:Su(r),alpha:Su(i)}},ju=({r:e,g:t,b:n,alpha:r=1})=>!bu(e)||!bu(t)||!bu(n)?null:Ou({r:Number(e),g:Number(t),b:Number(n),alpha:Number(r)}),Mu=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4};function Nu(e){return(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*255}function Pu(e){return{r:Mu(e.r),g:Mu(e.g),b:Mu(e.b),alpha:e.alpha}}function Fu(e){return{r:Nu(e.r),g:Nu(e.g),b:Nu(e.b),alpha:e.alpha}}var Iu=/^rgb?\(\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/i,Lu=e=>{let t=Iu.exec(e);if(!t)return null;let[n,r,i,a,o]=t;return Ou({r:Ru(r),g:Ru(i),b:Ru(a),alpha:Eu(o)})};function Ru(e){if(e.endsWith(`%`)){let t=Number.parseFloat(e.slice(0,-1));return Math.round(t/100*255)}return Number.parseFloat(e)}var zu=e=>{let{r:t,g:n,b:r,alpha:i}=ku(e);return i<1?`rgb(${t} ${n} ${r} / ${i})`:`rgb(${t} ${n} ${r})`},Bu=e=>({h:Cu(e.h),s:Su(e.s,0,100),v:Su(e.v,0,100),alpha:Su(e.alpha)}),Vu=e=>({h:xu(e.h,3),s:xu(e.s,3),v:xu(e.v,3),alpha:xu(e.alpha,3)}),Hu=e=>{let t=e.h/360*6,n=e.s/100,r=e.v/100,i=Math.floor(t),a=r*(1-n),o=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:[r,o,a,a,s,r][c]*255,g:[s,r,r,o,a,a][c]*255,b:[a,a,s,r,r,o][c]*255,alpha:e.alpha}},Uu=({h:e,s:t,v:n,alpha:r=1})=>!bu(e)||!bu(t)||!bu(n)?null:Hu(Bu({h:Number(e),s:Number(t),v:Number(n),alpha:Number(r)})),Wu=({r:e,g:t,b:n,alpha:r})=>{let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=0;return a&&(o=i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a),{h:60*(o<0?o+6:o),s:i?a/i*100:0,v:i/255*100,alpha:r}},Gu=e=>{let{x:t,y:n,z:r,alpha:i}=e;return{x:Su(t,0,uu.x*1.2),y:Su(n,0,uu.y*1.2),z:Su(r,0,uu.z*1.2),alpha:Su(i)}},Ku=e=>{let{x:t,y:n,z:r,alpha:i}=e,[a,o,s]=Tu(_u,[t,n,r]);return Ou(Fu({r:a,g:o,b:s,alpha:i}))},qu=e=>{let{r:t,g:n,b:r,alpha:i}=Pu(e),[a,o,s]=Tu(gu,[t,n,r]);return Gu({x:a,y:o,z:s,alpha:i})},Ju=216/24389,Yu=24389/27,Xu=e=>{let{l:t,a:n,b:r,alpha:i}=e;return{l:Su(t,0,100),a:Su(n,-160,160),b:Su(r,-160,160),alpha:Su(i)}},Zu=e=>{let{l:t,a:n,b:r,alpha:i}=e;return{l:xu(t,3),a:xu(n,3),b:xu(r,3),alpha:xu(i,3)}},Qu=e=>{let t=qu(e),{alpha:n}=t,[r,i,a]=Tu(vu,[t.x,t.y,t.z]);return rd({x:r,y:i,z:a,alpha:n})},$u=e=>{let t=id(e),[n,r,i]=Tu(yu,[t.x,t.y,t.z]);return Ku({x:n,y:r,z:i,alpha:e.alpha})},ed=(e,t=.01)=>e.r>=-t&&e.r<=255+t&&e.g>=-t&&e.g<=255+t&&e.b>=-t&&e.b<=255+t,td=(e,t,n)=>{let r=0,i=150;if(ed($u({l:e,a:i*Math.cos(t),b:i*Math.sin(t),alpha:n})))return i;for(;i-r>.01;){let a=(r+i)/2;ed($u({l:e,a:a*Math.cos(t),b:a*Math.sin(t),alpha:n}))?r=a:i=a}return r},nd=e=>{let{l:t,a:n,b:r,alpha:i}=e,a=$u(e);if(!ed(a)&&Math.sqrt(n*n+r*r)>1e-4){let e=Math.atan2(r,n),o=td(t,e,i);a=$u({l:t,a:o*Math.cos(e),b:o*Math.sin(e),alpha:i})}return Ou(a)};function rd(e){let{x:t,y:n,z:r,alpha:i}=e,a=t/du.x,o=n/du.y,s=r/du.z,c=e=>e>Ju?Math.cbrt(e):(Yu*e+16)/116,l=c(a),u=c(o),d=c(s);return{l:116*u-16,a:500*(l-u),b:200*(u-d),alpha:i}}function id(e){let{l:t,a:n,b:r,alpha:i}=e,a=(t+16)/116,o=n/500+a,s=a-r/200,c=e=>e*e*e>Ju?e*e*e:(116*e-16)/Yu,l=c(o),u=t>Yu*Ju?((t+16)/116)**3:t/Yu,d=c(s);return{x:l*du.x,y:u*du.y,z:d*du.z,alpha:i}}var ad=({l:e,a:t,b:n,alpha:r=1})=>!bu(e)||!bu(t)||!bu(n)?null:Xu({l:Number(e),a:Number(t),b:Number(n),alpha:Number(r)}),od=e=>{let t=ad(e);return t?nd(t):null},sd=/^lab\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,cd=e=>{let t=sd.exec(e);if(!t)return null;let[n,r,i,a,o]=t;return Xu({l:Number.parseFloat(r),a:Number.parseFloat(i),b:Number.parseFloat(a),alpha:Eu(o)})},ld=e=>{let t=cd(e);return t?nd(t):null},ud=e=>{let{l:t,a:n,b:r,alpha:i}=Zu(e);return i<1?`lab(${t}% ${n} ${r} / ${i})`:`lab(${t}% ${n} ${r})`},dd=e=>ud(Qu(e)),fd=e=>{if(!e||e.format!==`lab`)return null;let{input:t}=e;return typeof t==`string`?cd(t):typeof t==`object`?ad(t):null},pd=e=>{let t=fd(e);return t?ud(t):null},md=e=>{let{h:t,s:n,l:r,alpha:i}=e;return{h:Cu(t),s:Su(n,0,100),l:Su(r,0,100),alpha:Su(i)}},hd=e=>{let{h:t,s:n,l:r,alpha:i}=e;return{h:xu(t,3),s:xu(n,3),l:xu(r,3),alpha:xu(i,3)}},gd=e=>{let{h:t,l:n,alpha:r}=e,i=e.s*(n<50?n:100-n)/100;return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,alpha:r}},_d=({h:e,s:t,v:n,alpha:r})=>{let i=(200-t)*n/100;return{h:e,s:i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0,l:i/2,alpha:r}},vd=e=>Hu(gd(e)),yd=e=>_d(Wu(e)),bd=({h:e,s:t,l:n,alpha:r=1})=>!bu(e)||!bu(t)||!bu(n)?null:vd(md({h:Number(e),s:Number(t),l:Number(n),alpha:Number(r)})),xd=e=>{let{h:t,s:n,l:r,alpha:i}=hd(yd(e));return i<1?`hsl(${t} ${n}% ${r}% / ${i})`:`hsl(${t} ${n}% ${r}%)`},Sd=/^hsl?\(\s*([+-]?[\d.]+)(deg|grad|rad|turn)?\s*[, ]\s*([+-]?[\d.]+)%\s*[, ]\s*([+-]?[\d.]+)%(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,Cd=e=>{let t=Sd.exec(e);if(!t)return null;let[,n,r,i,a,o]=t;return vd(md({h:wu(n,r),s:Number.parseFloat(i),l:Number.parseFloat(a),alpha:Eu(o)}))},wd=(e,t)=>({r:e.r,g:e.g,b:e.b,alpha:t}),Td=e=>({r:255-e.r,g:255-e.g,b:255-e.b,alpha:e.alpha}),Ed=(e,t)=>{let n=yd(e);return{h:n.h,s:n.s,l:Su(n.l+t*100,0,100),alpha:n.alpha}},Dd=(e,t)=>{let{h:n,s:r,l:i,alpha:a}=yd(e);return{h:n,s:Su(r+t*100,0,100),l:i,alpha:a}},Od=e=>(e.r*299+e.g*587+e.b*114)/1e3/255;function kd(e,t){let{l:n,a:r,b:i}=e,{l:a,a:o,b:s}=t,c=180/Math.PI,l=Math.PI/180,u=((r**2+i**2)**.5+(o**2+s**2)**.5)/2,d=(n+a)/2,f=u**7,p=.5*(1-(f/(f+25**7))**.5),m=r*(1+p),h=o*(1+p),g=(m**2+i**2)**.5,_=(h**2+s**2)**.5,v=(g+_)/2,y=m===0&&i===0?0:Math.atan2(i,m)*c,b=h===0&&s===0?0:Math.atan2(s,h)*c;y<0&&(y+=360),b<0&&(b+=360);let x=b-y,S=Math.abs(b-y);S>180&&b<=y?x+=360:S>180&&b>y&&(x-=360);let C=y+b;S<=180?C/=2:C=(y+b<360?C+360:C-360)/2;let w=1-.17*Math.cos(l*(C-30))+.24*Math.cos(l*2*C)+.32*Math.cos(l*(3*C+6))-.2*Math.cos(l*(4*C-63)),ee=a-n,te=_-g,ne=2*Math.sin(l*x/2)*(g*_)**.5,re=1+.015*(d-50)**2/(20+(d-50)**2)**.5,ie=1+.045*v,ae=1+.015*v*w,oe=30*Math.exp(-1*((C-275)/25)**2),se=-(2*(f/(f+25**7))**.5)*Math.sin(l*2*oe);return((ee/1/re)**2+(te/1/ie)**2+(ne/1/ae)**2+se*te*ne/(1*ie*1*ae))**.5}function Ad(e){return Object.keys(e)}var jd=/^#([0-9a-f]{3,8})$/i,Md=e=>{let t=jd.exec(e);if(!t)return null;let n=t[1];return n.length<=4?{r:Number.parseInt(n[0]+n[0],16),g:Number.parseInt(n[1]+n[1],16),b:Number.parseInt(n[2]+n[2],16),alpha:n.length===4?xu(Number.parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),alpha:n.length===8?xu(Number.parseInt(n.slice(6,8),16)/255,2):1}:null},Nd=e=>{let t=Math.round(e).toString(16);return t.length<2?`0${t}`:t},Pd=e=>{let{r:t,g:n,b:r,alpha:i}=ku(e),a=i<1?Nd(xu(i*255)):``;return`#${Nd(t)}${Nd(n)}${Nd(r)}${a}`},Fd=e=>{let{l:t,c:n,h:r,alpha:i}=e;return{l:Su(t,0,1),c:Su(n,0,.37),h:Cu(r),alpha:Su(i)}},Id=e=>{let{l:t,c:n,h:r,alpha:i}=e;return{l:xu(t,3),c:xu(n,3),h:xu(r,3),alpha:xu(i,3)}},Ld=e=>{let{l:t,c:n,h:r,alpha:i}=e,a=r*Math.PI/180,[o,s,c]=Tu(pu,Tu(hu,[t,n*Math.cos(a),n*Math.sin(a)]).map(e=>e*e*e));return{r:o,g:s,b:c,alpha:i}},Rd=(e,t=1e-6)=>e.r>=-t&&e.r<=1+t&&e.g>=-t&&e.g<=1+t&&e.b>=-t&&e.b<=1+t,zd=(e,t,n)=>{let r=0,i=.37,a=1e-5;if(Rd(Ld({l:e,c:i,h:t,alpha:n}),a))return i;for(;i-r>a;){let o=(r+i)/2;Rd(Ld({l:e,c:o,h:t,alpha:n}),a)?r=o:i=o}return r},Bd=e=>{let{l:t,h:n,alpha:r}=e,i=Ld(e);return Rd(i)||(i=Ld({l:t,c:zd(t,n,r),h:n,alpha:r})),i=Au(i),Ou(Fu(i))},Vd=e=>{let t=Pu(e),[n,r,i]=Tu(mu,Tu(fu,[t.r,t.g,t.b]).map(e=>Math.cbrt(e))),a=Math.sqrt(r*r+i*i),o;return a<1e-4?o=0:(o=180/Math.PI*Math.atan2(i,r),o<0&&(o+=360)),Fd({l:n,c:a,h:o,alpha:e.alpha})},Hd=({l:e,c:t,h:n,alpha:r=1})=>!bu(e)||!bu(t)||!bu(n)?null:Fd({l:Number(e),c:Number(t),h:Number(n),alpha:Number(r)}),Ud=e=>{let t=Hd(e);return t?Bd(t):null},Wd=/^oklch\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,Gd=e=>{let t=Wd.exec(e);if(!t)return null;let[n,r,i,a,o,s]=t;return Fd({l:Du(r),c:Number.parseFloat(i),h:wu(a,o),alpha:Eu(s)})},Kd=e=>{let t=Gd(e);return t?Bd(t):null},qd=e=>{let{l:t,c:n,h:r,alpha:i}=Id(e),a=xu(t*100,1);return i<1?`oklch(${a}% ${n} ${r} / ${i})`:`oklch(${a}% ${n} ${r})`},Jd=e=>qd(Vd(e)),Yd=e=>{if(!e||e.format!==`oklch`)return null;let{input:t}=e;return typeof t==`string`?Gd(t):typeof t==`object`?Hd(t):null},Xd=e=>{let t=Yd(e);return t?qd(t):null},Zd={string:[[Md,`hex`],[Lu,`rgb`],[Cd,`hsl`],[Kd,`oklch`]],object:[[ju,`rgb`],[bd,`hsl`],[Uu,`hsv`],[Ud,`oklch`]]},Qd=(e,t)=>{for(let n=0;n<t.length;n+=1){let r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},$d=e=>typeof e==`string`?Qd(e.trim(),Zd.string):typeof e==`object`&&e?Qd(e,Zd.object):[null,void 0],ef=e=>e instanceof tf?e:new tf(e),tf=class{parsed;rgb;source;constructor(e){let[t,n]=$d(e);this.parsed=t,this.rgb=this.parsed||{r:0,g:0,b:0,alpha:1},n&&this.parsed&&(this.source={format:n,input:e})}getSource(){return this.source}isValid(){return this.parsed!==null}brightness(){return xu(Od(this.rgb),2)}isDark(){return Od(this.rgb)<.5}isLight(){return Od(this.rgb)>=.5}toHex(){return Pd(this.rgb)}toRgb(){return ku(this.rgb)}toRgbString(){return zu(this.rgb)}toHsl(){return hd(yd(this.rgb))}toHslString(){return xd(this.rgb)}toHsv(){return Vu(Wu(this.rgb))}toOklch(){return Id(Yd(this.getSource())||Vd(this.rgb))}toOklchString(){return Xd(this.getSource())||Jd(this.rgb)}invert(){return ef(Td(this.rgb))}saturate(e=.1){return ef(Dd(this.rgb,e))}desaturate(e=.1){return ef(Dd(this.rgb,-e))}grayscale(){return ef(Dd(this.rgb,-1))}lighten(e=.1){return ef(Ed(this.rgb,e))}darken(e=.1){return ef(Ed(this.rgb,-e))}rotate(e=15){return this.hue(this.hue()+e)}alpha(e){return typeof e==`number`?ef(wd(this.rgb,e)):xu(this.rgb.alpha,3)}hue(e){let t=yd(this.rgb);return typeof e==`number`?ef({h:e,s:t.s,l:t.l,alpha:t.alpha}):xu(t.h)}isEqual(e){return this.toHex()===ef(e).toHex()}},nf=[],rf=e=>{e.forEach(e=>{nf.includes(e)||(e(tf,Zd),nf.push(e))})},af=`data-soybean-collection-item`;function of(e){return e.filter(e=>e.tagName!==`A`)}function sf(){let e=document.activeElement;if(e===null)return null;for(;e!==null&&e.shadowRoot!==null&&e.shadowRoot.activeElement!==null;)e=e.shadowRoot.activeElement;return e}function cf(e,t){return[e.getAttribute(t),e.getAttribute(`data-${t}`)].some(e=>e===``||e===`true`)}function lf(e){return Array.from(e.querySelectorAll(`[${af}]`))}var uf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`},df=[`Enter`,` `];function ff(e,{select:t=!1}={}){let n=sf();for(let r of e)if(yf(r,{select:t}),sf()!==n)return}function pf(e,t=!1){let n=sf();return e.some(e=>e===n?!0:(e.focus({preventScroll:t}),sf()!==n))}function mf(e){let t=hf(e);return[gf(t,e),gf(t.slice().reverse(),e)]}function hf(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gf(e,t){return e.find(e=>!_f(e,{upTo:t}))}function _f(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;let n=e;for(;n;){if(t!==void 0&&n===t)return!1;if(getComputedStyle(n).display===`none`)return!0;n=n.parentElement}return!1}function vf(e){return e instanceof HTMLInputElement&&`select`in e}function yf(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=sf();e.focus({preventScroll:!0}),t&&e!==n&&vf(e)&&e.select()}function bf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function xf(e,t,n){let r=bf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return uf[r]}var Sf={KEYED_FRAGMENT:128,BAIL:-2};function Cf(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e[r];i.type===ma?((i.patchFlag??0)===Sf.KEYED_FRAGMENT&&n++,t=t.concat(Cf(i.children))):i.type!==ga&&t.push(i)}if(n>1)for(let e=0;e<t.length;e++)t[e].patchFlag=Sf.BAIL;return t}function wf(e){let t=e?.$el??e;return t&&t.nodeType!==1&&(t=void 0),t}function Tf(e,t){return(t??Object.keys(e)).reduce((t,n)=>(t[n]=L(()=>typeof e[n]==`function`?e[n]():e[n]),t),{})}var Ef=typeof window<`u`&&typeof document<`u`,Df=null;function Of(){return!Ef||!window?.navigator?.userAgent?!1:/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||window.navigator.maxTouchPoints>2&&/iPad|Macintosh/.test(window.navigator.userAgent)}function kf(){return Df===null&&(Df=Of()),Df}function Af(e,t,n){let r=n.originalEvent.target;if(!r)return;let i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function jf(e,t){if(!t)return!1;let{clientX:n,clientY:r}=e;return Mf({x:n,y:r},t)}function Mf(e,t){let{x:n,y:r}=e;if(t.length<3)return!1;let{x:i,y:a}=t[0],{x:o,y:s}=t[0];for(let e=1;e<t.length;e++){let n=t[e];i=Math.min(i,n.x),o=Math.max(o,n.x),a=Math.min(a,n.y),s=Math.max(s,n.y)}if(n<i||n>o||r<a||r>s)return!1;let c=0;for(let e=0;e<t.length;e++){let i=t[e],a=t[(e+1)%t.length],{x:o,y:s}=i,{x:l,y:u}=a;s>r!=u>r&&n<o+(r-s)*(l-o)/(u-s)&&c++}return c%2==1}function Bee(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)}function Nf(e,t){return e-t*Math.floor(e/t)}var Pf=1721426;function Ff(e,t,n,r){t=Lf(e,t);let i=t-1,a=-2;return n<=2?a=0:If(t)&&(a=-1),Pf-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function If(e){return e%4==0&&(e%100!=0||e%400==0)}function Lf(e,t){return e===`BC`?1-t:t}function Rf(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var zf={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},Bf=class{fromJulianDay(e){let t=e,n=t-Pf,r=Math.floor(n/146097),i=Nf(n,146097),a=Math.floor(i/36524),o=Nf(i,36524),s=Math.floor(o/1461),c=Nf(o,1461),l=Math.floor(c/365),[u,d]=Rf(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-Ff(u,d,1,1),p=2;t<Ff(u,d,3,1)?p=0:If(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new zp(u,d,m,t-Ff(u,d,m,1)+1)}toJulianDay(e){return Ff(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return zf[If(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return If(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}};function Vf(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Hf(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Uf(e,t){return Wf(e)-Wf(t)}function Wf(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var Gf=null,Kf=!1;function qf(){return Gf??=new Intl.DateTimeFormat().resolvedOptions().timeZone,Gf}function Jf(){return Kf}function Yf(e){return e=sp(e,new Bf),Xf(Lf(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Xf(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function Zf(e,t){if(t===`UTC`)return 0;if(e>0&&t===qf()&&!Jf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=$f(e,t);return Xf(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Qf=new Map;function $f(e,t){let n=Qf.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Qf.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var ep=864e5;function tp(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>np(e,t,n))}function np(e,t,n){let r=$f(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function rp(e,t,n=`compatible`){let r=op(e);if(t===`UTC`)return Yf(r);if(t===qf()&&n===`compatible`&&!Jf()){r=sp(r,new Bf);let e=new Date,t=Lf(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=Yf(r),a=Zf(i-ep,t),o=Zf(i+ep,t),s=tp(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function ip(e,t,n=`compatible`){return new Date(rp(e,t,n))}function ap(e,t){let n=Zf(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new Vp(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function op(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Bp(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function sp(e,t){if(Vf(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,_p(r),r}function cp(e,t,n){return e instanceof Vp?e.timeZone===t?e:up(e,t):ap(rp(e,t,n),t)}function lp(e){let t=Yf(e)-e.offset;return new Date(t)}function up(e,t){return sp(ap(Yf(e)-e.offset,t),e.calendar)}var dp=36e5;function fp(e,t){let n=e.copy(),r=`hour`in n?Tp(n,t):0;pp(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,mp(n),gp(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,hp(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function pp(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function mp(e){for(;e.month<1;)pp(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,pp(e,1)}function hp(e){for(;e.day<1;)e.month--,mp(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,mp(e)}function gp(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function _p(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),gp(e)}function vp(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function yp(e,t){return fp(e,vp(t))}function bp(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),_p(n),n}function xp(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Cp(n),n}function Sp(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=wp(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=wp(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=wp(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=wp(e.hour,24),t}function Cp(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function wp(e,t){let n=e%t;return n<0&&(n+=t),n}function Tp(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Sp(e)}function Ep(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=Op(a,n,0,t.length-1,r?.round),i.era=t[a],_p(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=Op(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=Op(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=Op(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),_p(i),i}function Dp(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=Op(t,n,a,o,r?.round);break}case`minute`:i.minute=Op(e.minute,n,0,59,r?.round);break;case`second`:i.second=Op(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=Op(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function Op(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function kp(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?rp(fp(op(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):Yf(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,sp(ap(n,e.timeZone),e.calendar)}function Ap(e,t){return kp(e,vp(t))}function jp(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=op(e),o=sp(xp(a,{hour:t}),new Bf),s=[rp(o,e.timeZone,`earlier`),rp(o,e.timeZone,`later`)].filter(t=>ap(t,e.timeZone).day===o.day)[0],c=sp(xp(a,{hour:i}),new Bf),l=[rp(c,e.timeZone,`earlier`),rp(c,e.timeZone,`later`)].filter(t=>ap(t,e.timeZone).day===c.day).pop(),u=Yf(e)-e.offset,d=Math.floor(u/dp),f=u%dp;return u=Op(d,n,Math.floor(s/dp),Math.floor(l/dp),r?.round)*dp+f,sp(ap(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return Dp(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return sp(ap(rp(Ep(op(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function Mp(e,t,n){let r=op(e),i=xp(bp(r,t),t);return i.compare(r)===0?e:sp(ap(rp(i,e.timeZone,n),e.timeZone),e.calendar)}function Np(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function Pp(e){let t=sp(e,new Bf),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function Fp(e){return`${Pp(e)}T${Np(e)}`}function Ip(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function Lp(e){return`${Fp(e)}${Ip(e.offset)}[${e.timeZone}]`}function Rp(e){let t=typeof e[0]==`object`?e.shift():new Bf,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var zp=class e{constructor(...e){let[t,n,r,i,a]=Rp(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,_p(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return fp(this,e)}subtract(e){return yp(this,e)}set(e){return bp(this,e)}cycle(e,t,n){return Ep(this,e,t,n)}toDate(e){return ip(this,e)}toString(){return Pp(this)}compare(e){return Hf(this,e)}},Bp=class e{constructor(...e){let[t,n,r,i,a]=Rp(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,_p(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return fp(this,e)}subtract(e){return yp(this,e)}set(e){return bp(xp(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return Ep(this,e,t,n);default:return Dp(this,e,t,n)}}toDate(e,t){return ip(this,e,t)}toString(){return Fp(this)}compare(e){let t=Hf(this,e);return t===0?Uf(this,op(e)):t}},Vp=class e{constructor(...e){let[t,n,r,i,a]=Rp(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,_p(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return kp(this,e)}subtract(e){return Ap(this,e)}set(e,t){return Mp(this,e,t)}cycle(e,t,n){return jp(this,e,t,n)}toDate(){return lp(this)}toString(){return Lp(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-cp(e,this.timeZone).toDate().getTime()}},Hp=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],Up=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Wp=[1867,1911,1925,1988,2018],Gp=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function Kp(e){let t=Hp.findIndex(([t,n,r])=>e.year<t||e.year===t&&e.month<n||e.year===t&&e.month===n&&e.day<r);return t===-1?Hp.length-1:t===0?0:t-1}function qp(e){let t=Wp[Gp.indexOf(e.era)];if(!t)throw Error(`Unknown era: `+e.era);return new zp(e.year+t,e.month,e.day)}(class extends Bf{fromJulianDay(e){let t=super.fromJulianDay(e),n=Kp(t);return new zp(this,Gp[n],t.year-Wp[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(qp(e))}balanceDate(e){let t=qp(e),n=Kp(t);Gp[n]!==e.era&&(e.era=Gp[n],e.year=t.year-Wp[n]),this.constrainDate(e)}constrainDate(e){let t=Gp.indexOf(e.era),n=Up[t];if(n!=null){let[r,i,a]=n,o=r-Wp[t];e.year=Math.max(1,Math.min(o,e.year)),e.year===o&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(a,e.day)))}if(e.year===1&&t>=0){let[,n,r]=Hp[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return Gp}getYearsInEra(e){let t=Gp.indexOf(e.era),n=Hp[t],r=Hp[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(qp(e))}getMinimumMonthInYear(e){let t=Jp(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=Jp(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier=`japanese`}});function Jp(e){if(e.year===1)return Hp[Gp.indexOf(e.era)]}var Yp=-543;(class extends Bf{fromJulianDay(e){let t=super.fromJulianDay(e),n=Lf(t.era,t.year);return new zp(this,n-Yp,t.month,t.day)}toJulianDay(e){return super.toJulianDay(Xp(e))}getEras(){return[`BE`]}getDaysInMonth(e){return super.getDaysInMonth(Xp(e))}balanceDate(){}constructor(...e){super(...e),this.identifier=`buddhist`}});function Xp(e){let[t,n]=Rf(e.year+Yp);return new zp(t,n,e.month,e.day)}var Zp=1911;function Qp(e){return e.era===`minguo`?e.year+Zp:1-e.year+Zp}function $p(e){let t=e-Zp;return t>0?[`minguo`,t]:[`before_minguo`,1-t]}(class extends Bf{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=$p(Lf(t.era,t.year));return new zp(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(em(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=$p(Qp(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(em(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:9999-Zp}constructor(...e){super(...e),this.identifier=`roc`}});function em(e){let[t,n]=Rf(Qp(e));return new zp(t,n,e.month,e.day)}var tm=78,nm=80;(class extends Bf{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-tm,r=e-Ff(t.era,t.year,1,1),i;r<nm?(n--,i=If(t.year-1)?31:30,r+=i+155+90+10):(i=If(t.year)?31:30,r-=nm);let a,o;if(r<i)a=1,o=r+1;else{let e=r-i;e<155?(a=Math.floor(e/31)+2,o=e%31+1):(e-=155,a=Math.floor(e/30)+7,o=e%30+1)}return new zp(this,n,a,o)}toJulianDay(e){let[t,n]=Rf(e.year+tm),r,i;return If(n)?(r=31,i=Ff(t,n,3,21)):(r=30,i=Ff(t,n,3,22)),e.month===1?i+e.day-1:(i+=r+Math.min(e.month-2,5)*31,e.month>=8&&(i+=(e.month-7)*30),i+=e.day-1,i)}getDaysInMonth(e){return e.month===1&&If(e.year+tm)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}});var rm=1948440,im=1948439,am=1300,om=1600,sm=460322;function cm(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function lm(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+cm(t,r,1,1)))/29.5)+1);return new zp(e,r,i,n-cm(t,r,i,1)+1)}function um(e){return(14+11*e)%30<11}var dm=class{fromJulianDay(e){return lm(this,rm,e)}toJulianDay(e){return cm(rm,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&um(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return um(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}};(class extends dm{fromJulianDay(e){return lm(this,im,e)}toJulianDay(e){return cm(im,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}});var fm=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`,pm,mm;function hm(e){return sm+mm[e-am]}function gm(e,t){let n=e-am,r=1<<11-(t-1);return(pm[n]&r)===0?29:30}function _m(e,t){let n=hm(e);for(let r=1;r<t;r++)n+=gm(e,r);return n}function vm(e){return mm[e+1-am]-mm[e-am]}(class extends dm{constructor(){if(super(),this.identifier=`islamic-umalqura`,pm||=new Uint16Array(Uint8Array.from(atob(fm),e=>e.charCodeAt(0)).buffer),!mm){mm=new Uint32Array(301);let e=0;for(let t=am;t<=om;t++){mm[t-am]=e;for(let n=1;n<=12;n++)e+=gm(t,n)}}}fromJulianDay(e){let t=e-rm,n=hm(am),r=hm(om);if(t<n||t>r)return super.fromJulianDay(e);{let e=am-1,n=1,r=1;for(;r>0;){e++,r=t-hm(e)+1;let i=vm(e);if(r===i){n=12;break}else if(r<i){let t=gm(e,n);for(n=1;r>t;)r-=t,n++,t=gm(e,n);break}}return new zp(this,e,n,t-_m(e,n)+1)}}toJulianDay(e){return e.year<am||e.year>om?super.toJulianDay(e):rm+_m(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<am||e.year>om?super.getDaysInMonth(e):gm(e.year,e.month)}getDaysInYear(e){return e.year<am||e.year>om?super.getDaysInYear(e):vm(e.year)}});function Vee(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return Nf(3*(r+1),7)<3&&(r+=1),r}var ym=1723856,bm=1824665,xm=5500;function Sm(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function Cm(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Sm(e,n,1,1))/30);return[n,r,t+1-Sm(e,n,r,1)]}function wm(e){return Math.floor(e%4/3)}function Tm(e,t){return t%13==0?wm(e)+5:30}var Em=class{fromJulianDay(e){let[t,n,r]=Cm(ym,e),i=`AM`;return t<=0&&(i=`AA`,t+=xm),new zp(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=xm),Sm(ym,t,e.month,e.day)}getDaysInMonth(e){return Tm(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+wm(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}};(class extends Em{fromJulianDay(e){let[t,n,r]=Cm(ym,e);return t+=xm,new zp(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}}),class extends Em{fromJulianDay(e){let[t,n,r]=Cm(bm,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new zp(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Sm(bm,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),Tm(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};var Hee=null;function Dm(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Om(e,t,n=`.`,r){if(!Dm(t))return Om(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Dm(a)&&Dm(i[t])?i[t]=Om(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function km(e){return(...t)=>t.reduce((t,n)=>Om(t,n,``,e),{})}var Am=km(),jm=[`day`,`month`,`year`],Mm=[`hour`,`minute`,`second`,`dayPeriod`],Nm=[`literal`,`timeZoneName`];[...jm,...Mm,...Nm].filter(e=>e!==`literal`);var Pm={name:`English`,key:`en`,dir:`ltr`,messages:{pagination:{firstPage:`First page`,prevPage:`Previous page`,nextPage:`Next page`,lastPage:`Last page`},table:{emptyTitle:`No data`,emptyDescription:`There is no data to display.`,selectAllRows:`Select all rows`,sortByColumn:`Sort by {column}`,sortByColumnAsc:`Sort by {column}, currently ascending`,sortByColumnDesc:`Sort by {column}, currently descending`,resizeColumn:`Resize {column} column`,expandRow:`Expand row {row}`,collapseRow:`Collapse row {row}`,selectRow:`Select row {row}`},calendar:{prevPage:`Previous page`,nextPage:`Next page`,selectMonth:`Select month`,selectYear:`Select year`},layout:{toggleSidebar:`Toggle Sidebar`},inputNumber:{increment:`Increase`,decrement:`Decrease`,clear:`Clear value`},textarea:{clear:`Clear textarea`},tagsInput:{addTag:`Add tag`,clear:`Clear tags`},progress:{loading:`Loading`},anchor:{nav:`Anchor`},breadcrumb:{nav:`breadcrumb`},stepper:{step:`Step {step}`},editable:{cancel:`Cancel`,edit:`Edit`,submit:`Submit`},combobox:{clearInput:`Clear input`,noResults:`No results found.`,search:`Search`,options:`Options`},autocomplete:{toggleSuggestions:`Toggle suggestions`,clearInput:`Clear input`,noResults:`No results found.`},command:{noResults:`No results found.`},dialog:{cancel:`Cancel`,confirm:`Confirm`},slider:{valueN:`Value {index} of {total}`,minimum:`Minimum`,maximum:`Maximum`},password:{clearInput:`Clear input`,showPassword:`Show password`,hidePassword:`Hide password`},date:{daySegment:`day,`,monthSegment:`month, `,yearSegment:`year, `,hourSegment:`hour, `,minuteSegment:`minute, `,secondSegment:`second, `,dayPeriodSegment:`AM/PM, `,timeZoneSegment:`time zone, `,empty:`Empty`,placeholder:{year:`yyyy`,month:`mm`,day:`dd`,time:`––`}}}},Fm={name:`简体中文`,key:`zh-CN`,dir:`ltr`,messages:{pagination:{firstPage:`第一页`,prevPage:`上一页`,nextPage:`下一页`,lastPage:`最后一页`},table:{emptyTitle:`暂无数据`,emptyDescription:`当前没有可显示的数据。`,selectAllRows:`全选`,sortByColumn:`按{column}排序`,sortByColumnAsc:`按{column}排序,当前升序`,sortByColumnDesc:`按{column}排序,当前降序`,resizeColumn:`调整{column}列宽`,expandRow:`展开行 {row}`,collapseRow:`收起行 {row}`,selectRow:`选择行 {row}`},calendar:{prevPage:`上一页`,nextPage:`下一页`,selectMonth:`选择月份`,selectYear:`选择年份`},layout:{toggleSidebar:`切换侧边栏`},inputNumber:{increment:`增加`,decrement:`减少`,clear:`清除数值`},textarea:{clear:`清除文本域`},tagsInput:{addTag:`添加标签`,clear:`清除标签`},progress:{loading:`加载中`},anchor:{nav:`锚点导航`},breadcrumb:{nav:`面包屑`},stepper:{step:`第 {step} 步`},editable:{cancel:`取消`,edit:`编辑`,submit:`提交`},combobox:{clearInput:`清除输入`,noResults:`无匹配结果。`,search:`搜索`,options:`选项`},autocomplete:{toggleSuggestions:`切换建议列表`,clearInput:`清除输入`,noResults:`无匹配结果。`},command:{noResults:`无匹配结果。`},dialog:{cancel:`取消`,confirm:`确认`},slider:{valueN:`第 {index} 个值,共 {total} 个`,minimum:`最小值`,maximum:`最大值`},password:{clearInput:`清除输入`,showPassword:`显示密码`,hidePassword:`隐藏密码`},date:{daySegment:`日,`,monthSegment:`月, `,yearSegment:`年, `,hourSegment:`时, `,minuteSegment:`分, `,secondSegment:`秒, `,dayPeriodSegment:`上午/下午, `,timeZoneSegment:`时区, `,empty:`空`,placeholder:{year:`年`,month:`月`,day:`日`,time:`––`}}}},Im={[Pm.key]:Pm,[Fm.key]:Fm};function Lm(e){return e?Im[e]??Pm:Pm}function Rm(e){return Lm(e).messages}function zm(e){return e?Im[e]?.dir??`ltr`:`ltr`}var[Bm,Vm]=R(`ConfigProvider`);function Hm(e){let t=Vm();return L(()=>tn(e)||t?.dir?.value||`ltr`)}function Um(e){let t=Vm();return L(()=>tn(e)||t?.locale?.value||`en`)}function Wm(){let e=Vm();return L(()=>{let t=Rm(e?.locale?.value??`en`),n=e?.messages?.value;return n?Am(n,t):t})}function Gm(e){let t=A();function n(n){let r=wf(n);r&&(t.value=r,e?.(r))}return[t,n]}function z(e,t=e=>e){let[n,r]=R(e,t);return[n,e=>{let t=r();return L(e?()=>t?.value?.[e]:()=>t?.value??{})}]}var Uee={ArrowRight:`right`,ArrowLeft:`left`,ArrowUp:`up`,ArrowDown:`down`,Home:`home`,End:`end`};function Wee(e,t,n){let{goForward:r,loop:i=!0}=n,a=e.length;if(a===0)return null;let o=e.indexOf(t);if(o===-1)return(r?e[0]:e[a-1])||null;let s=0,c=o;for(;s<a;){if(c=r?c+1:c-1,!i&&(c<0||c>=a))return null;c<0?c=a-1:c>=a&&(c=0);let t=e[c];if(t){let e=t.getAttribute(`disabled`);if(e===null||e===`false`)return t}s++}return null}var Km=`data-scroll-lock`,qm=`scroll-lock-styles`,Jm={BODY:`scroll-lock-body`,BODY_WITH_SCROLLBAR:`scroll-lock-body-with-scrollbar`,HTML:`scroll-lock-html`},Gee=`
|
|
2
|
+
.${Jm.BODY} {
|
|
3
|
+
position: fixed !important;
|
|
4
|
+
overflow-x: hidden !important;
|
|
5
|
+
left: 0 !important;
|
|
6
|
+
right: 0 !important;
|
|
7
|
+
bottom: 0 !important;
|
|
8
|
+
height: auto !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.${Jm.BODY_WITH_SCROLLBAR} {
|
|
12
|
+
overflow-y: scroll !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.${Jm.HTML} {
|
|
16
|
+
scroll-behavior: auto !important;
|
|
17
|
+
}
|
|
18
|
+
`;function Kee(){if(!Ef)return()=>{};let e=document.body;if(e.hasAttribute(Km))return()=>{};ete();let t=window.scrollY;qee(e,t,Yee());let n=kf()?Xee():void 0;return()=>Jee(e,t,n)}function qee(e,t,n){e.style.top=`-${t}px`,e.classList.add(Jm.BODY),n&&e.classList.add(Jm.BODY_WITH_SCROLLBAR),document.documentElement.classList.add(Jm.HTML),e.setAttribute(Km,`true`)}function Jee(e,t,n){e.classList.remove(Jm.BODY,Jm.BODY_WITH_SCROLLBAR),document.documentElement.classList.remove(Jm.HTML),e.style.top=``,e.removeAttribute(Km),window.scrollTo(0,t),n?.()}function Yee(){return document.body.scrollHeight>window.innerHeight}function Xee(){let e=e=>{Zee(e)&&e.preventDefault()};return document.addEventListener(`touchmove`,e,{passive:!1}),()=>{document.removeEventListener(`touchmove`,e)}}function Zee(e){if(e.touches.length>1)return!1;let t=e.target;return!Qee(t)}function Qee(e){let t=e;for(;t&&t.tagName!==`BODY`;){if($ee(window.getComputedStyle(t),t))return!0;t=t.parentElement}return!1}function $ee(e,t){let n=e.overflowX===`scroll`||e.overflowY===`scroll`,r=e.overflowX===`auto`&&t.clientWidth<t.scrollWidth||e.overflowY===`auto`&&t.clientHeight<t.scrollHeight;return n||r}function ete(){if(!document.getElementById(qm)){let e=document.createElement(`style`);e.id=qm,e.textContent=Gee,document.head.appendChild(e)}}var tte=e=>Object.keys(e),nte=e=>e==null,rte=e=>e.filter(e=>!nte(e)),Ym=e=>e.replace(/(^\w|[-_]\w)/g,e=>e.replace(/[-_]/,``).toUpperCase());function Xm(e){let[t,n]=R(Ym(`${e}Collection`),()=>{let e=A(),t=t=>{e.value=t},n=k(new Map),r=(t=!0)=>{if(!e.value)return[];let r=lf(e.value),i=[];for(let e of r){let r=n.value.get(e);r&&(!t||!cf(e,`disabled`))&&i.push(r)}return i};return Hr(()=>{n.value.clear()}),{containerElement:e,onContainerElementChange:t,itemRegistry:n,getOrderedItems:r,getOrderedElements:(e=!0)=>r(e).map(e=>e.element)}});return{provideCollectionContext:t,useCollectionContext:n,useCollectionItem:(t={})=>{let{itemRegistry:r}=n(Ym(`${e}Item`)),i=A(),a=e=>{i.value&&i.value!==e&&r.value.delete(i.value),i.value=e};return Kn(()=>{i.value&&r.value.set(i.value,{element:i.value,data:tn(t)}),fn(()=>{i.value&&=(r.value.delete(i.value),void 0)})}),{itemElement:i,onItemElementChange:a,setItemElement:e=>{let t=wf(e);t&&a(t)}}}}}function Zm(e,t,n,r){let i=e();if(i!==void 0)return L({get:()=>e(),set:e=>{t?.(e)}});let a=A(i??n),o=!1;return qn(e,e=>{o||e===void 0&&!r||(o=!0,a.value=e,En(()=>{o=!1}))}),qn(a,e=>{!o&&(e!==void 0||r)&&t?.(e)}),a}var Qm=[],$m;function ite(e,t){Kn(()=>{let n=tn(e);if(!n)return;let r=Qm.length===0,i=$m!==n;(r||i)&&(i&&$m&&$m.removeEventListener(`keydown`,eh),$m=n,n.addEventListener(`keydown`,eh)),Qm.includes(t)||Qm.push(t),fn(()=>{Qm=Qm.filter(e=>e!==t),Qm.length===0&&($m?.removeEventListener(`keydown`,eh),$m=void 0)})})}function eh(e){let t=e;if(t.key===`Escape`)for(let e of Qm.slice())e(t)}var th=`data-dismissable-layer`,nh={layers:Bt(new Set),layersWithOutsidePointerEventsDisabled:Bt(new Set),branches:Bt(new Set)},rh;function ate(e,t={}){let{disableOutsidePointerEvents:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s}=t,c=()=>e.value?.ownerDocument??globalThis?.document,l=L(()=>e.value?Array.from(nh.layers).indexOf(e.value):-1),u=L(()=>nh.layersWithOutsidePointerEventsDisabled.size>0),d=L(()=>{let e=Array.from(nh.layers),[t]=[...nh.layersWithOutsidePointerEventsDisabled].slice(-1),n=t?e.indexOf(t):-1;return l.value>=n}),f=L(()=>{if(u.value)return d.value?`auto`:`none`});return ote(e,e=>{if(!d.value)return;let t=e.target;[...nh.branches].some(e=>e.contains(t))||(i?.(e),o?.(e),e.defaultPrevented||s?.())}),ste(e,e=>{let t=e.target;[...nh.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())}),ite(c,e=>{l.value===nh.layers.size-1&&(r?.(e),e.defaultPrevented||(e.preventDefault(),s?.()))}),qn(e,e=>{if(!e)return;let t=c(),r=tn(n);r&&(nh.layersWithOutsidePointerEventsDisabled.size===0&&(rh=t.body.style.pointerEvents,t.body.style.pointerEvents=`none`),nh.layersWithOutsidePointerEventsDisabled.add(e)),nh.layers.add(e),fn(()=>{r&&nh.layersWithOutsidePointerEventsDisabled.size===1&&(rh?t.body.style.pointerEvents=rh:t.body.style.removeProperty(`pointer-events`)),nh.layers.delete(e),nh.layersWithOutsidePointerEventsDisabled.delete(e)})}),{pointerEvents:f}}function ote(e,t,n=!0){let r=!1,i=()=>{};return Gn(()=>{if(!Ef||!tn(n)||!e.value)return;let a=e.value.ownerDocument;async function o(n){if(!e.value)return;let o=n.target;if(r=ih(e.value,o),o&&!r){let e={originalEvent:n};function r(){Af(`dismissableLayer.pointerDownOutside`,t,e)}n.pointerType===`touch`?(a.removeEventListener(`click`,i),i=r,a.addEventListener(`click`,i,{once:!0})):r()}else a.removeEventListener(`click`,i);r=!1}let s=window.setTimeout(()=>{a.addEventListener(`pointerdown`,o)},0);fn(()=>{window.clearTimeout(s),a.removeEventListener(`pointerdown`,o),a.removeEventListener(`click`,i)})}),{onPointerdownCapture:()=>{tn(n)&&(r=!0)}}}function ste(e,t,n=!0){let r=!1,i=n=>{if(!e.value||r)return;let i=n.target;i instanceof HTMLElement&&(r=ih(e.value,i),r||Af(`dismissableLayer.focusOutside`,t,{originalEvent:n}))};return Gn(()=>{if(!Ef||!tn(n)||!e.value)return;let t=e.value.ownerDocument;t.addEventListener(`focusin`,i),fn(()=>{t.removeEventListener(`focusin`,i)})}),{onFocusCapture:()=>{tn(n)&&(r=!0)},onBlurCapture:()=>{tn(n)&&(r=!1)}}}function ih(e,t){if(!e)return!1;if(e.contains(t))return!0;let n=cte(e),r=t.closest(`[${th}]`);if(!n||!r)return!1;if(n===r)return!0;let i=Array.from(n.ownerDocument.querySelectorAll(`[${th}]`));return i.indexOf(n)<i.indexOf(r)}function cte(e){return e.hasAttribute(th)?e:e.querySelector(`[${th}]`)}var lte=[`top`,`right`,`bottom`,`left`],ah=Math.min,oh=Math.max,sh=Math.round,ch=Math.floor,lh=e=>({x:e,y:e}),ute={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function uh(e,t,n){return oh(e,ah(t,n))}function dh(e,t){return typeof e==`function`?e(t):e}function fh(e){return e.split(`-`)[0]}function ph(e){return e.split(`-`)[1]}function mh(e){return e===`x`?`y`:`x`}function hh(e){return e===`y`?`height`:`width`}function gh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function _h(e){return mh(gh(e))}function dte(e,t,n){n===void 0&&(n=!1);let r=ph(e),i=_h(e),a=hh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xh(o)),[o,xh(o)]}function fte(e){let t=xh(e);return[vh(e),t,vh(t)]}function vh(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yh=[`left`,`right`],bh=[`right`,`left`],pte=[`top`,`bottom`],mte=[`bottom`,`top`];function hte(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bh:yh:t?yh:bh;case`left`:case`right`:return t?pte:mte;default:return[]}}function gte(e,t,n,r){let i=ph(e),a=hte(fh(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vh)))),a}function xh(e){let t=fh(e);return ute[t]+e.slice(t.length)}function _te(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Sh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_te(e)}function Ch(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function wh(e,t,n){let{reference:r,floating:i}=e,a=gh(t),o=_h(t),s=hh(o),c=fh(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ph(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function vte(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=dh(t,e),p=Sh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ch(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ch(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var yte=50,bte=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:vte},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=wh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<yte&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=wh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},xte=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=dh(e,t)||{};if(l==null)return{};let d=Sh(u),f={x:n,y:r},p=_h(i),m=hh(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,ee=C/2-h[m]/2-1,te=ah(d[_],ee),ne=ah(d[v],ee),re=C-h[m]-ne,ie=C/2-h[m]/2+w,ae=uh(te,ie,re),oe=!c.arrow&&ph(i)!=null&&ie!==ae&&a.reference[m]/2-(ie<te?te:ne)-h[m]/2<0,se=oe?ie<te?ie-te:ie-re:0;return{[p]:f[p]+se,data:{[p]:ae,centerOffset:ie-ae-se,...oe&&{alignmentOffset:se}},reset:oe}}}),Ste=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=dh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=fh(r),_=gh(o),v=fh(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[xh(o)]:fte(o)),x=p!==`none`;!d&&x&&b.push(...gte(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],ee=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=dte(r,a,y);w.push(C[e[0]],C[e[1]])}if(ee=[...ee,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===gh(t)||ee.every(e=>gh(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:ee},reset:{placement:t}};let n=ee.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=ee.filter(e=>{if(x){let t=gh(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Th(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eh(e){return lte.some(t=>e[t]>=0)}var Cte=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=dh(e,t);switch(i){case`referenceHidden`:{let e=Th(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Eh(e)}}}case`escaped`:{let e=Th(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Eh(e)}}}default:return{}}}}},Dh=new Set([`left`,`top`]);async function wte(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=fh(n),s=ph(n),c=gh(n)===`y`,l=Dh.has(o)?-1:1,u=a&&c?-1:1,d=dh(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Tte=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await wte(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ete=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=dh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=gh(i),p=mh(f),m=u[p],h=u[f],g=(e,t)=>uh(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Dte=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=dh(e,t),u={x:n,y:r},d=gh(i),f=mh(d),p=u[f],m=u[d],h=dh(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Dh.has(fh(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ote=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=dh(e,t),c=await i.detectOverflow(t,s),l=fh(n),u=ph(n),d=gh(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=ah(p-c[m],g),y=ah(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*oh(c.left,c.right):S=p-2*oh(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Oh(){return typeof window<`u`}function kh(e){return Mh(e)?(e.nodeName||``).toLowerCase():`#document`}function Ah(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jh(e){return((Mh(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mh(e){return Oh()?e instanceof Node||e instanceof Ah(e).Node:!1}function Nh(e){return Oh()?e instanceof Element||e instanceof Ah(e).Element:!1}function Ph(e){return Oh()?e instanceof HTMLElement||e instanceof Ah(e).HTMLElement:!1}function Fh(e){return!Oh()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ah(e).ShadowRoot}function Ih(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lh(e){return/^(table|td|th)$/.test(kh(e))}function Rh(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zh=/transform|translate|scale|rotate|perspective|filter/,Bh=/paint|layout|strict|content/,Vh=e=>!!e&&e!==`none`,Hh;function Uh(e){let t=Nh(e)?qh(e):e;return Vh(t.transform)||Vh(t.translate)||Vh(t.scale)||Vh(t.rotate)||Vh(t.perspective)||!Gh()&&(Vh(t.backdropFilter)||Vh(t.filter))||zh.test(t.willChange||``)||Bh.test(t.contain||``)}function Wh(e){let t=Yh(e);for(;Ph(t)&&!Kh(t);){if(Uh(t))return t;if(Rh(t))return null;t=Yh(t)}return null}function Gh(){return Hh??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hh}function Kh(e){return/^(html|body|#document)$/.test(kh(e))}function qh(e){return Ah(e).getComputedStyle(e)}function Jh(e){return Nh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yh(e){if(kh(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fh(e)&&e.host||jh(e);return Fh(t)?t.host:t}function Xh(e){let t=Yh(e);return Kh(t)?(e.ownerDocument||e).body:Ph(t)&&Ih(t)?t:Xh(t)}function Zh(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xh(e),i=r===e.ownerDocument?.body,a=Ah(r);if(i){let e=Qh(a);return t.concat(a,a.visualViewport||[],Ih(r)?r:[],e&&n?Zh(e):[])}else return t.concat(r,Zh(r,[],n))}function Qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $h(e){let t=qh(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ph(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=sh(n)!==a||sh(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function eg(e){return Nh(e)?e:e.contextElement}function tg(e){let t=eg(e);if(!Ph(t))return lh(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$h(t),o=(a?sh(n.width):n.width)/r,s=(a?sh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ng=lh(0);function rg(e){let t=Ah(e);return!Gh()||!t.visualViewport?ng:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ig(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ah(e)}function ag(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=eg(e),o=lh(1);t&&(r?Nh(r)&&(o=tg(r)):o=tg(e));let s=ig(a,n,r)?rg(a):lh(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ah(a),t=Nh(r)?Ah(r):r,n=e,i=Qh(n);for(;i&&t!==n;){let e=tg(i),t=i.getBoundingClientRect(),r=qh(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ah(i),i=Qh(n)}}return Ch({width:u,height:d,x:c,y:l})}function og(e,t){let n=Jh(e).scrollLeft;return t?t.left+n:ag(jh(e)).left+n}function sg(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-og(e,n),y:n.top+t.scrollTop}}function cg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jh(r),s=t?Rh(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=lh(1),u=lh(0),d=Ph(r);if((d||!a)&&((kh(r)!==`body`||Ih(o))&&(c=Jh(r)),d)){let e=ag(r);l=tg(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sg(o,c):lh(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function lg(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ug(e){let t=Jh(e),n=e.ownerDocument.body,r=oh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=oh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+og(e),o=-t.scrollTop;return qh(n).direction===`rtl`&&(a+=oh(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var dg=25;function fg(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ah(e),a=jh(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Gh()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(og(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=dg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function pg(e,t){let n=ag(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tg(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mg(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=fg(e,n,t);else if(t===`document`)r=ug(jh(e));else if(Nh(t))r=pg(t,n);else{let n=rg(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ch(r)}function hg(e,t){let n=t.get(e);if(n)return n;let r=Zh(e,[],!1).filter(e=>Nh(e)&&kh(e)!==`body`),i=null,a=qh(e).position===`fixed`,o=a?Yh(e):e;for(;Nh(o)&&!Kh(o);){let e=qh(o),t=Uh(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Yh(o)}return t.set(e,r),r}function gg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rh(t)?[]:hg(t,this._c):[].concat(n),r],o=mg(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=mg(t,a[e],i);s=oh(n.top,s),c=ah(n.right,c),l=ah(n.bottom,l),u=oh(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function _g(e){let{width:t,height:n}=$h(e);return{width:t,height:n}}function vg(e,t,n){let r=Ph(t),i=jh(t),a=n===`fixed`,o=ag(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=lh(0);if((r||!a)&&((kh(t)!==`body`||Ih(i))&&(s=Jh(t)),r)){let e=ag(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=og(i));let l=i&&!r&&!a?sg(i,s):lh(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function yg(e){return qh(e).position===`static`}function bg(e,t){if(!Ph(e)||qh(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jh(e)===n&&(n=n.ownerDocument.body),n}function xg(e,t){let n=Ah(e);if(Rh(e))return n;if(!Ph(e)){let t=Yh(e);for(;t&&!Kh(t);){if(Nh(t)&&!yg(t))return t;t=Yh(t)}return n}let r=bg(e,t);for(;r&&Lh(r)&&yg(r);)r=bg(r,t);return r&&Kh(r)&&yg(r)&&!Uh(r)?n:r||Wh(e)||n}var Sg=async function(e){let t=this.getOffsetParent||xg,n=this.getDimensions,r=await n(e.floating);return{reference:vg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cg(e){return qh(e).direction===`rtl`}var wg={convertOffsetParentRelativeRectToViewportRelativeRect:cg,getDocumentElement:jh,getClippingRect:gg,getOffsetParent:xg,getElementRects:Sg,getClientRects:lg,getDimensions:_g,getScale:tg,isElement:Nh,isRTL:Cg};function Tg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kte(e,t,n){let r=null,i,a=jh(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ch(d),h=ch(a.clientWidth-(u+f)),g=ch(a.clientHeight-(d+p)),_=ch(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:oh(0,ah(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Tg(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ah(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}var Ate=Tte,jte=Ete,Mte=Ste,Nte=Ote,Pte=Cte,Fte=xte,Ite=Dte,Lte=(e,t,n)=>{let r=new Map,i=n??{},a={...wg,...i.platform,_c:r};return bte(e,t,{...i,platform:a})};function Eg(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rte(e,t){let n=Eg(e);return Math.round(t*n)/n}var Dg=0,Og=`data-soybean-focus-guard`;function kg(){Kn(()=>{if(!Ef)return;let e=document.querySelectorAll(`[${Og}]`);if(Dg===0||e.length===0){let t=e[0]??Ag(),n=e[1]??Ag();t.parentNode||document.body.insertAdjacentElement(`afterbegin`,t),n.parentNode||document.body.insertAdjacentElement(`beforeend`,n)}Dg++,fn(()=>{Dg--,Dg===0&&document.querySelectorAll(`[${Og}]`).forEach(e=>e.remove())})})}function Ag(){let e=document.createElement(`span`);return e.setAttribute(Og,``),e.tabIndex=0,Object.assign(e.style,{outline:`none`,opacity:`0`,position:`fixed`,pointerEvents:`none`}),e}var jg=`focusScope.autoFocusOnOpen`,Mg=`focusScope.autoFocusOnClose`,Ng={bubbles:!1,cancelable:!0},Pg=Ig();function Fg(e,t){let{loop:n,trapped:r,onOpenAutoFocus:i,onCloseAutoFocus:a}=t||{},o,s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}};if(Ef){function t(t){if(s.paused||!e.value)return;let n=t.target;e.value.contains(n)?o=n:yf(o,{select:!0})}function n(t){if(s.paused||!e.value)return;let n=t.relatedTarget;n!==null&&(e.value.contains(n)||yf(o,{select:!0}))}function c(){e.value?.contains(o)||yf(e.value)}Gn(()=>{if(!tn(r))return;document.addEventListener(`focusin`,t),document.addEventListener(`focusout`,n);let i=new MutationObserver(c);e.value&&i.observe(e.value,{childList:!0,subtree:!0}),fn(()=>{document.removeEventListener(`focusin`,t),document.removeEventListener(`focusout`,n),i.disconnect()})}),qn(e,async(e,t,n)=>{if(await En(),!e)return;Pg.add(s);let r=sf(),o=e.contains(r);if(i&&e.addEventListener(jg,i),a&&e.addEventListener(Mg,a),!o){let t=new CustomEvent(jg,Ng);e.dispatchEvent(t),t.defaultPrevented||(ff(of(hf(e)),{select:!0}),sf()===r&&yf(e))}n(()=>{i&&e.removeEventListener(jg,i);let t=new CustomEvent(Mg,Ng);e.dispatchEvent(t),window.setTimeout(()=>{t.defaultPrevented||yf(r??document.body,{select:!0}),a&&e.removeEventListener(Mg,a),Pg.remove(s)},0)})})}function c(e){let t=tn(n),i=tn(r);if(!t&&!i||s.paused)return;let a=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=sf();if(!a||!o)return;let c=e.currentTarget,[l,u]=mf(c);l&&u?!e.shiftKey&&o===u?(e.preventDefault(),t&&yf(l,{select:!0})):e.shiftKey&&o===l&&(e.preventDefault(),t&&yf(u,{select:!0})):o===c&&e.preventDefault()}return{onKeydown:c}}function Ig(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=tu(e,t),e.unshift(t)},remove(t){e=tu(e,t),e[0]?.resume()}}}function Lg(e){let t=Ha()?.type?.emits||[],n={};return t.forEach(t=>{n[t]=(...n)=>{e(t,...n)}}),n}function Rg(e){return Array.isArray?Array.isArray(e):qg(e)===`[object Array]`}function zg(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function Bg(e){return e==null?``:zg(e)}function Vg(e){return typeof e==`string`}function Hg(e){return typeof e==`number`}function Ug(e){return e===!0||e===!1||Gg(e)&&qg(e)==`[object Boolean]`}function Wg(e){return typeof e==`object`}function Gg(e){return Wg(e)&&e!==null}function Kg(e){return e!=null}function qg(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Jg=e=>`Pattern length exceeds max of ${e}.`;function Yg(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(Kg(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!Kg(s))return;if(a===t.length-1&&(Vg(s)||Hg(s)||Ug(s)||typeof s==`bigint`))n.push(o===void 0?Bg(s):{v:Bg(s),i:o});else if(Rg(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,Vg(t)?t.split(`.`):t,0),r?n:n[0]}var Xg={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Zg={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Qg={location:0,threshold:.6,distance:100},$g={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:Yg,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},e_=Object.freeze({...Zg,...Xg,...Qg,...$g});function t_(e=[],t=e_.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function n_(e,t,n,{location:r=e_.location,distance:i=e_.distance,threshold:a=e_.threshold,findAllMatches:o=e_.findAllMatches,minMatchCharLength:s=e_.minMatchCharLength,includeMatches:c=e_.includeMatches,ignoreLocation:l=e_.ignoreLocation}={}){if(t.length>32)throw Error(Jg(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=t_(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function r_(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function i_(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var a_={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},o_=RegExp(`[`+Object.keys(a_).join(``)+`]`,`g`),s_=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(o_,e=>a_[e]):e=>e,c_=class{constructor(e,{location:t=e_.location,threshold:n=e_.threshold,distance:r=e_.distance,includeMatches:i=e_.includeMatches,findAllMatches:a=e_.findAllMatches,minMatchCharLength:o=e_.minMatchCharLength,isCaseSensitive:s=e_.isCaseSensitive,ignoreDiacritics:c=e_.ignoreDiacritics,ignoreLocation:l=e_.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?s_(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:r_(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?s_(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=n_(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=i_(u)),p}},l_=new Set([`fuzzy`,`include`]);function u_(e){return e.startsWith(`inverse`)}var d_=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new c_(e,{location:t.location??e_.location,threshold:t.threshold??e_.threshold,distance:t.distance??e_.distance,includeMatches:t.includeMatches??e_.includeMatches,findAllMatches:t.findAllMatches??e_.findAllMatches,minMatchCharLength:t.minMatchCharLength??e_.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??e_.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??e_.ignoreDiacritics,ignoreLocation:t.ignoreLocation??e_.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],f_=d_.length,p_=`\0`,m_=`|`;function h_(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function g_(e,t){let n=e.match(t);return n?n[1]:null}function __(e,t={}){return e.replace(/\\\|/g,p_).split(m_).map(e=>{let n=h_(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<f_;){let e=d_[o],n=g_(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<f_;){let e=d_[o],n=g_(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var v_=class{constructor(e,{isCaseSensitive:t=e_.isCaseSensitive,ignoreDiacritics:n=e_.ignoreDiacritics,includeMatches:r=e_.includeMatches,minMatchCharLength:i=e_.minMatchCharLength,ignoreLocation:a=e_.ignoreLocation,findAllMatches:o=e_.findAllMatches,location:s=e_.location,threshold:c=e_.threshold,distance:l=e_.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?s_(e):e,this.pattern=e,this.query=__(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?s_(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,u_(r.type)&&(c=!0),n&&(l_.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=i_(o)),e}}return{isMatch:!1,score:1}}},y_=[];function b_(...e){y_.push(...e)}var x_=/[\p{L}\p{M}\p{N}_]+/gu,S_=new WeakSet;function C_(e){S_.has(e)||(S_.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function w_(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||C_(e),t=>t.match(e)||[]):e=>e.match(x_)||[]}function T_({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=w_(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=s_(n)),r(n)}}}var E_=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=T_({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new c_(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=i_(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};b_(v_),b_(E_);function D_(e,t){return Ae()?(je(e,t),!0):!1}function O_(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return D_(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}var k_=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var A_=Object.prototype.toString,j_=e=>A_.call(e)===`[object Object]`,M_=()=>{};function N_(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function P_(e,t={}){let n,r,i=M_,a=e=>{clearTimeout(e),i(),i=M_},o;return s=>{let c=tn(e),l=tn(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&=(a(r),void 0),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})}}function F_(e){return Array.isArray(e)?e:[e]}function I_(e){return e||Ha()}function L_(e){return zt(Qt(e)?new Proxy({},{get(t,n,r){return j(Reflect.get(e.value,n,r))},set(t,n,r){return Qt(e.value[n])&&!Qt(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function R_(e){return L_(L(e))}function z_(e,t=1e4){return on((n,r)=>{let i=tn(e),a,o=()=>setTimeout(()=>{i=tn(e),r()},tn(t));return D_(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function B_(e,t=200,n={}){return N_(P_(t,n),e)}function V_(e,t=!0,n){I_(n)?Vr(e,n):t?e():En(e)}function H_(e,t,n){return qn(e,t,{...n,immediate:!0})}var U_=k_?window:void 0,W_=k_?window.document:void 0;k_&&window.navigator,k_&&window.location;function G_(e){let t=tn(e);return t?.$el??t}function K_(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=L(()=>{let t=F_(tn(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return H_(()=>[n.value?.map(e=>G_(e))??[U_].filter(e=>e!=null),F_(tn(n.value?e[1]:e[0])),F_(j(n.value?e[2]:e[1])),tn(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=j_(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function q_(){let e=A(!1),t=Ha();return t&&Vr(()=>{e.value=!0},t),e}function J_(e){let t=q_();return L(()=>(t.value,!!e()))}function Y_(e={}){let{document:t=W_}=e;if(!t)return A(`visible`);let n=A(t.visibilityState);return K_(t,`visibilitychange`,()=>{n.value=t.visibilityState},{passive:!0}),n}function X_(e,t,n={}){let{window:r=U_,...i}=n,a,o=J_(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=qn(L(()=>{let t=tn(e);return Array.isArray(t)?t.map(e=>G_(e)):[G_(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return D_(l),{isSupported:o,stop:l}}function Z_(e,t={width:0,height:0},n={}){let{window:r=U_,box:i=`content-box`}=n,a=L(()=>{var t;return(t=G_(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=A(t.width),s=A(t.height),{stop:c}=X_(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=G_(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=F_(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);V_(()=>{let n=G_(e);n&&(o.value=`offsetWidth`in n?n.offsetWidth:t.width,s.value=`offsetHeight`in n?n.offsetHeight:t.height)});let l=qn(()=>G_(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}var Q_=0;function $_(e,t={}){let n=A(!1),{document:r=W_,immediate:i=!0,manual:a=!1,id:o=`vueuse_styletag_${++Q_}`}=t,s=A(e),c=()=>{},l=()=>{if(!r)return;let e=r.getElementById(o)||r.createElement(`style`);e.isConnected||(e.id=o,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),r.head.appendChild(e)),!n.value&&(c=qn(s,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},u=()=>{!r||!n.value||(c(),r.head.removeChild(r.getElementById(o)),n.value=!1)};return i&&!a&&V_(l),a||D_(u),{id:o,css:s,unload:u,load:l,isLoaded:Ht(n)}}var ev=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},tv=new WeakMap,nv=new WeakMap,rv={},iv=0,av=function(e){return e&&(e.host||av(e.parentNode))},ov=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=av(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},sv=function(e,t,n,r){var i=ov(t,Array.isArray(e)?e:[e]);rv[n]||(rv[n]=new WeakMap);var a=rv[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(tv.get(e)||0)+1,l=(a.get(e)||0)+1;tv.set(e,c),a.set(e,l),o.push(e),c===1&&i&&nv.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),iv++,function(){o.forEach(function(e){var t=tv.get(e)-1,i=a.get(e)-1;tv.set(e,t),a.set(e,i),t||(nv.has(e)||e.removeAttribute(r),nv.delete(e)),i||e.removeAttribute(n)}),iv--,iv||(tv=new WeakMap,tv=new WeakMap,nv=new WeakMap,rv={})}},cv=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ev(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),sv(r,i,n,`aria-hidden`)):function(){return null}};function lv(e,t=!0){Kn(()=>{if(!Ef)return;let n=tn(e),r=rte(Array.isArray(n)?n:[n]);if(r.length===0||r.some(e=>e.closest(`[popover]:not(:popover-open)`))||!tn(t))return;let i=cv(r);fn(()=>{i()})})}var zte=A(!1);function uv(e){let{modal:t,triggerElement:n}=e,r=!1,i=!1;return{onPointerDownOutside:e=>{if(!t.value||e.defaultPrevented)return;let n=e.detail.originalEvent,r=n.button===0&&n.ctrlKey===!0;(n.button===2||r)&&e.preventDefault()},onFocusOutside:e=>{t.value&&e.preventDefault()},onInteractOutside:e=>{if(t.value)return;e.defaultPrevented||(r=!0,e.detail.originalEvent.type===`pointerdown`&&(i=!0));let a=e.target;n.value?.contains(a)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&i&&e.preventDefault()},onCloseAutoFocus:e=>{if(t.value){e.defaultPrevented||(e.preventDefault(),n.value?.focus());return}e.defaultPrevented||(r||n.value?.focus(),e.preventDefault()),r=!1,i=!1}}}function dv(e,t){let n=A(e);function r(e){return t[n.value][e]??n.value}function i(e){n.value=r(e)}return[n,i]}function fv(e,t,n){let r={},i=`none`,[a,o]=dv(tn(t)?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),s=L(()=>[`mounted`,`unmountSuspended`].includes(a.value)),c=t=>{let n=pv(r).includes(CSS.escape(t.animationName));t.target===e.value&&n&&o(`ANIMATION_END`)},l=t=>{t.target===e.value&&(i=pv(r))};return Kn(()=>{let e=pv(r);i=a.value===`mounted`?e:`none`}),Kn(()=>{let e=tn(t);n?.(!!e);let a=pv(r);e?o(`MOUNT`):a===`none`||r?.display===`none`?o(`UNMOUNT`):o(i===a?`UNMOUNT`:`ANIMATION_OUT`)}),Kn(()=>{let t=e.value;t?(r=getComputedStyle(t),t.addEventListener(`animationstart`,l),t.addEventListener(`animationcancel`,c),t.addEventListener(`animationend`,c),fn(()=>{t.removeEventListener(`animationstart`,l),t.removeEventListener(`animationcancel`,c),t.removeEventListener(`animationend`,c)})):o(`ANIMATION_END`)}),s}function pv(e){return e?.animationName||`none`}function mv(e,t,...n){return L(()=>({...Iee(e,t),...hv(...n)}))}function hv(...e){return e.length===0?{}:e.map(e=>tn(e)||{}).reduce((e,t)=>({...e,...t}),{})}function gv(e){let t=z_(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(t.value+=n,e){e(n);return}let i=sf(),a=r.map(e=>({...e,textValue:e.data?.textValue??e.element.textContent?.trim()??``})),o=a.find(e=>e.element===i),s=Lee(a.map(e=>e.textValue),t.value,o?.textValue),c=a.find(e=>e.textValue===s);return c&&c.element.focus(),c?.element},resetTypeahead:()=>{t.value=``}}}var[Bte,Vte]=R(`CollapsibleRoot`,e=>{let{open:t,disabled:n,unmountOnHide:r}=e,i=()=>{n.value||(t.value=!t.value)},a=A(``),o=`soybean-collapsible-content-${Er()}`;return{open:t,disabled:n,unmountOnHide:r,onOpenToggle:i,contentId:a,initContentId:()=>{a.value||=o},dataDisabled:L(()=>n.value?``:void 0),dataState:L(()=>iu(t.value))}}),[_v,Hte]=z(`CollapsibleUi`),[Ute,Wte]=R(`AccordionRoot`),[Gte,Kte]=R(`AccordionItem`,e=>{let{open:t,disabled:n}=e,[r,i]=Gm(),a=A(``),o=`soybean-accordion-trigger-${Er()}`,s=()=>{a.value||=o},c=L(()=>n.value?``:void 0),l=L(()=>iu(t.value));return{...e,triggerElement:r,setTriggerElement:i,triggerId:a,initTriggerId:s,dataDisabled:c,dataState:l}}),[qte,Jte]=z(`AccordionUi`,e=>(_v(L(()=>({root:e.value?.item,trigger:e.value?.trigger,content:e.value?.content}))),e)),vv=Tr((e,{slots:t,attrs:n})=>()=>{if(!t.default)return null;let e=Cf(t.default());if(!e?.length)return null;let r=e.find(e=>e.type!==ga);return r?ja(r,n,!0):null},{name:`Slot`}),yv=new Set([`area`,`input`,`img`]),bv=Tr((e,{slots:t,attrs:n})=>{let r=e.asChild?`template`:e.as;return typeof r==`string`&&yv.has(r)?()=>oo(r,n):r===`template`?()=>oo(vv,n,{default:t.default}):()=>oo(e.as||`div`,n,{default:t.default})},{name:`Primitive`,inheritAttrs:!1,props:[`as`,`asChild`]}),xv=Tr({name:`Button`,__name:`button`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=mv(n,[`disabled`,`type`]),a=L(()=>n.as===`button`?n.disabled:void 0),o=L(()=>n.disabled?``:void 0),s=L(()=>n.disabled?void 0:``),c=L(()=>n.disabled?!0:void 0),l=L(()=>{if(n.as===`button`)return n.type??`button`}),u=e=>{if(n.disabled){e.preventDefault(),e.stopPropagation();return}r(`click`,e)};return(e,t)=>(M(),wa(j(bv),Ia(j(i),{"data-soybean-button":``,disabled:a.value,"aria-disabled":c.value,"data-disabled":o.value,"data-normal":s.value,tabindex:a.value?`-1`:void 0,type:l.value,onClick:u}),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16,[`disabled`,`aria-disabled`,`data-disabled`,`data-normal`,`tabindex`,`type`]))}}),Sv=Tr({name:`Icon`,__name:`icon`,props:{icon:{}},setup(e){let t=e,n=Vm(),r=L(()=>n?.iconRender?.(t.icon));return(e,t)=>r.value?(M(),wa(Jr(r.value),{key:0})):I(`v-if`,!0)}});Jl({slots:{root:``,placeholder:``,content:`data-[state=fixed]:z-50`}});var[Yte,Xte]=R(`AffixRoot`,e=>{let[t,n]=Gm();return{...e,contentElement:t,setContentElement:n}}),[Zte,Qte]=z(`AffixUi`),Cv={xs:12,sm:14,md:16,lg:18,xl:20,"2xl":24},wv={xs:`xs`,sm:`xs`,md:`sm`,lg:`md`,xl:`lg`,"2xl":`xl`};Object.fromEntries(Object.entries(Cv).map(([e,t])=>[e,t/Cv.md]));var Tv=Rl({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20`,accent:`focus-visible:ring-accent-foreground/20`},variant:{solid:`bg-primary text-primary-foreground data-[normal]:hover:bg-primary/80 data-[normal]:active:bg-primary-600`,pure:`border border-border bg-background text-accent-foreground data-[normal]:hover:bg-accent/60 data-[normal]:active:bg-accent`,plain:`border border-border bg-background text-foreground`,outline:`border bg-background`,dashed:`border border-dashed bg-background`,soft:`bg-primary/10 data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 data-[normal]:hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`h-8 w-8 p-0 gap-0 rounded-md`,circle:`h-8 w-8 p-0 gap-0 rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground data-[normal]:hover:bg-destructive/80 data-[normal]:active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground data-[normal]:hover:bg-success/80 data-[normal]:active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground data-[normal]:hover:bg-warning/80 data-[normal]:active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground data-[normal]:hover:bg-info/80 data-[normal]:active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground data-[normal]:hover:bg-carbon/80 data-[normal]:active:bg-carbon-600`},{color:`secondary`,variant:`solid`,class:`bg-secondary text-secondary-foreground data-[normal]:hover:bg-secondary/80 data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:`solid`,class:`bg-accent text-accent-foreground data-[normal]:hover:bg-accent/80 data-[normal]:active:bg-accent-foreground/20`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`secondary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-secondary-foreground`},{color:`accent`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-accent-foreground`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{color:`secondary`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-secondary-foreground/10 data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-accent-foreground/10 data-[normal]:active:bg-accent-foreground/20`},{color:`primary`,variant:`plain`,class:`data-[normal]:hover:border-primary data-[normal]:hover:text-primary`},{color:`destructive`,variant:`plain`,class:`data-[normal]:hover:border-destructive data-[normal]:hover:text-destructive`},{color:`success`,variant:`plain`,class:`data-[normal]:hover:border-success data-[normal]:hover:text-success`},{color:`warning`,variant:`plain`,class:`data-[normal]:hover:border-warning data-[normal]:hover:text-warning`},{color:`info`,variant:`plain`,class:`data-[normal]:hover:border-info data-[normal]:hover:text-info`},{color:`carbon`,variant:`plain`,class:`data-[normal]:hover:border-carbon data-[normal]:hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`data-[normal]:hover:border-secondary-foreground data-[normal]:hover:text-secondary-foreground`},{color:`accent`,variant:`plain`,class:`data-[normal]:hover:border-accent-foreground data-[normal]:hover:text-accent-foreground`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{color:`secondary`,variant:`soft`,class:`bg-secondary-foreground/10 data-[normal]:hover:bg-secondary-foreground/10 data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:`soft`,class:`bg-accent-foreground/10 data-[normal]:hover:bg-accent-foreground/10 data-[normal]:active:bg-accent-foreground/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}});Rl({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:rounded-0`,variants:{orientation:{horizontal:`inline-flex not-last:[&>*]:border-e-0 focus-visible:[&>*]:border-e first:[&>*]:rounded-e-0 last:[&>*]:rounded-s-0`,vertical:`flex flex-col not-last:[&>*]:border-b-0 focus-visible:[&>*]:border-b first:[&>*]:rounded-b-0 last:[&>*]:rounded-t-0`}},defaultVariants:{orientation:`horizontal`}});var Ev=Pee(Tv,{size:`md`,color:`accent`,variant:`ghost`,shape:`square`,fitContent:!0}),Dv=Vl(Tv,e=>({...e,size:wv[e.size??`md`]})),Ov=Vl(Ev,e=>({...e,size:wv[e.size??`md`]}));Jl({extendBase:e=>({close:Ov({size:e.size})}),slots:{root:`relative flex w-full rounded-lg border`,content:`flex-1 flex flex-col`,icon:`shrink-0`,title:`font-medium tracking-tight m-0`,description:`[&_p]:leading-relaxed m-0`,close:`absolute`},variants:{color:{primary:{root:`border-primary text-primary`,icon:`text-primary`},destructive:{root:`border-destructive text-destructive`,icon:`text-destructive`},success:{root:`border-success text-success`,icon:`text-success`},warning:{root:`border-warning text-warning`,icon:`text-warning`},info:{root:`border-info text-info`,icon:`text-info`},carbon:{root:`border-carbon text-carbon`,icon:`text-carbon`},secondary:{root:`border-secondary-foreground/50 text-secondary-foreground`,icon:`text-secondary-foreground`},accent:{root:`border-accent-foreground/50 text-accent-foreground`,icon:`text-accent-foreground`}},variant:{solid:{root:``},pure:{root:`bg-background text-foreground border-border`},outline:{root:`bg-background`},soft:{root:`border-transparent`},ghost:{root:``}},size:{xs:{root:`gap-2 px-2 py-1.75 text-2xs`,content:`gap-0.75`,title:`text-xs leading-3.125`,close:`top-1.25 end-1.25`},sm:{root:`gap-2.5 px-3 py-2.5 text-xs`,content:`gap-1`,title:`text-sm leading-3.75`,close:`top-1.875 end-1.875`},md:{root:`gap-3 px-4 py-3 text-sm`,content:`gap-1`,title:`text-base leading-4.375`,close:`top-2.25 end-2.25`},lg:{root:`gap-3.5 px-5 py-3.5 text-base`,content:`gap-1.25`,title:`text-lg leading-5`,close:`top-2.5 end-2.5`},xl:{root:`gap-4 px-6 py-4 text-lg`,content:`gap-1.5`,title:`text-xl leading-5.625`,close:`top-2.75 end-2.75`},"2xl":{root:`gap-4.5 px-7 py-4.5 text-xl`,content:`gap-2`,title:`text-2xl leading-6.25`,close:`top-3 end-3`}}},compoundVariants:[{color:`primary`,variant:`solid`,class:{root:`bg-primary text-primary-foreground`,icon:`text-primary-foreground`,close:`text-primary-foreground`}},{color:`destructive`,variant:`solid`,class:{root:`bg-destructive text-destructive-foreground`,icon:`text-destructive-foreground`,close:`text-destructive-foreground`}},{color:`success`,variant:`solid`,class:{root:`bg-success text-success-foreground`,icon:`text-success-foreground`,close:`text-success-foreground`}},{color:`warning`,variant:`solid`,class:{root:`bg-warning text-warning-foreground`,icon:`text-warning-foreground`,close:`text-warning-foreground`}},{color:`info`,variant:`solid`,class:{root:`bg-info text-info-foreground`,icon:`text-info-foreground`,close:`text-info-foreground`}},{color:`carbon`,variant:`solid`,class:{root:`bg-carbon text-carbon-foreground`,icon:`text-carbon-foreground`,close:`text-carbon-foreground`}},{color:`secondary`,variant:`solid`,class:{root:`bg-secondary text-secondary-foreground`,icon:`text-secondary-foreground`,close:`text-secondary-foreground`}},{color:`accent`,variant:`solid`,class:{root:`bg-accent text-accent-foreground`,icon:`text-accent-foreground`,close:`text-accent-foreground`}},{color:`primary`,variant:[`soft`,`ghost`],class:{root:`bg-primary/10`}},{color:`destructive`,variant:[`soft`,`ghost`],class:{root:`bg-destructive/10`}},{color:`success`,variant:[`soft`,`ghost`],class:{root:`bg-success/10`}},{color:`warning`,variant:[`soft`,`ghost`],class:{root:`bg-warning/10`}},{color:`info`,variant:[`soft`,`ghost`],class:{root:`bg-info/10`}},{color:`carbon`,variant:[`soft`,`ghost`],class:{root:`bg-carbon/10`}},{color:`secondary`,variant:[`soft`,`ghost`],class:{root:`bg-secondary-foreground/5`}},{color:`accent`,variant:[`soft`,`ghost`],class:{root:`bg-accent-foreground/5`}}],defaultVariants:{color:`primary`,variant:`ghost`,size:`md`}});var[$te,ene]=R(`AlertRoot`,e=>{let{open:t}=e;return{open:t,onOpenChange:e=>{t.value=e}}}),[tne,nne]=z(`AlertUi`);Jl({slots:{root:`relative flex flex-col gap-1 text-sm`,link:[`group inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-muted-foreground outline-none transition-colors`,`hover:bg-accent/60 hover:text-accent-foreground`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[state=active]:bg-accent data-[state=active]:text-foreground`],sub:`ms-4 flex flex-col gap-1 border-s border-border/60 ps-3`,item:`flex flex-col gap-1`,indicator:`size-1.5 shrink-0 rounded-full bg-primary opacity-0 transition-opacity group-data-[state=active]:opacity-100`,title:`min-w-0 truncate`},variants:{color:{primary:{indicator:`bg-primary`,link:`data-[state=active]:bg-primary/10 data-[state=active]:text-primary`},destructive:{indicator:`bg-destructive`,link:`data-[state=active]:bg-destructive/10 data-[state=active]:text-destructive`},success:{indicator:`bg-success`,link:`data-[state=active]:bg-success/10 data-[state=active]:text-success`},warning:{indicator:`bg-warning`,link:`data-[state=active]:bg-warning/10 data-[state=active]:text-warning`},info:{indicator:`bg-info`,link:`data-[state=active]:bg-info/10 data-[state=active]:text-info`},carbon:{indicator:`bg-carbon`,link:`data-[state=active]:bg-carbon/10 data-[state=active]:text-carbon`},secondary:{indicator:`bg-secondary-foreground/50`,link:`data-[state=active]:bg-secondary-foreground/10 data-[state=active]:text-secondary-foreground`},accent:{indicator:`bg-accent-foreground/50`,link:`data-[state=active]:bg-accent-foreground/10 data-[state=active]:text-accent-foreground`}},orientation:{vertical:{},horizontal:{root:`flex-row flex-wrap items-start gap-2`,item:`min-w-36 flex-1`,sub:`ms-0 mt-2 border-s-0 border-t ps-0 pt-2`}},size:{xs:{link:`px-2 py-1.5 text-3xs`},sm:{link:`px-2.5 py-1.5 text-2xs`},md:{link:`px-3 py-2 text-xs`},lg:{link:`px-3.5 py-2.5 text-sm`,indicator:`size-2`},xl:{link:`px-4 py-3 text-base`,indicator:`size-2`},"2xl":{link:`px-4.5 py-3.5 text-lg`,indicator:`size-2`}},sticky:{true:{root:`sticky self-start top-[var(--soybean-anchor-offset-top,0px)] max-h-[calc(100vh-var(--soybean-anchor-offset-top,0px))] overflow-auto pe-1`},false:{}}},defaultVariants:{color:`primary`,orientation:`vertical`,size:`md`,sticky:!0}});var[rne,ine]=R(`AnchorRoot`,e=>{let t=Hm(()=>e.dir.value);return{...e,dir:t}}),[ane,one]=z(`AnchorUi`);Jl({slots:{root:`relative flex shrink-0 overflow-hidden rounded-full`,fallback:`flex justify-center items-center w-full h-full rounded-full bg-muted font-medium`,image:`aspect-square w-full h-full object-cover m-0`},variants:{size:{xs:{root:`size-6`},sm:{root:`size-8`},md:{root:`size-10`},lg:{root:`size-12`},xl:{root:`size-14`},"2xl":{root:`size-16`}}},defaultVariants:{size:`md`}});var[sne,cne]=R(`AvatarRoot`,()=>{let e=A(`idle`);return{imageLoadingStatus:e,updateImageLoadingStatus:t=>{e.value=t}}}),[lne,une]=z(`AvatarUi`),[kv,Av]=R(`UiConfigProvider`),jv=/^[a-z0-9]+(-[a-z0-9]+)*$/,Mv=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Nv(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Nv(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Nv(e,n)?null:e}return null},Nv=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function Pv(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var Fv=Object.freeze({left:0,top:0,width:16,height:16}),Iv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Lv=Object.freeze({...Fv,...Iv}),Rv=Object.freeze({...Lv,body:``,hidden:!1});function zv(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Bv(e,t){let n=zv(e,t);for(let r in Rv)r in Iv?r in e&&!(r in n)&&(n[r]=Iv[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Vv(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Bv(r[e]||i[e],a)}return o(t),n.forEach(o),Bv(e,a)}function Hv(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=Pv(e);for(let i in r){let a=r[i];a&&(t(i,Vv(e,i,a)),n.push(i))}return n}var Uv={provider:``,aliases:{},not_found:{},...Fv};function Wv(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Gv(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!Wv(e,Uv))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!Wv(t,Rv))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!Wv(t,Rv))return null}return t}var Kv=Object.create(null);function qv(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Jv(e,t){let n=Kv[e]||(Kv[e]=Object.create(null));return n[t]||(n[t]=qv(e,t))}function Yv(e,t){return Gv(t)?Hv(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Xv(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var Zv=!1;function Qv(e){return typeof e==`boolean`&&(Zv=e),Zv}function $v(e){let t=typeof e==`string`?Mv(e,!0,Zv):e;if(t){let e=Jv(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function ey(e,t){let n=Mv(e,!0,Zv);if(!n)return!1;let r=Jv(n.provider,n.prefix);return t?Xv(r,n.name,t):(r.missing.add(n.name),!0)}function ty(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),Zv&&!t&&!e.prefix){let t=!1;return Gv(e)&&(e.prefix=``,Hv(e,(e,n)=>{ey(e,n)&&(t=!0)})),t}let n=e.prefix;return Nv({prefix:n,name:`a`})?!!Yv(Jv(t,n),e):!1}var ny=Object.freeze({width:null,height:null}),ry=Object.freeze({...ny,...Iv}),iy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ay=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function oy(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(iy);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=ay.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function sy(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function cy(e,t){return e?`<defs>`+e+`</defs>`+t:t}function ly(e,t,n){let r=sy(e);return cy(r.defs,t+r.content+n)}var uy=e=>e===`unset`||e===`undefined`||e===`none`;function dy(e,t){let n={...Lv,...e},r={...ry,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=ly(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=oy(d,c/l)):(u=o===`auto`?c:o,d=s===null?oy(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{uy(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var fy=/\sid="(\S+)"/g,py=new Map;function my(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=py.get(e)||0;return py.set(e,t+1),t?`${e}${t}`:e}function hy(e){let t=[],n;for(;n=fy.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=my(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var gy=Object.create(null);function _y(e,t){gy[e]=t}function vy(e){return gy[e]||gy[``]}function yy(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var by=Object.create(null),xy=[`https://api.simplesvg.com`,`https://api.unisvg.com`],Sy=[];xy.length>0;)xy.length===1||Math.random()>.5?Sy.push(xy.shift()):Sy.push(xy.pop());by[``]=yy({resources:[`https://api.iconify.design`].concat(Sy)});function Cy(e,t){let n=yy(t);return n===null?!1:(by[e]=n,!0)}function wy(e){return by[e]}var Ty=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Ey(e,t){let n=wy(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Dy(e){return e===404}var Oy=(e,t,n)=>{let r=[],i=Ey(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function ky(e){if(typeof e==`string`){let t=wy(e);if(t)return t.path}return`/`}var Ay={prepare:Oy,send:(e,t,n)=>{if(!Ty){n(`abort`,424);return}let r=ky(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Ty(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Dy(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function jy(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function My(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||jy([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Ny=0;function Py(e,t,n){let r=Ny++,i=jy.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function Fy(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Jv(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Iy(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Mv(e,t,n):e;i&&r.push(i)}),r}var Ly={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ry(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function zy(e){let t={...Ly,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Ry(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function By(){}var Vy=Object.create(null);function Hy(e){if(!Vy[e]){let t=wy(e);if(!t)return;Vy[e]={config:t,redundancy:zy(t)}}return Vy[e]}function Uy(e,t,n){let r,i;if(typeof e==`string`){let t=vy(e);if(!t)return n(void 0,424),By;i=t.send;let a=Hy(e);a&&(r=a.redundancy)}else{let t=yy(e);if(t){r=zy(t);let n=vy(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),By):r.query(t,i,n)().abort}function Wy(){}function Gy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,My(e)}))}function Ky(e){let t=[],n=[];return e.forEach(e=>{(e.match(jv)?t:n).push(e)}),{valid:t,invalid:n}}function qy(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!Yv(e,n).length){r();return}}catch(e){console.error(e)}r(),Gy(e)}function Jy(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Yy(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Jy(e.loadIcons(r,n,t),t=>{qy(e,r,t)});return}if(i){r.forEach(r=>{Jy(i(r,n,t),t=>{qy(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Ky(r);if(o.length&&qy(e,o,null),!a.length)return;let s=n.match(jv)?vy(t):null;if(!s){qy(e,a,null);return}s.prepare(t,n,a).forEach(n=>{Uy(t,n,t=>{qy(e,n.icons,t)})})}))}var Xy=(e,t)=>{let n=Fy(Iy(e,!0,Qv()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Wy)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Jv(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Jv(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Yy(e,t)}),t?Py(t,n,i):Wy};function Zy(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in ny?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var Qy=/[\s,]+/;function $y(e,t){t.split(Qy).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}function eb(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function tb(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function nb(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function rb(e){return`data:image/svg+xml,`+nb(e)}function ib(e){return`url("`+rb(e)+`")`}var ab={...ry,inline:!1},ob={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},sb={display:`inline-block`},cb={backgroundColor:`currentColor`},lb={backgroundColor:`transparent`},ub={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},db={webkitMask:cb,mask:cb,background:lb};for(let e in db){let t=db[e];for(let n in ub)t[e+n]=ub[n]}var fb={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;fb[e+`-flip`]=t,fb[e.slice(0,1)+`-flip`]=t,fb[e+`Flip`]=t});function pb(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var mb=(e,t)=>{let n=Zy(ab,t),r={...ob},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:typeof i==`string`&&$y(n,i);break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=eb(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=fb[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):ab[e]===void 0&&(r[e]=i)}}}let c=dy(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=hy(c.body),oo(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=tb(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":ib(m),width:pb(l.width),height:pb(l.height),...sb,...p?cb:lb,...s},oo(`span`,r)};if(Qv(!0),_y(``,Ay),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!ty(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Cy(e,r)||console.error(n)}catch{console.error(n)}}}}var hb={...Lv,body:``},gb=Tr((e,{emit:t})=>{let n=k(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=k(!!e.ssr),a=k(``),o=A(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=Mv(i,!1,!0))===null)return null;let s=$v(o);if(!s){let e=n.value;return(!e||e.name!==i)&&(s===null?n.value={name:i}:n.value={name:i,abort:Xy([o],c)}),null}r(),a.value!==i&&(a.value=i,En(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():Vr(()=>{i.value=!0,c()}),qn(()=>e.icon,c),Ur(r),()=>{let t=o.value;if(!t)return mb(hb,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),mb({...Lv,...t.data},n)}},{props:[`icon`,`mode`,`ssr`,`width`,`height`,`style`,`color`,`inline`,`rotate`,`hFlip`,`horizontalFlip`,`vFlip`,`verticalFlip`,`flip`,`id`,`ariaHidden`,`customise`,`title`],emits:[`load`]}),B=Tr({name:`SIcon`,__name:`icon`,props:{icon:{},ssr:{type:Boolean},customise:{type:Function},id:{},style:{},title:{},mode:{},color:{},flip:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},rotate:{},hFlip:{type:Boolean},vFlip:{type:Boolean},width:{},height:{},inline:{type:Boolean},ariaHidden:{type:Boolean}},setup(e){let t=e,n=Av(),r=L(()=>{let{width:e,height:r}=t,i=n?.iconify?.value||{};return{width:e||i.width,height:r||i.height}}),i=L(()=>({...t,...r.value})),a=L(()=>o(t.icon)?{...i.value,icon:t.icon}:null);function o(e){return e?typeof e==`string`||typeof e==`object`&&`body`in e:!1}return(t,n)=>a.value?(M(),wa(j(gb),Ia({key:0},a.value,{style:{"flex-shrink":`0`}}),null,16)):e.icon?(M(),wa(Jr(e.icon),{key:1,style:pe([{"flex-shrink":`0`},{width:r.value.width,height:r.value.height}])},null,8,[`style`])):I(`v-if`,!0)}});Rl({extend:[Tv],base:`fixed z-50`,variants:{size:{xs:`bottom-4 end-4`,sm:`bottom-5 end-5`,md:`bottom-6 end-6`,lg:`bottom-7 end-7`,xl:`bottom-8 end-8`,"2xl":`bottom-10 end-10`}},defaultVariants:{size:`md`}}),Jl({slots:{root:`flex w-full flex-col`,anchor:[`group flex w-full items-center rounded-md border border-input bg-background text-foreground shadow-xs transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],inputRoot:`flex min-w-0 grow items-center gap-2 bg-transparent`,inputControl:`min-w-0 grow border-0 bg-transparent px-0 outline-none placeholder:text-muted-foreground`,inputIcon:`shrink-0 text-muted-foreground`,inputClearable:[`flex shrink-0 items-center justify-center rounded-sm text-muted-foreground opacity-70 outline-none transition-opacity`,`hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1`,`disabled:cursor-not-allowed disabled:opacity-40`],trigger:`flex shrink-0 items-center justify-center text-muted-foreground outline-none disabled:cursor-not-allowed`,triggerIcon:`size-1em`,popup:[`relative z-50 min-w-[--soybean-popper-anchor-width] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],viewport:`max-h-80 overflow-y-auto overflow-x-hidden p-1`,empty:`py-6 text-center text-sm text-muted-foreground`,group:`overflow-hidden`,groupLabel:`px-2 py-1.5 text-xs font-medium text-muted-foreground`,item:[`relative flex w-full items-center rounded-sm outline-none select-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],itemIcon:`shrink-0 text-muted-foreground`,itemText:`grow truncate text-start`,itemIndicator:`ms-auto shrink-0 text-muted-foreground`,separator:`-mx-1 my-1 h-px bg-border`},variants:{size:{xs:{anchor:`min-h-6 gap-1 px-1.5 text-2xs`,inputRoot:`gap-1`,popup:`text-2xs`,viewport:`max-h-70 p-0.75`,groupLabel:`px-1 py-1 text-3xs`,item:`gap-1 px-1 py-1`,separator:`-mx-0.75 my-0.75`},sm:{anchor:`min-h-7 gap-1.5 px-2 text-xs`,inputRoot:`gap-1.5`,popup:`text-xs`,viewport:`max-h-75 p-0.875`,groupLabel:`px-1.5 py-1.25 text-2xs`,item:`gap-1.5 px-1.5 py-1.25`,separator:`-mx-0.875 my-0.875`},md:{anchor:`min-h-8 gap-2 px-2.5 text-sm`,inputRoot:`gap-2`,popup:`text-sm`,viewport:`max-h-80 p-1`,groupLabel:`px-2 py-1.5 text-xs`,item:`gap-2 px-2 py-1.5`,separator:`-mx-1 my-1`},lg:{anchor:`min-h-9 gap-2.5 px-3 text-base`,inputRoot:`gap-2.5`,popup:`text-base`,viewport:`max-h-90 p-1.25`,groupLabel:`px-2.5 py-1.75 text-sm`,item:`gap-2.5 px-2.5 py-1.75`,separator:`-mx-1.25 my-1.25`},xl:{anchor:`min-h-10 gap-3 px-3.5 text-lg`,inputRoot:`gap-3`,popup:`text-lg`,viewport:`max-h-100 p-1.5`,groupLabel:`px-3 py-2 text-base`,item:`gap-3 px-3 py-2`,separator:`-mx-1.5 my-1.5`},"2xl":{anchor:`min-h-12 gap-3.5 px-4 text-xl`,inputRoot:`gap-3.5`,popup:`text-xl`,viewport:`max-h-115 p-1.75`,groupLabel:`px-3.5 py-2.5 text-lg`,item:`gap-3.5 px-3.5 py-2.5`,separator:`-mx-1.75 my-1.75`}}},defaultVariants:{size:`md`}});var[dne,fne]=R(`InputRoot`),[_b,pne]=z(`InputUi`),{provideCollectionContext:vb,useCollectionContext:mne,useCollectionItem:hne}=Xm(`Listbox`),[gne,_ne]=R(`ListboxRoot`,e=>{let[t,n]=Gm(),{getOrderedItems:r,getOrderedElements:i}=vb(),{handleTypeaheadSearch:a}=gv(),{modelValue:o,orientation:s,selectionBehavior:c,isMultiple:l,onModelValueChange:u,onHighlight:d,onEntryFocus:f}=e,p=Hm(e.dir),m=A(),h=A(!1),g=A(!0),_=A(null),v=A(null),y=A(!1),b=A(!1),x=O_(),S=O_(),C=O_(),w=e=>{h.value=!0,l.value&&c.value===`replace`&&(m.value=e),u(e),setTimeout(()=>{h.value=!1},1)},ee=(e,t=!0)=>{e&&(_.value=e,g.value&&_.value.focus(),t&&_.value.scrollIntoView({block:`nearest`}),d(r().find(t=>t.element===e)))},te=e=>{if(y.value)C.trigger(e);else{let t=r().find(t=>t.data.value===e);t&&(_.value=t.element,ee(t.element))}},ne=e=>{_.value?.isConnected&&(e.preventDefault(),e.stopPropagation(),!b.value&&_.value.click())},re=e=>{if(h.value=!0,y.value)S.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey,n=r();if(t&&e.key===`a`&&l.value){o.value=[...n.map(e=>e.data.value)],e.preventDefault();let t=n[n.length-1]?.element;t&&ee(t)}else if(!t){let t=a(e.key,n);t&&ee(t)}}setTimeout(()=>{h.value=!1},1)},ie=()=>{b.value=!0},ae=()=>{En(()=>{b.value=!1})},oe=t=>{let n=_.value;n?.isConnected&&(v.value=n),_.value=null,e.onLeave(t)},se=e=>{let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),f(t),!t.defaultPrevented)if(v.value)ee(v.value);else{let e=i()?.[0];e&&ee(e)}},T=e=>{let t=xf(e,s.value,p.value);if(!t)return;let n=i();if(_.value){if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let e=n.indexOf(_.value);n=n.slice(e+1)}let r=n[0];r&&le(e,r)}if(n.length){let e=!_.value&&t===`prev`?n.length-1:0,r=n[e];r&&ee(r)}y.value&&S.trigger(e)},ce=()=>{En(()=>{T(new KeyboardEvent(`keydown`,{key:`PageUp`}))})};function le(e,t){if(y.value||c.value!==`replace`||!l.value||!Array.isArray(o.value)||(e.altKey||e.ctrlKey||e.metaKey)&&!e.shiftKey||!e.shiftKey)return;let n=r(),i=n.find(e=>e.element===t)?.data?.value;e.key===`End`?i=n[n.length-1]?.data?.value:e.key===`Home`&&(i=n[0]?.data?.value),!(!i||!m.value)&&(o.value=Ree(n.map(e=>e.data.value),m.value,i))}let E=async e=>{if(await En(),y.value)x.trigger(e);else{let e=i(),t=e.find(e=>e.dataset.state===`checked`);t?ee(t):e[0]&&ee(e[0])}},ue=async e=>{let n=e.relatedTarget||e.target;await En(),!(!_.value||t.value?.contains(n))&&oe(e)};return{...e,rootElement:t,setRootElement:n,isUserAction:h,isVirtual:y,virtualFocusHook:x,virtualKeydownHook:S,virtualHighlightHook:C,firstValue:m,focusable:g,onModelValueChange:w,onLeave:oe,onEnter:se,highlightedElement:_,changeHighlight:ee,highlightItem:te,highlightSelected:E,highlightFirstItem:ce,onKeydownEnter:ne,onKeydownNavigation:T,onKeydownTypeahead:re,onCompositionStart:ie,onCompositionEnd:ae,onFocusOut:ue,getItems:r}}),[vne,yne]=R(`ListboxGroup`,()=>({id:`soybean-listbox-group-${Er()}`})),[bne,xne]=R(`ListboxItem`,e=>e),[yb,Sne]=z(`ListboxUi`,e=>(_b(L(()=>({root:e.value?.filterRoot,control:e.value?.filterControl}))),e)),[Cne,wne]=R(`PopperRoot`,e=>{let t=A(),n=e=>{t.value=e},r=A(),i=e=>{r.value=e};return{...e,popupElement:t,onPopupElementChange:n,anchorElement:r,onAnchorElementChange:i}}),[Tne,Ene]=R(`PopperPositioner`,e=>{let t=A(null),n=e=>{t.value=e??null};return{...e,arrowElement:t,onArrowElementChange:n}}),[bb,Dne]=z(`PopperUi`),xb=Tr({name:`Portal`,__name:`portal`,props:{to:{default:`body`},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){let t=A(!1);return Vr(()=>{t.value=!0}),(n,r)=>t.value||e.forceMount?(M(),wa(sr,{key:0,to:e.to,disabled:e.disabled,defer:e.defer},[$r(n.$slots,`default`)],8,[`to`,`disabled`,`defer`])):I(`v-if`,!0)}}),[One,kne]=R(`ComboboxRoot`),[Ane,jne]=R(`ComboboxContent`),[Sb,Mne]=z(`ComboboxUi`,e=>{let t=L(()=>({...e.value,content:e.value?.viewport,filterRoot:e.value?.inputRoot,filterControl:e.value?.inputControl}));return bb(e),yb(t),e}),Nne={transformOrigin:`--soybean-popper-transform-origin`,availableWidth:`--soybean-popper-available-width`,availableHeight:`--soybean-popper-available-height`,anchorWidth:`--soybean-popper-anchor-width`,anchorHeight:`--soybean-popper-anchor-height`};function Cb(){return{placement:void 0,side:`bottom`,sideOffset:0,sideFlip:!0,align:`center`,alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionPadding:0,collisionBoundary:()=>[],sticky:`partial`,hideWhenDetached:!1,positionStrategy:`fixed`,updatePositionStrategy:`optimized`,prioritizePosition:!1}}var Pne={start:`0%`,center:`50%`,end:`100%`},Fne={bottom:{getX:({isArrowHidden:e,noArrowAlign:t,arrowXCenter:n})=>e?t:`${n}px`,getY:({arrowHeight:e})=>`${-e}px`},top:{getX:({isArrowHidden:e,noArrowAlign:t,arrowXCenter:n})=>e?t:`${n}px`,getY:({floatingHeight:e,arrowHeight:t})=>`${e+t}px`},right:{getX:({arrowHeight:e})=>`${-e}px`,getY:({isArrowHidden:e,noArrowAlign:t,arrowYCenter:n})=>e?t:`${n}px`},left:{getX:({floatingWidth:e,arrowHeight:t})=>`${e+t}px`,getY:({isArrowHidden:e,noArrowAlign:t,arrowYCenter:n})=>e?t:`${n}px`}};function Ine(e){let{collisionPadding:t,collisionBoundary:n}=e,r={top:1,right:1,bottom:1,left:1};typeof t==`number`?(r.top+=t,r.right+=t,r.bottom+=t,r.left+=t):t&&(r.top+=t.top??0,r.right+=t.right??0,r.bottom+=t.bottom??0,r.left+=t.left??0);let i=Array.isArray(n)?n:[n],a=i.length>0;return{padding:r,boundary:i.filter(e=>!Ql(e)),altBoundary:a}}ui({placement:{},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{}},Cb()),typeof window>`u`||`onscrollend`in window;var[Lne,Rne]=R(`AutocompleteRoot`),[zne,Bne]=z(`AutocompleteUi`,e=>(Sb(e),e)),wb=Jl({slots:{root:`relative inline-block`,content:`absolute flex justify-center items-center leading-relaxed whitespace-nowrap rounded-full transform`},variants:{color:{primary:{content:`bg-primary text-primary-foreground`},destructive:{content:`bg-destructive text-destructive-foreground`},success:{content:`bg-success text-success-foreground`},warning:{content:`bg-warning text-warning-foreground`},info:{content:`bg-info text-info-foreground`},carbon:{content:`bg-carbon text-carbon-foreground`},secondary:{content:`bg-secondary text-secondary-foreground`},accent:{content:`bg-accent text-accent-foreground`}},size:{xs:{content:`min-h-2 px-1 text-4xs`},sm:{content:`min-h-2.5 px-1.25 text-3xs`},md:{content:`min-h-3 px-1.5 text-2xs`},lg:{content:`min-h-3.5 px-1.75 text-xs`},xl:{content:`min-h-4 px-2 text-sm`},"2xl":{content:`min-h-5 px-2.5 text-base`}},position:{"top-right":{content:`end-0 top-0 translate-x-1/2 -translate-y-1/2 rtl:-translate-x-1/2`},"bottom-right":{content:`end-0 bottom-0 translate-x-1/2 translate-y-1/2 rtl:-translate-x-1/2`},"top-left":{content:`start-0 top-0 -translate-x-1/2 -translate-y-1/2 rtl:translate-x-1/2`},"bottom-left":{content:`start-0 bottom-0 -translate-x-1/2 translate-y-1/2 rtl:translate-x-1/2`}}},defaultVariants:{color:`primary`,size:`md`,position:`top-right`}}),[Vne,Hne]=R(`BadgeRoot`),[Une,Wne]=z(`BadgeUi`),Tb=Jl({extendBase:e=>({close:Ov({size:e.size}),cancel:Dv({size:e.size,variant:`pure`}),confirm:Dv({size:e.size})}),slots:{overlay:[`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-50 flex flex-col w-max lt-sm:w-full border bg-background shadow-lg outline-none duration-200 rounded-lg`,`-translate-x-1/2 -translate-y-1/2 [&[dir=rtl]]:translate-x-1/2`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2`],header:`flex flex-col lt-sm:text-center`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,icon:`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`,description:`text-muted-foreground m-0`,close:`absolute`,content:`grow overflow-auto`,footer:`flex justify-end lt-sm:flex-col-reverse`,cancel:``,confirm:``},variants:{size:{xs:{popup:`gap-y-1.5 min-w-xs max-w-3xl px-2 py-1.5 text-2xs`,header:`gap-y-1.5`,title:`gap-x-1.5 text-xs`,description:`text-2xs`,close:`end-1.5 top-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2 min-w-sm max-w-4xl px-3 py-2 text-xs`,header:`gap-y-2`,title:`gap-x-1.75 text-sm`,description:`text-xs`,close:`end-1.75 top-1.75`,footer:`gap-2`},md:{popup:`gap-y-3 min-w-md max-w-5xl px-4 py-3 text-sm`,header:`gap-y-3`,title:`gap-x-2 text-base`,description:`text-sm`,close:`end-2 top-2`,footer:`gap-3`},lg:{popup:`gap-y-4 min-w-lg max-w-6xl px-5 py-4 text-base`,header:`gap-y-4`,title:`gap-x-2.5 text-lg`,description:`text-base`,close:`end-2.5 top-2.5`,footer:`gap-4`},xl:{popup:`gap-y-5 min-w-xl max-w-7xl px-6 py-5 text-lg`,header:`gap-y-5`,title:`gap-x-3 text-xl`,description:`text-lg`,close:`end-3 top-3`,footer:`gap-5`},"2xl":{popup:`gap-y-6 min-w-2xl max-w-7xl px-7 py-6 text-xl`,header:`gap-y-6`,title:`gap-x-3.5 text-2xl`,description:`text-xl`,close:`end-4 top-4`,footer:`gap-6`}},pure:{true:{popup:`p-0 gap-0 border-none`}}},defaultVariants:{size:`md`}}),Eb=Jl({extend:[Tb],extendIgnore:[`popup`],slots:{popup:[`fixed z-50 flex flex-col justify-between items-stretch border bg-background outline-none transition ease-in-out`,`data-[state=open]:animate-in data-[state=open]:duration-500`,`data-[state=closed]:animate-out data-[state=closed]:duration-300`]},variants:{size:{xs:{popup:`gap-y-1.5 px-2 py-1.5 text-2xs`},sm:{popup:`gap-y-2 px-3 py-2 text-xs`},md:{popup:`gap-y-3 px-4 py-3 text-sm`},lg:{popup:`gap-y-4 px-5 py-4 text-base`},xl:{popup:`gap-y-5 px-6 py-5 text-lg`},"2xl":{popup:`gap-y-6 px-7 py-6 text-xl`}},side:{top:{popup:`inset-x-0 top-0 border-b rounded-b-md data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top`},bottom:{popup:`inset-x-0 bottom-0 border-t rounded-t-md data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom`},left:{popup:[`inset-y-0 start-0 h-full sm:max-w-sm w-3/4 border-e rounded-e-md`,`data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left`,`[&[dir=rtl]]:data-[state=open]:slide-in-from-right [&[dir=rtl]]:data-[state=closed]:slide-out-to-right`]},right:{popup:[`inset-y-0 end-0 h-full sm:max-w-sm w-3/4 border-s rounded-s-md`,`data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right`,`[&[dir=rtl]]:data-[state=open]:slide-in-from-left [&[dir=rtl]]:data-[state=closed]:slide-out-to-left`]}}},defaultVariants:{size:`md`,side:`right`}});Jl({extend:[Eb],slots:{handle:`mx-auto shrink-0 cursor-grab active:cursor-grabbing rounded-full bg-muted`},variants:{size:{xs:{handle:`mt-0.625 h-1.5 w-20`},sm:{handle:`mt-0.75 h-1.75 w-22`},md:{handle:`mt-1 h-2 w-25`},lg:{handle:`mt-1.25 h-2.5 w-30`},xl:{handle:`mt-1.5 h-3 w-35`},"2xl":{handle:`mt-1.75 h-3.5 w-40`}}},defaultVariants:{size:`md`,side:`bottom`}});var[Db,Ob]=R(`DialogRoot`,e=>{let[t,n]=Gm(),[r,i]=Gm(),[a,o]=Gm(),[s,c]=Gm(),{open:l}=e,u=e=>{l.value=e},d=()=>{l.value=!l.value},f=L(()=>iu(l.value)),p=A(``),m=`soybean-dialog-popup-${Er()}`,h=()=>{p.value||=m},g=A(``),_=`soybean-dialog-title-${Er()}`,v=()=>{g.value||=_},y=A(``),b=`soybean-dialog-description-${Er()}`,x=()=>{y.value||=b},S=async()=>{await En(),s.value?.focus({preventScroll:!0})};return{...e,onOpenChange:u,onOpenToggle:d,dataState:f,overlayElement:t,setOverlayElement:n,triggerElement:r,setTriggerElement:i,popupElement:a,setPopupElement:o,cancelElement:s,setCancelElement:c,popupId:p,initPopupId:h,titleId:g,initTitleId:v,descriptionId:y,initDescriptionId:x,focusCancel:S}}),[kb,Ab]=R(`DialogProvider`,e=>{let{dialogs:t}=e;return{dialogs:t,getCurrentDialog:e=>t.value.find(t=>String(t.id)===String(e))}}),[jb,Mb]=R(`DialogCompact`,e=>{let{dialog:t}=e;return{dialog:t}}),[Nb,Pb]=z(`DialogUi`),Fb=(e=>{if(!e)return Pb();let t=Mb(),n=Pb(e);return L(()=>{let r=t?.dialog?.value?.ui?.[e];return[n.value,r].filter(Boolean).join(` `)})}),Ib=Tr({name:`DialogCancel`,__name:`dialog-cancel`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`cancel`],setup(e,{emit:t}){let n=e,r=t,i=Fb(`cancel`),{setCancelElement:a,onOpenChange:o}=Ob(`DialogCancel`),s=async e=>{r(`cancel`,e),o(!1)};return(e,t)=>(M(),wa(xv,Ia({ref:j(a)},n,{"data-soybean-dialog-cancel":``,class:j(i),onClick:s}),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16,[`class`]))}}),Lb=Tr({name:`DialogClose`,__name:`dialog-close`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=Fb(`close`),{onOpenChange:a}=Ob(`DialogClose`),o=async e=>{r(`close`,e),a(!1)};return(e,t)=>(M(),wa(xv,Ia(n,{"data-soybean-dialog-close":``,class:j(i),onClick:o}),{default:Rn(()=>[$r(e.$slots,`default`,{},()=>[F(Sv,{icon:`lucide:x`})])]),_:3},16,[`class`]))}}),Rb=Tr({name:`DialogConfirm`,__name:`dialog-confirm`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`confirm`],setup(e,{emit:t}){let n=e,r=t,i=Fb(`confirm`),{onOpenChange:a}=Ob(`DialogConfirm`),o=async e=>{r(`confirm`,e),a(!1)};return(e,t)=>(M(),wa(xv,Ia(n,{"data-soybean-dialog-confirm":``,class:j(i),onClick:o}),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16,[`class`]))}}),zb=Tr({name:`DialogContent`,__name:`dialog-content`,setup(e){let t=Fb(`content`);return(e,n)=>(M(),N(`div`,{"data-soybean-dialog-content":``,class:D(j(t))},[$r(e.$slots,`default`)],2))}}),Bb=[`id`],Vb=Tr({name:`DialogDescription`,__name:`dialog-description`,setup(e){let{descriptionId:t,initDescriptionId:n}=Ob(`DialogDescription`),r=Fb(`description`);return n(),(e,n)=>(M(),N(`p`,{id:j(t),"data-soybean-dialog-description":``,class:D(j(r))},[$r(e.$slots,`default`)],10,Bb))}}),Hb=Tr({name:`DialogFooter`,__name:`dialog-footer`,setup(e){let t=Fb(`footer`);return(e,n)=>(M(),N(`div`,{"data-soybean-dialog-footer":``,class:D(j(t))},[$r(e.$slots,`default`)],2))}}),Ub=Tr({name:`DialogHeader`,__name:`dialog-header`,setup(e){let t=Fb(`header`);return(e,n)=>(M(),N(`div`,{"data-soybean-dialog-header":``,class:D(j(t))},[$r(e.$slots,`default`)],2))}}),Wb=[`id`],Gb=Tr({name:`DialogTitle`,__name:`dialog-title`,setup(e){let{titleId:t,initTitleId:n}=Ob(`DialogTitle`),r=Fb(`title`);return n(),(e,n)=>(M(),N(`h2`,{id:j(t),"data-soybean-dialog-title":``,class:D(j(r))},[$r(e.$slots,`default`)],10,Wb))}}),Kb=Tr({name:`DialogTrigger`,__name:`dialog-trigger`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,{open:i,onOpenToggle:a,dataState:o,popupId:s,setTriggerElement:c}=Ob(`DialogTrigger`),l=e=>{r(`click`,e),a()};return(e,t)=>(M(),wa(xv,Ia(n,{ref:j(c),"data-soybean-dialog-trigger":``,"aria-haspopup":`dialog`,"aria-expanded":j(i)||!1,"aria-controls":j(i)?j(s):void 0,"data-state":j(o),onClick:l}),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16,[`aria-expanded`,`aria-controls`,`data-state`]))}}),qb=[`data-state`],Jb=Tr({name:`DialogOverlay`,__name:`dialog-overlay`,props:{forceMount:{type:Boolean}},setup(e){let t=e,{overlayElement:n,setOverlayElement:r,open:i,dataState:a}=Ob(`DialogOverlay`),o=Fb(`overlay`),s=t.forceMount?A(!0):fv(n,i);return Gn(()=>{s.value&&i.value&&fn(Kee())}),(e,t)=>j(s)?(M(),N(`div`,{key:0,ref:j(r),"data-soybean-dialog-overlay":``,class:D(j(o)),"data-state":j(a),style:{"pointer-events":`auto`}},[$r(e.$slots,`default`)],10,qb)):I(`v-if`,!0)}}),Yb=Tr({name:`DialogPopupImpl`,__name:`dialog-popup-impl`,props:{trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{dir:i,modal:a,isAlert:o,alertType:s,onOpenChange:c,setTriggerElement:l,popupElement:u,setPopupElement:d,popupId:f,initPopupId:p,dataState:m,titleId:h,descriptionId:g,focusCancel:_}=Ob(`DialogPopupImpl`),{pointerEvents:v}=ate(u,{disableOutsidePointerEvents:()=>n.disableOutsidePointerEvents,onEscapeKeyDown:e=>{r(`escapeKeyDown`,e)},onPointerDownOutside:e=>{r(`pointerDownOutside`,e)},onFocusOutside:e=>{r(`focusOutside`,e)},onInteractOutside:e=>{r(`interactOutside`,e)},onDismiss:()=>{c(!1)}}),{onKeydown:y}=Fg(u,{trapped:()=>n.trapFocus,loop:!0,onOpenAutoFocus:e=>{o.value&&_(),r(`openAutoFocus`,e)},onCloseAutoFocus:e=>{r(`closeAutoFocus`,e)}}),b=mv(n,[`trapFocus`,`disableOutsidePointerEvents`]),x=Fb(`popup`),S=L(()=>({pointerEvents:v.value})),C=()=>{let e=sf();e!==document.body&&l(e)};return kg(),lv(u,a),p(),Vr(()=>{C()}),(e,t)=>(M(),wa(j(bv),Ia(j(b),{id:j(f),ref:j(d),class:j(x),dir:j(i),"aria-labelledby":j(h),"aria-describedby":j(g),"data-dismissable-layer":``,"data-state":j(m),"data-type":j(o)?j(s):void 0,role:j(o)?`alertdialog`:`dialog`,"aria-live":j(o)?j(s)===`error`?`assertive`:`polite`:void 0,tabindex:`-1`,style:S.value,onKeydown:j(y)}),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16,[`id`,`class`,`dir`,`aria-labelledby`,`aria-describedby`,`data-state`,`data-type`,`role`,`aria-live`,`style`,`onKeydown`]))}}),Xb=Tr({name:`DialogPopup`,__name:`dialog-popup`,props:{asChild:{type:Boolean},as:{},forceMount:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=mv(n,[`forceMount`]),a=Lg(r),{popupElement:o,open:s,modal:c,isAlert:l,triggerElement:u}=Ob(`DialogPopup`),d=n.forceMount?A(!0):fv(o,s),f=L(()=>c.value&&s.value),{onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onCloseAutoFocus:g}=uv({modal:c,triggerElement:u}),_=e=>{l.value&&e.preventDefault(),p(e)},v=e=>{l.value&&e.preventDefault(),h(e)};return(e,t)=>j(d)?(M(),wa(Yb,Ia({key:0},j(i),{"data-soybean-dialog-popup":``,"trap-focus":f.value,"disable-outside-pointer-events":j(c)},ti(j(a)),{onPointerDownOutside:_,onFocusOutside:j(m),onInteractOutside:v,onCloseAutoFocus:j(g)}),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`,`onFocusOutside`,`onCloseAutoFocus`])):I(`v-if`,!0)}}),Zb=Tr({name:`DialogRoot`,inheritAttrs:!1,__name:`dialog-root`,props:{dir:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,i=Zm(()=>n.open,e=>{r(`update:open`,e)},n.defaultOpen??!1),{onOpenChange:a}=Db({dir:Hm(()=>n.dir),open:i,modal:L(()=>n.isAlert===!0||n.modal),...Tf(n,[`isAlert`,`alertType`])}),o=()=>{a(!1)};return(e,t)=>$r(e.$slots,`default`,{open:j(i),close:o})}}),Qb=Tr({name:`DialogCompact`,__name:`dialog-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},dir:{},isAlert:{type:Boolean},alertType:{default:`default`},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=mv(n,[`title`,`description`,`icon`,`showClose`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`cancelProps`,`confirmProps`]),i=t,a=oi(),o=si(),s=Lg(i),c=Wm(),l=Ab(),u=L(()=>l?.getCurrentDialog(o[`data-dialog-id`])),d=L(()=>[Fb().value?.icon,u.value?.ui?.icon].filter(Boolean).join(` `)),f=L(()=>({...n.triggerProps,asChild:n.triggerProps?.asChild??!0})),p={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},m=L(()=>n.icon?n.icon:n.isAlert&&n.alertType?p[n.alertType]:null),h=L(()=>n.showConfirm??n.isAlert),g=L(()=>typeof n.showCancel==`boolean`?n.showCancel:n.isAlert===!0&&n.alertType===`warning`),_=L(()=>n.pure?!1:a.footer?!0:g.value||h.value),v=L(()=>n.cancelText??c.value.dialog.cancel),y=L(()=>n.confirmText??c.value.dialog.confirm);return jb({dialog:u}),(t,n)=>(M(),wa(Zb,Ia(j(r),{"onUpdate:open":n[4]||=e=>i(`update:open`,e)}),{default:Rn(r=>[F(Kb,ve(Aa(f.value)),{default:Rn(()=>[$r(t.$slots,`trigger`,ve(Aa(r)))]),_:2},1040),F(xb,ve(Aa(e.portalProps)),{default:Rn(()=>[F(Jb,ve(Aa(e.overlayProps)),null,16),F(Xb,Ia(e.popupProps,ti(j(s))),{default:Rn(()=>[e.pure?I(`v-if`,!0):(M(),wa(Ub,ve(Ia({key:0},e.headerProps)),{default:Rn(()=>[F(Gb,ve(Aa(e.titleProps)),{default:Rn(()=>[m.value?(M(),wa(Sv,{key:0,icon:m.value,class:D(d.value)},null,8,[`icon`,`class`])):I(`v-if`,!0),$r(t.$slots,`title`,ve(Aa(r)),()=>[P(`span`,null,O(e.title),1)])]),_:2},1040),a.description||e.description?(M(),wa(Vb,ve(Ia({key:0},e.descriptionProps)),{default:Rn(()=>[$r(t.$slots,`description`,ve(Aa(r)),()=>[Ma(O(e.description),1)])]),_:2},1040)):I(`v-if`,!0),!e.isAlert&&e.showClose?(M(),wa(Lb,{key:1,onClose:n[0]||=e=>i(`close`,e)},{default:Rn(()=>[$r(t.$slots,`close`,ve(Aa(r)))]),_:2},1024)):I(`v-if`,!0)]),_:2},1040)),F(zb,ve(Aa(e.contentProps)),{default:Rn(()=>[$r(t.$slots,`default`,ve(Aa(r)))]),_:2},1040),e.pure&&!e.isAlert&&e.showClose?(M(),wa(Lb,{key:1,onClose:n[1]||=e=>i(`close`,e)},{default:Rn(()=>[$r(t.$slots,`close`,ve(Aa(r)))]),_:2},1024)):I(`v-if`,!0),_.value?(M(),wa(Hb,ve(Ia({key:2},e.footerProps)),{default:Rn(()=>[$r(t.$slots,`footer`,ve(Aa(r)),()=>[g.value?(M(),wa(Ib,Ia({key:0},e.cancelProps,{onCancel:n[2]||=e=>i(`cancel`,e)}),{default:Rn(()=>[$r(t.$slots,`cancel`,ve(Aa(r)),()=>[Ma(O(v.value),1)])]),_:2},1040)):I(`v-if`,!0),h.value?(M(),wa(Rb,Ia({key:1},e.confirmProps,{onConfirm:n[3]||=e=>i(`confirm`,e)}),{default:Rn(()=>[$r(t.$slots,`confirm`,ve(Aa(r)),()=>[Ma(O(y.value),1)])]),_:2},1040)):I(`v-if`,!0)])]),_:2},1040)):I(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});function $b(e){"@babel/helpers - typeof";return $b=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$b(e)}function ex(e,t){if($b(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($b(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tx(e){var t=ex(e,`string`);return $b(t)==`symbol`?t:t+``}function nx(e,t,n){return(t=tx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rx=1,ix=new class{constructor(){nx(this,`subscribers`,void 0),nx(this,`dialogs`,void 0),nx(this,`dismissed`,void 0),nx(this,`subscribe`,e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)})),nx(this,`publish`,e=>{this.subscribers.forEach(t=>t(e))}),nx(this,`resetDismissed`,e=>{this.dismissed.has(e)&&this.dismissed.delete(e)}),nx(this,`upsert`,e=>{let t=this.dialogs.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.dialogs=[...this.dialogs,e];return}let n={...this.dialogs[t],...e};this.publish(n),this.dialogs=this.dialogs.map((e,r)=>r===t?n:e)}),nx(this,`create`,e=>{let{open:t=!0,...n}=e,r=ox(e.id),i={...n,id:r,open:t};return this.upsert(i),r}),nx(this,`dismiss`,e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,open:!1})),e;this.dialogs.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,open:!1})})}),nx(this,`message`,(e,t)=>this.create({...t,title:e,type:`default`})),nx(this,`error`,(e,t)=>this.create({...t,title:e,type:`error`})),nx(this,`success`,(e,t)=>this.create({...t,title:e,type:`success`})),nx(this,`info`,(e,t)=>this.create({...t,title:e,type:`info`})),nx(this,`warning`,(e,t)=>this.create({...t,title:e,type:`warning`})),nx(this,`getDialogs`,()=>this.dialogs.filter(e=>!this.dismissed.has(e.id))),nx(this,`activeDialogs`,()=>(this.dialogs=this.getDialogs(),this.dismissed.clear(),this.dialogs)),this.subscribers=[],this.dialogs=[],this.dismissed=new Set}},ax=ix.message;Object.assign(ax,{success:ix.success,error:ix.error,info:ix.info,warning:ix.warning,getHistory:()=>ix.dialogs,getDialogs:()=>ix.getDialogs()});function ox(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:rx++}var sx=Tr({name:`DynamicRender`,inheritAttrs:!1,__name:`dynamic-render`,props:{is:{}},setup(e){let t=si();return(n,r)=>typeof e.is==`string`?(M(),N(ma,{key:0},[Ma(O(e.is),1)],64)):(M(),wa(Jr(e.is),ve(Ia({key:1},j(t))),null,16))}}),cx=Tr({name:`DialogProvider`,inheritAttrs:!1,__name:`dialog-provider`,setup(e){let t=A([]),n=e=>{let n=t.value.findIndex(t=>t.id===e.id);if(n!==-1){let r=Object.assign({},t.value[n],e);t.value=[...t.value.slice(0,n),r,...t.value.slice(n+1)];return}t.value=[e,...t.value]},r=e=>{e.onDismiss?.(e),ix.dismiss(e.id)},i=(e,t)=>{e.onCancel?.(t),!t.defaultPrevented&&r(e)},a=(e,t)=>{e.onConfirm?.(t),!t.defaultPrevented&&r(e)};return kb({dialogs:t}),Gn(()=>{let e=ix.subscribe(e=>{En(()=>{n(e)}),e.open===!1&&setTimeout(()=>{t.value=ix.activeDialogs()},500)});fn(()=>{e()})},{flush:`post`}),(e,n)=>(M(),N(ma,null,[(M(!0),N(ma,null,Zr(t.value,e=>(M(),wa(Qb,{key:e.id,open:e.open,"is-alert":``,"alert-type":e.type,"data-dialog-id":e.id,icon:e.icon,onClose:t=>r(e),onCancel:t=>i(e,t),onConfirm:t=>a(e,t)},Qr({default:Rn(()=>[e.content?(M(),wa(Jr(e.content),{key:0})):I(`v-if`,!0)]),_:2},[e.title?{name:`title`,fn:Rn(()=>[F(sx,{is:e.title},null,8,[`is`])]),key:`0`}:void 0,e.description?{name:`description`,fn:Rn(()=>[F(sx,{is:e.description},null,8,[`is`])]),key:`1`}:void 0,e.footer?{name:`footer`,fn:Rn(()=>[F(sx,{is:e.footer},null,8,[`is`])]),key:`2`}:void 0,e.cancelText?{name:`cancel`,fn:Rn(()=>[F(sx,{is:e.cancelText},null,8,[`is`])]),key:`3`}:void 0,e.confirmText?{name:`confirm`,fn:Rn(()=>[F(sx,{is:e.confirmText},null,8,[`is`])]),key:`4`}:void 0]),1032,[`open`,`alert-type`,`data-dialog-id`,`icon`,`onClose`,`onCancel`,`onConfirm`]))),128)),$r(e.$slots,`default`)],64))}}),lx=`soybean-bottom-sheet-dragging`,ux=`data-soybean-bottom-sheet-scale`,dx={DURATION:.5,EASE:[.32,.72,0,1]},fx=new WeakMap;function px(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&fx.set(e,r)}function mx(e,t){if(!e||!(e instanceof HTMLElement))return;let n=fx.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([t,n])=>{e.style[t]=n}))}function hx(e,t){let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r?.match(/^matrix3d\((.+)\)$/);return i?Number.parseFloat(i[1].split(`, `)[_x(t)?13:12]):(i=r?.match(/^matrix\((.+)\)$/),i?Number.parseFloat(i[1].split(`, `)[_x(t)?5:4]):null)}function gx(e){return 8*(Math.log(e+1)-2)}function _x(e){return e===`top`||e===`bottom`}function vx({activeSnapPoint:e,snapPoints:t,drawerRef:n,overlayRef:r,fadeFromIndex:i,onSnapPointChange:a,direction:o}){let s=k(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function c(){s.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}Vr(()=>{typeof window<`u`&&window.addEventListener(`resize`,c)}),Hr(()=>{typeof window<`u`&&window.removeEventListener(`resize`,c)});let l=L(()=>(t.value&&e.value===t.value[t.value.length-1])??null),u=L(()=>t.value&&t.value.length>0&&(i?.value||i?.value===0)&&!Number.isNaN(i?.value)&&t.value[i?.value??-1]===e.value||!t.value),d=L(()=>t.value?.findIndex(t=>t===e.value)??null),f=L(()=>t.value?.map(e=>{let t=typeof e==`string`,n=0;if(t&&(n=Number.parseInt(e,10)),_x(o.value)){let r=n;return t||(r=s.value?e*s.value.innerHeight:0),s.value?o.value===`bottom`?s.value.innerHeight-r:-s.value.innerHeight+r:r}let r=n;return t||(r=s.value?e*s.value.innerWidth:0),s.value?o.value===`right`?s.value.innerWidth-r:-s.value.innerWidth+r:r})??[]),p=L(()=>d.value===null?null:f.value?.[d.value]),m=s=>{let c=f.value?.findIndex(e=>e===s)??null;En(()=>{a(c,f.value),px(n.value,{transition:`transform ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`,transform:_x(o.value)?`translate3d(0, ${s}px, 0)`:`translate3d(${s}px, 0, 0)`})}),f.value&&c!==f.value.length-1&&c!==i?.value?px(r.value,{transition:`opacity ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`,opacity:`0`}):px(r.value,{transition:`opacity ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`,opacity:`1`}),e.value=c===null?null:t.value?.[c]??null};qn([e,f,t],()=>{if(e.value!==null&&e.value!==void 0){let n=t.value?.findIndex(t=>t===e.value)??-1;f.value&&n!==-1&&typeof f.value[n]==`number`&&m(f.value[n])}},{immediate:!0});function h(e,n,r,i){return e>2&&!n?(r?i():m(f.value[0]),!0):e>2&&n&&f&&t.value?(m(f.value[t.value.length-1]),!0):!1}function g(e){let{currentPosition:n,velocity:r,draggedDistance:i,isFirst:a,hasDraggedUp:s,dismissible:c,closeDrawer:u}=e,p=f.value?.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e),h=_x(o.value)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(i)<h*.4){let e=s?1:-1;if(e>0&&l.value){m(f.value[(t.value?.length??0)-1]);return}if(a&&e<0&&c&&u(),d.value===null)return;m(f.value[d.value+e]);return}m(p)}function _({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:a}){if(i===void 0)return;let s=o.value===`bottom`||o.value===`right`?(p.value??0)-e:(p.value??0)+e,c=d.value===(i.value??0)-1,l=d.value===0,u=e>0;c&&px(r.value,{transition:`opacity ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`}),!h(n,u,a,t)&&g({currentPosition:s,velocity:n,draggedDistance:e,isFirst:l,hasDraggedUp:u,dismissible:a,closeDrawer:t})}function v({draggedDistance:e}){if(p.value===null)return;let t=o.value===`bottom`||o.value===`right`?(p.value??0)-e:(p.value??0)+e;(o.value===`bottom`||o.value===`right`)&&t<f.value[f.value.length-1]||(o.value===`top`||o.value===`left`)&&t>f.value[f.value.length-1]||px(n.value,{transform:_x(o.value)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function y(e,n){if(!t||typeof d.value!=`number`||!f.value||i===void 0)return null;let r=d.value===(i.value??0)-1;if(d.value>=(i.value??0)&&n)return 0;if(r&&!n)return 1;if(!u.value&&!r)return null;let a=r?d.value+1:d.value-1,o=r?f.value[a]-f.value[a-1]:f.value[a+1]-f.value[a],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:l,shouldFade:u,getPercentageDragged:y,activeSnapPointIndex:d,onRelease:_,onDrag:v,snapPointsOffset:f}}var[Gne,Kne]=R(`BottomSheetRoot`,e=>yx(e));function yx(e){let{emitDrag:t,emitRelease:n,emitClose:r,emitOpenChange:i,open:a,dismissible:o,nested:s,modal:c,shouldScaleBackground:l,setBackgroundColorOnScale:u,scrollLockTimeout:d,closeThreshold:f,activeSnapPoint:p,fadeFromIndex:m,direction:h,noBodyStyles:g,handleOnly:_}=e,[v,y]=Gm(),[b,x]=Gm(),[S,C]=Gm(),w=k(a.value??!1),ee=k(!1),te=k(!1),ne=k(!1),re=k(null),ie=k(null),ae=k(null),oe=k(null),se=k(!1),T=k(null),ce=k(0),le=k(!1),E=L(()=>b.value?.getBoundingClientRect().height||0),ue=L(()=>{let t=e.snapPoints?.value;if(t?.length)return t}),de=L(()=>(ue.value?.length??0)>0),{activeSnapPointIndex:fe,onRelease:pe,snapPointsOffset:me,onDrag:he,shouldFade:ge,getPercentageDragged:_e}=vx({snapPoints:ue,activeSnapPoint:p,drawerRef:b,fadeFromIndex:m,overlayRef:v,onSnapPointChange:D,direction:h});function D(e,t){ue.value&&e===t.length-1&&(re.value=new Date)}function ve(){return(window.innerWidth-26)/window.innerWidth}function ye(e,t){if(!e)return!1;let n=e,r=window.getSelection()?.toString(),i=b.value?hx(b.value,h.value):null,a=new Date;if(n.hasAttribute(`data-soybean-bottom-sheet-no-drag`)||n.closest(`[data-soybean-bottom-sheet-no-drag]`))return!1;if(h.value===`right`||h.value===`left`)return!0;if(re.value&&a.getTime()-re.value.getTime()<500)return!1;if(i!==null&&(h.value===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(oe.value&&a.getTime()-oe.value.getTime()<d.value&&i===0||t)return oe.value=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return oe.value=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function be(e){!o.value&&!ue.value||b.value&&!b.value.contains(e.target)||(te.value=!0,ie.value=new Date,e.target.setPointerCapture(e.pointerId),ce.value=_x(h.value)?e.clientY:e.clientX)}function xe(e){if(!b.value||!te.value)return;let n=h.value===`bottom`||h.value===`right`?1:-1,r=(ce.value-(_x(h.value)?e.clientY:e.clientX))*n,i=r>0,a=ue.value&&!o.value&&!i;if(a&&fe.value===0)return;let s=Math.abs(r),c=document.querySelector(`[${ux}]`),u=s/E.value,d=_e(s,i);if(d!==null&&(u=d),a&&u>=1||!se.value&&!ye(e.target,i))return;if(b?.value?.classList.add(lx),se.value=!0,px(b.value,{transition:`none`}),px(v.value,{transition:`none`}),ue.value&&he({draggedDistance:r}),i&&!ue.value){let e=gx(r),t=Math.min(e*-1,0)*n;px(b.value,{transform:_x(h.value)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`});return}let f=1-u;if((ge.value||m.value&&fe.value===m.value-1)&&(t(u),px(v.value,{opacity:`${f}`,transition:`none`},!0)),c&&v.value&&l.value){let e=Math.min(ve()+u*(1-ve()),1),t=8-u*8,n=Math.max(0,14-u*14);px(c,{borderRadius:`${t}px`,transform:_x(h.value)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!ue.value){let e=s*n;px(b.value,{transform:_x(h.value)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}function Se(){if(!b.value)return;let e=document.querySelector(`[${ux}]`),t=hx(b.value,h.value);px(b.value,{transform:`translate3d(0, 0, 0)`,transition:`transform ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`}),px(v.value,{transition:`opacity ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`,opacity:`1`}),l.value&&t&&t>0&&w.value&&px(e,{borderRadius:`8px`,overflow:`hidden`,..._x(h.value)?{transform:`scale(${ve()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${ve()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${dx.DURATION}s`,transitionTimingFunction:`cubic-bezier(${dx.EASE.join(`,`)})`},!0)}function Ce(e){b.value&&(r(),e||(w.value=!1),window.setTimeout(()=>{ue.value&&(p.value=ue.value[0])},dx.DURATION*1e3))}Gn(()=>{if(!w.value&&l.value&&Ef){let e=setTimeout(()=>{mx(document.body)},200);return()=>clearTimeout(e)}}),qn(a,()=>{w.value=a.value,a.value||Ce()});function we(e){if(!te.value||!b.value)return;b.value.classList.remove(lx),se.value=!1,te.value=!1,ae.value=new Date;let t=hx(b.value,h.value);if(!ye(e.target,!1)||!t||Number.isNaN(t)||ie.value===null)return;let r=ae.value.getTime()-ie.value.getTime(),i=ce.value-(_x(h.value)?e.clientY:e.clientX),a=Math.abs(i)/r;if(a>.05&&(ne.value=!0,window.setTimeout(()=>{ne.value=!1},200)),ue.value){pe({draggedDistance:i*(h.value===`bottom`||h.value===`right`?1:-1),closeDrawer:Ce,velocity:a,dismissible:o.value}),n(!0);return}if(h.value===`bottom`||h.value===`right`?i>0:i<0){Se(),n(!0);return}if(a>.4){Ce(),n(!1);return}if(t>=Math.min(b.value.getBoundingClientRect().height??0,window.innerHeight)*f.value){Ce(),n(!1);return}n(!0),Se()}qn(w,e=>{e&&(re.value=new Date),i(e)},{immediate:!0});function Te(e){let t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;T.value&&window.clearTimeout(T.value),px(b.value,{transition:`transform ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&b.value&&(T.value=window.setTimeout(()=>{let e=hx(b.value,h.value);px(b.value,{transition:`none`,transform:_x(h.value)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function O(e){if(e<0)return;let t=_x(h.value)?window.innerHeight:window.innerWidth,n=(t-16)/t,r=n+e*(1-n),i=-16+e*16;px(b.value,{transform:_x(h.value)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function Ee(e){let t=_x(h.value)?window.innerHeight:window.innerWidth,n=e?(t-16)/t:1,r=e?-16:0;e&&px(b.value,{transition:`transform ${dx.DURATION}s cubic-bezier(${dx.EASE.join(`,`)})`,transform:_x(h.value)?`scale(${n}) translate3d(0, ${r}px, 0)`:`scale(${n}) translate3d(${r}px, 0, 0)`})}return{open:a,isOpen:w,modal:c,keyboardIsOpen:le,hasBeenOpened:ee,drawerRef:b,setDrawerRef:x,drawerHeightRef:E,overlayRef:v,setOverlayRef:y,handleRef:S,setHandleRef:C,isDragging:te,dragStartTime:ie,isAllowedToDrag:se,snapPoints:ue,hasSnapPoints:de,activeSnapPoint:p,pointerStart:ce,dismissible:o,snapPointsOffset:me,direction:h,shouldFade:ge,fadeFromIndex:m,shouldScaleBackground:l,setBackgroundColorOnScale:u,onPress:be,onDrag:xe,onRelease:we,closeDrawer:Ce,onNestedDrag:O,onNestedRelease:Ee,onNestedOpenChange:Te,emitClose:r,emitDrag:t,emitRelease:n,emitOpenChange:i,nested:s,handleOnly:_,noBodyStyles:g}}var[qne,Jne]=z(`BottomSheet`,e=>(Nb(e),e));Jl({slots:{root:``,list:`flex flex-wrap items-center my-0 px-0 break-words text-muted-foreground`,item:`inline-flex items-center list-none`,page:`font-normal text-foreground`,separator:`text-muted-foreground flex-shrink-0 list-none`,ellipsis:`flex items-center justify-center`,link:`decoration-none hover:text-foreground transition-colors-200 rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`},variants:{size:{xs:{root:`text-2xs`,list:`gap-2`,item:`gap-1.5`},sm:{root:`text-xs`,list:`gap-2.5`,item:`gap-1.75`},md:{root:`text-sm`,list:`gap-3`,item:`gap-2`},lg:{root:`text-base`,list:`gap-3.5`,item:`gap-2.5`},xl:{root:`text-lg`,list:`gap-4`,item:`gap-3`},"2xl":{root:`text-xl`,list:`gap-4.5`,item:`gap-3.5`}}},defaultVariants:{size:`md`}});var[Yne,Xne]=z(`BreadcrumbUi`),[Zne,Qne]=R(`ButtonGroup`);Rl({base:`outline-none cursor-pointer decoration-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`}),Jl({slots:{trigger:[`flex items-center justify-between w-full rounded-md border border-input bg-background transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30 focus:ring-3 focus:ring-offset-background focus:ring-primary/30 disabled:pointer-events-none disabled:opacity-50`,`placeholder:text-muted-foreground data-[placeholder]:text-muted-foreground`],triggerIcon:`shrink-0 text-muted-foreground opacity-70`,value:`grow truncate text-start`,positioner:``,popup:[`relative z-50 min-w-32 rounded-md border bg-popover text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],viewport:``,group:``,groupLabel:`font-medium text-muted-foreground`,item:[`relative flex items-center w-full rounded-sm outline-none cursor-pointer select-none`,`focus:bg-accent focus:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemText:``,itemIndicator:`ms-auto shrink-0 text-muted-foreground`,separator:`-mx-1 my-1 h-px bg-muted`,scrollUpButton:`flex items-center justify-center cursor-default`,scrollDownButton:`flex items-center justify-center cursor-default`,arrow:`w-1em h-0.5em fill-popover stroke-border`},variants:{size:{xs:{popup:`max-h-70 text-2xs`,trigger:`gap-1 h-6 px-1.5 text-2xs`,viewport:`p-0.75`,item:`gap-1 px-1 py-1`,groupLabel:`p-1 text-3xs`,separator:`-mx-0.75 my-0.375`,scrollUpButton:`py-0.75`,scrollDownButton:`py-0.75`,arrow:`text-3xs`},sm:{popup:`max-h-75 text-xs`,trigger:`gap-1.5 h-7 px-2 text-xs`,viewport:`p-0.875`,item:`gap-1.5 px-1.5 py-1`,separator:`-mx-0.875 my-0.4375`,groupLabel:`p-1.25 text-2xs`,scrollUpButton:`py-0.875`,scrollDownButton:`py-0.875`,arrow:`text-2xs`},md:{popup:`max-h-80 text-sm`,trigger:`gap-2 h-8 px-2.5 text-sm`,viewport:`p-1`,item:`gap-2 px-2 py-1.5`,separator:`-mx-1 my-0.5`,groupLabel:`p-1.75 text-xs`,scrollUpButton:`py-1`,scrollDownButton:`py-1`,arrow:`text-xs`},lg:{popup:`max-h-90 text-base`,trigger:`gap-2.5 h-9 px-3 text-base`,viewport:`p-1.25`,item:`gap-2.5 px-2.5 py-1.5`,separator:`-mx-1.25 my-0.625`,groupLabel:`p-2 text-sm`,scrollUpButton:`py-1.25`,scrollDownButton:`py-1.25`,arrow:`text-sm`},xl:{popup:`max-h-100 text-lg`,trigger:`gap-3 h-10 px-3.5 text-lg`,viewport:`p-1.5`,item:`gap-3 px-3 py-2`,separator:`-mx-1.5 my-0.75`,groupLabel:`p-2.5 text-base`,scrollUpButton:`py-1.5`,scrollDownButton:`py-1.5`,arrow:`text-base`},"2xl":{popup:`max-h-115 text-xl`,trigger:`gap-3.5 h-12 px-4 text-xl`,viewport:`p-1.75`,item:`gap-3.5 px-3.5 py-2.5`,separator:`-mx-1.75 my-0.875`,groupLabel:`p-3 text-lg`,scrollUpButton:`py-1.75`,scrollDownButton:`py-1.75`,arrow:`text-lg`}},position:{popper:{popup:`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,viewport:`h-[--soybean-select-trigger-height] w-full min-w-[--soybean-select-trigger-width]`},"item-aligned":{}}},defaultVariants:{size:`md`,position:`popper`}});var[$ne,ere]=R(`SelectRoot`,e=>{let{open:t}=e,n=e=>{t.value=e},r=L(()=>iu(t.value)),i=Hm(e.dir),a=A(``),o=`soybean-select-content-${Er()}`,s=()=>{a.value||=o},c=A(),l=e=>{c.value=e},u=A(),d=e=>{u.value=e},f=k(new Set),p=L(()=>Array.from(f.value)),m=L(()=>p.value.map(e=>e.value).join(`;`)),h=e=>{f.value.add(e)},g=e=>{f.value.delete(e)},_=A({x:0,y:0}),v=e=>{_.value=e},y=()=>{_.value=null};return{...e,dataState:r,onOpenChange:n,dir:i,contentId:a,initContentId:s,triggerElement:c,onTriggerElementChange:l,valueElement:u,onValueElementChange:d,optionsSet:f,onOptionAdd:h,onOptionRemove:g,options:p,nativeSelectKey:m,triggerPointerDownPosition:_,setTriggerPointerDownPosition:v,resetTriggerPointerDownPosition:y}}),{provideCollectionContext:tre,useCollectionContext:nre,useCollectionItem:rre}=Xm(`Select`),[ire,are]=R(`SelectContent`,e=>{let{modelValue:t,isMultiple:n,popupElement:r}=e,i=A(!1),a=A(),o=e=>{a.value=e},s=!1,c=!1,l=A(),u=(e,n,r)=>{let i=!s&&!r;(cu(t.value,n)||i)&&(l.value=e)},d=A(),f=(e,r,i)=>{let a=!s&&!i,o=cu(t.value,r);if(n.value){if(c)return;(o||a)&&(d.value=e,o&&(c=!0))}else(o||a)&&(d.value=e);a&&(s=!0)},p=()=>{r.value?.focus()};function m(){!d.value||!r.value||pf([d.value,r.value])}return{...e,isPositioned:i,viewportElement:a,onViewportElementChange:o,selectedItemElement:d,onSelectedItemElementChange:f,onItemElementLeave:p,selectedItemTextElement:l,onSelectedItemTextElementChange:u,focusSelectedItem:m}}),[ore,sre]=R(`SelectGroup`,()=>{let e=A(``),t=`soybean-select-group-label-${Er()}`;return{labelId:e,initLabelId:()=>{e.value||=t}}}),[cre,lre]=R(`SelectItem`,e=>{let t=A(e.textValue.value??``),n=A(),r=e=>{n.value=e,t.value=((t.value||e?.textContent)??``).trim()},i=A(``),a=`soybean-select-item-text-${Er()}`,o=()=>{i.value||=a};return{...e,textId:i,initTextId:o,textValue:t,itemTextElement:n,onItemTextElementChange:r}}),[ure,dre]=R(`SelectPopupElement`,()=>{let e=A();return{popupElement:e,onPopupElementChange:t=>{e.value=t}}}),[fre,pre]=R(`SelectItemAlignedPosition`),[mre,hre]=z(`SelectUi`,e=>(bb(e),e));Jl({extendBase:e=>({prev:Ov({size:e.size,variant:`pure`}),next:Ov({size:e.size,variant:`pure`})}),slots:{root:`inline-flex flex-col rounded-md border shadow-sm`,header:`flex items-center justify-between`,heading:`flex items-center justify-center font-medium`,prev:`rtl:rotate-180`,next:`rtl:rotate-180`,grid:`inline-table border-collapse`,gridHead:``,gridBody:``,gridRow:``,headCell:`rounded-md text-center font-normal text-muted-foreground`,cell:[`flex-1 text-center align-middle`,`focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md [&:has([data-selected])]:bg-accent`],cellTrigger:[`inline-flex items-center justify-center w-full h-full rounded-md transition-colors cursor-pointer`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-ring focus-visible:ring-primary/30`,`data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:font-medium`,`[&:not([data-selected]):hover]:bg-accent [&:not([data-selected]):hover]:text-accent-foreground`,`data-[disabled]:cursor-not-allowed data-[disabled]:text-muted-foreground data-[disabled]:opacity-50`,`[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground`,`data-[unavailable]:line-through data-[outside-view]:text-muted-foreground`]},variants:{size:{xs:{root:`gap-3 text-2xs p-2`,header:`gap-1.5`,gridRow:`mt-1.5`,heading:`gap-1.5`,headCell:`h-6 w-6 text-3xs`,cell:`h-6 w-6`},sm:{root:`gap-3.5 text-xs p-2.5`,header:`gap-2`,gridRow:`mt-1.75`,heading:`gap-2`,headCell:`h-7 w-7 text-2xs`,cell:`h-7 w-7`},md:{root:`gap-4 text-sm p-3`,header:`gap-2.5`,gridRow:`mt-2`,heading:`gap-2.5`,headCell:`h-8 w-8 text-xs`,cell:`h-8 w-8`},lg:{root:`gap-4.5 text-base p-3.5`,header:`gap-3`,gridRow:`mt-2.25`,heading:`gap-3`,headCell:`h-9 w-9 text-sm`,cell:`h-9 w-9`},xl:{root:`gap-5 text-lg p-4`,header:`gap-3.5`,gridRow:`mt-2.5`,heading:`gap-3.5`,headCell:`h-10 w-10 text-base`,cell:`h-10 w-10`},"2xl":{root:`gap-6 text-xl p-5`,header:`gap-4`,gridRow:`mt-3`,heading:`gap-4`,headCell:`h-12 w-12 text-lg`,cell:`h-12 w-12`}}},defaultVariants:{size:`md`}});var[gre,_re]=R(`CalendarRoot`),[vre,yre]=z(`CalendarUi`),[bre,xre]=R(`CalendarRangeRoot`),[Sre,Cre]=z(`CalendarRangeUi`),[wre,Tre]=z(`CardUi`,e=>(_v(e),e)),[Ere,Dre]=R(`CarouselRoot`,e=>{let t=A(``),n=e=>{t.value=e};return{...e,contentId:t,setContentId:n}}),[Ore,kre]=z(`CarouselUi`);function bx(e){return typeof e==`number`}function xx(e){return typeof e==`string`}function Sx(e){return typeof e==`boolean`}function Cx(e){return Object.prototype.toString.call(e)===`[object Object]`}function wx(e){return Math.abs(e)}function Tx(e){return Math.sign(e)}function Ex(e,t){return wx(e-t)}function Dx(e,t){return e===0||t===0||wx(e)<=wx(t)?0:wx(Ex(wx(e),wx(t))/e)}function Ox(e){return Math.round(e*100)/100}function kx(e){return Px(e).map(Number)}function Ax(e){return e[jx(e)]}function jx(e){return Math.max(0,e.length-1)}function Mx(e,t){return t===jx(e)}function Nx(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function Px(e){return Object.keys(e)}function Fx(e,t){return[e,t].reduce((e,t)=>(Px(t).forEach(n=>{let r=e[n],i=t[n];e[n]=Cx(r)&&Cx(i)?Fx(r,i):i}),e),{})}function Ix(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function Lx(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return xx(e)?n[e](r):e(t,r,i)}return{measure:o}}function Rx(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function zx(e,t,n,r){let i=Rx(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function Bx(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function Vx(e=0,t=0){let n=wx(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function Hx(e,t,n){let{constrain:r}=Vx(0,e),i=e+1,a=o(t);function o(e){return n?wx((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return Hx(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function Ux(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=Rx(),w=Rx(),ee=Vx(50,225).constrain(p.measure(20)),te={mouse:300,touch:400},ne={mouse:500,touch:600},re=m?43:25,ie=!1,ae=0,oe=0,se=!1,T=!1,ce=!1,le=!1;function E(e){if(!v)return;function n(t){(Sx(v)||v(e,t))&&he(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,_e).add(r,`contextmenu`,_e).add(r,`click`,D,!0)}function ue(){C.clear(),w.clear()}function de(){let e=le?n:t;w.add(e,`touchmove`,ge,S).add(e,`touchend`,_e).add(e,`mousemove`,ge,S).add(e,`mouseup`,_e)}function fe(e){let t=e.nodeName||``;return x.includes(t)}function pe(){return(m?ne:te)[le?`mouse`:`touch`]}function me(e,t){let n=d.add(Tx(e)*-1),r=u.byDistance(e,!m).distance;return m||wx(e)<ee?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function he(e){let t=Ix(e,r);le=t,ce=m&&t&&!e.buttons&&ie,ie=Ex(i.get(),o.get())>=2,!(t&&e.button!==0)&&(fe(e.target)||(se=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),de(),ae=a.readPoint(e),oe=a.readPoint(e,y),f.emit(`pointerDown`)))}function ge(e){if(!Ix(e,r)&&e.touches.length>=2)return _e(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=Ex(t,ae),c=Ex(n,oe);if(!T&&!le&&(!e.cancelable||(T=o>c,!T)))return _e(e);let u=a.pointerMove(e);o>h&&(ce=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function _e(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*pe(),r=me(b(n),t),i=Dx(n,r),o=re-10*i,s=_+i/50;T=!1,se=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),le=!1,f.emit(`pointerUp`)}function D(e){ce&&=(e.stopPropagation(),e.preventDefault(),!1)}function ve(){return se}return{init:E,destroy:ue,pointerDown:ve}}function Wx(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(Ix(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&wx(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function Gx(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function Kx(e){function t(t){return t/100*e}return{measure:t}}function qx(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(wx(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(Sx(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Jx(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=Tx(a),d=u,x}function p(){return wx(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function Yx(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=Vx(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=wx(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&wx(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Xx(e,t,n,r,i){let a=Vx(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return Ex(e,t)<=1}function u(){let e=o[0],t=Ax(o);return Vx(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=Mx(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Zx(e,t,n){let r=t[0];return{limit:Vx(n?r-e:Ax(t),r)}}function Qx(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=Vx(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1&&a(n.get())}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function $x(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function eS(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>Ax(e)[o]-e[0][a]).map(wx)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-wx(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function tS(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=Mx(n,t);return r?Nx(Ax(n[0])+1):i?Nx(jx(a)-Ax(n)[0]+1,Ax(n)[0]):e})}return{slideRegistry:l}}function nS(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>wx(e)-wx(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>wx(e.diff)-wx(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>Tx(e)===r);return a.length?c(a):Ax(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function rS(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function iS(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));bx(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(Sx(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function aS(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return bx(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function oS(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=Ox(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function sS(e,t,n,r,i,a,o,s,c){let l=.5,u=kx(i),d=kx(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:aS(-1),translate:oS(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){let e=t-o[0]-1;return g(m(u,e),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function cS(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(Sx(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function lS(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return Px(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function uS(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return wx(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(Ax(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=Mx(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(wx)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function dS(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=bx(n);function p(e,t){return kx(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?kx(e).reduce((n,f,p)=>{let m=Ax(n)||0,h=m===0,g=f===jx(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=wx(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function fS(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=Gx(),w=C.measure(t),ee=n.map(C.measure),te=Bx(c,l),ne=te.measureSize(w),re=Kx(ne),ie=Lx(s,ne),ae=!d&&!!v,{slideSizes:oe,slideSizesWithGaps:se,startGap:T,endGap:ce}=uS(te,w,ee,n,d||!!v,i),le=dS(te,ne,g,d,w,ee,T,ce,2),{snaps:E,snapsAligned:ue}=eS(te,ie,w,ee,le),de=-Ax(E)+Ax(se),{snapsContained:fe,scrollContainLimit:pe}=Xx(ne,de,ue,v,2),me=ae?fe:ue,{limit:he}=Zx(de,me,d),ge=Hx(jx(me),u,d),_e=ge.clone(),D=kx(n),ve=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ye=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},be=zx(r,i,()=>ve(Pe),e=>ye(Pe,e)),xe=.68,Se=me[ge.get()],Ce=aS(Se),we=aS(Se),Te=aS(Se),O=aS(Se),Ee=Jx(Ce,Te,we,O,f,xe),De=nS(d,me,de,he,O),Oe=rS(be,ge,_e,Ee,De,O,o),ke=$x(he),Ae=Rx(),je=lS(t,n,o,h),{slideRegistry:Me}=tS(ae,v,me,pe,le,D),Ne=iS(e,n,Me,Oe,Ee,Ae,o,S),Pe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:ee,animation:be,axis:te,dragHandler:Ux(te,e,r,i,O,Wx(te,i),Ce,be,Oe,Ee,De,ge,o,re,p,m,_,xe,x),eventStore:Ae,percentOfView:re,index:ge,indexPrevious:_e,limit:he,location:Ce,offsetLocation:Te,previousLocation:we,options:a,resizeHandler:qx(t,o,i,n,te,y,C),scrollBody:Ee,scrollBounds:Yx(he,Te,O,Ee,re),scrollLooper:Qx(de,he,Te,[Ce,Te,we,O]),scrollProgress:ke,scrollSnapList:me.map(ke.get),scrollSnaps:me,scrollTarget:De,scrollTo:Oe,slideLooper:sS(te,ne,de,oe,se,E,me,Te,n),slideFocus:Ne,slidesHandler:cS(t,o,b),slidesInView:je,slideIndexes:D,slideRegistry:Me,slidesToScroll:le,target:O,translate:oS(te,t)};return Pe}function pS(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var mS={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function hS(e){function t(e,t){return Fx(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,Px(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>Px(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function gS(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function _S(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=hS(i),o=gS(a),s=Rx(),c=pS(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=ne,g=!1,_,v=l(mS,_S.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(xx(t)?e.querySelector(t):t)||e.children[0];let r=xx(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function ee(t){let n=fS(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?ee(Object.assign({},t,{loop:!1})):n}function te(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=ee(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,ne)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(ve),_.eventHandler.init(ve),_.resizeHandler.init(ve),_.slidesHandler.init(ve),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(ve),x=o.init(ve,b)))}function ne(e,t){let n=ue();re(),te(l({startIndex:n},e),t),c.emit(`reInit`)}function re(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function ie(){g||(g=!0,s.clear(),re(),c.emit(`destroy`),c.clear())}function ae(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function oe(e){ae(_.index.add(1).get(),e,-1)}function se(e){ae(_.index.add(-1).get(),e,1)}function T(){return _.index.add(1).get()!==ue()}function ce(){return _.index.add(-1).get()!==ue()}function le(){return _.scrollSnapList}function E(){return _.scrollProgress.get(_.offsetLocation.get())}function ue(){return _.index.get()}function de(){return _.indexPrevious.get()}function fe(){return _.slidesInView.get()}function pe(){return _.slidesInView.get(!1)}function me(){return x}function he(){return _}function ge(){return e}function _e(){return S}function D(){return C}let ve={canScrollNext:T,canScrollPrev:ce,containerNode:_e,internalEngine:he,destroy:ie,off:p,on:f,emit:m,plugins:me,previousScrollSnap:de,reInit:h,rootNode:ge,scrollNext:oe,scrollPrev:se,scrollProgress:E,scrollSnapList:le,scrollTo:ae,selectedScrollSnap:ue,slideNodes:D,slidesInView:fe,slidesNotInView:pe};return te(t,n),setTimeout(()=>c.emit(`init`),0),ve}_S.globalOptions=void 0;function vS(e){return Object.prototype.toString.call(e)===`[object Object]`}function yS(e){return vS(e)||Array.isArray(e)}function bS(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!yS(r)||!yS(i)?r===i:bS(r,i)})}var[Are,jre]=R(`CheckboxGroupRoot`,e=>e),[Mre,Nre]=R(`CheckboxRoot`,e=>{let{modelValue:t,state:n}=e,r=L(()=>nu(n.value)?`mixed`:n.value),i=L(()=>e.disabled.value?``:void 0),a=L(()=>ru(n.value)),o=A(``),s=e=>{o.value=e};return{...e,modelValue:t,state:n,ariaChecked:r,dataDisabled:i,dataState:a,controlId:o,initControlId:s}}),[xS,Pre]=z(`CheckboxUi`),[Fre,Ire]=z(`CheckboxCardUi`,e=>(xS(e),e)),SS={bubbles:!1,cancelable:!0},{provideCollectionContext:CS,useCollectionContext:Lre,useCollectionItem:Rre}=Xm(`RovingFocusGroup`),[zre,Bre]=R(`RovingFocusGroup`,e=>{let{onContainerElementChange:t,getOrderedItems:n,getOrderedElements:r}=CS(),{loop:i,orientation:a,defaultCurrentTabStopId:o,preventScrollOnEntryFocus:s,onEntryFocus:c,onUpdateCurrentTabStopId:l}=e,u=Hm(e.dir),d=Zm(()=>e.currentTabStopId.value,l,o.value??``),f=e=>{d.value=e},p=A(!1),m=A(!1),h=()=>{p.value=!0},g=A(0);return{onContainerElementChange:t,loop:i,dir:u,orientation:a,currentTabStopId:d,onItemFocus:f,onItemShiftTab:h,onFocusableItemAdd:()=>{g.value++},onFocusableItemRemove:()=>{g.value--},rovingFocusGroupProps:L(()=>({tabindex:p.value||g.value===0?`-1`:`0`,"data-orientation":a.value,dir:u.value,"data-loop":i.value?``:void 0,style:`outline: none`})),rovingFocusGroupListeners:{mousedown:()=>{m.value=!0},mouseup:()=>{setTimeout(()=>{m.value=!1},1)},focus:e=>{let t=!m.value;if(!e.currentTarget||e.target!==e.currentTarget||!t||p.value){m.value=!1;return}let n=new CustomEvent(`rovingFocusGroup.onEntryFocus`,SS);if(e.currentTarget.dispatchEvent(n),c?.(n),n.defaultPrevented)return;let i=r();pf([i.find(e=>cf(e,`active`)),i.find(e=>cf(e,`highlighted`)),i.find(e=>e.id===d.value),...i].filter(Boolean),s.value)},blur:()=>{p.value=!1}},getOrderedItems:n}}),[Vre,Hre]=R(`ColorAreaRoot`),[Ure,Wre]=z(`ColorAreaUi`),[Gre,Kre]=R(`ColorFieldRoot`),[qre,Jre]=z(`ColorFieldUi`),[Yre,Xre]=R(`SliderRoot`),[Zre,Qre]=z(`SliderUi`),[$re,eie]=R(`ColorSliderRoot`),[tie,nie]=z(`ColorSliderUi`),[wS,rie]=z(`ColorSwatch`),[iie,aie]=R(`ColorSwatchPickerItem`),[oie,sie]=z(`ColorSwatchPickerUi`,e=>{let t=L(()=>({content:e.value.root,item:e.value.item,itemIndicator:e.value.itemIndicator})),n=L(()=>({root:e.value.swatchRoot,checker:e.value.swatchChecker,fill:e.value.swatchFill}));return yb(t),wS(n),e}),[cie,lie]=R(`PopoverRoot`,e=>{let{open:t}=e,n=e=>{t.value=e},r=()=>{t.value=!t.value},i=L(()=>iu(t.value)),a=A(),o=e=>{a.value=e},s=A(``),c=`soybean-popover-trigger-${Er()}`,l=()=>{s.value||=c},u=A(),d=e=>{u.value=e},f=A(``),p=`soybean-popover-popup-${Er()}`,m=()=>{f.value||=p},h=A(!1);return{...e,onOpenChange:n,onOpenToggle:r,dataState:i,triggerElement:a,onTriggerElementChange:o,triggerId:s,initTriggerId:l,popupElement:u,onPopupElementChange:d,popupId:f,initPopupId:m,hasCustomAnchor:h}}),[TS,uie]=z(`Popover`,e=>(bb(e),e)),[die,fie]=R(`TabsRoot`,e=>{let t=Hm(e.dir),n=A(),r=e=>{n.value=e},i=t=>{Ql(t)||(e.modelValue.value=t)},a=k([]),o=e=>{a.value.push(e)},s=e=>{let t=a.value.indexOf(e);t!==-1&&a.value.splice(t,1)},c=e=>{let t=tn(e),n=L(()=>`soybean-tabs-content-${t}`);return{contentId:n,triggerId:L(()=>`soybean-tabs-trigger-${t}`),existContentId:L(()=>a.value.includes(n.value))}};return{...e,dir:t,changeModelValue:i,listElement:n,onListElementChange:r,getId:c,registerContentId:o,unregisterContentId:s}}),[pie,mie]=z(`TabsUi`),[hie,gie]=R(`ColorPickerRootContext`),[_ie,vie]=z(`ColorPickerUi`);[`hex`,`rgb`,`hsl`,`oklch`].map(e=>({value:e,label:e.toUpperCase()}));var[ES,yie]=z(`SeparatorUi`),[bie,xie]=z(`CommandUi`,e=>(yb(L(()=>({root:e.value?.root,content:e.value?.list,filterRoot:e.value?.inputRoot,filterControl:e.value?.inputControl,item:e.value?.item,itemIndicator:``,group:e.value?.group,groupLabel:e.value?.groupLabel,virtualizer:``}))),e)),DS=Tr({name:`ConfigProvider`,__name:`config-provider`,props:{dir:{},locale:{default:`en`},nonce:{default:void 0},tooltip:{},iconRender:{},messages:{}},setup(e){let t=e,n=L(()=>t.dir??zm(t.locale));return Bm({...Tf(t),dir:n,iconRender:t.iconRender}),$_(`
|
|
19
|
+
.soybean-headless-scrollbar-hidden {
|
|
20
|
+
scrollbar-width: none;
|
|
21
|
+
-ms-overflow-style: none;
|
|
22
|
+
-webkit-overflow-scrolling: touch;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.soybean-headless-scrollbar-hidden::-webkit-scrollbar {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.soybean-headless-overflow-y-hidden {
|
|
30
|
+
overflow-y: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.soybean-headless-transition-all-150 {
|
|
34
|
+
transition: all 150ms ease-in-out;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.soybean-headless-opacity-0 {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.soybean-headless-scale-0 {
|
|
42
|
+
transform: scale(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.soybean-headless-sr-only {
|
|
46
|
+
position: absolute;
|
|
47
|
+
width: 1px;
|
|
48
|
+
height: 1px;
|
|
49
|
+
padding: 0;
|
|
50
|
+
margin: -1px;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
clip: rect(0, 0, 0, 0);
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
border-width: 0;
|
|
55
|
+
}
|
|
56
|
+
`,{id:`__SoybeanHeadless_Styles`}),(e,t)=>$r(e.$slots,`default`)}}),[Sie,Cie]=R(`Menu`,e=>{let{isRoot:t,open:n}=e,r=e=>{n.value=e},i=L(()=>iu(n.value)),a=t?`data-soybean-menu-popup`:`data-soybean-menu-sub-popup`,o=A(),s=e=>{o.value=e},c=A(),l=e=>{c.value=e},u=t?`soybean-menu`:`soybean-menu-sub`,d=A(``),f=`${u}-popup-${Er()}`,p=()=>{d.value||=f},m=A(``),h=`${u}-trigger-${Er()}`,g=()=>{m.value||=h};return{...e,onOpenChange:r,dataState:i,dataPopupAttr:a,popupElement:o,onPopupElementChange:s,triggerElement:c,onTriggerElementChange:l,popupId:d,initPopupId:p,triggerId:m,initTriggerId:g}}),[wie,Tie]=R(`MenuRoot`),[Eie,Die]=R(`MenuContent`,e=>{let{popupElement:t}=e,n=A(``),r=k(null),i=A(0),a=A(`right`),o=k(null),s=e=>{o.value=e},c=()=>{o.value=null},l=e=>{let t=a.value===o.value?.side,n=jf(e,o.value?.area);return t&&n};return{searchRef:n,currentItemId:r,popupElement:t,pointerSide:a,pointerGraceTimer:i,pointerGraceIntent:o,onPointerGraceIntentChange:s,resetPointerGraceIntent:c,onItemEnter:l,onItemLeave:e=>{l(e)||(t.value?.focus(),r.value=null)},onTriggerLeave:l}}),[Oie,kie]=R(`MenuCheckboxGroup`,e=>{let{modelValue:t}=e,n=e=>{t.value||=[],t.value.includes(e)?t.value=t.value.filter(t=>t!==e):t.value.push(e)};return{...e,onModelValueChange:n}}),[Aie,jie]=R(`MenuRadioGroup`,e=>{let{modelValue:t}=e,n=e=>{t.value=e};return{...e,onModelValueChange:n}}),[Mie,Nie]=R(`MenuItemIndicator`),[Pie,Fie]=R(`MenuOptionsCompact`),[OS,Iie]=z(`MenuUi`,e=>(bb(L(()=>({arrow:e.value?.arrow}))),ES(L(()=>({root:e.value?.separator}))),e)),[Lie,Rie]=R(`MenuSubAttribute`),kS=[`ArrowDown`,`PageUp`,`Home`],AS=[`ArrowUp`,`PageDown`,`End`];[...kS,...AS],[...df],[...df];var[zie,Bie]=R(`ContextMenuRoot`,e=>{let{open:t}=e,n=e=>{t.value=e},r=Hm(e.dir),i=L(()=>iu(t.value)),a=A(null),o=e=>{a.value=e};return{...e,dir:r,dataState:i,onOpenChange:n,triggerElement:a,onTriggerElementChange:o}}),[Vie,Hie]=R(`DateFieldRoot`),[jS,Uie]=z(`DateFieldUi`),[Wie,Gie]=z(`DatePickerUi`,e=>(TS(e),jS(e),e)),[Kie,qie]=R(`DateRangeFieldRoot`),[MS,Jie]=z(`DateRangeFieldUi`),[Yie,Xie]=z(`DateRangePickerUi`,e=>(TS(e),MS(e),e)),NS=`dropdown-menu.hover-open`,[Zie,Qie]=R(`DropdownMenuRoot`,e=>{let{open:t}=e,n=e=>{t.value=e},r=()=>{t.value=!t.value},i=Hm(e.dir),a=L(()=>iu(t.value));return{...e,dir:i,dataState:a,onOpenChange:n,onOpenToggle:r}}),[$ie,eae]=R(`DropdownMenuHover`,e=>{let{open:t,hoverable:n,delayDuration:r,skipDelayDuration:i}=e,a=A(!0),o=null,s=()=>{o&&=(clearTimeout(o),null)},c=()=>{s(),o=setTimeout(()=>{a.value=!0},i.value)},l=()=>{s(),a.value=!1},u=A(!1),d=A(!1),f=null,p=()=>{f&&=(clearTimeout(f),null)},m=()=>{p(),f=setTimeout(()=>{d.value=!0,t.value=!0},r.value)},h=()=>{p(),d.value=!1,t.value=!0},g=()=>{p(),t.value=!1},_=()=>{m()},v=()=>{a.value?_():h()},y=()=>{p()};return Gn(()=>{n.value&&(t.value?(l(),document.dispatchEvent(new CustomEvent(NS))):c())}),{...e,isOpenDelayed:a,isPointerInTransitRef:u,onOpen:h,onClose:g,onTriggerEnter:v,onTriggerLeave:y}}),[tae,nae]=R(`EditableRoot`,e=>{let{isEditing:t,disabled:n,readonly:r}=e,i=Hm(()=>e.dir.value),[a,o]=Gm(),s=L(()=>n.value?``:void 0),c=L(()=>r.value?``:void 0),l=L(()=>t.value?`edit`:`preview`);return{...e,dir:i,inputElement:a,setInputElement:o,dataDisabled:s,dataReadonly:c,dataState:l}}),[rae,iae]=z(`EditableUi`),[aae,oae]=z(`EmptyUi`),[sae,cae]=R(`FormField`,e=>{let{error:t}=e,n=Er(),r=`form-field-${n}`,i=`form-field-description-${n}`,a=`form-field-error-${n}`;return{formFieldId:r,formDescriptionId:i,formErrorId:a,ariaDescribedBy:L(()=>t.value?`${i} ${a}`:i),ariaInvalid:L(()=>!!t.value)}}),[lae,uae]=R(`FormCompact`),[dae,fae]=z(`FormUi`),[pae,mae]=z(`FormFieldUi`),PS=new Set,FS=new WeakMap,IS=new WeakMap,LS=new WeakMap,RS=new WeakMap,zS=new WeakMap,BS=new WeakMap,VS=new WeakSet,HS,US=0,WS=0,GS=`__aa_tgt`,KS=`__aa_del`,qS=`__aa_new`,JS=e=>{let t=nC(e);t&&t.forEach(e=>iC(e))},YS=e=>{e.forEach(e=>{e.target===HS&&$S(),FS.has(e.target)&&QS(e.target)})};function XS(e){let t=e.getBoundingClientRect(),n=HS?.clientWidth||0,r=HS?.clientHeight||0;return t.bottom<0||t.top>r||t.right<0||t.left>n}function ZS(e){RS.get(e)?.disconnect();let t=FS.get(e),n=0;t||(t=sC(e),FS.set(e,t));let{offsetWidth:r,offsetHeight:i}=HS,a=[t.top-5,r-(t.left+5+t.width),i-(t.top+5+t.height),t.left-5].map(e=>`${-1*Math.floor(e)}px`).join(` `),o=new IntersectionObserver(()=>{++n>1&&QS(e)},{root:HS,threshold:1,rootMargin:a});o.observe(e),RS.set(e,o)}function QS(e,t=!0){clearTimeout(BS.get(e));let n=lC(e),r=t?mC(n)?500:n.duration:0;BS.set(e,setTimeout(async()=>{let t=LS.get(e);try{await t?.finished,FS.set(e,sC(e)),ZS(e)}catch{}},r))}function $S(){clearTimeout(BS.get(HS)),BS.set(HS,setTimeout(()=>{PS.forEach(e=>fC(e,e=>eC(()=>QS(e))))},100))}function eC(e){typeof requestIdleCallback==`function`?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}var tC;typeof window<`u`&&`ResizeObserver`in window&&(HS=document.documentElement,new MutationObserver(JS),tC=new ResizeObserver(YS),window.addEventListener(`scroll`,()=>{WS=window.scrollY,US=window.scrollX}),tC.observe(HS));function nC(e){return!e.reduce((e,t)=>[...e,...Array.from(t.addedNodes),...Array.from(t.removedNodes)],[]).every(e=>e.nodeName===`#comment`)&&e.reduce((e,t)=>{if(e===!1)return!1;if(t.target instanceof Element){if(rC(t.target),!e.has(t.target)){e.add(t.target);for(let n=0;n<t.target.children.length;n++){let r=t.target.children.item(n);if(r){if(KS in r)return!1;rC(t.target,r),e.add(r)}}}if(t.removedNodes.length)for(let n=0;n<t.removedNodes.length;n++){let r=t.removedNodes[n];if(KS in r)return!1;r instanceof Element&&(e.add(r),rC(t.target,r),IS.set(r,[t.previousSibling,t.nextSibling]))}}return e},new Set)}function rC(e,t){!t&&!(GS in e)?Object.defineProperty(e,GS,{value:e}):t&&!(GS in t)&&Object.defineProperty(t,GS,{value:e})}function iC(e){var t;let n=e.isConnected,r=FS.has(e);n&&IS.has(e)&&IS.delete(e),LS.get(e)?.playState!==`finished`&&((t=LS.get(e))==null||t.cancel()),qS in e?gC(e):r&&n?hC(e):r&&!n?vC(e):gC(e)}function aC(e){return Number(e.replace(/[^0-9.\-]/g,``))}function oC(e){let t=e.parentElement;for(;t;){if(t.scrollLeft||t.scrollTop)return{x:t.scrollLeft,y:t.scrollTop};t=t.parentElement}return{x:0,y:0}}function sC(e){let t=e.getBoundingClientRect(),{x:n,y:r}=oC(e);return{top:t.top+r,left:t.left+n,width:t.width,height:t.height}}function cC(e,t,n){let r=t.width,i=t.height,a=n.width,o=n.height,s=getComputedStyle(e);if(s.getPropertyValue(`box-sizing`)===`content-box`){let e=aC(s.paddingTop)+aC(s.paddingBottom)+aC(s.borderTopWidth)+aC(s.borderBottomWidth),t=aC(s.paddingLeft)+aC(s.paddingRight)+aC(s.borderRightWidth)+aC(s.borderLeftWidth);r-=t,a-=t,i-=e,o-=e}return[r,a,i,o].map(Math.round)}function lC(e){return GS in e&&zS.has(e[GS])?zS.get(e[GS]):{duration:250,easing:`ease-in-out`}}function uC(e){if(GS in e)return e[GS]}function dC(e){let t=uC(e);return t?VS.has(t):!1}function fC(e,...t){t.forEach(t=>t(e,zS.has(e)));for(let n=0;n<e.children.length;n++){let r=e.children.item(n);r&&t.forEach(e=>e(r,zS.has(r)))}}function pC(e){return Array.isArray(e)?e:[e]}function mC(e){return typeof e==`function`}function hC(e){let t=FS.get(e),n=sC(e);if(!dC(e))return FS.set(e,n);if(XS(e)){FS.set(e,n),ZS(e);return}let r;if(!t)return;let i=lC(e);if(typeof i!=`function`){let a=t.left-n.left,o=t.top-n.top,s=t.left+t.width-(n.left+n.width);t.top+t.height-(n.top+n.height)==0&&(o=0),s==0&&(a=0);let[c,l,u,d]=cC(e,t,n),f={transform:`translate(${a}px, ${o}px)`},p={transform:`translate(0, 0)`};c!==l&&(f.width=`${c}px`,p.width=`${l}px`),u!==d&&(f.height=`${u}px`,p.height=`${d}px`),r=e.animate([f,p],{duration:i.duration,easing:i.easing})}else{let[a]=pC(i(e,`remain`,t,n));r=new Animation(a),r.play()}LS.set(e,r),FS.set(e,n),r.addEventListener(`finish`,QS.bind(null,e,!1),{once:!0})}function gC(e){qS in e&&delete e[qS];let t=sC(e);FS.set(e,t);let n=lC(e);if(!dC(e))return;if(XS(e)){ZS(e);return}let r;if(typeof n!=`function`)r=e.animate([{transform:`scale(.98)`,opacity:0},{transform:`scale(0.98)`,opacity:0,offset:.5},{transform:`scale(1)`,opacity:1}],{duration:n.duration*1.5,easing:`ease-in`});else{let[i]=pC(n(e,`add`,t));r=new Animation(i),r.play()}LS.set(e,r),r.addEventListener(`finish`,QS.bind(null,e,!1),{once:!0})}function _C(e,t){var n;e.remove(),FS.delete(e),IS.delete(e),LS.delete(e),(n=RS.get(e))==null||n.disconnect(),setTimeout(()=>{if(KS in e&&delete e[KS],Object.defineProperty(e,qS,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(let n in t)e.style[n]=``},0)}function vC(e){var t;if(!IS.has(e)||!FS.has(e))return;let[n,r]=IS.get(e);Object.defineProperty(e,KS,{value:!0,configurable:!0});let i=window.scrollX,a=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=uC(e))==null||t.appendChild(e),!dC(e))return _C(e);let[o,s,c,l]=bC(e),u=lC(e),d=FS.get(e);(i!==US||a!==WS)&&yC(e,i,a,u);let f,p={position:`absolute`,top:`${o}px`,left:`${s}px`,width:`${c}px`,height:`${l}px`,margin:`0`,pointerEvents:`none`,transformOrigin:`center`,zIndex:`100`};if(!mC(u))Object.assign(e.style,p),f=e.animate([{transform:`scale(1)`,opacity:1},{transform:`scale(.98)`,opacity:0}],{duration:u.duration,easing:`ease-out`});else{let[t,n]=pC(u(e,`remove`,d));n?.styleReset!==!1&&(p=n?.styleReset||p,Object.assign(e.style,p)),f=new Animation(t),f.play()}LS.set(e,f),f.addEventListener(`finish`,()=>_C(e,p),{once:!0})}function yC(e,t,n,r){let i=US-t,a=WS-n,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(HS).scrollBehavior===`smooth`&&(document.documentElement.style.scrollBehavior=`auto`),window.scrollTo(window.scrollX+i,window.scrollY+a),!e.parentElement)return;let s=e.parentElement,c=s.clientHeight,l=s.clientWidth,u=performance.now();function d(){requestAnimationFrame(()=>{if(!mC(r)){let e=c-s.clientHeight,t=l-s.clientWidth;u+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-t,top:window.scrollY-e}),c=s.clientHeight,l=s.clientWidth,d()):document.documentElement.style.scrollBehavior=o}})}d()}function bC(e){let t=FS.get(e),[n,,r]=cC(e,t,sC(e)),i=e.parentElement;for(;i&&(getComputedStyle(i).position===`static`||i instanceof HTMLBodyElement);)i=i.parentElement;i||=document.body;let a=getComputedStyle(i),o=!LS.has(e)||LS.get(e)?.playState===`finished`?sC(i):FS.get(i);return[Math.round(t.top-o.top)-aC(a.borderTopWidth),Math.round(t.left-o.left)-aC(a.borderLeftWidth),n,r]}var[hae,gae]=R(`HoverCardRoot`,e=>{let{open:t,openDelay:n,closeDelay:r}=e,i=L(()=>iu(t.value)),a=A(),o=e=>{a.value=e},s=A(),c=e=>{s.value=e},l=A(!1),u=A(!1),d=A(!1),f=null,p=null,m=()=>{f&&=(clearTimeout(f),null)},h=()=>{p&&=(clearTimeout(p),null)},g=()=>{h(),m(),f=setTimeout(()=>{t.value=!0},n.value)},_=()=>{m(),h(),!(l.value||u.value)&&(p=setTimeout(()=>{t.value=!1},r.value))},v=()=>{m(),h(),t.value=!1};return{...e,dataState:i,triggerElement:a,onTriggerElementChange:o,popupElement:s,onPopupElementChange:c,hasSelectionRef:l,isPointerDownOnPopupRef:u,isPointerInTransitRef:d,onOpen:g,onClose:_,onDismiss:v}});function xC(e,t,n){if(Ql(t)||Ql(n))return 0;let r=t,i=n,a=e===`+`?r+i:r-i;if(r%1!=0||i%1!=0){let t=r.toString().split(`.`),n=i.toString().split(`.`),o=t[1]&&t[1].length||0,s=n[1]&&n[1].length||0,c=10**Math.max(o,s);r=Math.round(r*c),i=Math.round(i*c),a=e===`+`?r+i:r-i,a/=c}return a}var SC=new Map,CC=!1;try{CC=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var wC=!1;try{wC=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var TC={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},EC=class{constructor(e,t={}){this.numberFormatter=DC(e,t),this.options=t}format(e){let t=``;if(t=!CC&&this.options.signDisplay!=null?_ae(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!wC){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=TC[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!CC&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!wC&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}};function DC(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!wC){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!TC[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(SC.has(r))return SC.get(r);let i=new Intl.NumberFormat(e,t);return SC.set(r,i),i}function _ae(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}var OC=RegExp(`^.*\\(.*\\).*$`),kC=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],AC=class{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return MC(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return MC(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return MC(this.locale,this.options,e).options.numberingSystem}},jC=new Map;function MC(e,t,n){let r=NC(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of kC)if(i!==r.options.numberingSystem){let r=NC(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function NC(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=jC.get(n);return r||(r=new PC(e,t),jC.set(n,r)),r}var PC=class{constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=LC(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}parse(e){let t=this.formatter.resolvedOptions().useGrouping,n=this.sanitize(e);if(!t&&this.symbols.group&&n.includes(this.symbols.group))return NaN;if(this.symbols.group&&(n=n.replaceAll(this.symbols.group,``)),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,`-`)),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=n.indexOf(`-`);n=n.replace(`-`,``),n=n.replace(`+`,``);let t=n.indexOf(`.`);t===-1&&(t=n.length),n=n.replace(`.`,``),n=t-2==0?`0.${n}`:t-2==-1?`0.0${n}`:t-2==-2?`0.00`:`${n.slice(0,t-2)}.${n.slice(t-2)}`,e>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new AC(this.locale,e).parse(new EC(this.locale,e).format(r))}return this.options.currencySign===`accounting`&&OC.test(e)&&(r=-1*r),r}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=RC(e,`,`,this.symbols.decimal),e=RC(e,`،`,this.symbols.decimal)),this.symbols.group&&t&&(e=RC(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&t&&(e=RC(e,`'`,this.symbols.group)),this.symbols.group===`'`&&e.includes(`’`)&&t&&(e=RC(e,`’`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&t&&(e=RC(e,` `,this.symbols.group),e=RC(e,/\u00A0/g,this.symbols.group)),e)}isValidPartialNumber(e,t=-1/0,n=1/0){let r=this.formatter.resolvedOptions().useGrouping;return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&r&&(e=RC(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}},FC=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),IC=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function LC(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`,useGrouping:!0}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=IC.map(e=>i.formatToParts(e)),c=s.map((e,t)=>{let n=e.find(e=>e.type===`unit`);return n&&!e.some(e=>e.type===`integer`||e.type===`fraction`)?{unit:n.value,value:IC[t]}:null}).filter(e=>!!e),l=a.find(e=>e.type===`minusSign`)?.value??`-`,u=o.find(e=>e.type===`plusSign`)?.value;!u&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(u=`+`);let d=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,f=a.find(e=>e.type===`group`)?.value,p=a.filter(e=>!FC.has(e.type)).map(e=>zC(e.value)),m=s.flatMap(e=>e.filter(e=>!FC.has(e.type)).map(e=>zC(e.value))),h=[...new Set([...p,...m])].sort((e,t)=>t.length-e.length),g=h.length===0?RegExp(`\\p{White_Space}|\\p{Cf}`,`gu`):RegExp(`${h.join(`|`)}|\\p{White_Space}|\\p{Cf}`,`gu`),_=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),v=new Map(_.map((e,t)=>[e,t])),y=RegExp(`[${_.join(``)}]`,`g`);return{minusSign:l,plusSign:u,decimal:d,group:f,literals:g,numeral:y,numerals:_,index:e=>String(v.get(e)),noNumeralUnits:c}}function RC(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function zC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var[vae,yae]=R(`InputNumberRoot`,e=>{let{disabled:t,readonly:n,modelValue:r,focusOnChange:i,formatOptions:a,min:o,max:s,step:c,stepSnapping:l}=e,[u,d]=Gm(),f=Um(e.locale),p=R_(()=>new AC(f.value,a.value)),m=R_(()=>new EC(f.value,a.value)),h=L(()=>m.resolvedOptions().maximumFractionDigits>0?`decimal`:`numeric`),g=L(()=>Ql(r.value)?!1:x(r.value)===o.value||o.value&&!Number.isNaN(r.value)?xC(`-`,r.value,c.value)<Number(o.value):!1),_=L(()=>Ql(r.value)?!1:x(r.value)===s.value||s.value&&!Number.isNaN(r.value)?xC(`+`,r.value,c.value)>Number(s.value):!1),v=R_(()=>new EC(f.value,a.value)),y=L(()=>Ql(r.value)||Number.isNaN(r.value)?``:v.format(r.value));function b(e){return p.isValidPartialNumber(e,o.value,s.value)}function x(e){let t;return t=c.value===void 0||Number.isNaN(c.value)||!l.value?au(e,o.value,s.value):su(e,o.value,s.value,c.value),t=p.parse(m.format(t)),t}function S(e,a=1){if(i.value&&u.value?.focus(),t.value||n.value)return;let s=p.parse(u.value?.value??``);if(Number.isNaN(s)){r.value=o.value??0;return}let l=e===`increase`?1:-1;r.value=x(s+(c.value??1)*a*l)}function C(e=1){S(`increase`,e)}function w(e=1){S(`decrease`,e)}function ee(e){e===`min`&&o.value!==void 0?r.value=x(o.value):e===`max`&&s.value!==void 0&&(r.value=x(s.value))}function te(e){u.value&&(u.value.value=e)}function ne(e){let t=p.parse(e);return r.value=Number.isNaN(t)?void 0:x(t),e.length?te(y.value):te(e)}return{...e,isDecreaseDisabled:g,isIncreaseDisabled:_,inputElement:u,inputMode:h,textValue:y,setInputElement:d,applyInputValue:ne,validate:b,onIncrease:C,onDecrease:w,onMinMaxValue:ee}}),[bae,xae]=z(`InputNumberUi`),[Sae,Cae]=R(`InputOtpRoot`),[wae,Tae]=z(`InputOtpUi`);[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);var[BC,Eae]=R(`LayoutRoot`,e=>{let{open:t,isMobile:n,mobileOpen:r}=e,i=e=>{t.value=e},a=e=>{r.value=e},o=()=>{n.value?r.value=!r.value:t.value=!t.value};return{...e,onOpenChange:i,onMobileOpenChange:a,toggleSidebar:o}}),[Dae,Oae]=R(`LayoutClassicRoot`,e=>(BC(e),e)),[VC,kae]=z(`LayoutUi`),[Aae,jae]=z(`LayoutClassicUi`,e=>(VC(e),e)),[Mae,Nae]=z(`ListUi`),{provideCollectionContext:Pae,useCollectionContext:Fae,useCollectionItem:Iae}=Xm(`Menubar`),[Lae,Rae]=R(`MenubarRoot`,e=>{let{modelValue:t,currentTabStopId:n}=e,r=Hm(e.dir),i=A(!1),a=e=>{i.value=!1,t.value=e,n.value=String(e)},o=()=>{i.value=!1,t.value=``},s=e=>{i.value=!1,t.value=t.value?``:e,n.value=String(e)},c=()=>{i.value=!0,t.value=``};return{...e,dir:r,isLinkTriggerHovered:i,onMenuOpen:a,onMenuClose:o,onMenuToggle:s,setTriggerLink:c}}),[zae,Bae]=R(`MenubarMenu`,e=>e),[Vae,Hae]=z(`MenubarUi`,e=>(OS(e),e)),HC=`navigationMenu.rootContentDismiss`,[Uae,Wae]=R(`NavigationMenuRoot`,e=>{let{modelValue:t,skipDelayDuration:n,delayDuration:r,disablePointerLeaveClose:i}=e,a=A(),o=e=>{a.value=e},[s,c]=Gm(),[l,u]=Gm(),d=A(),f=e=>{d.value=e},p=A(new Set),m=e=>{p.value.add(e)},h=e=>{p.value.delete(e)},g=L(()=>p.value.has(t.value)),_=A(``),v=z_(!1,n.value),y=B_(e=>{typeof e==`string`&&(_.value=t.value,t.value=e)},L(()=>t.value!==``||v.value?150:r.value)),b=e=>{y(e)},x=()=>{v.value=!0,y(``)},S=e=>{y(e)},C=()=>{i.value||y(``)},w=e=>{_.value=t.value,t.value=e},ee=()=>{_.value=t.value,t.value=``};return K_(a,HC,ee),{...e,baseId:`soybean-navigation-menu`,rootElement:a,onRootElementChange:o,viewportElement:s,setViewportElement:c,indicatorTrackElement:l,setIndicatorTrackElement:u,activeTriggerElement:d,values:p,addValue:m,removeValue:h,open:g,previousValue:_,onActiveTriggerElementChange:f,onTriggerEnter:b,onTriggerLeave:x,onContentEnter:S,onContentLeave:C,onItemSelect:w,onItemDismiss:ee}}),{provideCollectionContext:Gae,useCollectionContext:Kae,useCollectionItem:qae}=Xm(`NavigationMenu`),[Jae,Yae]=R(`NavigationMenuItem`,e=>{let[t,n]=Gm(),{modelValue:r,value:i}=e,a=A(),o=e=>{a.value=e},s=A(!1),c=L(()=>r.value===i),l=L(()=>iu(c.value));return{...e,triggerElement:a,onTriggerElementChange:o,focusProxyElement:t,setFocusProxyElement:n,wasEscapeCloseRef:s,open:c,dataState:l}}),[Xae,Zae]=z(`NavigationMenuUi`),[Qae,$ae]=R(`PageTabsRoot`),[eoe,toe]=R(`PageTabsItem`),[noe,roe]=z(`PageTabsUi`),[ioe,aoe]=R(`PaginationRoot`,e=>{let{page:t,total:n,pageSize:r}=e,i=L(()=>Math.max(1,Math.ceil(n.value/(r.value||1)))),a=e=>{t.value=e};return{...e,onPageChange:a,pageCount:i}}),[ooe,soe]=z(`PaginationUi`),[coe,loe]=z(`PasswordUi`,e=>(_b(e),e)),[uoe,doe]=z(`Popconfirm`,e=>(TS(e),e)),[foe,poe]=R(`ProgressRoot`),[moe,hoe]=z(`ProgressUi`),[UC,WC]=z(`ProgressProviderUi`),GC={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200},KC=class{static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=GC,this.clearTrickleTimer(),this}static configure(e){return this.options=Am({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return Ef?document.querySelector(`[data-soybean-progress-provider]`)!==null:!1}static set(e){if(!Ef||this.isPaused)return this;let t=this.isStarted();e=au(e,this.options.minimum,this.options.maximum),this.status=e===this.options.maximum?null:e,this.status===null&&this.clearTrickleTimer();let n=this.render(!t),r=this.options.speed,i=this.options.easing;return n.forEach(e=>e.offsetWidth),this.queue(t=>{n.forEach(t=>{YC(t.querySelector(`[data-soybean-progress-bar]`),this.barPositionCSS({n:e,speed:r,ease:i}))}),e===this.options.maximum?(n.forEach(e=>{YC(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{n.forEach(e=>{YC(e,{transition:`all ${r}ms ${i}`,opacity:`0`})}),setTimeout(()=>{n.forEach(e=>{this.remove(e),YC(e,{transition:`none`,opacity:`1`})}),t()},r)},r)):setTimeout(t,r)}),this}static start(){return Ef?(this.status||this.set(0),this.options.trickle&&this.startTrickling(),this):this}static done(e){return!Ef||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(e){if(this.isPaused)return this;let t=this.status;return t?t>1?this:(typeof e!=`number`&&(e=t>=0&&t<.2?.1:t>=.2&&t<.5?.04:t>=.5&&t<.8?.02:t>=.8&&t<.99?.005:0),t=au(t+e,0,.994),this.set(t)):this.start()}static dec(e){if(this.isPaused)return this;let t=this.status;return typeof t==`number`?(typeof e!=`number`&&(e=t>.8?.1:t>.5?.05:t>.2?.02:.01),t=au(t-e,0,.994),this.set(t)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!Ef)return[];let t=Array.from(document.querySelectorAll(`[data-soybean-progress-provider]`));return t.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-soybean-progress-bar]`),r=JC(e?0:this.status||0,this.options.direction);YC(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),t}static remove(e){Ef&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-soybean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()?(this.isPaused=!0,this.clearTrickleTimer(),this):this}static resume(){return this.isStarted()?(this.isPaused=!1,this.options.trickle&&this.startTrickling(),this):this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&=(clearTimeout(this.trickleTimer),void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!(this.isPaused||!this.isStarted())&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??JC(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};nx(KC,`options`,GC),nx(KC,`status`,null),nx(KC,`pending`,[]),nx(KC,`isPaused`,!1),nx(KC,`trickleTimer`,void 0);var qC=KC;function JC(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function YC(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}var XC=[`aria-label`],ZC=Tr({name:`ProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e,n=WC(),r=Wm();return Gn(()=>{qC.configure(t)}),(e,t)=>(M(),N(`div`,{"data-soybean-progress-provider":``,class:D(j(n).root),role:`progressbar`,"aria-label":j(r).progress.loading,"aria-valuemin":`0`,"aria-valuemax":`1`,style:{display:`none`}},[P(`div`,{class:D(j(n).indicator),"data-soybean-progress-bar":``},null,2)],10,XC))}}),[goe,_oe]=R(`RadioGroupRoot`),[voe,yoe]=R(`RadioGroupItem`,e=>{let t=L(()=>ru(e.checked.value)),n=A(``),r=e=>{n.value=e};return{...e,dataState:t,controlId:n,initControlId:r}}),[QC,boe]=z(`RadioGroupUi`),[xoe,Soe]=z(`RadioGroupCardUi`,e=>(QC(e),e)),[Coe,woe]=R(`ScrollAreaRoot`),[Toe,Eoe]=R(`ScrollAreaScrollbar`),[Doe,Ooe]=z(`ScrollAreaUi`,e=>L(()=>e.value??{})),[koe,Aoe]=R(`SplitterGroup`,e=>{let t=Hm(()=>e.dir.value);return{...e,dir:t}}),[joe,Moe]=z(`SplitterUi`),[Noe,Poe]=R(`StepperRoot`,e=>{let t=Hm(e.dir);return{...e,dir:t}}),[Foe,Ioe]=R(`StepperItem`,e=>{let t=A(`soybean-stepper-title-${Er()}`),n=A(`soybean-stepper-description-${Er()}`);return{...e,titleId:t,descriptionId:n}}),[Loe,Roe]=z(`StepperUi`),[zoe,Boe]=R(`SwitchRoot`,e=>{let{modelValue:t,disabled:n,trueValue:r,falseValue:i}=e;function a(){n.value||(Ql(t.value)?t.value=r.value:t.value=t.value===r.value?i.value:r.value)}let o=L(()=>t?.value===r.value?`checked`:`unchecked`),s=L(()=>n.value?``:void 0);return{...e,toggleCheck:a,dataState:o,dataDisabled:s}}),[Voe,Hoe]=z(`SwitchUi`),[Uoe,Woe]=R(`TableCompact`),[Goe,Koe]=z(`Table`),$C=new WeakMap,ew=0;function tw(e,t){return t?t(e)??[]:Array.isArray(e.children)?e.children:[]}function nw(e,t,n,r=1,i){return e.map(e=>{let a=t(e),o=nw(tw(e,n),t,n,r+1,a);return{key:a,row:e,level:r,parentKey:i,children:o,hasChildren:o.length>0}})}function rw(e,t){return e.reduce((e,n)=>{let r=rw(n.children,t);return!t(n.row)&&r.length===0||e.push({...n,children:r,hasChildren:r.length>0}),e},[])}function iw(e,t,n){return[...e].sort((e,r)=>{let i=typeof t.sorter==`function`?t.sorter(e.row,r.row):hw(cw(e.row,t.dataIndex),cw(r.row,t.dataIndex));return n?.order===`desc`?i*-1:i}).map(e=>({...e,children:iw(e.children,t,n)}))}function aw(e,t=!1){return e.flatMap(e=>[...t||e.hasChildren?[e.key]:[],...aw(e.children,t)])}function ow(e){return e.some(e=>e.hasChildren||ow(e.children))}function sw(e){return e.flatMap(e=>[e.row,...sw(e.children)])}function cw(e,t){let n=t.split(`.`),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}function lw(e){if(e.key)return e.key;if(e.dataIndex)return e.dataIndex;if(e.type)return`__${e.type}`;let t=$C.get(e);if(t)return t;ew+=1;let n=`__group-${ew}`;return $C.set(e,n),n}function uw(e){return Array.isArray(e.children)&&e.children.length>0}function dw(e){return e.reduce((e,t)=>{if(t.hidden)return e;if(!uw(t))return e.push(t),e;let n=dw(t.children);return n.length>0&&e.push({...t,children:n}),e},[])}function fw(e){return e.flatMap(e=>uw(e)?fw(e.children):[e])}function pw(e,t,n,r){t[r]??(t[r]=[]),e.forEach(e=>{let i=lw(e);if(uw(e)){t[r].push({key:i,column:e,colSpan:fw(e.children).length,rowSpan:1}),pw(e.children,t,n,r+1);return}t[r].push({key:i,column:e,colSpan:1,rowSpan:n-r})})}function mw(e){return e.reduce((e,t)=>uw(t)?Math.max(e,mw(t.children)+1):e,1)}function hw(e,t){return e==null&&t==null?0:e==null?1:t==null?-1:typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t),void 0,{numeric:!0,sensitivity:`base`})}var{provideCollectionContext:qoe,useCollectionContext:Joe,useCollectionItem:Yoe}=Xm(`TagsInput`),[Xoe,Zoe]=R(`TagsInputRoot`),[Qoe,$oe]=R(`TagsInputItem`),[ese,tse]=z(`TagsInputUi`),[nse,rse]=R(`TextareaRoot`),[ise,ase]=z(`TextareaUi`),[ose,sse]=R(`TimeFieldRoot`),[cse,lse]=z(`TimeFieldUi`),[use,dse]=R(`TimeRangeFieldRoot`),[fse,pse]=z(`TimeRangeFieldUi`),[gw,_w]=R(`Toaster`),[vw,yw]=z(`ToastUi`),bw=1,xw=new class{constructor(){nx(this,`subscribers`,void 0),nx(this,`toasts`,void 0),nx(this,`dismissed`,void 0),nx(this,`subscribe`,e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)})),nx(this,`publish`,e=>{this.subscribers.forEach(t=>t(e))}),nx(this,`resetDismissed`,e=>{this.dismissed.has(e)&&this.dismissed.delete(e)}),nx(this,`upsert`,e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)}),nx(this,`create`,e=>{let{message:t,dismissible:n=!0,...r}=e,i=Tw(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i}),nx(this,`dismiss`,e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})}),nx(this,`message`,(e,t)=>this.create({...t,message:e,type:`default`})),nx(this,`error`,(e,t)=>this.create({...t,message:e,type:`error`})),nx(this,`success`,(e,t)=>this.create({...t,message:e,type:`success`})),nx(this,`info`,(e,t)=>this.create({...t,message:e,type:`info`})),nx(this,`warning`,(e,t)=>this.create({...t,message:e,type:`warning`})),nx(this,`loading`,(e,t)=>this.create({...t,message:e,type:`loading`})),nx(this,`custom`,(e,t)=>{let n=Tw(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n}),nx(this,`promise`,(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(typeof e==`function`?e():e),i=n!==void 0,a,o=async(e,t,r,a)=>{i=!1;let{description:o,settings:s}=await Ew(t,r,a,n);this.create({id:n,type:e,description:o,...s})},s=r.then(async e=>{if(a=[`resolve`,e],Ta(e)){i=!1,this.create({id:n,type:`default`,message:e});return}if(ww(e)&&!e.ok){await o(`error`,t.error,t.description,`HTTP error! status: ${e.status}`);return}if(e instanceof Error){await o(`error`,t.error,t.description,e);return}t.success!==void 0&&await o(`success`,t.success,t.description,e)}).catch(async e=>{a=[`reject`,e],t.error!==void 0&&await o(`error`,t.error,t.description,e)}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})}),nx(this,`getActives`,()=>this.toasts.filter(e=>!this.dismissed.has(e.id))),this.subscribers=[],this.toasts=[],this.dismissed=new Set}},Sw=xw.message,Cw=Object.assign(Sw,{success:xw.success,info:xw.info,warning:xw.warning,error:xw.error,custom:xw.custom,message:xw.message,promise:xw.promise,dismiss:xw.dismiss,loading:xw.loading},{getHistory:()=>xw.toasts,getToasts:()=>xw.getActives()});function ww(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function Tw(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:bw++}async function Ew(e,t,n,r){let[i,a]=await Promise.all([Dw(e,n),Dw(t,n)]);return{description:a,settings:kw(i,r)}}async function Dw(e,t){return typeof e==`function`?await e(t):e}function Ow(e){return typeof e==`object`&&!!e&&`message`in e}function kw(e,t){return Ow(e)?e:{id:t??``,message:e??``}}var Aw={gap:`--gap`,offsetTop:`--offset-top`,offsetRight:`--offset-right`,offsetBottom:`--offset-bottom`,offsetLeft:`--offset-left`,mobileOffsetTop:`--mobile-offset-top`,mobileOffsetRight:`--mobile-offset-right`,mobileOffsetBottom:`--mobile-offset-bottom`,mobileOffsetLeft:`--mobile-offset-left`,frontHeight:`--front-toast-height`},jw={index:`--index`,offset:`--offset`,beforeIndex:`--toasts-before`,zIndex:`--z-index`,swipeAmountX:`--swipe-amount-x`,swipeAmountY:`--swipe-amount-y`,swipeDirection:`--swipe-direction`,swipeOut:`--swipe-out`,initialHeight:`--initial-height`},Mw=`top-right`,Nw=4e3,Pw={info:`lucide:info`,success:`lucide:circle-check`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,close:`lucide:x`,loading:`svg-spinners:270-ring`},Fw=[`top-right`,`top-center`,`top-left`,`bottom-right`,`bottom-center`,`bottom-left`],Iw={left:`left`,right:`right`,top:`up`,bottom:`down`};function Lw(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(Iw[t]),n&&r.push(Iw[n]),r}var Rw=e=>{let t={top:Aw.offsetTop,right:Aw.offsetRight,bottom:Aw.offsetBottom,left:Aw.offsetLeft},n={top:Aw.mobileOffsetTop,right:Aw.mobileOffsetRight,bottom:Aw.mobileOffsetBottom,left:Aw.mobileOffsetLeft},r={};return tte(t).forEach(i=>{let a=(typeof e==`number`?e:e[i])??24;r[t[i]]=`${a}px`,r[n[i]]=`calc(${a}px * 0.67)`}),r},zw=e=>{if(!e)return{x:0,y:0};let t=e.style.getPropertyValue(jw.swipeAmountX),n=e.style.getPropertyValue(jw.swipeAmountY);return{x:Number(t.replace(`px`,``))||0,y:Number(n.replace(`px`,``))||0}},Bw=(e,t)=>{e&&(e.style.setProperty(jw.swipeAmountX,`${t.x}px`),e.style.setProperty(jw.swipeAmountY,`${t.y}px`))},Vw=e=>{e&&Bw(e,{x:0,y:0})},Hw=e=>`dismiss`in e&&e.dismiss===!0,Uw=e=>[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].includes(e),Ww=e=>{let{id:t,position:n}=e,r=A([]),i=A([]),a=L(()=>r.value.filter(e=>tn(t)&&e.toasterId===tn(t)||!e.toasterId)),o=L(()=>{let e=new Set;return a.value.forEach(t=>{let r=t.position||tn(n);e.add(r)}),Fw.forEach(t=>{e.has(t)||e.add(t)}),Array.from(e)});return{toasts:r,filtered:a,heights:i,allPositions:o,positionZIndex:L(()=>{let e={};return o.value.forEach((t,n)=>{e[t]=9999-n}),e}),allToasts:L(()=>{let e=Fw.reduce((e,t)=>(e[t]=[],e),{});return a.value.forEach(t=>{e[t.position||tn(n)].push(t)}),e}),allHeights:L(()=>{let e=Fw.reduce((e,t)=>(e[t]=[],e),{});return i.value.forEach(t=>{e[t.position].push(t)}),e})}},Gw=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],Kw=Tr({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(e,{emit:t}){let n=e,r=t,{dir:i,allToasts:a,allHeights:o,gap:s,duration:c,visibleCounts:l,defaultExpanded:u,swipeDirections:d,interactingPosition:f,expandedPosition:p,showIcon:m,showClose:h,icons:g,toastProps:_,wrapperProps:v,contentProps:y,titleProps:b,descriptionProps:x,iconProps:S,footerProps:C,actionProps:w,cancelProps:ee,closeProps:te}=_w(`Toast`),ne=yw(),re=Or(`toast`),ie=Or(`wrapper`),ae=q_(),{height:oe}=Z_(ie),se=Y_(),T=A(null),ce=A(null),le=A(!1),E=A(!1),ue=A(!1),de=A(!1),fe=A(0),pe=A(0),me=A(n.toast.duration??c.value),he=A(null),ge=A(0),_e=A(0),D=A(null),ve=L(()=>n.toast.type),ye=L(()=>{if(m.value){if(n.toast.icon)return n.toast.icon;if(ve.value&&ve.value!=="default")return g.value[ve.value];if(n.toast.promise)return g.value.loading}}),be=L(()=>n.index===0),xe=L(()=>n.index+1<=l.value),Se=L(()=>ve.value===`loading`),Ce=L(()=>n.toast.dismissible!==!1),we=L(()=>Math.max(o.value[n.position].findIndex(e=>e.toastId===n.toast.id),0)),Te=L(()=>(n.toast.showClose||h.value)&&Ce.value&&ve.value!==`loading`),O=L(()=>n.toast.duration??c.value),Ee=L(()=>{let[e,t]=n.position.split(`-`);return{x:t,y:e}}),De=L(()=>o.value[n.position].reduce((e,t,n)=>n>=we.value?e:e+t.height,0)),Oe=L(()=>we.value*s.value+De.value),ke=L(()=>p.value===n.position||u.value&&ae.value),Ae=L(()=>({[jw.index]:n.index,[jw.beforeIndex]:n.index,[jw.zIndex]:a.value[n.position].length-n.index,[jw.offset]:`${le.value?fe.value:Oe.value}px`,[jw.initialHeight]:u.value?`auto`:`${pe.value}px`})),je=()=>{le.value=!0,fe.value=Oe.value,window.setTimeout(()=>{r(`remove`,n.toast)},200)},Me=()=>{Se.value||!Ce.value||(je(),n.toast.onDismiss?.(n.toast))},Ne=e=>{e.button!==2&&(Se.value||!Ce.value||(he.value=new Date,fe.value=Oe.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(E.value=!0,D.value={x:e.clientX,y:e.clientY})))},Pe=()=>{if(ue.value||!Ce.value)return;D.value=null;let{x:e,y:t}=zw(re.value),r=Date.now()-(he.value?.getTime()??Date.now()),i=T.value===`x`?e:t,a=Math.abs(i)/Math.max(r,1);if(Math.abs(i)>=45||a>.11){fe.value=Oe.value,n.toast.onDismiss?.(n.toast),T.value===`x`?ce.value=e>0?`right`:`left`:ce.value=t>0?`down`:`up`,je(),ue.value=!0;return}Vw(re.value),de.value=!1,E.value=!1,T.value=null},Fe=e=>{if(!D.value||!Ce.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-D.value.y,r=e.clientX-D.value.x,i=d.value??Lw(n.position);!T.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(T.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(T.value===`y`){if(i.includes(`up`)||i.includes(`down`))if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*o(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}else if(T.value===`x`&&(i.includes(`left`)||i.includes(`right`)))if(i.includes(`left`)&&r<0||i.includes(`right`)&&r>0)a.x=r;else{let e=r*o(r);a.x=Math.abs(e)<Math.abs(r)?e:r}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(de.value=!0),Bw(re.value,a)},Ie=()=>{E.value=!1,T.value=null,D.value=null},Le=e=>{n.toast.onAction?.(e),!e.defaultPrevented&&je()},Re=e=>{n.toast.onCancel?.(e),Ce.value&&je()};function ze(e){pe.value=e,r(`update:height`,{toastId:n.toast.id,height:e,position:n.toast.position??n.position})}function Be(){let e=re.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,ze(n)}return qn(O,e=>{me.value=e},{immediate:!0}),qn(oe,e=>{ae.value&&e&&Be()},{flush:`post`}),qn(()=>n.toast.delete,e=>{e&&(je(),n.toast.onDismiss?.(n.toast))}),Gn(()=>{let e=n.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;p.value===n.position||f.value===n.position||se.value===`hidden`?(()=>{if(_e.value<ge.value){let e=Date.now()-ge.value;me.value-=e}_e.value=Date.now()})():me.value!==1/0&&(ge.value=Date.now(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),je()},me.value)),fn(()=>{t!==void 0&&clearTimeout(t)})}),(t,n)=>(M(),N(`li`,Ia(j(_),{ref:`toast`,"data-soybean-toast":``,class:[j(ne).toast,e.toast.ui?.toast],dir:j(i),tabindex:`0`,"data-rich-color":e.toast.richColor,"data-inverted":e.toast.inverted,"data-mounted":j(ae),"data-promise":!!e.toast.promise,"data-swiped":de.value,"data-removed":le.value,"data-visible":xe.value,"data-y-position":Ee.value.y,"data-x-position":Ee.value.x,"data-index":e.index,"data-front":be.value,"data-swiping":E.value,"data-dismissible":Ce.value,"data-type":ve.value,"data-swipe-out":ue.value,"data-swipe-direction":ce.value,"data-expanded":ke.value,"data-testid":e.toast.testId,style:Ae.value,onDragend:Ie,onPointerdown:Ne,onPointerup:Pe,onPointermove:Fe}),[P(`div`,Ia({ref:`wrapper`},j(v),{class:[j(ne).wrapper,e.toast.ui?.wrapper],"data-soybean-toast-wrapper":``}),[e.toast.custom?(M(),wa(Jr(e.toast.custom),{key:0})):(M(),N(ma,{key:1},[P(`h3`,Ia(j(b),{class:[j(ne).title,e.toast.ui?.title],"data-soybean-toast-title":``}),[ye.value?(M(),wa(Sv,Ia({key:0},j(S),{icon:ye.value,class:[j(ne).icon,e.toast.ui?.icon]}),null,16,[`icon`,`class`])):I(`v-if`,!0),F(sx,{is:e.toast.title},null,8,[`is`])],16),e.toast.description?(M(),N(`p`,Ia({key:0},j(x),{class:[j(ne).description,e.toast.ui?.description],"data-soybean-toast-description":``}),[F(sx,{is:e.toast.description},null,8,[`is`])],16)):I(`v-if`,!0),e.toast.content?(M(),wa(Jr(e.toast.content),Ia({key:1},j(y),{class:[j(ne).content,e.toast.ui?.content],"data-soybean-toast-content":``}),null,16,[`class`])):I(`v-if`,!0),e.toast.action||e.toast.cancel?(M(),N(`div`,Ia({key:2},j(C),{class:[j(ne).footer,e.toast.ui?.footer],"data-soybean-toast-footer":``}),[e.toast.cancel?(M(),wa(xv,Ia({key:0},j(ee),{class:[j(ne).cancel,e.toast.ui?.cancel],"data-soybean-toast-cancel":``,onClick:Re}),{default:Rn(()=>[F(sx,{is:e.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):I(`v-if`,!0),e.toast.action?(M(),wa(xv,Ia({key:1},j(w),{class:[j(ne).action,e.toast.ui?.action],"data-soybean-toast-action":``,onClick:Le}),{default:Rn(()=>[F(sx,{is:e.toast.action},null,8,[`is`])]),_:1},16,[`class`])):I(`v-if`,!0)],16)):I(`v-if`,!0)],64))],16),Te.value&&j(g)?.close?(M(),wa(xv,Ia({key:0},j(te),{class:[j(ne).close,e.toast.ui?.close],"data-soybean-toast-close":``,onClick:Me}),{default:Rn(()=>[F(Sv,{icon:j(g)?.close},null,8,[`icon`])]),_:1},16,[`class`])):I(`v-if`,!0)],16,Gw))}}),qw=[`aria-label`],Jw=[`dir`,`data-y-position`,`data-x-position`,`onBlur`,`onFocus`,`onMouseenter`,`onMousemove`,`onMouseleave`,`onDragend`,`onPointerdown`,`onPointerup`],Yw=Tr({name:`Toaster`,inheritAttrs:!1,__name:`toaster`,props:{id:{},dir:{},hotkey:{default:()=>[`altKey`,`KeyT`]},customAriaLabel:{},containerAriaLabel:{default:`Notifications`},position:{default:Mw},defaultExpanded:{type:Boolean},duration:{default:Nw},gap:{default:12},offset:{default:24},visibleCounts:{default:3},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=si(),r=yw(),i=Hm(()=>t.dir),a=L(()=>t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``)),o=L(()=>t.customAriaLabel??`${t.containerAriaLabel} ${a.value}`),s={},c=(e,t)=>{s[e]=wf(t)},{toasts:l,allToasts:u,filtered:d,heights:f,allHeights:p,allPositions:m,positionZIndex:h}=Ww({id:()=>t.id,position:()=>t.position}),g=L(()=>({...Pw,...t.icons})),_=A(null),v=A(null),y=A(null),b=A(null),x=L(()=>({[Aw.gap]:`${t.gap}px`,...Rw(t.offset)})),S=e=>{_.value===e&&(_.value=null),v.value===e&&(v.value=null),b.value===e&&(b.value=null)},C=e=>{s[e]?.focus()},w=e=>{if(f.value.findIndex(t=>t.toastId===e.toastId)!==-1){f.value=f.value.map(t=>t.toastId===e.toastId?e:t);return}let t=f.value.findIndex(t=>t.position===e.position);if(t!==-1){f.value=[...f.value.slice(0,t),e,...f.value.slice(t)];return}f.value=[e,...f.value]},ee=e=>{let t=l.value.findIndex(t=>t.id===e.id);if(t!==-1){let n=Object.assign({},l.value[t],e);l.value=[...l.value.slice(0,t),n,...l.value.slice(t+1)];return}l.value=[e,...l.value]},te=e=>{l.value=l.value.filter(t=>t.id===e.id?(t.delete||xw.dismiss(e.id),!1):!0),f.value=f.value.filter(t=>t.toastId!==e.id)},ne=(e,t)=>{let n=t.currentTarget;b.value===e&&n&&!n.contains(t.relatedTarget)&&(b.value=null,_.value===e&&v.value!==e&&(_.value=null),y.value&&=(y.value.focus({preventScroll:!0}),null))},re=(e,t)=>{t.target.dataset.dismissible!==`false`&&b.value!==e&&(b.value=e,y.value=t.relatedTarget)},ie=e=>{_.value=e},ae=e=>{v.value!==e&&b.value!==e&&_.value===e&&(_.value=null)},oe=(e,t)=>{t.target.dataset.dismissible!==`false`&&(v.value=e,_.value=e)},se=e=>{v.value===e&&(v.value=null)};return gw({dir:i,allToasts:u,allHeights:p,interactingPosition:v,expandedPosition:_,icons:g,...Tf(t,[`gap`,`duration`,`visibleCounts`,`defaultExpanded`,`swipeDirections`,`showIcon`,`showClose`,`toastProps`,`wrapperProps`,`contentProps`,`titleProps`,`descriptionProps`,`iconProps`,`footerProps`,`actionProps`,`cancelProps`,`closeProps`])}),Gn(()=>{let e=xw.subscribe(e=>{if(Hw(e)){requestAnimationFrame(()=>{l.value=l.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}En(()=>{ee(e)})});fn(()=>{e()})},{flush:`post`}),qn(()=>l.value.length,e=>{e===0&&(_.value=null,v.value=null,b.value=null)}),qn(()=>d.value,e=>{let n=new Set(e.map(e=>e.position??t.position));_.value&&!n.has(_.value)&&(_.value=null),v.value&&!n.has(v.value)&&(v.value=null),b.value&&!n.has(b.value)&&(b.value=null)},{deep:!0}),Gn(()=>{if(!Ef)return;let e=e=>{if(t.hotkey.length>0&&t.hotkey.every(t=>Uw(t)?e[t]:e.code===t)){let e=d.value[0]?.position??t.position??m.value[0];_.value=e,C(e)}let n=Object.values(s).some(e=>e===document.activeElement||e?.contains(document.activeElement));e.code===`Escape`&&n&&(_.value=null,b.value=null)};document.addEventListener(`keydown`,e),fn(()=>{document.removeEventListener(`keydown`,e)})}),Hr(()=>{y.value&&(y.value.focus({preventScroll:!0}),y.value=null,b.value=null)}),(e,t)=>(M(),N(ma,null,[P(`section`,{"data-soybean-toaster-container":``,"aria-label":o.value,tabindex:`-1`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(M(!0),N(ma,null,Zr(j(Fw),e=>(M(),N(`ol`,Ia({key:e},{ref_for:!0},j(n),{ref_for:!0,ref:t=>c(e,t),class:j(r).toaster,tabindex:`-1`,dir:j(i),"data-soybean-toaster":``,"data-y-position":e.split(`-`)[0],"data-x-position":e.split(`-`)[1],style:{"--z-index":j(h)[e],"--front-toast-height":`${j(p)[e][0]?.height??0}px`,...x.value},onBlur:t=>ne(e,t),onFocus:t=>re(e,t),onMouseenter:t=>ie(e),onMousemove:t=>ie(e),onMouseleave:t=>ae(e),onDragend:t=>S(e),onPointerdown:t=>oe(e,t),onPointerup:t=>se(e)}),[(M(!0),N(ma,null,Zr(j(u)[e],(t,n)=>(M(),wa(Kw,{key:t.id,index:n,toast:t,position:e,"onUpdate:height":w,onRemove:te},null,8,[`index`,`toast`,`position`]))),128))],16,Jw))),128))],8,qw),$r(e.$slots,`default`)],64))}}),Xw=Tr({name:`ToastProvider`,__name:`toast-provider`,props:{id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e;return(e,n)=>(M(),wa(Yw,Ia({"data-soybean-toast-provider":``},t),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16))}}),[mse,hse]=R(`ToolbarRoot`,e=>{let t=Hm(()=>e.dir.value);return{...e,dir:t}}),[gse,_se]=z(`ToolbarUi`),[vse,yse]=R(`ToggleGroupRoot`,e=>{let t=Hm(()=>e.dir.value);return{...e,dir:t}}),[bse,xse]=z(`ToggleGroupUi`),[Sse,Cse]=R(`TooltipOpenDelayed`,e=>{let{skipDelayDuration:t}=e,n=A(!0),r=A(!1),i=null,a=()=>{i&&=(clearTimeout(i),null)},o=()=>{a(),i=setTimeout(()=>{n.value=!0},t.value)};return{skipDelayDuration:t,isOpenDelayed:n,isPointerInTransitRef:r,onOpen:()=>{a(),n.value=!1},onClose:()=>{o()}}}),[wse,Tse]=R(`TooltipRoot`,e=>{let{open:t,delayDuration:n,isOpenDelayed:r,disableHoverableContent:i}=e,a=A(``),o=()=>{a.value||=`soybean-tooltip-popup-${Er()}`},s=A(!1),c=L(()=>t.value?s.value?`delayed-open`:`instant-open`:`closed`),l=A(),u=e=>{l.value=e},d=A(),f=e=>{d.value=e},p=null,m=()=>{p&&=(clearTimeout(p),null)},h=()=>{m(),p=setTimeout(()=>{s.value=!0,t.value=!0},n.value)},g=()=>{m(),s.value=!1,t.value=!0},_=()=>{m(),t.value=!1},v=()=>{h()},y=()=>{r.value?v():g()},b=()=>{i.value?_():m()};return{...e,dataState:c,popupId:a,initPopupId:o,popupElement:l,onPopupElementChange:u,triggerElement:d,onTriggerElementChange:f,onTriggerEnter:y,onTriggerLeave:b,onOpen:g,onClose:_}});function Zw(e,t,n=1,r){return e?e.reduce((i,a,o)=>{let s=a.children,c=t?.includes(a.value),l={_id:a.value,value:a.value,data:a,index:o,level:n,parent:r,hasChildren:!!s,bind:{data:a,level:n,"aria-setsize":e.length,"aria-posinset":o+1}};return i.push(l),s&&c&&i.push(...Zw(s,t,n+1,a)),i},[]):[]}function Qw(e,t){return t?t.some(t=>e.includes(t.value)?!0:Qw(e,t.children)):!1}function $w(e,t,n=[]){if(!t)return null;for(let r of t){if(r.value===e)return n;if(r.children){let t=$w(e,r.children,[...n,r.value]);if(t!==null)return t}}return null}var[Ese,Dse]=R(`TreeRoot`,e=>{let t=Hm(()=>e.dir.value);return{...e,dir:t}}),[Ose,kse]=R(`Virtualizer`,e=>{let{dynamic:t,isHorizontal:n}=e,r=L(()=>t.value&&!n.value);return{...e,isVerticalDynamic:r}}),[Ase,jse]=R(`TreeMenuRoot`,e=>{let{modelValue:t,expanded:n,collapsed:r}=e,i=e=>{t.value=e},a=e=>{n.value=e},o=e=>{n.value.includes(e)?n.value=n.value.filter(t=>t!==e):n.value=[...n.value,e]},s=e=>{r.value=e};return{...e,onModelValueChange:i,onExpandedChange:a,onExpandedToggle:o,onCollapsedChange:s}}),[Mse,Nse]=R(`TreeMenuItem`),[Pse,Fse]=z(`TreeMenuUi`,e=>(_v(L(()=>({root:e.value.collapsibleRoot,trigger:e.value.collapsibleTrigger,content:e.value.collapsibleContent}))),e));function eT(e){return e?e?.filter(e=>!e.hidden).map(e=>{let t={...e};return t.children&&t.children.length>0&&(t.children=eT(t.children)),t}):[]}var[Ise,Lse]=R(`WatermarkCompact`,e=>e),[Rse,zse]=R(`WatermarkRoot`,e=>e),[Bse,Vse]=z(`WatermarkUi`);Jl({extendBase:e=>({prev:Ov({size:e.size,variant:`pure`}),next:Ov({size:e.size,variant:`pure`})}),slots:{root:`inline-flex flex-col gap-4 p-3 text-sm`,header:`flex items-center justify-between`,heading:`flex items-center justify-center font-medium`,prev:`rtl:rotate-180`,next:`rtl:rotate-180`,grid:`inline-table border-collapse`,gridHead:``,gridBody:``,gridRow:``,headCell:`rounded-md text-center font-normal text-muted-foreground`,cell:[`flex-1 text-center align-middle focus-within:relative focus-within:z-20`,`[&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-s-md last:[&:has([data-selected])]:rounded-e-md`,`[&:has([data-selection-end])]:rounded-e-md [&:has([data-selection-start])]:rounded-s-md`],cellTrigger:[`inline-flex cursor-pointer items-center justify-center w-full h-full rounded-md font-normal transition-colors`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-ring focus-visible:ring-primary/30`,`[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground`,`data-[selected]:text-foreground`,`data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground`,`data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground`,`[&[data-selection-start]:hover]:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus-visible:bg-primary data-[selection-start]:focus-visible:text-primary-foreground`,`[&[data-selection-end]:hover]:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus-visible:bg-primary data-[selection-end]:focus-visible:text-primary-foreground`,`data-[highlighted]:bg-accent/80 data-[highlighted]:text-foreground`,`hover:bg-accent hover:text-accent-foreground data-[outside-view]:text-muted-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground data-[disabled]:opacity-50`,`data-[unavailable]:line-through`]},variants:{size:{xs:{root:`gap-3 text-2xs p-2`,header:`gap-1.5`,gridRow:`mt-1.5`,heading:`gap-1.5`,headCell:`h-6 w-6 text-3xs`,cell:`h-6 w-6`},sm:{root:`gap-3.5 text-xs p-2.5`,header:`gap-2`,gridRow:`mt-1.75`,heading:`gap-2`,headCell:`h-7 w-7 text-2xs`,cell:`h-7 w-7`},md:{root:`gap-4 text-sm p-3`,header:`gap-2.5`,gridRow:`mt-2`,heading:`gap-2.5`,headCell:`h-8 w-8 text-xs`,cell:`h-8 w-8`},lg:{root:`gap-4.5 text-base p-3.5`,header:`gap-3`,gridRow:`mt-2.25`,heading:`gap-3`,headCell:`h-9 w-9 text-sm`,cell:`h-9 w-9`},xl:{root:`gap-5 text-lg p-4`,header:`gap-3.5`,gridRow:`mt-2.5`,heading:`gap-3.5`,headCell:`h-10 w-10 text-base`,cell:`h-10 w-10`},"2xl":{root:`gap-6 text-xl p-5`,header:`gap-4`,gridRow:`mt-3`,heading:`gap-4`,headCell:`h-12 w-12 text-lg`,cell:`h-12 w-12`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`flex flex-col items-stretch rounded-md border bg-card text-card-foreground shadow-sm`,header:`flex items-center justify-between flex-wrap`,content:[`grow transition will-change-auto outline-none data-[state=closed]:p-0`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`],footer:`flex items-center justify-between`,titleRoot:`flex items-center`,title:`font-semibold tracking-tight m-0`,description:`w-full text-muted-foreground m-0`},variants:{size:{xs:{root:`text-2xs`,header:`px-2 py-1.5`,content:`px-2 py-1.5`,footer:`px-2 py-1.5`,titleRoot:`gap-1.5`,title:`text-xs`,description:`text-2xs`},sm:{root:`text-xs`,header:`px-3 py-2`,content:`px-3 py-2`,footer:`px-3 py-2`,titleRoot:`gap-1.75`,title:`text-sm`,description:`text-xs`},md:{root:`text-sm`,header:`px-4 py-3`,content:`px-4 py-3`,footer:`px-4 py-3`,titleRoot:`gap-2`,title:`text-base`,description:`text-sm`},lg:{root:`text-base`,header:`px-5 py-4`,content:`px-5 py-4`,footer:`px-5 py-5`,titleRoot:`gap-2.5`,title:`text-lg`,description:`text-base`},xl:{root:`text-base`,header:`px-6 py-5`,content:`px-6 py-5`,footer:`px-6 py-6`,titleRoot:`gap-3`,title:`text-lg`,description:`text-lg`},"2xl":{root:`text-lg`,header:`px-7 py-6`,content:`px-7 py-6`,footer:`px-7 py-6`,titleRoot:`gap-3.5`,title:`text-xl`,description:`text-xl`}},scrollable:{true:{content:`overflow-auto`}},split:{true:{root:`divide-y divide-border`}}},compoundVariants:[{size:`xs`,split:!1,class:{content:`data-[header-visible=true]:data-[state=open]:pt-0.75 data-[footer-visible=true]:data-[state=open]:pb-0.75`}},{size:`sm`,split:!1,class:{content:`data-[header-visible=true]:data-[state=open]:pt-1 data-[footer-visible=true]:data-[state=open]:pb-1`}},{size:`md`,split:!1,class:{content:`data-[header-visible=true]:data-[state=open]:pt-1.5 data-[footer-visible=true]:data-[state=open]:pb-1.5`}},{size:`lg`,split:!1,class:{content:`data-[header-visible=true]:data-[state=open]:pt-2 data-[footer-visible=true]:data-[state=open]:pb-2`}},{size:`xl`,split:!1,class:{content:`data-[header-visible=true]:data-[state=open]:pt-2.5 data-[footer-visible=true]:data-[state=open]:pb-2.5`}},{size:`2xl`,split:!1,class:{content:`data-[header-visible=true]:data-[state=open]:pt-3 data-[footer-visible=true]:data-[state=open]:pb-3`}}],defaultVariants:{size:`md`,scrollable:!0,split:!1}}),Jl({extendBase:e=>({previous:Ov({size:e.size,variant:`pure`,shape:`circle`}),next:Ov({size:e.size,variant:`pure`,shape:`circle`})}),slots:{root:`group relative`,content:`overflow-hidden`,container:`flex`,item:`min-w-0 shrink-0 grow-0 basis-full`,control:`flex justify-between items-center`,navigation:`flex`,previous:`group-data-[orientation=vertical]:rotate-90 rtl:rotate-180`,next:`group-data-[orientation=vertical]:rotate-90 rtl:rotate-180`},variants:{size:{xs:{root:`text-2xs`,navigation:`gap-1 py-1`},sm:{root:`text-xs`,navigation:`gap-1.25 py-1.25`},md:{root:`text-sm`,navigation:`gap-1.5 py-1.5`},lg:{root:`text-base`,navigation:`gap-2 py-2`},xl:{root:`text-lg`,navigation:`gap-2.5 py-2.5`},"2xl":{root:`text-xl`,navigation:`gap-3 py-3`}},orientation:{horizontal:{},vertical:{container:`flex-col h-full`}},floatNav:{true:{navigation:`p-0`,previous:`absolute`,next:`absolute`}}},compoundVariants:[{orientation:`horizontal`,floatNav:!0,class:{previous:`top-1/2 -translate-y-1/2`,next:`top-1/2 -translate-y-1/2`}},{orientation:`vertical`,floatNav:!0,class:{previous:`start-1/2 -translate-x-1/2`,next:`start-1/2 -translate-x-1/2`}},{size:`xs`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-9`,next:`-end-9`}},{size:`sm`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-10.5`,next:`-end-10.5`}},{size:`md`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-12`,next:`-end-12`}},{size:`lg`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-13.5`,next:`-end-13.5`}},{size:`xl`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-15`,next:`-end-15`}},{size:`2xl`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-18`,next:`-end-18`}},{size:`xs`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-9`,next:`-bottom-9`}},{size:`sm`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-10.5`,next:`-bottom-10.5`}},{size:`md`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-12`,next:`-bottom-12`}},{size:`lg`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-13.5`,next:`-bottom-13.5`}},{size:`xl`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-15`,next:`-bottom-15`}},{size:`2xl`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-18`,next:`-bottom-18`}}],defaultVariants:{size:`md`,orientation:`horizontal`,floatNav:!0}}),Jl({slots:{groupRoot:`flex`,root:`flex items-center w-fit`,control:[`peer shrink-0 border shadow transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`],indicator:`w-full h-full flex items-center justify-center text-current`,"indicator-icon":`size-full`,label:``},variants:{color:{primary:{control:`border-primary focus-visible:ring-primary/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground`},destructive:{control:`border-destructive focus-visible:ring-destructive/30 data-[state=checked]:bg-destructive data-[state=checked]:text-destructive-foreground data-[state=indeterminate]:bg-destructive data-[state=indeterminate]:text-destructive-foreground`},success:{control:`border-success focus-visible:ring-success/30 data-[state=checked]:bg-success data-[state=checked]:text-success-foreground data-[state=indeterminate]:bg-success data-[state=indeterminate]:text-success-foreground`},warning:{control:`border-warning focus-visible:ring-warning/30 data-[state=checked]:bg-warning data-[state=checked]:text-warning-foreground data-[state=indeterminate]:bg-warning data-[state=indeterminate]:text-warning-foreground`},info:{control:`border-info focus-visible:ring-info/30 data-[state=checked]:bg-info data-[state=checked]:text-info-foreground data-[state=indeterminate]:bg-info data-[state=indeterminate]:text-info-foreground`},carbon:{control:`border-carbon focus-visible:ring-carbon/30 data-[state=checked]:bg-carbon data-[state=checked]:text-carbon-foreground data-[state=indeterminate]:bg-carbon data-[state=indeterminate]:text-carbon-foreground`},secondary:{control:`border-secondary-foreground/50 focus-visible:ring-secondary-foreground/20 data-[state=checked]:bg-secondary-foreground/5 data-[state=checked]:text-secondary-foreground data-[state=indeterminate]:bg-secondary-foreground/5 data-[state=indeterminate]:text-secondary-foreground`},accent:{control:`border-accent-foreground/50 focus-visible:ring-accent-foreground/20 data-[state=checked]:bg-accent-foreground/5 data-[state=checked]:text-accent-foreground data-[state=indeterminate]:bg-accent-foreground/5 data-[state=indeterminate]:text-accent-foreground`}},size:{xs:{groupRoot:`gap-x-2 gap-y-1.5`,root:`gap-1.5`,control:`size-3`},sm:{groupRoot:`gap-x-2.5 gap-y-1.75`,root:`gap-1.75`,control:`size-3.5`},md:{groupRoot:`gap-x-3 gap-y-2`,root:`gap-2`,control:`size-4`},lg:{groupRoot:`gap-x-3.5 gap-y-2.5`,root:`gap-2.5`,control:`size-4.5`},xl:{groupRoot:`gap-x-4 gap-y-3`,root:`gap-3`,control:`size-5`},"2xl":{groupRoot:`gap-x-4.5 gap-y-3.5`,root:`gap-3.5`,control:`size-6`}},orientation:{horizontal:{groupRoot:`items-center`},vertical:{groupRoot:`flex-col`}},shape:{square:{control:`rounded-sm`},rounded:{control:`rounded-full`}}},defaultVariants:{color:`primary`,size:`md`,orientation:`horizontal`,shape:`square`}}),Jl({slots:{groupRoot:`flex`,root:`relative inline-flex border border-solid border-border rounded-md`,content:`flex items-center grow`,textContent:`flex flex-col`,icon:`shrink-0`,label:`font-medium`,description:`text-muted-foreground`,control:[`peer shrink-0 border shadow transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,`order-1 after:absolute after:inset-0 after:content-empty`],indicator:`w-full h-full flex items-center justify-center text-current`,"indicator-icon":`size-full`},variants:{color:{primary:{root:`data-[state=checked]:border-primary`,control:`border-primary focus-visible:ring-primary/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground`},destructive:{root:`data-[state=checked]:border-destructive`,control:`border-destructive focus-visible:ring-destructive/30 data-[state=checked]:bg-destructive data-[state=checked]:text-destructive-foreground data-[state=indeterminate]:bg-destructive data-[state=indeterminate]:text-destructive-foreground`},success:{root:`data-[state=checked]:border-success`,control:`border-success focus-visible:ring-success/30 data-[state=checked]:bg-success data-[state=checked]:text-success-foreground data-[state=indeterminate]:bg-success data-[state=indeterminate]:text-success-foreground`},warning:{root:`data-[state=checked]:border-warning`,control:`border-warning focus-visible:ring-warning/30 data-[state=checked]:bg-warning data-[state=checked]:text-warning-foreground data-[state=indeterminate]:bg-warning data-[state=indeterminate]:text-warning-foreground`},info:{root:`data-[state=checked]:border-info`,control:`border-info focus-visible:ring-info/30 data-[state=checked]:bg-info data-[state=checked]:text-info-foreground data-[state=indeterminate]:bg-info data-[state=indeterminate]:text-info-foreground`},carbon:{root:`data-[state=checked]:border-carbon`,control:`border-carbon focus-visible:ring-carbon/30 data-[state=checked]:bg-carbon data-[state=checked]:text-carbon-foreground data-[state=indeterminate]:bg-carbon data-[state=indeterminate]:text-carbon-foreground`},secondary:{root:`data-[state=checked]:border-secondary-foreground/50`,control:`border-secondary-foreground/50 focus-visible:ring-secondary-foreground/20 data-[state=checked]:bg-secondary-foreground/5 data-[state=checked]:text-secondary-foreground data-[state=indeterminate]:bg-secondary-foreground/5 data-[state=indeterminate]:text-secondary-foreground`},accent:{root:`data-[state=checked]:border-accent-foreground/50`,control:`border-accent-foreground/50 focus-visible:ring-accent-foreground/20 data-[state=checked]:bg-accent-foreground/5 data-[state=checked]:text-accent-foreground data-[state=indeterminate]:bg-accent-foreground/5 data-[state=indeterminate]:text-accent-foreground`}},size:{xs:{groupRoot:`gap-x-2 gap-y-1.5`,root:`gap-2 text-2xs p-2`,content:`gap-2`,textContent:`gap-0.5`,icon:`text-3`,description:`text-3xs`,control:`size-3`},sm:{groupRoot:`gap-x-2.5 gap-y-1.75`,root:`gap-2.5 text-xs p-2.5`,content:`gap-2.5`,textContent:`gap-0.75`,icon:`text-4`,description:`text-2xs`,control:`size-3.5`},md:{groupRoot:`gap-x-3 gap-y-2`,root:`gap-3 text-sm p-3`,content:`gap-3`,textContent:`gap-1`,icon:`text-5`,description:`text-xs`,control:`size-4`},lg:{groupRoot:`gap-x-3.5 gap-y-2.5`,root:`gap-4 text-base p-4`,content:`gap-4`,textContent:`gap-1.5`,icon:`text-6`,description:`text-sm`,control:`size-4.5`},xl:{groupRoot:`gap-x-4 gap-y-3`,root:`gap-5 text-lg p-5`,content:`gap-5`,textContent:`gap-2`,icon:`text-7`,description:`text-base`,control:`size-5`},"2xl":{groupRoot:`gap-x-4.5 gap-y-3.5`,root:`gap-6 text-xl p-6`,content:`gap-6`,textContent:`gap-2.5`,icon:`text-8`,description:`text-lg`,control:`size-6`}},shape:{square:{control:`rounded-sm`},rounded:{control:`rounded-full`}}},defaultVariants:{color:`primary`,size:`md`,shape:`square`}}),Jl({slots:{root:``,trigger:``,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`]},variants:{size:{xs:{root:`text-2xs`},sm:{root:`text-xs`},md:{root:`text-sm`},lg:{root:`text-base`},xl:{root:`text-lg`},"2xl":{root:`text-xl`}}}}),Jl({slots:{root:`relative select-none`,area:[`relative overflow-hidden min-w-25 min-h-25 w-full h-full rounded-xl border border-input shadow-inner outline-none`,`focus-visible:ring-3 focus-visible:ring-primary/20 data-[disabled]:opacity-60`],thumb:[`absolute block rounded-full border-2 border-white bg-transparent shadow-lg`,`ring-1 ring-black/20 transition-[transform,box-shadow] duration-150`,`hover:scale-105 outline-none focus-visible:ring-4 focus-visible:ring-primary/25`]},variants:{size:{xs:{root:`text-2xs`,thumb:`size-3`},sm:{root:`text-xs`,thumb:`size-3.5`},md:{root:`text-sm`,thumb:`size-4`},lg:{root:`text-base`,thumb:`size-4.5`},xl:{root:`text-lg`,thumb:`size-5`},"2xl":{root:`text-xl`,thumb:`size-6`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:[`group flex items-center min-w-0 rounded-md border border-input bg-background transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:opacity-60 data-[readonly]:bg-muted/40`],input:[`flex-1 min-w-0 bg-transparent outline-none`,`placeholder:text-muted-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`]},variants:{size:{xs:{root:`h-6 px-1.5 text-2xs gap-1`},sm:{root:`h-7 px-2 text-xs gap-1.5`},md:{root:`h-8 px-2.5 text-sm gap-2`},lg:{root:`h-9 px-3 text-base gap-2.5`},xl:{root:`h-10 px-3.5 text-lg gap-3`},"2xl":{root:`h-12 px-4 text-xl gap-3.5`}}},defaultVariants:{size:`md`}}),Jl({extendBase:e=>({trigger:Tv({size:e.size,variant:`pure`})}),slots:{popup:``,content:`flex flex-col`,trigger:``,triggerSwatch:``,triggerValue:`min-w-0 flex-1 truncate text-start font-mono text-xs`,segment:``,area:``,sliderSwatch:`flex items-center`,sliderRoot:`flex-1`,swatch:``,fields:`grid grid-cols-[2fr_1fr]`,field:``,alphaField:``,swatchPicker:``},variants:{size:{xs:{popup:`p-1.5`,content:`w-45 gap-1.5`,area:`h-30`,sliderSwatch:`gap-1.5`,fields:`gap-1.5`,alphaField:`w-12`},sm:{popup:`p-1.75`,content:`w-52.5 gap-1.75`,area:`h-35`,sliderSwatch:`gap-1.75`,fields:`gap-1.75`,alphaField:`w-15`},md:{popup:`p-2`,content:`w-60 gap-2`,area:`h-40`,sliderSwatch:`gap-2`,fields:`gap-2`,alphaField:`w-16`},lg:{popup:`p-2.5`,content:`w-63.75 gap-2.5`,area:`h-42.5`,sliderSwatch:`gap-2.5`,fields:`gap-2.5`,alphaField:`w-18`},xl:{popup:`p-3`,content:`w-67.5 gap-3`,area:`h-45`,sliderSwatch:`gap-3`,fields:`gap-3`,alphaField:`w-20`},"2xl":{popup:`p-4`,content:`w-80 gap-4`,area:`h-50`,sliderSwatch:`gap-4`,fields:`gap-4`,alphaField:`w-25`}}},defaultVariants:{size:`md`}}),Jl({extend:[Cl(Jl({slots:{root:[`relative isolate inline-flex shrink-0 overflow-hidden border border-input bg-background shadow-sm`,`data-[no-color]:bg-muted/40`],checker:`absolute inset-0 bg-[linear-gradient(45deg,rgba(0,0,0,0.08)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.08)_75%),linear-gradient(45deg,rgba(0,0,0,0.08)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.08)_75%)] bg-[length:8px_8px] bg-[position:0_0,4px_4px]`,fill:`absolute inset-0 bg-[var(--soybean-color-swatch-color)]`},variants:{size:{xs:{root:`size-5 text-2xs`},sm:{root:`size-5.5 text-xs`},md:{root:`size-6 text-sm`},lg:{root:`size-6.5 text-base`},xl:{root:`size-7 text-lg`},"2xl":{root:`size-8 text-xl`}},shape:{square:{root:`rounded-md`},circle:{root:`rounded-full`}}},defaultVariants:{size:`md`,shape:`square`}}),{root:`swatchRoot`,checker:`swatchChecker`,fill:`swatchFill`})],slots:{root:`grid`,item:[`relative inline-flex items-center justify-center rounded-full outline-none transition-[transform,box-shadow] duration-150`,`hover:scale-110 data-[highlighted]:scale-105 data-[disabled]:opacity-50`],itemIndicator:`pointer-events-none absolute inset-0 flex justify-center items-center text-muted`,swatchRoot:``,swatchChecker:``,swatchFill:``},variants:{size:{xs:{root:`grid-cols-[repeat(auto-fill,minmax(1.25rem,1fr))] gap-1.5 text-2xs`,item:`size-5`,itemIndicator:`text-4xs`},sm:{root:`grid-cols-[repeat(auto-fill,minmax(1.375rem,1fr))] gap-1.75 text-xs`,item:`size-5.5`,itemIndicator:`text-3xs`},md:{root:`grid-cols-[repeat(auto-fill,minmax(1.5rem,1fr))] gap-2 text-sm`,item:`size-6`,itemIndicator:`text-2xs`},lg:{root:`grid-cols-[repeat(auto-fill,minmax(1.625rem,1fr))] gap-2.5 text-base`,item:`size-6.5`,itemIndicator:`text-xs`},xl:{root:`grid-cols-[repeat(auto-fill,minmax(1.75rem,1fr))] gap-3 text-lg`,item:`size-7`,itemIndicator:`text-sm`},"2xl":{root:`grid-cols-[repeat(auto-fill,minmax(2rem,1fr))] gap-4 text-xl`,item:`size-8`,itemIndicator:`text-base`}},shape:{square:{item:`rounded-md`},circle:{item:`rounded-full`}}},defaultVariants:{size:`md`,shape:`square`}}),Jl({extendBase:e=>({close:Ov({size:e.size})}),slots:{positioner:`w-max`,popup:[`w-auto rounded-md border bg-popover text-popover-foreground shadow-md outline-none z-50 will-change-transform`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],arrow:`w-1em h-0.5em fill-popover stroke-border`,close:`absolute`},variants:{size:{xs:{popup:`p-3 text-2xs`,arrow:`text-3xs`,close:`top-0.5 end-0.5`},sm:{popup:`p-3.5 text-xs`,arrow:`text-2xs`,close:`top-0.75 end-0.75`},md:{popup:`p-4 text-sm`,arrow:`text-xs`,close:`top-1 end-1`},lg:{popup:`p-4.5 text-base`,arrow:`text-sm`,close:`top-1.25 end-1.25`},xl:{popup:`p-5 text-lg`,arrow:`text-base`,close:`top-1.5 end-1.5`},"2xl":{popup:`p-5.5 text-xl`,arrow:`text-lg`,close:`top-2 end-2`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:[`relative flex w-full touch-none select-none items-center`,`data-[disabled]:opacity-50 data-[orientation=vertical]:flex-col data-[orientation=vertical]:min-h-20`],track:[`relative grow overflow-hidden rounded-full bg-muted`,`data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`],range:`absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`,thumb:[`absolute block shrink-0 rounded-full bg-background shadow-sm transition-[color,box-shadow]`,`hover:ring-3 outline-none focus-visible:ring-3 data-[disabled]:cursor-not-allowed`]},variants:{color:{primary:{range:`bg-primary`,thumb:`border-primary focus-visible:ring-primary/30 hover:ring-primary/20`},destructive:{range:`bg-destructive`,thumb:`border-destructive focus-visible:ring-destructive/30 hover:ring-destructive/20`},success:{range:`bg-success`,thumb:`border-success focus-visible:ring-success/30 hover:ring-success/20`},warning:{range:`bg-warning`,thumb:`border-warning focus-visible:ring-warning/30 hover:ring-warning/20`},info:{range:`bg-info`,thumb:`border-info focus-visible:ring-info/30 hover:ring-info/20`},carbon:{range:`bg-carbon`,thumb:`border-carbon focus-visible:ring-carbon/30 hover:ring-carbon/20`},secondary:{range:`bg-secondary-foreground/30`,thumb:`border-secondary-foreground/40 focus-visible:ring-secondary-foreground/20 hover:ring-secondary-foreground/20`},accent:{range:`bg-accent-foreground/30`,thumb:`border-accent-foreground/40 focus-visible:ring-accent-foreground/20 hover:ring-accent-foreground/20`}},size:{xs:{root:`h-3 data-[orientation=vertical]:w-3`,track:`data-[orientation=horizontal]:h-1.25 data-[orientation=vertical]:w-1.25`,thumb:`size-3 border`},sm:{root:`h-3.5 data-[orientation=vertical]:w-3.5`,track:`data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5`,thumb:`size-3.5 border`},md:{root:`h-4 data-[orientation=vertical]:w-4`,track:`data-[orientation=horizontal]:h-1.75 data-[orientation=vertical]:w-1.75`,thumb:`size-4 border-2`},lg:{root:`h-4.5 data-[orientation=vertical]:w-4.5`,track:`data-[orientation=horizontal]:h-2 data-[orientation=vertical]:w-2`,thumb:`size-4.5 border-2`},xl:{root:`h-5 data-[orientation=vertical]:w-5`,track:`data-[orientation=horizontal]:h-2.5 data-[orientation=vertical]:w-2.5`,thumb:`size-5 border-3`},"2xl":{root:`h-6 data-[orientation=vertical]:w-6`,track:`data-[orientation=horizontal]:h-3 data-[orientation=vertical]:w-3`,thumb:`size-6 border-3`}}},defaultVariants:{color:`primary`,size:`md`}}),Jl({slots:{root:`flex`,list:`relative inline-flex justify-center items-center bg-muted text-muted-foreground`,trigger:[`relative z-3 inline-flex items-center justify-center flex-1 whitespace-nowrap rounded-md font-medium transition-all-200`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`disabled:cursor-not-allowed disabled:opacity-50`],indicator:`absolute top-0 start-0 z-2 transition-[width,height,transform] duration-300`,indicatorContent:`w-full h-full bg-background shadow`,content:`flex-grow self-stretch transition-all-150 outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`},variants:{size:{xs:{root:`text-2xs`,list:`p-0.75`,trigger:`gap-1 px-1.5 py-0.75`},sm:{root:`text-xs`,list:`p-0.875`,trigger:`gap-1.5 px-2 py-1`},md:{root:`text-sm`,list:`p-1`,trigger:`gap-2 px-3 py-1`},lg:{root:`text-base`,list:`p-1.125`,trigger:`gap-2.5 px-4 py-1.125`},xl:{root:`text-lg`,list:`p-1.25`,trigger:`gap-3 px-5 py-1.25`},"2xl":{root:`text-xl`,list:`p-1.5`,trigger:`gap-4 px-6 py-1.5`}},orientation:{horizontal:{root:`flex-col`,indicator:`h-full w-[--soybean-tabs-indicator-size] translate-x-[--soybean-tabs-indicator-position] rtl:-translate-x-[--soybean-tabs-indicator-position]`},vertical:{list:`flex-col items-stretch`,indicator:`w-full h-[--soybean-tabs-indicator-size] translate-y-[--soybean-tabs-indicator-position]`}},shape:{square:{list:`rounded-md`,indicatorContent:`rounded-md`},rounded:{list:`rounded-full`,indicatorContent:`rounded-full`}},fill:{full:{root:`items-stretch`},auto:{root:`items-start`}},enableIndicator:{false:{trigger:`data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow`}}},compoundVariants:[{size:`xs`,orientation:`horizontal`,class:{indicator:`py-0.75`,content:`mt-1.5`}},{size:`xs`,orientation:`vertical`,class:{indicator:`px-0.75`,content:`ms-1.5`}},{size:`sm`,orientation:`horizontal`,class:{indicator:`py-1`,content:`mt-1.75`}},{size:`sm`,orientation:`vertical`,class:{indicator:`px-1`,content:`ms-1.75`}},{size:`md`,orientation:`horizontal`,class:{indicator:`py-1`,content:`mt-2`}},{size:`md`,orientation:`vertical`,class:{indicator:`px-1`,content:`ms-2`}},{size:`lg`,orientation:`horizontal`,class:{indicator:`py-1.125`,content:`mt-2.5`}},{size:`lg`,orientation:`vertical`,class:{indicator:`px-1.125`,content:`ms-2.5`}},{size:`xl`,orientation:`horizontal`,class:{indicator:`py-1.25`,content:`mt-3`}},{size:`xl`,orientation:`vertical`,class:{indicator:`px-1.25`,content:`ms-3`}},{size:`2xl`,orientation:`horizontal`,class:{indicator:`py-1.5`,content:`mt-3.5`}},{size:`2xl`,orientation:`vertical`,class:{indicator:`px-1.5`,content:`ms-3.5`}}],defaultVariants:{size:`md`,orientation:`horizontal`,shape:`square`,fill:`auto`,enableIndicator:!0}}),Jl({slots:{anchor:``,trigger:[`flex w-full items-center justify-between rounded-md border border-input bg-background transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30 focus:ring-3 focus:ring-offset-background focus:ring-primary/30 disabled:pointer-events-none disabled:opacity-50`,`data-[placeholder]:text-muted-foreground`],triggerIcon:`shrink-0 text-muted-foreground opacity-70`,cancel:[`flex shrink-0 items-center justify-center rounded-md bg-transparent text-accent-foreground hover:bg-accent-foreground/10 active:bg-accent-foreground/20`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-accent-foreground/20`,`disabled:cursor-not-allowed disabled:opacity-40`],positioner:``,popup:[`relative z-50 min-w-32 w-[--soybean-combobox-trigger-width] rounded-md border bg-popover text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],arrow:`fill-popover`,viewport:`overflow-x-hidden overflow-y-auto`,inputRoot:`group flex items-center border-b`,inputControl:`flex w-full rounded-md bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,group:`overflow-hidden text-foreground`,groupLabel:`font-medium text-muted-foreground`,item:[`relative flex w-full cursor-default select-none items-center rounded-sm outline-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemIndicator:`ms-auto shrink-0 text-muted-foreground`,empty:`py-4 text-center text-sm text-muted-foreground`,separator:`h-px bg-muted`},variants:{size:{xs:{trigger:`h-6 gap-1 px-1.5 text-2xs`,triggerIcon:`text-3xs`,popup:`text-2xs`,cancel:`p-0.75`,inputRoot:`px-1.5 py-0.5`,inputControl:`h-6`,viewport:`max-h-70 p-0.75`,groupLabel:`p-1 text-3xs`,item:`gap-1 px-1 py-1`,separator:`-mx-0.75 my-0.375`},sm:{trigger:`h-7 gap-1.5 px-2 text-xs`,triggerIcon:`text-2xs`,popup:`text-xs`,cancel:`p-0.875`,inputRoot:`px-2 py-0.625`,inputControl:`h-7`,viewport:`max-h-75 p-0.875`,groupLabel:`p-1.25 text-2xs`,item:`gap-1.5 px-1.5 py-1`,separator:`-mx-0.875 my-0.4375`},md:{trigger:`h-8 gap-2 px-2.5 text-sm`,triggerIcon:`text-xs`,popup:`text-sm`,cancel:`p-1`,inputRoot:`px-2.5 py-0.75`,inputControl:`h-8`,viewport:`max-h-80 p-1`,groupLabel:`p-1.75 text-xs`,item:`gap-2 px-2 py-1.5`,separator:`-mx-1 my-0.5`},lg:{trigger:`h-9 gap-2.5 px-3 text-base`,triggerIcon:`text-sm`,popup:`text-base`,cancel:`p-1.25`,inputRoot:`px-3 py-0.875`,inputControl:`h-9`,viewport:`max-h-90 p-1.25`,groupLabel:`p-2 text-sm`,item:`gap-2.5 px-2.5 py-1.5`,separator:`-mx-1.25 my-0.625`},xl:{trigger:`h-10 gap-3 px-3.5 text-lg`,triggerIcon:`text-base`,popup:`text-lg`,cancel:`p-1.5`,inputRoot:`px-3.5 py-1`,inputControl:`h-10`,viewport:`max-h-100 p-1.5`,groupLabel:`p-2.5 text-base`,item:`gap-3 px-3 py-2`,separator:`-mx-1.5 my-0.75`},"2xl":{trigger:`h-12 gap-3.5 px-4 text-xl`,triggerIcon:`text-lg`,popup:`text-xl`,cancel:`p-1.75`,inputRoot:`px-4 py-1.25`,inputControl:`h-12`,viewport:`max-h-115 p-1.75`,groupLabel:`p-3 text-lg`,item:`gap-3.5 px-3.5 py-2.5`,separator:`-mx-1.75 my-0.875`}}},defaultVariants:{size:`md`}});var tT=Rl({base:`inline-flex items-center justify-center w-fit text-center font-medium border border-border rounded-sm font-inherit`,variants:{variant:{solid:`border-muted-foreground bg-muted-foreground text-muted shadow-muted-foreground/50`,outline:`border-border bg-background text-muted-foreground shadow-border`,ghost:`border-border bg-muted text-muted-foreground shadow-border/50`},size:{xs:`h-4 min-w-4 px-0.5 text-3xs data-[group]:tracking-0.5`,sm:`h-4.5 min-w-4.5 px-0.625 text-2xs data-[group]:tracking-0.625`,md:`h-5 min-w-5 px-0.75 text-xs data-[group]:tracking-0.75`,lg:`h-6 min-w-6 px-1 text-sm data-[group]:tracking-1`,xl:`h-7 min-w-7 px-1.25 text-base data-[group]:tracking-1.25`,"2xl":`h-8 min-w-8 px-1.5 text-xl data-[group]:tracking-1.5`},raised:{true:`shadow-[0_2px_0_0]`}},defaultVariants:{size:`md`,variant:`outline`,raised:!0}});Jl({extendBase:e=>({shortcut:tT({size:e.size})}),slots:{root:`flex w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,inputRoot:`group flex items-center border-b`,inputControl:`flex w-full rounded-md bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,inputIcon:`shrink-0 opacity-50`,inputClearable:`hidden group-hover:block size-1em cursor-pointer opacity-50 hover:opacity-100`,empty:`text-center`,list:`overflow-y-auto overflow-x-hidden`,group:`overflow-hidden text-foreground`,groupLabel:`flex items-center font-medium text-muted-foreground`,item:[`relative flex cursor-default select-none items-center rounded-sm outline-none`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemLabel:``,itemIcon:`shrink-0`,separator:`h-px bg-border`,shortcut:`ms-auto`},variants:{size:{xs:{root:`text-2xs`,inputRoot:`px-1.5 py-0.5`,inputControl:`h-6`,inputIcon:`me-1.5`,empty:`py-3`,list:`max-h-70 p-0.75`,groupLabel:`gap-1 p-1 text-3xs`,item:`gap-1 px-1 py-1`,separator:`-mx-1 my-0.75`},sm:{root:`text-xs`,inputRoot:`px-2 py-0.625`,inputControl:`h-7`,inputIcon:`me-1.75`,empty:`py-3.5`,list:`max-h-75 p-0.875`,groupLabel:`gap-1.25 p-1.25 text-2xs`,item:`gap-1.5 px-1.5 py-1`,separator:`-mx-1.5 my-1`},md:{root:`text-sm`,inputRoot:`px-2.5 py-0.75`,inputControl:`h-8`,inputIcon:`me-2`,empty:`py-4 text-sm`,list:`max-h-80 p-1`,groupLabel:`gap-1.75 p-1.75 text-xs`,item:`gap-2 px-2 py-1.5`,separator:`-mx-2 my-1`},lg:{root:`text-base`,inputRoot:`px-3.5 py-0.875`,inputControl:`h-9`,inputIcon:`me-2.5`,empty:`py-4.5`,list:`max-h-90 p-1.25`,groupLabel:`gap-2 p-2 text-sm`,item:`gap-2.5 px-2.5 py-1.5`,separator:`-mx-2.5 my-1.25`},xl:{root:`text-lg`,inputRoot:`px-4 py-1`,inputControl:`h-10`,inputIcon:`me-3`,empty:`py-5`,list:`max-h-100 p-1.5`,groupLabel:`gap-2.5 p-2.5 text-base`,item:`gap-3 px-3 py-2`,separator:`-mx-3 my-1.5`},"2xl":{root:`text-xl`,inputRoot:`px-4.5 py-1.25`,inputControl:`h-12`,inputIcon:`me-3.5`,empty:`py-6`,list:`max-h-115 p-1.75`,groupLabel:`gap-3 p-3 text-lg`,item:`gap-3.5 px-3.5 py-2.5`,separator:`-mx-3.5 my-2`}}},defaultVariants:{size:`md`}});var nT=Tr({name:`SDialogProvider`,__name:`dialog-provider`,setup(e){return Nb(L(()=>Tb({size:`md`}))),(e,t)=>(M(),wa(j(cx)))}});Jl({slots:{root:`relative w-full overflow-hidden rounded-full bg-muted`,indicator:`h-full w-full flex-1 rounded-full transition-[transform,width] duration-300 transform-gpu will-change-transform data-[state=indeterminate]:w-2/5 data-[state=indeterminate]:opacity-80`,circle:``,track:``,label:``},variants:{color:{primary:{indicator:`bg-primary`},destructive:{indicator:`bg-destructive`},success:{indicator:`bg-success`},warning:{indicator:`bg-warning`},info:{indicator:`bg-info`},carbon:{indicator:`bg-carbon`},secondary:{indicator:`bg-secondary-foreground/20`},accent:{indicator:`bg-accent-foreground/20`}},size:{xs:{root:`h-1.5`},sm:{root:`h-2`},md:{root:`h-2.5`},lg:{root:`h-3`},xl:{root:`h-3.5`},"2xl":{root:`h-4`}}},defaultVariants:{color:`primary`,size:`md`}}),Jl({slots:{root:`relative inline-flex shrink-0 items-center justify-center rounded-full`,indicator:`fill-none stroke-current transition-[stroke-dasharray,stroke-dashoffset] duration-300 ease-in-out`,circle:`size-full`,track:`fill-none stroke-current text-muted`,label:`pointer-events-none absolute inset-0 flex items-center justify-center`},variants:{color:{primary:{indicator:`text-primary`},destructive:{indicator:`text-destructive`},success:{indicator:`text-success`},warning:{indicator:`text-warning`},info:{indicator:`text-info`},carbon:{indicator:`text-carbon`},secondary:{indicator:`text-secondary-foreground/40`},accent:{indicator:`text-accent-foreground/40`}},size:{xs:{root:`h-8 w-8 text-[10px]`},sm:{root:`h-10 w-10 text-xs`},md:{root:`h-12 w-12 text-sm`},lg:{root:`h-16 w-16 text-base`},xl:{root:`h-20 w-20 text-lg`},"2xl":{root:`h-24 w-24 text-xl`}}},defaultVariants:{color:`primary`,size:`md`}});var rT=Jl({slots:{root:`fixed z-99999 w-0 h-0 pointer-events-none`,indicator:`fixed top-0 start-0 w-full h-0.75 bg-primary`}}),iT=Tr({name:`SProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e;return UC(L(()=>rT())),(e,n)=>(M(),wa(j(ZC),ve(Aa(t)),null,16))}}),aT=Jl({extendBase:e=>({close:Ov({size:e.size}),cancel:Dv({size:e.size,variant:`pure`}),action:Dv({size:e.size})}),slots:{toaster:[`fixed z-[--z-index] list-none outline-none transition-transform-400 ease`,`data-[x-position=right]:end-[--offset-right] data-[x-position=left]:start-[--offset-left] data-[x-position=center]:start-1/2 data-[x-position=center]:-translate-x-1/2 [&[dir=rtl]]:data-[x-position=center]:translate-x-1/2`,`data-[y-position=top]:top-[--offset-top] data-[y-position=bottom]:bottom-[--offset-bottom]`],toast:[`group absolute w-full rounded-md bg-popover text-popover-foreground border border-transparent opacity-0 outline-none touch-none`,`data-[y-position=top]:top-0 data-[y-position=top]:[--y:translateY(-100%)]`,`data-[y-position=bottom]:[--lift:-1] data-[y-position=bottom]:bottom-0`,`data-[x-position=left]:start-0 data-[x-position=right]:end-0`],wrapper:`flex flex-col items-stretch`,content:``,title:`flex items-center font-semibold`,description:`text-muted-foreground`,icon:[`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`],footer:`flex justify-end items-center`,action:``,cancel:``,close:`absolute group-data-[inverted=true]:text-accent group-data-[inverted=true]:hover:bg-accent/15`},variants:{size:{xs:{toaster:`w-80 text-2xs`,toast:`p-3`,wrapper:`gap-1`,title:`gap-1.25`,footer:`gap-1.25`,close:`top-1 end-1`},sm:{toaster:`w-85 text-xs`,toast:`p-3.5`,wrapper:`gap-1.25`,title:`gap-1.5`,footer:`gap-1.5`,close:`top-1.25 end-1.25`},md:{toaster:`w-90 text-sm`,toast:`p-4`,wrapper:`gap-1.5`,title:`gap-2`,footer:`gap-2`,close:`top-1.5 end-1.5`},lg:{toaster:`w-95 text-base`,toast:`p-4.5`,wrapper:`gap-1.75`,title:`gap-2.5`,footer:`gap-2.5`,close:`top-1.75 end-1.75`},xl:{toaster:`w-100 text-lg`,toast:`p-5`,wrapper:`gap-2`,title:`gap-3`,footer:`gap-3`,close:`top-2 end-2`},"2xl":{toaster:`w-110 text-xl`,toast:`p-6`,wrapper:`gap-2.5`,title:`gap-4`,footer:`gap-4`,close:`top-2.5 end-2.5`}}},defaultVariants:{size:`md`}}),oT=`[data-soybean-toast] {
|
|
57
|
+
--y: translateY(100%);
|
|
58
|
+
--lift: 1;
|
|
59
|
+
--lift-amount: calc(var(--lift) * var(--gap));
|
|
60
|
+
z-index: var(--z-index);
|
|
61
|
+
transform: var(--y);
|
|
62
|
+
overflow-wrap: anywhere;
|
|
63
|
+
|
|
64
|
+
transition:
|
|
65
|
+
transform 400ms,
|
|
66
|
+
opacity 400ms,
|
|
67
|
+
height 400ms,
|
|
68
|
+
box-shadow 200ms;
|
|
69
|
+
|
|
70
|
+
box-shadow: 0 4px 12px hsl(var(--foreground) / 0.1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[data-soybean-toast]:focus-visible {
|
|
74
|
+
box-shadow:
|
|
75
|
+
0 4px 12px hsl(var(--foreground) / 0.1),
|
|
76
|
+
0 0 0 2px hsl(var(--foreground) / 0.2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-soybean-toast][data-swiping='true'] {
|
|
80
|
+
transform: var(--y) translateY(var(--swipe-amount-y, 0px)) translateX(var(--swipe-amount-x, 0px));
|
|
81
|
+
transition: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-soybean-toast][data-swiping='true']::before {
|
|
85
|
+
content: '';
|
|
86
|
+
position: absolute;
|
|
87
|
+
inset-inline: -100%;
|
|
88
|
+
height: 100%;
|
|
89
|
+
z-index: -1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-soybean-toast][data-y-position='top'][data-swiping='true']::before {
|
|
93
|
+
bottom: 50%;
|
|
94
|
+
transform: scaleY(3) translateY(50%);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-soybean-toast][data-y-position='bottom'][data-swiping='true']::before {
|
|
98
|
+
top: 50%;
|
|
99
|
+
transform: scaleY(3) translateY(-50%);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-soybean-toast][data-swiping='false'][data-removed='true']::before {
|
|
103
|
+
content: '';
|
|
104
|
+
position: absolute;
|
|
105
|
+
inset: 0;
|
|
106
|
+
transform: scaleY(2);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-soybean-toast][data-expanded='true']::after {
|
|
110
|
+
content: '';
|
|
111
|
+
position: absolute;
|
|
112
|
+
inset-inline-start: 0;
|
|
113
|
+
height: calc(var(--gap) + 1px);
|
|
114
|
+
bottom: 100%;
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-soybean-toast][data-mounted='true'] {
|
|
119
|
+
--y: translateY(0);
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-soybean-toast][data-expanded='false'][data-front='false'] {
|
|
124
|
+
--scale: var(--toasts-before) * 0.05 + 1;
|
|
125
|
+
--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
|
|
126
|
+
height: var(--front-toast-height);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[data-soybean-toast][data-expanded='false'][data-front='false'] > * {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-soybean-toast][data-visible='false'] {
|
|
134
|
+
opacity: 0;
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[data-soybean-toast][data-mounted='true'][data-expanded='true'] {
|
|
139
|
+
--y: translateY(calc(var(--lift) * var(--offset)));
|
|
140
|
+
height: var(--initial-height);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[data-soybean-toast][data-removed='true'][data-front='true'][data-swipe-out='false'] {
|
|
144
|
+
--y: translateY(calc(var(--lift) * -100%));
|
|
145
|
+
opacity: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[data-soybean-toast][data-removed='true'][data-front='false'][data-swipe-out='false'][data-expanded='true'] {
|
|
149
|
+
--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
|
|
150
|
+
opacity: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
[data-soybean-toast][data-removed='true'][data-front='false'][data-swipe-out='false'][data-expanded='false'] {
|
|
154
|
+
--y: translateY(40%);
|
|
155
|
+
opacity: 0;
|
|
156
|
+
transition:
|
|
157
|
+
transform 500ms,
|
|
158
|
+
opacity 200ms;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-soybean-toast][data-removed='true'][data-front='false']::before {
|
|
162
|
+
height: calc(var(--initial-height) + 20%);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[data-soybean-toast][data-swiped='true'] {
|
|
166
|
+
-webkit-user-select: none;
|
|
167
|
+
user-select: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[data-soybean-toast][data-swipe-out='true'][data-y-position='bottom'],
|
|
171
|
+
[data-soybean-toast][data-swipe-out='true'][data-y-position='top'] {
|
|
172
|
+
animation-duration: 200ms;
|
|
173
|
+
animation-timing-function: ease-out;
|
|
174
|
+
animation-fill-mode: forwards;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-soybean-toast][data-swipe-out='true'][data-swipe-direction='left'] {
|
|
178
|
+
animation-name: swipe-out-left;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-soybean-toast][data-swipe-out='true'][data-swipe-direction='right'] {
|
|
182
|
+
animation-name: swipe-out-right;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[data-soybean-toast][data-swipe-out='true'][data-swipe-direction='up'] {
|
|
186
|
+
animation-name: swipe-out-up;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
[data-soybean-toast][data-swipe-out='true'][data-swipe-direction='down'] {
|
|
190
|
+
animation-name: swipe-out-down;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
[data-soybean-toast][data-rich-color='true'][data-type='success'] {
|
|
194
|
+
background-color: hsl(var(--success-100));
|
|
195
|
+
border-color: hsl(var(--success));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
[data-soybean-toast][data-rich-color='true'][data-type='info'] {
|
|
199
|
+
background-color: hsl(var(--info-100));
|
|
200
|
+
border-color: hsl(var(--info));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
[data-soybean-toast][data-rich-color='true'][data-type='warning'] {
|
|
204
|
+
background-color: hsl(var(--warning-100));
|
|
205
|
+
border-color: hsl(var(--warning));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-soybean-toast][data-rich-color='true'][data-type='error'] {
|
|
209
|
+
background-color: hsl(var(--destructive-100));
|
|
210
|
+
border-color: hsl(var(--destructive));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
[data-soybean-toast][data-inverted='true'] {
|
|
214
|
+
background-color: hsl(var(--carbon));
|
|
215
|
+
border-color: hsl(var(--carbon));
|
|
216
|
+
color: hsl(var(--carbon-foreground));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[data-soybean-toast] > * {
|
|
220
|
+
transition: opacity 400ms;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@keyframes swipe-out-left {
|
|
224
|
+
from {
|
|
225
|
+
transform: var(--y) translateX(var(--swipe-amount-x));
|
|
226
|
+
opacity: 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
to {
|
|
230
|
+
transform: var(--y) translateX(calc(var(--swipe-amount-x) - 100%));
|
|
231
|
+
opacity: 0;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@keyframes swipe-out-right {
|
|
236
|
+
from {
|
|
237
|
+
transform: var(--y) translateX(var(--swipe-amount-x));
|
|
238
|
+
opacity: 1;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
to {
|
|
242
|
+
transform: var(--y) translateX(calc(var(--swipe-amount-x) + 100%));
|
|
243
|
+
opacity: 0;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@keyframes swipe-out-up {
|
|
248
|
+
from {
|
|
249
|
+
transform: var(--y) translateY(var(--swipe-amount-y));
|
|
250
|
+
opacity: 1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
to {
|
|
254
|
+
transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%));
|
|
255
|
+
opacity: 0;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@keyframes swipe-out-down {
|
|
260
|
+
from {
|
|
261
|
+
transform: var(--y) translateY(var(--swipe-amount-y));
|
|
262
|
+
opacity: 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
to {
|
|
266
|
+
transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%));
|
|
267
|
+
opacity: 0;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@keyframes sonner-fade-in {
|
|
272
|
+
0% {
|
|
273
|
+
opacity: 0;
|
|
274
|
+
transform: scale(0.8);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
100% {
|
|
278
|
+
opacity: 1;
|
|
279
|
+
transform: scale(1);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@keyframes sonner-fade-out {
|
|
284
|
+
0% {
|
|
285
|
+
opacity: 1;
|
|
286
|
+
transform: scale(1);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
100% {
|
|
290
|
+
opacity: 0;
|
|
291
|
+
transform: scale(0.8);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@media (max-width: 600px) {
|
|
296
|
+
[data-soybean-toaster] {
|
|
297
|
+
width: 100%;
|
|
298
|
+
inset-inline-start: var(--mobile-offset-left);
|
|
299
|
+
inset-inline-end: var(--mobile-offset-right);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
[data-soybean-toaster][data-soybean-toast] {
|
|
303
|
+
inset-inline: 0;
|
|
304
|
+
width: calc(100% - var(--mobile-offset-left) * 2);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[data-soybean-toaster][data-x-position='left'] {
|
|
308
|
+
inset-inline-start: var(--mobile-offset-left);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
[data-soybean-toaster][data-y-position='bottom'] {
|
|
312
|
+
bottom: var(--mobile-offset-bottom);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
[data-soybean-toaster][data-y-position='top'] {
|
|
316
|
+
top: var(--mobile-offset-top);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-soybean-toaster][data-x-position='center'] {
|
|
320
|
+
inset-inline-start: var(--mobile-offset-left);
|
|
321
|
+
inset-inline-end: var(--mobile-offset-right);
|
|
322
|
+
transform: none;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
`,sT=Tr({name:`SToastProvider`,__name:`toast-provider`,props:{size:{},ui:{},id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=mv(t,[`size`,`ui`]),r=L(()=>aT({size:t.size},t.ui));return $_(oT,{id:`__SoybeanUI_toastStyle`}),vw(r),(e,t)=>(M(),wa(j(Xw),ve(Aa(j(n))),{default:Rn(()=>[$r(e.$slots,`default`)]),_:3},16))}}),cT=(e,t)=>{e.prototype.toLab=function(){return Zu(fd(this.getSource())||Qu(this.rgb))},e.prototype.toLabString=function(){return pd(this.getSource())||dd(this.rgb)},e.prototype.delta=function(t=`#FFF`){let n=t instanceof e?t:new e(t);return Su(xu(kd(this.toLab(),n.toLab())/100,3))},t.string.push([ld,`lab`]),t.object.push([od,`lab`])},lT={inherit:`inherit`,current:`currentColor`,transparent:`transparent`,black:{hex:`#000000`,rgb:`rgb(0 0 0)`,hsl:`hsl(0 0% 0%)`,oklch:`oklch(0% 0 0)`},white:{hex:`#ffffff`,rgb:`rgb(255 255 255)`,hsl:`hsl(0 0% 100%)`,oklch:`oklch(100% 0 0)`}},uT={slate:{50:{level:50,hex:`#f8fafc`,rgb:`rgb(248 250 252)`,hsl:`hsl(210 40% 98%)`,oklch:`oklch(98% 0 248)`},100:{level:100,hex:`#f1f5f9`,rgb:`rgb(241 245 249)`,hsl:`hsl(210 40% 96.1%)`,oklch:`oklch(97% 0.01 248)`},200:{level:200,hex:`#e2e8f0`,rgb:`rgb(226 232 240)`,hsl:`hsl(214.3 31.8% 91.4%)`,oklch:`oklch(93% 0.01 256)`},300:{level:300,hex:`#cbd5e1`,rgb:`rgb(203 213 225)`,hsl:`hsl(212.7 26.8% 83.9%)`,oklch:`oklch(87% 0.02 253)`},400:{level:400,hex:`#94a3b8`,rgb:`rgb(148 163 184)`,hsl:`hsl(215 20.2% 65.1%)`,oklch:`oklch(71% 0.04 257)`},500:{level:500,hex:`#64748b`,rgb:`rgb(100 116 139)`,hsl:`hsl(215.4 16.3% 46.9%)`,oklch:`oklch(55% 0.04 257)`},600:{level:600,hex:`#475569`,rgb:`rgb(71 85 105)`,hsl:`hsl(215.3 19.3% 34.5%)`,oklch:`oklch(45% 0.04 257)`},700:{level:700,hex:`#334155`,rgb:`rgb(51 65 85)`,hsl:`hsl(215.3 25% 26.7%)`,oklch:`oklch(37% 0.04 257)`},800:{level:800,hex:`#1e293b`,rgb:`rgb(30 41 59)`,hsl:`hsl(217.2 32.6% 17.5%)`,oklch:`oklch(28% 0.04 260)`},900:{level:900,hex:`#0f172a`,rgb:`rgb(15 23 42)`,hsl:`hsl(222.2 47.4% 11.2%)`,oklch:`oklch(21% 0.04 266)`},950:{level:950,hex:`#020617`,rgb:`rgb(2 6 23)`,hsl:`hsl(222.2 84% 4.9%)`,oklch:`oklch(13% 0.04 265)`}},mist:{50:{level:50,hex:`#f9fafb`,rgb:`rgb(249 250 251)`,hsl:`hsl(189.3 20.3% 97.9%)`,oklch:`oklch(0.98 0.00 210)`},100:{level:100,hex:`#f0f4f5`,rgb:`rgb(240 244 245)`,hsl:`hsl(189.4 21.6% 95.1%)`,oklch:`oklch(0.96 0.01 210)`},200:{level:200,hex:`#dce5e6`,rgb:`rgb(220 229 230)`,hsl:`hsl(189.4 16.2% 88.4%)`,oklch:`oklch(0.92 0.01 210)`},300:{level:300,hex:`#c1cfd2`,rgb:`rgb(193 207 210)`,hsl:`hsl(189.4 15.8% 79%)`,oklch:`oklch(0.84 0.02 210)`},400:{level:400,hex:`#8da5a9`,rgb:`rgb(141 165 169)`,hsl:`hsl(189.3 14% 60.9%)`,oklch:`oklch(0.70 0.03 210)`},500:{level:500,hex:`#648085`,rgb:`rgb(100 128 133)`,hsl:`hsl(189.3 14.2% 45.7%)`,oklch:`oklch(0.58 0.03 210)`},600:{level:600,hex:`#4f676b`,rgb:`rgb(79 103 107)`,hsl:`hsl(189.3 15.1% 36.5%)`,oklch:`oklch(0.49 0.03 210)`},700:{level:700,hex:`#3d5155`,rgb:`rgb(61 81 85)`,hsl:`hsl(189.3 15.9% 28.6%)`,oklch:`oklch(0.42 0.03 210)`},800:{level:800,hex:`#2d3c3f`,rgb:`rgb(45 60 63)`,hsl:`hsl(189.3 17.2% 21.2%)`,oklch:`oklch(0.34 0.02 210)`},900:{level:900,hex:`#1e2a2c`,rgb:`rgb(30 42 44)`,hsl:`hsl(189.3 19.2% 14.6%)`,oklch:`oklch(0.28 0.02 210)`},950:{level:950,hex:`#0e1517`,rgb:`rgb(14 21 23)`,hsl:`hsl(189.3 25.3% 7.1%)`,oklch:`oklch(0.19 0.01 210)`}},gray:{50:{level:50,hex:`#f9fafb`,rgb:`rgb(249 250 251)`,hsl:`hsl(210 20% 98%)`,oklch:`oklch(98% 0 248)`},100:{level:100,hex:`#f3f4f6`,rgb:`rgb(243 244 246)`,hsl:`hsl(220 14.3% 95.9%)`,oklch:`oklch(97% 0 265)`},200:{level:200,hex:`#e5e7eb`,rgb:`rgb(229 231 235)`,hsl:`hsl(220 13% 91%)`,oklch:`oklch(93% 0.01 265)`},300:{level:300,hex:`#d1d5db`,rgb:`rgb(209 213 219)`,hsl:`hsl(216 12.2% 83.9%)`,oklch:`oklch(87% 0.01 258)`},400:{level:400,hex:`#9ca3af`,rgb:`rgb(156 163 175)`,hsl:`hsl(217.9 10.6% 64.9%)`,oklch:`oklch(71% 0.02 261)`},500:{level:500,hex:`#6b7280`,rgb:`rgb(107 114 128)`,hsl:`hsl(220 8.9% 46.1%)`,oklch:`oklch(55% 0.02 264)`},600:{level:600,hex:`#4b5563`,rgb:`rgb(75 85 99)`,hsl:`hsl(215 13.8% 34.1%)`,oklch:`oklch(45% 0.03 257)`},700:{level:700,hex:`#374151`,rgb:`rgb(55 65 81)`,hsl:`hsl(216.9 19.1% 26.7%)`,oklch:`oklch(37% 0.03 260)`},800:{level:800,hex:`#1f2937`,rgb:`rgb(31 41 55)`,hsl:`hsl(215 27.9% 16.9%)`,oklch:`oklch(28% 0.03 257)`},900:{level:900,hex:`#111827`,rgb:`rgb(17 24 39)`,hsl:`hsl(220.9 39.3% 11%)`,oklch:`oklch(21% 0.03 265)`},950:{level:950,hex:`#030712`,rgb:`rgb(3 7 18)`,hsl:`hsl(224 71.4% 4.1%)`,oklch:`oklch(13% 0.03 262)`}},zinc:{50:{level:50,hex:`#fafafa`,rgb:`rgb(250 250 250)`,hsl:`hsl(0 0% 98%)`,oklch:`oklch(99% 0 360)`},100:{level:100,hex:`#f4f4f5`,rgb:`rgb(244 244 245)`,hsl:`hsl(240 4.8% 95.9%)`,oklch:`oklch(97% 0 286)`},200:{level:200,hex:`#e4e4e7`,rgb:`rgb(228 228 231)`,hsl:`hsl(240 5.9% 90%)`,oklch:`oklch(92% 0 286)`},300:{level:300,hex:`#d4d4d8`,rgb:`rgb(212 212 216)`,hsl:`hsl(240 4.9% 83.9%)`,oklch:`oklch(87% 0.01 286)`},400:{level:400,hex:`#a1a1aa`,rgb:`rgb(161 161 170)`,hsl:`hsl(240 5% 64.9%)`,oklch:`oklch(71% 0.01 286)`},500:{level:500,hex:`#71717a`,rgb:`rgb(113 113 122)`,hsl:`hsl(240 3.8% 46.1%)`,oklch:`oklch(55% 0.01 286)`},600:{level:600,hex:`#52525b`,rgb:`rgb(82 82 91)`,hsl:`hsl(240 5.2% 33.9%)`,oklch:`oklch(44% 0.01 286)`},700:{level:700,hex:`#3f3f46`,rgb:`rgb(63 63 70)`,hsl:`hsl(240 5.3% 26.1%)`,oklch:`oklch(37% 0.01 286)`},800:{level:800,hex:`#27272a`,rgb:`rgb(39 39 42)`,hsl:`hsl(240 3.7% 15.9%)`,oklch:`oklch(27% 0.01 286)`},900:{level:900,hex:`#18181b`,rgb:`rgb(24 24 27)`,hsl:`hsl(240 5.9% 10%)`,oklch:`oklch(21% 0.01 286)`},950:{level:950,hex:`#09090b`,rgb:`rgb(9 9 11)`,hsl:`hsl(240 10% 3.9%)`,oklch:`oklch(14% 0 286)`}},neutral:{50:{level:50,hex:`#fafafa`,rgb:`rgb(250 250 250)`,hsl:`hsl(0 0% 98%)`,oklch:`oklch(99% 0 360)`},100:{level:100,hex:`#f5f5f5`,rgb:`rgb(245 245 245)`,hsl:`hsl(0 0% 96.1%)`,oklch:`oklch(97% 0 360)`},200:{level:200,hex:`#e5e5e5`,rgb:`rgb(229 229 229)`,hsl:`hsl(0 0% 89.8%)`,oklch:`oklch(92% 0 360)`},300:{level:300,hex:`#d4d4d4`,rgb:`rgb(212 212 212)`,hsl:`hsl(0 0% 83.1%)`,oklch:`oklch(87% 0 360)`},400:{level:400,hex:`#a3a3a3`,rgb:`rgb(163 163 163)`,hsl:`hsl(0 0% 63.9%)`,oklch:`oklch(72% 0 360)`},500:{level:500,hex:`#737373`,rgb:`rgb(115 115 115)`,hsl:`hsl(0 0% 45.1%)`,oklch:`oklch(56% 0 360)`},600:{level:600,hex:`#525252`,rgb:`rgb(82 82 82)`,hsl:`hsl(0 0% 32.2%)`,oklch:`oklch(44% 0 360)`},700:{level:700,hex:`#404040`,rgb:`rgb(64 64 64)`,hsl:`hsl(0 0% 25.1%)`,oklch:`oklch(37% 0 360)`},800:{level:800,hex:`#262626`,rgb:`rgb(38 38 38)`,hsl:`hsl(0 0% 14.9%)`,oklch:`oklch(27% 0 360)`},900:{level:900,hex:`#171717`,rgb:`rgb(23 23 23)`,hsl:`hsl(0 0% 9%)`,oklch:`oklch(20% 0 360)`},950:{level:950,hex:`#0a0a0a`,rgb:`rgb(10 10 10)`,hsl:`hsl(0 0% 3.9%)`,oklch:`oklch(14% 0 360)`}},stone:{50:{level:50,hex:`#fafaf9`,rgb:`rgb(250 250 249)`,hsl:`hsl(60 9.1% 97.8%)`,oklch:`oklch(98% 0 106)`},100:{level:100,hex:`#f5f5f4`,rgb:`rgb(245 245 244)`,hsl:`hsl(60 4.8% 95.9%)`,oklch:`oklch(97% 0 106)`},200:{level:200,hex:`#e7e5e4`,rgb:`rgb(231 229 228)`,hsl:`hsl(20 5.9% 90%)`,oklch:`oklch(92% 0 49)`},300:{level:300,hex:`#d6d3d1`,rgb:`rgb(214 211 209)`,hsl:`hsl(24 5.7% 82.9%)`,oklch:`oklch(87% 0 56)`},400:{level:400,hex:`#a8a29e`,rgb:`rgb(168 162 158)`,hsl:`hsl(24 5.4% 63.9%)`,oklch:`oklch(72% 0.01 56)`},500:{level:500,hex:`#78716c`,rgb:`rgb(120 113 108)`,hsl:`hsl(25 5.3% 44.7%)`,oklch:`oklch(55% 0.01 58)`},600:{level:600,hex:`#57534e`,rgb:`rgb(87 83 78)`,hsl:`hsl(33.3 5.5% 32.4%)`,oklch:`oklch(44% 0.01 74)`},700:{level:700,hex:`#44403c`,rgb:`rgb(68 64 60)`,hsl:`hsl(30 6.3% 25.1%)`,oklch:`oklch(37% 0.01 68)`},800:{level:800,hex:`#292524`,rgb:`rgb(41 37 36)`,hsl:`hsl(12 6.5% 15.1%)`,oklch:`oklch(27% 0.01 34)`},900:{level:900,hex:`#1c1917`,rgb:`rgb(28 25 23)`,hsl:`hsl(24 9.8% 10%)`,oklch:`oklch(22% 0.01 56)`},950:{level:950,hex:`#0c0a09`,rgb:`rgb(12 10 9)`,hsl:`hsl(20 14.3% 4.1%)`,oklch:`oklch(15% 0 49)`}},taupe:{50:{level:50,hex:`#fbfaf9`,rgb:`rgb(251 250 249)`,hsl:`hsl(34 21.3% 97.9%)`,oklch:`oklch(0.98 0.00 75)`},100:{level:100,hex:`#f5f3f0`,rgb:`rgb(245 243 240)`,hsl:`hsl(34 22.7% 95.1%)`,oklch:`oklch(0.96 0.01 75)`},200:{level:200,hex:`#e7e2dc`,rgb:`rgb(231 226 220)`,hsl:`hsl(34.1 18.7% 88.4%)`,oklch:`oklch(0.92 0.01 75)`},300:{level:300,hex:`#d3cbc0`,rgb:`rgb(211 203 192)`,hsl:`hsl(34.1 18.3% 79%)`,oklch:`oklch(0.84 0.02 75)`},400:{level:400,hex:`#aa9e8d`,rgb:`rgb(170 158 141)`,hsl:`hsl(34.2 14.8% 61.1%)`,oklch:`oklch(0.70 0.03 75)`},500:{level:500,hex:`#867865`,rgb:`rgb(134 120 101)`,hsl:`hsl(34.3 14.1% 46.1%)`,oklch:`oklch(0.58 0.03 75)`},600:{level:600,hex:`#6c6050`,rgb:`rgb(108 96 80)`,hsl:`hsl(34.3 14.9% 36.8%)`,oklch:`oklch(0.49 0.03 75)`},700:{level:700,hex:`#554b3e`,rgb:`rgb(85 75 62)`,hsl:`hsl(34.3 15.7% 28.9%)`,oklch:`oklch(0.42 0.03 75)`},800:{level:800,hex:`#40382d`,rgb:`rgb(64 56 45)`,hsl:`hsl(34.3 17% 21.4%)`,oklch:`oklch(0.34 0.02 75)`},900:{level:900,hex:`#2c271f`,rgb:`rgb(44 39 31)`,hsl:`hsl(34.3 17.7% 14.8%)`,oklch:`oklch(0.28 0.02 75)`},950:{level:950,hex:`#17130e`,rgb:`rgb(23 19 14)`,hsl:`hsl(34.4 24.8% 7.2%)`,oklch:`oklch(0.19 0.01 75)`}},olive:{50:{level:50,hex:`#f9faf9`,rgb:`rgb(249 250 249)`,hsl:`hsl(136.8 13.4% 97.9%)`,oklch:`oklch(0.98 0.00 155)`},100:{level:100,hex:`#f1f4f2`,rgb:`rgb(241 244 242)`,hsl:`hsl(136.9 14.2% 95.2%)`,oklch:`oklch(0.96 0.01 155)`},200:{level:200,hex:`#dee5e0`,rgb:`rgb(222 229 224)`,hsl:`hsl(137 10.6% 88.5%)`,oklch:`oklch(0.92 0.01 155)`},300:{level:300,hex:`#c4cfc8`,rgb:`rgb(196 207 200)`,hsl:`hsl(137.2 10.3% 79.2%)`,oklch:`oklch(0.84 0.02 155)`},400:{level:400,hex:`#94a599`,rgb:`rgb(148 165 153)`,hsl:`hsl(137.8 8.7% 61.4%)`,oklch:`oklch(0.70 0.03 155)`},500:{level:500,hex:`#6c8072`,rgb:`rgb(108 128 114)`,hsl:`hsl(138.4 8.6% 46.3%)`,oklch:`oklch(0.58 0.03 155)`},600:{level:600,hex:`#56675b`,rgb:`rgb(86 103 91)`,hsl:`hsl(138.4 9.1% 37%)`,oklch:`oklch(0.49 0.03 155)`},700:{level:700,hex:`#435147`,rgb:`rgb(67 81 71)`,hsl:`hsl(138.4 9.5% 29.1%)`,oklch:`oklch(0.42 0.02 155)`},800:{level:800,hex:`#313c35`,rgb:`rgb(49 60 53)`,hsl:`hsl(138.4 10.2% 21.5%)`,oklch:`oklch(0.34 0.02 155)`},900:{level:900,hex:`#222a24`,rgb:`rgb(34 42 36)`,hsl:`hsl(138.5 11.2% 14.8%)`,oklch:`oklch(0.28 0.02 155)`},950:{level:950,hex:`#101512`,rgb:`rgb(16 21 18)`,hsl:`hsl(138.4 14.2% 7.3%)`,oklch:`oklch(0.19 0.01 155)`}},mauve:{50:{level:50,hex:`#fafafb`,rgb:`rgb(250 250 251)`,hsl:`hsl(272.4 15% 98.2%)`,oklch:`oklch(0.98 0.00 310)`},100:{level:100,hex:`#f4f2f6`,rgb:`rgb(244 242 246)`,hsl:`hsl(272.4 16.1% 95.8%)`,oklch:`oklch(0.96 0.01 310)`},200:{level:200,hex:`#e5e1e8`,rgb:`rgb(229 225 232)`,hsl:`hsl(272.5 13% 89.6%)`,oklch:`oklch(0.92 0.01 310)`},300:{level:300,hex:`#d0c9d5`,rgb:`rgb(208 201 213)`,hsl:`hsl(272.6 12.6% 81.2%)`,oklch:`oklch(0.84 0.02 310)`},400:{level:400,hex:`#a69bae`,rgb:`rgb(166 155 174)`,hsl:`hsl(272.9 10.6% 64.6%)`,oklch:`oklch(0.70 0.03 310)`},500:{level:500,hex:`#81758b`,rgb:`rgb(129 117 139)`,hsl:`hsl(273.2 8.6% 50.1%)`,oklch:`oklch(0.58 0.04 310)`},600:{level:600,hex:`#675d70`,rgb:`rgb(103 93 112)`,hsl:`hsl(273.2 9.2% 40.2%)`,oklch:`oklch(0.49 0.03 310)`},700:{level:700,hex:`#524959`,rgb:`rgb(82 73 89)`,hsl:`hsl(273.3 9.7% 31.7%)`,oklch:`oklch(0.42 0.03 310)`},800:{level:800,hex:`#3d3642`,rgb:`rgb(61 54 66)`,hsl:`hsl(273.3 10.2% 23.6%)`,oklch:`oklch(0.34 0.02 310)`},900:{level:900,hex:`#2a252e`,rgb:`rgb(42 37 46)`,hsl:`hsl(273.3 10.9% 16.4%)`,oklch:`oklch(0.28 0.02 310)`},950:{level:950,hex:`#161218`,rgb:`rgb(22 18 24)`,hsl:`hsl(273.3 14.1% 8.3%)`,oklch:`oklch(0.19 0.01 310)`}},red:{50:{level:50,hex:`#fef2f2`,rgb:`rgb(254 242 242)`,hsl:`hsl(0 85.7% 97.3%)`,oklch:`oklch(97% 0.01 17)`},100:{level:100,hex:`#fee2e2`,rgb:`rgb(254 226 226)`,hsl:`hsl(0 93.3% 94.1%)`,oklch:`oklch(94% 0.03 18)`},200:{level:200,hex:`#fecaca`,rgb:`rgb(254 202 202)`,hsl:`hsl(0 96.3% 89.4%)`,oklch:`oklch(88% 0.06 18)`},300:{level:300,hex:`#fca5a5`,rgb:`rgb(252 165 165)`,hsl:`hsl(0 93.5% 81.8%)`,oklch:`oklch(81% 0.1 20)`},400:{level:400,hex:`#f87171`,rgb:`rgb(248 113 113)`,hsl:`hsl(0 90.6% 70.8%)`,oklch:`oklch(71% 0.17 22)`},500:{level:500,hex:`#ef4444`,rgb:`rgb(239 68 68)`,hsl:`hsl(0 84.2% 60.2%)`,oklch:`oklch(64% 0.21 25)`},600:{level:600,hex:`#dc2626`,rgb:`rgb(220 38 38)`,hsl:`hsl(0 72.2% 50.6%)`,oklch:`oklch(58% 0.22 27)`},700:{level:700,hex:`#b91c1c`,rgb:`rgb(185 28 28)`,hsl:`hsl(0 73.7% 41.8%)`,oklch:`oklch(51% 0.19 28)`},800:{level:800,hex:`#991b1b`,rgb:`rgb(153 27 27)`,hsl:`hsl(0 70% 35.3%)`,oklch:`oklch(44% 0.16 27)`},900:{level:900,hex:`#7f1d1d`,rgb:`rgb(127 29 29)`,hsl:`hsl(0 62.8% 30.6%)`,oklch:`oklch(40% 0.13 26)`},950:{level:950,hex:`#450a0a`,rgb:`rgb(69 10 10)`,hsl:`hsl(0 74.7% 15.5%)`,oklch:`oklch(26% 0.09 26)`}},orange:{50:{level:50,hex:`#fff7ed`,rgb:`rgb(255 247 237)`,hsl:`hsl(33.3 100% 96.5%)`,oklch:`oklch(98% 0.02 74)`},100:{level:100,hex:`#ffedd5`,rgb:`rgb(255 237 213)`,hsl:`hsl(34.3 100% 91.8%)`,oklch:`oklch(95% 0.04 75)`},200:{level:200,hex:`#fed7aa`,rgb:`rgb(254 215 170)`,hsl:`hsl(32.1 97.7% 83.1%)`,oklch:`oklch(90% 0.07 71)`},300:{level:300,hex:`#fdba74`,rgb:`rgb(253 186 116)`,hsl:`hsl(30.7 97.2% 72.4%)`,oklch:`oklch(84% 0.12 66)`},400:{level:400,hex:`#fb923c`,rgb:`rgb(251 146 60)`,hsl:`hsl(27 96% 61%)`,oklch:`oklch(76% 0.16 56)`},500:{level:500,hex:`#f97316`,rgb:`rgb(249 115 22)`,hsl:`hsl(24.6 95% 53.1%)`,oklch:`oklch(70% 0.19 48)`},600:{level:600,hex:`#ea580c`,rgb:`rgb(234 88 12)`,hsl:`hsl(20.5 90.2% 48.2%)`,oklch:`oklch(65% 0.19 41)`},700:{level:700,hex:`#c2410c`,rgb:`rgb(194 65 12)`,hsl:`hsl(17.5 88.3% 40.4%)`,oklch:`oklch(55% 0.17 38)`},800:{level:800,hex:`#9a3412`,rgb:`rgb(154 52 18)`,hsl:`hsl(15 79.1% 33.7%)`,oklch:`oklch(47% 0.14 37)`},900:{level:900,hex:`#7c2d12`,rgb:`rgb(124 45 18)`,hsl:`hsl(15.3 74.6% 27.8%)`,oklch:`oklch(41% 0.12 38)`},950:{level:950,hex:`#431407`,rgb:`rgb(67 20 7)`,hsl:`hsl(13 81.1% 14.5%)`,oklch:`oklch(27% 0.08 36)`}},amber:{50:{level:50,hex:`#fffbeb`,rgb:`rgb(255 251 235)`,hsl:`hsl(48 100% 96.1%)`,oklch:`oklch(99% 0.02 95)`},100:{level:100,hex:`#fef3c7`,rgb:`rgb(254 243 199)`,hsl:`hsl(48 96.5% 88.8%)`,oklch:`oklch(96% 0.06 96)`},200:{level:200,hex:`#fde68a`,rgb:`rgb(253 230 138)`,hsl:`hsl(48 96.6% 76.7%)`,oklch:`oklch(92% 0.12 96)`},300:{level:300,hex:`#fcd34d`,rgb:`rgb(252 211 77)`,hsl:`hsl(45.9 96.7% 64.5%)`,oklch:`oklch(88% 0.15 92)`},400:{level:400,hex:`#fbbf24`,rgb:`rgb(251 191 36)`,hsl:`hsl(43.3 96.4% 56.3%)`,oklch:`oklch(84% 0.16 84)`},500:{level:500,hex:`#f59e0b`,rgb:`rgb(245 158 11)`,hsl:`hsl(37.7 92.1% 50.2%)`,oklch:`oklch(77% 0.16 70)`},600:{level:600,hex:`#d97706`,rgb:`rgb(217 119 6)`,hsl:`hsl(32.1 94.6% 43.7%)`,oklch:`oklch(67% 0.16 58)`},700:{level:700,hex:`#b45309`,rgb:`rgb(180 83 9)`,hsl:`hsl(26 90.5% 37.1%)`,oklch:`oklch(56% 0.15 49)`},800:{level:800,hex:`#92400e`,rgb:`rgb(146 64 14)`,hsl:`hsl(22.7 82.5% 31.4%)`,oklch:`oklch(47% 0.12 46)`},900:{level:900,hex:`#78350f`,rgb:`rgb(120 53 15)`,hsl:`hsl(21.7 77.8% 26.5%)`,oklch:`oklch(41% 0.11 46)`},950:{level:950,hex:`#451a03`,rgb:`rgb(69 26 3)`,hsl:`hsl(20.9 91.7% 14.1%)`,oklch:`oklch(28% 0.07 46)`}},yellow:{50:{level:50,hex:`#fefce8`,rgb:`rgb(254 252 232)`,hsl:`hsl(54.5 91.7% 95.3%)`,oklch:`oklch(99% 0.03 102)`},100:{level:100,hex:`#fef9c3`,rgb:`rgb(254 249 195)`,hsl:`hsl(54.9 96.7% 88%)`,oklch:`oklch(97% 0.07 103)`},200:{level:200,hex:`#fef08a`,rgb:`rgb(254 240 138)`,hsl:`hsl(52.8 98.3% 76.9%)`,oklch:`oklch(95% 0.12 102)`},300:{level:300,hex:`#fde047`,rgb:`rgb(253 224 71)`,hsl:`hsl(50.4 97.8% 63.5%)`,oklch:`oklch(91% 0.17 98)`},400:{level:400,hex:`#facc15`,rgb:`rgb(250 204 21)`,hsl:`hsl(47.9 95.8% 53.1%)`,oklch:`oklch(86% 0.17 92)`},500:{level:500,hex:`#eab308`,rgb:`rgb(234 179 8)`,hsl:`hsl(45.4 93.4% 47.5%)`,oklch:`oklch(80% 0.16 86)`},600:{level:600,hex:`#ca8a04`,rgb:`rgb(202 138 4)`,hsl:`hsl(40.6 96.1% 40.4%)`,oklch:`oklch(68% 0.14 76)`},700:{level:700,hex:`#a16207`,rgb:`rgb(161 98 7)`,hsl:`hsl(35.5 91.7% 32.9%)`,oklch:`oklch(55% 0.12 66)`},800:{level:800,hex:`#854d0e`,rgb:`rgb(133 77 14)`,hsl:`hsl(31.8 81% 28.8%)`,oklch:`oklch(48% 0.1 62)`},900:{level:900,hex:`#713f12`,rgb:`rgb(113 63 18)`,hsl:`hsl(28.4 72.5% 25.7%)`,oklch:`oklch(42% 0.09 58)`},950:{level:950,hex:`#422006`,rgb:`rgb(66 32 6)`,hsl:`hsl(26 83.3% 14.1%)`,oklch:`oklch(29% 0.06 54)`}},lime:{50:{level:50,hex:`#f7fee7`,rgb:`rgb(247 254 231)`,hsl:`hsl(78.3 92% 95.1%)`,oklch:`oklch(99% 0.03 121)`},100:{level:100,hex:`#ecfccb`,rgb:`rgb(236 252 203)`,hsl:`hsl(79.6 89.1% 89.2%)`,oklch:`oklch(97% 0.07 122)`},200:{level:200,hex:`#d9f99d`,rgb:`rgb(217 249 157)`,hsl:`hsl(80.9 88.5% 79.6%)`,oklch:`oklch(94% 0.12 124)`},300:{level:300,hex:`#bef264`,rgb:`rgb(190 242 100)`,hsl:`hsl(82 84.5% 67.1%)`,oklch:`oklch(90% 0.18 127)`},400:{level:400,hex:`#a3e635`,rgb:`rgb(163 230 53)`,hsl:`hsl(82.7 78% 55.5%)`,oklch:`oklch(85% 0.21 129)`},500:{level:500,hex:`#84cc16`,rgb:`rgb(132 204 22)`,hsl:`hsl(83.7 80.5% 44.3%)`,oklch:`oklch(77% 0.2 131)`},600:{level:600,hex:`#65a30d`,rgb:`rgb(101 163 13)`,hsl:`hsl(84.8 85.2% 34.5%)`,oklch:`oklch(65% 0.18 132)`},700:{level:700,hex:`#4d7c0f`,rgb:`rgb(77 124 15)`,hsl:`hsl(85.9 78.4% 27.3%)`,oklch:`oklch(53% 0.14 132)`},800:{level:800,hex:`#3f6212`,rgb:`rgb(63 98 18)`,hsl:`hsl(86.3 69% 22.7%)`,oklch:`oklch(45% 0.11 131)`},900:{level:900,hex:`#365314`,rgb:`rgb(54 83 20)`,hsl:`hsl(87.6 61.2% 20.2%)`,oklch:`oklch(41% 0.1 131)`},950:{level:950,hex:`#1a2e05`,rgb:`rgb(26 46 5)`,hsl:`hsl(89.3 80.4% 10%)`,oklch:`oklch(27% 0.07 132)`}},green:{50:{level:50,hex:`#f0fdf4`,rgb:`rgb(240 253 244)`,hsl:`hsl(138.5 76.5% 96.7%)`,oklch:`oklch(98% 0.02 156)`},100:{level:100,hex:`#dcfce7`,rgb:`rgb(220 252 231)`,hsl:`hsl(140.6 84.2% 92.5%)`,oklch:`oklch(96% 0.04 157)`},200:{level:200,hex:`#bbf7d0`,rgb:`rgb(187 247 208)`,hsl:`hsl(141 78.9% 85.1%)`,oklch:`oklch(93% 0.08 156)`},300:{level:300,hex:`#86efac`,rgb:`rgb(134 239 172)`,hsl:`hsl(141.7 76.6% 73.1%)`,oklch:`oklch(87% 0.14 154)`},400:{level:400,hex:`#4ade80`,rgb:`rgb(74 222 128)`,hsl:`hsl(141.9 69.2% 58%)`,oklch:`oklch(80% 0.18 152)`},500:{level:500,hex:`#22c55e`,rgb:`rgb(34 197 94)`,hsl:`hsl(142.1 70.6% 45.3%)`,oklch:`oklch(72% 0.19 150)`},600:{level:600,hex:`#16a34a`,rgb:`rgb(22 163 74)`,hsl:`hsl(142.1 76.2% 36.3%)`,oklch:`oklch(63% 0.17 149)`},700:{level:700,hex:`#15803d`,rgb:`rgb(21 128 61)`,hsl:`hsl(142.4 71.8% 29.2%)`,oklch:`oklch(53% 0.14 150)`},800:{level:800,hex:`#166534`,rgb:`rgb(22 101 52)`,hsl:`hsl(142.8 64.2% 24.1%)`,oklch:`oklch(45% 0.11 151)`},900:{level:900,hex:`#14532d`,rgb:`rgb(20 83 45)`,hsl:`hsl(143.8 61.2% 20.2%)`,oklch:`oklch(39% 0.09 153)`},950:{level:950,hex:`#052e16`,rgb:`rgb(5 46 22)`,hsl:`hsl(144.9 80.4% 10%)`,oklch:`oklch(27% 0.06 153)`}},emerald:{50:{level:50,hex:`#ecfdf5`,rgb:`rgb(236 253 245)`,hsl:`hsl(151.8 81% 95.9%)`,oklch:`oklch(98% 0.02 166)`},100:{level:100,hex:`#d1fae5`,rgb:`rgb(209 250 229)`,hsl:`hsl(149.3 80.4% 90%)`,oklch:`oklch(95% 0.05 163)`},200:{level:200,hex:`#a7f3d0`,rgb:`rgb(167 243 208)`,hsl:`hsl(152.4 76% 80.4%)`,oklch:`oklch(90% 0.09 164)`},300:{level:300,hex:`#6ee7b7`,rgb:`rgb(110 231 183)`,hsl:`hsl(156.2 71.6% 66.9%)`,oklch:`oklch(85% 0.13 165)`},400:{level:400,hex:`#34d399`,rgb:`rgb(52 211 153)`,hsl:`hsl(158.1 64.4% 51.6%)`,oklch:`oklch(77% 0.15 163)`},500:{level:500,hex:`#10b981`,rgb:`rgb(16 185 129)`,hsl:`hsl(160.1 84.1% 39.4%)`,oklch:`oklch(70% 0.15 162)`},600:{level:600,hex:`#059669`,rgb:`rgb(5 150 105)`,hsl:`hsl(161.4 93.5% 30.4%)`,oklch:`oklch(60% 0.13 163)`},700:{level:700,hex:`#047857`,rgb:`rgb(4 120 87)`,hsl:`hsl(162.9 93.5% 24.3%)`,oklch:`oklch(51% 0.1 166)`},800:{level:800,hex:`#065f46`,rgb:`rgb(6 95 70)`,hsl:`hsl(163.1 88.1% 19.8%)`,oklch:`oklch(43% 0.09 167)`},900:{level:900,hex:`#064e3b`,rgb:`rgb(6 78 59)`,hsl:`hsl(164.2 85.7% 16.5%)`,oklch:`oklch(38% 0.07 169)`},950:{level:950,hex:`#022c22`,rgb:`rgb(2 44 34)`,hsl:`hsl(165.7 91.3% 9%)`,oklch:`oklch(26% 0.05 173)`}},teal:{50:{level:50,hex:`#f0fdfa`,rgb:`rgb(240 253 250)`,hsl:`hsl(166.2 76.5% 96.7%)`,oklch:`oklch(98% 0.01 181)`},100:{level:100,hex:`#ccfbf1`,rgb:`rgb(204 251 241)`,hsl:`hsl(167.2 85.5% 89.2%)`,oklch:`oklch(95% 0.05 181)`},200:{level:200,hex:`#99f6e4`,rgb:`rgb(153 246 228)`,hsl:`hsl(168.4 83.8% 78.2%)`,oklch:`oklch(91% 0.09 180)`},300:{level:300,hex:`#5eead4`,rgb:`rgb(94 234 212)`,hsl:`hsl(170.6 76.9% 64.3%)`,oklch:`oklch(85% 0.13 181)`},400:{level:400,hex:`#2dd4bf`,rgb:`rgb(45 212 191)`,hsl:`hsl(172.5 66% 50.4%)`,oklch:`oklch(78% 0.13 182)`},500:{level:500,hex:`#14b8a6`,rgb:`rgb(20 184 166)`,hsl:`hsl(173.4 80.4% 40%)`,oklch:`oklch(70% 0.12 183)`},600:{level:600,hex:`#0d9488`,rgb:`rgb(13 148 136)`,hsl:`hsl(174.7 83.9% 31.6%)`,oklch:`oklch(60% 0.1 185)`},700:{level:700,hex:`#0f766e`,rgb:`rgb(15 118 110)`,hsl:`hsl(175.3 77.4% 26.1%)`,oklch:`oklch(51% 0.09 186)`},800:{level:800,hex:`#115e59`,rgb:`rgb(17 94 89)`,hsl:`hsl(176.1 69.4% 21.8%)`,oklch:`oklch(44% 0.07 188)`},900:{level:900,hex:`#134e4a`,rgb:`rgb(19 78 74)`,hsl:`hsl(175.9 60.8% 19%)`,oklch:`oklch(39% 0.06 188)`},950:{level:950,hex:`#042f2e`,rgb:`rgb(4 47 46)`,hsl:`hsl(178.6 84.3% 10%)`,oklch:`oklch(28% 0.04 193)`}},cyan:{50:{level:50,hex:`#ecfeff`,rgb:`rgb(236 254 255)`,hsl:`hsl(183.2 100% 96.3%)`,oklch:`oklch(98% 0.02 201)`},100:{level:100,hex:`#cffafe`,rgb:`rgb(207 250 254)`,hsl:`hsl(185.1 95.9% 90.4%)`,oklch:`oklch(96% 0.04 203)`},200:{level:200,hex:`#a5f3fc`,rgb:`rgb(165 243 252)`,hsl:`hsl(186.2 93.5% 81.8%)`,oklch:`oklch(92% 0.08 205)`},300:{level:300,hex:`#67e8f9`,rgb:`rgb(103 232 249)`,hsl:`hsl(187 92.4% 69%)`,oklch:`oklch(87% 0.12 207)`},400:{level:400,hex:`#22d3ee`,rgb:`rgb(34 211 238)`,hsl:`hsl(187.9 85.7% 53.3%)`,oklch:`oklch(80% 0.13 212)`},500:{level:500,hex:`#06b6d4`,rgb:`rgb(6 182 212)`,hsl:`hsl(188.7 94.5% 42.7%)`,oklch:`oklch(71% 0.13 215)`},600:{level:600,hex:`#0891b2`,rgb:`rgb(8 145 178)`,hsl:`hsl(191.6 91.4% 36.5%)`,oklch:`oklch(61% 0.11 222)`},700:{level:700,hex:`#0e7490`,rgb:`rgb(14 116 144)`,hsl:`hsl(192.9 82.3% 31%)`,oklch:`oklch(52% 0.09 223)`},800:{level:800,hex:`#155e75`,rgb:`rgb(21 94 117)`,hsl:`hsl(194.4 69.6% 27.1%)`,oklch:`oklch(45% 0.08 224)`},900:{level:900,hex:`#164e63`,rgb:`rgb(22 78 99)`,hsl:`hsl(196.4 63.6% 23.7%)`,oklch:`oklch(40% 0.07 227)`},950:{level:950,hex:`#083344`,rgb:`rgb(8 51 68)`,hsl:`hsl(197 78.9% 14.9%)`,oklch:`oklch(30% 0.05 230)`}},sky:{50:{level:50,hex:`#f0f9ff`,rgb:`rgb(240 249 255)`,hsl:`hsl(204 100% 97.1%)`,oklch:`oklch(98% 0.01 237)`},100:{level:100,hex:`#e0f2fe`,rgb:`rgb(224 242 254)`,hsl:`hsl(204 93.8% 93.7%)`,oklch:`oklch(95% 0.03 237)`},200:{level:200,hex:`#bae6fd`,rgb:`rgb(186 230 253)`,hsl:`hsl(200.6 94.4% 86.1%)`,oklch:`oklch(90% 0.06 231)`},300:{level:300,hex:`#7dd3fc`,rgb:`rgb(125 211 252)`,hsl:`hsl(199.4 95.5% 73.9%)`,oklch:`oklch(83% 0.1 230)`},400:{level:400,hex:`#38bdf8`,rgb:`rgb(56 189 248)`,hsl:`hsl(198.4 93.2% 59.6%)`,oklch:`oklch(75% 0.14 233)`},500:{level:500,hex:`#0ea5e9`,rgb:`rgb(14 165 233)`,hsl:`hsl(198.6 88.7% 48.4%)`,oklch:`oklch(68% 0.15 237)`},600:{level:600,hex:`#0284c7`,rgb:`rgb(2 132 199)`,hsl:`hsl(200.4 98% 39.4%)`,oklch:`oklch(59% 0.14 242)`},700:{level:700,hex:`#0369a1`,rgb:`rgb(3 105 161)`,hsl:`hsl(201.3 96.3% 32.2%)`,oklch:`oklch(50% 0.12 243)`},800:{level:800,hex:`#075985`,rgb:`rgb(7 89 133)`,hsl:`hsl(201 90% 27.5%)`,oklch:`oklch(44% 0.1 241)`},900:{level:900,hex:`#0c4a6e`,rgb:`rgb(12 74 110)`,hsl:`hsl(202 80.3% 23.9%)`,oklch:`oklch(39% 0.08 241)`},950:{level:950,hex:`#082f49`,rgb:`rgb(8 47 73)`,hsl:`hsl(204 80.2% 15.9%)`,oklch:`oklch(29% 0.06 243)`}},blue:{50:{level:50,hex:`#eff6ff`,rgb:`rgb(239 246 255)`,hsl:`hsl(213.8 100% 96.9%)`,oklch:`oklch(97% 0.01 255)`},100:{level:100,hex:`#dbeafe`,rgb:`rgb(219 234 254)`,hsl:`hsl(214.3 94.6% 92.7%)`,oklch:`oklch(93% 0.03 256)`},200:{level:200,hex:`#bfdbfe`,rgb:`rgb(191 219 254)`,hsl:`hsl(213.3 96.9% 87.3%)`,oklch:`oklch(88% 0.06 254)`},300:{level:300,hex:`#93c5fd`,rgb:`rgb(147 197 253)`,hsl:`hsl(211.7 96.4% 78.4%)`,oklch:`oklch(81% 0.1 252)`},400:{level:400,hex:`#60a5fa`,rgb:`rgb(96 165 250)`,hsl:`hsl(213.1 93.9% 67.8%)`,oklch:`oklch(71% 0.14 255)`},500:{level:500,hex:`#3b82f6`,rgb:`rgb(59 130 246)`,hsl:`hsl(217.2 91.2% 59.8%)`,oklch:`oklch(62% 0.19 260)`},600:{level:600,hex:`#2563eb`,rgb:`rgb(37 99 235)`,hsl:`hsl(221.2 83.2% 53.3%)`,oklch:`oklch(55% 0.22 263)`},700:{level:700,hex:`#1d4ed8`,rgb:`rgb(29 78 216)`,hsl:`hsl(224.3 76.3% 48%)`,oklch:`oklch(49% 0.22 264)`},800:{level:800,hex:`#1e40af`,rgb:`rgb(30 64 175)`,hsl:`hsl(225.9 70.7% 40.2%)`,oklch:`oklch(42% 0.18 266)`},900:{level:900,hex:`#1e3a8a`,rgb:`rgb(30 58 138)`,hsl:`hsl(224.4 64.3% 32.9%)`,oklch:`oklch(38% 0.14 266)`},950:{level:950,hex:`#172554`,rgb:`rgb(23 37 84)`,hsl:`hsl(226.2 57% 21%)`,oklch:`oklch(28% 0.09 268)`}},indigo:{50:{level:50,hex:`#eef2ff`,rgb:`rgb(238 242 255)`,hsl:`hsl(225.9 100% 96.7%)`,oklch:`oklch(96% 0.02 272)`},100:{level:100,hex:`#e0e7ff`,rgb:`rgb(224 231 255)`,hsl:`hsl(226.5 100% 93.9%)`,oklch:`oklch(93% 0.03 273)`},200:{level:200,hex:`#c7d2fe`,rgb:`rgb(199 210 254)`,hsl:`hsl(228 96.5% 88.8%)`,oklch:`oklch(87% 0.06 274)`},300:{level:300,hex:`#a5b4fc`,rgb:`rgb(165 180 252)`,hsl:`hsl(229.7 93.5% 81.8%)`,oklch:`oklch(79% 0.1 275)`},400:{level:400,hex:`#818cf8`,rgb:`rgb(129 140 248)`,hsl:`hsl(234.5 89.5% 73.9%)`,oklch:`oklch(68% 0.16 277)`},500:{level:500,hex:`#6366f1`,rgb:`rgb(99 102 241)`,hsl:`hsl(238.7 83.5% 66.7%)`,oklch:`oklch(59% 0.2 277)`},600:{level:600,hex:`#4f46e5`,rgb:`rgb(79 70 229)`,hsl:`hsl(243.4 75.4% 58.6%)`,oklch:`oklch(51% 0.23 277)`},700:{level:700,hex:`#4338ca`,rgb:`rgb(67 56 202)`,hsl:`hsl(244.5 57.9% 50.6%)`,oklch:`oklch(46% 0.21 277)`},800:{level:800,hex:`#3730a3`,rgb:`rgb(55 48 163)`,hsl:`hsl(243.7 54.5% 41.4%)`,oklch:`oklch(40% 0.18 277)`},900:{level:900,hex:`#312e81`,rgb:`rgb(49 46 129)`,hsl:`hsl(242.2 47.4% 34.3%)`,oklch:`oklch(36% 0.14 279)`},950:{level:950,hex:`#1e1b4b`,rgb:`rgb(30 27 75)`,hsl:`hsl(243.8 47.1% 20%)`,oklch:`oklch(26% 0.09 281)`}},violet:{50:{level:50,hex:`#f5f3ff`,rgb:`rgb(245 243 255)`,hsl:`hsl(250 100% 97.6%)`,oklch:`oklch(97% 0.02 294)`},100:{level:100,hex:`#ede9fe`,rgb:`rgb(237 233 254)`,hsl:`hsl(251.4 91.3% 95.5%)`,oklch:`oklch(94% 0.03 295)`},200:{level:200,hex:`#ddd6fe`,rgb:`rgb(221 214 254)`,hsl:`hsl(250.5 95.2% 91.8%)`,oklch:`oklch(89% 0.05 293)`},300:{level:300,hex:`#c4b5fd`,rgb:`rgb(196 181 253)`,hsl:`hsl(252.5 94.7% 85.1%)`,oklch:`oklch(81% 0.1 294)`},400:{level:400,hex:`#a78bfa`,rgb:`rgb(167 139 250)`,hsl:`hsl(255.1 91.7% 76.3%)`,oklch:`oklch(71% 0.16 294)`},500:{level:500,hex:`#8b5cf6`,rgb:`rgb(139 92 246)`,hsl:`hsl(258.3 89.5% 66.3%)`,oklch:`oklch(61% 0.22 293)`},600:{level:600,hex:`#7c3aed`,rgb:`rgb(124 58 237)`,hsl:`hsl(262.1 83.3% 57.8%)`,oklch:`oklch(54% 0.25 293)`},700:{level:700,hex:`#6d28d9`,rgb:`rgb(109 40 217)`,hsl:`hsl(263.4 70% 50.4%)`,oklch:`oklch(49% 0.24 293)`},800:{level:800,hex:`#5b21b6`,rgb:`rgb(91 33 182)`,hsl:`hsl(263.4 69.3% 42.2%)`,oklch:`oklch(43% 0.21 293)`},900:{level:900,hex:`#4c1d95`,rgb:`rgb(76 29 149)`,hsl:`hsl(263.5 67.4% 34.9%)`,oklch:`oklch(38% 0.18 294)`},950:{level:950,hex:`#1e1b4b`,rgb:`rgb(46 16 101)`,hsl:`hsl(261.2 72.6% 22.9%)`,oklch:`oklch(28% 0.14 291)`}},purple:{50:{level:50,hex:`#faf5ff`,rgb:`rgb(250 245 255)`,hsl:`hsl(270 100% 98%)`,oklch:`oklch(98% 0.01 308)`},100:{level:100,hex:`#f3e8ff`,rgb:`rgb(243 232 255)`,hsl:`hsl(268.7 100% 95.5%)`,oklch:`oklch(95% 0.03 307)`},200:{level:200,hex:`#e9d5ff`,rgb:`rgb(233 213 255)`,hsl:`hsl(268.6 100% 91.8%)`,oklch:`oklch(90% 0.06 307)`},300:{level:300,hex:`#d8b4fe`,rgb:`rgb(216 180 254)`,hsl:`hsl(269.2 97.4% 85.1%)`,oklch:`oklch(83% 0.11 306)`},400:{level:400,hex:`#c084fc`,rgb:`rgb(192 132 252)`,hsl:`hsl(270 95.2% 75.3%)`,oklch:`oklch(72% 0.18 306)`},500:{level:500,hex:`#a855f7`,rgb:`rgb(168 85 247)`,hsl:`hsl(270.7 91% 65.1%)`,oklch:`oklch(63% 0.23 304)`},600:{level:600,hex:`#9333ea`,rgb:`rgb(147 51 234)`,hsl:`hsl(271.5 81.3% 55.9%)`,oklch:`oklch(56% 0.25 302)`},700:{level:700,hex:`#7e22ce`,rgb:`rgb(126 34 206)`,hsl:`hsl(272.1 71.7% 47.1%)`,oklch:`oklch(50% 0.24 302)`},800:{level:800,hex:`#6b21a8`,rgb:`rgb(107 33 168)`,hsl:`hsl(272.9 67.2% 39.4%)`,oklch:`oklch(44% 0.2 304)`},900:{level:900,hex:`#581c87`,rgb:`rgb(88 28 135)`,hsl:`hsl(273.6 65.6% 32%)`,oklch:`oklch(38% 0.17 305)`},950:{level:950,hex:`#3b0764`,rgb:`rgb(59 7 100)`,hsl:`hsl(273.5 86.9% 21%)`,oklch:`oklch(29% 0.14 303)`}},fuchsia:{50:{level:50,hex:`#fdf4ff`,rgb:`rgb(253 244 255)`,hsl:`hsl(289.1 100% 97.8%)`,oklch:`oklch(98% 0.02 320)`},100:{level:100,hex:`#fae8ff`,rgb:`rgb(250 232 255)`,hsl:`hsl(287 100% 95.5%)`,oklch:`oklch(95% 0.04 319)`},200:{level:200,hex:`#f5d0fe`,rgb:`rgb(245 208 254)`,hsl:`hsl(288.3 95.8% 90.6%)`,oklch:`oklch(90% 0.07 320)`},300:{level:300,hex:`#f0abfc`,rgb:`rgb(240 171 252)`,hsl:`hsl(291.1 93.1% 82.9%)`,oklch:`oklch(83% 0.13 321)`},400:{level:400,hex:`#e879f9`,rgb:`rgb(232 121 249)`,hsl:`hsl(292 91.4% 72.5%)`,oklch:`oklch(75% 0.21 322)`},500:{level:500,hex:`#d946ef`,rgb:`rgb(217 70 239)`,hsl:`hsl(292.2 84.1% 60.6%)`,oklch:`oklch(67% 0.26 322)`},600:{level:600,hex:`#c026d3`,rgb:`rgb(192 38 211)`,hsl:`hsl(293.4 69.5% 48.8%)`,oklch:`oklch(59% 0.26 323)`},700:{level:700,hex:`#a21caf`,rgb:`rgb(162 28 175)`,hsl:`hsl(294.7 72.4% 39.8%)`,oklch:`oklch(52% 0.23 324)`},800:{level:800,hex:`#86198f`,rgb:`rgb(134 25 143)`,hsl:`hsl(295.4 70.2% 32.9%)`,oklch:`oklch(45% 0.19 325)`},900:{level:900,hex:`#701a75`,rgb:`rgb(112 26 117)`,hsl:`hsl(296.7 63.6% 28%)`,oklch:`oklch(40% 0.16 326)`},950:{level:950,hex:`#4a044e`,rgb:`rgb(74 4 78)`,hsl:`hsl(296.8 90.2% 16.1%)`,oklch:`oklch(29% 0.13 326)`}},pink:{50:{level:50,hex:`#fdf2f8`,rgb:`rgb(253 242 248)`,hsl:`hsl(327.3 73.3% 97.1%)`,oklch:`oklch(97% 0.01 343)`},100:{level:100,hex:`#fce7f3`,rgb:`rgb(252 231 243)`,hsl:`hsl(325.7 77.8% 94.7%)`,oklch:`oklch(95% 0.03 342)`},200:{level:200,hex:`#fbcfe8`,rgb:`rgb(251 207 232)`,hsl:`hsl(325.9 84.6% 89.8%)`,oklch:`oklch(90% 0.06 343)`},300:{level:300,hex:`#f9a8d4`,rgb:`rgb(249 168 212)`,hsl:`hsl(327.4 87.1% 81.8%)`,oklch:`oklch(82% 0.11 346)`},400:{level:400,hex:`#f472b6`,rgb:`rgb(244 114 182)`,hsl:`hsl(328.6 85.5% 70.2%)`,oklch:`oklch(73% 0.18 350)`},500:{level:500,hex:`#ec4899`,rgb:`rgb(236 72 153)`,hsl:`hsl(330.4 81.2% 60.4%)`,oklch:`oklch(66% 0.21 354)`},600:{level:600,hex:`#db2777`,rgb:`rgb(219 39 119)`,hsl:`hsl(333.3 71.4% 50.6%)`,oklch:`oklch(59% 0.22 1)`},700:{level:700,hex:`#be185d`,rgb:`rgb(190 24 93)`,hsl:`hsl(335.1 77.6% 42%)`,oklch:`oklch(52% 0.2 4)`},800:{level:800,hex:`#9d174d`,rgb:`rgb(157 23 77)`,hsl:`hsl(335.8 74.4% 35.3%)`,oklch:`oklch(46% 0.17 4)`},900:{level:900,hex:`#831843`,rgb:`rgb(131 24 67)`,hsl:`hsl(335.9 69% 30.4%)`,oklch:`oklch(41% 0.14 2)`},950:{level:950,hex:`#500724`,rgb:`rgb(80 7 36)`,hsl:`hsl(336.2 83.9% 17.1%)`,oklch:`oklch(28% 0.1 4)`}},rose:{50:{level:50,hex:`#fff1f2`,rgb:`rgb(255 241 242)`,hsl:`hsl(355.7 100% 97.3%)`,oklch:`oklch(97% 0.02 12)`},100:{level:100,hex:`#ffe4e6`,rgb:`rgb(255 228 230)`,hsl:`hsl(355.6 100% 94.7%)`,oklch:`oklch(94% 0.03 13)`},200:{level:200,hex:`#fecdd3`,rgb:`rgb(254 205 211)`,hsl:`hsl(352.7 96.1% 90%)`,oklch:`oklch(89% 0.06 10)`},300:{level:300,hex:`#fda4af`,rgb:`rgb(253 164 175)`,hsl:`hsl(352.6 95.7% 81.8%)`,oklch:`oklch(81% 0.11 12)`},400:{level:400,hex:`#fb7185`,rgb:`rgb(251 113 133)`,hsl:`hsl(351.3 94.5% 71.4%)`,oklch:`oklch(72% 0.17 13)`},500:{level:500,hex:`#f43f5e`,rgb:`rgb(244 63 94)`,hsl:`hsl(349.7 89.2% 60.2%)`,oklch:`oklch(65% 0.22 16)`},600:{level:600,hex:`#e11d48`,rgb:`rgb(225 29 72)`,hsl:`hsl(346.8 77.2% 49.8%)`,oklch:`oklch(59% 0.22 18)`},700:{level:700,hex:`#be123c`,rgb:`rgb(190 18 60)`,hsl:`hsl(345.3 82.7% 40.8%)`,oklch:`oklch(51% 0.2 17)`},800:{level:800,hex:`#9f1239`,rgb:`rgb(159 18 57)`,hsl:`hsl(343.4 79.7% 34.7%)`,oklch:`oklch(45% 0.17 14)`},900:{level:900,hex:`#881337`,rgb:`rgb(136 19 55)`,hsl:`hsl(341.5 75.5% 30.4%)`,oklch:`oklch(41% 0.15 10)`},950:{level:950,hex:`#4c0519`,rgb:`rgb(76 5 25)`,hsl:`hsl(343.1 87.7% 15.9%)`,oklch:`oklch(27% 0.1 12)`}}},dT={50:{l:.08,c:.065},100:{l:.18,c:.15},200:{l:.313,c:.276},300:{l:.507,c:.491},400:{l:.777,c:.771},500:{l:1,c:1},600:{l:.876,c:1.145},700:{l:.783,c:1.136},800:{l:.681,c:.93},900:{l:.608,c:.682},950:{l:.453,c:.425}},fT={50:.985,100:.968,200:.924,300:.87,400:.707},pT={600:.802*.556,700:.672*.556,800:.495*.556,900:.379*.556,950:.25*.556};function mT(e,t=`oklch`){let n=ef(e);if(!n.isValid())throw Error(`Invalid color value`);let{l:r,c:i,h:a,alpha:o}=n.toOklch(),s={},c=i<.05,l=a>330||a<30;return Ad(dT).forEach(e=>{let n=r,u=i,d=a,f=Number(e),p=dT[f];f<500&&(c?n=fT[f]:(n=1-(1-r)*p.l,d=(a+hT(a,p.l)+360)%360),u=i*p.c),f>500&&(c?(n=pT[f],l&&a>330&&(d=(a+(1-p.l)*10)%360)):(n=r*p.l,d=(a+gT(a,p.l)+360)%360),u=i*p.c),u=Math.max(0,u),s[f]=_T({l:n,c:u,h:d,alpha:o},t)}),s}function hT(e,t){let n=(1-t)*8;return e>=0&&e<60||e>=330?-n:e>=60&&e<150?n:e>=150&&e<210?n*.7:e>=210&&e<270?-n:n*.5}function gT(e,t){let n=(1-t)*10;return e>=0&&e<60||e>=330?n*.3:e>=60&&e<150?-n:e>=150&&e<210?n*.3:e>=210&&e<270?n*.6:-n*.2}function _T(e,t=`oklch`){let n=ef(e),r=e;return t===`hex`?r=n.toHex():t===`rgb`?r=n.toRgb():t===`rgbString`?r=n.toRgbString():t===`oklch`?r=n.toOklch():t===`oklchString`?r=n.toOklchString():t===`hsl`?r=n.toHsl():t===`hslString`&&(r=n.toHslString()),r}rf([cT]);function vT(e){return Object.keys(e)}function yT(e,...t){let n={...e};return t.forEach(e=>{Object.keys(e).forEach(t=>{let r=e[t];r!==void 0&&(n[t]=r)})}),n}function bT(e){return e===`class`||e===`media`?NT[e]:e}function xT(e){return!e.startsWith(`hsl(`)&&!e.startsWith(`oklch(`)}function ST(e){return e.replace(/hsl\(/g,``).replace(/\)/g,``)}var CT=e=>[`inherit`,`currentColor`,`transparent`].includes(e);function wT(e,t){if(CT(e))return e;if(e===`black`)return lT.black[t];if(e===`white`)return lT.white[t];if(xT(e)){let[n,r]=e.split(`.`);return uT[n][r][t]}let n=e;return t===`hsl`&&e.startsWith(`oklch(`)&&(n=ef(e).toHslString()),t===`oklch`&&e.startsWith(`hsl(`)&&(n=ef(e).toOklchString()),n}function TT(e){return e?Object.keys(IT).includes(e)?`${IT[e]}px`:e:`${IT[MT.size]}px`}function ET(e){return e?Object.keys(LT).includes(e)?LT[e]:e:LT[MT.radius]}var DT=`--size`,OT=`--radius`,kT={background:`--background`,foreground:`--foreground`,card:`--card`,cardForeground:`--card-foreground`,popover:`--popover`,popoverForeground:`--popover-foreground`,primary:`--primary`,primaryForeground:`--primary-foreground`,secondary:`--secondary`,secondaryForeground:`--secondary-foreground`,muted:`--muted`,mutedForeground:`--muted-foreground`,accent:`--accent`,accentForeground:`--accent-foreground`,destructive:`--destructive`,destructiveForeground:`--destructive-foreground`,border:`--border`,input:`--input`,ring:`--ring`,success:`--success`,successForeground:`--success-foreground`,warning:`--warning`,warningForeground:`--warning-foreground`,info:`--info`,infoForeground:`--info-foreground`,carbon:`--carbon`,carbonForeground:`--carbon-foreground`,sidebar:`--sidebar`,sidebarForeground:`--sidebar-foreground`,sidebarPrimary:`--sidebar-primary`,sidebarPrimaryForeground:`--sidebar-primary-foreground`,sidebarAccent:`--sidebar-accent`,sidebarAccentForeground:`--sidebar-accent-foreground`,sidebarBorder:`--sidebar-border`,sidebarRing:`--sidebar-ring`,chart1:`--chart-1`,chart2:`--chart-2`,chart3:`--chart-3`,chart4:`--chart-4`,chart5:`--chart-5`},AT={borderAlpha:`--border-alpha`,inputAlpha:`--input-alpha`,sidebarBorderAlpha:`--sidebar-border-alpha`},jT={bg:`--menu-bg`,bgAlpha:`--menu-bg-alpha`,dropBlur:`--menu-drop-blur`,backdropSaturate:`--menu-backdrop-saturate`,itemAccentBackground:`--menu-item-accent-background`,itemAccentForeground:`--menu-item-accent-foreground`},MT={size:`md`,radius:`md`,base:`zinc`,primary:`indigo`,feedback:`classic`,menuColor:`default`,menuAccent:`subtle`,styleTarget:`:root`,darkSelector:`class`,format:`hsl`},NT={class:`.dark`,media:`@media (prefers-color-scheme: dark)`},PT=`oklch(100% 0 0 / 0.1)`,FT=`oklch(100% 0 0 / 0.15)`,IT={xs:12,sm:14,md:16,lg:18,xl:20,"2xl":24};vT(IT);var LT={"2xs":`0.25rem`,xs:`0.375rem`,sm:`0.5rem`,md:`0.625rem`,lg:`0.75rem`,xl:`0.875rem`,"2xl":`1rem`};vT(LT);var RT={default:{[jT.bg]:`var(${kT.popover})`,[jT.bgAlpha]:`1`,[jT.dropBlur]:`0px`,[jT.backdropSaturate]:`1`},"default-translucent":{[jT.bg]:`var(${kT.popover})`,[jT.bgAlpha]:`0.7`,[jT.dropBlur]:`40px`,[jT.backdropSaturate]:`1.5`},inverted:{[jT.bg]:`var(${kT.card})`,[jT.bgAlpha]:`1`,[jT.dropBlur]:`0px`,[jT.backdropSaturate]:`1`},"inverted-translucent":{[jT.bg]:`var(${kT.card})`,[jT.bgAlpha]:`0.7`,[jT.dropBlur]:`40px`,[jT.backdropSaturate]:`1.5`}},zT={subtle:{[jT.itemAccentBackground]:`hsl(var(${kT.foreground}) / 0.05)`,[jT.itemAccentForeground]:`var(${kT.foreground})`},bold:{[jT.itemAccentBackground]:`hsl(var(${kT.primary}) / 0.1)`,[jT.itemAccentForeground]:`var(${kT.primary})`}};`${kT.background}`,`${kT.foreground}`,`${kT.primary}`,`${kT.primaryForeground}`,`${kT.accent}`,`${kT.accentForeground}`,`${kT.border}`,`${kT.ring}`,`${kT.card}`;var BT={slate:{light:{background:`white`,foreground:`slate.950`,card:`white`,cardForeground:`slate.950`,popover:`white`,popoverForeground:`slate.950`,primaryForeground:`slate.50`,secondary:`slate.100`,secondaryForeground:`slate.900`,muted:`slate.100`,mutedForeground:`slate.500`,accent:`slate.100`,accentForeground:`slate.900`,destructiveForeground:`slate.50`,successForeground:`slate.50`,warningForeground:`slate.50`,infoForeground:`slate.50`,carbon:`slate.800`,carbonForeground:`slate.50`,border:`slate.200`,input:`slate.200`},dark:{background:`slate.950`,foreground:`slate.50`,card:`slate.900`,cardForeground:`slate.50`,popover:`slate.900`,popoverForeground:`slate.50`,primaryForeground:`slate.900`,secondary:`slate.800`,secondaryForeground:`slate.50`,muted:`slate.800`,mutedForeground:`slate.400`,accent:`slate.800`,accentForeground:`slate.50`,carbon:`slate.100`,destructiveForeground:`slate.900`,successForeground:`slate.900`,warningForeground:`slate.900`,infoForeground:`slate.900`,carbonForeground:`slate.900`,border:PT,input:FT}},mist:{light:{background:`white`,foreground:`mist.950`,card:`white`,cardForeground:`mist.950`,popover:`white`,popoverForeground:`mist.950`,primaryForeground:`mist.50`,secondary:`mist.100`,secondaryForeground:`mist.900`,muted:`mist.100`,mutedForeground:`mist.500`,accent:`mist.100`,accentForeground:`mist.900`,destructiveForeground:`mist.50`,successForeground:`mist.50`,warningForeground:`mist.50`,infoForeground:`mist.50`,carbon:`mist.800`,carbonForeground:`mist.50`,border:`mist.200`,input:`mist.200`},dark:{background:`mist.950`,foreground:`mist.50`,card:`mist.900`,cardForeground:`mist.50`,popover:`mist.900`,popoverForeground:`mist.50`,primaryForeground:`mist.900`,secondary:`mist.800`,secondaryForeground:`mist.50`,muted:`mist.800`,mutedForeground:`mist.400`,accent:`mist.800`,accentForeground:`mist.50`,carbon:`mist.100`,destructiveForeground:`mist.900`,successForeground:`mist.900`,warningForeground:`mist.900`,infoForeground:`mist.900`,carbonForeground:`mist.900`,border:PT,input:FT}},gray:{light:{background:`white`,foreground:`gray.950`,card:`white`,cardForeground:`gray.950`,popover:`white`,popoverForeground:`gray.950`,primaryForeground:`gray.50`,secondary:`gray.100`,secondaryForeground:`gray.900`,muted:`gray.100`,mutedForeground:`gray.500`,accent:`gray.100`,accentForeground:`gray.900`,carbon:`gray.800`,destructiveForeground:`gray.50`,successForeground:`gray.50`,warningForeground:`gray.50`,infoForeground:`gray.50`,carbonForeground:`gray.50`,border:`gray.200`,input:`gray.200`},dark:{background:`gray.950`,foreground:`gray.50`,card:`gray.900`,cardForeground:`gray.50`,popover:`gray.900`,popoverForeground:`gray.50`,primaryForeground:`gray.900`,secondary:`gray.800`,secondaryForeground:`gray.50`,muted:`gray.800`,mutedForeground:`gray.400`,accent:`gray.800`,accentForeground:`gray.50`,carbon:`gray.100`,destructiveForeground:`gray.900`,successForeground:`gray.900`,warningForeground:`gray.900`,infoForeground:`gray.900`,carbonForeground:`gray.900`,border:PT,input:FT}},zinc:{light:{background:`white`,foreground:`zinc.950`,card:`white`,cardForeground:`zinc.950`,popover:`white`,popoverForeground:`zinc.950`,primaryForeground:`zinc.50`,secondary:`zinc.100`,secondaryForeground:`zinc.900`,muted:`zinc.100`,mutedForeground:`zinc.500`,accent:`zinc.100`,accentForeground:`zinc.900`,destructiveForeground:`zinc.50`,successForeground:`zinc.50`,warningForeground:`zinc.50`,infoForeground:`zinc.50`,carbon:`zinc.800`,carbonForeground:`zinc.50`,border:`zinc.200`,input:`zinc.200`},dark:{background:`zinc.950`,foreground:`zinc.50`,card:`zinc.900`,cardForeground:`zinc.50`,popover:`zinc.900`,popoverForeground:`zinc.50`,primaryForeground:`zinc.900`,secondary:`zinc.800`,secondaryForeground:`zinc.50`,muted:`zinc.800`,mutedForeground:`zinc.400`,accent:`zinc.800`,accentForeground:`zinc.50`,destructiveForeground:`zinc.900`,successForeground:`zinc.900`,warningForeground:`zinc.900`,infoForeground:`zinc.900`,carbon:`zinc.100`,carbonForeground:`zinc.900`,border:PT,input:FT}},neutral:{light:{background:`white`,foreground:`neutral.950`,card:`white`,cardForeground:`neutral.950`,popover:`white`,popoverForeground:`neutral.950`,primaryForeground:`neutral.50`,secondary:`neutral.100`,secondaryForeground:`neutral.900`,muted:`neutral.100`,mutedForeground:`neutral.500`,accent:`neutral.100`,accentForeground:`neutral.900`,destructiveForeground:`neutral.50`,successForeground:`neutral.50`,warningForeground:`neutral.50`,infoForeground:`neutral.50`,carbon:`neutral.800`,carbonForeground:`neutral.50`,border:`neutral.200`,input:`neutral.200`},dark:{background:`neutral.950`,foreground:`neutral.50`,card:`neutral.900`,cardForeground:`neutral.50`,popover:`neutral.900`,popoverForeground:`neutral.50`,primaryForeground:`neutral.900`,secondary:`neutral.800`,secondaryForeground:`neutral.50`,muted:`neutral.800`,mutedForeground:`neutral.400`,accent:`neutral.800`,accentForeground:`neutral.50`,destructiveForeground:`neutral.900`,successForeground:`neutral.900`,warningForeground:`neutral.900`,infoForeground:`neutral.900`,carbon:`neutral.100`,carbonForeground:`neutral.900`,border:PT,input:FT}},stone:{light:{background:`white`,foreground:`stone.950`,card:`white`,cardForeground:`stone.950`,popover:`white`,popoverForeground:`stone.950`,primaryForeground:`stone.50`,secondary:`stone.100`,secondaryForeground:`stone.900`,muted:`stone.100`,mutedForeground:`stone.500`,accent:`stone.100`,accentForeground:`stone.900`,destructiveForeground:`stone.50`,successForeground:`stone.50`,warningForeground:`stone.50`,infoForeground:`stone.50`,carbon:`stone.800`,carbonForeground:`stone.50`,border:`stone.200`,input:`stone.200`},dark:{background:`stone.950`,foreground:`stone.50`,card:`stone.900`,cardForeground:`stone.50`,popover:`stone.900`,popoverForeground:`stone.50`,primaryForeground:`stone.900`,secondary:`stone.800`,secondaryForeground:`stone.50`,muted:`stone.800`,mutedForeground:`stone.400`,accent:`stone.800`,accentForeground:`stone.50`,destructiveForeground:`stone.900`,successForeground:`stone.900`,warningForeground:`stone.900`,infoForeground:`stone.900`,carbon:`stone.100`,carbonForeground:`stone.900`,border:PT,input:FT}},taupe:{light:{background:`white`,foreground:`taupe.950`,card:`white`,cardForeground:`taupe.950`,popover:`white`,popoverForeground:`taupe.950`,primaryForeground:`taupe.50`,secondary:`taupe.100`,secondaryForeground:`taupe.900`,muted:`taupe.100`,mutedForeground:`taupe.500`,accent:`taupe.100`,accentForeground:`taupe.900`,destructiveForeground:`taupe.50`,successForeground:`taupe.50`,warningForeground:`taupe.50`,infoForeground:`taupe.50`,carbon:`taupe.800`,carbonForeground:`taupe.50`,border:`taupe.200`,input:`taupe.200`},dark:{background:`taupe.950`,foreground:`taupe.50`,card:`taupe.900`,cardForeground:`taupe.50`,popover:`taupe.900`,popoverForeground:`taupe.50`,primaryForeground:`taupe.900`,secondary:`taupe.800`,secondaryForeground:`taupe.50`,muted:`taupe.800`,mutedForeground:`taupe.400`,accent:`taupe.800`,accentForeground:`taupe.50`,destructiveForeground:`taupe.900`,successForeground:`taupe.900`,warningForeground:`taupe.900`,infoForeground:`taupe.900`,carbon:`taupe.100`,carbonForeground:`taupe.900`,border:PT,input:FT}},olive:{light:{background:`white`,foreground:`olive.950`,card:`white`,cardForeground:`olive.950`,popover:`white`,popoverForeground:`olive.950`,primaryForeground:`olive.50`,secondary:`olive.100`,secondaryForeground:`olive.900`,muted:`olive.100`,mutedForeground:`olive.500`,accent:`olive.100`,accentForeground:`olive.900`,destructiveForeground:`olive.50`,successForeground:`olive.50`,warningForeground:`olive.50`,infoForeground:`olive.50`,carbon:`olive.800`,carbonForeground:`olive.50`,border:`olive.200`,input:`olive.200`},dark:{background:`olive.950`,foreground:`olive.50`,card:`olive.900`,cardForeground:`olive.50`,popover:`olive.900`,popoverForeground:`olive.50`,primaryForeground:`olive.900`,secondary:`olive.800`,secondaryForeground:`olive.50`,muted:`olive.800`,mutedForeground:`olive.400`,accent:`olive.800`,accentForeground:`olive.50`,destructiveForeground:`olive.900`,successForeground:`olive.900`,warningForeground:`olive.900`,infoForeground:`olive.900`,carbon:`olive.100`,carbonForeground:`olive.900`,border:PT,input:FT}},mauve:{light:{background:`white`,foreground:`mauve.950`,card:`white`,cardForeground:`mauve.950`,popover:`white`,popoverForeground:`mauve.950`,primaryForeground:`mauve.50`,secondary:`mauve.100`,secondaryForeground:`mauve.900`,muted:`mauve.100`,mutedForeground:`mauve.500`,accent:`mauve.100`,accentForeground:`mauve.900`,destructiveForeground:`mauve.50`,successForeground:`mauve.50`,warningForeground:`mauve.50`,infoForeground:`mauve.50`,carbon:`mauve.800`,carbonForeground:`mauve.50`,border:`mauve.200`,input:`mauve.200`},dark:{background:`mauve.950`,foreground:`mauve.50`,card:`mauve.900`,cardForeground:`mauve.50`,popover:`mauve.900`,popoverForeground:`mauve.50`,primaryForeground:`mauve.900`,secondary:`mauve.800`,secondaryForeground:`mauve.50`,muted:`mauve.800`,mutedForeground:`mauve.400`,accent:`mauve.800`,accentForeground:`mauve.50`,destructiveForeground:`mauve.900`,successForeground:`mauve.900`,warningForeground:`mauve.900`,infoForeground:`mauve.900`,carbon:`mauve.100`,carbonForeground:`mauve.900`,border:PT,input:FT}}},VT={slate:{light:{primary:`slate.800`,ring:`slate.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`slate.200`,ring:`slate.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},mist:{light:{primary:`mist.800`,ring:`mist.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`mist.200`,ring:`mist.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},gray:{light:{primary:`gray.800`,ring:`gray.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`gray.200`,ring:`gray.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},zinc:{light:{primary:`zinc.800`,ring:`zinc.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`zinc.200`,ring:`zinc.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},neutral:{light:{primary:`neutral.800`,ring:`neutral.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`neutral.200`,ring:`neutral.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},stone:{light:{primary:`stone.800`,ring:`stone.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`stone.200`,ring:`stone.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},taupe:{light:{primary:`taupe.800`,ring:`taupe.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`taupe.200`,ring:`taupe.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},olive:{light:{primary:`olive.800`,ring:`olive.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`olive.200`,ring:`olive.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},mauve:{light:{primary:`mauve.800`,ring:`mauve.400`,chart1:`orange.600`,chart2:`teal.600`,chart3:`cyan.900`,chart4:`amber.400`,chart5:`amber.500`},dark:{primary:`mauve.200`,ring:`mauve.500`,chart1:`blue.700`,chart2:`emerald.500`,chart3:`amber.500`,chart4:`purple.500`,chart5:`rose.500`}},red:{light:{primary:`red.500`,ring:`red.400`,chart1:`red.300`,chart2:`red.500`,chart3:`red.600`,chart4:`red.700`,chart5:`red.800`},dark:{primary:`red.500`,ring:`red.900`,chart1:`red.300`,chart2:`red.500`,chart3:`red.600`,chart4:`red.700`,chart5:`red.800`}},orange:{light:{primary:`orange.500`,ring:`orange.400`,chart1:`orange.300`,chart2:`orange.500`,chart3:`orange.600`,chart4:`orange.700`,chart5:`orange.800`},dark:{primary:`orange.500`,ring:`orange.900`,chart1:`orange.300`,chart2:`orange.500`,chart3:`orange.600`,chart4:`orange.700`,chart5:`orange.800`}},amber:{light:{primary:`amber.500`,ring:`amber.400`,chart1:`amber.300`,chart2:`amber.500`,chart3:`amber.600`,chart4:`amber.700`,chart5:`amber.800`},dark:{primary:`amber.500`,ring:`amber.900`,chart1:`amber.300`,chart2:`amber.500`,chart3:`amber.600`,chart4:`amber.700`,chart5:`amber.800`}},yellow:{light:{primary:`yellow.500`,ring:`yellow.400`,chart1:`yellow.300`,chart2:`yellow.500`,chart3:`yellow.600`,chart4:`yellow.700`,chart5:`yellow.800`},dark:{primary:`yellow.500`,ring:`yellow.900`,chart1:`yellow.300`,chart2:`yellow.500`,chart3:`yellow.600`,chart4:`yellow.700`,chart5:`yellow.800`}},lime:{light:{primary:`lime.500`,ring:`lime.400`,chart1:`lime.300`,chart2:`lime.500`,chart3:`lime.600`,chart4:`lime.700`,chart5:`lime.800`},dark:{primary:`lime.600`,ring:`lime.900`,chart1:`lime.300`,chart2:`lime.500`,chart3:`lime.600`,chart4:`lime.700`,chart5:`lime.800`}},green:{light:{primary:`green.500`,ring:`green.400`,chart1:`green.300`,chart2:`green.500`,chart3:`green.600`,chart4:`green.700`,chart5:`green.800`},dark:{primary:`green.600`,ring:`green.900`,chart1:`green.300`,chart2:`green.500`,chart3:`green.600`,chart4:`green.700`,chart5:`green.800`}},emerald:{light:{primary:`emerald.500`,ring:`emerald.400`,chart1:`emerald.300`,chart2:`emerald.500`,chart3:`emerald.600`,chart4:`emerald.700`,chart5:`emerald.800`},dark:{primary:`emerald.600`,ring:`emerald.900`,chart1:`emerald.300`,chart2:`emerald.500`,chart3:`emerald.600`,chart4:`emerald.700`,chart5:`emerald.800`}},teal:{light:{primary:`teal.500`,ring:`teal.400`,chart1:`teal.300`,chart2:`teal.500`,chart3:`teal.600`,chart4:`teal.700`,chart5:`teal.800`},dark:{primary:`teal.500`,ring:`teal.900`,chart1:`teal.300`,chart2:`teal.500`,chart3:`teal.600`,chart4:`teal.700`,chart5:`teal.800`}},cyan:{light:{primary:`cyan.500`,ring:`cyan.400`,chart1:`cyan.300`,chart2:`cyan.500`,chart3:`cyan.600`,chart4:`cyan.700`,chart5:`cyan.800`},dark:{primary:`cyan.500`,ring:`cyan.900`,chart1:`cyan.300`,chart2:`cyan.500`,chart3:`cyan.600`,chart4:`cyan.700`,chart5:`cyan.800`}},sky:{light:{primary:`sky.500`,ring:`sky.400`,chart1:`sky.300`,chart2:`sky.500`,chart3:`sky.600`,chart4:`sky.700`,chart5:`sky.800`},dark:{primary:`sky.500`,ring:`sky.900`,chart1:`sky.300`,chart2:`sky.500`,chart3:`sky.600`,chart4:`sky.700`,chart5:`sky.800`}},blue:{light:{primary:`blue.500`,ring:`blue.400`,chart1:`blue.300`,chart2:`blue.500`,chart3:`blue.600`,chart4:`blue.700`,chart5:`blue.800`},dark:{primary:`blue.500`,ring:`blue.900`,chart1:`blue.300`,chart2:`blue.500`,chart3:`blue.600`,chart4:`blue.700`,chart5:`blue.800`}},indigo:{light:{primary:`indigo.500`,ring:`indigo.400`,chart1:`indigo.300`,chart2:`indigo.500`,chart3:`indigo.600`,chart4:`indigo.700`,chart5:`indigo.800`},dark:{primary:`indigo.500`,ring:`indigo.900`,chart1:`indigo.300`,chart2:`indigo.500`,chart3:`indigo.600`,chart4:`indigo.700`,chart5:`indigo.800`}},violet:{light:{primary:`violet.500`,ring:`violet.400`,chart1:`violet.300`,chart2:`violet.500`,chart3:`violet.600`,chart4:`violet.700`,chart5:`violet.800`},dark:{primary:`violet.500`,ring:`violet.900`,chart1:`violet.300`,chart2:`violet.500`,chart3:`violet.600`,chart4:`violet.700`,chart5:`violet.800`}},purple:{light:{primary:`purple.500`,ring:`purple.400`,chart1:`purple.300`,chart2:`purple.500`,chart3:`purple.600`,chart4:`purple.700`,chart5:`purple.800`},dark:{primary:`purple.500`,ring:`purple.900`,chart1:`purple.300`,chart2:`purple.500`,chart3:`purple.600`,chart4:`purple.700`,chart5:`purple.800`}},fuchsia:{light:{primary:`fuchsia.500`,ring:`fuchsia.400`,chart1:`fuchsia.300`,chart2:`fuchsia.500`,chart3:`fuchsia.600`,chart4:`fuchsia.700`,chart5:`fuchsia.800`},dark:{primary:`fuchsia.500`,ring:`fuchsia.900`,chart1:`fuchsia.300`,chart2:`fuchsia.500`,chart3:`fuchsia.600`,chart4:`fuchsia.700`,chart5:`fuchsia.800`}},pink:{light:{primary:`pink.500`,ring:`pink.400`,chart1:`pink.300`,chart2:`pink.500`,chart3:`pink.600`,chart4:`pink.700`,chart5:`pink.800`},dark:{primary:`pink.500`,ring:`pink.900`,chart1:`pink.300`,chart2:`pink.500`,chart3:`pink.600`,chart4:`pink.700`,chart5:`pink.800`}},rose:{light:{primary:`rose.500`,ring:`rose.400`,chart1:`rose.300`,chart2:`rose.500`,chart3:`rose.600`,chart4:`rose.700`,chart5:`rose.800`},dark:{primary:`rose.500`,ring:`rose.900`,chart1:`rose.300`,chart2:`rose.500`,chart3:`rose.600`,chart4:`rose.700`,chart5:`rose.800`}}},HT={classic:{light:{destructive:`red.500`,success:`green.500`,warning:`amber.500`,info:`blue.500`},dark:{destructive:`red.400`,success:`green.400`,warning:`amber.400`,info:`blue.400`}},vivid:{light:{destructive:`red.500`,success:`emerald.500`,warning:`amber.500`,info:`sky.500`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`amber.400`,info:`sky.400`}},subtle:{light:{destructive:`rose.500`,success:`emerald.500`,warning:`amber.500`,info:`indigo.500`},dark:{destructive:`rose.300`,success:`emerald.300`,warning:`amber.300`,info:`indigo.300`}},warm:{light:{destructive:`red.500`,success:`lime.500`,warning:`orange.500`,info:`amber.600`},dark:{destructive:`red.400`,success:`lime.400`,warning:`orange.400`,info:`amber.400`}},cool:{light:{destructive:`rose.500`,success:`teal.500`,warning:`cyan.600`,info:`blue.500`},dark:{destructive:`rose.400`,success:`teal.400`,warning:`cyan.400`,info:`blue.400`}},nature:{light:{destructive:`red.500`,success:`green.600`,warning:`lime.600`,info:`teal.600`},dark:{destructive:`red.300`,success:`green.300`,warning:`lime.300`,info:`teal.300`}},modern:{light:{destructive:`red.500`,success:`emerald.500`,warning:`orange.500`,info:`sky.500`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`orange.400`,info:`sky.400`}},vibrant:{light:{destructive:`red.500`,success:`lime.500`,warning:`amber.500`,info:`cyan.500`},dark:{destructive:`pink.400`,success:`lime.400`,warning:`amber.400`,info:`cyan.400`}},professional:{light:{destructive:`red.500`,success:`green.600`,warning:`amber.600`,info:`blue.600`},dark:{destructive:`red.300`,success:`green.300`,warning:`amber.300`,info:`blue.300`}},soft:{light:{destructive:`rose.400`,success:`teal.400`,warning:`yellow.400`,info:`violet.400`},dark:{destructive:`rose.300`,success:`teal.300`,warning:`yellow.300`,info:`violet.300`}},bold:{light:{destructive:`red.600`,success:`emerald.600`,warning:`orange.600`,info:`blue.600`},dark:{destructive:`red.300`,success:`emerald.300`,warning:`orange.300`,info:`blue.300`}},calm:{light:{destructive:`rose.500`,success:`teal.500`,warning:`amber.500`,info:`slate.500`},dark:{destructive:`rose.400`,success:`teal.400`,warning:`amber.400`,info:`slate.400`}},candy:{light:{destructive:`pink.400`,success:`emerald.400`,warning:`yellow.400`,info:`sky.400`},dark:{destructive:`pink.300`,success:`emerald.300`,warning:`yellow.300`,info:`sky.300`}},deep:{light:{destructive:`red.600`,success:`green.700`,warning:`amber.700`,info:`blue.700`},dark:{destructive:`red.200`,success:`green.200`,warning:`amber.200`,info:`blue.200`}},light:{light:{destructive:`red.400`,success:`emerald.400`,warning:`amber.400`,info:`sky.400`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`amber.400`,info:`sky.400`}}};vT(BT),vT(VT),vT(HT),vT(BT.zinc.light),vT(VT.indigo.light),vT(HT.classic.light);function UT(e,t){return`${WT(t)}\n\n${GT(e,t)}`}function WT(e){let{styleTarget:t,size:n,radius:r,menuColor:i,menuAccent:a}=e,o=``;o+=`${t} {\n`,o+=` ${DT}: ${TT(n)};\n`,o+=` ${OT}: ${ET(r)};\n`;let s=RT[i];vT(s).forEach(e=>{o+=` ${e}: ${s[e]};\n`});let c=zT[a];return vT(c).forEach(e=>{o+=` ${e}: ${c[e]};\n`}),o+=`}
|
|
326
|
+
|
|
327
|
+
`,o}function GT(e,t){let{light:n,dark:r}=e,{format:i,styleTarget:a}=t,o=``,s=``;vT(kT).forEach(e=>{let t=KT(e,i,n),a=KT(e,i,r);o+=t,a!==t&&(s+=a)});let c=``,l=``;[`primary`,`destructive`,`success`,`warning`,`info`,`carbon`].forEach(e=>{let t=JT(n[e],e,i),a=JT(r[e],e,i);c+=t,a!==t&&(l+=a)});let u=`${a} {\n${o}\n${c}\n}`,d=t.darkSelector;return(d===`class`||d===`media`)&&(d=NT[d]),u+=`\n\n${d} {\n${s}\n${l}\n}`,u}function KT(e,t,n){let r=n[e];if(!r)return``;let i=wT(r,t);t===`hsl`&&(i=ST(i));let{color:a,alphaCss:o}=qT(i,t,e);i=a;let s=`${kT[e]}: ${i};\n`;return s+=o,s}function qT(e,t,n){if(CT(e)||t===`oklch`||![`border`,`input`,`sidebarBorder`].includes(n))return{color:e,alphaCss:``};let[r,i=`1`]=e.split(`/`);r=r.trim(),i=i.trim();let a=Number.parseFloat(i);i.endsWith(`%`)&&(a/=100);let o=``;return n===`border`&&(o=`${AT.borderAlpha}: ${a};\n`),n===`input`&&(o+=`${AT.inputAlpha}: ${a};\n`),n===`sidebarBorder`&&(o+=`${AT.sidebarBorderAlpha}: ${a};\n`),{color:r,alphaCss:o}}function JT(e,t,n){let r=``,i=mT(wT(e,n),n===`hsl`?`hslString`:`oklchString`);return vT(i).forEach(e=>{let a=i[e];n===`hsl`&&(a=ST(a)),r+=`--${t}-${e}: ${a};\n`}),r}function YT(e,t){let n=XT(e);return t?{light:yT(n.light,t.light),dark:yT(n.dark,t.dark||{})}:n}function XT(e){let{base:t,primary:n,feedback:r}=e,i=BT[t],a=VT[n],o=HT[r],s=ZT({light:{...i.light,...a.light},dark:{...i.dark,...a.dark}});return{light:{...i.light,...a.light,...o.light,...s.light},dark:{...i.dark,...a.dark,...o.dark,...s.dark}}}function ZT(e){let{light:t,dark:n}=e;return{light:{sidebar:t.background,sidebarForeground:t.foreground,sidebarPrimary:t.primary,sidebarPrimaryForeground:t.primaryForeground,sidebarAccent:t.accent,sidebarAccentForeground:t.accentForeground,sidebarBorder:t.border,sidebarRing:t.ring},dark:{sidebar:n.card,sidebarForeground:n.foreground,sidebarPrimary:n.primary,sidebarPrimaryForeground:n.primaryForeground,sidebarAccent:n.accent,sidebarAccentForeground:n.accentForeground,sidebarBorder:n.border,sidebarRing:n.ring}}}function QT(e){let{size:t,radius:n,base:r,primary:i,feedback:a,menuColor:o,menuAccent:s,styleTarget:c,darkSelector:l,format:u,preset:d}=yT(MT,e??{}),f=bT(l);return{getCss:e=>UT(YT({base:e?.base??r,primary:e?.primary??i,feedback:e?.feedback??a},e?.preset??d),{styleTarget:c,darkSelector:f,format:u,size:t,radius:n,menuColor:o,menuAccent:s})}}var $T=Tr({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},messages:{}},setup(e){let t=e,n=mv(t,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`]),r=t.iconRender??(e=>oo(B,{icon:e,ssr:!1}));return $_(L(()=>{let{getCss:e}=QT({...t.theme,size:t.theme.size||t.size||`md`});return e()}),{id:`__SoybeanUI_theme`}),kv({...Tf(t),iconRender:r}),(e,i)=>(M(),wa(j(DS),Ia(j(n),{"icon-render":j(r)}),{default:Rn(()=>[$r(e.$slots,`default`),t.customToast?I(`v-if`,!0):(M(),wa(sT,ve(Ia({key:0},t.toast)),null,16)),F(nT),F(iT,ve(Aa(t.progress)),null,16)]),_:3},16,[`icon-render`]))}});Jl({extendBase:e=>({shortcut:tT({size:e.size})}),slots:{positioner:``,popup:[`z-50 min-w-max rounded-md border bg-popover text-popover-foreground shadow-md will-change-transform outline-none`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],arrow:`w-1em h-0.5em fill-popover stroke-border`,subPositioner:``,subPopup:[`z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],group:``,groupLabel:`flex items-center font-medium text-muted-foreground`,checkboxGroup:``,radioGroup:``,item:[`relative flex items-center rounded-sm outline-none transition-colors-200 cursor-pointer select-none`,`focus:bg-accent focus:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,`data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,`data-[active=false]:hover:bg-accent data-[active=false]:focus:bg-accent`],itemIcon:`shrink-0 text-muted-foreground`,itemLink:[`relative flex items-center rounded-sm outline-none transition-colors-200 cursor-pointer select-none decoration-none`,`focus:bg-accent focus:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemLinkIcon:`shrink-0 self-start text-muted-foreground rtl:rotate-270`,subTrigger:`group/trigger flex items-center rounded-sm outline-none cursor-pointer select-none focus:bg-accent data-[state=open]:bg-accent data-[child-active]:text-primary`,subTriggerIcon:`ms-auto text-muted-foreground group-data-[child-active]/trigger:text-primary`,shortcut:`ms-auto tracking-widest opacity-60`,separator:`h-px bg-border`,checkboxItem:[`relative flex items-center rounded-sm outline-none transition-colors-200 cursor-pointer select-none`,`focus:bg-accent focus:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemIndicator:`absolute flex items-center justify-center text-primary`,radioItem:[`relative flex items-center rounded-sm outline-none transition-colors-200 cursor-pointer select-none`,`focus:bg-accent focus:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`]},variants:{size:{xs:{popup:`text-2xs p-0.75`,groupLabel:`gap-1 p-1 text-3xs`,item:`gap-1 px-1 py-1`,itemLink:`gap-1 px-1 py-1`,itemLinkIcon:`size-2 -ms-1`,separator:`-mx-0.75 my-0.75`,subTrigger:`gap-1 px-1 py-1`,subPopup:`text-2xs p-0.75`,checkboxItem:`gap-1 py-1`,radioItem:`gap-1 py-1`},sm:{popup:`text-xs p-0.875`,groupLabel:`gap-1.25 p-1.25 text-2xs`,item:`gap-1.5 px-1.5 py-1`,itemLink:`gap-1.5 px-1.5 py-1`,itemLinkIcon:`size-2.5 -ms-1.5`,separator:`-mx-0.875 my-0.875`,subTrigger:`gap-1.5 px-1.5 py-1`,subPopup:`text-xs p-0.875`,checkboxItem:`gap-1.5 py-1`,radioItem:`gap-1.5 py-1`},md:{popup:`text-sm p-1`,groupLabel:`gap-1.75 p-1.75 text-xs`,item:`gap-2 px-2 py-1.5`,itemLink:`gap-2 px-2 py-1.5`,itemLinkIcon:`size-3 -ms-2`,separator:`-mx-1 my-1`,subTrigger:`gap-2 px-2 py-1.5`,subPopup:`text-sm p-1`,checkboxItem:`gap-2 py-1.5`,radioItem:`gap-2 py-1.5`},lg:{popup:`text-base p-1.25`,groupLabel:`gap-2 p-2 text-sm`,item:`gap-2.5 px-2.5 py-1.5`,itemLink:`gap-2.5 px-2.5 py-1.5`,itemLinkIcon:`size-3.5 -ms-2.5`,separator:`-mx-1.25 my-1.25`,subTrigger:`gap-2.5 px-2.5 py-1.5`,subPopup:`text-base p-1.25`,checkboxItem:`gap-2.5 py-1.5`,radioItem:`gap-2.5 py-1.5`},xl:{popup:`text-lg p-1.5`,groupLabel:`gap-2.5 p-2.5 text-base`,item:`gap-3 px-3 py-2`,itemLink:`gap-3 px-3 py-2`,itemLinkIcon:`size-4 -ms-3`,separator:`-mx-1.5 my-1.5`,subTrigger:`gap-3 px-3 py-2`,subPopup:`text-lg p-1.5`,checkboxItem:`gap-3 py-2`,radioItem:`gap-3 py-2`},"2xl":{popup:`text-xl p-1.75`,groupLabel:`gap-3 p-3 text-lg`,item:`gap-3.5 px-3.5 py-2.5`,itemLink:`gap-3.5 px-3.5 py-2.5`,itemLinkIcon:`size-4.5 -ms-3.5`,separator:`-mx-1.75 my-1.75`,subTrigger:`gap-3.5 px-3.5 py-2.5`,subPopup:`text-xl p-1.75`,checkboxItem:`gap-3.5 py-2.5`,radioItem:`gap-3.5 py-2.5`}},indicatorPosition:{start:{itemIndicator:`start-2`,checkboxItem:`ps-8 pe-2`,radioItem:`ps-8 pe-2`},end:{itemIndicator:`end-2`,checkboxItem:`ps-2 pe-8`,radioItem:`ps-2 pe-8`}}},compoundVariants:[{indicatorPosition:`start`,size:`xs`,class:{itemIndicator:`start-1`,checkboxItem:`ps-6 pe-1`,radioItem:`ps-6 pe-1`}},{indicatorPosition:`end`,size:`xs`,class:{itemIndicator:`end-1`,checkboxItem:`ps-1 pe-6`,radioItem:`ps-1 pe-6`}},{indicatorPosition:`start`,size:`sm`,class:{itemIndicator:`start-1.5`,checkboxItem:`ps-7 pe-1.5`,radioItem:`ps-7 pe-1.5`}},{indicatorPosition:`end`,size:`sm`,class:{itemIndicator:`end-1.5`,checkboxItem:`ps-1.5 pe-7`,radioItem:`ps-1.5 pe-7`}},{indicatorPosition:`start`,size:`lg`,class:{itemIndicator:`start-2.5`,checkboxItem:`ps-9 pe-2.5`,radioItem:`ps-9 pe-2.5`}},{indicatorPosition:`end`,size:`lg`,class:{itemIndicator:`end-2.5`,checkboxItem:`ps-2.5 pe-9`,radioItem:`ps-2.5 pe-9`}},{indicatorPosition:`start`,size:`xl`,class:{itemIndicator:`start-3`,checkboxItem:`ps-10 pe-3`,radioItem:`ps-10 pe-3`}},{indicatorPosition:`end`,size:`xl`,class:{itemIndicator:`end-3`,checkboxItem:`ps-3 pe-10`,radioItem:`ps-3 pe-10`}},{indicatorPosition:`start`,size:`2xl`,class:{itemIndicator:`start-3.5`,checkboxItem:`ps-12 pe-3.5`,radioItem:`ps-12 pe-3.5`}},{indicatorPosition:`end`,size:`2xl`,class:{itemIndicator:`end-3.5`,checkboxItem:`ps-3.5 pe-12`,radioItem:`ps-3.5 pe-12`}}],defaultVariants:{size:`md`,indicatorPosition:`start`}});var eE=Jl({slots:{root:[`group inline-flex items-center w-fit lt-md:max-w-auto rounded-md border border-input bg-background transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:opacity-50 data-[readonly]:bg-muted/40`,`data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive/20`],input:[`inline-flex items-center justify-center rounded-sm text-center outline-none`,`tabular-nums leading-none`,`data-[segment=literal]:min-w-0 data-[segment=literal]:px-0 data-[segment=literal]:text-muted-foreground`,`data-[segment=timeZoneName]:min-w-fit data-[segment=timeZoneName]:px-1 data-[segment=timeZoneName]:text-muted-foreground`,`data-[placeholder]:text-muted-foreground`,`focus-visible:bg-accent/60 focus-visible:ring-2 focus-visible:ring-primary/20`,`data-[disabled]:cursor-not-allowed data-[readonly]:cursor-default`]},variants:{size:{xs:{root:`gap-0.5 h-6 px-1.5 text-2xs`,input:`min-w-4.5 p-0.5 data-[segment=timeZoneName]:px-0.5`},sm:{root:`gap-0.75 h-7 px-2 text-xs`,input:`min-w-5 p-0.5 data-[segment=timeZoneName]:px-0.75`},md:{root:`gap-1 h-8 px-2.5 text-sm`,input:`min-w-5.5 p-0.625 data-[segment=timeZoneName]:px-1`},lg:{root:`gap-1.25 h-9 px-3 text-base`,input:`min-w-6 p-0.75 data-[segment=timeZoneName]:px-1.25`},xl:{root:`gap-1.5 h-10 px-3.5 text-lg`,input:`min-w-6.5 p-0.875 data-[segment=timeZoneName]:px-1.5`},"2xl":{root:`gap-2 h-12 px-4 text-xl`,input:`min-w-8 p-1 data-[segment=timeZoneName]:px-2`}}},defaultVariants:{size:`md`}});Jl({extend:[Jl({extend:[eE],slots:{trigger:`ms-auto data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground`,positioner:`w-max`,popup:[`w-auto rounded-md border bg-popover text-popover-foreground outline-none z-50 will-change-transform`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`]},variants:{size:{xs:{popup:`text-2xs`},sm:{popup:`text-xs`},md:{popup:`text-sm`},lg:{popup:`text-base`},xl:{popup:`text-lg`},"2xl":{popup:`text-xl`}}},defaultVariants:{size:`md`}}),Jl({extend:[eE],slots:{startRoot:`inline-flex items-center`,endRoot:`inline-flex items-center`,separator:[`inline-flex items-center justify-center text-muted-foreground`,`select-none`]},variants:{size:{xs:{separator:`px-0.5`},sm:{separator:`px-0.75`},md:{separator:`px-1`},lg:{separator:`px-1.25`},xl:{separator:`px-1.5`},"2xl":{separator:`px-2`}}},defaultVariants:{size:`md`}})],defaultVariants:{size:`md`}}),Jl({slots:{root:`w-full`,area:[`grid w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-md border border-solid border-input bg-background transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],preview:[`col-start-1 row-start-1 min-w-0 truncate text-foreground outline-none`,`data-[placeholder-shown]:text-muted-foreground`],input:[`col-start-1 row-start-1 min-w-0 w-full border-0 bg-transparent outline-none`,`placeholder:text-muted-foreground`,`disabled:cursor-not-allowed`],controls:`col-start-2 row-start-1 flex items-center gap-1`,editTrigger:[`inline-flex items-center justify-center rounded-md text-muted-foreground transition-colors`,`hover:bg-accent hover:text-accent-foreground`,`outline-none focus-visible:ring-2 focus-visible:ring-primary/30`],submitTrigger:[`inline-flex items-center justify-center rounded-md text-muted-foreground transition-colors`,`hover:bg-accent hover:text-success`,`outline-none focus-visible:ring-2 focus-visible:ring-primary/30`],cancelTrigger:[`inline-flex items-center justify-center rounded-md text-muted-foreground transition-colors`,`hover:bg-accent hover:text-destructive`,`outline-none focus-visible:ring-2 focus-visible:ring-primary/30`]},variants:{size:{xs:{area:`min-h-6 px-1.5 py-1 text-2xs`,preview:`text-2xs`,input:`text-2xs`,controls:`gap-0.5`,editTrigger:`size-5 [&>svg]:size-3`,submitTrigger:`size-5 [&>svg]:size-3`,cancelTrigger:`size-5 [&>svg]:size-3`},sm:{area:`min-h-7 px-2 py-1 text-xs`,preview:`text-xs`,input:`text-xs`,editTrigger:`size-6 [&>svg]:size-3.5`,submitTrigger:`size-6 [&>svg]:size-3.5`,cancelTrigger:`size-6 [&>svg]:size-3.5`},md:{area:`min-h-8 px-2.5 py-1.5 text-sm`,preview:`text-sm`,input:`text-sm`,editTrigger:`size-7 [&>svg]:size-4`,submitTrigger:`size-7 [&>svg]:size-4`,cancelTrigger:`size-7 [&>svg]:size-4`},lg:{area:`min-h-9 px-3 py-1.5 text-base`,preview:`text-base`,input:`text-base`,editTrigger:`size-8 [&>svg]:size-4`,submitTrigger:`size-8 [&>svg]:size-4`,cancelTrigger:`size-8 [&>svg]:size-4`},xl:{area:`min-h-10 px-3.5 py-2 text-lg`,preview:`text-lg`,input:`text-lg`,editTrigger:`size-9 [&>svg]:size-5`,submitTrigger:`size-9 [&>svg]:size-5`,cancelTrigger:`size-9 [&>svg]:size-5`},"2xl":{area:`min-h-12 px-4 py-2.5 text-xl`,preview:`text-xl`,input:`text-xl`,editTrigger:`size-10 [&>svg]:size-5`,submitTrigger:`size-10 [&>svg]:size-5`,cancelTrigger:`size-10 [&>svg]:size-5`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`flex flex-col items-center justify-center min-w-0 grow rounded-md border border-dashed text-center`,header:`flex flex-col items-center max-w-sm text-center`,media:`flex shrink-0 items-center justify-center rounded-md bg-muted text-foreground`,title:`font-medium tracking-tight`,description:`leading-relaxed text-muted-foreground`,content:`flex w-full min-w-0 max-w-sm flex-col items-center`},variants:{size:{xs:{root:`text-2xs gap-3`,title:`text-xs`,header:`gap-1.5`,media:`my-1.5`},sm:{root:`text-xs gap-3.5`,title:`text-sm`,header:`gap-1.75`,media:`my-1.75`},md:{root:`text-sm gap-4`,title:`text-base`,header:`gap-2`,media:`my-2 size-10`},lg:{root:`text-base gap-4.5`,title:`text-lg`,header:`gap-2.5`,media:`my-2.5`},xl:{root:`text-lg gap-5`,title:`text-xl`,header:`gap-3`,media:`my-3`},"2xl":{root:`text-xl gap-6`,title:`text-2xl`,header:`gap-3.5`,media:`my-3.5`}}},defaultVariants:{size:`md`}}),Jl({slots:{form:`grid`,field:[`group flex data-[orientation=vertical]:flex-col`,`data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:flex-wrap data-[orientation=horizontal]:justify-between data-[orientation=horizontal]:items-center`],fieldArray:[`group flex data-[orientation=vertical]:flex-col`,`data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:flex-wrap data-[orientation=horizontal]:justify-between`],label:[`flex items-center whitespace-nowrap`,`group-data-[orientation=horizontal]:justify-end group-data-[orientation=horizontal]:shrink-0`],control:`group-data-[orientation=horizontal]:flex-1 group-data-[orientation=horizontal]:min-w-0`,description:`text-muted-foreground m-0 group-data-[orientation=horizontal]:w-full`,error:[`font-medium text-destructive m-0`,`group-data-[orientation=horizontal]:absolute group-data-[orientation=horizontal]:start-0 group-data-[orientation=horizontal]:top-full group-data-[orientation=horizontal]:w-full`]},variants:{size:{xs:{field:`text-2xs gap-x-2.25 gap-y-1.5`,fieldArray:`text-2xs gap-x-2.25 gap-y-1.5`,label:`gap-1.5`,description:`group-data-[error]:pt-1.75`},sm:{field:`text-xs gap-x-2.5 gap-y-1.75`,fieldArray:`text-xs gap-x-2.5 gap-y-1.75`,label:`gap-1.75`,description:`group-data-[error]:pt-2`},md:{field:`text-sm gap-x-3 gap-y-2`,fieldArray:`text-sm gap-x-3 gap-y-2`,label:`gap-2`,description:`group-data-[error]:pt-2.5`},lg:{field:`text-base gap-x-3.75 gap-y-2.5`,fieldArray:`text-base gap-x-3.75 gap-y-2.5`,label:`gap-2.5`,description:`group-data-[error]:pt-3`},xl:{field:`text-lg gap-x-4.5 gap-y-3`,fieldArray:`text-lg gap-x-4.5 gap-y-3`,label:`gap-3`,description:`group-data-[error]:pt-3.5`},"2xl":{field:`text-xl gap-x-5.25 gap-y-3.5`,fieldArray:`text-xl gap-x-5.25 gap-y-3.5`,label:`gap-3.5`,description:`group-data-[error]:pt-4.5`}}},defaultVariants:{size:`md`}}),Jl({slots:{positioner:`w-max`,popup:[`z-50 w-64 rounded-md border bg-popover text-popover-foreground shadow-md outline-none will-change-transform`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],arrow:`w-1em h-0.5em fill-popover stroke-border`},variants:{size:{xs:{popup:`w-48 p-3 text-2xs`,arrow:`text-3xs`},sm:{popup:`w-56 p-3.5 text-xs`,arrow:`text-2xs`},md:{popup:`w-64 p-4 text-sm`,arrow:`text-xs`},lg:{popup:`w-72 p-4.5 text-base`,arrow:`text-sm`},xl:{popup:`w-80 p-5 text-lg`,arrow:`text-base`},"2xl":{popup:`w-96 p-5.5 text-xl`,arrow:`text-lg`}}},defaultVariants:{size:`md`}});var tE=Jl({extendBase:e=>({clear:Ov({size:e.size,shape:`circle`})}),slots:{root:[`group flex items-center w-full rounded-md border border-solid border-input bg-background transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`],control:[`grow min-w-0 h-full bg-transparent outline-none`,`placeholder:text-muted-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`,`file:border-0 file:bg-transparent file:font-medium`],clear:[`hidden shrink-0 opacity-50`,`group-hover:inline-flex group-focus-within:inline-flex hover:opacity-100 focus-visible:opacity-100`],visible:`shrink-0 cursor-pointer`},variants:{size:{xs:{root:`h-6 px-1.5 text-2xs gap-1`,control:`file:py-1.25`},sm:{root:`h-7 px-2 text-xs gap-1.5`,control:`file:py-1.25`},md:{root:`h-8 px-2.5 text-sm gap-2`,control:`file:py-1.25`},lg:{root:`h-9 px-3 text-base gap-2.5`,control:`file:py-1.25`},xl:{root:`h-10 px-3.5 text-lg gap-3`,control:`file:py-1.25`},"2xl":{root:`h-12 px-4 text-xl gap-3.5`,control:`file:py-2`}}},defaultVariants:{size:`md`}});Jl({extendBase:e=>({decrement:Ov({size:e.size}),increment:Ov({size:e.size}),clear:Ov({size:e.size,shape:`circle`})}),slots:{root:`group flex items-center w-full rounded-md border border-input bg-background transition-all-150 focus-within:border-input focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30 disabled:cursor-not-allowed disabled:opacity-50`,decrement:`shrink-0`,increment:`shrink-0`,control:[`grow min-w-0 h-full bg-transparent outline-none`,`placeholder:text-muted-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`],clear:[`hidden shrink-0 opacity-50`,`group-hover:inline-flex group-focus-within:inline-flex hover:opacity-100 focus-visible:opacity-100`]},variants:{size:{xs:{root:`h-6 px-1.5 text-2xs gap-1`},sm:{root:`h-7 px-2 text-xs gap-1.5`},md:{root:`h-8 px-2.5 text-sm gap-2`},lg:{root:`h-9 px-3 text-base gap-2.5`},xl:{root:`h-10 px-3.5 text-lg gap-3`},"2xl":{root:`h-12 px-4 text-xl gap-3.5`}},center:{true:{decrement:`-order-1`,control:`text-center`}}},defaultVariants:{size:`md`,center:!1}}),Jl({slots:{root:[`relative inline-flex w-full cursor-text select-none`,`data-[disabled]:cursor-default data-[disabled]:opacity-50`],positioner:`absolute inset-0`,group:`grid w-full gap-2 grid-cols-[repeat(var(--columns),minmax(0,1fr))]`,input:[`absolute inset-0 h-full w-full border-0 bg-transparent p-0 outline-none shadow-none opacity-0`,`pointer-events-auto text-transparent caret-transparent font-mono leading-none`,`[font-variant-numeric:tabular-nums] [letter-spacing:-0.5em]`,`selection:bg-transparent selection:text-transparent`,`data-[password-manager-badge]:w-[calc(100%+40px)] data-[password-manager-badge]:[clip-path:inset(0_40px_0_0)]`],slot:[`relative inline-flex items-center justify-center overflow-hidden rounded-md border border-input bg-background font-medium text-foreground shadow-xs transition-[border-color,box-shadow,transform]`,`data-[state=active]:border-ring data-[state=active]:ring-3 data-[state=active]:ring-ring/40`,`data-[state=filled]:border-foreground/20`],char:`leading-none`,placeholder:`leading-none text-muted-foreground/60`,caret:`h-[60%] w-px animate-pulse bg-foreground`},variants:{size:{xs:{group:`gap-1.5`,slot:`h-8 text-sm`,caret:`h-4`},sm:{group:`gap-2`,slot:`h-9 text-base`,caret:`h-4.5`},md:{group:`gap-2`,slot:`h-10 text-lg`,caret:`h-5`},lg:{group:`gap-2.5`,slot:`h-11 text-xl`,caret:`h-5.5`},xl:{group:`gap-3`,slot:`h-12 text-2xl`,caret:`h-6`},"2xl":{group:`gap-3`,slot:`h-14 text-3xl`,caret:`h-7`}},align:{start:{input:`text-start`},center:{input:`text-center`},end:{input:`text-end`}}},defaultVariants:{size:`md`,align:`start`}}),Rl({base:`font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,variants:{size:{xs:`text-2xs`,sm:`text-xs`,md:`text-sm`,lg:`text-base`,xl:`text-lg`,"2xl":`text-xl`}},defaultVariants:{size:`md`}}),Jl({extendBase:e=>({trigger:Ev({size:e.size}),mobileDrawer:Eb({size:e.size,side:e.side}).popup}),slots:{root:`group relative flex w-full h-full data-[side=right]:flex-row-reverse`,sidebarRoot:`h-full block lt-md:hidden`,sidebarWrapper:`absolute inset-y-0 z-10 flex h-full w-[--soybean-sidebar-width] transition-[left,right,width,opacity] duration-200 ease-linear lt-md:hidden`,sidebar:[`flex flex-col w-full h-full bg-sidebar`,`group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-border group-data-[variant=floating]:border-solid group-data-[variant=floating]:shadow`],sidebarGapHandler:[`relative h-full w-[--soybean-sidebar-width] bg-transparent transition-width duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`],mobileDrawer:`w-[--soybean-sidebar-width] bg-sidebar p-0`,mobileOverlay:[`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],mobile:`flex flex-col w-full h-full`,rail:[`absolute inset-y-0 z-20 flex w-[--soybean-layout-spacing] -translate-x-1/2 rtl:translate-x-1/2 transition-all ease-linear lt-sm:hidden`,`after:absolute after:inset-y-0 after:start-1/2 after:content-empty after:w-[calc(var(--soybean-layout-spacing)/8)] hover:after:bg-sidebar-border`],trigger:``,main:`relative flex flex-1 flex-col items-stretch bg-background overflow-hidden`,header:`relative flex items-center shrink-0 h-[--soybean-layout-header-height]`,tab:`shrink-0 h-[--soybean-layout-tab-height] bg-background`,content:`grow overflow-auto bg-background`,footer:`shrink-0 h-[--soybean-layout-footer-height]`},variants:{size:{xs:{root:`text-2xs [--soybean-layout-spacing:0.75rem]`},sm:{root:`text-xs [--soybean-layout-spacing:0.875rem]`},md:{root:`text-sm [--soybean-layout-spacing:1rem]`},lg:{root:`text-base [--soybean-layout-spacing:1.25rem]`},xl:{root:`text-lg [--soybean-layout-spacing:1.5rem]`},"2xl":{root:`text-xl [--soybean-layout-spacing:1.75rem]`}},variant:{sidebar:{sidebarGapHandler:`group-data-[collapsible=icon]:w-[--soybean-collapsed-sidebar-width]`,sidebarWrapper:`group-data-[collapsible=icon]:w-[--soybean-collapsed-sidebar-width] group-data-[side=left]:border-e group-data-[side=right]:border-s`},floating:{sidebarGapHandler:`w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`,sidebarWrapper:`p-[calc(var(--soybean-layout-spacing)/2)] w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`},inset:{root:`bg-sidebar`,sidebarGapHandler:`w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`,sidebarWrapper:`p-[calc(var(--soybean-layout-spacing)/2)] w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`,main:`md:m-[calc(var(--soybean-layout-spacing)/2)] md:ms-0 md:rounded-xl md:shadow`}},side:{left:{sidebarWrapper:`start-0 group-data-[collapsible=offcanvas]:start-[calc(var(--soybean-sidebar-width)*-1)]`,rail:`cursor-w-resize group-data-[state=collapsed]:cursor-e-resize -end-[var(--soybean-layout-spacing)]`},right:{sidebarWrapper:`end-0 group-data-[collapsible=offcanvas]:end-[calc(var(--soybean-sidebar-width)*-1)]`,rail:`cursor-e-resize group-data-[state=collapsed]:cursor-w-resize start-0`}},collapsible:{offcanvas:{sidebarWrapper:`group-data-[state=collapsed]:opacity-0`,rail:`translate-x-0 after:start-full hover:bg-sidebar`},icon:{}},fullContent:{true:{tab:`fixed start-0 top-0 z-49 w-full`,content:`fixed inset-0 z-49 group-data-[tab-visible=true]:mt-[--soybean-layout-tab-height]`},false:{content:`relative`}}},compoundVariants:[{side:`left`,collapsible:`offcanvas`,class:{rail:`-end-[var(--soybean-layout-spacing)/2]`}},{side:`right`,collapsible:`offcanvas`,class:{rail:`-start-[var(--soybean-layout-spacing)/2]`}},{side:`left`,variant:`inset`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:end-0`}},{side:`right`,variant:`inset`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:start-0`}},{side:`left`,variant:`floating`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:end-[calc(var(--soybean-layout-spacing)/2)]`}},{side:`right`,variant:`floating`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:start-[calc(var(--soybean-layout-spacing)/2)]`}},{variant:`inset`,collapsible:`offcanvas`,class:{main:`md:group-data-[state=collapsed]:ms-[calc(var(--soybean-layout-spacing)/2)]`}}],defaultVariants:{variant:`sidebar`,side:`left`,collapsible:`icon`}}),Jl({extendBase:e=>({trigger:Ev({size:e.size}),mobileDrawer:Eb({size:e.size,side:e.side}).popup}),slots:{root:`group relative h-full transition-all-300`,main:`flex flex-col h-full group-data-[scroll-behavior=wrapper]:overflow-y-auto transition-all-300`,sidebarRoot:`lt-md:hidden`,sidebarWrapper:[`absolute inset-y-0 z-[--soybean-layout-sidebar-z-index] flex h-full w-[--soybean-sidebar-width] transition-[inset-inline-start,inset-inline-end,width,opacity] duration-200 ease-linear lt-md:hidden`,`group-data-[state=collapsed]:w-[--soybean-collapsed-sidebar-width] pt-[--soybean-layout-sidebar-top-gap] pb-[--soybean-layout-sidebar-bottom-gap]`],sidebar:[`flex flex-col w-full h-full bg-sidebar`,`group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-border group-data-[variant=floating]:border-solid group-data-[variant=floating]:shadow`],mobileDrawer:`w-[--soybean-sidebar-width] bg-sidebar p-0`,mobileOverlay:[`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],mobile:`flex flex-col w-full h-full`,rail:[`absolute inset-y-0 z-20 flex w-[--soybean-layout-spacing] -translate-x-1/2 transition-all ease-linear lt-sm:hidden`,`after:absolute after:inset-y-0 after:start-1/2 after:content-empty after:w-[calc(var(--soybean-layout-spacing)/8)] hover:after:bg-sidebar-border`],trigger:``,header:[`shrink-0 flex items-center h-[--soybean-layout-header-height]`,`group-data-[fixed-top=true]:absolute group-data-[fixed-top=true]:z-[--soybean-layout-header-z-index] group-data-[fixed-top=true]:top-0 group-data-[fixed-top=true]:inset-x-0`],headerPlaceholder:`shrink-0 h-[--soybean-layout-header-height] overflow-hidden`,tab:`shrink-0 h-[--soybean-layout-tab-height] group-data-[fixed-top=true]:z-[--soybean-layout-tab-z-index]`,tabPlaceholder:`shrink-0 h-[--soybean-layout-tab-height] overflow-hidden`,content:`grow bg-background group-data-[scroll-behavior=content]:overflow-y-auto`,footer:[`shrink-0 h-[--soybean-layout-footer-height]`,`group-data-[fixed-footer=true]:absolute group-data-[fixed-footer=true]:z-[--soybean-layout-footer-z-index] group-data-[fixed-footer=true]:bottom-0 group-data-[fixed-footer=true]:inset-x-0`],footerPlaceholder:`shrink-0 h-[--soybean-layout-footer-height] overflow-hidden`},variants:{size:{xs:{root:`text-2xs [--soybean-layout-spacing:0.75rem]`},sm:{root:`text-xs [--soybean-layout-spacing:0.875rem]`},md:{root:`text-sm [--soybean-layout-spacing:1rem]`},lg:{root:`text-base [--soybean-layout-spacing:1.25rem]`},xl:{root:`text-lg [--soybean-layout-spacing:1.5rem]`},"2xl":{root:`text-xl [--soybean-layout-spacing:1.75rem]`}},side:{left:{main:`ps-[--soybean-layout-start-gap]`,sidebarWrapper:`start-0 border-e`,rail:`cursor-w-resize group-data-[state=collapsed]:cursor-e-resize -end-[var(--soybean-layout-spacing)]`,header:`group-data-[fixed-top=true]:ps-[--soybean-layout-header-start-gap]`,footer:`group-data-[fixed-footer=true]:ps-[--soybean-layout-footer-start-gap]`},right:{main:`pe-[--soybean-layout-start-gap]`,sidebarWrapper:`end-0 border-s`,rail:`cursor-e-resize group-data-[state=collapsed]:cursor-w-resize start-0`,header:`group-data-[fixed-top=true]:pe-[--soybean-layout-header-start-gap]`,footer:`group-data-[fixed-footer=true]:pe-[--soybean-layout-footer-start-gap]`}},fullContent:{true:{tab:`fixed start-0 top-0 z-[--soybean-layout-base-z-index] w-full`,content:`fixed inset-0 z-[--soybean-layout-base-z-index] group-data-[tab-visible=true]:mt-[--soybean-layout-tab-height] overflow-auto`},false:{tab:`group-data-[fixed-top=true]:absolute group-data-[fixed-top=true]:inset-x-0 group-data-[fixed-top=true]:top-[--soybean-layout-header-height]`,content:`relative`}}},compoundVariants:[{side:`left`,fullContent:!1,class:{tab:`group-data-[fixed-top=true]:ps-[--soybean-layout-start-gap]`}},{side:`right`,fullContent:!1,class:{tab:`group-data-[fixed-top=true]:pe-[--soybean-layout-start-gap]`}}],defaultVariants:{size:`md`,side:`left`,fullContent:!1}}),Jl({slots:{root:`flex flex-col`,item:`flex list-none`,content:`grow flex flex-col`,title:`font-medium tracking-tight m-0`,description:`[&_p]:leading-relaxed text-muted-foreground m-0`},variants:{size:{xs:{root:`gap-2 text-2xs`,item:`gap-2`,content:`gap-0.75`,title:`text-xs leading-3.125`},sm:{root:`gap-3 text-xs`,item:`gap-3`,content:`gap-1`,title:`text-sm leading-3.75`},md:{root:`gap-4 text-sm`,item:`gap-4`,content:`gap-1`,title:`text-base leading-4.375`},lg:{root:`gap-5 text-base`,item:`gap-5`,content:`gap-1.25`,title:`text-lg leading-5`},xl:{root:`gap-6 text-lg`,item:`gap-6`,content:`gap-1.5`,title:`text-xl leading-5.625`},"2xl":{root:`gap-7 text-xl`,item:`gap-7`,content:`gap-2`,title:`text-2xl leading-6.25`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`inline-flex items-center w-fit rounded-md border bg-background shadow-sm`,trigger:[`flex cursor-pointer select-none items-center rounded-sm font-medium outline-none`,`focus:(bg-accent text-accent-foreground)`,`data-[state=open]:(bg-accent text-accent-foreground)`]},variants:{size:{xs:{root:`gap-1 p-0.5 text-2xs`,trigger:`gap-1 px-1 py-1`},sm:{root:`gap-1.25 p-0.625 text-xs`,trigger:`gap-1.5 px-1.5 py-1`},md:{root:`gap-1.5 p-0.75`,trigger:`gap-2 px-2 py-1.25`},lg:{root:`gap-1.75 p-0.875`,trigger:`gap-2.5 px-2.5 py-1.5`},xl:{root:`gap-2 p-1`,trigger:`gap-3 px-3 py-2`},"2xl":{root:`gap-2.5 p-1.25`,trigger:`gap-3.5 px-3.5 py-2.5`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`group`,viewport:[`fixed z-50 origin-top-center overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg`,`start-[--soybean-navigation-menu-viewport-left] top-[--soybean-navigation-menu-viewport-top]`,`h-[--soybean-navigation-menu-viewport-height] w-[--soybean-navigation-menu-viewport-width]`,`transition-all duration-200 ease-out`,`data-[state=open]:animate-in data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:zoom-out-95`,`group-data-[orientation=vertical]:mt-0`],content:[`start-0 top-0 w-auto md:absolute lt-md:w-full`,`data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in`,`data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out`,`data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52`,`rtl:data-[motion=from-end]:slide-in-from-left-52 rtl:data-[motion=from-start]:slide-in-from-right-52 rtl:data-[motion=to-end]:slide-out-to-left-52 rtl:data-[motion=to-start]:slide-out-to-right-52`],arrow:`w-1em h-0.5em fill-popover stroke-border rotate-180 group-data-[orientation=vertical]:rotate-90`,list:[`group grow flex items-center justify-center my-0 list-none`,`group-data-[orientation=vertical]:flex-col group-data-[orientation=vertical]:items-stretch`],subList:`grid grid-cols-[auto_auto] list-none my-0`,item:`list-none m-0`,subItem:`list-none m-0`,itemIcon:`shrink-0 text-muted-foreground`,trigger:[`group inline-flex items-center rounded-md bg-background font-medium transition-colors-200 decoration-none outline-none`,`hover:bg-accent hover:text-accent-foreground`,`focus:bg-accent focus:text-accent-foreground`,`disabled:pointer-events-none disabled:opacity-50`,`data-[active]:bg-accent/50`,`data-[state=open]:bg-accent/50`],subItemContent:`flex items-start rounded-md outline-none cursor-default select-none`,triggerIcon:`ms-auto transition duration-200 group-data-[state=open]:rotate-180`,indicator:[`fixed start-[--soybean-navigation-menu-indicator-left] top-[--soybean-navigation-menu-indicator-top] z-50`,`flex w-[--soybean-navigation-menu-indicator-size] items-end justify-center overflow-hidden transition-transform-200 ease-out`,`data-[state=visible]:animate-in data-[state=visible]:fade-in-0 data-[state=hidden]:animate-out data-[state=hidden]:fade-out-0`,`data-[orientation=vertical]:-rotate-90 [&[dir=rtl]]:data-[orientation=vertical]:rotate-90`],link:[`group relative w-full flex items-center rounded-md font-medium outline-none cursor-pointer decoration-none`,`focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],subLink:[`flex items-start select-none rounded-md no-underline outline-none transition-colors-200 cursor-pointer decoration-none`,`focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],linkIcon:`shrink-0 self-start text-muted-foreground rtl:rotate-270`,subLinkContent:`grow flex flex-col items-start`,subLinkLabel:`font-medium leading-none`,subLinkDescription:`line-clamp-2 text-muted-foreground leading-snug m-0`},variants:{size:{xs:{viewport:`mt-1.75 group-data-[orientation=vertical]:ms-3.5`,list:`gap-1 text-2xs`,subList:`gap-1.5 p-1.5 text-2xs`,trigger:`gap-1 px-1 py-1`,indicator:`h-1.75`,arrow:`size-2.25`,link:`gap-1 px-1 py-1`,subItemContent:`gap-1 px-1 py-1`,subLink:`gap-1 px-1 py-1`,linkIcon:`size-2 -ms-1`,subLinkDescription:`mt-1.25`},sm:{viewport:`mt-2 group-data-[orientation=vertical]:ms-4`,list:`gap-1.25 text-xs`,subList:`gap-1.75 p-1.75 text-xs`,trigger:`gap-1.5 px-1.5 py-1`,indicator:`h-2`,arrow:`size-2.5`,link:`gap-1.5 px-1.5 py-1`,subItemContent:`gap-1.5 px-1.5 py-1`,subLink:`gap-1.5 px-1.5 py-1`,linkIcon:`size-2.5 -ms-1.5`,subLinkDescription:`mt-1.25`},md:{viewport:`mt-[calc(0.625rem-1px)] group-data-[orientation=vertical]:ms-5`,list:`gap-1.5 text-sm`,subList:`gap-2 p-2 text-sm`,trigger:`gap-2 px-2 py-1.5`,indicator:`h-2.5`,arrow:`size-3`,link:`gap-2 px-2 py-1.5`,subItemContent:`gap-2 px-2 py-1.5`,subLink:`gap-2 px-2 py-1.5`,linkIcon:`size-3 -ms-2`,subLinkDescription:`mt-1.5`},lg:{viewport:`mt-3 group-data-[orientation=vertical]:ms-6`,list:`gap-1.75 text-base`,subList:`gap-2.5 p-2.5 text-base`,trigger:`gap-2.5 px-2.5 py-1.5`,indicator:`h-3`,arrow:`size-3.5`,link:`gap-2.5 px-2.5 py-1.5`,subItemContent:`gap-2.5 px-2.5 py-1.5`,subLink:`gap-2.5 px-2.5 py-1.5`,linkIcon:`size-3.5 -ms-2.5`,subLinkDescription:`mt-1.75`},xl:{viewport:`mt-3.5 group-data-[orientation=vertical]:ms-7`,list:`gap-2 text-lg`,subList:`gap-3 p-3 text-lg`,trigger:`gap-3 px-3 py-2`,indicator:`h-3.5`,arrow:`size-4`,link:`gap-3 px-3 py-2`,subItemContent:`gap-3 px-3 py-2`,subLink:`gap-3 px-3 py-2`,linkIcon:`size-4 -ms-3`,subLinkDescription:`mt-2`},"2xl":{viewport:`mt-4 group-data-[orientation=vertical]:ms-8`,list:`gap-2.5 text-xl`,subList:`gap-3.5 p-3.5 text-xl`,trigger:`gap-3.5 px-3.5 py-2.5`,indicator:`h-4`,arrow:`size-4.5`,link:`gap-3.5 px-3.5 py-2.5`,subItemContent:`gap-3.5 px-3.5 py-2.5`,subLink:`gap-3.5 px-3.5 py-2.5`,linkIcon:`size-4.5 -ms-3.5`,subLinkDescription:`mt-2.5`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`flex`,item:[`group/item relative flex items-center cursor-pointer select-none outline-none`,`data-[active=true]:bg-primary-50 data-[active=true]:text-primary data-[active=true]:z-2`,`data-[active=false]:hover:bg-accent data-[active=false]:focus:bg-accent`,`dark:data-[active=true]:bg-accent dark:data-[active=true]:text-foreground`],itemText:`grow truncate`,close:[`outline-none rounded-full hover:text-muted group-data-[active=true]/item:hover:bg-primary/50`,`group-data-[active=false]/item:hover:bg-accent-foreground/20`,`dark:hover:text-foreground dark:group-data-[active=true]/item:hover:bg-accent-foreground/20`],pin:`outline-none`,chromeBgLeft:[`absolute end-full bottom-0 fill-transparent`,`group-hover/item:fill-accent group-data-[active=true]/item:fill-primary-50 dark:group-data-[active=true]/item:fill-accent group-data-[active=true]/item:z-2`],chromeBgRight:[`absolute start-full bottom-0 fill-transparent`,`group-hover/item:fill-accent group-data-[active=true]/item:fill-primary-50 dark:group-data-[active=true]/item:fill-accent group-data-[active=true]/item:z-2`],sliderIndicator:`absolute bottom-0 start-0 w-full h-0.5 group-data-[active=true]/item:bg-primary`},variants:{size:{xs:{root:`text-2xs`,item:`gap-2 px-1 py-1`,itemText:`max-w-50`},sm:{root:`text-xs`,item:`gap-2.5 px-1.5 py-1`,itemText:`max-w-55`},md:{root:`text-sm`,item:`gap-3 px-2 py-1.5`,itemText:`max-w-60`,chromeBgLeft:`w-2 h-2`,chromeBgRight:`w-2 h-2`},lg:{root:`text-base`,item:`gap-3.5 px-2.5 py-1.5`,itemText:`max-w-65`},xl:{root:`text-lg`,item:`gap-4 px-3 py-2`,itemText:`max-w-70`},"2xl":{root:`text-xl`,item:`gap-4.5 px-3.5 py-2.5`,itemText:`max-w-75`}},variant:{chrome:{root:`items-end`,item:`rounded-t-md`},card:{root:`items-center gap-2`,item:`rounded-md shadow-sm border border-border`},slider:{root:`items-end`,item:`rounded-t-md`}}},defaultVariants:{size:`md`,variant:`chrome`}});var nE=Rl({base:[`inline-flex items-center justify-center flex-shrink-0 font-medium transition-all-150 rtl:[&>svg]:rotate-180`,`hover:bg-accent hover:text-accent-foreground`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`disabled:cursor-not-allowed disabled:opacity-50`],variants:{size:{xs:`h-6 px-1 gap-0.75`,sm:`h-7 px-1.5 gap-1`,md:`h-8 px-1.875 gap-1.5`,lg:`h-9 px-2 gap-2`,xl:`h-10 px-2.25 gap-2.5`,"2xl":`h-12 px-2.875 gap-3`},variant:{pure:`data-[soybean-pagination-action]:border data-[soybean-pagination-action]:border-border data-[soybean-pagination-action]:bg-background data-[soybean-pagination-action]:text-accent-foreground data-[soybean-pagination-action]:hover:bg-accent/60 data-[soybean-pagination-action]:active:bg-accent`,solid:`data-[soybean-pagination-action]:border-transparent data-[soybean-pagination-action]:bg-primary data-[soybean-pagination-action]:text-primary-foreground data-[soybean-pagination-action]:hover:bg-primary/80 data-[soybean-pagination-action]:hover:text-primary-foreground data-[soybean-pagination-action]:active:bg-primary-600`,outline:`data-[soybean-pagination-action]:border data-[soybean-pagination-action]:border-primary data-[soybean-pagination-action]:bg-background data-[soybean-pagination-action]:text-primary data-[soybean-pagination-action]:hover:bg-transparent`,soft:`data-[soybean-pagination-action]:bg-primary/10 data-[soybean-pagination-action]:hover:bg-primary/10 data-[soybean-pagination-action]:active:bg-primary/20`},shape:{rounded:`rounded-full`,square:`rounded-md`}},defaultVariants:{size:`md`}});Jl({extendBase:e=>{let{size:t,shape:n,actionAsSelected:r}=e,i=r?e.variant:void 0;return{first:nE({size:t,variant:i,shape:n}),prev:nE({size:t,variant:i,shape:n}),next:nE({size:t,variant:i,shape:n}),last:nE({size:t,variant:i,shape:n})}},slots:{root:``,list:`flex items-center`,ellipsis:`flex justify-center items-center`,listItem:[`inline-flex items-center justify-center flex-shrink-0 font-medium transition-all-150`,`hover:bg-accent hover:text-accent-foreground`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`disabled:cursor-not-allowed disabled:opacity-50`],first:``,prev:``,next:``,last:``},variants:{size:{xs:{list:`gap-0.75 text-2xs`,ellipsis:`size-6`,listItem:`size-6`},sm:{list:`gap-1 text-xs`,ellipsis:`size-7`,listItem:`size-7`},md:{list:`gap-1.25 text-sm`,ellipsis:`size-8`,listItem:`size-8`},lg:{list:`gap-1.5 text-base`,ellipsis:`size-9`,listItem:`size-9`},xl:{list:`gap-1.75 text-lg`,ellipsis:`size-10`,listItem:`size-10`},"2xl":{list:`gap-2 text-xl`,ellipsis:`size-12`,listItem:`size-12`}},variant:{pure:{listItem:`data-[selected]:border data-[selected]:border-border data-[selected]:bg-background data-[selected]:text-accent-foreground data-[selected]:hover:bg-accent/60 data-[selected]:active:bg-accent`},solid:{listItem:`data-[selected]:border-transparent data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary/80 data-[selected]:hover:text-primary-foreground data-[selected]:active:bg-primary-600`},outline:{listItem:`data-[selected]:border data-[selected]:border-primary data-[selected]:bg-background data-[selected]:text-primary data-[selected]:hover:bg-transparent`},soft:{listItem:`data-[selected]:bg-primary/10 data-[selected]:hover:bg-primary/10 data-[selected]:active:bg-primary/20`}},shape:{rounded:{listItem:`rounded-full`},square:{listItem:`rounded-md`}},actionAsSelected:{true:{},false:{}}},defaultVariants:{size:`md`,variant:`pure`,shape:`square`,actionAsSelected:!1}}),Jl({extend:[tE],extendBase:e=>({visible:Ov({size:e.size})})}),Jl({extendBase:e=>({close:Ov({size:e.size}),cancel:Dv({size:e.size,variant:`pure`}),confirm:Dv({size:e.size})}),slots:{positioner:`w-max`,popup:[`flex flex-col w-auto rounded-md border bg-popover text-popover-foreground shadow-md outline-none z-50 will-change-transform`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],arrow:`w-1em h-0.5em fill-popover stroke-border`,header:`flex flex-col lt-sm:text-center`,icon:`shrink-0`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,description:`text-muted-foreground m-0`,content:``,footer:`flex justify-end lt-sm:flex-col-reverse`,cancel:``,confirm:``,close:`absolute`},variants:{size:{xs:{popup:`gap-y-2 p-2 text-2xs`,arrow:`text-3xs`,close:`top-1 end-1`,header:`gap-y-1.5`,icon:`text-3xs`,title:`gap-x-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2.5 p-2.5 text-xs`,arrow:`text-2xs`,close:`top-1.25 end-1.25`,header:`gap-y-1.75`,icon:`text-2xs`,title:`gap-x-1.75`,footer:`gap-1.75`},md:{popup:`gap-y-3 p-3 text-sm`,arrow:`text-xs`,close:`top-1.5 end-1.5`,header:`gap-y-2`,icon:`text-sm`,title:`gap-x-2`,footer:`gap-2`},lg:{popup:`gap-y-3.5 p-3.5 text-base`,arrow:`text-sm`,close:`top-1.75 end-1.75`,header:`gap-y-2.5`,icon:`text-base`,title:`gap-x-2.5`,footer:`gap-2.5`},xl:{popup:`gap-y-4 p-4 text-lg`,arrow:`text-base`,close:`top-2 end-2`,header:`gap-y-3`,icon:`text-lg`,title:`gap-x-3`,footer:`gap-3`},"2xl":{popup:`gap-y-4.5 p-4.5 text-xl`,arrow:`text-lg`,close:`top-2.5 end-2.5`,header:`gap-y-3.5`,icon:`text-xl`,title:`gap-x-3.5`,footer:`gap-3.5`}},type:{error:{icon:`text-destructive`},success:{icon:`text-success`},warning:{icon:`text-warning`},info:{icon:`text-info`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`flex`,item:`flex items-center`,control:[`peer relative shrink-0 rounded-full border border-solid shadow transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`],indicator:`absolute top-1/2 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 size-1/2 rounded-full`,label:``},variants:{color:{primary:{control:`border-primary focus-visible:ring-primary/30`,indicator:`bg-primary`},destructive:{control:`border-destructive focus-visible:ring-destructive/30`,indicator:`bg-destructive`},success:{control:`border-success focus-visible:ring-success/30`,indicator:`bg-success`},warning:{control:`border-warning focus-visible:ring-warning/30`,indicator:`bg-warning`},info:{control:`border-info focus-visible:ring-info/30`,indicator:`bg-info`},carbon:{control:`border-carbon focus-visible:ring-carbon/30`,indicator:`bg-carbon`},secondary:{control:`border-secondary-foreground focus-visible:ring-secondary-foreground/20`,indicator:`bg-secondary-foreground/60`},accent:{control:`border-accent-foreground focus-visible:ring-accent-foreground/20`,indicator:`bg-accent-foreground/60`}},size:{xs:{root:`gap-x-2 gap-y-1.5`,item:`gap-1.5`,control:`size-3`},sm:{root:`gap-x-2.5 gap-y-1.75`,item:`gap-1.75`,control:`size-3.5`},md:{root:`gap-x-3 gap-y-2`,item:`gap-2`,control:`size-4`},lg:{root:`gap-x-3.5 gap-y-2.5`,item:`gap-2.5`,control:`size-4.5`},xl:{root:`gap-x-4 gap-y-3`,item:`gap-3`,control:`size-5`},"2xl":{root:`gap-x-4.5 gap-y-3.5`,item:`gap-3.5`,control:`size-6`}},orientation:{horizontal:{root:`items-center`},vertical:{root:`flex-col`}},variant:{dot:{indicator:``},outline:{control:``}}},compoundVariants:[{color:`primary`,variant:`outline`,class:{control:`data-[state=checked]:bg-primary`,indicator:`bg-background`}},{color:`destructive`,variant:`outline`,class:{control:`data-[state=checked]:bg-destructive`,indicator:`bg-background`}},{color:`success`,variant:`outline`,class:{control:`data-[state=checked]:bg-success`,indicator:`bg-background`}},{color:`warning`,variant:`outline`,class:{control:`data-[state=checked]:bg-warning`,indicator:`bg-background`}},{color:`info`,variant:`outline`,class:{control:`data-[state=checked]:bg-info`,indicator:`bg-background`}},{color:`carbon`,variant:`outline`,class:{control:`data-[state=checked]:bg-carbon`,indicator:`bg-background`}},{color:`secondary`,variant:`outline`,class:{control:`data-[state=checked]:bg-secondary-foreground`,indicator:`bg-background`}},{color:`accent`,variant:`outline`,class:{control:`data-[state=checked]:bg-accent-foreground`,indicator:`bg-background`}}],defaultVariants:{variant:`dot`,color:`primary`,size:`md`,orientation:`horizontal`}}),Jl({slots:{root:`flex`,item:`relative inline-flex border border-solid border-border rounded-md`,content:`flex items-center grow`,textContent:`flex flex-col`,icon:`shrink-0`,label:`font-medium`,description:`text-muted-foreground`,control:[`peer shrink-0 inline-flex items-start justify-start rounded-full border border-solid shadow`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,`order-1 after:absolute after:inset-0 after:content-empty`],indicator:`relative top-1/2 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 inline-flex size-1/2 rounded-full`},variants:{color:{primary:{item:`data-[state=checked]:border-primary`,control:`border-primary focus-visible:ring-primary/30`,indicator:`bg-primary`},destructive:{item:`data-[state=checked]:border-destructive`,control:`border-destructive focus-visible:ring-destructive/30`,indicator:`bg-destructive`},success:{item:`data-[state=checked]:border-success`,control:`border-success focus-visible:ring-success/30`,indicator:`bg-success`},warning:{item:`data-[state=checked]:border-warning`,control:`border-warning focus-visible:ring-warning/30`,indicator:`bg-warning`},info:{item:`data-[state=checked]:border-info`,control:`border-info focus-visible:ring-info/30`,indicator:`bg-info`},carbon:{item:`data-[state=checked]:border-carbon`,control:`border-carbon focus-visible:ring-carbon/30`,indicator:`bg-carbon`},secondary:{item:`data-[state=checked]:border-secondary-foreground`,control:`border-secondary-foreground focus-visible:ring-secondary-foreground/20`,indicator:`bg-secondary-foreground/60`},accent:{item:`data-[state=checked]:border-accent-foreground`,control:`border-accent-foreground focus-visible:ring-accent-foreground/20`,indicator:`bg-accent-foreground/60`}},size:{xs:{root:`gap-x-2 gap-y-1.5`,item:`gap-2 text-2xs p-2`,content:`gap-2`,textContent:`gap-0.5`,icon:`text-3`,description:`text-3xs`,control:`size-3`},sm:{root:`gap-x-2.5 gap-y-1.75`,item:`gap-2.5 text-xs p-2.5`,content:`gap-2.5`,textContent:`gap-0.75`,icon:`text-4`,description:`text-2xs`,control:`size-3.5`},md:{root:`gap-x-3 gap-y-2`,item:`gap-3 text-sm p-3`,content:`gap-3`,textContent:`gap-1`,icon:`text-5`,description:`text-xs`,control:`size-4`},lg:{root:`gap-x-3.5 gap-y-2.5`,item:`gap-4 text-base p-4`,content:`gap-4`,textContent:`gap-1.5`,icon:`text-6`,description:`text-sm`,control:`size-4.5`},xl:{root:`gap-x-4 gap-y-3`,item:`gap-5 text-lg p-5`,content:`gap-5`,textContent:`gap-2`,icon:`text-7`,description:`text-base`,control:`size-5`},"2xl":{root:`gap-x-4.5 gap-y-3.5`,item:`gap-6 text-xl p-6`,content:`gap-6`,textContent:`gap-2.5`,icon:`text-8`,description:`text-lg`,control:`size-6`}},variant:{dot:{indicator:``},outline:{control:``}}},compoundVariants:[{color:`primary`,variant:`outline`,class:{control:`data-[state=checked]:bg-primary`,indicator:`bg-background`}},{color:`destructive`,variant:`outline`,class:{control:`data-[state=checked]:bg-destructive`,indicator:`bg-background`}},{color:`success`,variant:`outline`,class:{control:`data-[state=checked]:bg-success`,indicator:`bg-background`}},{color:`warning`,variant:`outline`,class:{control:`data-[state=checked]:bg-warning`,indicator:`bg-background`}},{color:`info`,variant:`outline`,class:{control:`data-[state=checked]:bg-info`,indicator:`bg-background`}},{color:`carbon`,variant:`outline`,class:{control:`data-[state=checked]:bg-carbon`,indicator:`bg-background`}},{color:`secondary`,variant:`outline`,class:{control:`data-[state=checked]:bg-secondary-foreground`,indicator:`bg-background`}},{color:`accent`,variant:`outline`,class:{control:`data-[state=checked]:bg-accent-foreground`,indicator:`bg-background`}}],defaultVariants:{variant:`dot`,color:`primary`,size:`md`}}),Jl({slots:{root:`relative overflow-hidden`,viewport:`size-full rounded-[inherit] outline-none focus-visible:outline-1 focus-visible:ring-3 focus-visible:ring-ring/50`,scrollbar:[`absolute flex touch-none select-none p-px transition-opacity duration-200 ease-out`,`data-[state=hidden]:pointer-events-none data-[state=hidden]:opacity-0`,`data-[orientation=vertical]:inset-y-0 data-[orientation=vertical]:end-0 data-[orientation=vertical]:border-s data-[orientation=vertical]:border-s-transparent`,`rtl:data-[orientation=vertical]:end-auto rtl:data-[orientation=vertical]:start-0`,`data-[orientation=horizontal]:inset-x-0 data-[orientation=horizontal]:bottom-0 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent`],thumb:`relative flex-1 rounded-full bg-border`,corner:`absolute bottom-0 end-0 bg-border/50 rtl:end-auto rtl:start-0`},variants:{size:{xs:{scrollbar:`data-[orientation=vertical]:w-1.75 data-[orientation=horizontal]:h-1.75`},sm:{scrollbar:`data-[orientation=vertical]:w-2 data-[orientation=horizontal]:h-2`},md:{scrollbar:`data-[orientation=vertical]:w-2.5 data-[orientation=horizontal]:h-2.5`},lg:{scrollbar:`data-[orientation=vertical]:w-3 data-[orientation=horizontal]:h-3`},xl:{scrollbar:`data-[orientation=vertical]:w-3.5 data-[orientation=horizontal]:h-3.5`},"2xl":{scrollbar:`data-[orientation=vertical]:w-4 data-[orientation=horizontal]:h-4`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`relative shrink-0 border-border`,label:`absolute top-1/2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 flex justify-center items-center text-muted-foreground bg-background`},variants:{size:{xs:{label:`text-2xs`},sm:{label:`text-xs`},md:{label:`text-sm`},lg:{label:`text-base`},xl:{label:`text-lg`},"2xl":{label:`text-2xl`}},orientation:{vertical:{root:`h-full border-s`,label:`w-1px`},horizontal:{root:`w-full border-t`,label:`h-1px`}},align:{start:{label:`start-1/16 lt-sm:start-1/8 lt-md:start-1/10 lt-lg:start-1/12`},center:{label:`start-1/2`},end:{label:`start-15/16 lt-sm:start-7/8 lt-md:start-9/10 lt-lg:start-11/12`}},border:{solid:{root:`border-solid`},dashed:{root:`border-dashed`},dotted:{root:`border-dotted`}}},compoundVariants:[{size:`xs`,orientation:`vertical`,class:{label:`px-0.75 py-1.5`}},{size:`xs`,orientation:`horizontal`,class:{label:`px-1.5 py-0.75`}},{size:`sm`,orientation:`vertical`,class:{label:`px-0.875 py-1.75`}},{size:`sm`,orientation:`horizontal`,class:{label:`px-1.75 py-0.875`}},{size:`md`,orientation:`vertical`,class:{label:`px-1 py-2`}},{size:`md`,orientation:`horizontal`,class:{label:`px-2 py-1`}},{size:`lg`,orientation:`vertical`,class:{label:`px-1.125 py-2.25`}},{size:`lg`,orientation:`horizontal`,class:{label:`px-2.25 py-1.125`}},{size:`xl`,orientation:`vertical`,class:{label:`px-1.25 py-2.5`}},{size:`xl`,orientation:`horizontal`,class:{label:`px-2.5 py-1.25`}},{size:`2xl`,orientation:`vertical`,class:{label:`px-1.5 py-3`}},{size:`2xl`,orientation:`horizontal`,class:{label:`px-3 py-1.5`}}],defaultVariants:{size:`md`,orientation:`horizontal`,align:`center`,border:`solid`}}),Rl({base:`block shrink-0 bg-muted`,variants:{size:{xs:`h-3 w-16`,sm:`h-4 w-24`,md:`h-5 w-32`,lg:`h-6 w-40`,xl:`h-8 w-48`,"2xl":`h-10 w-56`},shape:{auto:`rounded-md`,rounded:`rounded-full`},animated:{true:`animate-pulse`,false:``}},defaultVariants:{size:`md`,shape:`auto`,animated:!0}}),Rl({variants:{color:{current:`text-current`,primary:`text-primary`,destructive:`text-destructive`,success:`text-success`,warning:`text-warning`,info:`text-info`,carbon:`text-carbon`,secondary:`text-secondary-foreground/20`,accent:`text-accent-foreground/20`},size:{xs:`size-3`,sm:`size-4`,md:`size-5`,lg:`size-6`,xl:`size-8`,"2xl":`size-10`}},defaultVariants:{color:`current`,size:`md`}}),Jl({slots:{root:`flex h-full w-full data-[orientation=vertical]:flex-col`,panel:`min-h-0 min-w-0`,resizeHandle:[`bg-border focus-visible:ring-ring relative flex w-px cursor-col-resize items-center justify-center transition-colors duration-200 after:absolute after:inset-y-0`,`after:start-1/2 after:-translate-x-1/2 outline-none focus-visible:ring-1 focus-visible:ring-offset-1`,`data-[state=hover]:bg-accent data-[state=drag]:bg-accent`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60`,`data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full`,`data-[orientation=vertical]:cursor-row-resize`,`data-[orientation=vertical]:after:start-0 data-[orientation=vertical]:after:w-full`,`data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0`]},variants:{size:{xs:{resizeHandle:`after:w-0.5 data-[orientation=vertical]:after:h-0.5`},sm:{resizeHandle:`after:w-0.75 data-[orientation=vertical]:after:h-0.75`},md:{resizeHandle:`after:w-1 data-[orientation=vertical]:after:h-1`},lg:{resizeHandle:`after:w-1.25 data-[orientation=vertical]:after:h-1.25`},xl:{resizeHandle:`after:w-1.5 data-[orientation=vertical]:after:h-1.5`},"2xl":{resizeHandle:`after:w-2 data-[orientation=vertical]:after:h-2`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`flex w-full`,item:`group flex min-w-0 flex-1`,trigger:[`inline-flex rounded-md transition-colors`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`data-[orientation=horizontal]:mt-0.25 data-[orientation=vertical]:ms-0.25 group-data-[disabled]:pointer-events-none`],indicator:[`inline-flex shrink-0 items-center justify-center rounded-full border bg-background font-medium transition-colors`,`group-data-[disabled]:opacity-50`],separator:`shrink-0 bg-muted transition-colors group-data-[disabled]:opacity-50`,title:`font-semibold whitespace-nowrap transition-colors`,description:`text-muted-foreground transition-colors`,itemContent:`flex min-w-0 flex-col`,indicatorIcon:``},variants:{size:{xs:{root:`text-2xs`,trigger:`gap-1 data-[orientation=vertical]:gap-2`,indicator:`size-6 text-2xs`,itemContent:`gap-1`,title:`text-2xs`,description:`text-4xs`,separator:`data-[orientation=horizontal]:mt-3 data-[orientation=vertical]:ms-3`},sm:{root:`text-xs`,trigger:`gap-1.5 data-[orientation=vertical]:gap-3`,indicator:`size-7 text-xs`,itemContent:`gap-1.5`,title:`text-xs`,description:`text-3xs`,separator:`data-[orientation=horizontal]:mt-3.5 data-[orientation=vertical]:ms-3.5`},md:{root:`text-sm`,trigger:`gap-2 data-[orientation=vertical]:gap-4`,indicator:`size-8`,itemContent:`gap-2`,title:`text-sm`,description:`text-xs`,separator:`data-[orientation=horizontal]:mt-4 data-[orientation=vertical]:ms-4`},lg:{root:`text-base`,trigger:`gap-2.5 data-[orientation=vertical]:gap-5`,indicator:`size-9 text-base`,itemContent:`gap-2.5`,title:`text-base`,description:`text-sm`,separator:`data-[orientation=horizontal]:mt-4.5 data-[orientation=vertical]:ms-4.5`},xl:{root:`text-lg`,trigger:`gap-3 data-[orientation=vertical]:gap-6`,indicator:`size-10 text-lg`,itemContent:`gap-3`,title:`text-lg`,description:`text-base`,separator:`data-[orientation=horizontal]:mt-5 data-[orientation=vertical]:ms-5`},"2xl":{root:`text-xl`,trigger:`gap-3.5 data-[orientation=vertical]:gap-7`,indicator:`size-12 text-xl`,itemContent:`gap-3.5`,title:`text-xl`,description:`text-lg`,separator:`data-[orientation=horizontal]:mt-6 data-[orientation=vertical]:ms-6`}},orientation:{horizontal:{root:`items-start`,trigger:`flex-col items-center text-center`,itemContent:`items-center text-center`,separator:`h-0.5 flex-1`},vertical:{root:`flex-col`,item:`flex-none flex-col items-start`,trigger:`w-full flex-row items-start text-start`,itemContent:`flex-1 items-start text-start`,separator:`w-0.5 min-h-7`}},color:{primary:{indicator:[`group-data-[state=active]:border-primary group-data-[state=active]:bg-primary group-data-[state=active]:text-primary-foreground`,`group-data-[state=completed]:border-primary/25 group-data-[state=completed]:bg-primary/15 group-data-[state=completed]:text-primary`],separator:`group-data-[state=completed]:bg-primary`,title:`group-data-[state=active]:text-primary group-data-[state=completed]:text-primary`,description:`group-data-[state=active]:text-primary/80 group-data-[state=completed]:text-primary/80`},destructive:{indicator:[`group-data-[state=active]:border-destructive group-data-[state=active]:bg-destructive group-data-[state=active]:text-destructive-foreground`,`group-data-[state=completed]:border-destructive/25 group-data-[state=completed]:bg-destructive/15 group-data-[state=completed]:text-destructive`],separator:`group-data-[state=completed]:bg-destructive`,title:`group-data-[state=active]:text-destructive group-data-[state=completed]:text-destructive`,description:`group-data-[state=active]:text-destructive/80 group-data-[state=completed]:text-destructive/80`},success:{indicator:[`group-data-[state=active]:border-success group-data-[state=active]:bg-success group-data-[state=active]:text-success-foreground`,`group-data-[state=completed]:border-success/25 group-data-[state=completed]:bg-success/15 group-data-[state=completed]:text-success`],separator:`group-data-[state=completed]:bg-success`,title:`group-data-[state=active]:text-success group-data-[state=completed]:text-success`,description:`group-data-[state=active]:text-success/80 group-data-[state=completed]:text-success/80`},warning:{indicator:[`group-data-[state=active]:border-warning group-data-[state=active]:bg-warning group-data-[state=active]:text-warning-foreground`,`group-data-[state=completed]:border-warning/25 group-data-[state=completed]:bg-warning/15 group-data-[state=completed]:text-warning`],separator:`group-data-[state=completed]:bg-warning`,title:`group-data-[state=active]:text-warning group-data-[state=completed]:text-warning`,description:`group-data-[state=active]:text-warning/80 group-data-[state=completed]:text-warning/80`},info:{indicator:[`group-data-[state=active]:border-info group-data-[state=active]:bg-info group-data-[state=active]:text-info-foreground`,`group-data-[state=completed]:border-info/25 group-data-[state=completed]:bg-info/15 group-data-[state=completed]:text-info`],separator:`group-data-[state=completed]:bg-info`,title:`group-data-[state=active]:text-info group-data-[state=completed]:text-info`,description:`group-data-[state=active]:text-info/80 group-data-[state=completed]:text-info/80`},carbon:{indicator:[`group-data-[state=active]:border-carbon group-data-[state=active]:bg-carbon group-data-[state=active]:text-carbon-foreground`,`group-data-[state=completed]:border-carbon/25 group-data-[state=completed]:bg-carbon/15 group-data-[state=completed]:text-carbon`],separator:`group-data-[state=completed]:bg-carbon`,title:`group-data-[state=active]:text-carbon group-data-[state=completed]:text-carbon`,description:`group-data-[state=active]:text-carbon/80 group-data-[state=completed]:text-carbon/80`},secondary:{indicator:[`group-data-[state=active]:border-secondary group-data-[state=active]:bg-secondary group-data-[state=active]:text-secondary-foreground`,`group-data-[state=completed]:border-secondary/25 group-data-[state=completed]:bg-secondary/15 group-data-[state=completed]:text-secondary`],separator:`group-data-[state=completed]:bg-secondary`,title:`group-data-[state=active]:text-secondary group-data-[state=completed]:text-secondary`,description:`group-data-[state=active]:text-secondary/80 group-data-[state=completed]:text-secondary/80`},accent:{indicator:[`group-data-[state=active]:border-accent group-data-[state=active]:bg-accent group-data-[state=active]:text-accent-foreground`,`group-data-[state=completed]:border-accent/25 group-data-[state=completed]:bg-accent/15 group-data-[state=completed]:text-accent`],separator:`group-data-[state=completed]:bg-accent`,title:`group-data-[state=active]:text-accent group-data-[state=completed]:text-accent`,description:`group-data-[state=active]:text-accent/80 group-data-[state=completed]:text-accent/80`}}},defaultVariants:{size:`md`,orientation:`horizontal`,color:`primary`}}),Jl({slots:{root:`inline-flex`,control:[`peer shrink-0 inline-flex items-center rounded-full border-0 shadow-sm transition-colors-200`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-input`],thumb:[`flex justify-center items-center rounded-full shadow-lg transition-transform-200 bg-background pointer-events-none`,`data-[state=unchecked]:translate-x-0.5 rtl:data-[state=unchecked]:-translate-x-0.5`]},variants:{color:{primary:{control:`data-[state=checked]:bg-primary focus-visible:ring-primary/30`},destructive:{control:`data-[state=checked]:bg-destructive focus-visible:ring-destructive/30`},success:{control:`data-[state=checked]:bg-success focus-visible:ring-success/30`},warning:{control:`data-[state=checked]:bg-warning focus-visible:ring-warning/30`},info:{control:`data-[state=checked]:bg-info focus-visible:ring-info/30`},carbon:{control:`data-[state=checked]:bg-carbon focus-visible:ring-carbon/30`},secondary:{control:`data-[state=checked]:bg-secondary-foreground/20 focus-visible:ring-secondary-foreground/20`},accent:{control:`data-[state=checked]:bg-accent-foreground/20 focus-visible:ring-accent-foreground/20`}},size:{xs:{control:`h-4 w-7`,thumb:`size-3 data-[state=checked]:translate-x-3.5 rtl:data-[state=checked]:-translate-x-3.5`},sm:{control:`h-4.5 w-8`,thumb:`size-3.5 data-[state=checked]:translate-x-4 rtl:data-[state=checked]:-translate-x-4`},md:{control:`h-5 w-9`,thumb:`size-4 data-[state=checked]:translate-x-4.5 rtl:data-[state=checked]:-translate-x-4.5`},lg:{control:`h-5.5 w-10`,thumb:`size-4.5 data-[state=checked]:translate-x-5 rtl:data-[state=checked]:-translate-x-5`},xl:{control:`h-6 w-11`,thumb:`size-5 data-[state=checked]:translate-x-5.5 rtl:data-[state=checked]:-translate-x-5.5`},"2xl":{control:`h-7 w-13`,thumb:`size-6 data-[state=checked]:translate-x-6.5 rtl:data-[state=checked]:-translate-x-6.5`}},shape:{rounded:{control:`rounded-full`,thumb:`rounded-full`},square:{control:`rounded-md`,thumb:`rounded-sm`}}},defaultVariants:{color:`primary`,size:`md`,shape:`rounded`}}),Jl({slots:{root:`relative overflow-hidden supports-[overflow:clip]:overflow-clip [--rounded:calc(var(--radius)-2px)] rounded-[--rounded]`,scroll:`h-full overflow-auto`,content:`min-w-full w-max border-spacing-0`,header:`sticky top-0 start-0 z-10 [&>tr:last-child]:border-b-0`,body:[`[&>tr:last-child]:border-b-0`,`[&>tr:first-child>td:first-child]:rounded-tl-[--rounded] [&>tr:first-child>td:last-child]:rounded-tr-[--rounded]`,`[&>tr:last-child>td:first-child]:rounded-bl-[--rounded] [&>tr:last-child>td:last-child]:rounded-br-[--rounded]`],footer:`font-medium [&>tr:last-child]:border-b-0 [&>tr]:bg-transparent [&>tr]:hover:bg-transparent [&_td]:bg-transparent`,row:`bg-background border-b hover:bg-primary-foreground transition-colors`,head:`box-border bg-accent text-foreground relative font-medium`,cell:`box-border data-[fixed]:bg-background`,fixed:[`relative`,`data-[fixed-last-start]:after:pointer-events-none data-[fixed-last-start]:after:absolute data-[fixed-last-start]:after:bottom-0 data-[fixed-last-start]:after:end-0 data-[fixed-last-start]:after:top-0 data-[fixed-last-start]:after:w-4 data-[fixed-last-start]:after:bg-gradient-to-l data-[fixed-last-start]:after:from-foreground/8 data-[fixed-last-start]:after:to-transparent data-[fixed-last-start]:after:content-empty`,`data-[fixed-first-end]:before:pointer-events-none data-[fixed-first-end]:before:absolute data-[fixed-first-end]:before:bottom-0 data-[fixed-first-end]:before:start-0 data-[fixed-first-end]:before:top-0 data-[fixed-first-end]:before:w-4 data-[fixed-first-end]:before:bg-gradient-to-r data-[fixed-first-end]:before:from-foreground/8 data-[fixed-first-end]:before:to-transparent data-[fixed-first-end]:before:content-empty`],resizeHandle:[`absolute end-0 top-1/2 w-3 h-2/3 -translate-y-1/2 rounded bg-transparent`,`cursor-col-resize border-none touch-none select-none`,`after:bg-border hover:after:bg-primary data-[resizing]:after:bg-primary focus-visible:after:bg-primary`,`outline-none focus-visible:ring-ring/40 focus-visible:ring-2`,`after:absolute after:bottom-0 after:end-0 after:top-0 after:w-px after:rounded-full after:content-empty`],treeCell:`flex min-w-0 items-center gap-1`,treeToggle:``,treeTogglePlaceholder:`inline-block size-5 shrink-0`,sortTrigger:`absolute top-1/2 -translate-y-1/2 data-[sorted]:text-primary`,filterTrigger:`absolute top-1/2 -translate-y-1/2 data-[filtered]:text-primary`,filterInput:``,filterPopup:``,filterSearch:``,filterOptions:`flex flex-col overflow-auto`,filterOption:`w-full rounded-md hover:bg-accent`,filterOptionLabel:`min-w-0 flex-1 truncate`,filterFooter:`flex items-center justify-between border-t border-border`,filterCount:`text-muted-foreground`,filterAction:[`text-xs font-medium text-primary rounded-md border-none bg-transparent px-2 py-1`,`transition-colors hover:bg-accent focus-visible:ring-ring outline-none focus-visible:ring-2`],filterEmpty:`text-muted-foreground py-6 text-center text-xs`,selection:`text-foreground`,radioRoot:[`peer relative shrink-0 rounded-full border border-solid shadow cursor-pointer transition-all-150`,`border-primary focus-visible:ring-primary/30`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`],radioIndicator:`absolute top-1/2 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 size-1/2 bg-primary rounded-full`},variants:{size:{xs:{root:`text-2xs`,caption:`py-2`,head:`p-1.5`,cell:`p-1.5`,radioRoot:`w-3 h-3`,sortTrigger:`end-1 p-0.75`,filterTrigger:`end-1`,filterPopup:`p-1.5`,filterOptions:`max-h-50 gap-0.75 py-1.5`,filterOption:`p-0.75`,filterFooter:`pt-1`,filterCount:`text-3xs leading-4`},sm:{root:`text-xs`,caption:`py-2.5`,head:`p-1.75`,cell:`p-1.75`,radioRoot:`w-3.5 h-3.5`,sortTrigger:`end-1.25 p-0.875`,filterTrigger:`end-1.25`,filterPopup:`p-1.75`,filterOptions:`max-h-55 gap-0.875 py-2`,filterOption:`p-0.875`,filterFooter:`pt-1.25`,filterCount:`text-2xs leading-5`},md:{root:`text-sm`,caption:`py-3`,head:`p-2`,cell:`p-2`,radioRoot:`w-4 h-4`,sortTrigger:`end-1.5 p-1`,filterTrigger:`end-1.5`,filterPopup:`p-2`,filterOptions:`max-h-60 gap-1 py-2.5`,filterOption:`p-1`,filterFooter:`pt-1.5`,filterCount:`text-xs leading-6`},lg:{root:`text-base`,caption:`py-3.5`,head:`p-2.5`,cell:`p-2.5`,radioRoot:`w-4.5 h-4.5`,sortTrigger:`end-1.75 p-1.25`,filterTrigger:`end-1.75`,filterPopup:`p-2.5`,filterOptions:`max-h-65 gap-1.25 py-3`,filterOption:`p-1.25`,filterFooter:`pt-1.75`,filterCount:`text-sm leading-7`},xl:{root:`text-lg`,caption:`py-4`,head:`p-3`,cell:`p-3`,radioRoot:`w-5 h-5`,sortTrigger:`end-2 p-1.5`,filterTrigger:`end-2`,filterPopup:`p-3`,filterOptions:`max-h-70 gap-1.5 py-3.5`,filterOption:`p-1.5`,filterFooter:`pt-2`,filterCount:`text-base leading-8`},"2xl":{root:`text-xl`,caption:`py-4.5`,head:`p-3.5`,cell:`p-3.5`,radioRoot:`w-6 h-6`,sortTrigger:`end-2.5 p-1.75`,filterTrigger:`end-2.5`,filterPopup:`p-3.5`,filterOptions:`max-h-75 gap-1.75 py-4`,filterOption:`p-1.75`,filterFooter:`pt-2.5`,filterCount:`text-lg leading-9`}},variant:{default:{root:`bg-accent`},simple:{header:[`[&>tr:first-child>th:first-child]:rounded-tl-[--rounded] [&>tr:first-child>th:last-child]:rounded-tr-[--rounded]`,`[&>tr:last-child>th:first-child]:rounded-bl-[--rounded] [&>tr:last-child>th:last-child]:rounded-br-[--rounded]`]}},bordered:{true:{cell:`border-s border-border first:border-s-0`}},rounded:{true:{root:``}},striped:{true:{row:`data-[row]:even:bg-accent`}}},compoundVariants:[{size:`xs`,rounded:!0,class:{root:`[--rounded:0.75rem]`}},{size:`sm`,rounded:!0,class:{root:`[--rounded:1rem]`}},{size:`md`,rounded:!0,class:{root:`[--rounded:1.125rem]`}},{size:`lg`,rounded:!0,class:{root:`[--rounded:1.375rem]`}},{size:`xl`,rounded:!0,class:{root:`[--rounded:1.625rem]`}},{size:`2xl`,rounded:!0,class:{root:`[--rounded:1.75rem]`}},{size:`xs`,variant:`default`,class:{root:`px-0.75 pb-0.75`}},{size:`sm`,variant:`default`,class:{root:`px-0.875 pb-0.875`}},{size:`md`,variant:`default`,class:{root:`px-1 pb-1`}},{size:`lg`,variant:`default`,class:{root:`px-1.25 pb-1.25`}},{size:`xl`,variant:`default`,class:{root:`px-1.5 pb-1.5`}},{size:`2xl`,variant:`default`,class:{root:`px-2 pb-2`}}],defaultVariants:{size:`md`,variant:`default`,bordered:!1,rounded:!0,striped:!1}}),Rl({base:`inline-flex items-center border font-semibold`,variants:{color:{primary:`border-primary text-primary`,destructive:`border-destructive text-destructive`,success:`border-success text-success`,warning:`border-warning text-warning`,info:`border-info text-info`,carbon:`border-carbon text-carbon`,secondary:`border-secondary-foreground/50 text-secondary-foreground`,accent:`border-accent-foreground/50 text-accent-foreground`},variant:{solid:``,pure:`bg-background text-foreground border-border`,outline:`bg-background`,soft:`border-0`,ghost:``,raw:`bg-transparent border-0`},size:{xs:`gap-0.5 h-4 px-1 text-4xs`,sm:`gap-0.75 h-4.5 px-1.5 text-3xs`,md:`gap-1 h-5 px-2 text-2xs`,lg:`gap-1.25 h-5.5 px-2.5 text-xs`,xl:`gap-1.5 h-6 px-3 text-sm`,"2xl":`gap-2 h-7 px-4 text-base`},shape:{auto:`rounded-md`,rounded:`rounded-full`}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-primary-foreground`},{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground`},{color:`secondary`,variant:`solid`,class:`bg-secondary text-secondary-foreground`},{color:`accent`,variant:`solid`,class:`bg-accent text-accent-foreground`},{color:`primary`,variant:[`soft`,`ghost`],class:`bg-primary/10`},{color:`destructive`,variant:[`soft`,`ghost`],class:`bg-destructive/10`},{color:`success`,variant:[`soft`,`ghost`],class:`bg-success/10`},{color:`warning`,variant:[`soft`,`ghost`],class:`bg-warning/10`},{color:`info`,variant:[`soft`,`ghost`],class:`bg-info/10`},{color:`carbon`,variant:[`soft`,`ghost`],class:`bg-carbon/10`},{color:`secondary`,variant:[`soft`,`ghost`],class:`bg-secondary-foreground/5`},{color:`accent`,variant:[`soft`,`ghost`],class:`bg-accent-foreground/5`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`}}),Jl({extendBase:e=>({itemDelete:Ov({size:e.size,shape:`circle`}),clear:Ov({size:e.size})}),slots:{root:[`group relative flex w-full flex-wrap items-center rounded-md border border-input bg-background shadow-sm transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[invalid]:focus-within:ring-destructive/30`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],item:[`inline-flex items-center rounded-md bg-accent ring-offset-background transition-[box-shadow,background-color]`,`data-[state=active]:ring-2 data-[state=active]:ring-primary/30 data-[state=active]:ring-offset-2`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemText:`rounded bg-transparent`,itemDelete:``,control:[`grow min-w-0 bg-transparent text-foreground outline-none`,`placeholder:text-muted-foreground disabled:cursor-not-allowed`],clear:`absolute opacity-0 transition-opacity group-data-[has-value]:opacity-100`},variants:{size:{xs:{root:`gap-1 px-1.5 py-1 text-2xs`,item:`min-h-4 gap-0.5`,itemText:`px-1.5 py-0.5`,itemDelete:`me-0.5`,input:`min-h-5 px-0.5`,clear:`end-0.5 top-0.5`},sm:{root:`gap-1.5 px-2 py-1 text-xs`,item:`min-h-4.5 gap-0.75`,itemText:`px-1.5 py-0.5`,itemDelete:`me-0.5`,input:`min-h-5 px-0.75`,clear:`end-0.75 top-0.75`},md:{root:`gap-2 px-2 py-1 text-sm`,item:`min-h-5 gap-1`,itemText:`px-2 py-0.5`,itemDelete:`me-1`,input:`min-h-5 px-1`,clear:`end-1 top-1`},lg:{root:`gap-2 px-2.5 py-1.5 text-base`,item:`min-h-6 gap-1`,itemText:`px-2 py-0.5`,itemDelete:`me-1`,input:`min-h-6 px-1.25`,clear:`end-1.25 top-1.25`},xl:{root:`gap-2.5 px-3 py-2 text-lg`,item:`min-h-7 gap-1.5`,itemText:`px-2.5 py-1`,itemDelete:`me-1`,input:`min-h-7 px-1.5`,clear:`end-1.5 top-1.5`},"2xl":{root:`gap-3 px-3.5 py-2.5 text-xl`,item:`min-h-8 gap-1.5`,itemText:`px-3 py-1`,itemDelete:`me-1.5`,input:`min-h-8 px-2`,clear:`end-2 top-2`}}},defaultVariants:{size:`md`}}),Jl({extendBase:e=>({clear:Ov({size:e.size,shape:`circle`})}),slots:{root:[`group relative flex flex-col`,`rounded-md border border-solid border-input bg-background transition-all-150`,`outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`],control:[`w-full bg-transparent outline-none`,`placeholder:text-muted-foreground`,`disabled:cursor-not-allowed disabled:opacity-50`],counter:`absolute z-2 leading-none text-muted-foreground`,clear:`absolute hidden opacity-50 group-hover:inline-flex group-focus-within:inline-flex hover:opacity-100`},variants:{size:{xs:{root:`text-2xs`,control:`min-h-6 px-1.5 py-1`,counter:`text-2xs end-1.75 bottom-1.5`,clear:`end-1.5 top-1.5`},sm:{root:`text-xs`,control:`min-h-7 px-1.75 py-1`,counter:`text-xs end-2 bottom-1.75`,clear:`end-1.75 top-1.75`},md:{root:`text-sm`,control:`min-h-8 px-2 py-1`,counter:`text-sm end-2.5 bottom-2`,clear:`end-2 top-2`},lg:{root:`text-base`,control:`min-h-9 px-2.5 py-1`,counter:`text-base end-3 bottom-2.5`,clear:`end-2.5 top-2.5`},xl:{root:`text-lg`,control:`min-h-10 px-3 py-1`,counter:`text-lg end-3.5 bottom-3`,clear:`end-3 top-3`},"2xl":{root:`text-xl`,control:`min-h-12 px-4 py-2`,counter:`text-xl end-4 bottom-3.5`,clear:`end-3.5 top-3.5`}},resize:{true:{control:`resize`},false:{control:`resize-none`},vertical:{control:`resize-y`},horizontal:{control:`resize-x`}}},defaultVariants:{size:`md`,resize:`vertical`}});var rE=[`inline-flex items-center justify-center rounded-sm font-medium transition-colors`,`outline-none hover:bg-accent hover:text-accent-foreground`,`focus-visible:ring-3 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`aria-disabled:pointer-events-none aria-disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4`];Jl({slots:{root:[`inline-flex items-center rounded-md border border-border bg-background shadow-xs`,`data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-fit data-[orientation=vertical]:flex-col`],button:rE,link:[...rE,`select-none no-underline`],linkIcon:`shrink-0 self-start text-muted-foreground rtl:rotate-270`,separator:[`shrink-0 bg-border data-[orientation=vertical]:w-px`,`data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full`],toggleGroup:`inline-flex items-center data-[orientation=vertical]:flex-col`,toggleItem:[...rE,`data-[state=on]:bg-accent data-[state=on]:text-accent-foreground`]},variants:{size:{xs:{root:`gap-0.5 p-0.5 data-[orientation=horizontal]:h-6`,button:`h-5 min-w-5 gap-1 px-1 text-2xs`,link:`h-5 min-w-5 gap-1 px-1 text-2xs`,linkIcon:`size-2 -ms-1`,separator:`data-[orientation=vertical]:mx-0.5 data-[orientation=vertical]:h-3 data-[orientation=horizontal]:my-0.5`,toggleGroup:`gap-0.5`,toggleItem:`h-5 min-w-5 gap-1 px-1 text-2xs`},sm:{root:`gap-0.5 p-0.5 data-[orientation=horizontal]:h-7`,button:`h-6 min-w-6 gap-1 px-1.5 text-xs`,link:`h-6 min-w-6 gap-1 px-1.5 text-xs`,linkIcon:`size-2.5 -ms-1.5`,separator:`data-[orientation=vertical]:mx-0.5 data-[orientation=vertical]:h-4 data-[orientation=horizontal]:my-0.5`,toggleGroup:`gap-0.5`,toggleItem:`h-6 min-w-6 gap-1 px-1.5 text-xs`},md:{root:`gap-1 p-1 data-[orientation=horizontal]:h-9`,button:`h-7 min-w-7 gap-1 px-2 text-sm`,link:`h-7 min-w-7 gap-1 px-2 text-sm`,linkIcon:`size-3 -ms-2`,separator:`data-[orientation=vertical]:mx-1 data-[orientation=vertical]:h-4 data-[orientation=horizontal]:my-1`,toggleGroup:`gap-1`,toggleItem:`h-7 min-w-7 gap-1 px-2 text-sm`},lg:{root:`gap-1 p-1 data-[orientation=horizontal]:h-10`,button:`h-8 min-w-8 gap-2 px-2.5 text-base`,link:`h-8 min-w-8 gap-2 px-2.5 text-base`,linkIcon:`size-3.5 -ms-2.5`,separator:`data-[orientation=vertical]:mx-1 data-[orientation=vertical]:h-5 data-[orientation=horizontal]:my-1`,toggleGroup:`gap-1`,toggleItem:`h-8 min-w-8 gap-2 px-2.5 text-base`},xl:{root:`gap-1.5 p-1.5 data-[orientation=horizontal]:h-12`,button:`h-9 min-w-9 gap-2.5 px-3 text-lg`,link:`h-9 min-w-9 gap-2.5 px-3 text-lg`,linkIcon:`size-4 -ms-3`,separator:`data-[orientation=vertical]:mx-1.5 data-[orientation=vertical]:h-6 data-[orientation=horizontal]:my-1.5`,toggleGroup:`gap-1.5`,toggleItem:`h-9 min-w-9 gap-2.5 px-3 text-lg`},"2xl":{root:`gap-2 p-2 data-[orientation=horizontal]:h-14`,button:`h-10 min-w-10 gap-3 px-3.5 text-xl`,link:`h-10 min-w-10 gap-3 px-3.5 text-xl`,linkIcon:`size-4.5 -ms-3.5`,separator:`data-[orientation=vertical]:mx-2 data-[orientation=vertical]:h-7 data-[orientation=horizontal]:my-2`,toggleGroup:`gap-2`,toggleItem:`h-10 min-w-10 gap-3 px-3.5 text-xl`}}},defaultVariants:{size:`md`}}),Rl({base:[`inline-flex items-center justify-center rounded-md whitespace-nowrap font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20`,accent:`focus-visible:ring-accent-foreground/20`},variant:{outline:`border border-border bg-background text-foreground hover:bg-accent data-[state=on]:bg-accent`,soft:`bg-accent data-[state=off]:hover:bg-accent`,ghost:`bg-transparent data-[state=off]:hover:bg-accent`},size:{xs:`gap-1 h-6 px-1.5 text-2xs`,sm:`gap-2 h-7 px-2 text-xs`,md:`gap-3 h-8 px-4 text-sm`,lg:`gap-4 h-9 px-6 text-base`,xl:`gap-5 h-10 px-8 text-lg`,"2xl":`gap-6 h-12 px-10 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`h-8 w-8 p-0 gap-0 rounded-md`,circle:`h-8 w-8 p-0 gap-0 rounded-full`}},compoundVariants:[{color:`primary`,variant:`soft`,class:`data-[state=on]:bg-primary/20 data-[state=on]:text-primary`},{color:`destructive`,variant:`soft`,class:`data-[state=on]:bg-destructive/20 data-[state=on]:text-destructive`},{color:`success`,variant:`soft`,class:`data-[state=on]:bg-success/20 data-[state=on]:text-success`},{color:`warning`,variant:`soft`,class:`data-[state=on]:bg-warning/20 data-[state=on]:text-warning`},{color:`info`,variant:`soft`,class:`data-[state=on]:bg-info/20 data-[state=on]:text-info`},{color:`carbon`,variant:`soft`,class:`data-[state=on]:bg-carbon/20 data-[state=on]:text-carbon`},{color:`secondary`,variant:`soft`,class:`data-[state=on]:bg-secondary-foreground/10 data-[state=on]:text-secondary-foreground`},{color:`accent`,variant:`soft`,class:`data-[state=on]:bg-accent-foreground/10 data-[state=on]:text-accent-foreground`},{color:`primary`,variant:`ghost`,class:`data-[state=on]:bg-primary/20 data-[state=on]:text-primary`},{color:`destructive`,variant:`ghost`,class:`data-[state=on]:bg-destructive/20 data-[state=on]:text-destructive`},{color:`success`,variant:`ghost`,class:`data-[state=on]:bg-success/20 data-[state=on]:text-success`},{color:`warning`,variant:`ghost`,class:`data-[state=on]:bg-warning/20 data-[state=on]:text-warning`},{color:`info`,variant:`ghost`,class:`data-[state=on]:bg-info/20 data-[state=on]:text-info`},{color:`carbon`,variant:`ghost`,class:`data-[state=on]:bg-carbon/20 data-[state=on]:text-carbon`},{color:`secondary`,variant:`ghost`,class:`data-[state=on]:bg-secondary-foreground/10 data-[state=on]:text-secondary-foreground`},{color:`accent`,variant:`ghost`,class:`data-[state=on]:bg-accent-foreground/10 data-[state=on]:text-accent-foreground`},{size:`xs`,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,shape:[`square`,`circle`],class:`w-7`},{size:`md`,shape:[`square`,`circle`],class:`w-8`},{size:`lg`,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,shape:[`square`,`circle`],class:`w-12`}],defaultVariants:{color:`accent`,variant:`ghost`,size:`md`,shape:`auto`}}),Jl({slots:{root:[`w-fit [&>*]:relative focus-visible:[&>*]:z-2`,`[&>*:not(:first-child):not(:last-child)]:!rounded-none`,`[&>*:not(:first-child):not(:last-child)>*]:!rounded-none`,`data-[orientation=vertical]:items-stretch`],item:[`inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-primary/30 focus-visible:ring-offset-background`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4`]},variants:{color:{primary:{item:`focus-visible:ring-primary/30`},destructive:{item:`focus-visible:ring-destructive/30`},success:{item:`focus-visible:ring-success/30`},warning:{item:`focus-visible:ring-warning/30`},info:{item:`focus-visible:ring-info/30`},carbon:{item:`focus-visible:ring-carbon/30`},secondary:{item:`focus-visible:ring-secondary-foreground/20`},accent:{item:`focus-visible:ring-accent-foreground/20`}},orientation:{horizontal:{root:[`inline-flex flex-row rtl:flex-row-reverse`,`[&>*:not(:last-child)]:border-e-0 [&>*:not(:last-child)>*]:border-e-0`,`focus-visible:[&>*]:border-e focus-visible:[&>*>*]:border-e`,`[&>*:first-child]:!rounded-e-none [&>*:first-child>*]:!rounded-e-none`,`[&>*:last-child]:!rounded-s-none [&>*:last-child>*]:!rounded-s-none`]},vertical:{root:[`flex flex-col`,`[&>*:not(:last-child)]:border-b-0 [&>*:not(:last-child)>*]:border-b-0`,`focus-visible:[&>*]:border-b focus-visible:[&>*>*]:border-b`,`[&>*:first-child]:!rounded-b-none [&>*:first-child>*]:!rounded-b-none`,`[&>*:last-child]:!rounded-t-none [&>*:last-child>*]:!rounded-t-none`]}},variant:{outline:{item:[`border border-border bg-background text-foreground`,`data-[state=off]:hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground`]},soft:{item:[`bg-accent text-foreground`,`data-[state=off]:hover:bg-accent`]},ghost:{item:[`bg-transparent text-foreground`,`data-[state=off]:hover:bg-accent`]}},size:{xs:{item:`h-6 gap-1 px-1.5 text-2xs`},sm:{item:`h-7 gap-2 px-2 text-xs`},md:{item:`h-8 gap-3 px-4 text-sm`},lg:{item:`h-9 gap-4 px-6 text-base`},xl:{item:`h-10 gap-5 px-8 text-lg`},"2xl":{item:`h-12 gap-6 px-10 text-xl`}}},compoundVariants:[{color:`primary`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-primary/20 data-[state=on]:text-primary`}},{color:`destructive`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-destructive/20 data-[state=on]:text-destructive`}},{color:`success`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-success/20 data-[state=on]:text-success`}},{color:`warning`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-warning/20 data-[state=on]:text-warning`}},{color:`info`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-info/20 data-[state=on]:text-info`}},{color:`carbon`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-carbon/20 data-[state=on]:text-carbon`}},{color:`secondary`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-secondary-foreground/10 data-[state=on]:text-secondary-foreground`}},{color:`accent`,variant:[`soft`,`ghost`],class:{item:`data-[state=on]:bg-accent-foreground/10 data-[state=on]:text-accent-foreground`}}],defaultVariants:{color:`accent`,orientation:`horizontal`,variant:`ghost`,size:`md`}});var iE=Jl({slots:{positioner:`w-max`,popup:[`w-auto rounded-md border bg-popover text-popover-foreground shadow-md outline-none z-50 will-change-transform`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`],arrow:`w-1em h-0.5em fill-popover stroke-border`},variants:{size:{xs:{popup:`px-2 py-1 text-2xs`,arrow:`text-3xs`},sm:{popup:`px-2.5 py-1.25 text-xs`,arrow:`text-2xs`},md:{popup:`px-3 py-1.5 text-sm`,arrow:`text-xs`},lg:{popup:`px-3.5 py-1.75 text-base`,arrow:`text-sm`},xl:{popup:`px-4 py-2 text-lg`,arrow:`text-base`},"2xl":{popup:`px-4.5 py-2.5 text-xl`,arrow:`text-lg`}}},defaultVariants:{size:`md`}});Jl({extendBase:e=>{let{positioner:t,popup:n,arrow:r}=iE({size:e.size}),{root:i,content:a}=wb({size:e.size,color:`accent`,position:`top-right`});return{tooltipPositioner:t,tooltipPopup:n,tooltipArrow:r,badgeRoot:i,badgeContent:a}},slots:{root:`group flex-1 flex flex-col w-full h-full overflow-auto data-[state=collapsed]:w-[--soybean-tree-menu-collapsed-width] transition-[width,height]-200 ease-out`,groupRoot:`group-data-[state=collapsed]:mb-0`,group:`flex flex-col m-0 p-0 list-none`,groupLabel:`flex items-center text-foreground/70 group-data-[state=collapsed]:size-0 group-data-[state=collapsed]:p-0 group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:overflow-hidden transition-[height,padding,opacity]-200`,item:`relative m-0 p-0 group-data-[state=collapsed]:hover:bg-sidebar-accent group-data-[state=collapsed]:hover:rounded-sm`,button:[`group/button relative flex items-center w-full rounded-sm outline-none cursor-pointer select-none group-data-[state=collapsed]:overflow-hidden`,`data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,`data-[active=false]:hover:bg-sidebar-accent data-[active=false]:focus:bg-sidebar-accent`,`data-[child-active]:text-primary`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],collapsibleRoot:``,collapsibleTrigger:``,collapsibleContent:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`],collapsibleIcon:`shrink-0 ms-auto text-muted-foreground transition-transform-200 group-data-[state=open]/button:rotate-90 group-data-[child-active]/button:text-primary`,sub:`flex flex-col m-0 list-none ms-[--soybean-tree-menu-indent] border-s border-sidebar-border border-solid`,itemLabel:`truncate`,itemLinkIcon:`shrink-0 self-start text-muted-foreground rtl:rotate-270`,itemTag:`shrink-0 ms-auto inline-flex items-center rounded-sm bg-accent/15 text-accent-foreground`,itemAction:[`absolute end-0 top-1/2 -translate-y-1/2 z-2 inline-flex items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors`,`focus-visible:bg-sidebar-accent focus-visible:text-foreground focus-visible:ring-3 focus-visible:ring-accent-foreground/20`,`disabled:pointer-events-none disabled:opacity-50`],itemAbsolute:`absolute inset-0 z-1 cursor-pointer`,tooltipPositioner:``,tooltipPopup:``,tooltipArrow:``,badgeRoot:``,badgeContent:``},variants:{size:{xs:{root:`gap-0.875 p-1.5 text-2xs`,groupRoot:`mb-0.875`,groupLabel:`h-6 gap-1 px-1.5 py-1 text-3xs`,group:`gap-0.875`,button:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,sub:`gap-0.875 ps-1.5 pt-0.875`,subButton:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,itemLinkIcon:`size-2 -ms-1`,itemTag:`min-h-3.5 px-1 text-4xs`,itemAction:`end-1 size-4 text-2xs`},sm:{root:`gap-1 p-1.75 text-xs`,groupRoot:`mb-1`,groupLabel:`h-7 gap-1.5 px-1.75 py-1 text-2xs`,group:`gap-1`,button:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,sub:`gap-1 ps-1.75 pt-1`,subButton:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,itemLinkIcon:`size-2.5 -ms-1.5`,itemTag:`min-h-4 px-1.25 text-3xs`,itemAction:`end-1.25 size-4.5 text-xs`},md:{root:`gap-1.25 p-2 text-sm`,groupRoot:`mb-1.25`,groupLabel:`h-8 gap-2 px-2 py-1.5 text-xs`,group:`gap-1.25`,button:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,sub:`gap-1.25 ps-2 pt-1.25`,subButton:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,itemLinkIcon:`size-3 -ms-2`,itemTag:`min-h-4.5 px-1.5 text-2xs`,itemAction:`end-1.5 size-5 text-sm`},lg:{root:`gap-1.5 p-2.25 text-base`,groupRoot:`mb-1.5`,groupLabel:`h-9 gap-2.5 px-2.25 py-1.5 text-sm`,group:`gap-1.5`,button:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,sub:`gap-1.5 ps-2.25 pt-1.5`,subButton:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,itemLinkIcon:`size-3.5 -ms-2.5`,itemTag:`min-h-5 px-1.75 text-xs`,itemAction:`end-1.75 size-5.5 text-base`},xl:{root:`gap-2 p-2.5 text-lg`,groupRoot:`mb-2`,groupLabel:`h-10 gap-3 px-2.5 py-2 text-base`,group:`gap-2`,button:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,sub:`gap-2 ps-2.5 pt-2`,subButton:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,itemLinkIcon:`size-4 -ms-3`,itemTag:`min-h-5.5 px-2 text-sm`,itemAction:`end-2 size-6 text-lg`},"2xl":{root:`gap-2.5 p-3 text-xl`,groupRoot:`mb-2.5`,groupLabel:`h-12 gap-3.5 px-3 py-2.5 text-lg`,group:`gap-2.5`,button:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,sub:`gap-2.5 ps-3 pt-2.5`,subButton:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,itemLinkIcon:`size-5 -ms-4`,itemTag:`min-h-6 px-2.5 text-base`,itemAction:`end-2.5 size-7 text-xl`}}},defaultVariants:{size:`md`}}),Jl({slots:{root:`relative`,overlay:`absolute inset-0 pointer-events-none bg-repeat`},variants:{fullscreen:{true:{root:`static`,overlay:`fixed inset-0 z-9999 pointer-events-none bg-repeat`}}}});function aE(e){return typeof e==`string`?`'${e}'`:new oE().serialize(e)}var oE=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}(),sE=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],cE=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],lE=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,uE=[],Hse=class{_data=new dE;_hash=new dE([...sE]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)uE[n]=e[t+n]|0;else{let e=uE[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=uE[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;uE[n]=t+uE[n-7]+i+uE[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+cE[n]+uE[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=dE.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new dE(t,i)}},dE=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(lE.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Use(e){return new Hse().finalize(e).toBase64()}function Wse(e){return Use(aE(e))}function fE(e){return Wse(e)}function pE(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var Gse={blue:pE(34,39),cyan:pE(36,39),gray:pE(90,39),green:pE(32,39),red:pE(31,39),yellow:pE(33,39),bold:pE(1,22),dim:pE(2,22),reset:pE(0,0),underline:pE(4,24)};function mE(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Kse=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function hE(e=21){let t=``,n=e;for(;n--;)t+=Kse[Math.random()*64|0];return t}var gE=Symbol.for(`immer-nothing`),_E=Symbol.for(`immer-draftable`),vE=Symbol.for(`immer-state`),yE=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function bE(e,...t){{let n=yE[e],r=HE(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var xE=Object,SE=xE.getPrototypeOf,CE=`constructor`,wE=`prototype`,TE=`configurable`,EE=`enumerable`,DE=`writable`,OE=`value`,kE=e=>!!e&&!!e[vE];function AE(e){return e?ME(e)||RE(e)||!!e[_E]||!!e[CE]?.[_E]||zE(e)||BE(e):!1}var qse=xE[wE][CE].toString(),jE=new WeakMap;function ME(e){if(!e||!VE(e))return!1;let t=SE(e);if(t===null||t===xE[wE])return!0;let n=xE.hasOwnProperty.call(t,CE)&&t[CE];if(n===Object)return!0;if(!HE(n))return!1;let r=jE.get(n);return r===void 0&&(r=Function.toString.call(n),jE.set(n,r)),r===qse}function NE(e,t,n=!0){PE(e)===0?(n?Reflect.ownKeys(e):xE.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function PE(e){let t=e[vE];return t?t.type_:RE(e)?1:zE(e)?2:BE(e)?3:0}var FE=(e,t,n=PE(e))=>n===2?e.has(t):xE[wE].hasOwnProperty.call(e,t),IE=(e,t,n=PE(e))=>n===2?e.get(t):e[t],LE=(e,t,n,r=PE(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Jse(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var RE=Array.isArray,zE=e=>e instanceof Map,BE=e=>e instanceof Set,VE=e=>typeof e==`object`,HE=e=>typeof e==`function`,UE=e=>typeof e==`boolean`;function Yse(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Xse=e=>VE(e)?e?.[vE]:null,WE=e=>e.copy_||e.base_,GE=e=>e.modified_?e.copy_:e.base_;function KE(e,t){if(zE(e))return new Map(e);if(BE(e))return new Set(e);if(RE(e))return Array[wE].slice.call(e);let n=ME(e);if(t===!0||t===`class_only`&&!n){let t=xE.getOwnPropertyDescriptors(e);delete t[vE];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[DE]===!1&&(a[DE]=!0,a[TE]=!0),(a.get||a.set)&&(t[i]={[TE]:!0,[DE]:!0,[EE]:a[EE],[OE]:e[i]})}return xE.create(SE(e),t)}else{let t=SE(e);if(t!==null&&n)return{...e};let r=xE.create(t);return xE.assign(r,e)}}function qE(e,t=!1){return YE(e)||kE(e)||!AE(e)?e:(PE(e)>1&&xE.defineProperties(e,{set:JE,add:JE,clear:JE,delete:JE}),xE.freeze(e),t&&NE(e,(e,t)=>{qE(t,!0)},!1),e)}function Zse(){bE(2)}var JE={[OE]:Zse};function YE(e){return e===null||!VE(e)||xE.isFrozen(e)}var XE=`MapSet`,ZE=`Patches`,QE=`ArrayMethods`,$E={};function eD(e){let t=$E[e];return t||bE(0,e),t}var tD=e=>!!$E[e];function Qse(e,t){$E[e]||($E[e]=t)}var nD,rD=()=>nD,$se=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:tD(XE)?eD(XE):void 0,arrayMethodsPlugin_:tD(QE)?eD(QE):void 0});function iD(e,t){t&&(e.patchPlugin_=eD(ZE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function aD(e){oD(e),e.drafts_.forEach(ece),e.drafts_=null}function oD(e){e===nD&&(nD=e.parent_)}var sD=e=>nD=$se(nD,e);function ece(e){let t=e[vE];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cD(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[vE].modified_&&(aD(t),bE(4)),AE(e)&&(e=lD(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[vE].base_,e,t)}else e=lD(t,n);return tce(t,e,!0),aD(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===gE?void 0:e}function lD(e,t){if(YE(t))return t;let n=t[vE];if(!n)return mD(t,e.handledSet_,e);if(!dD(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);pD(n,e)}return n.copy_}function tce(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qE(t,n)}function uD(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var dD=(e,t)=>e.scope_===t,nce=[];function fD(e,t,n,r){let i=WE(e),a=e.type_;if(r!==void 0&&IE(i,r,a)===t){LE(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;NE(i,(e,n)=>{if(kE(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??nce;for(let e of o)LE(i,e,n,a)}function rce(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!dD(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=GE(i);fD(e,i.draft_??i,a,n),pD(i,r)})}function pD(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}uD(e)}}function ice(e,t,n){let{scope_:r}=e;if(kE(n)){let i=n[vE];dD(i,r)&&i.callbacks_.push(function(){bD(e),fD(e,n,GE(i),t)})}else AE(n)&&e.callbacks_.push(function(){let i=WE(e);e.type_===3?i.has(n)&&mD(n,r.handledSet_,r):IE(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mD(IE(e.copy_,t,e.type_),r.handledSet_,r)})}function mD(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||kE(e)||t.has(e)||!AE(e)||YE(e)?e:(t.add(e),NE(e,(r,i)=>{if(kE(i)){let t=i[vE];dD(t,n)&&(LE(e,r,GE(t),e.type_),uD(t))}else AE(i)&&mD(i,t,n)}),e)}function ace(e,t){let n=RE(e),r={type_:+!!n,scope_:t?t.scope_:rD(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=hD;n&&(i=[r],a=gD);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var hD={get(e,t){if(t===vE)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=WE(e);if(!FE(i,t,e.type_))return sce(e,i,t);let a=i[t];if(e.finalized_||!AE(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Yse(t))return a;if(a===_D(e.base_,t)||oce(e,t,a)){bD(e);let n=e.type_===1?+t:t,r=xD(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in WE(e)},ownKeys(e){return Reflect.ownKeys(WE(e))},set(e,t,n){let r=vD(WE(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=_D(WE(e),t),i=r?.[vE];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Jse(n,r)&&(n!==void 0||FE(e.base_,t,e.type_)))return!0;bD(e),yD(e)}return e.copy_[t]===n&&(n!==void 0||FE(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),ice(e,t,n),!0)},deleteProperty(e,t){return bD(e),_D(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),yD(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=WE(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[DE]:!0,[TE]:e.type_!==1||t!==`length`,[EE]:r[EE],[OE]:n[t]}},defineProperty(){bE(11)},getPrototypeOf(e){return SE(e.base_)},setPrototypeOf(){bE(12)}},gD={};for(let e in hD){let t=hD[e];gD[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}gD.deleteProperty=function(e,t){return isNaN(parseInt(t))&&bE(13),gD.set.call(this,e,t,void 0)},gD.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&bE(14),hD.set.call(this,e[0],t,n,e[0])};function _D(e,t){let n=e[vE];return(n?WE(n):e)[t]}function oce(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!AE(n)||n[vE]?!1:e.baseRefs_.has(n)}function sce(e,t,n){let r=vD(t,n);return r?OE in r?r[OE]:r.get?.call(e.draft_):void 0}function vD(e,t){if(!(t in e))return;let n=SE(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=SE(n)}}function yD(e){e.modified_||(e.modified_=!0,e.parent_&&yD(e.parent_))}function bD(e){e.copy_||=(e.assigned_=new Map,KE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cce=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(HE(e)&&!HE(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}HE(t)||bE(6),n!==void 0&&!HE(n)&&bE(7);let r;if(AE(e)){let i=sD(this),a=xD(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?aD(i):oD(i)}return iD(i,n),cD(r,i)}else if(!e||!VE(e)){if(r=t(e),r===void 0&&(r=e),r===gE&&(r=void 0),this.autoFreeze_&&qE(r,!0),n){let t=[],i=[];eD(ZE).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else bE(1,e)},this.produceWithPatches=(e,t)=>{if(HE(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},UE(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),UE(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),UE(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){AE(e)||bE(8),kE(e)&&(e=lce(e));let t=sD(this),n=xD(t,e,void 0);return n[vE].isManual_=!0,oD(t),n}finishDraft(e,t){let n=e&&e[vE];(!n||!n.isManual_)&&bE(9);let{scope_:r}=n;return iD(r,t),cD(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=eD(ZE).applyPatches_;return kE(e)?r(e,t):this.produce(e,e=>r(e,t))}};function xD(e,t,n,r){let[i,a]=zE(t)?eD(XE).proxyMap_(t,n):BE(t)?eD(XE).proxySet_(t,n):ace(t,n);return(n?.scope_??rD()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?rce(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function lce(e){return kE(e)||bE(10,e),SD(e)}function SD(e){if(!AE(e)||YE(e))return e;let t=e[vE],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=KE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=KE(e,!0);return NE(n,(e,t)=>{LE(n,e,SD(t))},r),t&&(t.finalized_=!1),n}function CD(){yE.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=Xse(IE(e,n.key_)),i=IE(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||FE(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=IE(n,r),!VE(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[vE];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;NE(e.assigned_,(e,l)=>{let u=IE(o,e,c),f=IE(s,e,c),p=l?FE(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===gE?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=PE(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===CE)&&bE(19),HE(o)&&n===wE&&bE(19),o=IE(o,n),(o===null||!VE(o))&&bE(18,i.join(`/`))}let s=PE(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:bE(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:bE(17,a)}}),e}function u(e){if(!AE(e))return e;if(RE(e))return e.map(u);if(zE(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(BE(e))return new Set(Array.from(e).map(u));let t=Object.create(SE(e));for(let n in e)t[n]=u(e[n]);return FE(e,_E)&&(t[_E]=e[_E]),t}function d(e){return kE(e)?u(e):e}Qse(ZE,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}var wD=new cce,uce=wD.produce,dce=wD.produceWithPatches.bind(wD),fce=wD.applyPatches.bind(wD),pce=1e3;function TD(e,t){if(e.add(t),e.size>pce){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function mce(e){let{enablePatches:t=!1}=e;t&&CD();let n=mE(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=hE())=>{i.has(t)||(CD(),r=fce(r,e),TD(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=hE())=>{if(!i.has(a))if(TD(i,a),t){let[t,i]=dce(r,e);r=t,n.emit(`updated`,r,i,a)}else r=uce(r,e),n.emit(`updated`,r,void 0,a)},syncIds:i}}var ED=typeof self==`object`?self:globalThis;function hce(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new ED[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new ED[a](o),i)};return r}function DD(e){return hce(new Map,e)(0)}var OD=``,{toString:gce}={},{keys:_ce}=Object;function kD(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=gce.call(e).slice(8,-1);switch(n){case`Array`:return[1,OD];case`Object`:return[2,OD];case`Date`:return[3,OD];case`RegExp`:return[4,OD];case`Map`:return[5,OD];case`Set`:return[6,OD];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function AD([e,t]){return e===0&&(t===`function`||t===`symbol`)}function vce(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=kD(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of _ce(r))(e||!AD(kD(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(AD(kD(n))||AD(kD(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!AD(kD(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function yce(e,t={}){let n=[];return vce(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:bce,stringify:xce}=JSON,Sce={json:!0,lossy:!0};function Cce(e){return DD(bce(e))}function wce(e){return xce(yce(e,Sce))}function Tce(e){return DD(e)}function Ece(e){return wce(e)}function Dce(e){return Cce(e)}var Oce=256,kce=class extends Error{name=`StreamClosedError`};function Ace(e={}){let t=e.id??hE(),n=Math.max(0,e.replayWindow??0),r=mE(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new kce(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&a.splice(0,a.length-n)),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=Mce(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function jce(e={}){let t=e.id??hE(),n=Math.max(1,e.highWaterMark??Oce),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function Mce(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}function Nce(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function jD(e){return e.includes(`:`)}function MD(e,t){return jD(t)?t:`${e}:${t}`}function ND(e,...t){return typeof e==`function`?e(...t):e}var Pce=Error.captureStackTrace,Fce=class e extends Error{name;code;docs;fix;sources;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,Pce?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function Ice(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function Lce(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||Ice(r,i),s=(e={},n={})=>{let r=new Fce({code:i,why:ND(a.why,e),fix:ND(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Rce(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
|
|
328
|
+
`)}}String.fromCharCode;var zce=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,PD=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Bce=/^([/\\]\s*){2,}[^/\\]/,Vce=/\/$|\/\?|\/#/,Hce=/^\.?\//;function Uce(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?zce.test(e):PD.test(e)||(t.acceptRelative?Bce.test(e):!1)}function FD(e=``,t){return t?Vce.test(e):e.endsWith(`/`)}function ID(e=``,t){if(!t)return(FD(e)?e.slice(0,-1):e)||`/`;if(!FD(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function LD(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(FD(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function RD(e,t){if(zD(t)||Uce(e))return e;let n=ID(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return VD(n,e)}function zD(e){return!e||e===`/`}function BD(e){return e&&e!==`/`}function VD(e,...t){let n=e||``;for(let e of t.filter(e=>BD(e)))if(n){let t=e.replace(Hce,``);n=LD(n)+t}else n=e;return n}function HD(e,t){let n=e.match(PD);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}var UD=`q`,WD=`s`;function GD(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var KD=Math.random.bind(Math),qD=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function JD(e=21){let t=``,n=e;for(;n--;)t+=qD[KD()*64|0];return t}var YD=6e4,XD=e=>e,ZD=XD,{clearTimeout:QD,setTimeout:$D}=globalThis;function eO(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=XD,deserialize:s=ZD,resolver:c,bind:l=`rpc`,timeout:u=YD,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:UD};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=GD(),_=JD();s.i=_;let v;async function y(n=s){return u>=0&&(v=$D(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{QD(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.prototype.hasOwnProperty.call(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===UD){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:WD,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:WD,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(QD(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}var tO=`__connection.json`,nO=`__rpc-dump/index.json`,rO=`devframe_otp`,iO=`devframe_auth_token`,aO=Rce(Gse);function oO(e,{method:t=`warn`}={}){console[t](aO(e))}var sO=Lce({docsBase:`https://devfra.me/errors`,reporters:[oO],codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,fix:"Set `jsonSerializable: true` if the payload is JSON-safe, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."}}});function cO(e){let t=e.cause instanceof Error?e.cause:lO(e.cause)?cO(e.cause):e.cause,n=t===void 0?Error(e.message):Error(e.message,{cause:t});n.name=e.name;for(let t of Object.keys(e))t!==`name`&&t!==`message`&&t!==`cause`&&(n[t]=e[t]);return n}function lO(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}async function uO(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function dO(e,t){if(e.handler)return e.handler;let n=await uO(e,t);if(!n.handler)throw sO.DF0024({name:e.name});return n.handler}var fO=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>fE(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},pO=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return dO(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw sO.DF0021({name:e.name});mO(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw sO.DF0022({name:e.name});mO(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await dO(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw sO.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function mO(e){if(e.agent&&e.jsonSerializable!==!0)throw sO.DF0019({name:e.name})}function hO(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw gO(t,`undefined`,r,e);return n}if(i===null)return n;if(typeof i==`bigint`)throw gO(t,`BigInt`,r,e);if(typeof i==`object`){if(i instanceof Map)throw gO(t,`Map`,r,e);if(i instanceof Set)throw gO(t,`Set`,r,e);if(i instanceof Date)throw gO(t,`Date`,r,e);if(Array.isArray(i))return n;let a=Object.getPrototypeOf(i);if(a!==null&&a!==Object.prototype)throw gO(t,i.constructor?.name??`class instance`,r,e)}return n})}function gO(e,t,n,r){let i=_O(n,r);return sO.DF0020({name:e||`<anonymous>`,type:t,path:i})}function _O(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function vO(e=rO){try{return new URLSearchParams(globalThis.location?.search).get(e)||void 0}catch{return}}function yO(e){try{let t=new URL(globalThis.location.href);if(!t.searchParams.has(e))return;t.searchParams.delete(e),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function bO(e=rO){let t=vO(e);return t&&yO(e),t}async function xO(e,t={}){let n=bO(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function SO(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:`devframe:rpc:client-state:updated`,type:`event`,handler:(e,n,r)=>{let i=t.get(e);!i||i.syncIds.has(r)||i.mutate(()=>o(e,n),r)}}),e.client.register({name:`devframe:rpc:client-state:patch`,type:`event`,handler:(e,n,r)=>{let i=t.get(e);!i||i.syncIds.has(r)||i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=mce({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}else{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(`rpc:is-trusted:updated`,e=>{e&&!n&&(n=!0,d())})}})}}}function CO(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function wO(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function TO(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function EO(e){if(e.error)throw cO(e.error);return e.output}function DO(e){return e.some(e=>e!=null)}function OO(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function kO(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Tce(e):e}function a(e,t){return i(OO(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return TO(r)?EO(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(CO(r)){if(DO(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(wO(r)){let e=fE(n),i=r.records[e];if(i)return EO(await s(i,r.serialization));if(r.fallback)return EO(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!DO(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function AO(e){let t=kO(await e.fetchJsonFromBases(nO),e.fetchJsonFromBases);return{isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1))}}var jO=``;function MO(e,t){return`${e}${jO}${t}`}function NO(e){let t=new Map,n=new Map;e.client.register({name:`devframe:streaming:chunk`,type:`event`,handler(e,n,r,i){t.get(MO(e,n))?._push(r,i)}}),e.client.register({name:`devframe:streaming:end`,type:`event`,handler(e,n,r){let i=MO(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:`devframe:streaming:upload-cancel`,type:`event`,handler(e,t){let r=MO(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(`rpc:is-trusted:updated`,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(jO);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=MO(n,r),o=t.get(a);if(o)return o;let s=jce({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(`rpc:is-trusted:updated`,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=MO(t,r),a=n.get(i);if(a)return a;let o=Ace({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function PO(e,t){let{channel:n,rpcOptions:r={}}=t;return eO(e,{...n,timeout:-1,...r,proxify:!1})}function FO(){}var IO=new Map;function LO(e){let t=e.url;e.authToken&&(t=`${t}?${iO}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=FO,onError:i=FO,onDisconnected:a=FO,definitions:o=IO}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=new Map;return{on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:e=>{let t;return e.t===`q`?t=e.m:(t=s.get(e.i),s.delete(e.i)),!(e.t===`s`&&`e`in e)&&t&&o.get(t)?.jsonSerializable===!0?hO(e,t??``):`s:${Ece(e)}`},deserialize:e=>{let t=e.startsWith(`s:`)?Dce(e.slice(2)):JSON.parse(e);return t.t===`q`&&t.i&&t.m&&s.set(t.i,t.m),t}}}var RO=``,zO=`?`,BO=`major`,V=`model`,H=`name`,U=`type`,W=`vendor`,G=`version`,VO=`architecture`,HO=`console`,UO=`mobile`,WO=`tablet`,GO=`smarttv`,KO=`wearable`,qO=`embedded`,JO=500,YO=`Amazon`,XO=`Apple`,ZO=`ASUS`,QO=`BlackBerry`,$O=`Browser`,ek=`Chrome`,tk=`Edge`,nk=`Firefox`,rk=`Google`,ik=`Huawei`,ak=`LG`,ok=`Microsoft`,sk=`Motorola`,ck=`Opera`,lk=`Samsung`,uk=`Sharp`,dk=`Sony`,fk=`Xiaomi`,pk=`Zebra`,mk=`Facebook`,hk=`Chromium OS`,gk=`Mac OS`;function _k(e,t={}){let n={};for(let r of Object.keys(e)){let i=t[r];i&&i.length%2==0?n[r]=[...i,...e[r]]:n[r]=e[r]}return n}function vk(e){let t={};for(let n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function yk(e){return e.toLowerCase()}function bk(e,t){return typeof e==`string`&&yk(t).includes(yk(e))}function xk(e){return typeof e==`string`?e.replace(/[^\d.]/g,RO).split(`.`)[0]:void 0}function Sk(e,t){let n=e.replace(/^\s+/,RO);return t===void 0?n:n.substring(0,t)}function Ck(e,t,n){let r=n??{};for(let n=0;n<t.length;n+=2){let i=t[n],a=t[n+1];for(let t=0;t<i.length;t++){let n=i[t];if(!n)break;let o=n.exec(e);if(o){for(let e=0;e<a.length;e++){let t=o[e+1],n=a[e];if(Array.isArray(n)){let e=n[0],i=n.length;if(i===2){let i=n[1];typeof i==`function`?r[e]=i(t,void 0,r):r[e]=i}else if(i===3){let i=n[1],a=n[2];typeof i==`function`&&!(`exec`in i)&&!(`test`in i)?r[e]=t?i(t,a,r):void 0:r[e]=t?t.replace(i,a):void 0}else i===4&&(r[e]=t?n[3](t.replace(n[1],n[2]),void 0,r):void 0)}else r[n]=t||void 0}return r}}}return r}function wk(e,t){for(let n in t){let r=t[n];if(Array.isArray(r)&&r.length>0){for(let t=0;t<r.length;t++)if(bk(r[t],e))return n===zO?void 0:n}else if(bk(r,e))return n===zO?void 0:n}return e}var Tk={"1.0":`/8`,"1.2":`/1`,"1.3":`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},Ek={ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,"8.1":`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`},Dk={browser:[[/\b(?:crmo|crios)\/([\w.]+)/i],[G,[H,`Chrome`]],[/edg(?:e|ios|a)?\/([\w.]+)/i],[G,[H,`Edge`]],[/(opera mini)\/([-\w.]+)/i,/(opera [mobileta]{3,6})\b.+version\/([-\w.]+)/i,/(opera)(?:.+version\/|[/ ]+)([\w.]+)/i],[H,G],[/opios[/ ]+([\w.]+)/i],[G,[H,`${ck} Mini`]],[/\bop(?:rg)?x\/([\w.]+)/i],[G,[H,`${ck} GX`]],[/\bopr\/([\w.]+)/i],[G,[H,ck]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[/ ]?([\w.]+)/i],[G,[H,`Baidu`]],[/(kindle)\/([\w.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[/ ]?([\w.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[/ ]?([\w.]*)/i,/(?:ms|\()(ie) ([\w.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w.]+)/i,/(heytap|ovi)browser\/([\d.]+)/i,/(weibo)__([\d.]+)/i],[H,G],[/\bddg\/([\w.]+)/i],[G,[H,`DuckDuckGo`]],[/(?:\buc? ?browser|juc.+ucweb)[/ ]?([\w.]+)/i],[G,[H,`UC${$O}`]],[/microm.+\bqbcore\/([\w.]+)/i,/\bqbcore\/([\w.]+).+microm/i,/micromessenger\/([\w.]+)/i],[G,[H,`WeChat`]],[/konqueror\/([\w.]+)/i],[G,[H,`Konqueror`]],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i],[G,[H,`IE`]],[/ya(?:search)?browser\/([\w.]+)/i],[G,[H,`Yandex`]],[/slbrowser\/([\w.]+)/i],[G,[H,`Smart Lenovo ${$O}`]],[/(avast|avg)\/([\w.]+)/i],[[H,/(.+)/,`$1 Secure ${$O}`],G],[/\bfocus\/([\w.]+)/i],[G,[H,`${nk} Focus`]],[/\bopt\/([\w.]+)/i],[G,[H,`${ck} Touch`]],[/coc_coc\w+\/([\w.]+)/i],[G,[H,`Coc Coc`]],[/dolfin\/([\w.]+)/i],[G,[H,`Dolphin`]],[/coast\/([\w.]+)/i],[G,[H,`${ck} Coast`]],[/miuibrowser\/([\w.]+)/i],[G,[H,`MIUI ${$O}`]],[/fxios\/([-\w.]+)/i],[G,[H,nk]],[/\bqihu|(qi?ho{0,2}|360)browser/i],[[H,`360 ${$O}`]],[/(oculus|sailfish|huawei|vivo)browser\/([\w.]+)/i],[[H,/(.+)/,`$1 ${$O}`],G],[/samsungbrowser\/([\w.]+)/i],[G,[H,`${lk} Internet`]],[/(comodo_dragon)\/([\w.]+)/i],[[H,/_/g,` `],G],[/metasr[/ ]?([\d.]+)/i],[G,[H,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d.]+)/i],[[H,`Sogou Mobile`],G],[/(electron)\/([\w.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w.]+))/i,/m?(qqbrowser|2345Explorer)[/ ]?([\w.]+)/i],[H,G],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[H],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w.]+);)/i],[[H,mk],G],[/(Klarna)\/([\w.]+)/i,/(kakao(?:talk|story))[/ ]([\w.]+)/i,/(naver)\(.*?(\d+\.[\w.]+).*\)/i,/safari (line)\/([\w.]+)/i,/\b(line)\/([\w.]+)\/iab/i,/(alipay)client\/([\w.]+)/i,/(twitter)(?:and| f.+e\/([\w.]+))/i,/(chromium|instagram|snapchat)[/ ]([-\w.]+)/i],[H,G],[/\bgsa\/([\w.]+) .*safari\//i],[G,[H,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w.]+)/i],[G,[H,`TikTok`]],[/headlesschrome(?:\/([\w.]+)| )/i],[G,[H,`${ek} Headless`]],[/ wv\).+(chrome)\/([\w.]+)/i],[[H,`${ek} WebView`],G],[/droid.+ version\/([\w.]+)\b.+(?:mobile safari|safari)/i],[G,[H,`Android ${$O}`]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w.]+)/i],[H,G],[/version\/([\w.,]+) .*mobile\/\w+ (safari)/i],[G,[H,`Mobile Safari`]],[/version\/([\w(.|,)]+) .*(mobile ?safari|safari)/i],[G,H],[/webkit.+?(mobile ?safari|safari)(\/[\w.]+)/i],[H,[G,wk,Tk]],[/(webkit|khtml)\/([\w.]+)/i],[H,G],[/(navigator|netscape\d?)\/([-\w.]+)/i],[[H,`Netscape`],G],[/mobile vr; rv:([\w.]+)\).+firefox/i],[G,[H,`${nk} Reality`]],[/ekiohf.+(flow)\/([\w.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[/ ]?([\w.+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w.]+)$/i,/(firefox)\/([\w.]+)/i,/(mozilla)\/([\w.]+) .+rv:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[. ]?browser)[-/ ]?v?([\w.]+)/i,/(links) \(([\w.]+)/i,/panasonic;(viera)/i],[H,G],[/(cobalt)\/([\w.]+)/i],[H,[G,/master.|lts./,``]]],cpu:[[/(amd|x(?:(?:86|64)[-_])?|wow|win)64[;)]/i],[[VO,`amd64`]],[/(ia32(?=;))/i],[[VO,yk]],[/((?:i[346]|x)86)[;)]/i],[[VO,`ia32`]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[VO,`arm64`]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[VO,`armhf`]],[/windows (ce|mobile); ppc;/i],[[VO,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[VO,/ower/,RO,yk]],[/(sun4\w)[;)]/i],[[VO,`sparc`]],[/(avr32|ia64(?=;)|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[VO,yk]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[V,[W,lk],[U,WO]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?\d+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[V,[W,lk],[U,UO]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[V,[W,XO],[U,UO]],[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[V,[W,XO],[U,WO]],[/(macintosh);/i],[V,[W,XO]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[V,[W,uk],[U,UO]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[V,[W,ik],[U,WO]],[/(?:huawei|honor)([-\w ]+)[;)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][0-359c][adn]?)\b(?!.+d\/s)/i],[V,[W,ik],[U,UO]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?[\w ]+)(?: bui|\))/i,/oid[^)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?\d?\w?[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[V,/_/g,` `],[W,fk],[U,UO]],[/oid[^)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?pad[\w ]+)(?: bui|\))/i],[[V,/_/g,` `],[W,fk],[U,WO]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[V,[W,`OPPO`],[U,UO]],[/\b(opd2\d{3}a?) bui/i],[V,[W,`OPPO`],[U,WO]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[V,[W,`Vivo`],[U,UO]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[V,[W,`Realme`],[U,UO]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w() ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[V,[W,sk],[U,UO]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[V,[W,sk],[U,WO]],[/((?=lg)?[vl]k-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[V,[W,ak],[U,WO]],[/(lm(?:-?f100[nv]?|-[\w.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?(\w+) bui/i],[V,[W,ak],[U,UO]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab[\w ]+|yt[-\w]{6}|tb[-\w]{6})/i],[V,[W,`Lenovo`],[U,WO]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w.]*)/i],[[V,/_/g,` `],[W,`Nokia`],[U,UO]],[/(pixel c)\b/i],[V,[W,rk],[U,WO]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[V,[W,rk],[U,UO]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]?\d\.))/i],[V,[W,dk],[U,UO]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[V,`Xperia Tablet`],[W,dk],[U,WO]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[V,[W,`OnePlus`],[U,UO]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[V,[W,YO],[U,WO]],[/((?:sd|kf)[0349hijor-uw]+)( bui|\)).+silk\//i],[[V,/(.+)/g,`Fire Phone $1`],[W,YO],[U,UO]],[/(playbook);[-\w),; ]+(rim)/i],[V,W,[U,WO]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[V,[W,QO],[U,UO]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[V,[W,ZO],[U,WO]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[V,[W,ZO],[U,UO]],[/(nexus 9)/i],[V,[W,`HTC`],[U,WO]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!;|\.)|sony(?!-bra))[-_ ]?([-\w]*)/i],[W,[V,/_/g,` `],[U,UO]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[V,[W,`Acer`],[U,WO]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[V,[W,`Meizu`],[U,UO]],[/; ((?:power )?armor[\w ]{0,8})(?: bui|\))/i],[V,[W,`Ulefone`],[U,UO]],[/(blackberry|benq|palm(?=-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[W,V,[U,UO]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[W,V,[U,WO]],[/(surface duo)/i],[V,[W,ok],[U,WO]],[/droid [\d.]+; (fp\du?)(?: b|\))/i],[V,[W,`Fairphone`],[U,UO]],[/(u304aa)/i],[V,[W,`AT&T`],[U,UO]],[/\bsie-(\w*)/i],[V,[W,`Siemens`],[U,UO]],[/\b(rct\w+) b/i],[V,[W,`RCA`],[U,WO]],[/\b(venue[\d ]{2,7}) b/i],[V,[W,`Dell`],[U,WO]],[/\b(q(?:mv|ta)\w+) b/i],[V,[W,`Verizon`],[U,WO]],[/\b(?:barnes[& ]+noble |bn[rt])([\w+ ]*) b/i],[V,[W,`Barnes & Noble`],[U,WO]],[/\b(tm\d{3}\w+) b/i],[V,[W,`NuVision`],[U,WO]],[/\b(k88) b/i],[V,[W,`ZTE`],[U,WO]],[/\b(nx\d{3}j) b/i],[V,[W,`ZTE`],[U,UO]],[/\b(gen\d{3}) b.+49h/i],[V,[W,`Swiss`],[U,UO]],[/\b(zur\d{3}) b/i],[V,[W,`Swiss`],[U,WO]],[/\b((zeki)?tb.*\b) b/i],[V,[W,`Zeki`],[U,WO]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[W,`Dragon Touch`],V,[U,WO]],[/\b(ns-?\w{0,9}) b/i],[V,[W,`Insignia`],[U,WO]],[/\b((nxa|next)-?\w{0,9}) b/i],[V,[W,`NextBook`],[U,WO]],[/\b(xtreme_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[W,`Voice`],V,[U,UO]],[/\b(lvtel-)?(v1[12]) b/i],[[W,`LvTel`],V,[U,UO]],[/\b(ph-1) /i],[V,[W,`Essential`],[U,UO]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[V,[W,`Envizen`],[U,WO]],[/\b(trio[-\w. ]+) b/i],[V,[W,`MachSpeed`],[U,WO]],[/\btu_(1491) b/i],[V,[W,`Rotor`],[U,WO]],[/(shield[\w ]+) b/i],[V,[W,`Nvidia`],[U,WO]],[/(sprint) (\w+)/i],[W,V,[U,UO]],[/(kin\.[onetw]{3})/i],[[V,/\./g,` `],[W,ok],[U,UO]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[V,[W,pk],[U,WO]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[V,[W,pk],[U,UO]],[/smart-tv.+(samsung)/i],[W,[U,GO]],[/hbbtv.+maple;(\d+)/i],[[V,/^/,`SmartTV`],[W,lk],[U,GO]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[W,ak],[U,GO]],[/(apple) ?tv/i],[W,[V,`${XO} TV`],[U,GO]],[/crkey/i],[[V,`${ek}cast`],[W,rk],[U,GO]],[/droid.+aft(\w+)( bui|\))/i],[V,[W,YO],[U,GO]],[/\(dtv[);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[V,[W,uk],[U,GO]],[/(bravia[\w ]+)( bui|\))/i],[V,[W,dk],[U,GO]],[/(mitv-\w{5}) bui/i],[V,[W,fk],[U,GO]],[/Hbbtv.*(technisat) (.*);/i],[W,V,[U,GO]],[/\b(roku)[\dx]*[)/]((?:dvp-)?[\d.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w+ ]*; *(\w[^;]*);([^;]*)/i],[[W,Sk],[V,Sk],[U,GO]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[U,GO]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[W,V,[U,HO]],[/droid.+; (shield) bui/i],[V,[W,`Nvidia`],[U,HO]],[/(playstation [345portablevi]+)/i],[V,[W,dk],[U,HO]],[/\b(xbox(?: one)?(?!; xbox))[); ]/i],[V,[W,ok],[U,HO]],[/((pebble))app/i],[W,V,[U,KO]],[/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i],[V,[W,XO],[U,KO]],[/droid.+; (glass) \d/i],[V,[W,rk],[U,KO]],[/droid.+; (wt63?0{2,3})\)/i],[V,[W,pk],[U,KO]],[/(quest( \d| pro)?)/i],[V,[W,mk],[U,KO]],[/(tesla)(?: qtcarbrowser|\/[-\w.]+)/i],[W,[U,qO]],[/(aeobc)\b/i],[V,[W,YO],[U,qO]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[V,[U,UO]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[V,[U,WO]],[/\b((tablet|tab)[;/]|focus\/\d(?!.+mobile))/i],[[U,WO]],[/(phone|mobile(?:[;/]| [ \w/.]*safari)|pda(?=.+windows ce))/i],[[U,UO]],[/(android[-\w. ]{0,9});.+buil/i],[V,[W,`Generic`]]],engine:[[/windows.+ edge\/([\w.]+)/i],[G,[H,`${tk}HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i],[G,[H,`Blink`]],[/(presto)\/([\w.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w.]+)/i,/ekioh(flow)\/([\w.]+)/i,/(khtml|tasman|links)[/ ]\(?([\w.]+)/i,/(icab)[/ ]([23]\.[\d.]+)/i,/\b(libweb)/i],[H,G],[/rv:([\w.]{1,9})\b.+(gecko)/i],[G,H]],os:[[/microsoft (windows) (vista|xp)/i],[H,G],[/(windows (?:phone(?: os)?|mobile))[/ ]?([.\w ]*)/i],[H,[G,wk,Ek]],[/windows nt 6\.2; (arm)/i,/windows[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i,/(?:win(?=[39n])|win 9x )([nt\d.]+)/i],[[G,wk,Ek],[H,`Windows`]],[/ip[honead]{2,4}\b(?:.*os (\w+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[/ ])([\d.]+)/i,/cfnetwork\/.+darwin/i],[[G,/_/g,`.`],[H,`iOS`]],[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[H,gk],[G,/_/g,`.`]],[/droid ([\w.]+)\b.+(android[- ]x86|harmonyos)/i],[G,H],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-/ ]?([\w.]*)/i,/(blackberry)\w*\/([\w.]*)/i,/(tizen|kaios)[/ ]([\w.]+)/i,/\((series40);/i],[H,G],[/\(bb(10);/i],[G,[H,QO]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-/ ]?([\w.]*)/i],[G,[H,`Symbian`]],[/mozilla\/[\d.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w.]+)/i],[G,[H,`${nk} OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w.]+)/i],[G,[H,`webOS`]],[/watch(?: ?os[,/]|\d,\d\/)([\d.]+)/i],[G,[H,`watchOS`]],[/crkey\/([\d.]+)/i],[G,[H,`${ek}cast`]],[/(cros) \w+(?:\)| ([\w.]+)\b)/i],[[H,hk],G],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w.]*)/i,/(mint)[/() ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-/ ]?(?!chrom|package)([-\w.]*)/i,/(hurd|linux) ?([\w.]*)/i,/(gnu) ?([\w.]*)/i,/\b([-e-hrntopcs]{0,5}bsd|dragonfly)[/ ]?(?!amd|[ix346]{1,2}86)([\w.]*)/i,/(haiku) (\w+)/i],[H,G],[/(sunos) ?([\w.]*)/i],[[H,`Solaris`],G],[/((?:open)?solaris)[-/ ]?([\w.]*)/i,/(aix) ((\d)(?=[.) ])[\w.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w.]*)/i],[H,G]]};function Ok(e){return typeof e==`object`&&!!e}Object.freeze(vk([H,G,BO])),Object.freeze(vk([VO])),Object.freeze(vk([V,W,U,HO,UO,GO,WO,KO,qO])),Object.freeze(vk([H,G])),Object.freeze(vk([H,G]));function kk(){if(!(typeof window>`u`||!window.navigator))return window.navigator}function Ak(e){return e.length>JO?Sk(e,JO):e}function jk(e){if(typeof e==`string`)return{ua:Ak(e),isSelfNavigator:!1,navigator:void 0,userAgentData:void 0,regexMap:Dk};let t=kk(),n=Ak(t&&t.userAgent?t.userAgent:RO);return{ua:n,isSelfNavigator:!!(t&&t.userAgent===n),navigator:t,userAgentData:t?.userAgentData,regexMap:Dk}}function Mk(e,t){if(!t&&!Ok(e))return jk(e);let n=kk(),r=Ok(e)?void 0:e,i=Ok(e)?e:t,a=Ak(r||(n&&n.userAgent?n.userAgent:RO)),o=n?.userAgentData;return{ua:a,isSelfNavigator:!!(n&&n.userAgent===a),navigator:n,userAgentData:o,regexMap:i?_k(Dk,i):Dk}}function Nk(e){let t={name:void 0,version:void 0,major:void 0};return Ck(e.ua,e.regexMap.browser,t),t.major=xk(t.version),e.isSelfNavigator&&e.navigator?.brave&&typeof e.navigator.brave.isBrave==`function`&&(t.name=`Brave`),t}function Pk(e){let t={architecture:void 0};return Ck(e.ua,e.regexMap.cpu,t),t}function Fk(e){let t={vendor:void 0,model:void 0,type:void 0};return Ck(e.ua,e.regexMap.device,t),e.isSelfNavigator&&!t.type&&e.userAgentData?.mobile&&(t.type=UO),e.isSelfNavigator&&t.model===`Macintosh`&&e.navigator&&e.navigator.standalone!==void 0&&e.navigator.maxTouchPoints&&e.navigator.maxTouchPoints>2&&(t.model=`iPad`,t.type=WO),t}function Ik(e){let t={name:void 0,version:void 0};return Ck(e.ua,e.regexMap.engine,t),t}function Lk(e){let t={name:void 0,version:void 0};return Ck(e.ua,e.regexMap.os,t),e.isSelfNavigator&&!t.name&&e.userAgentData?.platform&&e.userAgentData.platform!==`Unknown`&&(t.name=e.userAgentData.platform.replace(/chrome os/i,hk).replace(/macos/i,gk)),t}function Rk(e,t){let n,r,i,a,o,s,c=()=>n||=Mk(e,t);return{get ua(){return c().ua},get browser(){return r||=Nk(c()),r},get engine(){return i||=Ik(c()),i},get os(){return a||=Lk(c()),a},get device(){return o||=Fk(c()),o},get cpu(){return s||=Pk(c()),s}}}var zk=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Bk(e,t,n){let r=n.protocol===`https:`?`wss:`:`ws:`,i=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${n.hostname}:${e.port}`,i=new URL(e.path??`/`,`${r}//${t}`);return i.protocol=r,i.href}let t=new URL(e.path??``,i);return t.protocol=r,t.href}if(typeof e==`number`)return`${r}//${n.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return HD(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,i);return o.protocol=r,o.href}function Vk(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=!1,u=`connecting`,d=null,f=Nce(),p=Bk(n.websocket,r??`./`,location);function m(e,t=null){if(t?d=t:e===`connected`&&(d=null),e===u)return;let n=u;u=e,i.emit(`connection:status`,e,n)}let h=new Set;function g(e){for(let t of[...h])t.reject(e)}function _(){return u===`disconnected`||u===`error`?new zk(`connection`,`[devframe] Not connected to the devframe server`,{cause:d??void 0}):u===`unauthorized`?new zk(`auth`,`[devframe] Not authorized by the devframe server`,{cause:d??void 0}):null}function v(e,t){return new Promise((n,r)=>{let a=!1,o,s={reject(e){a||(l(),i.emit(`rpc:error`,e,t),r(e))}};function l(){a=!0,h.delete(s),o&&clearTimeout(o)}h.add(s),c>0&&(o=setTimeout(()=>{s.reject(new zk(`timeout`,`[devframe] RPC call "${t}" timed out after ${c}ms`))},c)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(`rpc:error`,n,t),r(n)})})}let y=new Map;for(let e of n.jsonSerializableMethods??[])y.set(e,{jsonSerializable:!0});let b=PO(a.functions,{channel:LO({url:p,authToken:t,definitions:y,...s,onConnected(e){s.onConnected?.(e)},onError(e){m(`error`,e),i.emit(`connection:error`,e),g(new zk(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e})),s.onError?.(e)},onDisconnected(e){u!==`error`&&m(`disconnected`),g(new zk(`connection`,`[devframe] Disconnected from the devframe server`,{cause:d??void 0})),s.onDisconnected?.(e)}}),rpcOptions:o});a.register({name:`devframe:auth:revoked`,type:`event`,handler:()=>{l=!1;let e=new zk(`auth`,`[devframe] The devframe server revoked this client's trust`);m(`unauthorized`,e),i.emit(`connection:error`,e),g(e),i.emit(`rpc:is-trusted:updated`,!1)}});let x=t;function S(){let e=Rk(navigator.userAgent);return[e.browser.name,e.browser.version,`|`,e.os.name,e.os.version,e.device.type].filter(e=>e).join(` `)}async function C(e){x=e;let t=await b.$call(`anonymous:devframe:auth`,{authToken:e,ua:S(),origin:location.origin});if(l=t.isTrusted,l)f.resolve(!0),m(`connected`);else{let e=new zk(`auth`,`[devframe] The devframe server refused this client's credentials`);m(`unauthorized`,e),i.emit(`connection:error`,e)}return i.emit(`rpc:is-trusted:updated`,l),t.isTrusted}async function w(e){let t=(await b.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:S(),origin:location.origin}))?.authToken??null;return t&&(x=t,l=!0,f.resolve(!0),m(`connected`),i.emit(`rpc:is-trusted:updated`,!0)),t}async function ee(){return l?!0:C(x??``)}async function te(e=6e4){if(l&&f.resolve(!0),e<=0)return f.promise;let t=()=>{};return await Promise.race([f.promise.then(t),new Promise((n,r)=>{let i=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e);t=()=>clearTimeout(i)})]),l}return{get isTrusted(){return l},get status(){return u},get connectionError(){return d},requestTrust:ee,requestTrustWithToken:C,requestTrustWithCode:w,ensureTrusted:te,call:(...e)=>{let t=String(e[0]),n=_();return n?(i.emit(`rpc:error`,n,t),Promise.reject(n)):v(b.$call(...e),t)},callEvent:(...e)=>{let t=_();if(t){i.emit(`rpc:error`,t,String(e[0]));return}return b.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=_();return n?(i.emit(`rpc:error`,n,t),Promise.reject(n)):v(b.$callOptional(...e),t)}}}function Hk(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return{async get(e){return(await a()).value()[e]},async set(e,t){(await a()).mutate(n=>{n[e]=t})},async delete(e){(await a()).mutate(t=>{delete t[e]})},async all(){return(await a()).value()},async onChange(e){return(await a()).on(`updated`,t=>e(t))}}}function Uk(e,t){return{global:Hk(e,t,`global`),project:Hk(e,t,`project`)}}function Wk(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(jD(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(MD(t,n),...r)),callEvent:((n,...r)=>e.callEvent(MD(t,n),...r)),callOptional:((n,...r)=>e.callOptional(MD(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(MD(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(MD(t,n),r,i),upload:(n,r)=>e.streaming.upload(MD(t,n),r)}},settings:Uk(e,t),scope:e.scope}}var Gk=`__DEVFRAME_CONNECTION_META__`,Kk=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function qk(e){let t=[()=>e,()=>localStorage.getItem(Kk)??void 0,()=>window?.[Kk],()=>globalThis?.[Kk],()=>parent.window?.[Kk]];for(let e of t)try{let t=e();if(t)return t}catch{}}function Jk(e){try{localStorage.setItem(Kk,e)}catch{}globalThis[Kk]=e}function Yk(){let e=[()=>window?.[Gk],()=>globalThis?.[Gk],()=>parent.window?.[Gk]];for(let t of e)try{let e=t();if(e)return e}catch{}}async function Xk(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=mE(),a=Array.isArray(t)?t:[t],o=e.connectionMeta||Yk(),s=a[0]??`./`,c=e.connectionMeta?void 0:o?.baseUrl;function l(){if(c)return c;let e=RD(tO,s);try{return new URL(e,globalThis.location?.href).href}catch{return e}}if(!o){let e=[];for(let t of a)try{o=await fetch(RD(tO,t)).then(e=>e.json()),s=t,globalThis[Gk]={...o,baseUrl:l()};break}catch(t){e.push(t)}if(!o)throw Error(`Failed to get connection meta from ${a.join(`, `)}`,{cause:e})}let u=new fO({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),d={rpc:void 0},f=qk(e.authToken||o.authToken);f&&Jk(f);let p=new pO(d);async function m(e){let t=[s,...a.filter(e=>e!==s)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(RD(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let h=o.backend===`static`?await AO({fetchJsonFromBases:m}):Vk({authToken:f,connectionMeta:o,metaBaseUrl:l(),events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&u?.validate(e.m)){if(u.has(e.m,e.a))return i(u.cached(e.m,e.a));let n=await t(e);u.apply(e,n)}else await t(e)}},wsOptions:e.wsOptions}),g;try{g=new BroadcastChannel(`devframe-auth`)}catch{}let _,v=!1;function y(e){return((...t)=>v||!_?e(...t):_.then(()=>e(...t)))}let b={events:i,get isTrusted(){return h.isTrusted},get status(){return h.status},get connectionError(){return h.connectionError},connectionMeta:o,ensureTrusted:h.ensureTrusted,requestTrust:h.requestTrust,requestTrustWithToken:async e=>(Jk(e),h.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await h.requestTrustWithCode(e);if(!t)return!1;Jk(t);try{g?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},call:y(h.call),callEvent:y(h.callEvent),callOptional:y(h.callOptional),client:p,sharedState:void 0,streaming:void 0,cacheManager:u,scope:void 0};b.sharedState=SO(b),b.streaming=NO(b);let x=new Map;b.scope=(e=>{if(!e)return b;let t=x.get(e);return t||(t=Wk(b,e),x.set(e,t)),t}),d.rpc=b;function S(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function C(){if(!(e.simpleAuth===!1||!S())&&typeof globalThis.prompt==`function`)for(;!b.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await b.requestTrustWithCode(t))return}}async function w(){let t=await h.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await xO(b,{param:n}):!1;t||r||b.isTrusted||await C()}return _=w().then(()=>{v=!0},()=>{v=!0}),g&&(g.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&b.requestTrustWithToken(e.data.authToken)}),b}function Zk(e={}){return Xk({...e,simpleAuth:!1})}var Qk=`https://api.deepseek.com/v1`,$k=`deepseek-chat`,eA=null;function tA(){if(!eA){let e=new Promise((e,t)=>setTimeout(()=>t(Error(`DTK connection timeout — open this page via the Vite DevTools dock shell, not directly.`)),5e3));eA=Promise.race([Zk(),e])}return eA}async function nA(e,...t){return(await tA()).call(e,...t)}function rA(){let e=k(!0),t=k(null),n=k(null),r=k({}),i=k(0),a=null,o=null;function s(e,t){let n={duration:3e3,position:`top-right`};switch(e){case`success`:Cw.success(t,n);break;case`error`:Cw.error(t,n);break;case`warning`:Cw.warning(t,n);break;default:Cw(t,n);break}}async function c(){try{let t=await(await tA()).sharedState.get(`ubean:info`);n.value=t.value(),e.value=!1,o=t.on(`updated`,e=>{n.value=e}),r.value=await nA(`ubean:get-env`),a=setInterval(()=>{n.value&&(i.value=Date.now()-n.value.startTime)},1e3)}catch(n){t.value=n instanceof Error?n.message:`Failed to connect`,e.value=!1}}async function l(){try{r.value=await nA(`ubean:get-env`),n.value||=await nA(`ubean:get-info`)}catch{}}async function u(e,t,n){try{let r=await nA(`ubean:crud:create`,{type:e,path:t,...n});return r.success?(s(`success`,`Created ${e}: ${t}`),await l()):r.errors?.length&&s(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Create failed`;return s(`error`,t),{success:!1,errors:[t]}}}async function d(e,t){try{return await nA(`ubean:crud:read`,{type:e,path:t})}catch(e){return{success:!1,error:e instanceof Error?e.message:`Read failed`}}}async function f(e,t){try{let n=await nA(`ubean:crud:update`,{type:e,...t});return n.success?(s(`success`,`Updated ${e}`),await l()):n.errors?.length&&s(`error`,n.errors[0]),n}catch(e){let t=e instanceof Error?e.message:`Update failed`;return s(`error`,t),{success:!1,errors:[t]}}}async function p(e,t){try{let n=await nA(`ubean:crud:delete`,{type:e,...t});return n.success?(s(`success`,`Deleted ${e}`),await l()):n.errors?.length&&s(`error`,n.errors[0]),n}catch(e){let t=e instanceof Error?e.message:`Delete failed`;return s(`error`,t),{success:!1,errors:[t]}}}async function m(e){try{let t=await nA(`ubean:crud:restore`,e);return t.success?(s(`success`,`Restored: ${e}`),await l()):t.errors?.length&&s(`error`,t.errors[0]),t}catch(e){let t=e instanceof Error?e.message:`Restore failed`;return s(`error`,t),{success:!1,errors:[t]}}}async function h(e,t){try{return await nA(`ubean:ai:chat`,{messages:e,...t})}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI request failed`}`,timestamp:Date.now()}}}}async function g(){try{return await nA(`ubean:ai:tools`)}catch{return[]}}async function _(e,t,n){let r=`stream_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;try{let i=(await(await tA()).sharedState.get(`ubean:ai:stream`)).on(`updated`,e=>{e&&e.requestId===r&&n(e)});try{return await nA(`ubean:ai:chat-stream`,{messages:e,requestId:r,...t})}finally{i()}}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI stream failed`}`,timestamp:Date.now()}}}}async function v(e){try{return await nA(`ubean:terminal:start`,e)}catch(e){return s(`error`,e instanceof Error?e.message:`Terminal start failed`),null}}async function y(e,t){try{return await nA(`ubean:terminal:input`,{sessionId:e,data:t})}catch{return!1}}async function b(e,t,n){try{return await nA(`ubean:terminal:resize`,{sessionId:e,cols:t,rows:n})}catch{return!1}}async function x(e){try{return await nA(`ubean:terminal:poll`,{sessionId:e})}catch{return{data:``,exited:!0,exitCode:-1}}}async function S(e){try{return await nA(`ubean:terminal:kill`,{sessionId:e})}catch{return!1}}function C(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function w(e){return new Date(e).toLocaleTimeString()}function ee(e){return e==null?`—`:typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):typeof e==`string`?e:Array.isArray(e)?`[${e.length} items]`:typeof e==`object`?JSON.stringify(e):String(e)}function te(e){return e?e.split(`/`).pop()||e:``}function ne(e){if(!e)return``;let t=e.split(`/`);return t.length<=5?e:`${t.slice(0,3).join(`/`)}/…/${t.slice(-2).join(`/`)}`}function re(e){return{GET:`bg-success/12 text-success`,POST:`bg-info/12 text-info`,PUT:`bg-warning/12 text-warning`,DELETE:`bg-destructive/12 text-destructive`,PATCH:`bg-purple-500/12 text-purple-400`}[e]||`bg-secondary text-muted-foreground`}return Vr(()=>{c()}),Ur(()=>{o&&o(),a&&clearInterval(a)}),{loading:e,error:t,info:n,env:r,uptime:i,fmtUptime:C,fmtTime:w,fmtVal:ee,fileName:te,filePath:ne,methodClass:re,refresh:l,crudCreate:u,crudRead:d,crudUpdate:f,crudDelete:p,crudRestore:m,aiChat:h,aiChatStream:_,aiGetTools:g,showToast:s,terminalStart:v,terminalInput:y,terminalResize:b,terminalPoll:x,terminalKill:S}}var iA={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},aA={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden animate-scale-in`},oA={class:`flex items-center justify-between px-4 py-3 border-b border-base`},sA={class:`flex items-center gap-2`},cA={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center`},lA={class:`grid grid-cols-5 gap-1.5`},uA=[`onClick`],dA={class:`text-[10px] font-medium`},fA={key:0},pA={class:`flex gap-1.5`},mA=[`onClick`],hA={class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},gA=[`placeholder`],_A={key:0,class:`mt-1 text-[10px] text-muted-foreground`},vA={key:1,class:`mt-1 text-[10px] text-muted-foreground`},yA={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},bA={class:`flex items-center justify-end gap-2 pt-1`},xA=[`disabled`],SA=[`disabled`],CA={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},wA=Tr({__name:`CreateDialog`,props:{open:{type:Boolean},initialType:{},onCreate:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=k(`page`),a=k(``),o=k(`GET`),s=k(!1),c=k(``),l=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],u=[{value:`page`,label:`Page`,icon:`lucide:file-text`,placeholder:`/about`},{value:`api`,label:`API Route`,icon:`lucide:send`,placeholder:`/api/hello`},{value:`middleware`,label:`Middleware`,icon:`lucide:layers`,placeholder:`/auth`},{value:`layout`,label:`Layout`,icon:`lucide:layout`,placeholder:`admin`},{value:`cron`,label:`Cron Job`,icon:`lucide:clock`,placeholder:`daily-cleanup`}],d=L(()=>u.find(e=>e.value===i.value));qn(()=>n.open,e=>{e&&(i.value=n.initialType||`page`,a.value=``,o.value=`GET`,c.value=``)}),qn(i,()=>{c.value=``});function f(){s.value||r(`close`)}async function p(){if(!a.value.trim()){c.value=`Path is required`;return}s.value=!0,c.value=``;try{let e=i.value===`api`?{method:o.value}:void 0,t=await n.onCreate(i.value,a.value.trim(),e);t.success?r(`close`):t.errors?.length&&(c.value=t.errors[0])}catch(e){c.value=e instanceof Error?e.message:`Failed to create resource`}finally{s.value=!1}}return(t,n)=>(M(),wa(sr,{to:`body`},[e.open?(M(),N(`div`,iA,[P(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:f}),P(`div`,aA,[P(`div`,oA,[P(`div`,sA,[P(`div`,cA,[F(j(B),{icon:d.value?.icon||`lucide:plus`,size:15,class:`text-primary`},null,8,[`icon`])]),n[1]||=P(`div`,null,[P(`div`,{class:`text-sm font-semibold text-foreground`},`Create New`),P(`div`,{class:`text-[11px] text-muted-foreground`},`Add a new resource to your project`)],-1)]),P(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:f},[F(j(B),{icon:`lucide:x`,size:14})])]),P(`form`,{class:`p-4 space-y-4`,onSubmit:Cs(p,[`prevent`])},[P(`div`,null,[n[2]||=P(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Resource Type `,-1),P(`div`,lA,[(M(),N(ma,null,Zr(u,e=>P(`button`,{key:e.value,type:`button`,class:D([`flex flex-col items-center gap-1 py-2 px-1 rounded-lg border transition-all cursor-pointer`,i.value===e.value?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>i.value=e.value},[F(j(B),{icon:e.icon,size:16},null,8,[`icon`]),P(`span`,dA,O(e.label),1)],10,uA)),64))])]),i.value===`api`?(M(),N(`div`,fA,[n[3]||=P(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` HTTP Method `,-1),P(`div`,pA,[(M(),N(ma,null,Zr(l,e=>P(`button`,{key:e,type:`button`,class:D([`px-3 py-1.5 rounded-md text-xs font-mono font-semibold border transition-all cursor-pointer`,o.value===e?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>o.value=e},O(e),11,mA)),64))])])):I(``,!0),P(`div`,null,[P(`label`,hA,O(i.value===`cron`?`Name`:`Path`),1),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`text`,placeholder:d.value?.placeholder,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`,onKeydown:Ts(p,[`enter`])},null,40,gA),[[ms,a.value]]),i.value===`layout`?(M(),N(`p`,_A,` Layout name without extension (e.g. "admin" → layouts/admin.vue) `)):i.value===`cron`?(M(),N(`p`,vA,` Cron job file name (e.g. "daily" → server/crons/daily.ts) `)):I(``,!0)]),c.value?(M(),N(`div`,yA,[F(j(B),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Ma(` `+O(c.value),1)])):I(``,!0),P(`div`,bA,[P(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:s.value,onClick:f},` Cancel `,8,xA),P(`button`,{type:`submit`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:s.value||!a.value.trim()},[s.value?(M(),N(`div`,CA)):(M(),wa(j(B),{key:1,icon:`lucide:plus`,size:12})),Ma(` `+O(s.value?`Creating...`:`Create`),1)],8,SA)])],32)])])):I(``,!0)]))}}),TA=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},EA=TA(wA,[[`__scopeId`,`data-v-3cc13f5d`]]),DA=[],OA=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?OA:DA).push(n+=e[t])})();function kA(e){if(e<768)return!1;for(let t=0,n=DA.length;;){let r=t+n>>1;if(e<DA[r])n=r;else if(e>=OA[r])t=r+1;else return!0;if(t==n)return!1}}function AA(e){return e>=127462&&e<=127487}var jA=8205;function MA(e,t,n=!0,r=!0){return(n?NA:PA)(e,t,r)}function NA(e,t,n){if(t==e.length)return t;t&&IA(e.charCodeAt(t))&&LA(e.charCodeAt(t-1))&&t--;let r=FA(e,t);for(t+=RA(r);t<e.length;){let i=FA(e,t);if(r==jA||i==jA||n&&kA(i))t+=RA(i),r=i;else if(AA(i)){let n=0,r=t-2;for(;r>=0&&AA(FA(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function PA(e,t,n){for(;t>1;){let r=NA(e,t-2,n);if(r<t)return r;t--}return 0}function FA(e,t){let n=e.charCodeAt(t);if(!LA(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return IA(r)?(n-55296<<10)+(r-56320)+65536:n}function IA(e){return e>=56320&&e<57344}function LA(e){return e>=55296&&e<56320}function RA(e){return e<65536?1:2}var zA=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=YA(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),VA.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=YA(this,e,t);let n=[];return this.decompose(e,t,n,0),VA.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new GA(this),i=new GA(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new GA(this,e)}iterRange(e,t=this.length){return new KA(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qA(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new BA(t):VA.from(BA.split(t,[]))}},BA=class e extends zA{constructor(e,t=HA(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new JA(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(WA(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=UA(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=YA(this,t,n);let i=UA(this.text,UA(r.text,WA(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):VA.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
329
|
+
`){[e,t]=YA(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},VA=class e extends zA{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=YA(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
330
|
+
`){[e,t]=YA(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new BA(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof BA&&c&&(n=u[u.length-1])instanceof BA&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new BA(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};zA.empty=new BA([``],0);function HA(e){let t=-1;for(let n of e)t+=n.length+1;return t}function UA(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function WA(e,t,n){return UA(e,[``],t,n)}var GA=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof BA?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof BA?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
331
|
+
`,this;e--}else if(r instanceof BA){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof BA?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},KA=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new GA(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},qA=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(zA.prototype[Symbol.iterator]=function(){return this.iter()},GA.prototype[Symbol.iterator]=KA.prototype[Symbol.iterator]=qA.prototype[Symbol.iterator]=function(){return this});var JA=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function YA(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function XA(e,t,n=!0,r=!0){return MA(e,t,n,r)}function ZA(e){return e>=56320&&e<57344}function QA(e){return e>=55296&&e<56320}function $A(e,t){let n=e.charCodeAt(t);if(!QA(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ZA(r)?(n-55296<<10)+(r-56320)+65536:n}function ej(e){return e<65536?1:2}var tj=/\r\n?|\n/,nj=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(nj||={}),rj=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){sj(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:lj(this,e)}mapDesc(e,t=!1){return e.empty?this:cj(this,e,t)}mapPos(e,t=-1,n=nj.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=nj.Simple&&c>=e&&(n==nj.TrackDel&&r<e&&c>e||n==nj.TrackBefore&&r<e||n==nj.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},ij=class e extends rj{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return sj(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return cj(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(zA.empty);r.push(a?t.slice(i,i+a):zA.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:lj(this,e,!0)}map(e,t=!1){return e.empty?this:cj(this,e,t,!0)}iterChanges(e,t=!1){sj(this,e,t)}get desc(){return rj.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new uj(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);aj(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;aj(n,e,t),t>0&&oj(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);aj(n,e,-1),aj(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:rj.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&aj(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?zA.of(l.split(r||tj)):l:zA.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&aj(i,e-o,-1),aj(i,s-e,d),oj(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(zA.empty);r[e]=zA.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function aj(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function oj(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(zA.empty);e.push(n)}}function sj(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=zA.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function cj(e,t,n,r=!1){let i=[],a=r?[]:null,o=new uj(e),s=new uj(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);aj(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(aj(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(aj(i,0,o.ins),a&&oj(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;aj(i,t,e<o.i?o.ins:0),a&&e<o.i&&oj(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?ij.createSet(i,a):rj.create(i);else throw Error(`Mismatched change set lengths`)}function lj(e,t,n=!1){let r=[],i=n?[]:null,a=new uj(e),o=new uj(t);for(let e=!1;;)if(a.done&&o.done)return i?ij.createSet(r,i):rj.create(r);else if(a.ins==0)aj(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)aj(r,0,o.ins,e),i&&oj(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;aj(r,t,n,e),i&&n&&oj(i,r,o.text)}else o.ins==-1?(aj(r,a.off?0:a.len,t,e),i&&oj(i,r,a.textBit(t))):(aj(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&oj(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var uj=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?zA.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?zA.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},dj=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return K.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return K.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return K.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},K=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>dj.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return dj.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?dj.create(t,e,a|32,n):dj.create(e,t,a,n)}static undirectionalRange(e,t){return dj.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function fj(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var pj=0,q=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=pj++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:mj),!!t.static,t.enables)}of(e){return new hj([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new hj(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new hj(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function mj(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var hj=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=pj++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||_j(e,c)){let r=t(e);if(a?!gj(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Aj(o,c);if(this.dependencies.every(t=>t instanceof q?o.facet(t)===e.facet(t):t instanceof bj?o.field(t,!1)==e.field(t,!1):!0)||(a?gj(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function gj(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function _j(e,t){let n=!1;for(let r of t)kj(e,r)&1&&(n=!0);return n}function vj(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Aj(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)kj(e,t);return e.values[o]=s(e),1},update(e,n){if(!_j(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=_j(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&mj(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var yj=q.define({static:!0}),bj=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(pj++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(yj).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(yj),i=n.facet(yj),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,yj.of({field:this,create:e})]}get extension(){return this}},xj={lowest:4,low:3,default:2,high:1,highest:0};function Sj(e){return t=>new wj(t,e)}var Cj={highest:Sj(xj.highest),high:Sj(xj.high),default:Sj(xj.default),low:Sj(xj.low),lowest:Sj(xj.lowest)},wj=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},Tj=class e{of(e){return new Ej(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Ej=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},Dj=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Oj(t,n,o))e instanceof bj?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,mj(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>vj(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function Oj(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Ej&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Ej){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof wj)a(e.inner,e.prec);else if(e instanceof bj)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof hj)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,xj.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,xj.default),r.reduce((e,t)=>e.concat(t))}function kj(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Aj(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var jj=q.define(),Mj=q.define({combine:e=>e.some(e=>e),static:!0}),Nj=q.define({combine:e=>e.length?e[0]:void 0,static:!0}),Pj=q.define(),Fj=q.define(),Ij=q.define(),Lj=q.define({combine:e=>e.length?e[0]:!1}),Rj=class{constructor(e,t){this.type=e,this.value=t}static define(){return new zj}},zj=class{of(e){return new Rj(this,e)}},Bj=class{constructor(e){this.map=e}of(e){return new Vj(this,e)}},Vj=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Bj(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Vj.reconfigure=Vj.define(),Vj.appendConfig=Vj.define();var Hj=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&fj(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};Hj.time=Rj.define(),Hj.userEvent=Rj.define(),Hj.addToHistory=Rj.define(),Hj.remote=Rj.define();function Uj(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Wj(e,t,n){let r,i,a;return n?(r=t.changes,i=ij.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Vj.mapEffects(e.effects,r).concat(Vj.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Gj(e,t,n){let r=t.selection,i=Xj(t.annotations);return t.userEvent&&(i=i.concat(Hj.userEvent.of(t.userEvent))),{changes:t.changes instanceof ij?t.changes:ij.of(t.changes||[],n,e.facet(Nj)),selection:r&&(r instanceof K?r:K.single(r.anchor,r.head)),effects:Xj(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Kj(e,t,n){let r=Gj(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=Wj(r,Gj(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=Hj.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Jj(n?qj(i):i)}function qj(e){let t=e.startState,n=!0;for(let r of t.facet(Pj)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:Uj(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=ij.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Hj.create(t,r,e.selection&&e.selection.map(i),Vj.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Fj);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Hj?i:Array.isArray(i)&&i.length==1&&i[0]instanceof Hj?i[0]:Kj(t,Xj(i),!1)}return e}function Jj(e){let t=e.startState,n=t.facet(Ij),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=Wj(r,Gj(t,a,e.changes.newLength),!0))}return r==e?e:Hj.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Yj=[];function Xj(e){return e==null?Yj:Array.isArray(e)?e:[e]}var Zj=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(Zj||={}),Qj=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,$j;try{$j=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function eM(e){if($j)return $j.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||Qj.test(n)))return!0}return!1}function tM(e){return t=>{if(!/\S/.test(t))return Zj.Space;if(eM(t))return Zj.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Zj.Word;return Zj.Other}}var nM=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)kj(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return kj(this,n),Aj(this,n)}update(...e){return Kj(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Tj.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Vj.reconfigure)?(n=null,r=e.value):e.is(Vj.appendConfig)&&(n=null,r=Xj(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=Dj.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Mj)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:K.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Xj(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Vj.mapEffects(a,c).concat(Vj.mapEffects(Xj(o.effects),l))}return{changes:r,selection:K.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof ij?t:ij.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return zA.of(t.split(this.facet(e.lineSeparator)||tj))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(kj(this,t),Aj(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof bj&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:K.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=Dj.resolve(t.extensions||[],new Map),r=t.doc instanceof zA?t.doc:zA.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||tj)),i=t.selection?t.selection instanceof K?t.selection:K.single(t.selection.anchor,t.selection.head):K.single(0);return fj(i,r.length),n.staticFacet(Mj)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
|
332
|
+
`}get readOnly(){return this.facet(Lj)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(jj))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return tM(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=XA(t,a,!1);if(i(t.slice(e,a))!=Zj.Word)break;a=e}for(;o<r;){let e=XA(t,o);if(i(t.slice(o,e))!=Zj.Word)break;o=e}return a==o?null:K.range(a+n,o+n)}};nM.allowMultipleSelections=Mj,nM.tabSize=q.define({combine:e=>e.length?e[0]:4}),nM.lineSeparator=Nj,nM.readOnly=Lj,nM.phrases=q.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),nM.languageData=jj,nM.changeFilter=Pj,nM.transactionFilter=Fj,nM.transactionExtender=Ij,Tj.reconfigure=Vj.define();function rM(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0)if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var iM=class{eq(e){return this==e}range(e,t=e){return oM.create(e,t,this)}};iM.prototype.startSide=iM.prototype.endSide=0,iM.prototype.point=!1,iM.prototype.mapMode=nj.TrackDel;function aM(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var oM=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function sM(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var cM=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},lM=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(sM)),this.isEmpty)return n.length?e.of(n):this;let s=new pM(this,null,-1).goto(0),c=0,l=[],u=new dM;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(oM.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return mM.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return mM.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=fM(a,o,n),c=new gM(a,s,i),l=new gM(o,s,i);n.iterGaps((e,t,n)=>_M(c,e,l,t,n,r)),n.empty&&n.length==0&&_M(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=999999999;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=fM(i,a),s=new gM(i,o,0).goto(n),c=new gM(a,o,0).goto(n);for(;;){if(s.to!=c.to||!vM(s.active,c.active)||s.point&&(!c.point||!aM(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new gM(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new dM;for(let r of e instanceof oM?[e]:t?uM(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};lM.empty=new lM([],[],null,-1);function uM(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(sM(t,r)>0)return e.slice().sort(sM);t=r}return e}lM.empty.nextLayer=lM.empty;var dM=class e{finishChunk(e){this.chunks.push(new cM(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||=new e).add(t,n,r)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(lM.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=lM.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function fM(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var pM=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},mM=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new pM(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)hM(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)hM(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),hM(this.heap,0)}}};function hM(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var gM=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=mM.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){yM(this.active,e),yM(this.activeTo,e),yM(this.activeRank,e),this.minActive=xM(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;bM(this.active,t,n),bM(this.activeTo,t,r),bM(this.activeRank,t,i),e&&bM(e,t,this.cursor.from),this.minActive=xM(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&yM(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function _M(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&aM(e.point,n.point)&&vM(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!vM(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function vM(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!aM(e[n],t[n]))return!1;return!0}function yM(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function bM(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function xM(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function SM(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=XA(e,i));return r}function CM(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=XA(e,r)}return r===!0?-1:e.length}for(var wM=`ͼ`,TM=typeof Symbol>`u`?`__ͼ`:Symbol.for(wM),EM=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),DM=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},OM=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
|
|
333
|
+
`)}static newName(){let e=DM[TM]||1;return DM[TM]=e+1,wM+e.toString(36)}static mount(e,t,n){let r=e[EM],i=n&&n.nonce;r?i&&r.setNonce(i):r=new AM(e,i),r.mount(Array.isArray(t)?t:[t],e)}},kM=new Map,AM=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=kM.get(n);if(t)return e[EM]=t;this.sheet=new r.CSSStyleSheet,kM.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[EM]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
|
334
|
+
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},jM={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},MM={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},NM=typeof navigator<`u`&&/Mac/.test(navigator.platform),PM=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),FM=0;FM<10;FM++)jM[48+FM]=jM[96+FM]=String(FM);for(var FM=1;FM<=24;FM++)jM[FM+111]=`F`+FM;for(var FM=65;FM<=90;FM++)jM[FM]=String.fromCharCode(FM+32),MM[FM]=String.fromCharCode(FM);for(var IM in jM)MM.hasOwnProperty(IM)||(MM[IM]=jM[IM]);function LM(e){var t=!(NM&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||PM&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?MM:jM)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var RM=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},zM=typeof document<`u`?document:{documentElement:{style:{}}},BM=/Edge\/(\d+)/.exec(RM.userAgent),VM=/MSIE \d/.test(RM.userAgent),HM=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(RM.userAgent),UM=!!(VM||HM||BM),WM=!UM&&/gecko\/(\d+)/i.test(RM.userAgent),GM=!UM&&/Chrome\/(\d+)/.exec(RM.userAgent),KM=`webkitFontSmoothing`in zM.documentElement.style,qM=!UM&&/Apple Computer/.test(RM.vendor),JM=qM&&(/Mobile\/\w+/.test(RM.userAgent)||RM.maxTouchPoints>2),YM={mac:JM||/Mac/.test(RM.platform),windows:/Win/.test(RM.platform),linux:/Linux|X11/.test(RM.platform),ie:UM,ie_version:VM?zM.documentMode||6:HM?+HM[1]:BM?+BM[1]:0,gecko:WM,gecko_version:WM?+(/Firefox\/(\d+)/.exec(RM.userAgent)||[0,0])[1]:0,chrome:!!GM,chrome_version:GM?+GM[1]:0,ios:JM,android:/Android\b/.test(RM.userAgent),webkit:KM,webkit_version:KM?+(/\bAppleWebKit\/(\d+)/.exec(RM.userAgent)||[0,0])[1]:0,safari:qM,safari_version:qM?+(/\bVersion\/(\d+(\.\d+)?)/.exec(RM.userAgent)||[0,0])[1]:0,tabSize:zM.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function XM(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var ZM=Object.create(null);function QM(e,t,n){if(e==t)return!0;e||=ZM,t||=ZM;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function $M(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function eN(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function tN(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var nN=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},rN=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(rN||={}),iN=class extends iM{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new aN(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new sN(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=cN(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new sN(e,n,r,t,e.widget||null,!0)}static line(e){return new oN(e)}static set(e,t=!1){return lM.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};iN.none=lM.empty;var aN=class e extends iN{constructor(e){let{start:t,end:n}=cN(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?XM(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||ZM}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&QM(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};aN.prototype.point=!1;var oN=class e extends iN{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&QM(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};oN.prototype.mapMode=nj.TrackBefore,oN.prototype.point=!0;var sN=class e extends iN{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?nj.TrackBefore:nj.TrackAfter:nj.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?rN.WidgetBefore:rN.WidgetAfter:rN.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&lN(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};sN.prototype.point=!0;function cN(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function lN(e,t){return e==t||!!(e&&t&&e.compare(t))}function uN(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var dN=class e extends iM{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&QM(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||ZM,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return lM.of(e,t)}};dN.prototype.startSide=dN.prototype.endSide=-1;function fN(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function pN(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function mN(e,t){if(!t.anchorNode)return!1;try{return pN(e,t.anchorNode)}catch{return!1}}function hN(e){return e.nodeType==3?AN(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function gN(e,t,n,r){return n?yN(e,t,n,r,-1)||yN(e,t,n,r,1):!1}function _N(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function vN(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function yN(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:bN(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=_N(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?bN(e):0}else return!1}}function bN(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function xN(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function SN(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function CN(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function wN(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=SN(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=CN(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function TN(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var EN=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?bN(t):0),n,Math.min(e.focusOffset,n?bN(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},DN=null;YM.safari&&YM.safari_version>=26&&(DN=!1);function ON(e){if(e.setActive)return e.setActive();if(DN)return e.focus(DN);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(DN==null?{get preventScroll(){return DN={preventScroll:!0},!0}}:void 0),!DN){DN=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}var kN;function AN(e,t,n=t){let r=kN||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function jN(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function MN(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function NN(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,bN(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=bN(n))}else if(n==e)return!0;else r=_N(n),n=n.parentNode}function PN(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function FN(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=bN(n)}else if(n.parentNode&&!vN(n))r=_N(n),n=n.parentNode;else return null}function IN(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!vN(n))r=_N(n)+1,n=n.parentNode;else return null}var LN=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,_N(t),n)}static after(t,n){return new e(t.parentNode,_N(t)+1,n)}},RN=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(RN||={}),zN=RN.LTR,BN=RN.RTL;function VN(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var HN=VN(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),UN=VN(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),WN=Object.create(null),GN=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);WN[t]=n,WN[n]=-t}function KN(e){return e<=247?HN[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?UN[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var qN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,JN=class{get dir(){return this.level%2?BN:zN}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function YN(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!YN(r.inner,i.inner))return!1}return!0}var XN=[];function ZN(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=KN(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),XN[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=XN[e];if(i==128)e<s-1&&t==XN[e+1]&&t&24?i=XN[e]=t:XN[e]=256;else if(i==64){let i=e+1;for(;i<s&&XN[i]==64;)i++;let a=e&&t==8||i<n&&XN[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)XN[t]=a;e=i-1}else i==8&&r==1&&(XN[e]=1);t=i,i&7&&(r=i)}}}function QN(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=WN[n=e.charCodeAt(t)])if(r<0){for(let e=s-3;e>=0;e-=3)if(GN[e+1]==-r){let n=GN[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(XN[t]=XN[GN[e]]=r),s=e;break}}else if(GN.length==189)break;else GN[s++]=t,GN[s++]=n,GN[s++]=c;else if((o=XN[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=GN[t+2];if(n&2)break;if(e)GN[t+2]|=2;else{if(n&4)break;GN[t+2]|=4}}}}}function $N(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=XN[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(XN[o]==256)o++;else break;let l=a==1,u=l==((o<t?XN[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),XN[--t]=u;c=o}else a=o,c++}}}function eP(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=XN[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(XN[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new JN(c,m.from,f)),tP(e,m.direction==zN==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?XN[p]!=s:XN[p]==s))break;else p++;d?eP(e,c,p,r+1,i,d,o):c<p&&o.push(new JN(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=XN[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(XN[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new JN(m.to,c,f)),tP(e,m.direction==zN==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?XN[p-1]!=s:XN[p-1]==s))break;else p--;d?eP(e,p,c,r+1,i,d,o):p<c&&o.push(new JN(p,c,f)),c=p}}function tP(e,t,n,r,i,a,o){let s=t%2?2:1;ZN(e,i,a,r,s),QN(e,i,a,r,s),$N(i,a,r,s),eP(e,i,a,t,n,r,o)}function nP(e,t,n){if(!e)return[new JN(0,0,+(t==BN))];if(t==zN&&!n.length&&!qN.test(e))return rP(e.length);if(n.length)for(;e.length>XN.length;)XN[XN.length]=256;let r=[],i=t==zN?0:1;return tP(e,i,i,n,0,e.length,r),r}function rP(e){return[new JN(0,e,0)]}var iP=``;function aP(e,t,n,r,i){let a=r.head-e.from,o=JN.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=XA(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),iP=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?K.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):K.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function oP(e,t,n){for(let r=t;r<n;r++){let t=KN(e.charCodeAt(r));if(t==1)return zN;if(t==2||t==4)return BN}return zN}var sP=q.define(),cP=q.define(),lP=q.define(),uP=q.define(),dP=q.define(),fP=q.define(),pP=q.define(),mP=q.define(),hP=q.define(),gP=q.define({combine:e=>e.some(e=>e)}),_P=q.define({combine:e=>e.some(e=>e)}),vP=q.define(),yP=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(K.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},bP=Vj.define({map:(e,t)=>e.map(t)}),xP=Vj.define();function SP(e,t,n){let r=e.facet(uP);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var CP=q.define({combine:e=>!e.length||e[0]}),wP=0,TP=q.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),EP=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(TP.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(TP.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(wP++,t,r,i,e=>{let t=[];return o&&t.push(AP.of(t=>{let n=t.plugin(e);return n?o(n):iN.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},DP=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){SP(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(SP(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){SP(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},OP=q.define(),kP=q.define(),AP=q.define(),jP=q.define(),MP=q.define(),NP=q.define(),PP=q.define();function FP(e,t){let n=e.state.facet(PP);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return lM.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=oP(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var IP=q.define();function LP(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(IP)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var RP=q.define(),zP=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},BP=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=ij.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new zP(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},VP=[],HP=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return VP}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&$M(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=_N(this.dom),r=this.length?e>0:t>0;return new LN(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof GP)return e;return null}static get(e){return e.cmTile}},UP=class extends HP{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=WP(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=WP(r);this.length=a}};function WP(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var GP=class extends UP{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=HP.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof KP)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},KP=class e extends UP{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},qP=class e extends UP{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0&&!(a.flags&32)||n&&YP(a,d)))&&(f>c||d.flags&32)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):JP(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new LN(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new LN(e.dom,0);e==n.tile&&(a=!0)}}return new LN(this.dom,0)}};function JP(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=hN(t);return n[n.length-1]||null}function YP(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var XP=class e extends UP{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},ZP=class e extends HP{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?YM.chrome||YM.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=AN(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return YM.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:xN(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},QP=class e extends HP{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return xN(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return xN(n,!r)}}get overrideDOMText(){if(!this.length)return zA.empty;let{root:e}=this;if(!e)return zA.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},$P=class extends HP{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return zA.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:xN(r,t>0==n)}},eF=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite())if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(e){let t=Math.min(e,r.length-i);n&&n.skip(r,i,i+t),e-=t,i+=t}else break;else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},tF=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},nF=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new ZP(a.dom,a.text+e);t.parent=i}else i.append(r||ZP.of(e,this.cache.find(ZP)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?fF(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof XP&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(fF(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=HP.get(n.dom);e&&e.setDOM(fF(n.dom))}let e=XP.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=HP.get(e.text);i&&this.cache.reused.set(i,2);let a=new ZP(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=lF;let n=qP.start(e,t||this.cache.find(qP)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof XP&&a.mark.eq(i))n=a,t--;else{let e=XP.of(i,this.cache.find(XP,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!sF(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(YM.ios&&sF(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(mF,0,32)||new QP(mF.toDOM(),0,mF,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new tF(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof KP&&n.wrapper.eq(t.wrapper))e=n;else{let n=KP.of(t.wrapper,this.cache.find(KP,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find($P,void 0,1);return n&&(n.flags=t),n||new $P(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},rF=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},iF=[QP,qP,ZP,XP,$P,KP,GP];for(let e=0;e<iF.length;e++)iF[e].bucket=e;var aF=class{constructor(e){this.view=e,this.buckets=iF.map(()=>[]),this.index=iF.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new QP(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},oF=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new aF(e),this.text=new rF(e.state.doc),this.builder=new nF(this.cache,new GP(e,e.contentDOM),lM.iter(n)),this.cache.reused.set(t,2),this.old=new eF(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=dF(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?QP.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof $P)this.cache.add(e);else if(e instanceof XP)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof XP&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof XP&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=lM.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof sN){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?pF.block:pF.inline),c=cF(a),l=this.cache.findWidget(i,t-e,c)||QP.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=uF(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=HP.get(r);if(r==this.view.contentDOM)break;e instanceof XP?t.push(e):e?.isLine()?n=e:e instanceof KP||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new qP(r,lF):n||t.push(XP.of(new aN({tagName:r.nodeName.toLowerCase(),attributes:tN(r)}),r)))}return{line:n,marks:t}}};function sF(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function cF(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var lF={class:`cm-line`};function uF(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&XM(n,e),r&&(e.class+=` `+r),e)}function dF(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof XP&&t.push(r.mark)}return t}function fF(e){let t=HP.get(e);return t&&t.setDOM(e.cloneNode()),e}var pF=class extends nN{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};pF.inline=new pF(`span`),pF.block=new pF(`div`);var mF=new class extends nN{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},hF=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=iN.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new GP(e,e.contentDOM),this.updateInner([new zP(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!EF(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?yF(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new zP(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(YM.ie||YM.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=SF(i,this.decorations,e.changes);o.length&&(t=zP.extendWithRanges(t,o));let s=wF(a,this.blockWrappers,e.changes);return s.length&&(t=zP.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new oF(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&HP.get(t.text)&&r.cache.reused.set(HP.get(t.text),2),this.tile=r.run(e,t),gF(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=YM.chrome||YM.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof DF&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(xP)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(CP)||n.tabIndex>-1)&&mN(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),YM.gecko&&s.empty&&!this.hasComposition&&_F(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new LN(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!gN(c.node,c.offset,u.anchorNode,u.anchorOffset)||!gN(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{YM.android&&YM.chrome&&n.contains(u.focusNode)&&TF(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=fN(this.view.root);if(e)if(s.empty){if(YM.gecko){let e=bF(c.node,c.offset);if(e&&e!=3){let t=(e==1?FN:IN)(c.node,c.offset);t&&(c=new LN(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new LN(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new LN(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&gN(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=fN(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=bN(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!HP.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof DF?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=XA(e.text,t);if(n==t)return null;let r=AN(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==RN.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof KP)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?hN(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?RN.RTL:RN.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=hN(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=hN(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(iN.replace({widget:new DF(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return iN.set(e)}updateDeco(){let e=1,t=this.view.state.facet(AP).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(MP).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(lM.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(jP).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(vP))try{if(t(this.view,e.range,e))return!0}catch(e){SP(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=LP(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(wN(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==RN.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);e&&e.dom.scrollIntoView({block:`nearest`})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){gF(this.tile)}};function gF(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)gF(n,t)}}function _F(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function vF(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=FN(n.focusNode,n.focusOffset),i=IN(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=HP.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=HP.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function yF(e,t,n){let r=vF(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new zP(c.mapPos(a),c.mapPos(o),a,o),text:i}}function bF(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var xF=class{constructor(){this.changes=[]}compareRange(e,t){uN(e,t,this.changes)}comparePoint(e,t){uN(e,t,this.changes)}boundChange(e){uN(e,e,this.changes)}};function SF(e,t,n){let r=new xF;return lM.compare(e,t,n,r),r.changes}var CF=class{constructor(){this.changes=[]}compareRange(e,t){uN(e,t,this.changes)}comparePoint(){}boundChange(e){uN(e,e,this.changes)}};function wF(e,t,n){let r=new CF;return lM.compare(e,t,n,r),r.changes}function TF(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function EF(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var DF=class extends nN{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function OF(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return K.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=XA(i.text,a,!1):s=XA(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=XA(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=XA(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return K.undirectionalRange(o+i.from,s+i.from)}function kF(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+CM(o,a,e.state.tabSize)}function AF(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==rN.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function jF(e,t,n,r){let i=AF(e,t.head,t.assoc||-1),a=!r||i.type!=rN.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==RN.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return K.cursor(o,n?-1:1)}return K.cursor(n?i.to:i.from,n?-1:1)}function MF(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=aP(i,a,o,s,n),l=iP;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
|
335
|
+
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function NF(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==Zj.Space&&(i=t),i==t}}function PF(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return K.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=zF(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return K.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return K.cursor(i.pos,i.assoc,void 0,o)}}function FF(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function IF(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=FF(e,i.from,0);t!=i.from&&(a=K.cursor(t,-1))}else{let t=FF(e,i.from,-1),n=FF(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?K.undirectionalRange(i.from,i.to):K.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?K.create(n,t.mainIndex):t}function LF(e,t,n){let r=FF(e.state.facet(NP).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:K.cursor(r,r<n.from?1:-1)}var RF=class{constructor(e,t){this.pos=e,this.assoc=t}};function zF(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new RF(0,1);if(c>e.viewState.docHeight)return new RF(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==rN.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==rN.Text){let t=kF(e,i,l,o,s);return new RF(t,t==l.from?1:-1)}}if(l.type!=rN.Text)return c<(l.top+l.bottom)/2?new RF(l.from,1):new RF(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new BF(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var BF=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[JN.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[JN.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){let e=r+Math.floor(Math.random()*n);for(let t=0;t<n;t++){if(!a.has(e)){f=e;break adjust}e++,e==i&&(e=r)}break search}a.add(f);let p=t(f);if(p)for(let t=0;t<p.length;t++){let n=p[t],a=0;if(!(n.width==0&&p.length>1)){if(n.bottom<this.y)(!s||s.bottom<n.bottom)&&(s=n),a=1;else if(n.top>this.y)(!c||c.top>n.top)&&(c=n),a=-1;else{let e=n.left>this.x?this.x-n.left:n.right<this.x?this.x-n.right:0,t=Math.abs(e);t<u&&(l=f,u=t,d=n),e&&(a=e<0==(this.baseDir==RN.LTR)?-1:1)}a==-1&&(!o||this.baseDirAt(e[f],1))?i=f:a==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}}}if(!d){if(!c&&!s)return{i:e[0],after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==RN.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=XA(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return AN(e.dom,i,a).getClientRects()});return r.after?new RF(n[r.i+1],-1):new RF(n[r.i],1)}scanTile(e,t){if(!e.length)return new RF(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:AN(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new RF(n[r.i+1],-1):new RF(a,1)}},VF=``,HF=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(nM.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=VF}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=HP.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=HP.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:vN(r))||vN(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!WF(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=HP.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(UF(e,n.node,n.offset)?t:0))}};function UF(e,t,n){for(;;){if(!t||n<bN(t))return!1;if(t==e)return!0;n=_N(t)+1,t=t.parentNode}}function WF(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=HP.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var GF=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},KF=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=qF(e.docView.tile,t,n,0))){let t=i||a?[]:QF(e),n=new HF(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=$F(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!pN(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!pN(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((YM.ios||YM.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(K.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=K.create([K.cursor(n,r)])}else this.newSel=K.single(r,n)}}};function qF(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return qF(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}else if(e.isText())return{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling};else return null}function JF(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||YM.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,VF),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:zA.of(t.text.slice(a.from-e,u).split(VF))}:(d=ZF(l,t.text,s-e,c))&&(YM.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==``&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:zA.of(t.text.slice(d.from,d.toB).split(VF))})}else r&&(!e.hasFocus&&i.facet(CP)||eI(r,a))&&(r=null);if(!n&&!r)return!1;if((YM.mac||YM.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=K.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:zA.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:YM.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
336
|
+
`&&e.lineWrapping&&(r&&=K.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:zA.of([` `])}),n)return YF(e,n,r,o);if(r&&!eI(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=IF(i.facet(NP).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function YF(e,t,n,r=-1){if(YM.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(YM.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&jN(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&jN(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&jN(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=XF(e,t,n);return e.state.facet(fP).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function XF(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=FF(i.facet(NP).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:K.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&vF(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?K.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function ZF(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function QF(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new GF(n,r)),(i!=n||a!=r)&&t.push(new GF(i,a))),t}function $F(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?K.single(n+t,r+t):null}function eI(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var tI=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,YM.safari&&e.contentDOM.addEventListener(`input`,()=>null),YM.gecko&&RI(e.contentDOM.ownerDocument)}handleEvent(e){!hI(this.view,e)||this.ignoreDuringComposition(e)||e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=iI(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&sI.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),YM.android&&YM.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(YM.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(aI.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||oI.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return t.shiftKey&&YM.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&nI(this.view.win)&&(t.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t},setTimeout(()=>this.flushIOSKey(),250),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,jN(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:YM.safari&&!YM.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function nI(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function rI(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){SP(n.state,e)}}}function iI(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(rI(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(rI(t.value,r))}}for(let e in gI)n(e).handlers.push(gI[e]);for(let e in _I)n(e).observers.push(_I[e]);return t}var aI=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],oI=`dthko`,sI=[16,17,18,20,91,92,224,225],cI=6;function lI(e){return Math.max(0,e)*.7+8}function uI(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var dI=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=TN(e.contentDOM),this.atoms=e.state.facet(NP).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(nM.allowMultipleSelections)&&fI(e,t),this.dragging=mI(e,t)&&DI(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&uI(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=LP(this.view);e.clientX-s.left<=r+cI?t=-lI(r-e.clientX):e.clientX+s.right>=a-cI&&(t=lI(e.clientX-a)),e.clientY-s.top<=i+cI?n=-lI(i-e.clientY):e.clientY+s.bottom>=o-cI&&(n=lI(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=IF(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function fI(e,t){let n=e.state.facet(sP);return n.length?n[0](t):YM.mac?t.metaKey:t.ctrlKey}function pI(e,t){let n=e.state.facet(cP);return n.length?n[0](t):YM.mac?!t.altKey:!t.ctrlKey}function mI(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=fN(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function hI(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=HP.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var gI=Object.create(null),_I=Object.create(null),vI=YM.ie&&YM.ie_version<15||YM.ios&&YM.webkit_version<604;function yI(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),xI(e,n.value)},50)}function bI(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function xI(e,t){t=bI(e.state,mP,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(NI!=null&&n.selection.ranges.every(e=>e.empty)&&NI==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:K.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:K.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}_I.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,YM.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},_I.wheel=_I.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},gI.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),_I.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},_I.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},_I.touchend=(e,t)=>{e.inputState.touchActive=!1},gI.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(lP))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=OI(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new dI(e,t,n,r)),r&&e.observer.ignore(()=>{ON(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function SI(e,t,n,r){if(r==1)return K.cursor(t,n);if(r==2)return OF(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,K.undirectionalRange(a,o)}}var CI=YM.ie&&YM.ie_version<=11,wI=null,TI=0,EI=0;function DI(e){if(!CI)return e.detail;let t=wI,n=EI;return wI=e,EI=Date.now(),TI=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(TI+1)%3:1}function OI(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=DI(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=SI(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=SI(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?K.range(i,a,l.assoc):K.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=kI(i,s.pos))?c:o?i.addRange(l):K.create([l])}}}function kI(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return K.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}gI.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=K.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,bI(e.state,hP,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},gI.dragend=e=>(e.inputState.draggedContent=null,!1);function AI(e,t,n,r){if(n=bI(e.state,mP,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&pI(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}gI.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&AI(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}else{let n=t.dataTransfer.getData(`Text`);if(n)return AI(e,t,n,!0),!0}return!1},gI.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=vI?null:t.clipboardData;return n?(xI(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(yI(e),!1)};function jI(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function MI(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:bI(e,hP,t.join(e.lineBreak)),ranges:n,linewise:r}}var NI=null;gI.copy=gI.cut=(e,t)=>{if(!mN(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=MI(e.state);if(!n&&!i)return!1;NI=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=vI?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(jI(e,n),!1)};var PI=Rj.define();function FI(e,t){let n=[];for(let r of e.facet(pP)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:PI.of(!0)}):null}function II(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=FI(e.state,t);n?e.dispatch(n):e.update([])}},10)}_I.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),II(e)},_I.blur=e=>{e.observer.clearSelectionRange(),II(e)},_I.compositionstart=_I.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},_I.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,YM.chrome&&YM.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},_I.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},gI.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return YF(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(YM.chrome&&YM.android&&(n=aI.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return YM.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),YM.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>_I.compositionend(e,t),20),!1};var LI=new Set;function RI(e){LI.has(e)||(LI.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var zI=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],BI=!1;function VI(){BI=!1}var HI=class{constructor(e){this.lineWrapping=e,this.doc=zA.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return zI.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=zI.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},UI=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},WI=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?rN.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof sN?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},GI=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(GI||={}),KI=.001,qI=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>KI&&(BI=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,GI.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,GI.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,GI.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=nL.build(n.setDoc(a),e,l,u);i=JI(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new ZI(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break;else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new $I(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function JI(e,t){return e==t?e:(e.constructor!=t.constructor&&(BI=!0),t)}qI.prototype.size=1;var YI=iN.replace({}),XI=class extends qI{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new WI(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new WI(r,0,n,this.spaceAbove,YI):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,GI.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},ZI=class e extends XI{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new WI(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof QI&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof QI?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):qI.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},QI=class e extends qI{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new WI(a.from,a.length,l,c,0)}else{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new WI(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==GI.ByHeight)return this.blockAt(e,n,r,i);if(t==GI.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new WI(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new WI(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new WI(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return qI.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=KI&&(s=-2);let c=new ZI(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=qI.of(r);return(s<0||Math.abs(c.height-this.height)>=KI||Math.abs(s-this.heightMetrics(t,n).perLine)>=KI)&&(BI=!0),JI(this,c)}else(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},$I=class extends qI{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==GI.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==GI.ByPosNoHeight?GI.ByPosNoHeight:GI.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,GI.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&eL(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),eL(i,e)}return qI.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?qI.of(this.break?[e,null,t]:[e,t]):(this.left=JI(this.left,e),this.right=JI(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function eL(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof QI&&(r=e[t+1])instanceof QI&&e.splice(t-1,3,new QI(n.length+1+r.length))}var tL=5,nL=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof ZI?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new ZI(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new XI(a,r,n)):(a||i||r>=tL)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new ZI(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new QI(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ZI)return e;let t=new ZI(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof ZI)&&!this.isCovered?this.nodes.push(new ZI(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof ZI&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return lM.spans(n,r,i,a,0),a.finish(r)}};function rL(e,t,n){let r=new iL;return lM.compare(e,t,n,r,0),r.changes}var iL=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&uN(e,t,this.changes,5)}};function aL(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function oL(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function sL(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var cL=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return iN.replace({widget:new lL(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},lL=class extends nN{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},uL=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=gL,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=RN.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(kP).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new HI(n),this.stateDeco=_L(t),this.heightMap=qI.empty().applyChanges(this.stateDeco,zA.empty,this.heightOracle.setDoc(t.doc),[new zP(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=iN.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new dL(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?gL:new vL(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(yL(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=_L(this.state);let r=e.changedRanges,i=zP.extendWithRanges(r,rL(n,this.stateDeco,e?e.changes:ij.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);VI(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||BI)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(_P)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?RN.RTL:RN.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=CN(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=TN(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=PN(this.scrollParent||e.win);let m=(this.printing?sL:aL)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!oL(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),VI();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?qI.empty().applyChanges(this.stateDeco,zA.empty,this.heightOracle,[new zP(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new UI(n.from,i))}BI&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new dL(r.lineAt(a-n*1e3,GI.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,GI.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,GI.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new dL(r.lineAt(o-1e3/2,GI.ByHeight,i,0,0).from,r.lineAt(o+n+1e3/2,GI.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new dL(this.heightMap.lineAt(n,GI.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,GI.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,GI.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,GI.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new cL(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=RN.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=hL(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(K.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new cL(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=rN.Text)return;let i=fL(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=mL(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=pL(i,n),l=pL(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=mL(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=pL(i,f),l=pL(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=mL(r,n)-mL(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){cL.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=iN.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];lM.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||yL(this.heightMap.lineAt(e,GI.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||yL(this.heightMap.lineAt(this.scaler.fromDOM(e),GI.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return yL(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},dL=class{constructor(e,t){this.from=e,this.to=t}};function fL(e,t,n){let r=[],i=e,a=0;return lM.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function pL({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function mL(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function hL(e,t){for(let n of e)if(t(n))return n}var gL={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function _L(e){let t=e.facet(AP).filter(e=>typeof e!=`function`),n=e.facet(MP).filter(e=>typeof e!=`function`);return n.length&&t.push(lM.join(n)),t}var vL=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,GI.ByPos,e,0,0).top,o=t.lineAt(i,GI.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function yL(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new WI(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>yL(e,t)):e._content)}var bL=q.define({combine:e=>e.join(` `)}),xL=q.define({combine:e=>e.indexOf(!0)>-1}),SL=OM.newName(),CL=OM.newName(),wL=OM.newName(),TL={"&light":`.`+CL,"&dark":`.`+wL};function EL(e,t,n){return new OM(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var DL=EL(`.`+SL,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{backgroundImage:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)`,backgroundPosition:`center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},TL),OL={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},kL=YM.ie&&YM.ie_version<=11,AL=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new EN,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(YM.ie&&YM.ie_version<=11||YM.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&YM.android&&e.constructor.EDIT_CONTEXT!==!1&&!(YM.chrome&&YM.chrome_version<126)&&(this.editContext=new PL(e),e.state.facet(CP)&&(e.contentDOM.editContext=this.editContext.editContext)),kL&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type==`change`||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(CP)?n.root.activeElement!=this.dom:!mN(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(YM.ie&&YM.ie_version<=11||YM.android&&YM.chrome)&&!n.state.selection.main.empty&&r.focusNode&&gN(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=fN(e.root);if(!t)return!1;let n=YM.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&NL(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=mN(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&NN(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,OL),kL&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),kL&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&jN(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&mN(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new KF(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=JF(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!eI(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=jL(t,e.previousSibling||e.target.previousSibling,-1),r=jL(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type==`characterData`)return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(CP)!=e.state.facet(CP)&&(e.view.contentDOM.editContext=e.state.facet(CP)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function jL(e,t,n){for(;t;){let r=HP.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function ML(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return gN(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function NL(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return ML(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?ML(e,n):null}var PL=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=ZF(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=K.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));eI(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:zA.of(n.text.slice(l.from,l.toB).split(`
|
|
337
|
+
`))};if((YM.mac||YM.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:zA.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);YF(e,u,K.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(iN.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:xP.of(iN.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=fN(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},FL=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||MN(e.parent)||document,this.viewState=new uL(this,e.state||nM.create(e)),e.scrollTo&&e.scrollTo.is(bP)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(TP).map(e=>new DP(e));for(let e of this.plugins)e.update(this);this.observer=new AL(this),this.inputState=new tI(this),this.inputState.ensureHandlers(this.plugins),this.docView=new hF(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Hj?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(PI))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=FI(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(nM.phrases)!=this.state.facet(nM.phrases))return this.setState(a);i=BP.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new yP(t.empty?t:K.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(bP)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=RL.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(RP)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(bL)!=i.state.facet(bL)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(dP))try{e(i)}catch(e){SP(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!JF(this,u)&&l.force&&jN(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new uL(this,e),this.plugins=e.facet(TP).map(e=>new DP(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new hF(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(TP),n=e.state.facet(TP);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new DP(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){SP(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0)if(PN(n||this.win))i=-1,a=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}this.updateState=1;let o=this.viewState.measure();if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let s=[];o&4||([this.measureRequests,s]=[s,this.measureRequests]);let c=s.map(e=>{try{return e.read(this)}catch(e){return SP(this.state,e),LL}}),l=BP.create(this,this.state,[]),u=!1;l.flags|=o,t?t.flags|=o:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),u=this.docView.update(l),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(c[e]!=LL)try{let t=s[e];t.write&&t.write(c[e],this)}catch(e){SP(this.state,e)}if(u&&this.docView.updateSelection(!0),!l.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let e=((i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-a)/this.scaleY;if((e>1||e<-1)&&!(YM.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(dP))e(t)}get themeClasses(){return SL+` `+(this.state.facet(xL)?wL:CL)+` `+this.state.facet(bL)}updateAttrs(){let e=zL(this,OP,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(CP)?`true`:`false`,class:`cm-content`,style:`${YM.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),zL(this,kP,t);let n=this.observer.ignore(()=>{let n=eN(this.contentDOM,this.contentAttrs,t),r=eN(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(RP);let t=this.state.facet(e.cspNonce);OM.mount(this.root,this.styleModules.concat(DL).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return LF(this,e,MF(this,e,t,n))}moveByGroup(e,t){return LF(this,e,MF(this,e,t,t=>NF(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return K.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return jF(this,e,t,n)}moveVertically(e,t,n){return LF(this,e,PF(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=zF(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),zF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[JN.find(r,e-n.from,-1,t)];return this.docView.coordsAt(e,t,i.dir==RN.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(gP)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>IL)return rP(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||YN(r.isolates,n=FP(this,e))))return r.order;n||=FP(this,e);let r=nP(e.text,t,n);return this.bidiCache.push(new RL(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||YM.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ON(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return bP.of(new yP(typeof e==`number`?K.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return bP.of(new yP(K.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return EP.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return EP.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=OM.newName(),r=[bL.of(n),RP.of(EL(`.${n}`,e))];return t&&t.dark&&r.push(xL.of(!0)),r}static baseTheme(e){return Cj.lowest(RP.of(EL(`.`+SL,e,TL)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&HP.get(t)||HP.get(e))?.root?.view||null}};FL.styleModule=RP,FL.inputHandler=fP,FL.clipboardInputFilter=mP,FL.clipboardOutputFilter=hP,FL.scrollHandler=vP,FL.focusChangeEffect=pP,FL.perLineTextDirection=gP,FL.exceptionSink=uP,FL.updateListener=dP,FL.editable=CP,FL.mouseSelectionStyle=lP,FL.dragMovesSelection=cP,FL.clickAddsSelectionRange=sP,FL.decorations=AP,FL.blockWrappers=jP,FL.outerDecorations=MP,FL.atomicRanges=NP,FL.bidiIsolatedRanges=PP,FL.cursorScrollMargin=q.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),FL.scrollMargins=IP,FL.darkTheme=xL,FL.cspNonce=q.define({combine:e=>e.length?e[0]:``}),FL.contentAttributes=kP,FL.editorAttributes=OP,FL.lineWrapping=FL.contentAttributes.of({class:`cm-lineWrapping`}),FL.announce=Vj.define();var IL=4096,LL={},RL=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:RN.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function zL(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&XM(a,n)}return n}var BL=YM.mac?`mac`:YM.windows?`win`:YM.linux?`linux`:`key`;function VL(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function HL(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var UL=Cj.default(FL.domEventHandlers({keydown(e,t){return ZL(KL(t.state),e,t,`editor`)}})),WL=q.define({enables:UL}),GL=new WeakMap;function KL(e){let t=e.facet(WL),n=GL.get(t);return n||GL.set(t,n=YL(t.reduce((e,t)=>e.concat(t),[]))),n}var qL=null,JL=4e3;function YL(e,t=BL){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>VL(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=qL={view:t,prefix:n,scope:e};return setTimeout(()=>{qL==r&&(qL=null)},JL),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,XL))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var XL=null;function ZL(e,t,n,r){XL=t;let i=LM(t),a=ej($A(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;qL&&qL.view==n&&qL.scope==r&&(o=qL.prefix+` `,sI.indexOf(t.keyCode)<0&&(c=!0,qL=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+HL(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(YM.windows&&t.ctrlKey&&t.altKey)&&!(YM.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=jM[t.keyCode])&&p!=i?(d(f[o+HL(p,t,!0)])||t.shiftKey&&(m=MM[t.keyCode])!=i&&m!=p&&d(f[o+HL(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+HL(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),XL=null,s}/x/.unicode;var QL=class extends iM{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};QL.prototype.elementClass=``,QL.prototype.toDOM=void 0,QL.prototype.mapMode=nj.TrackBefore,QL.prototype.startSide=QL.prototype.endSide=-1,QL.prototype.point=!0;var $L=q.define(),eR=q.define(),tR={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>lM.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},nR=q.define();function rR(e){return[aR(),nR.of({...tR,...e})]}var iR=q.define({combine:e=>e.some(e=>e)});function aR(e){let t=[oR];return e&&e.fixed===!1&&t.push(iR.of(!0)),t}var oR=EP.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(nR).map(t=>new uR(e,t)),this.fixed=!e.state.facet(iR);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(iR)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=lM.iter(this.view.state.facet($L),this.view.viewport.from),r=[],i=this.gutters.map(e=>new lR(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==rN.Text&&t){cR(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==rN.Text){cR(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(nR),n=e.state.facet(nR),r=e.docChanged||e.heightChanged||e.viewportChanged||!lM.eq(e.startState.facet($L),e.state.facet($L),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new uR(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>FL.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==RN.LTR?{left:r,right:i}:{right:r,left:i}})});function sR(e){return Array.isArray(e)?e:[e]}function cR(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var lR=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=lM.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new dR(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];cR(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(eR)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},uR=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=sR(t.markers(e)),t.initialSpacer&&(this.spacer=new dR(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=sR(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!lM.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},dR=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),fR(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function fR(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var pR=1024,mR=0,hR=class{constructor(e,t){this.from=e,this.to=t}},gR=class{constructor(e={}){this.id=mR++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=yR.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};gR.closedBy=new gR({deserialize:e=>e.split(` `)}),gR.openedBy=new gR({deserialize:e=>e.split(` `)}),gR.group=new gR({deserialize:e=>e.split(` `)}),gR.isolate=new gR({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),gR.contextHash=new gR({perNode:!0}),gR.lookAhead=new gR({perNode:!0}),gR.mounted=new gR({perNode:!0});var _R=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[gR.mounted.id]}},vR=Object.create(null),yR=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):vR,r=!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(gR.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(gR.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};yR.none=new yR(``,Object.create(null),0,8);var bR=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new yR(e.name,r,e.id,e.flags):e)}return new e(n)}},xR=new WeakMap,SR=new WeakMap,CR;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(CR||={});var wR=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=_R.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new RR(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new RR(xR.get(this)||this.topNode);return r.moveTo(e,t),xR.set(this,r._tree),r}get topNode(){return new AR(this,0,0,null)}resolve(e,t=0){let n=OR(xR.get(this)||this.topNode,e,t,!1);return xR.set(this,n),n}resolveInner(e,t=0){let n=OR(SR.get(this)||this.topNode,e,t,!0);return SR.set(this,n),n}resolveStack(e,t=0){return LR(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&CR.IncludeAnonymous)>0;for(let e=this.cursor(a|CR.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:UR(yR.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(yR.none,t,n,r)))}static build(e){return BR(e)}};wR.empty=new wR(yR.none,[],[],0);var TR=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},ER=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return yR.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(DR(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function DR(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function OR(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof AR&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:CR.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof AR&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var kR=class{cursor(e=0){return new RR(this,e)}getChild(e,t=null,n=null){let r=jR(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return jR(this,e,t,n)}resolve(e,t=0){return OR(this,e,t,!1)}resolveInner(e,t=0){return OR(this,e,t,!0)}matchContext(e){return MR(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},AR=class e extends kR{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(!(!(a&CR.EnterBracketed&&l instanceof wR&&(d=_R.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length)&&!DR(i,r,u,u+l.length))){if(l instanceof ER){if(a&CR.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new PR(new NR(o,l,t,u),null,e)}else if(a&CR.IncludeAnonymous||!l.type.isAnonymous||zR(l)){let s;if(!(a&CR.IgnoreMounts)&&(s=_R.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&CR.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&CR.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&CR.IgnoreOverlays)&&(i=_R.get(this._tree))&&i.overlay){let a=t-this.from,o=r&CR.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function jR(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function MR(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var NR=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},PR=class e extends kR{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&CR.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new wR(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function FR(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof AR&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new IR(i,n)}var IR=class{constructor(e,t){this.heads=e,this.node=t}get next(){return FR(this.heads)}};function LR(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof AR?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=_R.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new AR(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(OR(o,t,n,!1))}}return i?FR(i):r}var RR=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~CR.EnterBracketed,e instanceof AR)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof AR?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&CR.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&CR.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&CR.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&CR.IncludeAnonymous||e instanceof ER||!e.type.isAnonymous||zR(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new PR(this.buffer,t,this.stack[e]);return this.bufferNode=new PR(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return MR(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return MR(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function zR(e){return e.children.some(e=>e instanceof ER||!e.type.isAnonymous||zR(e))}function BR(e){let{buffer:t,nodeSet:n,maxBufferLength:r=pR,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new TR(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,ee=l,te=c;if(w<0)if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}else if(w==-3){c=x;return}else if(w==-4){l=x;return}else throw RangeError(`Unrecognized record size: ${w}`);let ne=s[x],re,ie,ae=S-e;if(C-S<=r&&(ie=h(o.pos-t,y))){let t=new Uint16Array(ie.size-ie.skip),r=o.pos-ie.size,i=t.length;for(;o.pos>r;)i=g(ie.start,t,i);re=new ER(t,C-ie.start,n),ae=ie.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,ee,te),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,ee,te),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(ne,te);re=UR(ne,t,n,0,t.length,0,C-S,e,e)}else re=m(ne,t,n,C-S,ee-C,te)}_.push(re),v.push(ae)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new ER(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof wR){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(gR.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[gR.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[gR.lookAhead,i];o=o?[e].concat(o):[e]}return new wR(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0)if(n.size==-3||n.size==-4)d+=4;else break scan;else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new wR(s[e.topID],_.reverse(),v.reverse(),y)}var VR=new WeakMap;function HR(e,t){if(!e.isAnonymous||t instanceof ER||t.type!=e)return 1;let n=VR.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof wR)){n=1;break}n+=HR(e,r)}VR.set(t,n)}return n}function UR(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=HR(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=HR(e,t[s]);for(s++;s<i;s++){let n=HR(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(UR(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var WR=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof PR?this.setBuffer(e.context.buffer,e.index,t):e instanceof AR&&this.map.set(e.tree,t)}get(e){return e instanceof PR?this.getBuffer(e.context.buffer,e.index):e instanceof AR?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},GR=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},KR=class{startParse(e,t,n){return typeof e==`string`&&(e=new qR(e)),n=n?n.length?n.map(e=>new hR(e.from,e.to)):[new hR(0,0)]:[new hR(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},qR=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new gR({perNode:!0});var JR=0,YR=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=JR++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new ZR(e);return e=>e.modified.indexOf(t)>-1?e:ZR.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},XR=0,ZR=class e{constructor(e){this.name=e,this.instances=[],this.id=XR++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&QR(n,e.modified));if(r)return r;let i=[],a=new YR(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=$R(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function QR(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function $R(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function ez(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new nz(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return tz.add(t)}var tz=new gR({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new nz(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),nz=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};nz.empty=new nz([],2,null);function rz(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function iz(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function az(e,t,n,r=0,i=e.length){let a=new oz(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var oz=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=sz(e)||nz.empty,u=iz(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(gR.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function sz(e){let t=e.type.prop(tz);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var J=YR.define,cz=J(),lz=J(),uz=J(lz),dz=J(lz),fz=J(),pz=J(fz),mz=J(fz),hz=J(),gz=J(hz),_z=J(),vz=J(),yz=J(),bz=J(yz),xz=J(),Y={comment:cz,lineComment:J(cz),blockComment:J(cz),docComment:J(cz),name:lz,variableName:J(lz),typeName:uz,tagName:J(uz),propertyName:dz,attributeName:J(dz),className:J(lz),labelName:J(lz),namespace:J(lz),macroName:J(lz),literal:fz,string:pz,docString:J(pz),character:J(pz),attributeValue:J(pz),number:mz,integer:J(mz),float:J(mz),bool:J(fz),regexp:J(fz),escape:J(fz),color:J(fz),url:J(fz),keyword:_z,self:J(_z),null:J(_z),atom:J(_z),unit:J(_z),modifier:J(_z),operatorKeyword:J(_z),controlKeyword:J(_z),definitionKeyword:J(_z),moduleKeyword:J(_z),operator:vz,derefOperator:J(vz),arithmeticOperator:J(vz),logicOperator:J(vz),bitwiseOperator:J(vz),compareOperator:J(vz),updateOperator:J(vz),definitionOperator:J(vz),typeOperator:J(vz),controlOperator:J(vz),punctuation:yz,separator:J(yz),bracket:bz,angleBracket:J(bz),squareBracket:J(bz),paren:J(bz),brace:J(bz),content:hz,heading:gz,heading1:J(gz),heading2:J(gz),heading3:J(gz),heading4:J(gz),heading5:J(gz),heading6:J(gz),contentSeparator:J(hz),list:J(hz),quote:J(hz),emphasis:J(hz),strong:J(hz),link:J(hz),monospace:J(hz),strikethrough:J(hz),inserted:J(),deleted:J(),changed:J(),invalid:J(),meta:xz,documentMeta:J(xz),annotation:J(xz),processingInstruction:J(xz),definition:YR.defineModifier(`definition`),constant:YR.defineModifier(`constant`),function:YR.defineModifier(`function`),standard:YR.defineModifier(`standard`),local:YR.defineModifier(`local`),special:YR.defineModifier(`special`)};for(let e in Y){let t=Y[e];t instanceof YR&&(t.name=e)}rz([{tag:Y.link,class:`tok-link`},{tag:Y.heading,class:`tok-heading`},{tag:Y.emphasis,class:`tok-emphasis`},{tag:Y.strong,class:`tok-strong`},{tag:Y.keyword,class:`tok-keyword`},{tag:Y.atom,class:`tok-atom`},{tag:Y.bool,class:`tok-bool`},{tag:Y.url,class:`tok-url`},{tag:Y.labelName,class:`tok-labelName`},{tag:Y.inserted,class:`tok-inserted`},{tag:Y.deleted,class:`tok-deleted`},{tag:Y.literal,class:`tok-literal`},{tag:Y.string,class:`tok-string`},{tag:Y.number,class:`tok-number`},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],class:`tok-string2`},{tag:Y.variableName,class:`tok-variableName`},{tag:Y.local(Y.variableName),class:`tok-variableName tok-local`},{tag:Y.definition(Y.variableName),class:`tok-variableName tok-definition`},{tag:Y.special(Y.variableName),class:`tok-variableName2`},{tag:Y.definition(Y.propertyName),class:`tok-propertyName tok-definition`},{tag:Y.typeName,class:`tok-typeName`},{tag:Y.namespace,class:`tok-namespace`},{tag:Y.className,class:`tok-className`},{tag:Y.macroName,class:`tok-macroName`},{tag:Y.propertyName,class:`tok-propertyName`},{tag:Y.operator,class:`tok-operator`},{tag:Y.comment,class:`tok-comment`},{tag:Y.meta,class:`tok-meta`},{tag:Y.invalid,class:`tok-invalid`},{tag:Y.punctuation,class:`tok-punctuation`}]);var Sz=new gR;function Cz(e){return q.define({combine:e?t=>t.concat(e):void 0})}var wz=new gR,Tz=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,nM.prototype.hasOwnProperty(`tree`)||Object.defineProperty(nM.prototype,"tree",{get(){return Oz(this)}}),this.parser=t,this.extension=[Lz.of(this),nM.languageData.of((e,t,n)=>{let r=Ez(e,t,n),i=r.type.prop(Sz);if(!i)return[];let a=e.facet(i),o=r.type.prop(wz);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return Ez(e,t,n).type.prop(Sz)==this.data}findRegions(e){let t=e.facet(Lz);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(Sz)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(gR.mounted);if(i){if(i.tree.prop(Sz)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof wR&&r(i,e.positions[n]+t)}};return r(Oz(e),0),n}get allowsNesting(){return!0}};Tz.setState=Vj.define();function Ez(e,t,n){let r=e.facet(Lz),i=Oz(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,CR.ExcludeBuffers|CR.EnterBracketed))e.type.isTop&&(i=e);return i}var Dz=class e extends Tz{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=Cz(t.languageData);return new e(n,t.parser.configure({props:[Sz.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function Oz(e){let t=e.field(Tz.state,!1);return t?t.tree:wR.empty}var kz=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Az=null,jz=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],wR.empty,0,r,[],null)}startParse(){return this.parser.startParse(new kz(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=wR.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(GR.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(GR.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Az;Az=this;try{return e()}finally{Az=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Mz(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=GR.applyChanges(r,e),i=wR.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=Mz(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends KR{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=Az;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new wR(yR.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Az}};function Mz(e,t,n){return GR.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var Nz=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=jz.create(t.facet(Lz).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};Tz.state=bj.define({create:Nz.init,update(e,t){for(let e of t.effects)if(e.is(Tz.setState))return e.value;return t.startState.facet(Lz)==t.state.facet(Lz)?e.apply(t):Nz.init(t.state)}});var Pz=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(Pz=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var Fz=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,Iz=EP.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Tz.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Tz.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Pz(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(Tz.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Fz?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>Fz&&Fz()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Tz.setState.of(new Nz(i.context))})),this.chunkBudget>0&&!(s&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>SP(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Lz=q.define({combine(e){return e.length?e[0]:null},enables:e=>[Tz.state,Iz,FL.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Rz=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},zz=q.define(),Bz=q.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function Vz(e){let t=e.facet(Bz);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Hz(e,t){let n=``,r=e.tabSize,i=e.facet(Bz)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function Uz(e,t){e instanceof nM&&(e=new Wz(e));for(let n of e.state.facet(zz)){let r=n(e,t);if(r!==void 0)return r}let n=Oz(e.state);return n.length>=t?Kz(e,n,t):null}var Wz=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=Vz(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return SM(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Gz=new gR;function Kz(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return qz(r,e,n)}function qz(e,t,n){for(let r=e;r;r=r.next){let e=Yz(r.node);if(e)return e(Zz.create(t,n,r))}return 0}function Jz(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Yz(e){let t=e.type.prop(Gz);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(gR.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>tB(e,!0,1,void 0,n&&!Jz(e)?t.from:void 0)}return e.parent==null?Xz:null}function Xz(){return 0}var Zz=class e extends Wz{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Qz(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return qz(this.context.next,this.base,this.pos)}};function Qz(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function $z(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function eB({closing:e,align:t=!0,units:n=1}){return r=>tB(r,t,n,e)}function tB(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?$z(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var nB=e=>e.baseIndent;function rB({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var iB=200;function aB(){return nM.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent(`input.type`)&&!e.isUserEvent(`input.complete`))return e;let t=e.startState.languageDataAt(`indentOnInput`,e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+iB)return e;let a=n.sliceString(i.from,r);if(!t.some(e=>e.test(a)))return e;let{state:o}=e,s=-1,c=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=Uz(o,t.from);if(n==null)continue;let r=/^\s*/.exec(t.text)[0],i=Hz(o,n);r!=i&&c.push({from:t.from,to:t.from+r.length,insert:i})}return c.length?[e,{changes:c,sequential:!0}]:e})}var oB=q.define(),sB=new gR;function cB(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function lB(e,t,n){let r=Oz(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(sB);if(s&&(i.to<r.length-50||r.length==e.doc.length||!uB(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function uB(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function dB(e,t,n){for(let r of e.facet(oB)){let i=r(e,t,n);if(i)return i}return lB(e,t,n)}function fB(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var pB=Vj.define({map:fB}),mB=Vj.define({map:fB});function hB(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}var gB=bj.define({create(){return iN.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=_B(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(pB)&&!yB(e,r.value.from,r.value.to)?n.push(r.value):r.is(mB)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(EB),i=n.map(e=>(r?iN.replace({widget:new AB(r(t.state,e))}):kB).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=_B(e,t.selection.main.head)),e},provide:e=>FL.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(kB.range(r,i))}return iN.set(t,!0)}});function _B(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function vB(e,t,n){var r;let i=null;return(r=e.field(gB,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function yB(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function bB(e,t){return e.field(gB,!1)?t:t.concat(Vj.appendConfig.of(DB()))}var xB=e=>{for(let t of hB(e)){let n=dB(e.state,t.from,t.to);if(n)return e.dispatch({effects:bB(e.state,[pB.of(n),CB(e,n)])}),!0}return!1},SB=e=>{if(!e.state.field(gB,!1))return!1;let t=[];for(let n of hB(e)){let r=vB(e.state,n.from,n.to);r&&t.push(mB.of(r),CB(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function CB(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return FL.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}var wB=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:xB},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:SB},{key:`Ctrl-Alt-[`,run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),a=dB(t,i.from,i.to);a&&n.push(pB.of(a)),r=(a?e.lineBlockAt(a.to):i).to+1}return n.length&&e.dispatch({effects:bB(e.state,n)}),!!n.length}},{key:`Ctrl-Alt-]`,run:e=>{let t=e.state.field(gB,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(mB.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],TB={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},EB=q.define({combine(e){return rM(e,TB)}});function DB(e){let t=[gB,PB];return e&&t.push(EB.of(e)),t}function OB(e,t){let{state:n}=e,r=n.facet(EB),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=vB(e.state,n.from,n.to);r&&e.dispatch({effects:mB.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var kB=iN.replace({widget:new class extends nN{toDOM(e){return OB(e,null)}}}),AB=class extends nN{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return OB(e,this.value)}},jB={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},MB=class extends QL{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function NB(e={}){let t={...jB,...e},n=new MB(t,!0),r=new MB(t,!1),i=EP.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(Lz)!=e.state.facet(Lz)||e.startState.field(gB,!1)!=e.state.field(gB,!1)||Oz(e.startState)!=Oz(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new dM;for(let i of e.viewportLineBlocks){let a=vB(e.state,i.from,i.to)?r:dB(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,rR({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||lM.empty},initialSpacer(){return new MB(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=vB(e.state,t.from,t.to);if(r)return e.dispatch({effects:mB.of(r)}),!0;let i=dB(e.state,t.from,t.to);return i?(e.dispatch({effects:pB.of(i)}),!0):!1}}}),DB()]}var PB=FL.baseTheme({".cm-foldPlaceholder":{backgroundColor:`#eee`,border:`1px solid #ddd`,color:`#888`,borderRadius:`.2em`,margin:`0 1px`,padding:`0 1px`,cursor:`pointer`},".cm-foldGutter span":{padding:`0 1px`,cursor:`pointer`}}),FB=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=OM.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof Tz?e=>e.prop(Sz)==a.data:a?e=>e==a:void 0,this.style=rz(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new OM(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},IB=q.define(),LB=q.define({combine(e){return e.length?[e[0]]:null}});function RB(e){let t=e.facet(IB);return t.length?t:e.facet(LB)}function zB(e,t){let n=[VB],r;return e instanceof FB&&(e.module&&n.push(FL.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(LB.of(e)):r?n.push(IB.computeN([FL.darkTheme],t=>t.facet(FL.darkTheme)==(r==`dark`)?[e]:[])):n.push(IB.of(e)),n}var BB=class{constructor(e){this.markCache=Object.create(null),this.tree=Oz(e.state),this.decorations=this.buildDeco(e,RB(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Oz(e.state),n=RB(e.state),r=n!=RB(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return iN.none;let n=new dM;for(let{from:r,to:i}of e.visibleRanges)az(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=iN.mark({class:r})))},r,i);return n.finish()}},VB=Cj.high(EP.fromClass(BB,{decorations:e=>e.decorations})),HB=FB.define([{tag:Y.meta,color:`#404740`},{tag:Y.link,textDecoration:`underline`},{tag:Y.heading,textDecoration:`underline`,fontWeight:`bold`},{tag:Y.emphasis,fontStyle:`italic`},{tag:Y.strong,fontWeight:`bold`},{tag:Y.strikethrough,textDecoration:`line-through`},{tag:Y.keyword,color:`#708`},{tag:[Y.atom,Y.bool,Y.url,Y.contentSeparator,Y.labelName],color:`#219`},{tag:[Y.literal,Y.inserted],color:`#164`},{tag:[Y.string,Y.deleted],color:`#a11`},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],color:`#e40`},{tag:Y.definition(Y.variableName),color:`#00f`},{tag:Y.local(Y.variableName),color:`#30a`},{tag:[Y.typeName,Y.namespace],color:`#085`},{tag:Y.className,color:`#167`},{tag:[Y.special(Y.variableName),Y.macroName],color:`#256`},{tag:Y.definition(Y.propertyName),color:`#00c`},{tag:Y.comment,color:`#940`},{tag:Y.invalid,color:`#f00`}]),UB=FL.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),WB=1e4,GB=`()[]{}`,KB=q.define({combine(e){return rM(e,{afterCursor:!0,brackets:GB,maxScanDistance:WB,renderMatch:YB})}}),qB=iN.mark({class:`cm-matchingBracket`}),JB=iN.mark({class:`cm-nonmatchingBracket`});function YB(e){let t=[],n=e.matched?qB:JB;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function XB(e){let t=[],n=e.facet(KB);for(let r of e.selection.ranges){if(!r.empty)continue;let i=nV(e,r.head,-1,n)||r.head>0&&nV(e,r.head-1,1,n)||n.afterCursor&&(nV(e,r.head,1,n)||r.head<e.doc.length&&nV(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return iN.set(t,!0)}var ZB=[EP.fromClass(class{constructor(e){this.paused=!1,this.decorations=XB(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=XB(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),UB];function QB(e={}){return[KB.of(e),ZB]}var $B=new gR;function eV(e,t,n){let r=e.prop(t<0?gR.openedBy:gR.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function tV(e){let t=e.type.prop($B);return t?t(e.node):e}function nV(e,t,n,r={}){let i=r.maxScanDistance||WB,a=r.brackets||GB,o=Oz(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=eV(r.type,n,a);if(i&&r.from<r.to){let o=tV(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return rV(e,t,n,r,o,i,a)}}return iV(e,t,n,o,s.type,i,a)}function rV(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=tV(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(eV(u.type,n,o))l++;else if(eV(u.type,-n,o)){if(l==0){let e=tV(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function iV(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i))if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var aV=Object.create(null),oV=[yR.none],sV=[],cV=Object.create(null),lV=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])lV[e]=dV(aV,t);function uV(e,t){sV.indexOf(e)>-1||(sV.push(e),console.warn(t))}function dV(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||Y[n];r?typeof r==`function`?t.length?t=t.map(r):uV(n,`Modifier ${n} used at start of tag`):t.length?uV(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:uV(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=cV[i];if(a)return a.id;let o=cV[i]=yR.define({id:oV.length,name:r,props:[ez({[r]:n})]});return oV.push(o),o.id}RN.RTL,RN.LTR;var fV=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=_V(e.state,n.from);return r.line?mV(e):r.block?gV(e):!1};function pV(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var mV=pV(SV,0),hV=pV(xV,0),gV=pV((e,t)=>xV(e,t,bV(t)),0);function _V(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var vV=50;function yV(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-vV,r),o=e.sliceDoc(i,i+vV),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*vV?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+vV),d=e.sliceDoc(i-vV,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function bV(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function xV(e,t,n=t.selection.ranges){let r=n.map(e=>_V(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>yV(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function SV(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=_V(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var CV=Rj.define(),wV=Rj.define(),TV=q.define(),EV=q.define({combine(e){return rM(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),DV=bj.define({create(){return KV.empty},update(e,t){let n=t.state.facet(EV),r=t.annotation(CV);if(r){let i=PV.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?FV(o,o.length,n.minDepth,i):VV(o,t.startState.selection),new KV(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(wV);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Hj.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=PV.fromTransaction(t),o=t.annotation(Hj.time),s=t.annotation(Hj.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new KV(e.done.map(PV.fromJSON),e.undone.map(PV.fromJSON))}});function OV(e={}){return[DV,EV.of(e),FL.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?AV:e.inputType==`historyRedo`?jV:null;return n?(e.preventDefault(),n(t)):!1}})]}function kV(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(DV,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var AV=kV(0,!1),jV=kV(1,!1),MV=kV(0,!0),NV=kV(1,!0),PV=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&ij.fromJSON(t.changes),[],t.mapped&&rj.fromJSON(t.mapped),t.startSelection&&K.fromJSON(t.startSelection),t.selectionsAfter.map(K.fromJSON))}static fromTransaction(t,n){let r=zV;for(let e of t.startState.facet(TV)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,zV)}static selection(t){return new e(void 0,zV,void 0,void 0,t)}};function FV(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function IV(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function LV(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function RV(e,t){return e.length?t.length?e.concat(t):e:t}var zV=[],BV=200;function VV(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-BV));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),FV(e,e.length-1,1e9,n.setSelAfter(r)))}else return[PV.selection([t])]}function HV(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function UV(e,t){if(!e.length)return e;let n=e.length,r=zV;for(;n;){let i=WV(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[PV.selection(r)]:zV}function WV(e,t,n){let r=RV(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):zV,n);if(!e.changes)return PV.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new PV(i,Vj.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var GV=/^(input\.type|delete)($|\.)/,KV=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||GV.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,IV(s.changes,t.changes))||r==`input.type.compose`)?FV(o,o.length-1,i.minDepth,new PV(t.changes.compose(s.changes),RV(Vj.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,zV)):FV(o,o.length,i.minDepth,t),new e(o,zV,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:zV;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&LV(a[a.length-1],t)?this:new e(VV(this.done,t),this.undone,n,r)}addMapping(t){return new e(UV(this.done,t),UV(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:CV.of({side:e,rest:HV(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?zV:r.slice(0,r.length-1);return i.mapped&&(n=UV(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:CV.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};KV.empty=new KV(zV,zV);var qV=[{key:`Mod-z`,run:AV,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:jV,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:jV,preventDefault:!0},{key:`Mod-u`,run:MV,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:NV,preventDefault:!0}];function JV(e,t){return K.create(e.ranges.map(t),e.mainIndex)}function YV(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function XV({state:e,dispatch:t},n){let r=JV(e.selection,n);return r.eq(e.selection,!0)?!1:(t(YV(e,r)),!0)}function ZV(e,t){return K.cursor(t?e.to:e.from)}function QV(e,t){return XV(e,n=>n.empty?e.moveByChar(n,t):ZV(n,t))}function $V(e){return e.textDirectionAt(e.state.selection.main.head)==RN.LTR}var eH=e=>QV(e,!$V(e)),tH=e=>QV(e,$V(e));function nH(e,t){return XV(e,n=>n.empty?e.moveByGroup(n,t):ZV(n,t))}var rH=e=>nH(e,!$V(e)),iH=e=>nH(e,$V(e));typeof Intl<`u`&&Intl.Segmenter;function aH(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function oH(e,t,n){let r=Oz(e).resolveInner(t.head),i=n?gR.closedBy:gR.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;aH(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?nV(e,r.from,1):nV(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,K.cursor(s,n?-1:1)}var sH=e=>XV(e,t=>oH(e.state,t,!$V(e))),cH=e=>XV(e,t=>oH(e.state,t,$V(e)));function lH(e,t){return XV(e,n=>{if(!n.empty)return ZV(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var uH=e=>lH(e,!1),dH=e=>lH(e,!0);function fH(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(FL.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function pH(e,t){let n=fH(e),{state:r}=e,i=JV(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):ZV(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=FL.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(YV(r,i),{effects:a}),!0}var mH=e=>pH(e,!1),hH=e=>pH(e,!0);function gH(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=K.cursor(r.from+n))}return i}var _H=e=>XV(e,t=>gH(e,t,!0)),vH=e=>XV(e,t=>gH(e,t,!1)),yH=e=>XV(e,t=>gH(e,t,!$V(e))),bH=e=>XV(e,t=>gH(e,t,$V(e))),xH=e=>XV(e,t=>K.cursor(e.lineBlockAt(t.head).from,1)),SH=e=>XV(e,t=>K.cursor(e.lineBlockAt(t.head).to,-1));function CH(e,t,n){let r=!1,i=JV(e.selection,t=>{let i=nV(e,t.head,-1)||nV(e,t.head,1)||t.head>0&&nV(e,t.head-1,1)||t.head<e.doc.length&&nV(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?K.range(t.anchor,a):K.cursor(a)});return r?(t(YV(e,i)),!0):!1}var wH=({state:e,dispatch:t})=>CH(e,t,!1);function TH(e,t,n){let r=JV(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=K.range(e.head,e.anchor));let r=n(e);return K.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return r.eq(e.state.selection)?!1:(e.dispatch(YV(e.state,r)),!0)}function EH(e,t){return TH(e,t,n=>e.moveByChar(n,t))}var DH=e=>EH(e,!$V(e)),OH=e=>EH(e,$V(e));function kH(e,t){return TH(e,t,n=>e.moveByGroup(n,t))}var AH=e=>kH(e,!$V(e)),jH=e=>kH(e,$V(e)),MH=e=>{let t=!$V(e);return TH(e,t,n=>oH(e.state,n,t))},NH=e=>{let t=$V(e);return TH(e,t,n=>oH(e.state,n,t))};function PH(e,t){return TH(e,t,n=>e.moveVertically(n,t))}var FH=e=>PH(e,!1),IH=e=>PH(e,!0);function LH(e,t){return TH(e,t,n=>e.moveVertically(n,t,fH(e).height))}var RH=e=>LH(e,!1),zH=e=>LH(e,!0),BH=e=>TH(e,!0,t=>gH(e,t,!0)),VH=e=>TH(e,!1,t=>gH(e,t,!1)),HH=e=>{let t=!$V(e);return TH(e,t,n=>gH(e,n,t))},UH=e=>{let t=$V(e);return TH(e,t,n=>gH(e,n,t))},WH=e=>TH(e,!1,t=>K.cursor(e.lineBlockAt(t.head).from)),GH=e=>TH(e,!0,t=>K.cursor(e.lineBlockAt(t.head).to)),KH=({state:e,dispatch:t})=>(t(YV(e,{anchor:0})),!0),qH=({state:e,dispatch:t})=>(t(YV(e,{anchor:e.doc.length})),!0),JH=({state:e,dispatch:t})=>(t(YV(e,{anchor:e.selection.main.anchor,head:0})),!0),YH=({state:e,dispatch:t})=>(t(YV(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),XH=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),ZH=({state:e,dispatch:t})=>{let n=gU(e).map(({from:t,to:n})=>K.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:K.create(n),userEvent:`select`})),!0},QH=({state:e,dispatch:t})=>{let n=JV(e.selection,t=>{let n=Oz(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return K.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(YV(e,n)),!0)};function $H(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(YV(n,K.create(i,i.length-1))),!0)}var eU=e=>$H(e,!1),tU=e=>$H(e,!0),nU=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=K.create([n.main]):n.main.empty||(r=K.create([K.cursor(n.main.head)])),r?(t(YV(e,r)),!0):!1};function rU(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=iU(e,o,!1)):o>i&&(n=`delete.forward`,o=iU(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=iU(e,i,!1),a=iU(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:K.cursor(i,i<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?FL.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function iU(e,t,n){if(e instanceof FL)for(let r of e.state.facet(FL.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var aU=(e,t,n)=>rU(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=SM(s,a.tabSize)%Vz(a)||Vz(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=XA(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=XA(o.text,c-o.from,!1,!1)+o.from);return c}),oU=e=>aU(e,!1,!0),sU=e=>aU(e,!0,!1),cU=(e,t)=>rU(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=XA(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),lU=e=>cU(e,!1),uU=e=>cU(e,!0),dU=e=>rU(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),fU=e=>rU(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),pU=e=>rU(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),mU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:zA.of([``,``])},range:K.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},hU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:XA(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:XA(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:K.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function gU(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function _U(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of gU(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(K.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(K.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:K.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var vU=({state:e,dispatch:t})=>_U(e,t,!1),yU=({state:e,dispatch:t})=>_U(e,t,!0);function bU(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of gU(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var xU=({state:e,dispatch:t})=>bU(e,t,!1),SU=({state:e,dispatch:t})=>bU(e,t,!0),CU=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(gU(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=JV(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function wU(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Oz(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(gR.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var TU=DU(!1),EU=DU(!0);function DU(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&wU(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new Wz(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=Uz(s,r);for(c??=SM(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,Hz(t,c)];return o&&l.push(Hz(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:zA.of(l)},range:K.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function OU(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:K.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var kU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Wz(e,{overrideIndentation:e=>n[e]??-1}),i=OU(e,(t,i,a)=>{let o=Uz(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=Hz(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},AU=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(OU(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Bz)})}),{userEvent:`input.indent`})),!0),jU=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(OU(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=SM(r,e.tabSize),a=0,o=Hz(e,Math.max(0,i-Vz(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),MU=e=>(e.setTabFocusMode(),!0),NU=[{key:`Ctrl-b`,run:eH,shift:DH,preventDefault:!0},{key:`Ctrl-f`,run:tH,shift:OH},{key:`Ctrl-p`,run:uH,shift:FH},{key:`Ctrl-n`,run:dH,shift:IH},{key:`Ctrl-a`,run:xH,shift:WH},{key:`Ctrl-e`,run:SH,shift:GH},{key:`Ctrl-d`,run:sU},{key:`Ctrl-h`,run:oU},{key:`Ctrl-k`,run:dU},{key:`Ctrl-Alt-h`,run:lU},{key:`Ctrl-o`,run:mU},{key:`Ctrl-t`,run:hU},{key:`Ctrl-v`,run:hH}],PU=[{key:`ArrowLeft`,run:eH,shift:DH,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:rH,shift:AH,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:yH,shift:HH,preventDefault:!0},{key:`ArrowRight`,run:tH,shift:OH,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:iH,shift:jH,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:bH,shift:UH,preventDefault:!0},{key:`ArrowUp`,run:uH,shift:FH,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:KH,shift:JH},{mac:`Ctrl-ArrowUp`,run:mH,shift:RH},{key:`ArrowDown`,run:dH,shift:IH,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:qH,shift:YH},{mac:`Ctrl-ArrowDown`,run:hH,shift:zH},{key:`PageUp`,run:mH,shift:RH},{key:`PageDown`,run:hH,shift:zH},{key:`Home`,run:vH,shift:VH,preventDefault:!0},{key:`Mod-Home`,run:KH,shift:JH},{key:`End`,run:_H,shift:BH,preventDefault:!0},{key:`Mod-End`,run:qH,shift:YH},{key:`Enter`,run:TU,shift:TU},{key:`Mod-a`,run:XH},{key:`Backspace`,run:oU,shift:oU,preventDefault:!0},{key:`Delete`,run:sU,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:lU,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:uU,preventDefault:!0},{mac:`Mod-Backspace`,run:fU,preventDefault:!0},{mac:`Mod-Delete`,run:pU,preventDefault:!0}].concat(NU.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),FU=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:sH,shift:MH},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:cH,shift:NH},{key:`Alt-ArrowUp`,run:vU},{key:`Shift-Alt-ArrowUp`,run:xU},{key:`Alt-ArrowDown`,run:yU},{key:`Shift-Alt-ArrowDown`,run:SU},{key:`Mod-Alt-ArrowUp`,run:eU},{key:`Mod-Alt-ArrowDown`,run:tU},{key:`Escape`,run:nU},{key:`Mod-Enter`,run:EU},{key:`Alt-l`,mac:`Ctrl-l`,run:ZH},{key:`Mod-i`,run:QH,preventDefault:!0},{key:`Mod-[`,run:jU},{key:`Mod-]`,run:AU},{key:`Mod-Alt-\\`,run:kU},{key:`Shift-Mod-k`,run:CU},{key:`Shift-Mod-\\`,run:wH},{key:`Mod-/`,run:fV},{key:`Alt-A`,run:hV},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:MU}].concat(PU),IU={key:`Tab`,run:AU,shift:jU},LU=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new RU(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new zU(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new RU(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},RU=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},zU=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},BU=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function VU(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var HU=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},UU=new HU,WU=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=UU,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=UU,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},GU=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;JU(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};GU.prototype.contextual=GU.prototype.fallback=GU.prototype.extend=!1;var KU=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?VU(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(JU(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};KU.prototype.contextual=GU.prototype.fallback=GU.prototype.extend=!1;var qU=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function JU(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||XU(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function YU(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function XU(e,t,n,r){let i=YU(n,r,t);return i<0||YU(n,r,e)<i}var ZU=typeof process<`u`&&/\bparse\b/.test({}.LOG),QU=null;function $U(e,t,n){let r=e.cursor(CR.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var eW=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?$U(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?$U(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof wR){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(gR.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},tW=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new HU)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new HU,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new HU,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=cW(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(cW(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction(cW(o,s+1),t,n,r))}return r}},nW=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new WU(t,r),this.tokens=new tW(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[LU.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new eW(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&lW(r);if(e)return ZU&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw ZU&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return ZU&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=ZU?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(gR.contextHash)||0)==n))return e.useNode(o,r),ZU&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof wR)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof wR&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),ZU&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),ZU&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return rW(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=ZU?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),ZU&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(ZU&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)ZU&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))ZU&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),ZU&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),rW(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),wR.build({buffer:BU.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(QU||=new WeakMap).get(e);return t||QU.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function rW(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var iW=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},aW=e=>e,oW=class{constructor(e){this.start=e.start,this.shift=e.shift||aW,this.reduce=e.reduce||aW,this.reuse=e.reuse||aW,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},sW=class e extends KR{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=gR[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new bR(t.map((t,i)=>yR.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=pR;let a=VU(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(uW),this.states=VU(e.states,Uint32Array),this.data=VU(e.stateData),this.goto=VU(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new GU(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new nW(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=cW(n,i+2)];else if(n[i+1]==2)return cW(n,i+2);else break;if(a==t||a==0)return cW(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=cW(this.data,n+2);else break;r=t(cW(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=cW(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=uW(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new iW(e,n,r)}static deserialize(t){return new e(t)}};function cW(e,t){return e[t]|e[t+1]<<16}function lW(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function uW(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var dW=316,fW=317,pW=1,mW=2,hW=3,gW=4,_W=318,vW=320,yW=321,bW=5,xW=6,SW=0,CW=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],wW=125,TW=59,EW=47,DW=42,OW=43,kW=45,AW=60,jW=44,MW=63,NW=46,PW=91,FW=new oW({start:!1,shift(e,t){return t==bW||t==xW||t==vW?e:t==yW},strict:!1}),IW=new qU((e,t)=>{let{next:n}=e;(n==wW||n==-1||t.context)&&e.acceptToken(_W)},{contextual:!0,fallback:!0}),LW=new qU((e,t)=>{let{next:n}=e,r;CW.indexOf(n)>-1||(n!=EW||(r=e.peek(1))!=EW&&r!=DW)&&n!=wW&&n!=TW&&n!=-1&&!t.context&&e.acceptToken(dW)},{contextual:!0}),RW=new qU((e,t)=>{e.next==PW&&!t.context&&e.acceptToken(fW)},{contextual:!0}),zW=new qU((e,t)=>{let{next:n}=e;if(n==OW||n==kW){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(pW);e.acceptToken(n?pW:mW)}}else n==MW&&e.peek(1)==NW&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(hW))},{contextual:!0});function BW(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var VW=new qU((e,t)=>{if(e.next!=AW||!t.dialectEnabled(SW)||(e.advance(),e.next==EW))return;let n=0;for(;CW.indexOf(e.next)>-1;)e.advance(),n++;if(BW(e.next,!0)){for(e.advance(),n++;BW(e.next,!1);)e.advance(),n++;for(;CW.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==jW)return;for(let t=0;;t++){if(t==7){if(!BW(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(gW,-n)}),HW=ez({"get set async static":Y.modifier,"for while do if else switch try catch finally return throw break continue default case defer":Y.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":Y.operatorKeyword,"let var const using function class extends":Y.definitionKeyword,"import export from":Y.moduleKeyword,"with debugger new":Y.keyword,TemplateString:Y.special(Y.string),super:Y.atom,BooleanLiteral:Y.bool,this:Y.self,null:Y.null,Star:Y.modifier,VariableName:Y.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Y.function(Y.variableName),VariableDefinition:Y.definition(Y.variableName),Label:Y.labelName,PropertyName:Y.propertyName,PrivatePropertyName:Y.special(Y.propertyName),"CallExpression/MemberExpression/PropertyName":Y.function(Y.propertyName),"FunctionDeclaration/VariableDefinition":Y.function(Y.definition(Y.variableName)),"ClassDeclaration/VariableDefinition":Y.definition(Y.className),"NewExpression/VariableName":Y.className,PropertyDefinition:Y.definition(Y.propertyName),PrivatePropertyDefinition:Y.definition(Y.special(Y.propertyName)),UpdateOp:Y.updateOperator,"LineComment Hashbang":Y.lineComment,BlockComment:Y.blockComment,Number:Y.number,String:Y.string,Escape:Y.escape,ArithOp:Y.arithmeticOperator,LogicOp:Y.logicOperator,BitOp:Y.bitwiseOperator,CompareOp:Y.compareOperator,RegExp:Y.regexp,Equals:Y.definitionOperator,Arrow:Y.function(Y.punctuation),": Spread":Y.punctuation,"( )":Y.paren,"[ ]":Y.squareBracket,"{ }":Y.brace,"InterpolationStart InterpolationEnd":Y.special(Y.brace),".":Y.derefOperator,", ;":Y.separator,"@":Y.meta,TypeName:Y.typeName,TypeDefinition:Y.definition(Y.typeName),"type enum interface implements namespace module declare":Y.definitionKeyword,"abstract global Privacy readonly override":Y.modifier,"is keyof unique infer asserts":Y.operatorKeyword,JSXAttributeValue:Y.attributeValue,JSXText:Y.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Y.angleBracket,"JSXIdentifier JSXNameSpacedName":Y.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Y.attributeName,"JSXBuiltin/JSXIdentifier":Y.standard(Y.tagName)}),UW={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},WW={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},GW={__proto__:null,"<":193},KW=sW.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-E<j-E<jO9kQ`O,5=_O!$rQ`O,5=_O!$wQlO,5;ZO!&zQMhO'#EkO!(eQ`O,5;ZO!(jQlO'#DyO!(tQpO,5;dO!(|QpO,5;dO%[QlO,5;dOOQ['#FT'#FTOOQ['#FV'#FVO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eOOQ['#FZ'#FZO!)[QlO,5;tOOQ!0Lf,5;y,5;yOOQ!0Lf,5;z,5;zOOQ!0Lf,5;|,5;|O%[QlO'#IpO!+_Q!0LrO,5<iO%[QlO,5;eO!&zQMhO,5;eO!+|QMhO,5;eO!-nQMhO'#E^O%[QlO,5;wOOQ!0Lf,5;{,5;{O!-uQ,UO'#FjO!.rQ,UO'#KXO!.^Q,UO'#KXO!.yQ,UO'#KXOOQO'#KX'#KXO!/_Q,UO,5<SOOOW,5<`,5<`O!/pQlO'#FvOOOW'#Io'#IoO7VO7dO,5<QO!/wQ,UO'#FxOOQ!0Lf,5<Q,5<QO!0hQ$IUO'#CyOOQ!0Lh'#C}'#C}O!0{O#@ItO'#DRO!1iQMjO,5<eO!1pQ`O,5<hO!3YQ(CWO'#GXO!3jQ`O'#GYO!3oQ`O'#GYO!5_Q(CWO'#G^O!6dQpO'#GbOOQO'#Gn'#GnO!,TQMhO'#GmOOQO'#Gp'#GpO!,TQMhO'#GoO!7VQ$IUO'#JlOOQ!0Lh'#Jl'#JlO!7aQ`O'#JkO!7oQ`O'#JjO!7wQ`O'#CuOOQ!0Lh'#C{'#C{O!8YQ`O'#C}OOQ!0Lh'#DV'#DVOOQ!0Lh'#DX'#DXO!8_Q`O,5<eO1SQ`O'#DZO!,TQMhO'#GPO!,TQMhO'#GRO!8gQ`O'#GTO!8lQ`O'#GUO!3oQ`O'#G[O!,TQMhO'#GaO<]Q`O'#JkO!8qQ`O'#EqO!9`Q`O,5<gOOQ!0Lb'#Cr'#CrO!9hQ`O'#ErO!:bQpO'#EsOOQ!0Lb'#KR'#KRO!:iQ!0LrO'#KaO9uQ!0LrO,5=cO`QlO,5>tOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!<hQ!0MxO,5:bO!:]QpO,5:`O!?RQ!0MxO,5:jO%[QlO,5:jO!AiQ!0MxO,5:lOOQO,5@z,5@zO!BYQMhO,5=_O!BhQ!0LrO'#JiO9`Q`O'#JiO!ByQ!0LrO,59ZO!CUQpO,59ZO!C^QMhO,59ZO:dQMhO,59ZO!CiQ`O,5;ZO!CqQ`O'#HbO!DVQ`O'#KdO%[QlO,5;}O!:]QpO,5<PO!D_Q`O,5=zO!DdQ`O,5=zO!DiQ`O,5=zO!DwQ`O,5=zO9uQ!0LrO,5=zO<]Q`O,5=jOOQO'#Cy'#CyO!EOQpO,5=gO!EWQMhO,5=hO!EcQ`O,5=jO!EhQ!bO,5=mO!EpQ`O'#K`O?YQ`O'#HWO9kQ`O'#HYO!EuQ`O'#HYO:dQMhO'#H[O!EzQ`O'#H[OOQ[,5=p,5=pO!FPQ`O'#H]O!FbQ`O'#CoO!FgQ`O,59PO!FqQ`O,59PO!HvQlO,59POOQ[,59P,59PO!IWQ!0LrO,59PO%[QlO,59PO!KcQlO'#HeOOQ['#Hf'#HfOOQ['#Hg'#HgO`QlO,5=}O!KyQ`O,5=}O`QlO,5>TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-E<f-E<fO#)kQ!0MSO,5;RODWQpO,5:rO#)uQpO,5:rODWQpO,5;RO!ByQ!0LrO,5:rOOQ!0Lb'#Ej'#EjOOQO,5;R,5;RO%[QlO,5;RO#*SQ!0LrO,5;RO#*_Q!0LrO,5;RO!CUQpO,5:rOOQO,5;X,5;XO#*mQ!0LrO,5;RPOOO'#I^'#I^P#+RO&2DjO,58|POOO,58|,58|OOOO-E<^-E<^OOQ!0Lh1G.p1G.pOOOO-E<_-E<_OOOO,59},59}O#+^Q!bO,59}OOOO-E<a-E<aOOQ!0Lf1G/g1G/gO#+cQ!fO,5?OO+}QlO,5?OOOQO,5?U,5?UO#+mQlO'#IdOOQO-E<b-E<bO#+zQ`O,5@`O#,SQ!fO,5@`O#,ZQ`O,5@nOOQ!0Lf1G/m1G/mO%[QlO,5@oO#,cQ`O'#IjOOQO-E<h-E<hO#,ZQ`O,5@nOOQ!0Lb1G0x1G0xOOQ!0Ln1G/x1G/xOOQ!0Ln1G0Y1G0YO%[QlO,5@lO#,wQ!0LrO,5@lO#-YQ!0LrO,5@lO#-aQ`O,5@kO9eQ`O,5@kO#-iQ`O,5@kO#-wQ`O'#ImO#-aQ`O,5@kOOQ!0Lb1G0w1G0wO!(tQpO,5:uO!)PQpO,5:uOOQS,5:w,5:wO#.iQdO,5:wO#.qQMhO1G2yO9kQ`O1G2yOOQ!0Lf1G0u1G0uO#/PQ!0MxO1G0uO#0UQ!0MvO,5;VOOQ!0Lh'#GW'#GWO#0rQ!0MzO'#JlO!$wQlO1G0uO#2}Q!fO'#JwO%[QlO'#JwO#3XQ`O,5:eOOQ!0Lh'#D_'#D_OOQ!0Lf1G1O1G1OO%[QlO1G1OOOQ!0Lf1G1f1G1fO#3^Q`O1G1OO#5rQ!0MxO1G1PO#5yQ!0MxO1G1PO#8aQ!0MxO1G1PO#8hQ!0MxO1G1PO#;OQ!0MxO1G1PO#=fQ!0MxO1G1PO#=mQ!0MxO1G1PO#=tQ!0MxO1G1PO#@[Q!0MxO1G1PO#@cQ!0MxO1G1PO#BpQ?MtO'#CiO#DkQ?MtO1G1`O#DrQ?MtO'#JsO#EVQ!0MxO,5?[OOQ!0Lb-E<n-E<nO#GdQ!0MxO1G1PO#HaQ!0MzO1G1POOQ!0Lf1G1P1G1PO#IdQMjO'#J|O#InQ`O,5:xO#IsQ!0MxO1G1cO#JgQ,UO,5<WO#JoQ,UO,5<XO#JwQ,UO'#FoO#K`Q`O'#FnOOQO'#KY'#KYOOQO'#In'#InO#KeQ,UO1G1nOOQ!0Lf1G1n1G1nOOOW1G1y1G1yO#KvQ?MtO'#JrO#LQQ`O,5<bO!)[QlO,5<bOOOW-E<m-E<mOOQ!0Lf1G1l1G1lO#LVQpO'#KXOOQ!0Lf,5<d,5<dO#L_QpO,5<dO#LdQMhO'#DTOOOO'#Ib'#IbO#LkO#@ItO,59mOOQ!0Lh,59m,59mO%[QlO1G2PO!8lQ`O'#IrO#LvQ`O,5<zOOQ!0Lh,5<w,5<wO!,TQMhO'#IuO#MdQMjO,5=XO!,TQMhO'#IwO#NVQMjO,5=ZO!&zQMhO,5=]OOQO1G2S1G2SO#NaQ!dO'#CrO#NtQ(CWO'#ErO$ |QpO'#GbO$!dQ!dO,5<sO$!kQ`O'#K[O9eQ`O'#K[O$!yQ`O,5<uO$#aQ!dO'#C{O!,TQMhO,5<tO$#kQ`O'#GZO$$PQ`O,5<tO$$UQ!dO'#GWO$$cQ!dO'#K]O$$mQ`O'#K]O!&zQMhO'#K]O$$rQ`O,5<xO$$wQlO'#JvO$%RQpO'#GcO#$`QpO'#GcO$%dQ`O'#GgO!3oQ`O'#GkO$%iQ!0LrO'#ItO$%tQpO,5<|OOQ!0Lp,5<|,5<|O$%{QpO'#GcO$&YQpO'#GdO$&kQpO'#GdO$&pQMjO,5=XO$'QQMjO,5=ZOOQ!0Lh,5=^,5=^O!,TQMhO,5@VO!,TQMhO,5@VO$'bQ`O'#IyO$'vQ`O,5@UO$(OQ`O,59aOOQ!0Lh,59i,59iO$(TQ`O,5@VO$)TQ$IYO,59uOOQ!0Lh'#Jp'#JpO$)vQMjO,5<kO$*iQMjO,5<mO@zQ`O,5<oOOQ!0Lh,5<p,5<pO$*sQ`O,5<vO$*xQMjO,5<{O$+YQ`O'#KPO!$wQlO1G2RO$+_Q`O1G2RO9eQ`O'#KSO9eQ`O'#EtO%[QlO'#EtO9eQ`O'#I{O$+dQ!0LrO,5@{OOQ[1G2}1G2}OOQ[1G4`1G4`OOQ!0Lf1G/|1G/|OOQ!0Lf1G/z1G/zO$-fQ!0MxO1G0UOOQ[1G2y1G2yO!&zQMhO1G2yO%[QlO1G2yO#.tQ`O1G2yO$/jQMhO'#EkOOQ!0Lb,5@T,5@TO$/wQ!0LrO,5@TOOQ[1G.u1G.uO!ByQ!0LrO1G.uO!CUQpO1G.uO!C^QMhO1G.uO$0YQ`O1G0uO$0_Q`O'#CiO$0jQ`O'#KeO$0rQ`O,5=|O$0wQ`O'#KeO$0|Q`O'#KeO$1[Q`O'#JRO$1jQ`O,5AOO$1rQ!fO1G1iOOQ!0Lf1G1k1G1kO9kQ`O1G3fO@zQ`O1G3fO$1yQ`O1G3fO$2OQ`O1G3fO!DiQ`O1G3fO9uQ!0LrO1G3fOOQ[1G3f1G3fO!EcQ`O1G3UO!&zQMhO1G3RO$2TQ`O1G3ROOQ[1G3S1G3SO!&zQMhO1G3SO$2YQ`O1G3SO$2bQpO'#HQOOQ[1G3U1G3UO!6_QpO'#I}O!EhQ!bO1G3XOOQ[1G3X1G3XOOQ[,5=r,5=rO$2jQMhO,5=tO9kQ`O,5=tO$%dQ`O,5=vO9`Q`O,5=vO!CUQpO,5=vO!C^QMhO,5=vO:dQMhO,5=vO$2xQ`O'#KcO$3TQ`O,5=wOOQ[1G.k1G.kO$3YQ!0LrO1G.kO@zQ`O1G.kO$3eQ`O1G.kO9uQ!0LrO1G.kO$5mQ!fO,5AQO$5zQ`O,5AQO9eQ`O,5AQO$6VQlO,5>PO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5<iO$BOQ!fO1G4jOOQO1G4p1G4pO%[QlO,5?OO$BYQ`O1G5zO$BbQ`O1G6YO$BjQ!fO1G6ZO9eQ`O,5?UO$BtQ!0MxO1G6WO%[QlO1G6WO$CUQ!0LrO1G6WO$CgQ`O1G6VO$CgQ`O1G6VO9eQ`O1G6VO$CoQ`O,5?XO9eQ`O,5?XOOQO,5?X,5?XO$DTQ`O,5?XO$+YQ`O,5?XOOQO-E<k-E<kOOQS1G0a1G0aOOQS1G0c1G0cO#.lQ`O1G0cOOQ[7+(e7+(eO!&zQMhO7+(eO%[QlO7+(eO$DcQ`O7+(eO$DnQMhO7+(eO$D|Q!0MzO,5=XO$GXQ!0MzO,5=ZO$IdQ!0MzO,5=XO$KuQ!0MzO,5=ZO$NWQ!0MzO,59uO%!]Q!0MzO,5<kO%$hQ!0MzO,5<mO%&sQ!0MzO,5<{OOQ!0Lf7+&a7+&aO%)UQ!0MxO7+&aO%)xQlO'#IfO%*VQ`O,5@cO%*_Q!fO,5@cOOQ!0Lf1G0P1G0PO%*iQ`O7+&jOOQ!0Lf7+&j7+&jO%*nQ?MtO,5:fO%[QlO7+&zO%*xQ?MtO,5:bO%+VQ?MtO,5:jO%+aQ?MtO,5:lO%+kQMhO'#IiO%+uQ`O,5@hOOQ!0Lh1G0d1G0dOOQO1G1r1G1rOOQO1G1s1G1sO%+}Q!jO,5<ZO!)[QlO,5<YOOQO-E<l-E<lOOQ!0Lf7+'Y7+'YOOOW7+'e7+'eOOOW1G1|1G1|O%,YQ`O1G1|OOQ!0Lf1G2O1G2OOOOO,59o,59oO%,_Q!dO,59oOOOO-E<`-E<`OOQ!0Lh1G/X1G/XO%,fQ!0MxO7+'kOOQ!0Lh,5?^,5?^O%-YQMhO1G2fP%-aQ`O'#IrPOQ!0Lh-E<p-E<pO%-}QMjO,5?aOOQ!0Lh-E<s-E<sO%.pQMjO,5?cOOQ!0Lh-E<u-E<uO%.zQ!dO1G2wO%/RQ!dO'#CrO%/iQMhO'#KSO$$wQlO'#JvOOQ!0Lh1G2_1G2_O%/sQ`O'#IqO%0[Q`O,5@vO%0[Q`O,5@vO%0dQ`O,5@vO%0oQ`O,5@vOOQO1G2a1G2aO%0}QMjO1G2`O$+YQ`O'#K[O!,TQMhO1G2`O%1_Q(CWO'#IsO%1lQ`O,5@wO!&zQMhO,5@wO%1tQ!dO,5@wOOQ!0Lh1G2d1G2dO%4UQ!fO'#CiO%4`Q`O,5=POOQ!0Lb,5<},5<}O%4hQpO,5<}OOQ!0Lb,5=O,5=OOCwQ`O,5<}O%4sQpO,5<}OOQ!0Lb,5=R,5=RO$+YQ`O,5=VOOQO,5?`,5?`OOQO-E<r-E<rOOQ!0Lp1G2h1G2hO#$`QpO,5<}O$$wQlO,5=PO%5RQ`O,5=OO%5^QpO,5=OO!,TQMhO'#IuO%6WQMjO1G2sO!,TQMhO'#IwO%6yQMjO1G2uO%7TQMjO1G5qO%7_QMjO1G5qOOQO,5?e,5?eOOQO-E<w-E<wOOQO1G.{1G.{O!,TQMhO1G5qO!,TQMhO1G5qO!:]QpO,59wO%[QlO,59wOOQ!0Lh,5<j,5<jO%7lQ`O1G2ZO!,TQMhO1G2bO%7qQ!0MxO7+'mOOQ!0Lf7+'m7+'mO!$wQlO7+'mO%8eQ`O,5;`OOQ!0Lb,5?g,5?gOOQ!0Lb-E<y-E<yO%8jQ!dO'#K^O#(ZQ`O7+(eO4UQ!fO7+(eO$DfQ`O7+(eO%8tQ!0MvO'#CiO%9XQ!0MvO,5=SO%9lQ`O,5=SO%9tQ`O,5=SOOQ!0Lb1G5o1G5oOOQ[7+$a7+$aO!ByQ!0LrO7+$aO!CUQpO7+$aO!$wQlO7+&aO%9yQ`O'#JQO%:bQ`O,5APOOQO1G3h1G3hO9kQ`O,5APO%:bQ`O,5APO%:jQ`O,5APOOQO,5?m,5?mOOQO-E=P-E=POOQ!0Lf7+'T7+'TO%:oQ`O7+)QO9uQ!0LrO7+)QO9kQ`O7+)QO@zQ`O7+)QO%:tQ`O7+)QOOQ[7+)Q7+)QOOQ[7+(p7+(pO%:yQ!0MvO7+(mO!&zQMhO7+(mO!E^Q`O7+(nOOQ[7+(n7+(nO!&zQMhO7+(nO%;TQ`O'#KbO%;`Q`O,5=lOOQO,5?i,5?iOOQO-E<{-E<{OOQ[7+(s7+(sO%<rQpO'#HZOOQ[1G3`1G3`O!&zQMhO1G3`O%[QlO1G3`O%<yQ`O1G3`O%=UQMhO1G3`O9uQ!0LrO1G3bO$%dQ`O1G3bO9`Q`O1G3bO!CUQpO1G3bO!C^QMhO1G3bO%=dQ`O'#JPO%=xQ`O,5@}O%>QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-E<c-E<cOOQO,5?V,5?VOOQO-E<i-E<iO!CUQpO1G/sOOQO-E<e-E<eOOQ!0Ln1G0]1G0]OOQ!0Lf7+%u7+%uO#(ZQ`O7+%uOOQ!0Lf7+&`7+&`O?YQ`O7+&`O!CUQpO7+&`OOQO7+%x7+%xO$AlQ!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%@nQ!0LrO7+&XO!ByQ!0LrO7+%xO!CUQpO7+%xO%@yQ!0LrO7+&XO%AXQ!0MxO7++rO%[QlO7++rO%AiQ`O7++qO%AiQ`O7++qOOQO1G4s1G4sO9eQ`O1G4sO%AqQ`O1G4sOOQS7+%}7+%}O#(ZQ`O<<LPO4UQ!fO<<LPO%BPQ`O<<LPOOQ[<<LP<<LPO!&zQMhO<<LPO%[QlO<<LPO%BXQ`O<<LPO%BdQ!0MzO,5?aO%DoQ!0MzO,5?cO%FzQ!0MzO1G2`O%I]Q!0MzO1G2sO%KhQ!0MzO1G2uO%MsQ!fO,5?QO%[QlO,5?QOOQO-E<d-E<dO%M}Q`O1G5}OOQ!0Lf<<JU<<JUO%NVQ?MtO1G0uO&!^Q?MtO1G1PO&!eQ?MtO1G1PO&$fQ?MtO1G1PO&$mQ?MtO1G1PO&&nQ?MtO1G1PO&(oQ?MtO1G1PO&(vQ?MtO1G1PO&(}Q?MtO1G1PO&+OQ?MtO1G1PO&+VQ?MtO1G1PO&+^Q!0MxO<<JfO&-UQ?MtO1G1PO&.RQ?MvO1G1PO&/UQ?MvO'#JlO&1[Q?MtO1G1cO&1iQ?MtO1G0UO&1sQMjO,5?TOOQO-E<g-E<gO!)[QlO'#FqOOQO'#KZ'#KZOOQO1G1u1G1uO&1}Q`O1G1tO&2SQ?MtO,5?[OOOW7+'h7+'hOOOO1G/Z1G/ZO&2^Q!dO1G4xOOQ!0Lh7+(Q7+(QP!&zQMhO,5?^O!,TQMhO7+(cO&2eQ`O,5?]O9eQ`O,5?]O$+YQ`O,5?]OOQO-E<o-E<oO&2sQ`O1G6bO&2sQ`O1G6bO&2{Q`O1G6bO&3WQMjO7+'zO&3hQ!dO,5?_O&3rQ`O,5?_O!&zQMhO,5?_OOQO-E<q-E<qO&3wQ!dO1G6cO&4RQ`O1G6cO&4ZQ`O1G2kO!&zQMhO1G2kOOQ!0Lb1G2i1G2iOOQ!0Lb1G2j1G2jO%4hQpO1G2iO!CUQpO1G2iOCwQ`O1G2iOOQ!0Lb1G2q1G2qO&4`QpO1G2iO&4nQ`O1G2kO$+YQ`O1G2jOCwQ`O1G2jO$$wQlO1G2kO&4vQ`O1G2jO&5jQMjO,5?aOOQ!0Lh-E<t-E<tO&6]QMjO,5?cOOQ!0Lh-E<v-E<vO!,TQMhO7++]O&6gQMjO7++]O&6qQMjO7++]OOQ!0Lh1G/c1G/cO&7OQ`O1G/cOOQ!0Lh7+'u7+'uO&7TQMjO7+'|O&7eQ!0MxO<<KXOOQ!0Lf<<KX<<KXO&8XQ`O1G0zO!&zQMhO'#IzO&8^Q`O,5@xO&:`Q!fO<<LPO!&zQMhO1G2nO&:gQ!0LrO1G2nOOQ[<<G{<<G{O!ByQ!0LrO<<G{O&:xQ!0MxO<<I{OOQ!0Lf<<I{<<I{OOQO,5?l,5?lO&;lQ`O,5?lO&;qQ`O,5?lOOQO-E=O-E=OO&<PQ`O1G6kO&<PQ`O1G6kO9kQ`O1G6kO@zQ`O<<LlOOQ[<<Ll<<LlO&<XQ`O<<LlO9uQ!0LrO<<LlO9kQ`O<<LlOOQ[<<LX<<LXO%:yQ!0MvO<<LXOOQ[<<LY<<LYO!E^Q`O<<LYO&<^QpO'#I|O&<iQ`O,5@|O!)[QlO,5@|OOQ[1G3W1G3WOOQO'#JO'#JOO9uQ!0LrO'#JOO&<qQpO,5=uOOQ[,5=u,5=uO&<xQpO'#EgO&=PQpO'#GeO&=UQ`O7+(zO&=ZQ`O7+(zOOQ[7+(z7+(zO!&zQMhO7+(zO%[QlO7+(zO&=cQ`O7+(zOOQ[7+(|7+(|O9uQ!0LrO7+(|O$%dQ`O7+(|O9`Q`O7+(|O!CUQpO7+(|O&=nQ`O,5?kOOQO-E<}-E<}OOQO'#H^'#H^O&=yQ`O1G6iO9uQ!0LrO<<GqOOQ[<<Gq<<GqO@zQ`O<<GqO&>RQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<<Ly<<LyOOQ[<<L{<<L{OOQ[-E=Q-E=QOOQ[1G3z1G3zO&>nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<<Ia<<IaOOQ!0Lf<<Iz<<IzO?YQ`O<<IzOOQO<<Is<<IsO$AlQ!0MxO<<IsO%[QlO<<IsOOQO<<Id<<IdO!ByQ!0LrO<<IdO&?SQ!0LrO<<IsO&?_Q!0MxO<= ^O&?oQ`O<= ]OOQO7+*_7+*_O9eQ`O7+*_OOQ[ANAkANAkO&?wQ!fOANAkO!&zQMhOANAkO#(ZQ`OANAkO4UQ!fOANAkO&@OQ`OANAkO%[QlOANAkO&@WQ!0MzO7+'zO&BiQ!0MzO,5?aO&DtQ!0MzO,5?cO&GPQ!0MzO7+'|O&IbQ!fO1G4lO&IlQ?MtO7+&aO&KpQ?MvO,5=XO&MwQ?MvO,5=ZO&NXQ?MvO,5=XO&NiQ?MvO,5=ZO&NyQ?MvO,59uO'#PQ?MvO,5<kO'%SQ?MvO,5<mO''hQ?MvO,5<{O')^Q?MtO7+'kO')kQ?MtO7+'mO')xQ`O,5<]OOQO7+'`7+'`OOQ!0Lh7+*d7+*dO')}QMjO<<K}OOQO1G4w1G4wO'*UQ`O1G4wO'*aQ`O1G4wO'*oQ`O7++|O'*oQ`O7++|O!&zQMhO1G4yO'*wQ!dO1G4yO'+RQ`O7++}O'+ZQ`O7+(VO'+fQ!dO7+(VOOQ!0Lb7+(T7+(TOOQ!0Lb7+(U7+(UO!CUQpO7+(TOCwQ`O7+(TO'+pQ`O7+(VO!&zQMhO7+(VO$+YQ`O7+(UO'+uQ`O7+(VOCwQ`O7+(UO'+}QMjO<<NwO!,TQMhO<<NwOOQ!0Lh7+$}7+$}O',XQ!dO,5?fOOQO-E<x-E<xO',cQ!0MvO7+(YO!&zQMhO7+(YOOQ[AN=gAN=gO9kQ`O1G5WOOQO1G5W1G5WO',sQ`O1G5WO',xQ`O7+,VO',xQ`O7+,VO9uQ!0LrOANBWO@zQ`OANBWOOQ[ANBWANBWO'-QQ`OANBWOOQ[ANAsANAsOOQ[ANAtANAtO'-VQ`O,5?hOOQO-E<z-E<zO'-bQ?MtO1G6hOOQO,5?j,5?jOOQO-E<|-E<|OOQ[1G3a1G3aO'-lQ`O,5=POOQ[<<Lf<<LfO!&zQMhO<<LfO&=UQ`O<<LfO'-qQ`O<<LfO%[QlO<<LfOOQ[<<Lh<<LhO9uQ!0LrO<<LhO$%dQ`O<<LhO9`Q`O<<LhO'-yQpO1G5VO'.UQ`O7+,TOOQ[AN=]AN=]O9uQ!0LrOAN=]OOQ[<= r<= rOOQ[<= s<= sO'.^Q`O<= rO'.cQ`O<= sOOQ[<<Lq<<LqO'.hQ`O<<LqO'.mQlO<<LqOOQ[1G3{1G3{O?YQ`O7+)lO'.tQ`O<<JQO'/PQ?MtO<<JQOOQO<<Hy<<HyOOQ!0LfAN?fAN?fOOQOAN?_AN?_O$AlQ!0MxOAN?_OOQOAN?OAN?OO%[QlOAN?_OOQO<<My<<MyOOQ[G27VG27VO!&zQMhOG27VO#(ZQ`OG27VO'/ZQ!fOG27VO4UQ!fOG27VO'/bQ`OG27VO'/jQ?MtO<<JfO'/wQ?MvO1G2`O'1mQ?MvO,5?aO'3pQ?MvO,5?cO'5sQ?MvO1G2sO'7vQ?MvO1G2uO'9yQ?MtO<<KXO':WQ?MtO<<I{OOQO1G1w1G1wO!,TQMhOANAiOOQO7+*c7+*cO':eQ`O7+*cO':pQ`O<= hO':xQ!dO7+*eOOQ!0Lb<<Kq<<KqO$+YQ`O<<KqOCwQ`O<<KqO';SQ`O<<KqO!&zQMhO<<KqOOQ!0Lb<<Ko<<KoO!CUQpO<<KoO';_Q!dO<<KqOOQ!0Lb<<Kp<<KpO';iQ`O<<KqO!&zQMhO<<KqO$+YQ`O<<KpO';nQMjOANDcO';xQ!0MvO<<KtOOQO7+*r7+*rO9kQ`O7+*rO'<YQ`O<= qOOQ[G27rG27rO9uQ!0LrOG27rO@zQ`OG27rO!)[QlO1G5SO'<bQ`O7+,SO'<jQ`O1G2kO&=UQ`OANBQOOQ[ANBQANBQO!&zQMhOANBQO'<oQ`OANBQOOQ[ANBSANBSO9uQ!0LrOANBSO$%dQ`OANBSOOQO'#H_'#H_OOQO7+*q7+*qOOQ[G22wG22wOOQ[ANE^ANE^OOQ[ANE_ANE_OOQ[ANB]ANB]O'<wQ`OANB]OOQ[<<MW<<MWO!)[QlOAN?lOOQOG24yG24yO$AlQ!0MxOG24yO#(ZQ`OLD,qOOQ[LD,qLD,qO!&zQMhOLD,qO'<|Q!fOLD,qO'=TQ?MvO7+'zO'>yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<<M}<<M}OOQ!0LbANA]ANA]O$+YQ`OANA]OCwQ`OANA]O'EVQ!dOANA]OOQ!0LbANAZANAZO'E^Q`OANA]O!&zQMhOANA]O'EiQ!dOANA]OOQ!0LbANA[ANA[OOQO<<N^<<N^OOQ[LD-^LD-^O9uQ!0LrOLD-^O'EsQ?MtO7+*nOOQO'#Gf'#GfOOQ[G27lG27lO&=UQ`OG27lO!&zQMhOG27lOOQ[G27nG27nO9uQ!0LrOG27nOOQ[G27wG27wO'E}Q?MtOG25WOOQOLD*eLD*eOOQ[!$(!]!$(!]O#(ZQ`O!$(!]O!&zQMhO!$(!]O'FXQ!0MzOG27TOOQ!0LbG26wG26wO$+YQ`OG26wO'HjQ`OG26wOCwQ`OG26wO'HuQ!dOG26wO!&zQMhOG26wOOQ[!$(!x!$(!xOOQ[LD-WLD-WO&=UQ`OLD-WOOQ[LD-YLD-YOOQ[!)9Ew!)9EwO#(ZQ`O!)9EwOOQ!0LbLD,cLD,cO$+YQ`OLD,cOCwQ`OLD,cO'H|Q`OLD,cO'IXQ!dOLD,cOOQ[!$(!r!$(!rOOQ[!.K;c!.K;cO'I`Q?MvOG27TOOQ!0Lb!$( }!$( }O$+YQ`O!$( }OCwQ`O!$( }O'KUQ`O!$( }OOQ!0Lb!)9Ei!)9EiO$+YQ`O!)9EiOCwQ`O!)9EiOOQ!0Lb!.K;T!.K;TO$+YQ`O!.K;TOOQ!0Lb!4/0o!4/0oO!)[QlO'#DzO1PQ`O'#EXO'KaQ!fO'#JrO'KhQ!L^O'#DvO'KoQlO'#EOO'KvQ!fO'#CiO'N^Q!fO'#CiO!)[QlO'#EQO'NnQlO,5;ZO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO'#IpO(!qQ`O,5<iO!)[QlO,5;eO(!yQMhO,5;eO($dQMhO,5;eO!)[QlO,5;wO!&zQMhO'#GmO(!yQMhO'#GmO!&zQMhO'#GoO(!yQMhO'#GoO1SQ`O'#DZO1SQ`O'#DZO!&zQMhO'#GPO(!yQMhO'#GPO!&zQMhO'#GRO(!yQMhO'#GRO!&zQMhO'#GaO(!yQMhO'#GaO!)[QlO,5:jO($kQpO'#D_O($uQpO'#JvO!)[QlO,5@oO'NnQlO1G0uO(%PQ?MtO'#CiO!)[QlO1G2PO!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO(%ZQ!dO'#CrO!&zQMhO,5<tO(!yQMhO,5<tO'NnQlO1G2RO!)[QlO7+&zO!&zQMhO1G2`O(!yQMhO1G2`O!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO!&zQMhO1G2bO(!yQMhO1G2bO'NnQlO7+'mO'NnQlO7+&aO!&zQMhOANAiO(!yQMhOANAiO(%nQ`O'#EoO(%sQ`O'#EoO(%{Q`O'#F]O(&QQ`O'#EyO(&VQ`O'#KTO(&bQ`O'#KRO(&mQ`O,5;ZO(&rQMjO,5<eO(&yQ`O'#GYO('OQ`O'#GYO('TQ`O,5<eO(']Q`O,5<gO('eQ`O,5;ZO('mQ?MtO1G1`O('tQ`O,5<tO('yQ`O,5<tO((OQ`O,5<vO((TQ`O,5<vO((YQ`O1G2RO((_Q`O1G0uO((dQMjO<<K}O((kQMjO<<K}O((rQMhO'#F|O9`Q`O'#F{OAuQ`O'#EnO!)[QlO,5;tO!3oQ`O'#GYO!3oQ`O'#GYO!3oQ`O'#G[O!3oQ`O'#G[O!,TQMhO7+(cO!,TQMhO7+(cO%.zQ!dO1G2wO%.zQ!dO1G2wO!&zQMhO,5=]O!&zQMhO,5=]",stateData:"()x~O'|OS'}OSTOS(ORQ~OPYOQYOSfOY!VOaqOdzOeyOl!POpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!uwO!xxO!|]O$W|O$niO%h}O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO&W!WO&^!XO&`!YO&b!ZO&d![O&g!]O&m!^O&s!_O&u!`O&w!aO&y!bO&{!cO(TSO(VTO(YUO(aVO(o[O~OWtO~P`OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa!wOs!nO!S!oO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!xO#W!pO#X!pO#[!zO#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O(O!{O~OP]XR]X[]Xa]Xj]Xr]X!Q]X!S]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X'z]X(a]X(r]X(y]X(z]X~O!g%RX~P(qO_!}O(V#PO(W!}O(X#PO~O_#QO(X#PO(Y#PO(Z#QO~Ox#SO!U#TO(b#TO(c#VO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T<ZO(VTO(YUO(aVO(o[O~O![#ZO!]#WO!Y(hP!Y(vP~P+}O!^#cO~P`OPYOQYOSfOd!jOe!iOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(VTO(YUO(aVO(o[O~Op#mO![#iO!|]O#i#lO#j#iO(T<[O!k(sP~P.iO!l#oO(T#nO~O!x#sO!|]O%h#tO~O#k#uO~O!g#vO#k#uO~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!]$_O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa(fX'z(fX'w(fX!k(fX!Y(fX!_(fX%i(fX!g(fX~P1qO#S$dO#`$eO$Q$eOP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX!_(gX%i(gX~Oa(gX'z(gX'w(gX!Y(gX!k(gXv(gX!g(gX~P4UO#`$eO~O$]$hO$_$gO$f$mO~OSfO!_$nO$i$oO$k$qO~Oh%VOj%dOk%dOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T$sO(VTO(YUO(a$uO(y$}O(z%POg(^P~Ol%[O~P7eO!l%eO~O!S%hO!_%iO(T%gO~O!g%mO~Oa%nO'z%nO~O!Q%rO~P%[O(U!lO~P%[O%n%vO~P%[Oh%VO!l%eO(T%gO(U!lO~Oe%}O!l%eO(T%gO~Oj$RO~O!_&PO(T%gO(U!lO(VTO(YUO`)WP~O!Q&SO!l&RO%j&VO&T&WO~P;SO!x#sO~O%s&YO!S)SX!_)SX(T)SX~O(T&ZO~Ol!PO!u&`O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO~Od&eOe&dO!x&bO%h&cO%{&aO~P<bOd&hOeyOl!PO!_&gO!u&`O!xxO!|]O%h}O%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO~Ob&kO#`&nO%j&iO(U!lO~P=gO!l&oO!u&sO~O!l#oO~O!_XO~Oa%nO'x&{O'z%nO~Oa%nO'x'OO'z%nO~Oa%nO'x'QO'z%nO~O'w]X!Y]Xv]X!k]X&[]X!_]X%i]X!g]X~P(qO!b'_O!c'WO!d'WO(U!lO(VTO(YUO~Os'UO!S'TO!['XO(e'SO!^(iP!^(xP~P@nOn'bO!_'`O(T%gO~Oe'gO!l%eO(T%gO~O!Q&SO!l&RO~Os!nO!S!oO!|<VO#T!pO#U!pO#W!pO#X!pO(U!lO(VTO(YUO(e!mO(o!sO~O!b'mO!c'lO!d'lO#V!pO#['nO#]'nO~PBYOa%nOh%VO!g#vO!l%eO'z%nO(r'pO~O!p'tO#`'rO~PChOs!nO!S!oO(VTO(YUO(e!mO(o!sO~O!_XOs(mX!S(mX!b(mX!c(mX!d(mX!|(mX#T(mX#U(mX#V(mX#W(mX#X(mX#[(mX#](mX(U(mX(V(mX(Y(mX(e(mX(o(mX~O!c'lO!d'lO(U!lO~PDWO(P'xO(Q'xO(R'zO~O_!}O(V'|O(W!}O(X'|O~O_#QO(X'|O(Y'|O(Z#QO~Ov(OO~P%[Ox#SO!U#TO(b#TO(c(RO~O![(TO!Y'WX!Y'^X!]'WX!]'^X~P+}O!](VO!Y(hX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!](VO!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~O!Y(hX~PHRO!Y([O~O!Y(uX!](uX!g(uX!k(uX(r(uX~O#`(uX#k#dX!^(uX~PJUO#`(]O!Y(wX!](wX~O!](^O!Y(vX~O!Y(aO~O#`$eO~PJUO!^(bO~P`OR#zO!Q#yO!S#{O!l#xO(aVOP!na[!naj!nar!na!]!na!p!na#R!na#n!na#o!na#p!na#q!na#r!na#s!na#t!na#u!na#v!na#x!na#z!na#{!na(r!na(y!na(z!na~Oa!na'z!na'w!na!Y!na!k!nav!na!_!na%i!na!g!na~PKlO!k(cO~O!g#vO#`(dO(r'pO!](tXa(tX'z(tX~O!k(tX~PNXO!S%hO!_%iO!|]O#i(iO#j(hO(T%gO~O!](jO!k(sX~O!k(lO~O!S%hO!_%iO#j(hO(T%gO~OP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~O!g#vO!k(gX~P! uOR(nO!Q(mO!l#xO#S$dO!|!{a!S!{a~O!x!{a%h!{a!_!{a#i!{a#j!{a(T!{a~P!#vO!x(rO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~O#k(xO~O![(zO!k(kP~P%[O(e(|O(o[O~O!S)OO!l#xO(e(|O(o[O~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S*YO!_*ZO!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op*`O}O(T&ZO~O!l+SO~O(T(vO~Op+WO!S%hO![#iO!_%iO!|]O#i#lO#j#iO(T%gO!k(sP~O!g#vO#k+XO~O!S%hOTX'z)TX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa!ja!]!ja'z!ja'w!ja!Y!ja!k!jav!ja!_!ja%i!ja!g!ja~P!:tOR#zO!Q#yO!S#{O!l#xO(aVOP!ra[!raj!rar!ra!]!ra!p!ra#R!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#v!ra#x!ra#z!ra#{!ra(r!ra(y!ra(z!ra~Oa!ra'z!ra'w!ra!Y!ra!k!rav!ra!_!ra%i!ra!g!ra~P!=[OR#zO!Q#yO!S#{O!l#xO(aVOP!ta[!taj!tar!ta!]!ta!p!ta#R!ta#n!ta#o!ta#p!ta#q!ta#r!ta#s!ta#t!ta#u!ta#v!ta#x!ta#z!ta#{!ta(r!ta(y!ta(z!ta~Oa!ta'z!ta'w!ta!Y!ta!k!tav!ta!_!ta%i!ta!g!ta~P!?rOh%VOn+gO!_'`O%i+fO~O!g+iOa(]X!_(]X'z(]X!](]X~Oa%nO!_XO'z%nO~Oh%VO!l%eO~Oh%VO!l%eO(T%gO~O!g#vO#k(xO~Ob+tO%j+uO(T+qO(VTO(YUO!^)XP~O!]+vO`)WX~O[+zO~O`+{O~O!_&PO(T%gO(U!lO`)WP~O%j,OO~P;SOh%VO#`,SO~Oh%VOn,VO!_$|O~O!_,XO~O!Q,ZO!_XO~O%n%vO~O!x,`O~Oe,eO~Ob,fO(T#nO(VTO(YUO!^)VP~Oe%}O~O%j!QO(T&ZO~P=gO[,kO`,jO~OPYOQYOSfOdzOeyOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!iuO!lZO!oYO!pYO!qYO!svO!xxO!|]O$niO%h}O(VTO(YUO(aVO(o[O~O!_!eO!u!gO$W!kO(T!dO~P!FyO`,jOa%nO'z%nO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa,pOl!OO!uwO%l!OO%m!OO%n!OO~P!IcO!l&oO~O&^,vO~O!_,xO~O&o,zO&q,{OP&laQ&laS&laY&laa&lad&lae&lal&lap&lar&las&lat&laz&la|&la!O&la!S&la!W&la!X&la!_&la!i&la!l&la!o&la!p&la!q&la!s&la!u&la!x&la!|&la$W&la$n&la%h&la%j&la%l&la%m&la%n&la%q&la%s&la%v&la%w&la%y&la&W&la&^&la&`&la&b&la&d&la&g&la&m&la&s&la&u&la&w&la&y&la&{&la'w&la(T&la(V&la(Y&la(a&la(o&la!^&la&e&lab&la&j&la~O(T-QO~Oh!eX!]!RX!^!RX!g!RX!g!eX!l!eX#`!RX~O!]!eX!^!eX~P#!iO!g-VO#`-UOh(jX!]#hX!^#hX!g(jX!l(jX~O!](jX!^(jX~P##[Oh%VO!g-XO!l%eO!]!aX!^!aX~Os!nO!S!oO(VTO(YUO(e!mO~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO#z<gO#{<hO(aVO(r$YO(y#|O(z#}O~O$O.{O~P#BwO#S$dO#`<nO$Q<nO$O(gX!^(gX~P! uOa'da!]'da'z'da'w'da!k'da!Y'dav'da!_'da%i'da!g'da~P!:tO[#mia#mij#mir#mi!]#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO(y#mi(z#mi~P#EyOn>]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]<iO!^(fX~P#BwO!^/ZO~O!g)hO$f({X~O$f/]O~Ov/^O~P!&zOx)yO(b)zO(c/aO~O!S/dO~O(y$}On%aa!Q%aa'y%aa(z%aa!]%aa#`%aa~Og%aa$O%aa~P#L{O(z%POn%ca!Q%ca'y%ca(y%ca!]%ca#`%ca~Og%ca$O%ca~P#MnO!]fX!gfX!kfX!k$zX(rfX~P!0SOp%WOPP~P!1uOr*sO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO~Os<}O!S/nO![+[O!^*pO(e<|O!^(xP~P$ [O!k/oO~P#/sO!]/pO!g#vO(r'pO!k)OX~O!k/uO~OnoX!QoX'yoX(yoX(zoX~O!g#vO!koX~P$#OOp/wO!S%hO![*^O!_%iO(T%gO!k)OP~O#k/xO~O!Y$zX!]$zX!g%RX~P!0SO!]/yO!Y)PX~P#/sO!g/{O~O!Y/}O~OpkO(T0OO~P.iOh%VOr0TO!g#vO!l%eO(r'pO~O!g+iO~Oa%nO!]0XO'z%nO~O!^0ZO~P!5iO!c0[O!d0[O(U!lO~P#$`Os!nO!S0]O(VTO(YUO(e!mO~O#[0_O~Og%aa!]%aa#`%aa$O%aa~P!1WOg%ca!]%ca#`%ca$O%ca~P!1WOj%dOk%dOl%dO(T&ZOg'mX!]'mX~O!]*yOg(^a~Og0hO~On0jO#`0iOg(_a!](_a~OR0kO!Q0kO!S0lO#S$dOn}a'y}a(y}a(z}a!]}a#`}a~Og}a$O}a~P$(cO!Q*OO'y*POn$sa(y$sa(z$sa!]$sa#`$sa~Og$sa$O$sa~P$)_O!Q*OO'y*POn$ua(y$ua(z$ua!]$ua#`$ua~Og$ua$O$ua~P$*QO#k0oO~Og%Ta!]%Ta#`%Ta$O%Ta~P!1WO!g#vO~O#k0rO~O!]+^Oa)Ta'z)Ta~OR#zO!Q#yO!S#{O!l#xO(aVOP!ri[!rij!rir!ri!]!ri!p!ri#R!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#t!ri#u!ri#v!ri#x!ri#z!ri#{!ri(r!ri(y!ri(z!ri~Oa!ri'z!ri'w!ri!Y!ri!k!riv!ri!_!ri%i!ri!g!ri~P$+oOh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op0{O%]0|O(T0zO~P$.VO!g+iOa(]a!_(]a'z(]a!](]a~O#k1SO~O[]X!]fX!^fX~O!]1TO!^)XX~O!^1VO~O[1WO~Ob1YO(T+qO(VTO(YUO~O!_&PO(T%gO`'uX!]'uX~O!]+vO`)Wa~O!k1]O~P!:tO[1`O~O`1aO~O#`1fO~On1iO!_$|O~O(e(|O!^)UP~Oh%VOn1rO!_1oO%i1qO~O[1|O!]1zO!^)VX~O!^1}O~O`2POa%nO'z%nO~O(T#nO(VTO(YUO~O#S$dO#`$eO$Q$eOP(gXR(gX[(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~Oj2SO&[2TOa(gX~P$3pOj2SO#`$eO&[2TO~Oa2VO~P%[Oa2XO~O&e2[OP&ciQ&ciS&ciY&cia&cid&cie&cil&cip&cir&cis&cit&ciz&ci|&ci!O&ci!S&ci!W&ci!X&ci!_&ci!i&ci!l&ci!o&ci!p&ci!q&ci!s&ci!u&ci!x&ci!|&ci$W&ci$n&ci%h&ci%j&ci%l&ci%m&ci%n&ci%q&ci%s&ci%v&ci%w&ci%y&ci&W&ci&^&ci&`&ci&b&ci&d&ci&g&ci&m&ci&s&ci&u&ci&w&ci&y&ci&{&ci'w&ci(T&ci(V&ci(Y&ci(a&ci(o&ci!^&cib&ci&j&ci~Ob2bO!^2`O&j2aO~P`O!_XO!l2dO~O&q,{OP&liQ&liS&liY&lia&lid&lie&lil&lip&lir&lis&lit&liz&li|&li!O&li!S&li!W&li!X&li!_&li!i&li!l&li!o&li!p&li!q&li!s&li!u&li!x&li!|&li$W&li$n&li%h&li%j&li%l&li%m&li%n&li%q&li%s&li%v&li%w&li%y&li&W&li&^&li&`&li&b&li&d&li&g&li&m&li&s&li&u&li&w&li&y&li&{&li'w&li(T&li(V&li(Y&li(a&li(o&li!^&li&e&lib&li&j&li~O!Y2jO~O!]!aa!^!aa~P#BwOs!nO!S!oO![2pO(e!mO!]'XX!^'XX~P@nO!]-]O!^(ia~O!]'_X!^'_X~P!9|O!]-`O!^(xa~O!^2wO~P'_Oa%nO#`3QO'z%nO~Oa%nO!g#vO#`3QO'z%nO~Oa%nO!g#vO!p3UO#`3QO'z%nO(r'pO~Oa%nO'z%nO~P!:tO!]$_Ov$qa~O!Y'Wi!]'Wi~P!:tO!](VO!Y(hi~O!](^O!Y(vi~O!Y(wi!](wi~P!:tO!](ti!k(tia(ti'z(ti~P!:tO#`3WO!](ti!k(tia(ti'z(ti~O!](jO!k(si~O!S%hO!_%iO!|]O#i3]O#j3[O(T%gO~O!S%hO!_%iO#j3[O(T%gO~On3dO!_'`O%i3cO~Oh%VOn3dO!_'`O%i3cO~O#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aav%aa!_%aa%i%aa!g%aa~P#L{O#k%caP%caR%ca[%caa%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%cav%ca!_%ca%i%ca!g%ca~P#MnO#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!]%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aa#`%aav%aa!_%aa%i%aa!g%aa~P#/sO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!]%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%ca#`%cav%ca!_%ca%i%ca!g%ca~P#/sO#k}aP}a[}aa}aj}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a'z}a(a}a(r}a!k}a!Y}a'w}av}a!_}a%i}a!g}a~P$(cO#k$saP$saR$sa[$saa$saj$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa'z$sa(a$sa(r$sa!k$sa!Y$sa'w$sav$sa!_$sa%i$sa!g$sa~P$)_O#k$uaP$uaR$ua[$uaa$uaj$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua'z$ua(a$ua(r$ua!k$ua!Y$ua'w$uav$ua!_$ua%i$ua!g$ua~P$*QO#k%TaP%TaR%Ta[%Taa%Taj%Tar%Ta!S%Ta!]%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta'z%Ta(a%Ta(r%Ta!k%Ta!Y%Ta'w%Ta#`%Tav%Ta!_%Ta%i%Ta!g%Ta~P#/sOa#cq!]#cq'z#cq'w#cq!Y#cq!k#cqv#cq!_#cq%i#cq!g#cq~P!:tO![3lO!]'YX!k'YX~P%[O!].tO!k(ka~O!].tO!k(ka~P!:tO!Y3oO~O$O!na!^!na~PKlO$O!ja!]!ja!^!ja~P#BwO$O!ra!^!ra~P!=[O$O!ta!^!ta~P!?rOg']X!]']X~P!,TO!]/POg(pa~OSfO!_4TO$d4UO~O!^4YO~Ov4ZO~P#/sOa$mq!]$mq'z$mq'w$mq!Y$mq!k$mqv$mq!_$mq%i$mq!g$mq~P!:tO!Y4]O~P!&zO!S4^O~O!Q*OO'y*PO(z%POn'ia(y'ia!]'ia#`'ia~Og'ia$O'ia~P%-fO!Q*OO'y*POn'ka(y'ka(z'ka!]'ka#`'ka~Og'ka$O'ka~P%.XO(r$YO~P#/sO!YfX!Y$zX!]fX!]$zX!g%RX#`fX~P!0SOp%WO(T=WO~P!1uOp4bO!S%hO![4aO!_%iO(T%gO!]'eX!k'eX~O!]/pO!k)Oa~O!]/pO!g#vO!k)Oa~O!]/pO!g#vO(r'pO!k)Oa~Og$|i!]$|i#`$|i$O$|i~P!1WO![4jO!Y'gX!]'gX~P!3tO!]/yO!Y)Pa~O!]/yO!Y)Pa~P#/sOP]XR]X[]Xj]Xr]X!Q]X!S]X!Y]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~Oj%YX!g%YX~P%2OOj4oO!g#vO~Oh%VO!g#vO!l%eO~Oh%VOr4tO!l%eO(r'pO~Or4yO!g#vO(r'pO~Os!nO!S4zO(VTO(YUO(e!mO~O(y$}On%ai!Q%ai'y%ai(z%ai!]%ai#`%ai~Og%ai$O%ai~P%5oO(z%POn%ci!Q%ci'y%ci(y%ci!]%ci#`%ci~Og%ci$O%ci~P%6bOg(_i!](_i~P!1WO#`5QOg(_i!](_i~P!1WO!k5VO~Oa$oq!]$oq'z$oq'w$oq!Y$oq!k$oqv$oq!_$oq%i$oq!g$oq~P!:tO!Y5ZO~O!]5[O!_)QX~P#/sOa$zX!_$zX%^]X'z$zX!]$zX~P!0SO%^5_OaoX!_oX'zoX!]oX~P$#OOp5`O(T#nO~O%^5_O~Ob5fO%j5gO(T+qO(VTO(YUO!]'tX!^'tX~O!]1TO!^)Xa~O[5kO~O`5lO~O[5pO~Oa%nO'z%nO~P#/sO!]5uO#`5wO!^)UX~O!^5xO~Or6OOs!nO!S*iO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!pO#W!pO#X!pO#[5}O#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O!^5|O~P%;eOn6TO!_1oO%i6SO~Oh%VOn6TO!_1oO%i6SO~Ob6[O(T#nO(VTO(YUO!]'sX!^'sX~O!]1zO!^)Va~O(VTO(YUO(e6^O~O`6bO~Oj6eO&[6fO~PNXO!k6gO~P%[Oa6iO~Oa6iO~P%[Ob2bO!^6nO&j2aO~P`O!g6pO~O!g6rOh(ji!](ji!^(ji!g(ji!l(jir(ji(r(ji~O!]#hi!^#hi~P#BwO#`6sO!]#hi!^#hi~O!]!ai!^!ai~P#BwOa%nO#`6|O'z%nO~Oa%nO!g#vO#`6|O'z%nO~O!](tq!k(tqa(tq'z(tq~P!:tO!](jO!k(sq~O!S%hO!_%iO#j7TO(T%gO~O!_'`O%i7WO~On7[O!_'`O%i7WO~O#k'iaP'iaR'ia['iaa'iaj'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia'z'ia(a'ia(r'ia!k'ia!Y'ia'w'iav'ia!_'ia%i'ia!g'ia~P%-fO#k'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka'z'ka(a'ka(r'ka!k'ka!Y'ka'w'kav'ka!_'ka%i'ka!g'ka~P%.XO#k$|iP$|iR$|i[$|ia$|ij$|ir$|i!S$|i!]$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i'z$|i(a$|i(r$|i!k$|i!Y$|i'w$|i#`$|iv$|i!_$|i%i$|i!g$|i~P#/sO#k%aiP%aiR%ai[%aia%aij%air%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai'z%ai(a%ai(r%ai!k%ai!Y%ai'w%aiv%ai!_%ai%i%ai!g%ai~P%5oO#k%ciP%ciR%ci[%cia%cij%cir%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci'z%ci(a%ci(r%ci!k%ci!Y%ci'w%civ%ci!_%ci%i%ci!g%ci~P%6bO!]'Ya!k'Ya~P!:tO!].tO!k(ki~O$O#ci!]#ci!^#ci~P#BwOP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mij#mir#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#n#mi~P%NdO#n<_O~P%NdOP$[OR#zOr<kO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO[#mij#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#r#mi~P&!lO#r<aO~P&!lOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO(aVO#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#v#mi~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO(aVO(z#}O#z#mi#{#mi$O#mi(r#mi(y#mi!]#mi!^#mi~O#x<eO~P&&uO#x#mi~P&&uO#v<cO~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO(aVO(y#|O(z#}O#{#mi$O#mi(r#mi!]#mi!^#mi~O#z#mi~P&)UO#z<gO~P&)UOa#|y!]#|y'z#|y'w#|y!Y#|y!k#|yv#|y!_#|y%i#|y!g#|y~P!:tO[#mij#mir#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi!]#mi!^#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO(y#mi(z#mi~P&,QOn>^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOr<QO!g#vO(r'pO~Ov(fX~P1qO!Q%rO~P!)[O(U!lO~P!)[O!YfX!]fX#`fX~P%2OOP]XR]X[]Xj]Xr]X!Q]X!S]X!]]X!]fX!l]X!p]X#R]X#S]X#`]X#`fX#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~O!gfX!k]X!kfX(rfX~P'LTOP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_XO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]<iO!^$qa~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<tO!S${O!_$|O!i>WO!l$xO#j<zO$W%`O$t<vO$v<xO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Ol)dO~P(!yOr!eX(r!eX~P#!iOr(jX(r(jX~P##[O!^]X!^fX~P'LTO!YfX!Y$zX!]fX!]$zX#`fX~P!0SO#k<^O~O!g#vO#k<^O~O#`<nO~Oj<bO~O#`=OO!](wX!^(wX~O#`<nO!](uX!^(uX~O#k=PO~Og=RO~P!1WO#k=XO~O#k=YO~Og=RO(T&ZO~O!g#vO#k=ZO~O!g#vO#k=PO~O$O=[O~P#BwO#k=]O~O#k=^O~O#k=cO~O#k=dO~O#k=eO~O#k=fO~O$O=gO~P!1WO$O=hO~P!1WOl=sO~P7eOk#S#T#U#W#X#[#i#j#u$n$t$v$y%]%^%h%i%j%q%s%v%w%y%{~(OT#o!X'|(U#ps#n#qr!Q'}$]'}(T$_(e~",goto:"$9Y)]PPPPPP)^PP)aP)rP+W/]PPPP6mPP7TPP=QPPP@tPA^PA^PPPA^PCfPA^PA^PA^PCjPCoPD^PIWPPPI[PPPPI[L_PPPLeMVPI[PI[PP! eI[PPPI[PI[P!#lI[P!'S!(X!(bP!)U!)Y!)U!,gPPPPPPP!-W!(XPP!-h!/YP!2iI[I[!2n!5z!:h!:h!>gPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#<e#<k#<n)aP#<q)aP#<z#<z#<zP)aP)aP)aP)aPP)aP#=Q#=TP#=T)aP#=XP#=[P)aP)aP)aP)aP)aP)a)aPP#=b#=h#=s#=y#>P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{<Y%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_S#q]<V!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU+P%]<s<tQ+t&PQ,f&gQ,m&oQ0x+gQ0}+iQ1Y+uQ2R,kQ3`.gQ5`0|Q5f1TQ6[1zQ7Y3dQ8`5gR9e7['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>R>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o>U<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hW%Ti%V*y>PS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^T)z$u){V+P%]<s<tW'[!e%i*Z-`S(}#y#zQ+c%rQ+y&SS.b(m(nQ1j,XQ5T0kR8i5u'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vS(o#p'iQ)P#zS+b%q.|S.c(n(pR3^.d'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS#q]<VQ&t!XQ&u!YQ&w![Q&x!]R2Z,vQ'a!hQ+e%wQ-h'cS.e(q+hQ2x-gW3b.h.i0w0yQ6w2yW7U3_3a3e5^U9a7V7X7ZU:q9c9d9fS;b:p:sQ;p;cR;x;qU!wQ'`-eT5y1o5{!Q_OXZ`st!V!Z#d#h%e%m&i&k&r&t&u&w(j,s,x.[2[2_]!pQ!r'`-e1o5{T#q]<V%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S(}#y#zS.b(m(n!s=l$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uS<P;|;}R<S<QQ#wbQ's!uS(e#g2US(g#m+WQ+Y%fQ+j%xQ+p&OU-r'k't'wQ.W(fU/r*]*`/wQ0S*jQ0V*lQ1O+kQ1u,aS3R-s-vQ3Z.`S4e/s/tQ4n0PS4q0R0^Q4u0WQ6W1vQ7P3US7q4`4bQ7u4fU7|4r4x4{Q8P4wQ8v6XS9q7r7sQ9u7yQ9}8RQ:O8SQ:c8wQ:y9rS:z9v9xQ;S:QQ;^:dS;f:{;PS;r;g;hS;z;s;uS<O;{;}Q<R<PQ<T<SQ=o=jQ={=tR=|=uV!wQ'`-e%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S#wz!j!r=i$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!P<d)^)q-Z.|2k2n3p3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!f$Vc#Y%q(S(Y(t(y)W)X)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!T<f)^)q-Z.|2k2n3p3v3w3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!^$Zc#Y%q(S(Y(t(y)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<WQ4_/kz>S)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^Q+T%aQ/c*Oo4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!U$yi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n=r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hQ=w>TQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hnoOXst!Z#d%m&r&t&u&w,s,x2[2_S*f${*YQ-R'OQ-S'QR4i/y%[%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f<o#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<p<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!d=S(u)c*[*e.j.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f<q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!h=U(u)c*[*e.k.l.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|<jQ-|<WR<j)qQ/q*]W4c/q4d7t9sU4d/r/s/tS7t4e4fR9s7u$e*Q$v(u)c)e*[*e*t*u+Q+R+V.l.m.o.p.q/_/g/i/k/v/|0d0e0v1e3f3g3h3}4R4[4g4h4l4|5O5R5S5W5r7]7^7_7`7e7f7h7i7j7p7w7z8U8X8Z9h9i9j9t9|:R:S:t:u:v:w:x:};R;e;j;v;y=p=}>O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.l<oQ.m<qQ.o<uQ.p<wQ.q<yQ/_)yQ/g*RQ/i*TQ/k*VQ/v*aS/|*g/mQ0d*wQ0e*xl0v+f,V.f1i1q3c6S7W8q9b:`:r;[;dQ1e,SQ3f=SQ3g=UQ3h=XS3}<l<mQ4R/PS4[/d4^Q4g/xQ4h/yQ4l/{Q4|0`Q5O0bQ5R0iQ5S0jQ5W0oQ5r1fQ7]=]Q7^=_Q7_=aQ7`=cQ7e<pQ7f<rQ7h<vQ7i<xQ7j<zQ7p4_Q7w4jQ7z4oQ8U5QQ8X5[Q8Z5_Q9h=YQ9i=TQ9j=VQ9t7vQ9|8QQ:R8VQ:S8[Q:t=^Q:u=`Q:v=bQ:w=dQ:x9pQ:}9yQ;R:PQ;e=gQ;j;QQ;v;kQ;y=hQ=p>PQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.n<sR7g<tnpOXst!Z#d%m&r&t&u&w,s,x2[2_Q!fPS#fZ#oQ&|!`W'h!o*i0]4zQ(P#SQ)Q#{Q)r$nS,l&k&nQ,q&oQ-O&{S-T'T/nQ-g'bQ.x)OQ/[)sQ0s+]Q0y+gQ2W,pQ2y-iQ3a.gQ4W/VQ5U0lQ6Q1rQ6c2SQ6d2TQ6h2VQ6j2XQ6o2aQ7Z3dQ7m4TQ8s6TQ9P6eQ9Q6fQ9S6iQ9f7[Q:a8tR:k9T#[cOPXZst!Z!`!o#d#o#{%m&k&n&o&r&t&u&w&{'T'b)O*i+]+g,p,s,x-i.g/n0]0l1r2S2T2V2X2[2_2a3d4z6T6e6f6i7[8t9TQ#YWQ#eYQ%quQ%svS%uw!gS(S#W(VQ(Y#ZQ(t#uQ(y#xQ)R$OQ)S$PQ)T$QQ)U$RQ)V$SQ)W$TQ)X$UQ)Y$VQ)Z$WQ)[$XQ)^$ZQ)`$_Q)b$aQ)g$eW)q$n)s/V4TQ+d%tQ+x&RS-Z'X2pQ-x'rS-}(T.PQ.S(]Q.U(dQ.s(xQ.v(zQ.z<UQ.|<XQ.}<YQ/O<]Q/b)}Q0p+XQ2k-UQ2n-XQ3O-qQ3V.VQ3k.tQ3p<^Q3q<_Q3r<`Q3s<aQ3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:380,context:FW,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,`Expression`,-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,160,`JSXStartCloseTag`],[`closedBy`,-2,24,168,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,165,`JSXEndTag`]],propSources:[HW],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$i&j(Wp(Z!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$i&j(Z!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$i&j(o%1l(Wp(Z!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$i&j(Wp(Z!b$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$i&j(Wp(Z!b$]#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$i&j(Wp(Z!b#p(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$i&j$Q(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(z+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$i&j#z(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(Y';W$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$i&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$d`$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(WpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$d`(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!l/.^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!k!Lf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$i&j(Wp(Z!b(U%&f#q(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$i&j(Wp(Z!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$i&j(Wp(Z!br+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!]+Jf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$i&j(Wp(Z!b!Q.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_![!L^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$i&j(Wp(Z!b#o(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$i&j(Z!b!X7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$i&j!X7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$i&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$i&j(Wp!X7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$i&j(Wp!X7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Wp!X7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Wp!X7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(WpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$i&j(WpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$i&j(Wp(Z!b!X7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Wp(Z!b!X7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Wp(Z!b!X7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Wp(Z!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$i&j(Wp(Z!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$i&j(Wp(Z!b(O0/l!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$i&j(Wp(Z!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$i&j(Z!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$i&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(Z!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$i&j(WpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(WpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Wp(Z!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$i&j$Q(Ch(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Z#t$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-<U(Wp(Z!b$n7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$k&j(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#r(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$Q(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#s(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#`*!Y$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#k(Cl$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#s(Ch$f#|$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#s(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(r(Ct$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$i&j#{(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!|$Ip$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!S0,v$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$i&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$i&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$i&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$i&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$i&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!Y#)l$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#x(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$i&j(Wp(Z!b(a+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$i&j(Wp(Z!b(T,2j$_#t(e$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$i&j(Wp(Z!b$_#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!_#Hb(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(y+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[LW,RW,zW,VW,2,3,4,5,6,7,8,9,10,11,12,13,14,IW,new KU("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new KU(`j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~`,25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>UW[e]||-1},{term:343,get:e=>WW[e]||-1},{term:95,get:e=>GW[e]||-1}],tokenPrec:15201});function qW(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function JW(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=qW(t)+qW(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function YW(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:JW(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function XW(e,t){return n=>{for(let t=Oz(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var ZW=Rj.define();typeof navigator==`object`&&navigator.platform;var QW=FL.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),$W=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},eG=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,nj.TrackDel),r=t.mapPos(this.to,1,nj.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},tG=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(Bz);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new eG(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new $W(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},nG=iN.widget({widget:new class extends nN{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),rG=iN.mark({class:`cm-snippetField`}),iG=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=iN.set(e.map(e=>(e.from==e.to?nG:rG).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},aG=Vj.define({map(e,t){return e&&e.map(t)}}),oG=Vj.define(),sG=bj.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(aG))return n.value;if(n.is(oG)&&e)return new iG(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>FL.decorations.from(e,e=>e?e.deco:iN.none)});function cG(e,t){return K.create(e.filter(e=>e.field==t).map(e=>K.range(e.from,e.to)))}function lG(e){let t=tG.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:zA.of(a)},scrollIntoView:!0,annotations:n?[ZW.of(n),Hj.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=cG(o,0)),o.some(e=>e.field>0)){let t=new iG(o,0),n=c.effects=[aG.of(t)];e.state.field(sG,!1)===void 0&&n.push(Vj.appendConfig.of([sG,pG,hG,QW]))}e.dispatch(e.state.update(c))}}function uG(e){return({state:t,dispatch:n})=>{let r=t.field(sG,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:cG(r.ranges,i),effects:aG.of(a?null:new iG(r.ranges,i)),scrollIntoView:!0})),!0}}var dG=[{key:`Tab`,run:uG(1),shift:uG(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(sG,!1)?(t(e.update({effects:aG.of(null)})),!0):!1}],fG=q.define({combine(e){return e.length?e[0]:dG}}),pG=Cj.highest(WL.compute([fG],e=>e.facet(fG)));function mG(e,t){return{...t,apply:lG(e)}}var hG=FL.domEventHandlers({mousedown(e,t){let n=t.state.field(sG,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:cG(n.ranges,i.field),effects:aG.of(n.ranges.some(e=>e.field>i.field)?new iG(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),gG=new class extends iM{};gG.startSide=1,gG.endSide=-1,typeof navigator==`object`&&navigator.userAgent;var _G=[mG("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),mG("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),mG("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),mG(`do {
|
|
338
|
+
\${}
|
|
339
|
+
} while (\${})`,{label:`do`,detail:`loop`,type:`keyword`}),mG(`while (\${}) {
|
|
340
|
+
\${}
|
|
341
|
+
}`,{label:`while`,detail:`loop`,type:`keyword`}),mG(`try {
|
|
342
|
+
\${}
|
|
343
|
+
} catch (\${error}) {
|
|
344
|
+
\${}
|
|
345
|
+
}`,{label:`try`,detail:`/ catch block`,type:`keyword`}),mG(`if (\${}) {
|
|
346
|
+
\${}
|
|
347
|
+
}`,{label:`if`,detail:`block`,type:`keyword`}),mG(`if (\${}) {
|
|
348
|
+
\${}
|
|
349
|
+
} else {
|
|
350
|
+
\${}
|
|
351
|
+
}`,{label:`if`,detail:`/ else block`,type:`keyword`}),mG(`class \${name} {
|
|
352
|
+
constructor(\${params}) {
|
|
353
|
+
\${}
|
|
354
|
+
}
|
|
355
|
+
}`,{label:`class`,detail:`definition`,type:`keyword`}),mG('import {${names}} from "${module}"\n${}',{label:`import`,detail:`named`,type:`keyword`}),mG('import ${name} from "${module}"\n${}',{label:`import`,detail:`default`,type:`keyword`})],vG=_G.concat([mG(`interface \${name} {
|
|
356
|
+
\${}
|
|
357
|
+
}`,{label:`interface`,detail:`definition`,type:`keyword`}),mG("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),mG(`enum \${name} {
|
|
358
|
+
\${}
|
|
359
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),yG=new WR,bG=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function xG(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var SG=[`FunctionDeclaration`],CG={FunctionDeclaration:xG(`function`),ClassDeclaration:xG(`class`),ClassExpression:()=>!0,EnumDeclaration:xG(`constant`),TypeAliasDeclaration:xG(`type`),NamespaceDeclaration:xG(`namespace`),VariableDefinition(e,t){e.matchContext(SG)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function wG(e,t){let n=yG.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(CR.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=CG[t.name];if(e&&e(t,a)||bG.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of wG(e,t.node))r.push(n);return!1}}),yG.set(t,r),r}var TG=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,EG=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function DG(e){let t=Oz(e.state).resolveInner(e.pos,-1);if(EG.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&TG.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)bG.has(n.name)&&(r=r.concat(wG(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:TG}}var OG=Dz.define({name:`javascript`,parser:KW.configure({props:[Gz.add({IfStatement:rB({except:/^\s*({|else\b)/}),TryStatement:rB({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:nB,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:eB({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":rB({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),sB.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":cB,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),kG={test:e=>/^JSX/.test(e.name),facet:Cz({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},AG=OG.configure({dialect:`ts`},`typescript`),jG=OG.configure({dialect:`jsx`,props:[wz.add(e=>e.isTop?[kG]:void 0)]}),MG=OG.configure({dialect:`jsx ts`,props:[wz.add(e=>e.isTop?[kG]:void 0)]},`typescript`),NG=e=>({label:e,type:`keyword`}),PG=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(NG),FG=PG.concat([`declare`,`implements`,`private`,`protected`,`public`].map(NG));function IG(e={}){let t=e.jsx?e.typescript?MG:jG:e.typescript?AG:OG,n=e.typescript?vG.concat(FG):_G.concat(PG);return new Rz(t,[OG.data.of({autocomplete:XW(EG,YW(n))}),OG.data.of({autocomplete:DG}),e.jsx?BG:[]])}function LG(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function RG(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var zG=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),BG=FL.inputHandler.of((e,t,n,r,i)=>{if((zG?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!OG.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=Oz(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=RG(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:K.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=LG(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=RG(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),VG=ez({String:Y.string,Number:Y.number,"True False":Y.bool,PropertyName:Y.propertyName,Null:Y.null,", :":Y.separator,"[ ]":Y.squareBracket,"{ }":Y.brace}),HG=sW.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:`#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O`,goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:`⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array`,maxTerm:25,nodeProps:[[`isolate`,-2,6,11,``],[`openedBy`,7,`{`,14,`[`],[`closedBy`,8,`}`,15,`]`]],propSources:[VG],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),UG=Dz.define({name:`json`,parser:HG.configure({props:[Gz.add({Object:rB({except:/^\s*\}/}),Array:rB({except:/^\s*\]/})}),sB.add({"Object Array":cB})]}),languageData:{closeBrackets:{brackets:[`[`,`{`,`"`]},indentOnInput:/^\s*[\}\]]$/}});function WG(){return new Rz(UG)}var GG=`#e5c07b`,KG=`#e06c75`,qG=`#56b6c2`,JG=`#ffffff`,YG=`#abb2bf`,XG=`#7d8799`,ZG=`#61afef`,QG=`#98c379`,$G=`#d19a66`,eK=`#c678dd`,tK=`#21252b`,nK=`#2c313a`,rK=`#282c34`,iK=`#353a42`,aK=`#3E4451`,oK=`#528bff`,sK=[FL.theme({"&":{color:YG,backgroundColor:rK},".cm-content":{caretColor:oK},".cm-cursor, .cm-dropCursor":{borderLeftColor:oK},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:aK},".cm-panels":{backgroundColor:tK,color:YG},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:rK,color:XG,border:`none`},".cm-activeLineGutter":{backgroundColor:nK},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:iK},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:iK,borderBottomColor:iK},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:nK,color:YG}}},{dark:!0}),zB(FB.define([{tag:Y.keyword,color:eK},{tag:[Y.name,Y.deleted,Y.character,Y.propertyName,Y.macroName],color:KG},{tag:[Y.function(Y.variableName),Y.labelName],color:ZG},{tag:[Y.color,Y.constant(Y.name),Y.standard(Y.name)],color:$G},{tag:[Y.definition(Y.name),Y.separator],color:YG},{tag:[Y.typeName,Y.className,Y.number,Y.changed,Y.annotation,Y.modifier,Y.self,Y.namespace],color:GG},{tag:[Y.operator,Y.operatorKeyword,Y.url,Y.escape,Y.regexp,Y.link,Y.special(Y.string)],color:qG},{tag:[Y.meta,Y.comment],color:XG},{tag:Y.strong,fontWeight:`bold`},{tag:Y.emphasis,fontStyle:`italic`},{tag:Y.strikethrough,textDecoration:`line-through`},{tag:Y.link,color:XG,textDecoration:`underline`},{tag:Y.heading,fontWeight:`bold`,color:KG},{tag:[Y.atom,Y.bool,Y.special(Y.variableName)],color:$G},{tag:[Y.processingInstruction,Y.string,Y.inserted],color:QG},{tag:Y.invalid,color:JG}]))],cK=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},lK=typeof document<`u`?document:{documentElement:{style:{}}},uK=/Edge\/(\d+)/.exec(cK.userAgent),dK=/MSIE \d/.test(cK.userAgent),fK=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cK.userAgent),pK=!!(dK||fK||uK),mK=!pK&&/gecko\/(\d+)/i.test(cK.userAgent),hK=!pK&&/Chrome\/(\d+)/.exec(cK.userAgent),gK=`webkitFontSmoothing`in lK.documentElement.style,_K=!pK&&/Apple Computer/.test(cK.vendor),vK=_K&&(/Mobile\/\w+/.test(cK.userAgent)||cK.maxTouchPoints>2),X={mac:vK||/Mac/.test(cK.platform),windows:/Win/.test(cK.platform),linux:/Linux|X11/.test(cK.platform),ie:pK,ie_version:dK?lK.documentMode||6:fK?+fK[1]:uK?+uK[1]:0,gecko:mK,gecko_version:mK?+(/Firefox\/(\d+)/.exec(cK.userAgent)||[0,0])[1]:0,chrome:!!hK,chrome_version:hK?+hK[1]:0,ios:vK,android:/Android\b/.test(cK.userAgent),webkit:gK,webkit_version:gK?+(/\bAppleWebKit\/(\d+)/.exec(cK.userAgent)||[0,0])[1]:0,safari:_K,safari_version:_K?+(/\bVersion\/(\d+(\.\d+)?)/.exec(cK.userAgent)||[0,0])[1]:0,tabSize:lK.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function yK(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var bK=Object.create(null);function xK(e,t,n){if(e==t)return!0;e||=bK,t||=bK;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function SK(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function CK(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function wK(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var TK=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},EK=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(EK||={}),DK=class extends iM{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new OK(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new AK(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=jK(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new AK(e,n,r,t,e.widget||null,!0)}static line(e){return new kK(e)}static set(e,t=!1){return lM.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};DK.none=lM.empty;var OK=class e extends DK{constructor(e){let{start:t,end:n}=jK(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?yK(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||bK}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&xK(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};OK.prototype.point=!1;var kK=class e extends DK{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&xK(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};kK.prototype.mapMode=nj.TrackBefore,kK.prototype.point=!0;var AK=class e extends DK{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?nj.TrackBefore:nj.TrackAfter:nj.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?EK.WidgetBefore:EK.WidgetAfter:EK.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&MK(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};AK.prototype.point=!0;function jK(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function MK(e,t){return e==t||!!(e&&t&&e.compare(t))}function NK(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var PK=class e extends iM{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&xK(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||bK,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return lM.of(e,t)}};PK.prototype.startSide=PK.prototype.endSide=-1;function FK(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function IK(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function LK(e,t){if(!t.anchorNode)return!1;try{return IK(e,t.anchorNode)}catch{return!1}}function RK(e){return e.nodeType==3?$K(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function zK(e,t,n,r){return n?HK(e,t,n,r,-1)||HK(e,t,n,r,1):!1}function BK(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function VK(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function HK(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:UK(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=BK(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?UK(e):0}else return!1}}function UK(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function WK(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function GK(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function KK(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function qK(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=GK(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=KK(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function JK(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var YK=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?UK(t):0),n,Math.min(e.focusOffset,n?UK(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},XK=null;X.safari&&X.safari_version>=26&&(XK=!1);function ZK(e){if(e.setActive)return e.setActive();if(XK)return e.focus(XK);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(XK==null?{get preventScroll(){return XK={preventScroll:!0},!0}}:void 0),!XK){XK=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}var QK;function $K(e,t,n=t){let r=QK||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function eq(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function tq(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function nq(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,UK(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=UK(n))}else if(n==e)return!0;else r=BK(n),n=n.parentNode}function rq(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function iq(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=UK(n)}else if(n.parentNode&&!VK(n))r=BK(n),n=n.parentNode;else return null}function aq(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!VK(n))r=BK(n)+1,n=n.parentNode;else return null}var oq=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,BK(t),n)}static after(t,n){return new e(t.parentNode,BK(t)+1,n)}},sq=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(sq||={}),cq=sq.LTR,lq=sq.RTL;function uq(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var dq=uq(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),fq=uq(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),pq=Object.create(null),mq=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);pq[t]=n,pq[n]=-t}function hq(e){return e<=247?dq[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?fq[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var gq=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,_q=class{get dir(){return this.level%2?lq:cq}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function vq(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!vq(r.inner,i.inner))return!1}return!0}var yq=[];function bq(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=hq(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),yq[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=yq[e];if(i==128)e<s-1&&t==yq[e+1]&&t&24?i=yq[e]=t:yq[e]=256;else if(i==64){let i=e+1;for(;i<s&&yq[i]==64;)i++;let a=e&&t==8||i<n&&yq[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)yq[t]=a;e=i-1}else i==8&&r==1&&(yq[e]=1);t=i,i&7&&(r=i)}}}function xq(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=pq[n=e.charCodeAt(t)])if(r<0){for(let e=s-3;e>=0;e-=3)if(mq[e+1]==-r){let n=mq[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(yq[t]=yq[mq[e]]=r),s=e;break}}else if(mq.length==189)break;else mq[s++]=t,mq[s++]=n,mq[s++]=c;else if((o=yq[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=mq[t+2];if(n&2)break;if(e)mq[t+2]|=2;else{if(n&4)break;mq[t+2]|=4}}}}}function Sq(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=yq[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(yq[o]==256)o++;else break;let l=a==1,u=l==((o<t?yq[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),yq[--t]=u;c=o}else a=o,c++}}}function Cq(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=yq[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(yq[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new _q(c,m.from,f)),wq(e,m.direction==cq==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?yq[p]!=s:yq[p]==s))break;else p++;d?Cq(e,c,p,r+1,i,d,o):c<p&&o.push(new _q(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=yq[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(yq[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new _q(m.to,c,f)),wq(e,m.direction==cq==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?yq[p-1]!=s:yq[p-1]==s))break;else p--;d?Cq(e,p,c,r+1,i,d,o):p<c&&o.push(new _q(p,c,f)),c=p}}function wq(e,t,n,r,i,a,o){let s=t%2?2:1;bq(e,i,a,r,s),xq(e,i,a,r,s),Sq(i,a,r,s),Cq(e,i,a,t,n,r,o)}function Tq(e,t,n){if(!e)return[new _q(0,0,+(t==lq))];if(t==cq&&!n.length&&!gq.test(e))return Eq(e.length);if(n.length)for(;e.length>yq.length;)yq[yq.length]=256;let r=[],i=t==cq?0:1;return wq(e,i,i,n,0,e.length,r),r}function Eq(e){return[new _q(0,e,0)]}var Dq=``;function Oq(e,t,n,r,i){let a=r.head-e.from,o=_q.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=XA(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),Dq=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?K.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):K.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function kq(e,t,n){for(let r=t;r<n;r++){let t=hq(e.charCodeAt(r));if(t==1)return cq;if(t==2||t==4)return lq}return cq}var Aq=q.define(),jq=q.define(),Mq=q.define(),Nq=q.define(),Pq=q.define(),Fq=q.define(),Iq=q.define(),Lq=q.define(),Rq=q.define(),zq=q.define({combine:e=>e.some(e=>e)}),Bq=q.define({combine:e=>e.some(e=>e)}),Vq=q.define(),Hq=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(K.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Uq=Vj.define({map:(e,t)=>e.map(t)}),Wq=Vj.define();function Gq(e,t,n){let r=e.facet(Nq);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Kq=q.define({combine:e=>!e.length||e[0]}),qq=0,Jq=q.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),Yq=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Jq.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Jq.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(qq++,t,r,i,e=>{let t=[];return o&&t.push($q.of(t=>{let n=t.plugin(e);return n?o(n):DK.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},Xq=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Gq(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Gq(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){Gq(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},Zq=q.define(),Qq=q.define(),$q=q.define(),eJ=q.define(),tJ=q.define(),nJ=q.define(),rJ=q.define();function iJ(e,t){let n=e.state.facet(rJ);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return lM.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=kq(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var aJ=q.define();function oJ(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(aJ)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var sJ=q.define(),cJ=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},lJ=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=ij.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new cJ(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},uJ=[],dJ=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return uJ}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&SK(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=BK(this.dom),r=this.length?e>0:t>0;return new oq(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof mJ)return e;return null}static get(e){return e.cmTile}},fJ=class extends dJ{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=pJ(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=pJ(r);this.length=a}};function pJ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var mJ=class extends fJ{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=dJ.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof hJ)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},hJ=class e extends fJ{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},gJ=class e extends fJ{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0&&!(a.flags&32)||n&&vJ(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):_J(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new oq(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new oq(e.dom,0);e==n.tile&&(a=!0)}}return new oq(this.dom,0)}};function _J(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=RK(t);return n[n.length-1]||null}function vJ(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var yJ=class e extends fJ{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},bJ=class e extends dJ{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?X.chrome||X.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=$K(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return X.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:WK(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},xJ=class e extends dJ{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return WK(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return WK(n,!r)}}get overrideDOMText(){if(!this.length)return zA.empty;let{root:e}=this;if(!e)return zA.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},SJ=class extends dJ{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return zA.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:WK(r,t>0==n)}},CJ=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},wJ=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},TJ=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new bJ(a.dom,a.text+e);t.parent=i}else i.append(r||bJ.of(e,this.cache.find(bJ)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?FJ(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof yJ&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(FJ(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=dJ.get(n.dom);e&&e.setDOM(FJ(n.dom))}let e=yJ.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=dJ.get(e.text);i&&this.cache.reused.set(i,2);let a=new bJ(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=MJ;let n=gJ.start(e,t||this.cache.find(gJ)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof yJ&&a.mark.eq(i))n=a,t--;else{let e=yJ.of(i,this.cache.find(yJ,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!AJ(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(X.ios&&AJ(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(LJ,0,32)||new xJ(LJ.toDOM(),0,LJ,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new wJ(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof hJ&&n.wrapper.eq(t.wrapper))e=n;else{let n=hJ.of(t.wrapper,this.cache.find(hJ,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(SJ,void 0,1);return n&&(n.flags=t),n||new SJ(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},EJ=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},DJ=[xJ,gJ,bJ,yJ,SJ,hJ,mJ];for(let e=0;e<DJ.length;e++)DJ[e].bucket=e;var OJ=class{constructor(e){this.view=e,this.buckets=DJ.map(()=>[]),this.index=DJ.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new xJ(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},kJ=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new OJ(e),this.text=new EJ(e.state.doc),this.builder=new TJ(this.cache,new mJ(e,e.contentDOM),lM.iter(n)),this.cache.reused.set(t,2),this.old=new CJ(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=PJ(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?xJ.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof SJ)this.cache.add(e);else if(e instanceof yJ)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof yJ&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof yJ&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=lM.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof AK){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?IJ.block:IJ.inline),c=jJ(a),l=this.cache.findWidget(i,t-e,c)||xJ.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=NJ(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=dJ.get(r);if(r==this.view.contentDOM)break;e instanceof yJ?t.push(e):e?.isLine()?n=e:e instanceof hJ||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new gJ(r,MJ):n||t.push(yJ.of(new OK({tagName:r.nodeName.toLowerCase(),attributes:wK(r)}),r)))}return{line:n,marks:t}}};function AJ(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function jJ(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var MJ={class:`cm-line`};function NJ(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&yK(n,e),r&&(e.class+=` `+r),e)}function PJ(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof yJ&&t.push(r.mark)}return t}function FJ(e){let t=dJ.get(e);return t&&t.setDOM(e.cloneNode()),e}var IJ=class extends TK{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};IJ.inline=new IJ(`span`),IJ.block=new IJ(`div`);var LJ=new class extends TK{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},RJ=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=DK.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new mJ(e,e.contentDOM),this.updateInner([new cJ(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!YJ(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?HJ(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new cJ(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(X.ie||X.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=GJ(i,this.decorations,e.changes);o.length&&(t=cJ.extendWithRanges(t,o));let s=qJ(a,this.blockWrappers,e.changes);return s.length&&(t=cJ.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new kJ(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&dJ.get(t.text)&&r.cache.reused.set(dJ.get(t.text),2),this.tile=r.run(e,t),zJ(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=X.chrome||X.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof XJ&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Wq)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Kq)||n.tabIndex>-1)&&LK(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),X.gecko&&s.empty&&!this.hasComposition&&BJ(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new oq(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!zK(c.node,c.offset,u.anchorNode,u.anchorOffset)||!zK(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{X.android&&X.chrome&&n.contains(u.focusNode)&&JJ(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=FK(this.view.root);if(e)if(s.empty){if(X.gecko){let e=UJ(c.node,c.offset);if(e&&e!=3){let t=(e==1?iq:aq)(c.node,c.offset);t&&(c=new oq(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new oq(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new oq(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&zK(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=FK(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=UK(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!dJ.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof XJ?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=XA(e.text,t);if(n==t)return null;let r=$K(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==sq.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof hJ)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?RK(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?sq.RTL:sq.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=RK(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=RK(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(DK.replace({widget:new XJ(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return DK.set(e)}updateDeco(){let e=1,t=this.view.state.facet($q).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(tJ).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(lM.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(eJ).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(Vq))try{if(t(this.view,e.range,e))return!0}catch(e){Gq(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=oJ(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(qK(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==sq.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);e&&e.dom.scrollIntoView({block:`nearest`})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){zJ(this.tile)}};function zJ(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)zJ(n,t)}}function BJ(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function VJ(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=iq(n.focusNode,n.focusOffset),i=aq(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=dJ.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=dJ.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function HJ(e,t,n){let r=VJ(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new cJ(c.mapPos(a),c.mapPos(o),a,o),text:i}}function UJ(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var WJ=class{constructor(){this.changes=[]}compareRange(e,t){NK(e,t,this.changes)}comparePoint(e,t){NK(e,t,this.changes)}boundChange(e){NK(e,e,this.changes)}};function GJ(e,t,n){let r=new WJ;return lM.compare(e,t,n,r),r.changes}var KJ=class{constructor(){this.changes=[]}compareRange(e,t){NK(e,t,this.changes)}comparePoint(){}boundChange(e){NK(e,e,this.changes)}};function qJ(e,t,n){let r=new KJ;return lM.compare(e,t,n,r),r.changes}function JJ(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function YJ(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var XJ=class extends TK{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function ZJ(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return K.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=XA(i.text,a,!1):s=XA(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=XA(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=XA(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return K.undirectionalRange(o+i.from,s+i.from)}function QJ(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+CM(o,a,e.state.tabSize)}function $J(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==EK.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function eY(e,t,n,r){let i=$J(e,t.head,t.assoc||-1),a=!r||i.type!=EK.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==sq.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return K.cursor(o,n?-1:1)}return K.cursor(n?i.to:i.from,n?-1:1)}function tY(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=Oq(i,a,o,s,n),l=Dq;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
|
360
|
+
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function nY(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==Zj.Space&&(i=t),i==t}}function rY(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return K.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=cY(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return K.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return K.cursor(i.pos,i.assoc,void 0,o)}}function iY(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function aY(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=iY(e,i.from,0);t!=i.from&&(a=K.cursor(t,-1))}else{let t=iY(e,i.from,-1),n=iY(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?K.undirectionalRange(i.from,i.to):K.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?K.create(n,t.mainIndex):t}function oY(e,t,n){let r=iY(e.state.facet(nJ).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:K.cursor(r,r<n.from?1:-1)}var sY=class{constructor(e,t){this.pos=e,this.assoc=t}};function cY(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new sY(0,1);if(c>e.viewState.docHeight)return new sY(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==EK.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==EK.Text){let t=QJ(e,i,l,o,s);return new sY(t,t==l.from?1:-1)}}if(l.type!=EK.Text)return c<(l.top+l.bottom)/2?new sY(l.from,1):new sY(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new lY(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var lY=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[_q.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[_q.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){let e=r+Math.floor(Math.random()*n);for(let t=0;t<n;t++){if(!a.has(e)){f=e;break adjust}e++,e==i&&(e=r)}break search}a.add(f);let p=t(f);if(p)for(let t=0;t<p.length;t++){let n=p[t],a=0;if(!(n.width==0&&p.length>1)){if(n.bottom<this.y)(!s||s.bottom<n.bottom)&&(s=n),a=1;else if(n.top>this.y)(!c||c.top>n.top)&&(c=n),a=-1;else{let e=n.left>this.x?this.x-n.left:n.right<this.x?this.x-n.right:0,t=Math.abs(e);t<u&&(l=f,u=t,d=n),e&&(a=e<0==(this.baseDir==sq.LTR)?-1:1)}a==-1&&(!o||this.baseDirAt(e[f],1))?i=f:a==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}}}if(!d){if(!c&&!s)return{i:e[0],after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==sq.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=XA(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return $K(e.dom,i,a).getClientRects()});return r.after?new sY(n[r.i+1],-1):new sY(n[r.i],1)}scanTile(e,t){if(!e.length)return new sY(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:$K(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new sY(n[r.i+1],-1):new sY(a,1)}},uY=``,dY=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(nM.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=uY}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=dJ.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=dJ.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:VK(r))||VK(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!pY(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=dJ.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(fY(e,n.node,n.offset)?t:0))}};function fY(e,t,n){for(;;){if(!t||n<UK(t))return!1;if(t==e)return!0;n=BK(t)+1,t=t.parentNode}}function pY(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=dJ.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var mY=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},hY=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=gY(e.docView.tile,t,n,0))){let t=i||a?[]:xY(e),n=new dY(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=SY(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!IK(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!IK(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((X.ios||X.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(K.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=K.create([K.cursor(n,r)])}else this.newSel=K.single(r,n)}}};function gY(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return gY(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}else if(e.isText())return{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling};else return null}function _Y(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||X.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,uY),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:zA.of(t.text.slice(a.from-e,u).split(uY))}:(d=bY(l,t.text,s-e,c))&&(X.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==``&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:zA.of(t.text.slice(d.from,d.toB).split(uY))})}else r&&(!e.hasFocus&&i.facet(Kq)||CY(r,a))&&(r=null);if(!n&&!r)return!1;if((X.mac||X.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=K.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:zA.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:X.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
361
|
+
`&&e.lineWrapping&&(r&&=K.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:zA.of([` `])}),n)return vY(e,n,r,o);if(r&&!CY(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=aY(i.facet(nJ).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function vY(e,t,n,r=-1){if(X.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(X.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&eq(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&eq(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&eq(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=yY(e,t,n);return e.state.facet(Fq).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function yY(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=iY(i.facet(nJ).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:K.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&VJ(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?K.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function bY(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function xY(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new mY(n,r)),(i!=n||a!=r)&&t.push(new mY(i,a))),t}function SY(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?K.single(n+t,r+t):null}function CY(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var wY=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,X.safari&&e.contentDOM.addEventListener(`input`,()=>null),X.gecko&&sX(e.contentDOM.ownerDocument)}handleEvent(e){!RY(this.view,e)||this.ignoreDuringComposition(e)||e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=DY(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&AY.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),X.android&&X.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(X.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(OY.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||kY.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return t.shiftKey&&X.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&TY(this.view.win)&&(t.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t},setTimeout(()=>this.flushIOSKey(),250),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,eq(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:X.safari&&!X.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function TY(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function EY(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Gq(n.state,e)}}}function DY(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(EY(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(EY(t.value,r))}}for(let e in zY)n(e).handlers.push(zY[e]);for(let e in BY)n(e).observers.push(BY[e]);return t}var OY=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],kY=`dthko`,AY=[16,17,18,20,91,92,224,225],jY=6;function MY(e){return Math.max(0,e)*.7+8}function NY(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var PY=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=JK(e.contentDOM),this.atoms=e.state.facet(nJ).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(nM.allowMultipleSelections)&&FY(e,t),this.dragging=LY(e,t)&&XY(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&NY(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=oJ(this.view);e.clientX-s.left<=r+jY?t=-MY(r-e.clientX):e.clientX+s.right>=a-jY&&(t=MY(e.clientX-a)),e.clientY-s.top<=i+jY?n=-MY(i-e.clientY):e.clientY+s.bottom>=o-jY&&(n=MY(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=aY(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function FY(e,t){let n=e.state.facet(Aq);return n.length?n[0](t):X.mac?t.metaKey:t.ctrlKey}function IY(e,t){let n=e.state.facet(jq);return n.length?n[0](t):X.mac?!t.altKey:!t.ctrlKey}function LY(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=FK(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function RY(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=dJ.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var zY=Object.create(null),BY=Object.create(null),VY=X.ie&&X.ie_version<15||X.ios&&X.webkit_version<604;function HY(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),WY(e,n.value)},50)}function UY(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function WY(e,t){t=UY(e.state,Lq,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(nX!=null&&n.selection.ranges.every(e=>e.empty)&&nX==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:K.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:K.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}BY.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,X.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},BY.wheel=BY.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},zY.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),BY.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},BY.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},BY.touchend=(e,t)=>{e.inputState.touchActive=!1},zY.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(Mq))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=ZY(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new PY(e,t,n,r)),r&&e.observer.ignore(()=>{ZK(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function GY(e,t,n,r){if(r==1)return K.cursor(t,n);if(r==2)return ZJ(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,K.undirectionalRange(a,o)}}var KY=X.ie&&X.ie_version<=11,qY=null,JY=0,YY=0;function XY(e){if(!KY)return e.detail;let t=qY,n=YY;return qY=e,YY=Date.now(),JY=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(JY+1)%3:1}function ZY(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=XY(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=GY(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=GY(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?K.range(i,a,l.assoc):K.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=QY(i,s.pos))?c:o?i.addRange(l):K.create([l])}}}function QY(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return K.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}zY.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=K.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,UY(e.state,Rq,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},zY.dragend=e=>(e.inputState.draggedContent=null,!1);function $Y(e,t,n,r){if(n=UY(e.state,Lq,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&IY(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}zY.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&$Y(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}else{let n=t.dataTransfer.getData(`Text`);if(n)return $Y(e,t,n,!0),!0}return!1},zY.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=VY?null:t.clipboardData;return n?(WY(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(HY(e),!1)};function eX(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function tX(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:UY(e,Rq,t.join(e.lineBreak)),ranges:n,linewise:r}}var nX=null;zY.copy=zY.cut=(e,t)=>{if(!LK(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=tX(e.state);if(!n&&!i)return!1;nX=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=VY?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(eX(e,n),!1)};var rX=Rj.define();function iX(e,t){let n=[];for(let r of e.facet(Iq)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:rX.of(!0)}):null}function aX(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=iX(e.state,t);n?e.dispatch(n):e.update([])}},10)}BY.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),aX(e)},BY.blur=e=>{e.observer.clearSelectionRange(),aX(e)},BY.compositionstart=BY.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},BY.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,X.chrome&&X.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},BY.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},zY.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return vY(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(X.chrome&&X.android&&(n=OY.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return X.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),X.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>BY.compositionend(e,t),20),!1};var oX=new Set;function sX(e){oX.has(e)||(oX.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var cX=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],lX=!1;function uX(){lX=!1}var dX=class{constructor(e){this.lineWrapping=e,this.doc=zA.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return cX.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=cX.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},fX=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},pX=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?EK.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof AK?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},mX=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(mX||={}),hX=.001,gX=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>hX&&(lX=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,mX.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,mX.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,mX.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=TX.build(n.setDoc(a),e,l,u);i=_X(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new bX(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break;else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new SX(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function _X(e,t){return e==t?e:(e.constructor!=t.constructor&&(lX=!0),t)}gX.prototype.size=1;var vX=DK.replace({}),yX=class extends gX{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new pX(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new pX(r,0,n,this.spaceAbove,vX):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,mX.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},bX=class e extends yX{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new pX(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof xX&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof xX?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):gX.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},xX=class e extends gX{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new pX(a.from,a.length,l,c,0)}else{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new pX(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==mX.ByHeight)return this.blockAt(e,n,r,i);if(t==mX.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new pX(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new pX(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new pX(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return gX.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=hX&&(s=-2);let c=new bX(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=gX.of(r);return(s<0||Math.abs(c.height-this.height)>=hX||Math.abs(s-this.heightMetrics(t,n).perLine)>=hX)&&(lX=!0),_X(this,c)}else(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},SX=class extends gX{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==mX.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==mX.ByPosNoHeight?mX.ByPosNoHeight:mX.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,mX.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&CX(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),CX(i,e)}return gX.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?gX.of(this.break?[e,null,t]:[e,t]):(this.left=_X(this.left,e),this.right=_X(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function CX(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof xX&&(r=e[t+1])instanceof xX&&e.splice(t-1,3,new xX(n.length+1+r.length))}var wX=5,TX=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof bX?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new bX(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new yX(a,r,n)):(a||i||r>=wX)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new bX(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new xX(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof bX)return e;let t=new bX(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof bX)&&!this.isCovered?this.nodes.push(new bX(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof bX&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return lM.spans(n,r,i,a,0),a.finish(r)}};function EX(e,t,n){let r=new DX;return lM.compare(e,t,n,r,0),r.changes}var DX=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&NK(e,t,this.changes,5)}};function OX(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function kX(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function AX(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var jX=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return DK.replace({widget:new MX(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},MX=class extends TK{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},NX=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=zX,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=sq.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(Qq).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new dX(n),this.stateDeco=BX(t),this.heightMap=gX.empty().applyChanges(this.stateDeco,zA.empty,this.heightOracle.setDoc(t.doc),[new cJ(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=DK.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new PX(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?zX:new VX(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(HX(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=BX(this.state);let r=e.changedRanges,i=cJ.extendWithRanges(r,EX(n,this.stateDeco,e?e.changes:ij.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);uX(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||lX)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Bq)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?sq.RTL:sq.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=KK(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=JK(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=rq(this.scrollParent||e.win);let m=(this.printing?AX:OX)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!kX(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),uX();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?gX.empty().applyChanges(this.stateDeco,zA.empty,this.heightOracle,[new cJ(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new fX(n.from,i))}lX&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new PX(r.lineAt(a-n*1e3,mX.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,mX.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,mX.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new PX(r.lineAt(o-1e3/2,mX.ByHeight,i,0,0).from,r.lineAt(o+n+1e3/2,mX.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new PX(this.heightMap.lineAt(n,mX.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,mX.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,mX.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,mX.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new jX(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=sq.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=RX(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(K.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new jX(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=EK.Text)return;let i=FX(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=LX(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=IX(i,n),l=IX(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=LX(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=IX(i,f),l=IX(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=LX(r,n)-LX(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){jX.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=DK.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];lM.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||HX(this.heightMap.lineAt(e,mX.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||HX(this.heightMap.lineAt(this.scaler.fromDOM(e),mX.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return HX(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},PX=class{constructor(e,t){this.from=e,this.to=t}};function FX(e,t,n){let r=[],i=e,a=0;return lM.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function IX({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function LX(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function RX(e,t){for(let n of e)if(t(n))return n}var zX={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function BX(e){let t=e.facet($q).filter(e=>typeof e!=`function`),n=e.facet(tJ).filter(e=>typeof e!=`function`);return n.length&&t.push(lM.join(n)),t}var VX=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,mX.ByPos,e,0,0).top,o=t.lineAt(i,mX.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function HX(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new pX(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>HX(e,t)):e._content)}var UX=q.define({combine:e=>e.join(` `)}),WX=q.define({combine:e=>e.indexOf(!0)>-1}),GX=OM.newName(),KX=OM.newName(),qX=OM.newName(),JX={"&light":`.`+KX,"&dark":`.`+qX};function YX(e,t,n){return new OM(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var XX=YX(`.`+GX,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{backgroundImage:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)`,backgroundPosition:`center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},JX),ZX={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},QX=X.ie&&X.ie_version<=11,$X=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new YK,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(X.ie&&X.ie_version<=11||X.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&X.android&&e.constructor.EDIT_CONTEXT!==!1&&!(X.chrome&&X.chrome_version<126)&&(this.editContext=new rZ(e),e.state.facet(Kq)&&(e.contentDOM.editContext=this.editContext.editContext)),QX&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type==`change`||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Kq)?n.root.activeElement!=this.dom:!LK(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(X.ie&&X.ie_version<=11||X.android&&X.chrome)&&!n.state.selection.main.empty&&r.focusNode&&zK(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=FK(e.root);if(!t)return!1;let n=X.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&nZ(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=LK(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&nq(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,ZX),QX&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),QX&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&eq(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&LK(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new hY(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=_Y(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!CY(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=eZ(t,e.previousSibling||e.target.previousSibling,-1),r=eZ(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type==`characterData`)return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Kq)!=e.state.facet(Kq)&&(e.view.contentDOM.editContext=e.state.facet(Kq)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function eZ(e,t,n){for(;t;){let r=dJ.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function tZ(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return zK(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function nZ(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return tZ(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?tZ(e,n):null}var rZ=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=bY(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=K.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));CY(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:zA.of(n.text.slice(l.from,l.toB).split(`
|
|
362
|
+
`))};if((X.mac||X.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:zA.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);vY(e,u,K.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(DK.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Wq.of(DK.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=FK(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},iZ=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||tq(e.parent)||document,this.viewState=new NX(this,e.state||nM.create(e)),e.scrollTo&&e.scrollTo.is(Uq)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Jq).map(e=>new Xq(e));for(let e of this.plugins)e.update(this);this.observer=new $X(this),this.inputState=new wY(this),this.inputState.ensureHandlers(this.plugins),this.docView=new RJ(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Hj?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(rX))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=iX(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(nM.phrases)!=this.state.facet(nM.phrases))return this.setState(a);i=lJ.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new Hq(t.empty?t:K.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(Uq)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=sZ.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(sJ)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(UX)!=i.state.facet(UX)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(Pq))try{e(i)}catch(e){Gq(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!_Y(this,u)&&l.force&&eq(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new NX(this,e),this.plugins=e.facet(Jq).map(e=>new Xq(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new RJ(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Jq),n=e.state.facet(Jq);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new Xq(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){Gq(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0)if(rq(n||this.win))i=-1,a=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}this.updateState=1;let o=this.viewState.measure();if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let s=[];o&4||([this.measureRequests,s]=[s,this.measureRequests]);let c=s.map(e=>{try{return e.read(this)}catch(e){return Gq(this.state,e),oZ}}),l=lJ.create(this,this.state,[]),u=!1;l.flags|=o,t?t.flags|=o:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),u=this.docView.update(l),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(c[e]!=oZ)try{let t=s[e];t.write&&t.write(c[e],this)}catch(e){Gq(this.state,e)}if(u&&this.docView.updateSelection(!0),!l.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let e=((i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-a)/this.scaleY;if((e>1||e<-1)&&!(X.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Pq))e(t)}get themeClasses(){return GX+` `+(this.state.facet(WX)?qX:KX)+` `+this.state.facet(UX)}updateAttrs(){let e=cZ(this,Zq,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Kq)?`true`:`false`,class:`cm-content`,style:`${X.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),cZ(this,Qq,t);let n=this.observer.ignore(()=>{let n=CK(this.contentDOM,this.contentAttrs,t),r=CK(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(sJ);let t=this.state.facet(e.cspNonce);OM.mount(this.root,this.styleModules.concat(XX).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return oY(this,e,tY(this,e,t,n))}moveByGroup(e,t){return oY(this,e,tY(this,e,t,t=>nY(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return K.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return eY(this,e,t,n)}moveVertically(e,t,n){return oY(this,e,rY(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=cY(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),cY(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[_q.find(r,e-n.from,-1,t)];return this.docView.coordsAt(e,t,i.dir==sq.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(zq)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>aZ)return Eq(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||vq(r.isolates,n=iJ(this,e))))return r.order;n||=iJ(this,e);let r=Tq(e.text,t,n);return this.bidiCache.push(new sZ(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||X.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{ZK(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Uq.of(new Hq(typeof e==`number`?K.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Uq.of(new Hq(K.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Yq.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Yq.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=OM.newName(),r=[UX.of(n),sJ.of(YX(`.${n}`,e))];return t&&t.dark&&r.push(WX.of(!0)),r}static baseTheme(e){return Cj.lowest(sJ.of(YX(`.`+GX,e,JX)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&dJ.get(t)||dJ.get(e))?.root?.view||null}};iZ.styleModule=sJ,iZ.inputHandler=Fq,iZ.clipboardInputFilter=Lq,iZ.clipboardOutputFilter=Rq,iZ.scrollHandler=Vq,iZ.focusChangeEffect=Iq,iZ.perLineTextDirection=zq,iZ.exceptionSink=Nq,iZ.updateListener=Pq,iZ.editable=Kq,iZ.mouseSelectionStyle=Mq,iZ.dragMovesSelection=jq,iZ.clickAddsSelectionRange=Aq,iZ.decorations=$q,iZ.blockWrappers=eJ,iZ.outerDecorations=tJ,iZ.atomicRanges=nJ,iZ.bidiIsolatedRanges=rJ,iZ.cursorScrollMargin=q.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),iZ.scrollMargins=aJ,iZ.darkTheme=WX,iZ.cspNonce=q.define({combine:e=>e.length?e[0]:``}),iZ.contentAttributes=Qq,iZ.editorAttributes=Zq,iZ.lineWrapping=iZ.contentAttributes.of({class:`cm-lineWrapping`}),iZ.announce=Vj.define();var aZ=4096,oZ={},sZ=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:sq.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function cZ(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&yK(a,n)}return n}var lZ=X.mac?`mac`:X.windows?`win`:X.linux?`linux`:`key`;function uZ(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function dZ(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var fZ=Cj.default(iZ.domEventHandlers({keydown(e,t){return bZ(hZ(t.state),e,t,`editor`)}})),pZ=q.define({enables:fZ}),mZ=new WeakMap;function hZ(e){let t=e.facet(pZ),n=mZ.get(t);return n||mZ.set(t,n=vZ(t.reduce((e,t)=>e.concat(t),[]))),n}var gZ=null,_Z=4e3;function vZ(e,t=lZ){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>uZ(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=gZ={view:t,prefix:n,scope:e};return setTimeout(()=>{gZ==r&&(gZ=null)},_Z),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,yZ))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var yZ=null;function bZ(e,t,n,r){yZ=t;let i=LM(t),a=ej($A(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;gZ&&gZ.view==n&&gZ.scope==r&&(o=gZ.prefix+` `,AY.indexOf(t.keyCode)<0&&(c=!0,gZ=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+dZ(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(X.windows&&t.ctrlKey&&t.altKey)&&!(X.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=jM[t.keyCode])&&p!=i?(d(f[o+dZ(p,t,!0)])||t.shiftKey&&(m=MM[t.keyCode])!=i&&m!=p&&d(f[o+dZ(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+dZ(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),yZ=null,s}var xZ=class e{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className?(this.adjust(e),!0):!1}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,this.width!=null&&(e.style.width=this.width+`px`),e.style.height=this.height+`px`}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(t,n,r){if(r.empty){let i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let a=SZ(t);return[new e(n,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}else return wZ(t,n,r)}};function SZ(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==sq.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function CZ(e,t,n,r){let i=e.coordsAtPos(t,n*2);if(!i)return r;let a=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=e.posAtCoords({x:a.left+1,y:o}),c=e.posAtCoords({x:a.right-1,y:o});return s==null||c==null?r:{from:Math.max(r.from,Math.min(s,c)),to:Math.min(r.to,Math.max(s,c))}}function wZ(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),a=e.textDirection==sq.LTR,o=e.contentDOM,s=o.getBoundingClientRect(),c=SZ(e),l=o.querySelector(`.cm-line`),u=l&&window.getComputedStyle(l),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),p=$J(e,r,1),m=$J(e,i,-1),h=p.type==EK.Text?p:null,g=m.type==EK.Text?m:null;if(h&&(e.lineWrapping||p.widgetLineBreaks)&&(h=CZ(e,r,1,h)),g&&(e.lineWrapping||m.widgetLineBreaks)&&(g=CZ(e,i,-1,g)),h&&g&&h.from==g.from&&h.to==g.to)return v(y(n.from,n.to,h));{let t=h?y(n.from,null,h):b(p,!1),r=g?y(null,n.to,g):b(m,!0),i=[];return(h||p).to<(g||m).from-(h&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(_(d,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==EK.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function _(e,n,r,i){return new xZ(t,e-c.left,n-c.top,Math.max(0,r-e),i-n)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(_(n[i],e,n[i+1],t));return r}function y(t,n,r){let i=1e9,o=-1e9,s=[];function c(t,n,c,l,u){let p=e.coordsAtPos(t,t==r.to?-2:2),m=e.coordsAtPos(c,c==r.from?2:-2);!p||!m||(i=Math.min(p.top,m.top,i),o=Math.max(p.bottom,m.bottom,o),u==sq.LTR?s.push(a&&n?d:p.left,a&&l?f:m.right):s.push(!a&&l?d:m.left,!a&&n?f:p.right))}let l=t??r.from,u=n??r.to;for(let r of e.visibleRanges)if(r.to>l&&r.from<u)for(let i=Math.max(r.from,l),a=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let o of e.bidiSpans(r)){let e=o.from+r.from,s=o.to+r.from;if(e>=a)break;s>i&&c(Math.max(e,i),t==null&&e<=l,Math.min(s,a),n==null&&s>=u,o.dir)}if(i=r.to+1,i>=a)break}return s.length==0&&c(l,t==null,u,n==null,e.textDirection),{top:i,bottom:o,horizontal:s}}function b(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function TZ(e,t){return e.constructor==t.constructor&&e.eq(t)}var EZ=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement(`div`)),this.dom.classList.add(`cm-layer`),t.above&&this.dom.classList.add(`cm-layer-above`),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute(`aria-hidden`,`true`),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(DZ)!=e.state.facet(DZ)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(DZ);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>!TZ(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,X.webkit&&(this.dom.style.display=this.dom.firstChild?``:`none`)}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},DZ=q.define();function OZ(e){return[Yq.define(t=>new EZ(t,e)),DZ.of(e)]}var kZ=q.define({combine(e){return rM(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function AZ(e={}){return[kZ.of(e),MZ,PZ,IZ,Bq.of(!0)]}function jZ(e){return e.startState.facet(kZ)!=e.state.facet(kZ)}var MZ=OZ({above:!0,markers(e){let{state:t}=e,n=t.facet(kZ),r=[];for(let i of t.selection.ranges){let a=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(a&&X.ios&&n.iosSelectionHandles)){let t=a?`cm-cursor cm-cursor-primary`:`cm-cursor cm-cursor-secondary`,n=i.empty?i:K.cursor(i.head,i.assoc);for(let i of xZ.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`);let n=jZ(e);return n&&NZ(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){NZ(t.state,e)},class:`cm-cursorLayer`});function NZ(e,t){t.style.animationDuration=e.facet(kZ).cursorBlinkRate+`ms`}var PZ=OZ({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let n of r)if(!n.empty)for(let r of xZ.forRange(e,`cm-selectionBackground`,n))t.push(r);if(X.ios&&!n.empty&&e.state.facet(kZ).iosSelectionHandles){for(let r of xZ.forRange(e,`cm-selectionHandle cm-selectionHandle-start`,K.cursor(n.from,1)))t.push(r);for(let r of xZ.forRange(e,`cm-selectionHandle cm-selectionHandle-end`,K.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||jZ(e)},class:`cm-selectionLayer`}),FZ=X.gecko&&X.gecko_version>=153?`#ffffff01`:`transparent`,IZ=Cj.highest(iZ.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`${FZ} !important`},caretColor:`transparent !important`},".cm-content":{caretColor:`transparent !important`,"& :focus":{caretColor:`initial !important`,"&::selection, & ::selection":{backgroundColor:`Highlight !important`}}}}));/x/.unicode;var LZ=class extends iM{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};LZ.prototype.elementClass=``,LZ.prototype.toDOM=void 0,LZ.prototype.mapMode=nj.TrackBefore,LZ.prototype.startSide=LZ.prototype.endSide=-1,LZ.prototype.point=!0;var RZ=q.define(),zZ=q.define(),BZ=q.define(),VZ=q.define({combine:e=>e.some(e=>e)});function HZ(e){let t=[UZ];return e&&e.fixed===!1&&t.push(VZ.of(!0)),t}var UZ=Yq.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(BZ).map(t=>new qZ(e,t)),this.fixed=!e.state.facet(VZ);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(VZ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=lM.iter(this.view.state.facet(RZ),this.view.viewport.from),r=[],i=this.gutters.map(e=>new KZ(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==EK.Text&&t){GZ(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==EK.Text){GZ(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(BZ),n=e.state.facet(BZ),r=e.docChanged||e.heightChanged||e.viewportChanged||!lM.eq(e.startState.facet(RZ),e.state.facet(RZ),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new qZ(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>iZ.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==sq.LTR?{left:r,right:i}:{right:r,left:i}})});function WZ(e){return Array.isArray(e)?e:[e]}function GZ(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var KZ=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=lM.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new JZ(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];GZ(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(zZ)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},qZ=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=WZ(t.markers(e)),t.initialSpacer&&(this.spacer=new JZ(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=WZ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!lM.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},JZ=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),YZ(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function YZ(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var XZ=q.define(),ZZ=q.define(),QZ=q.define({combine(e){return rM(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),$Z=class extends LZ{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function eQ(e,t){return e.state.facet(QZ).formatNumber(t,e.state)}var tQ=BZ.compute([QZ],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(XZ)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new $Z(eQ(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(ZZ)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(QZ)!=e.state.facet(QZ),initialSpacer(e){return new $Z(eQ(e,rQ(e.state.doc.lines)))},updateSpacer(e,t){let n=eQ(t.view,rQ(t.view.state.doc.lines));return n==e.number?e:new $Z(n)},domEventHandlers:e.facet(QZ).domEventHandlers,side:`before`}));function nQ(e={}){return[QZ.of(e),HZ(),tQ]}function rQ(e){let t=9;for(;t<e;)t=t*10+9;return t}var iQ=new class extends LZ{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},aQ=RZ.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(iQ.range(i)))}return lM.of(t)});function oQ(){return aQ}var sQ={key:0,class:`flex items-center justify-between px-3 py-1.5 text-[11px] text-muted-foreground bg-[#1e1e2e]/80 border-b border-base uppercase tracking-wider font-semibold`},cQ={key:0,class:`text-primary bg-primary/15 px-1.5 py-0.5 rounded text-[10px] tracking-normal font-medium`},lQ=TA(Tr({__name:`CodeEditor`,props:{modelValue:{},language:{},readonly:{type:Boolean},label:{},height:{},theme:{},lineNumbers:{type:Boolean}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=k(null),o=k(null),s=A(null),c=k(!1),l=L(()=>{switch(r.language){case`json`:return`JSON`;case`javascript`:case`js`:return`JS`;case`typescript`:case`ts`:return`TS`;case`vue`:return`Vue`;default:return``}});function u(){switch(r.language){case`json`:return WG();case`javascript`:case`js`:return IG();case`typescript`:case`ts`:return IG({typescript:!0});case`vue`:return IG();default:return[]}}function d(e){let t=[];return r.lineNumbers!==!1&&t.push(nQ(),oQ(),NB()),t.push(OV(),AZ(),aB(),QB(),zB(HB,{fallback:!0}),pZ.of([...FU,...qV,...wB,IU]),u(),iZ.updateListener.of(e=>{if(e.docChanged){let t=e.state.doc.toString();i(`update:modelValue`,t),i(`change`,t)}e.focusChanged&&(c.value=e.view.hasFocus,c.value?i(`focus`):i(`blur`))}),iZ.theme({"&":{height:r.height||`100%`,fontSize:`12px`,borderRadius:`6px`,overflow:`hidden`},".cm-scroller":{fontFamily:`"DM Mono", "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,lineHeight:`1.6`},".cm-gutters":{minWidth:`32px`}})),r.theme!==`light`&&t.push(sK),r.readonly&&t.push(nM.readOnly.of(!0)),t.push(iZ.editable.of(!r.readonly)),nM.create({doc:e,extensions:t})}function f(){c.value=!0}function p(){setTimeout(()=>{s.value&&!s.value.hasFocus&&(c.value=!1)},50)}return Vr(()=>{if(!o.value)return;let e=d(r.modelValue??``);s.value=new iZ({state:e,parent:o.value})}),Hr(()=>{s.value&&=(s.value.destroy(),null)}),qn(()=>r.modelValue,e=>{s.value&&e!==s.value.state.doc.toString()&&s.value.dispatch({changes:{from:0,to:s.value.state.doc.length,insert:e??``}})}),qn(()=>r.readonly,e=>{s.value&&s.value.dispatch({effects:nM.readOnly.reconfigure(e?[nM.readOnly.of(!0),iZ.editable.of(!1)]:[])})}),t({getEditor:()=>s.value,focus:()=>s.value?.focus(),getValue:()=>s.value?.state.doc.toString()??``}),(t,n)=>(M(),N(`div`,{ref_key:`editorContainer`,ref:a,class:D([`flex flex-col border border-base rounded-lg overflow-hidden bg-[#1e1e2e] transition-colors`,{"border-active ring-2 ring-primary-500/15":c.value,"is-readonly":e.readonly}])},[e.label?(M(),N(`div`,sQ,[P(`span`,null,O(e.label),1),e.language?(M(),N(`span`,cQ,O(l.value),1)):I(``,!0)])):I(``,!0),P(`div`,{ref_key:`editorEl`,ref:o,class:`flex-1 min-h-[100px] overflow-auto`,onFocusin:f,onFocusout:p},null,544)],2))}}),[[`__scopeId`,`data-v-505a74e7`]]),uQ={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},dQ={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-3xl mx-4 overflow-hidden flex flex-col animate-scale-in`,style:{"max-height":`85vh`}},fQ={class:`flex items-center justify-between px-4 py-3 border-b border-base flex-shrink-0`},pQ={class:`flex items-center gap-2 min-w-0`},mQ={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center flex-shrink-0`},hQ={class:`min-w-0`},gQ={class:`text-sm font-semibold text-foreground`},_Q={class:`text-[11px] text-muted-foreground font-mono truncate`},vQ={class:`flex-1 overflow-hidden p-4 min-h-0`},yQ={key:0,class:`flex items-center justify-center h-full py-12`},bQ={key:1,class:`flex items-center gap-2 p-3 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},xQ={key:0,class:`px-4 pb-2 flex-shrink-0`},SQ={class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},CQ={class:`flex items-center justify-end gap-2 px-4 py-3 bg-secondary border-t border-base flex-shrink-0`},wQ=[`disabled`],TQ=[`disabled`],EQ={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},DQ=TA(Tr({__name:`EditDialog`,props:{open:{type:Boolean},filePath:{},resourceType:{},title:{},language:{},onRead:{type:Function},onSave:{type:Function}},emits:[`close`,`saved`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(!1),o=k(!1),s=k(``);async function c(){if(n.filePath){a.value=!0,s.value=``;try{let e=await n.onRead(n.resourceType,n.filePath);e.success&&e.content!==void 0?i.value=e.content:s.value=e.error||`Failed to load file`}catch(e){s.value=e instanceof Error?e.message:`Failed to load file`}finally{a.value=!1}}}qn(()=>n.open,e=>{e&&(i.value=``,s.value=``,c())});function l(){o.value||r(`close`)}async function u(){o.value=!0,s.value=``;try{let e=await n.onSave(n.resourceType,{path:n.filePath,content:i.value});e.success?(r(`saved`),r(`close`)):e.errors?.length&&(s.value=e.errors[0])}catch(e){s.value=e instanceof Error?e.message:`Failed to save file`}finally{o.value=!1}}return(t,n)=>(M(),wa(sr,{to:`body`},[e.open?(M(),N(`div`,uQ,[P(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:l}),P(`div`,dQ,[P(`div`,fQ,[P(`div`,pQ,[P(`div`,mQ,[F(j(B),{icon:`lucide:pencil`,size:15,class:`text-primary`})]),P(`div`,hQ,[P(`div`,gQ,O(e.title||`Edit File`),1),P(`div`,_Q,O(e.filePath),1)])]),P(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer flex-shrink-0`,onClick:l},[F(j(B),{icon:`lucide:x`,size:14})])]),P(`div`,vQ,[a.value?(M(),N(`div`,yQ,[...n[1]||=[P(`div`,{class:`size-5 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),P(`span`,{class:`ml-2 text-xs text-muted-foreground`},`Loading...`,-1)]])):s.value&&!i.value?(M(),N(`div`,bQ,[F(j(B),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Ma(` `+O(s.value),1)])):(M(),wa(lQ,{key:2,modelValue:i.value,"onUpdate:modelValue":n[0]||=e=>i.value=e,language:e.language||`typescript`,height:`calc(85vh - 160px)`,label:`Source`},null,8,[`modelValue`,`language`]))]),s.value&&i.value&&!a.value?(M(),N(`div`,xQ,[P(`div`,SQ,[F(j(B),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Ma(` `+O(s.value),1)])])):I(``,!0),P(`div`,CQ,[P(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:o.value,onClick:l},` Cancel `,8,wQ),P(`button`,{type:`button`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:o.value||a.value,onClick:u},[o.value?(M(),N(`div`,EQ)):(M(),wa(j(B),{key:1,icon:`lucide:save`,size:12})),Ma(` `+O(o.value?`Saving...`:`Save`),1)],8,TQ)])])])):I(``,!0)]))}}),[[`__scopeId`,`data-v-a116e6e3`]]),OQ={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},kQ={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden animate-scale-in`},AQ={class:`flex items-center justify-between px-4 py-3 border-b border-base`},jQ={class:`flex items-center gap-2`},MQ={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center`},NQ={class:`text-sm font-semibold text-foreground`},PQ=[`disabled`],FQ={key:0,class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},IQ={class:`flex items-center justify-end gap-2 pt-1`},LQ=[`disabled`],RQ=[`disabled`],zQ={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},BQ=TA(Tr({__name:`EnvEditDialog`,props:{open:{type:Boolean},initialKey:{},initialValue:{},isNew:{type:Boolean},onSave:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(``),o=k(!1),s=k(``);qn(()=>n.open,e=>{e&&(i.value=n.initialKey||``,a.value=n.initialValue||``,s.value=``)});function c(){o.value||r(`close`)}async function l(){if(!i.value.trim()){s.value=`Key is required`;return}o.value=!0,s.value=``;try{await n.onSave(i.value.trim(),a.value)?r(`close`):s.value=`Failed to save env var`}catch(e){s.value=e instanceof Error?e.message:`Failed to save`}finally{o.value=!1}}return(t,n)=>(M(),wa(sr,{to:`body`},[e.open?(M(),N(`div`,OQ,[P(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:c}),P(`div`,kQ,[P(`div`,AQ,[P(`div`,jQ,[P(`div`,MQ,[F(j(B),{icon:`lucide:terminal`,size:15,class:`text-primary`})]),P(`div`,null,[P(`div`,NQ,O(e.isNew?`Add Env Var`:`Edit Env Var`),1),n[2]||=P(`div`,{class:`text-[11px] text-muted-foreground`},`Environment variable key/value pair`,-1)])]),P(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:c},[F(j(B),{icon:`lucide:x`,size:14})])]),P(`form`,{class:`p-4 space-y-3`,onSubmit:Cs(l,[`prevent`])},[P(`div`,null,[n[3]||=P(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Key `,-1),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,disabled:!e.isNew,placeholder:`DATABASE_URL`,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono disabled:opacity-60 disabled:cursor-not-allowed`},null,8,PQ),[[ms,i.value]])]),P(`div`,null,[n[4]||=P(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Value `,-1),zn(P(`input`,{"onUpdate:modelValue":n[1]||=e=>a.value=e,type:`text`,placeholder:`postgresql://...`,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[ms,a.value]])]),s.value?(M(),N(`div`,FQ,[F(j(B),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Ma(` `+O(s.value),1)])):I(``,!0),P(`div`,IQ,[P(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:o.value,onClick:c},` Cancel `,8,LQ),P(`button`,{type:`submit`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:o.value||!i.value.trim()},[o.value?(M(),N(`div`,zQ)):(M(),wa(j(B),{key:1,icon:`lucide:save`,size:12})),Ma(` `+O(o.value?`Saving...`:`Save`),1)],8,RQ)])],32)])])):I(``,!0)]))}}),[[`__scopeId`,`data-v-6b463217`]]),VQ={key:0,class:`absolute inset-0 rounded-full bg-primary/40 animate-ping opacity-30`,style:{"animation-duration":`2s`}},HQ={key:0,class:`fixed inset-0 z-50 flex justify-end`},UQ={class:`relative w-full max-w-sm h-full bg-background border-l border-base shadow-2xl flex flex-col`},WQ={class:`flex items-center justify-between px-3 py-2.5 border-b border-base bg-background/50`},GQ={class:`flex items-center gap-2`},KQ={class:`size-6 rounded-full bg-primary/10 flex items-center justify-center`},qQ={class:`flex flex-col`},JQ={class:`text-[9px] text-muted-foreground`},YQ={class:`flex items-center gap-1`},XQ={key:0,class:`px-3 py-2.5 border-b border-base bg-background/30 space-y-2`},ZQ=[`placeholder`],QQ=[`placeholder`],$Q={key:1,class:`px-3 py-2 bg-warning/10 border-b border-warning/20`},e$={class:`text-[10px] text-warning flex items-start gap-1.5`},t$={key:0,class:`size-5 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5`},n$={class:`max-w-[85%] space-y-1.5`},r$={key:0,class:`whitespace-pre-wrap`},i$={key:1,class:`flex gap-1 py-0.5`},a$={key:0,class:`space-y-1`},o$={key:1,class:`space-y-1`},s$={key:1,class:`size-5 rounded-full bg-primary flex items-center justify-center flex-shrink-0 mt-0.5`},c$={key:0,class:`pt-2`},l$={class:`flex flex-wrap gap-1.5`},u$=[`onClick`],d$={class:`px-3 py-2.5 border-t border-base bg-background/50`},f$={class:`flex items-end gap-2`},p$=[`placeholder`],m$=[`disabled`],h$=TA(Tr({__name:`FloatingAiButton`,props:{panelContext:{},resourceSummary:{},sendChatStream:{type:Function},onRefresh:{type:Function},aiEnabled:{type:Boolean}},setup(e){let t=e,n=k(!1),r=k([]),i=k(``),a=k(!1),o=k(null),s=k(!1),c=k(localStorage.getItem(`ubean_ai_api_key`)||``),l=k(localStorage.getItem(`ubean_ai_api_base`)||``),u=k(localStorage.getItem(`ubean_ai_model`)||``),d=L(()=>!!c.value||!!t.aiEnabled),f=L(()=>{let e=t.panelContext.toLowerCase();return e.includes(`page`)?[{text:`Create a page /dashboard`,icon:`lucide:plus`},{text:`List all pages`,icon:`lucide:list`},{text:`How do I add a layout to a page?`,icon:`lucide:help-circle`}]:e.includes(`api`)?[{text:`Create a GET /api/users route`,icon:`lucide:plus`},{text:`List all API routes`,icon:`lucide:list`},{text:`How do I validate request body?`,icon:`lucide:help-circle`}]:e.includes(`layout`)?[{text:`Create a layout admin`,icon:`lucide:plus`},{text:`How do layouts work?`,icon:`lucide:help-circle`}]:e.includes(`middleware`)?[{text:`Create an auth middleware`,icon:`lucide:plus`},{text:`How do global middlewares work?`,icon:`lucide:help-circle`}]:e.includes(`cron`)?[{text:`Create a daily cleanup cron`,icon:`lucide:plus`},{text:`How do I schedule tasks?`,icon:`lucide:help-circle`}]:[{text:`List all resources`,icon:`lucide:list`},{text:`Show project info`,icon:`lucide:info`},{text:`Create a page /about`,icon:`lucide:plus`}]});function p(){let e=`Current DevTools panel: ${t.panelContext}.`;return t.resourceSummary&&(e+=`\n${t.resourceSummary}`),e+=`
|
|
363
|
+
When the user asks to "create" or "add" something, use the create_resource tool. When they ask to "list" or "show" things, use list_resources. Be concise.`,e}function m(){En(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})}function h(){c.value?localStorage.setItem(`ubean_ai_api_key`,c.value):localStorage.removeItem(`ubean_ai_api_key`),l.value?localStorage.setItem(`ubean_ai_api_base`,l.value):localStorage.removeItem(`ubean_ai_api_base`),u.value?localStorage.setItem(`ubean_ai_model`,u.value):localStorage.removeItem(`ubean_ai_model`),s.value=!1}function g(e,t){return`${e}(${Object.entries(t).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}: ${String(t)}`).join(`, `)})`}function _(e){if(!e)return``;if(typeof e==`object`){let t=e;return t.success===!1&&t.errors?`❌ ${t.errors.join(`, `)}`:t.created&&Array.isArray(t.created)?`✅ Created: ${t.created.join(`, `)}`:t.deleted&&Array.isArray(t.deleted)?`🗑️ Deleted: ${t.deleted.join(`, `)}`:t.data&&typeof t.data==`object`?Object.entries(t.data).slice(0,10).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(`
|
|
364
|
+
`):t.content&&typeof t.content==`string`?t.content.slice(0,300):JSON.stringify(e,null,2).slice(0,300)}return String(e)}async function v(e){let n=(e??i.value).trim();if(!n||a.value)return;let o={role:`user`,content:n,timestamp:Date.now()};r.value.push(o),i.value=``,a.value=!0;let s={role:`assistant`,content:``,timestamp:Date.now()};r.value.push(s),m();try{let e={};c.value&&(e.apiKey=c.value),l.value&&(e.apiBase=l.value),u.value&&(e.model=u.value);let n=[{role:`system`,content:p(),timestamp:Date.now()},...r.value.slice(0,-1)],i=await t.sendChatStream(n,e,e=>{s.content=e.text,e.toolCalls&&(s.toolCalls=e.toolCalls),e.toolResults&&(s.toolResults=e.toolResults),m()});s.content=i.message.content,s.toolCalls=i.message.toolCalls,i.toolResults&&(s.toolResults=i.toolResults,await t.onRefresh())}catch(e){s.content=`Error: ${e instanceof Error?e.message:`Unknown error`}`}finally{a.value=!1,m()}}function y(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),v())}return qn(n,e=>{e&&r.value.length===0&&(r.value=[{role:`assistant`,content:`👋 Hi! I'm your ubean AI assistant.\n\nYou're on the **${t.panelContext}** panel. ${t.resourceSummary?`${t.resourceSummary}\n\n`:``}Ask me to create, list, or delete resources, or any ubean-related question.`,timestamp:Date.now()}])}),qn(()=>t.panelContext,e=>{r.value.length<=1&&e&&(r.value=[{role:`assistant`,content:`👋 Hi! I'm your ubean AI assistant.\n\nYou're on the **${e}** panel. ${t.resourceSummary?`${t.resourceSummary}\n\n`:``}Ask me to create, list, or delete resources, or any ubean-related question.`,timestamp:Date.now()}])}),(t,p)=>(M(),N(ma,null,[P(`button`,{class:`fixed bottom-3 right-14 z-40 size-8 flex items-center justify-center rounded-full bg-primary text-primary-foreground border border-primary shadow-md hover:bg-primary/90 transition-all cursor-pointer group`,title:`AI Assistant`,onClick:p[0]||=e=>n.value=!0},[F(j(B),{icon:`lucide:sparkles`,size:14,class:`transition-transform group-hover:scale-110`}),n.value?I(``,!0):(M(),N(`span`,VQ))]),(M(),wa(sr,{to:`body`},[F(So,{name:`ai-drawer`},{default:Rn(()=>[n.value?(M(),N(`div`,HQ,[P(`div`,{class:`absolute inset-0 bg-black/30 backdrop-blur-sm`,onClick:p[1]||=e=>n.value=!1}),P(`div`,UQ,[P(`div`,WQ,[P(`div`,GQ,[P(`div`,KQ,[F(j(B),{icon:`lucide:sparkles`,size:12,class:`text-primary`})]),P(`div`,qQ,[p[9]||=P(`span`,{class:`text-xs font-semibold text-foreground`},`AI Assistant`,-1),P(`span`,JQ,O(e.panelContext)+O(e.resourceSummary?` · ${e.resourceSummary}`:``),1)])]),P(`div`,YQ,[P(`button`,{class:`size-6 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,title:`Settings`,onClick:p[2]||=e=>s.value=!s.value},[F(j(B),{icon:`lucide:settings`,size:13})]),P(`button`,{class:`size-6 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,title:`Close`,onClick:p[3]||=e=>n.value=!1},[F(j(B),{icon:`lucide:x`,size:14})])])]),s.value?(M(),N(`div`,XQ,[P(`div`,null,[p[10]||=P(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`API Key`,-1),zn(P(`input`,{"onUpdate:modelValue":p[4]||=e=>c.value=e,type:`password`,placeholder:`sk-... (DeepSeek or OpenAI-compatible)`,class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,512),[[ms,c.value]])]),P(`div`,null,[p[11]||=P(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`API Base URL`,-1),zn(P(`input`,{"onUpdate:modelValue":p[5]||=e=>l.value=e,type:`text`,placeholder:j(Qk),class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,8,ZQ),[[ms,l.value]])]),P(`div`,null,[p[12]||=P(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`Model`,-1),zn(P(`input`,{"onUpdate:modelValue":p[6]||=e=>u.value=e,type:`text`,placeholder:j($k),class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,8,QQ),[[ms,u.value]])]),P(`button`,{class:`w-full px-2 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors`,onClick:h},` Save Settings `)])):I(``,!0),!d.value&&!s.value?(M(),N(`div`,$Q,[P(`p`,e$,[F(j(B),{icon:`lucide:alert-circle`,size:12,class:`mt-0.5 flex-shrink-0`}),p[13]||=P(`span`,null,[Ma(` No API key configured. Simple commands work without LLM. For natural language chat, set `),P(`code`,{class:`text-warning font-mono`},`DEEPSEEK_API_KEY`),Ma(` env var or configure in settings. `)],-1)])])):I(``,!0),P(`div`,{ref_key:`messagesEl`,ref:o,class:`flex-1 overflow-y-auto px-3 py-3 space-y-3`},[(M(!0),N(ma,null,Zr(r.value,(e,t)=>(M(),N(`div`,{key:t,class:D([`flex gap-2`,[e.role===`user`?`justify-end`:`justify-start`]])},[e.role===`user`?I(``,!0):(M(),N(`div`,t$,[F(j(B),{icon:`lucide:sparkles`,size:10,class:`text-primary`})])),P(`div`,n$,[P(`div`,{class:D([`px-2.5 py-1.5 rounded-lg text-xs leading-relaxed`,[e.role===`user`?`bg-primary text-primary-foreground rounded-tr-sm`:`bg-background border border-base text-foreground rounded-tl-sm`]])},[e.content?(M(),N(`div`,r$,O(e.content),1)):a.value&&t===r.value.length-1?(M(),N(`div`,i$,[...p[14]||=[P(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`0ms`}},null,-1),P(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`150ms`}},null,-1),P(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`300ms`}},null,-1)]])):I(``,!0)],2),e.toolCalls&&e.toolCalls.length>0?(M(),N(`div`,a$,[(M(!0),N(ma,null,Zr(e.toolCalls,e=>(M(),N(`div`,{key:e.id,class:`px-2 py-1 bg-secondary border border-base rounded text-[10px] font-mono text-muted-foreground`},[F(j(B),{icon:`lucide:wrench`,size:10,class:`inline mr-1`}),Ma(` `+O(g(e.name,e.arguments)),1)]))),128))])):I(``,!0),e.toolResults&&e.toolResults.length>0?(M(),N(`div`,o$,[(M(!0),N(ma,null,Zr(e.toolResults,e=>(M(),N(`div`,{key:e.toolCallId,class:`px-2 py-1.5 bg-success/5 border border-success/20 rounded text-[10px] font-mono text-success/90 whitespace-pre-wrap`},O(e.error?`❌ ${e.error}`:_(e.result)),1))),128))])):I(``,!0)]),e.role===`user`?(M(),N(`div`,s$,[F(j(B),{icon:`lucide:user`,size:10,class:`text-primary-foreground`})])):I(``,!0)],2))),128)),r.value.length<=1?(M(),N(`div`,c$,[p[15]||=P(`p`,{class:`text-[10px] text-muted-foreground mb-2 font-medium`},`Try:`,-1),P(`div`,l$,[(M(!0),N(ma,null,Zr(f.value,e=>(M(),N(`button`,{key:e.text,class:`inline-flex items-center gap-1 px-2 py-1 text-[10px] bg-background border border-base rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:t=>v(e.text)},[F(j(B),{icon:e.icon,size:10},null,8,[`icon`]),Ma(` `+O(e.text),1)],8,u$))),128))])])):I(``,!0)],512),P(`div`,d$,[P(`div`,f$,[zn(P(`textarea`,{"onUpdate:modelValue":p[7]||=e=>i.value=e,rows:`1`,placeholder:`Ask about ${e.panelContext}...`,class:`flex-1 resize-none px-2.5 py-1.5 text-xs bg-background border border-base rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500 max-h-24`,onKeydown:y},null,40,p$),[[ms,i.value]]),P(`button`,{disabled:!i.value.trim()||a.value,class:`size-7 rounded-lg bg-primary text-primary-foreground flex items-center justify-center flex-shrink-0 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-primary/90 transition-colors`,onClick:p[8]||=()=>v()},[F(j(B),{icon:`lucide:send-horizontal`,size:12})],8,m$)]),p[16]||=P(`p`,{class:`text-[9px] text-muted-foreground/60 mt-1 text-center`},`Enter to send · Shift+Enter for new line`,-1)])])])):I(``,!0)]),_:1})]))],64))}}),[[`__scopeId`,`data-v-001126c8`]]),g$={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},_$={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-2xl mx-4 overflow-hidden flex flex-col animate-scale-in`,style:{"max-height":`85vh`}},v$={class:`flex items-center justify-between px-4 py-3 border-b border-base flex-shrink-0`},y$={class:`flex items-center gap-2 min-w-0`},b$={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center flex-shrink-0`},x$={class:`min-w-0`},S$={class:`text-[11px] text-muted-foreground font-mono truncate`},C$={class:`flex-1 overflow-y-auto p-4 min-h-0`},w$={key:0,class:`flex items-center justify-center h-full py-12`},T$={key:1,class:`flex items-center gap-2 p-3 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},E$={key:2,class:`flex flex-col gap-4`},D$={key:0,class:`flex items-start gap-2 p-2.5 rounded-lg bg-info/10 text-info text-xs border border-info/20`},O$={class:`grid grid-cols-2 gap-3`},k$={class:`flex flex-col gap-1`},A$={class:`flex flex-col gap-1`},j$={class:`flex flex-col gap-1`},M$={class:`flex flex-col gap-1`},N$={class:`flex flex-col gap-1 col-span-2`},P$={class:`flex items-center gap-2 col-span-2 cursor-pointer`},F$={class:`flex flex-col gap-1.5`},I$={class:`flex items-center justify-between`},L$={key:0,class:`text-2xs text-destructive`},R$={key:0,class:`px-4 pb-2 flex-shrink-0`},z$={class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},B$={class:`flex items-center justify-end gap-2 px-4 py-3 bg-secondary border-t border-base flex-shrink-0`},V$=[`disabled`],H$=[`disabled`],U$={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},W$=TA(Tr({__name:`PageMetaDialog`,props:{open:{type:Boolean},filePath:{},pagePath:{},onRead:{type:Function},onSave:{type:Function}},emits:[`close`,`saved`],setup(e,{emit:t}){let n=e,r=t,i=k(!1),a=k(!1),o=k(``),s=k(``),c=k(``),l=k(!1),u=k(d());function d(){return{name:``,path:``,layout:``,reuse:``,middleware:``,requiresAuth:!1,meta:``}}function f(e){let t=`<script`;if(!e.includes(t))return e;let n=RegExp(`${t}([^>]*)>([\\s\\S]*?)<\/script>`,`g`),r,i=``;for(;(r=n.exec(e))!==null;){let e=r[1]||``,t=r[2]||``;if(e.includes(`setup`))return t;i+=`${t}\n`}return i||null}function p(e,t,n=0){let r=RegExp(`\\b${t}\\s*\\(`,`g`);r.lastIndex=n;let i=r.exec(e);if(!i)return null;let a=i.index+i[0].length,o=1,s=a,c=null,l=!1;for(;s<e.length&&o>0;){let t=e[s];if(l){l=!1,s++;continue}if(t===`\\`){l=!0,s++;continue}if(c){t===c&&(c=null),s++;continue}if(t===`"`||t===`'`||t==="`"){c=t,s++;continue}if(t===`(`||t===`{`||t===`[`)o++;else if((t===`)`||t===`}`||t===`]`)&&(o--,o===0&&t===`)`))return{start:i.index,argStart:a,end:s+1,arg:e.slice(a,s)};s++}return null}function m(e){let t=e.trim();if(!t.startsWith(`{`))return null;try{let e=Function(`return (${t});`)();return e&&typeof e==`object`&&!Array.isArray(e)?e:null}catch{return null}}function h(e){let t=f(e);if(!t)return{meta:d(),found:!1};let n=p(t,`definePage`);if(!n)return{meta:d(),found:!1};let r=m(n.arg);if(!r)return{meta:d(),found:!1};let i=d();if(typeof r.name==`string`&&(i.name=r.name),typeof r.path==`string`&&(i.path=r.path),r.layout===!1?i.layout=`false`:typeof r.layout==`string`&&(i.layout=r.layout),typeof r.reuse==`string`&&(i.reuse=r.reuse),typeof r.middleware==`string`?i.middleware=r.middleware:Array.isArray(r.middleware)&&(i.middleware=r.middleware.filter(e=>typeof e==`string`).join(`, `)),typeof r.requiresAuth==`boolean`&&(i.requiresAuth=r.requiresAuth),r.meta&&typeof r.meta==`object`)try{i.meta=JSON.stringify(r.meta,null,2)}catch{}return{meta:i,found:!0}}function g(e){let t=[];e.name.trim()&&t.push(` name: ${JSON.stringify(e.name.trim())}`),e.path.trim()&&t.push(` path: ${JSON.stringify(e.path.trim())}`),e.layout===`false`?t.push(` layout: false`):e.layout.trim()&&t.push(` layout: ${JSON.stringify(e.layout.trim())}`),e.reuse.trim()&&t.push(` reuse: ${JSON.stringify(e.reuse.trim())}`);let n=e.middleware.trim();if(n){let e=n.split(`,`).map(e=>e.trim()).filter(Boolean);e.length===1?t.push(` middleware: ${JSON.stringify(e[0])}`):e.length>1&&t.push(` middleware: ${JSON.stringify(e)}`)}return e.requiresAuth&&t.push(` requiresAuth: true`),e.meta.trim()&&t.push(` meta: ${e.meta.trim()}`),`definePage({\n${t.join(`,
|
|
365
|
+
`)}\n})`}function _(e,t){let n=f(e),r=`<\/script>`;if(n===null)return`<script setup lang="ts">\n${t}\n${r}\n\n${e}`;if(!p(n,`definePage`)){let n=e.lastIndexOf(r);if(n===-1)return e;let i=e.slice(0,n),a=e.slice(n);return`${i}${i.endsWith(`
|
|
366
|
+
`)?``:`
|
|
367
|
+
`}${t}\n${a}`}let i=p(e,`definePage`);return i?e.slice(0,i.start)+t+e.slice(i.end):e}async function v(){if(n.filePath){i.value=!0,o.value=``,s.value=``;try{let e=await n.onRead(`page`,n.filePath);if(e.success&&e.content!==void 0){c.value=e.content;let{meta:t,found:n}=h(e.content);u.value=t,l.value=n}else o.value=e.error||`Failed to load file`}catch(e){o.value=e instanceof Error?e.message:`Failed to load file`}finally{i.value=!1}}}qn(()=>n.open,e=>{e&&(u.value=d(),c.value=``,l.value=!1,v())});let y=L(()=>!i.value&&!a.value&&!o.value);function b(){a.value||r(`close`)}function x(){if(s.value=``,u.value.meta.trim())try{JSON.parse(u.value.meta.trim())}catch(e){s.value=e instanceof Error?e.message:`Invalid JSON`}return!s.value}async function S(){if(x()){a.value=!0,o.value=``;try{let e=g(u.value),t=_(c.value,e),i=await n.onSave(`page`,{path:n.filePath,content:t});i.success?(r(`saved`),r(`close`)):i.errors?.length&&(o.value=i.errors[0])}catch(e){o.value=e instanceof Error?e.message:`Failed to save`}finally{a.value=!1}}}return(t,n)=>(M(),wa(sr,{to:`body`},[e.open?(M(),N(`div`,g$,[P(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:b}),P(`div`,_$,[P(`div`,v$,[P(`div`,y$,[P(`div`,b$,[F(j(B),{icon:`lucide:sliders-horizontal`,size:15,class:`text-primary`})]),P(`div`,x$,[n[7]||=P(`div`,{class:`text-sm font-semibold text-foreground`},`Page Properties`,-1),P(`div`,S$,O(e.pagePath)+` · `+O(e.filePath),1)])]),P(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer flex-shrink-0`,onClick:b},[F(j(B),{icon:`lucide:x`,size:14})])]),P(`div`,C$,[i.value?(M(),N(`div`,w$,[...n[8]||=[P(`div`,{class:`size-5 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),P(`span`,{class:`ml-2 text-xs text-muted-foreground`},`Loading...`,-1)]])):o.value&&!c.value?(M(),N(`div`,T$,[F(j(B),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Ma(` `+O(o.value),1)])):(M(),N(`div`,E$,[l.value?I(``,!0):(M(),N(`div`,D$,[F(j(B),{icon:`lucide:info`,size:13,class:`flex-shrink-0 mt-0.5`}),n[9]||=P(`span`,null,[Ma(` No `),P(`code`,{class:`font-mono`},`definePage()`),Ma(` call detected. Saving will add one to the <script setup> block. `)],-1)])),P(`div`,O$,[P(`label`,k$,[n[10]||=P(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Name`,-1),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>u.value.name=e,type:`text`,placeholder:`route name`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,u.value.name]])]),P(`label`,A$,[n[11]||=P(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Path Override`,-1),zn(P(`input`,{"onUpdate:modelValue":n[1]||=e=>u.value.path=e,type:`text`,placeholder:`/custom/path`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[ms,u.value.path]])]),P(`label`,j$,[n[12]||=P(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Layout`,-1),zn(P(`input`,{"onUpdate:modelValue":n[2]||=e=>u.value.layout=e,type:`text`,placeholder:`default (empty) / name / false`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[ms,u.value.layout]])]),P(`label`,M$,[n[13]||=P(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Reuse`,-1),zn(P(`input`,{"onUpdate:modelValue":n[3]||=e=>u.value.reuse=e,type:`text`,placeholder:`reuse key`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[ms,u.value.reuse]])]),P(`label`,N$,[n[14]||=P(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Middleware (comma-separated)`,-1),zn(P(`input`,{"onUpdate:modelValue":n[4]||=e=>u.value.middleware=e,type:`text`,placeholder:`auth, admin`,class:`px-2.5 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground/60 outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`},null,512),[[ms,u.value.middleware]])]),P(`label`,P$,[zn(P(`input`,{"onUpdate:modelValue":n[5]||=e=>u.value.requiresAuth=e,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,512),[[hs,u.value.requiresAuth]]),n[15]||=P(`span`,{class:`text-xs text-foreground`},`Requires Auth`,-1),n[16]||=P(`span`,{class:`text-2xs text-muted-foreground`},`(redirect unauthenticated users)`,-1)])]),P(`div`,F$,[P(`div`,I$,[n[17]||=P(`span`,{class:`text-2xs text-muted-foreground font-medium`},`Meta (JSON object)`,-1),s.value?(M(),N(`span`,L$,O(s.value),1)):I(``,!0)]),F(lQ,{modelValue:u.value.meta,"onUpdate:modelValue":n[6]||=e=>u.value.meta=e,language:`json`,height:`120px`,"line-numbers":!1,label:`meta`},null,8,[`modelValue`])])]))]),o.value&&c.value&&!i.value?(M(),N(`div`,R$,[P(`div`,z$,[F(j(B),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),Ma(` `+O(o.value),1)])])):I(``,!0),P(`div`,B$,[P(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:a.value,onClick:b},` Cancel `,8,V$),P(`button`,{type:`button`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:!y.value,onClick:S},[a.value?(M(),N(`div`,U$)):(M(),wa(j(B),{key:1,icon:`lucide:save`,size:12})),Ma(` `+O(a.value?`Saving...`:`Save Properties`),1)],8,H$)])])])):I(``,!0)]))}}),[[`__scopeId`,`data-v-d9030ac0`]]),G$={class:`flex flex-col h-full bg-background`},K$={class:`flex items-center justify-between px-3 py-2 border-b border-base bg-background/50`},q$={class:`flex items-center gap-2`},J$={key:0,class:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] font-medium bg-primary/10 text-primary`},Y$={key:1,class:`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono text-muted-foreground bg-secondary`},X$={key:0,class:`px-3 py-2.5 border-b border-base bg-background/30 space-y-2`},Z$=[`placeholder`],Q$=[`placeholder`],$$={key:1,class:`px-3 py-2 bg-warning/10 border-b border-warning/20`},e1={class:`text-[10px] text-warning flex items-start gap-1.5`},t1={key:0,class:`size-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5`},n1={class:`max-w-[85%] space-y-1.5`},r1={key:0,class:`whitespace-pre-wrap`},i1={key:1,class:`flex gap-1 py-0.5`},a1={key:0,class:`space-y-1`},o1={key:1,class:`space-y-1`},s1={key:1,class:`size-6 rounded-full bg-primary flex items-center justify-center flex-shrink-0 mt-0.5`},c1={key:0,class:`pt-2`},l1={class:`flex flex-wrap gap-1.5`},u1=[`onClick`],d1={class:`px-3 py-2.5 border-t border-base bg-background/50`},f1={class:`flex items-end gap-2`},p1=[`disabled`],m1=Tr({__name:`AiAssistant`,props:{info:{},sendChatStream:{type:Function},onRefresh:{type:Function}},setup(e){let t=e,n=k([]),r=k(``),i=k(!1),a=k(null),o=k(!1),s=k(localStorage.getItem(`ubean_ai_api_key`)||``),c=k(localStorage.getItem(`ubean_ai_api_base`)||``),l=k(localStorage.getItem(`ubean_ai_model`)||``),u=L(()=>t.info?.ai?.enabled||!!s.value),d=L(()=>!!s.value||!!t.info?.ai?.enabled),f=[{text:`List all pages`,icon:`lucide:file-text`},{text:`Create an API route`,icon:`lucide:send`},{text:`Show environment variables`,icon:`lucide:key`},{text:`Create a page /about`,icon:`lucide:plus`}];function p(){En(()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight)})}function m(){s.value?localStorage.setItem(`ubean_ai_api_key`,s.value):localStorage.removeItem(`ubean_ai_api_key`),c.value?localStorage.setItem(`ubean_ai_api_base`,c.value):localStorage.removeItem(`ubean_ai_api_base`),l.value?localStorage.setItem(`ubean_ai_model`,l.value):localStorage.removeItem(`ubean_ai_model`),o.value=!1}function h(e,t){return`${e}(${Object.entries(t).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}: ${String(t)}`).join(`, `)})`}function g(e){if(!e)return``;if(typeof e==`object`){let t=e;return t.success===!1&&t.errors?`❌ ${t.errors.join(`, `)}`:t.created&&Array.isArray(t.created)?`✅ Created: ${t.created.join(`, `)}`:t.deleted&&Array.isArray(t.deleted)?`🗑️ Deleted: ${t.deleted.join(`, `)}`:t.updated&&Array.isArray(t.updated)?`📝 Updated: ${t.updated.join(`, `)}`:t.data&&typeof t.data==`object`?Object.entries(t.data).slice(0,10).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(`
|
|
368
|
+
`):t.content&&typeof t.content==`string`?t.content.slice(0,300):JSON.stringify(e,null,2).slice(0,300)}return String(e)}async function _(e){let a=(e??r.value).trim();if(!a||i.value)return;let o={role:`user`,content:a,timestamp:Date.now()};n.value.push(o),r.value=``,i.value=!0;let u={role:`assistant`,content:``,timestamp:Date.now()};n.value.push(u),p();try{let e={};s.value&&(e.apiKey=s.value),c.value&&(e.apiBase=c.value),l.value&&(e.model=l.value);let r=await t.sendChatStream(n.value.slice(0,-1),e,e=>{u.content=e.text,e.toolCalls&&(u.toolCalls=e.toolCalls),e.toolResults&&(u.toolResults=e.toolResults),p()});u.content=r.message.content,u.toolCalls=r.message.toolCalls,r.toolResults&&(u.toolResults=r.toolResults,await t.onRefresh())}catch(e){u.content=`Error: ${e instanceof Error?e.message:`Unknown error`}`}finally{i.value=!1,p()}}function v(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),_())}return Vr(()=>{n.value=[{role:`assistant`,content:`👋 Hi! I'm your ubean AI assistant. I can help you manage your project:\n\n• **Create resources**: pages, APIs, layouts, middleware, cron jobs, plugins\n• **Inspect project**: list routes, pages, env vars, config\n• **Manage env**: set/get/remove environment variables\n\n${d.value?`You have AI configured — I can understand natural language commands!`:`Set up your API key in settings to enable full AI chat, or use simple text commands like "create page about"`}`,timestamp:Date.now()}]}),(t,p)=>(M(),N(`div`,G$,[P(`div`,K$,[P(`div`,q$,[F(j(B),{icon:`lucide:sparkles`,size:14,class:`text-primary`}),p[6]||=P(`span`,{class:`text-xs font-semibold text-foreground`},`AI Assistant`,-1),u.value?(M(),N(`span`,J$,O(e.info?.ai?.provider||`deepseek`),1)):I(``,!0),e.info?.ai?.model?(M(),N(`span`,Y$,O(e.info.ai.model),1)):I(``,!0)]),P(`button`,{class:`p-1 rounded hover:bg-active text-muted-foreground hover:text-foreground transition-colors`,onClick:p[0]||=e=>o.value=!o.value},[F(j(B),{icon:`lucide:settings`,size:14})])]),o.value?(M(),N(`div`,X$,[P(`div`,null,[p[7]||=P(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`API Key`,-1),zn(P(`input`,{"onUpdate:modelValue":p[1]||=e=>s.value=e,type:`password`,placeholder:`sk-... (DeepSeek or OpenAI-compatible)`,class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,512),[[ms,s.value]])]),P(`div`,null,[p[8]||=P(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`API Base URL (optional)`,-1),zn(P(`input`,{"onUpdate:modelValue":p[2]||=e=>c.value=e,type:`text`,placeholder:j(Qk),class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,8,Z$),[[ms,c.value]])]),P(`div`,null,[p[9]||=P(`label`,{class:`block text-[10px] font-medium text-muted-foreground mb-1`},`Model (optional)`,-1),zn(P(`input`,{"onUpdate:modelValue":p[3]||=e=>l.value=e,type:`text`,placeholder:j($k),class:`w-full px-2 py-1.5 text-xs bg-background border border-base rounded-md text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500`},null,8,Q$),[[ms,l.value]])]),P(`button`,{class:`w-full px-2 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors`,onClick:m},` Save Settings `)])):I(``,!0),!d.value&&!o.value?(M(),N(`div`,$$,[P(`p`,e1,[F(j(B),{icon:`lucide:alert-circle`,size:12,class:`mt-0.5 flex-shrink-0`}),p[10]||=P(`span`,null,[Ma(` No API key configured. Set `),P(`code`,{class:`text-warning font-mono`},`DEEPSEEK_API_KEY`),Ma(` env var (or `),P(`code`,{class:`text-warning font-mono`},`UBEAN_AI_API_KEY`),Ma(` / `),P(`code`,{class:`text-warning font-mono`},`OPENAI_API_KEY`),Ma(` ) or configure in settings. Simple text commands still work without LLM. `)],-1)])])):I(``,!0),P(`div`,{ref_key:`messagesEl`,ref:a,class:`flex-1 overflow-y-auto px-3 py-3 space-y-3`},[(M(!0),N(ma,null,Zr(n.value,(e,t)=>(M(),N(`div`,{key:t,class:D([`flex gap-2`,[e.role===`user`?`justify-end`:`justify-start`]])},[e.role===`user`?I(``,!0):(M(),N(`div`,t1,[F(j(B),{icon:`lucide:sparkles`,size:11,class:`text-primary`})])),P(`div`,n1,[P(`div`,{class:D([`px-3 py-2 rounded-lg text-xs leading-relaxed`,[e.role===`user`?`bg-primary text-primary-foreground rounded-tr-sm`:`bg-background border border-base text-foreground rounded-tl-sm`]])},[e.content?(M(),N(`div`,r1,O(e.content),1)):i.value&&t===n.value.length-1?(M(),N(`div`,i1,[...p[11]||=[P(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`0ms`}},null,-1),P(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`150ms`}},null,-1),P(`span`,{class:`size-1.5 rounded-full bg-muted-foreground/40 animate-bounce`,style:{"animation-delay":`300ms`}},null,-1)]])):I(``,!0)],2),e.toolCalls&&e.toolCalls.length>0?(M(),N(`div`,a1,[(M(!0),N(ma,null,Zr(e.toolCalls,e=>(M(),N(`div`,{key:e.id,class:`px-2 py-1 bg-secondary border border-base rounded text-[10px] font-mono text-muted-foreground`},[F(j(B),{icon:`lucide:wrench`,size:10,class:`inline mr-1`}),Ma(` `+O(h(e.name,e.arguments)),1)]))),128))])):I(``,!0),e.toolResults&&e.toolResults.length>0?(M(),N(`div`,o1,[(M(!0),N(ma,null,Zr(e.toolResults,e=>(M(),N(`div`,{key:e.toolCallId,class:`px-2 py-1.5 bg-success/5 border border-success/20 rounded text-[10px] font-mono text-success/90 whitespace-pre-wrap`},O(e.error?`❌ ${e.error}`:g(e.result)),1))),128))])):I(``,!0)]),e.role===`user`?(M(),N(`div`,s1,[F(j(B),{icon:`lucide:user`,size:11,class:`text-primary-foreground`})])):I(``,!0)],2))),128)),n.value.length<=1?(M(),N(`div`,c1,[p[12]||=P(`p`,{class:`text-[10px] text-muted-foreground mb-2 font-medium`},`Try:`,-1),P(`div`,l1,[(M(),N(ma,null,Zr(f,e=>P(`button`,{key:e.text,class:`inline-flex items-center gap-1 px-2 py-1 text-[10px] bg-background border border-base rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors`,onClick:t=>_(e.text)},[F(j(B),{icon:e.icon,size:10},null,8,[`icon`]),Ma(` `+O(e.text),1)],8,u1)),64))])])):I(``,!0)],512),P(`div`,d1,[P(`div`,f1,[zn(P(`textarea`,{"onUpdate:modelValue":p[4]||=e=>r.value=e,rows:`1`,placeholder:`Ask me anything about your project...`,class:`flex-1 resize-none px-3 py-2 text-xs bg-background border border-base rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary-500 max-h-24`,onKeydown:v},null,544),[[ms,r.value]]),P(`button`,{disabled:!r.value.trim()||i.value,class:`size-8 rounded-lg bg-primary text-primary-foreground flex items-center justify-center flex-shrink-0 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-primary/90 transition-colors`,onClick:p[5]||=()=>_()},[F(j(B),{icon:`lucide:send-horizontal`,size:14})],8,p1)]),p[13]||=P(`p`,{class:`text-[9px] text-muted-foreground/60 mt-1 text-center`},`Press Enter to send, Shift+Enter for new line`,-1)])]))}}),h1={class:`w-full h-full relative bg-background`},g1={key:0,class:`flex flex-col items-center justify-center h-full text-muted-foreground gap-3 px-10 py-10 text-center`},_1=[`src`],v1=Tr({__name:`ApiDocs`,props:{scalarPath:{},enabled:{type:Boolean}},setup(e){let t=e,n=L(()=>t.scalarPath||`/_scalar`);return(t,r)=>(M(),N(`div`,h1,[e.enabled===!1?(M(),N(`div`,g1,[F(j(B),{icon:`lucide:file-text`,size:40,class:`text-muted-foreground/50`}),r[0]||=P(`div`,{class:`text-[15px] font-semibold text-foreground`},`API Docs Not Enabled`,-1),r[1]||=P(`div`,{class:`text-xs leading-relaxed max-w-80 op-fade`},[Ma(` Set `),P(`code`,{class:`bg-secondary px-1.5 py-0.5 rounded text-[11px] font-mono text-primary`},`openAPI: true`),Ma(` in your ubean config to enable Scalar API reference. `)],-1)])):(M(),N(`iframe`,{key:1,src:n.value,class:`w-full h-full border-none bg-white`,title:`API Reference`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`},null,8,_1))]))}}),y1={class:`flex flex-col h-full`},b1={class:`flex flex-col border-b border-base flex-shrink-0`},x1={class:`flex items-center gap-1.5 px-3 py-2`},S1=[`value`],C1=[`disabled`],w1={class:`flex gap-0 border-t border-base`},T1={key:0,class:`ml-1 text-primary`},E1={key:0,class:`px-3 py-2 max-h-32 overflow-y-auto`},D1={class:`flex flex-col gap-1`},O1=[`onUpdate:modelValue`],k1=[`onUpdate:modelValue`],A1=[`onUpdate:modelValue`],j1=[`onClick`],M1={key:1,class:`px-3 py-2 max-h-32 overflow-y-auto`},N1={class:`flex flex-col gap-1`},P1=[`onUpdate:modelValue`],F1=[`onUpdate:modelValue`],I1=[`onUpdate:modelValue`],L1=[`onClick`],R1={key:2,class:`px-3 py-2 h-36`},z1={class:`flex-1 overflow-hidden flex flex-col min-h-0`},B1={key:0,class:`m-3 p-3 rounded-lg text-xs leading-relaxed bg-destructive/10 text-destructive border border-destructive/15 flex items-start gap-2 flex-shrink-0`},V1={key:1,class:`flex flex-col h-full`},H1={class:`flex items-center gap-3 px-3 py-1.5 border-b border-base bg-background/50 flex-shrink-0`},U1={class:`text-[11px] text-muted-foreground flex items-center gap-1`},W1={class:`text-[11px] text-muted-foreground flex items-center gap-1`},G1={class:`ml-auto flex gap-0`},K1={key:0,class:`flex-1 overflow-hidden p-2 min-h-0`},q1={key:1,class:`flex-1 overflow-y-auto p-2`},J1={class:`flex flex-col gap-0`},Y1={class:`text-muted-foreground w-44 flex-shrink-0`},X1={class:`text-foreground break-all`},Z1={key:2,class:`flex-1 overflow-y-auto p-3.5`},Q1={key:0,class:`section-card`},$1={class:`section-header`},e0={class:`section-body`},t0={class:`p-1 flex flex-col gap-0.5 max-h-80 overflow-y-auto`},n0=[`onClick`],r0=[`title`],i0={key:0,class:`px-2 py-1 text-[10px] text-muted-foreground text-center`},a0={class:`empty-state py-8`},o0={key:3,class:`flex-1 flex items-center justify-center`},s0=Tr({__name:`ApiPlayground`,props:{routes:{},methodClass:{type:Function},initialMethod:{},initialPath:{}},setup(e){let t=e,n=k(t.initialMethod||`GET`),r=k(t.initialPath||`/api/`),i=k(``),a=k(`params`),o=k(`body`),s=k(!1),c=k(null),l=k(null),u=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],d=k([{key:``,value:``,enabled:!0}]),f=k([{key:`Content-Type`,value:`application/json`,enabled:!0}]),p=L(()=>[`POST`,`PUT`,`PATCH`].includes(n.value)),m=L(()=>{if(!c.value)return``;let e=c.value.status;return e>=200&&e<300?`bg-success/12 text-success`:e>=300&&e<400?`bg-info/12 text-info`:e>=400&&e<500?`bg-warning/12 text-warning`:`bg-destructive/12 text-destructive`}),h=L(()=>{if(!c.value)return``;if(c.value.contentType.includes(`application/json`))try{return JSON.stringify(JSON.parse(c.value.body),null,2)}catch{return c.value.body}return c.value.body}),g=L(()=>{if(!c.value)return`json`;let e=c.value.contentType;return e.includes(`json`)?`json`:e.includes(`html`)?`javascript`:`json`});qn(()=>t.initialPath,e=>{e&&(r.value=e)}),qn(()=>t.initialMethod,e=>{e&&(n.value=e)}),qn(n,e=>{p.value&&!i.value&&(i.value=`{
|
|
369
|
+
|
|
370
|
+
}`)});function _(){d.value.push({key:``,value:``,enabled:!0})}function v(e){d.value.splice(e,1)}function y(){f.value.push({key:``,value:``,enabled:!0})}function b(e){f.value.splice(e,1)}function x(){let e=d.value.filter(e=>e.key&&e.enabled);if(e.length===0)return r.value;let t=r.value.includes(`?`)?`&`:`?`,n=e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`);return`${r.value}${t}${n}`}function S(){let e={};for(let t of f.value)t.key&&t.enabled&&(e[t.key]=t.value);return e}async function C(){if(s.value)return;s.value=!0,l.value=null,c.value=null;let e=performance.now(),t=x(),r=S(),a={method:n.value,headers:r};p.value&&i.value.trim()&&(a.body=i.value);try{let n=await fetch(t,a),r=Math.round(performance.now()-e),i={};n.headers.forEach((e,t)=>{i[t]=e});let s=await n.text();c.value={status:n.status,statusText:n.statusText,headers:i,body:s,time:r,size:new Blob([s]).size,contentType:n.headers.get(`content-type`)||``},o.value=`body`}catch(e){l.value=e instanceof Error?e.message:`Request failed`}finally{s.value=!1}}function w(e){n.value=e.method,r.value=e.path}function ee(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}let te=L(()=>t.routes.filter(e=>e.path!==`*`&&!e.path.includes(`_scalar`)&&!e.path.includes(`_openapi`)));return(t,x)=>(M(),N(`div`,y1,[P(`div`,b1,[P(`div`,x1,[zn(P(`select`,{"onUpdate:modelValue":x[0]||=e=>n.value=e,class:D([`px-2 py-1.5 bg-background border border-base rounded-md text-xs font-bold text-foreground outline-none focus:border-active cursor-pointer`,e.methodClass(n.value)])},[(M(),N(ma,null,Zr(u,e=>P(`option`,{key:e,value:e},O(e),9,S1)),64))],2),[[_s,n.value]]),zn(P(`input`,{"onUpdate:modelValue":x[1]||=e=>r.value=e,type:`text`,placeholder:`Enter request URL...`,class:`flex-1 px-3 py-1.5 bg-background border border-base rounded-md text-xs font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`,onKeydown:Ts(C,[`enter`])},null,544),[[ms,r.value]]),P(`button`,{class:D([`px-4 py-1.5 rounded-md text-xs font-semibold text-primary-foreground transition-all cursor-pointer flex items-center gap-1.5`,s.value?`bg-primary/60 cursor-wait`:`bg-primary hover:bg-primary/90`]),disabled:s.value,onClick:C},[s.value?(M(),wa(j(B),{key:0,icon:`lucide:loader-2`,size:12,class:`animate-spin`})):(M(),wa(j(B),{key:1,icon:`lucide:send`,size:12})),Ma(` `+O(s.value?`Sending...`:`Send`),1)],10,C1)]),P(`div`,w1,[P(`button`,{class:D([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`params`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[2]||=e=>a.value=`params`},[x[8]||=Ma(` Params `,-1),d.value.some(e=>e.key&&e.enabled)?(M(),N(`span`,T1,`●`)):I(``,!0)],2),P(`button`,{class:D([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`headers`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[3]||=e=>a.value=`headers`},` Headers `,2),p.value?(M(),N(`button`,{key:0,class:D([`px-3 py-1.5 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,a.value===`body`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[4]||=e=>a.value=`body`},` Body `,2)):I(``,!0)]),a.value===`params`?(M(),N(`div`,E1,[P(`div`,D1,[(M(!0),N(ma,null,Zr(d.value,(e,t)=>(M(),N(`div`,{key:t,class:`flex items-center gap-1.5`},[zn(P(`input`,{"onUpdate:modelValue":t=>e.enabled=t,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,8,O1),[[hs,e.enabled]]),zn(P(`input`,{"onUpdate:modelValue":t=>e.key=t,type:`text`,placeholder:`Key`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,k1),[[ms,e.key]]),zn(P(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,placeholder:`Value`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,A1),[[ms,e.value]]),P(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded cursor-pointer transition-colors`,onClick:e=>v(t)},[F(j(B),{icon:`lucide:x`,size:11})],8,j1)]))),128))]),P(`button`,{class:`mt-1 px-2 py-1 text-[11px] text-primary hover:text-primary/80 flex items-center gap-1 cursor-pointer`,onClick:_},[F(j(B),{icon:`lucide:plus`,size:11}),x[9]||=Ma(` Add Parameter `,-1)])])):a.value===`headers`?(M(),N(`div`,M1,[P(`div`,N1,[(M(!0),N(ma,null,Zr(f.value,(e,t)=>(M(),N(`div`,{key:t,class:`flex items-center gap-1.5`},[zn(P(`input`,{"onUpdate:modelValue":t=>e.enabled=t,type:`checkbox`,class:`size-3.5 accent-primary cursor-pointer`},null,8,P1),[[hs,e.enabled]]),zn(P(`input`,{"onUpdate:modelValue":t=>e.key=t,type:`text`,placeholder:`Header name`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,F1),[[ms,e.key]]),zn(P(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,placeholder:`Value`,class:`flex-1 px-2 py-1 bg-background border border-base rounded text-[11px] font-mono text-foreground placeholder:text-muted-foreground outline-none focus:border-active`},null,8,I1),[[ms,e.value]]),P(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded cursor-pointer transition-colors`,onClick:e=>b(t)},[F(j(B),{icon:`lucide:x`,size:11})],8,L1)]))),128))]),P(`button`,{class:`mt-1 px-2 py-1 text-[11px] text-primary hover:text-primary/80 flex items-center gap-1 cursor-pointer`,onClick:y},[F(j(B),{icon:`lucide:plus`,size:11}),x[10]||=Ma(` Add Header `,-1)])])):a.value===`body`&&p.value?(M(),N(`div`,R1,[F(lQ,{modelValue:i.value,"onUpdate:modelValue":x[5]||=e=>i.value=e,language:`json`,"line-numbers":!1,height:`100%`},null,8,[`modelValue`])])):I(``,!0)]),P(`div`,z1,[l.value?(M(),N(`div`,B1,[F(j(B),{icon:`lucide:alert-circle`,size:14,class:`flex-shrink-0 mt-0.5`}),P(`div`,null,[x[11]||=P(`strong`,null,`Request failed`,-1),x[12]||=P(`br`,null,null,-1),Ma(` `+O(l.value),1)])])):I(``,!0),c.value?(M(),N(`div`,V1,[P(`div`,H1,[P(`span`,{class:D([`px-2 py-0.5 rounded-md text-[10px] font-bold font-mono`,m.value])},O(c.value.status)+` `+O(c.value.statusText),3),P(`span`,U1,[F(j(B),{icon:`lucide:clock`,size:11}),Ma(` `+O(c.value.time)+`ms `,1)]),P(`span`,W1,[F(j(B),{icon:`lucide:hard-drive`,size:11}),Ma(` `+O(ee(c.value.size)),1)]),P(`div`,G1,[P(`button`,{class:D([`px-2 py-1 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,o.value===`body`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[6]||=e=>o.value=`body`},` Body `,2),P(`button`,{class:D([`px-2 py-1 text-[11px] font-medium border-b-2 transition-colors cursor-pointer`,o.value===`headers`?`border-active text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),onClick:x[7]||=e=>o.value=`headers`},` Headers (`+O(Object.keys(c.value.headers).length)+`) `,3)])]),o.value===`body`?(M(),N(`div`,K1,[F(lQ,{"model-value":h.value,language:g.value,readonly:``,"line-numbers":!1,height:`100%`},null,8,[`model-value`,`language`])])):(M(),N(`div`,q1,[P(`div`,J1,[(M(!0),N(ma,null,Zr(c.value.headers,(e,t)=>(M(),N(`div`,{key:String(t),class:`flex items-center px-2 py-1 text-[11px] border-b border-base font-mono`},[P(`span`,Y1,O(t),1),P(`span`,X1,O(e),1)]))),128))])]))])):!s.value&&!l.value?(M(),N(`div`,Z1,[te.value.length>0?(M(),N(`div`,Q1,[P(`div`,$1,[F(j(B),{icon:`lucide:zap`,size:13,class:`text-primary`}),x[13]||=P(`span`,{class:`section-title`},`Quick Select`,-1)]),P(`div`,e0,[P(`div`,t0,[(M(!0),N(ma,null,Zr(te.value.slice(0,50),t=>(M(),N(`button`,{key:`${t.method}-${t.path}`,class:`flex items-center gap-2 px-2 py-1 rounded text-left hover:bg-active transition-colors cursor-pointer`,onClick:e=>w(t)},[P(`span`,{class:D([`min-w-[42px] px-1.5 py-px rounded text-[9px] font-bold uppercase tracking-wider text-center font-mono`,e.methodClass(t.method)])},O(t.method),3),P(`span`,{class:`font-mono text-foreground text-xs truncate flex-1`,title:t.path},O(t.path),9,r0)],8,n0))),128)),te.value.length>50?(M(),N(`div`,i0,` ... and `+O(te.value.length-50)+` more routes `,1)):I(``,!0)])])])):I(``,!0),P(`div`,a0,[F(j(B),{icon:`lucide:play`,size:28,class:`text-muted-foreground/40 mb-2`}),x[14]||=P(`div`,{class:`empty-title`},`Ready to send`,-1),x[15]||=P(`div`,{class:`empty-desc`},`Select a route above or enter a URL to test your API`,-1)])])):I(``,!0),s.value?(M(),N(`div`,o0,[...x[16]||=[P(`div`,{class:`flex flex-col items-center gap-3 text-muted-foreground`},[P(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`}),P(`span`,{class:`text-xs`},`Sending request...`)],-1)]])):I(``,!0)])]))}}),c0={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},l0={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-sm mx-4 overflow-hidden animate-scale-in`},u0={class:`p-4 pb-3`},d0={class:`flex items-start gap-3`},f0={class:`min-w-0`},p0={class:`text-sm font-semibold text-foreground`},m0={class:`text-xs text-muted-foreground mt-1 leading-relaxed`},h0={class:`flex items-center justify-end gap-2 px-4 py-3 bg-secondary border-t border-base`},g0=[`disabled`],_0=[`disabled`],v0={key:0,class:`size-3 border-2 border-current/30 border-t-current rounded-full animate-spin`},y0=TA(Tr({__name:`ConfirmDialog`,props:{open:{type:Boolean},title:{},message:{},confirmText:{},cancelText:{},variant:{}},emits:[`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=k(!1);qn(()=>n.open,e=>{e&&(i.value=!1)});function a(){i.value||r(`cancel`)}async function o(){i.value=!0,r(`confirm`)}return(t,n)=>(M(),wa(sr,{to:`body`},[e.open?(M(),N(`div`,c0,[P(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:a}),P(`div`,l0,[P(`div`,u0,[P(`div`,d0,[P(`div`,{class:D([`size-9 rounded-lg flex items-center justify-center flex-shrink-0`,e.variant===`danger`?`bg-destructive/10`:`bg-warning/10`])},[F(j(B),{icon:`lucide:alert-triangle`,size:18,class:D(e.variant===`danger`?`text-destructive`:`text-warning`)},null,8,[`class`])],2),P(`div`,f0,[P(`div`,p0,O(e.title),1),P(`div`,m0,O(e.message),1)])])]),P(`div`,h0,[P(`button`,{class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:i.value,onClick:a},O(e.cancelText||`Cancel`),9,g0),P(`button`,{class:D([`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,e.variant===`danger`?`bg-destructive text-destructive-foreground hover:bg-destructive/90`:`bg-warning text-warning-foreground hover:bg-warning/90`]),disabled:i.value,onClick:o},[i.value?(M(),N(`div`,v0)):I(``,!0),Ma(` `+O(e.confirmText||`Confirm`),1)],10,_0)])])])):I(``,!0)]))}}),[[`__scopeId`,`data-v-abfe521d`]]),b0={class:`flex flex-col h-full`},x0={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},S0={class:`relative flex-1 max-w-xs`},C0={class:`flex gap-1 overflow-x-auto`},w0=[`onClick`],T0={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},E0={class:`flex-1 overflow-y-auto p-3.5`},D0={key:0,class:`flex flex-col gap-1`},O0=[`title`],k0=[`onClick`],A0=[`onClick`],j0=[`onClick`],M0=[`title`],N0={key:1,class:`empty-state`},P0={class:`empty-title`},F0={class:`empty-desc`},I0=Tr({__name:`ApiRoutes`,props:{routes:{},filePath:{type:Function},methodClass:{type:Function}},emits:[`tryRoute`,`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(`ALL`),o=k(null),s=L(()=>{let e=new Set(n.routes.map(e=>e.method));return[`ALL`,...Array.from(e).sort()]}),c=L(()=>{let e=[...n.routes];if(a.value!==`ALL`&&(e=e.filter(e=>e.method===a.value)),i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e}),l=L(()=>o.value?`Are you sure you want to delete "${o.value.method} ${o.value.path}"? A backup will be created (.bak file).`:``);function u(e){o.value=e}function d(){o.value&&=(r(`delete`,o.value),null)}return(t,n)=>(M(),N(`div`,b0,[P(`div`,x0,[P(`div`,S0,[F(j(B),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search routes...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,i.value]])]),P(`div`,C0,[(M(!0),N(ma,null,Zr(s.value,e=>(M(),N(`button`,{key:e,class:D([`filter-chip`,a.value===e?`filter-chip-active`:`filter-chip-idle`]),onClick:t=>a.value=e},O(e),11,w0))),128))]),P(`span`,T0,O(c.value.length)+` routes `,1),P(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New API route (A)`,onClick:n[1]||=e=>r(`create`)},[F(j(B),{icon:`lucide:plus`,size:13}),n[3]||=Ma(` New `,-1)])]),P(`div`,E0,[c.value.length>0?(M(),N(`div`,D0,[(M(!0),N(ma,null,Zr(c.value,(t,n)=>(M(),N(`div`,{key:n,class:`group flex items-center gap-2.5 px-3 py-2 bg-background border border-base rounded-lg text-xs hover:bg-active transition-colors`},[P(`span`,{class:D([`min-w-[46px] px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider text-center font-mono flex-shrink-0`,e.methodClass(t.method)])},O(t.method),3),P(`span`,{class:`font-mono text-foreground flex-1 text-xs truncate`,title:t.path},O(t.path),9,O0),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit route`,onClick:Cs(e=>r(`edit`,t),[`stop`])},[F(j(B),{icon:`lucide:pencil`,size:12})],8,k0),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary rounded transition-all cursor-pointer flex-shrink-0`,title:`Try in Playground`,onClick:e=>r(`tryRoute`,t)},[F(j(B),{icon:`lucide:play`,size:12})],8,A0),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete route`,onClick:Cs(e=>u(t),[`stop`])},[F(j(B),{icon:`lucide:trash-2`,size:12})],8,j0),t.filePath?(M(),N(`span`,{key:0,class:`file-name`,title:t.filePath},O(e.filePath(t.filePath)),9,M0)):I(``,!0)]))),128))])):(M(),N(`div`,N0,[F(j(B),{icon:`lucide:route`,size:32,class:`text-muted-foreground/40 mb-3`}),P(`div`,P0,O(i.value?`No routes match your search`:`No API routes`),1),P(`div`,F0,O(i.value?`Try different keywords`:`API routes will appear here as you add endpoints`),1)]))]),F(y0,{open:!!o.value,title:`Delete API Route`,message:l.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:d,onCancel:n[2]||=e=>o.value=null},null,8,[`open`,`message`])]))}}),L0={class:`flex flex-col h-full`},R0={class:`px-3.5 py-2 border-b border-base bg-background flex items-center justify-between gap-2 flex-shrink-0`},z0={class:`flex-1 overflow-y-auto p-3.5`},B0={class:`grid grid-cols-3 gap-2 mb-4`},V0={class:`flex items-center gap-1.5 mb-1`},H0={class:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`},U0=[`title`],W0={key:0,class:`bg-background border border-base rounded-lg overflow-hidden`},G0={class:`divide-y divide-#8882`},K0={class:`text-xs font-mono text-primary font-medium min-w-24`},q0=[`title`],J0={key:1,class:`mt-3 bg-background border border-base rounded-lg overflow-hidden`},Y0={class:`p-3 flex flex-wrap gap-1.5`},X0=Tr({__name:`Config`,props:{config:{},info:{},fmtUptime:{type:Function},fmtTime:{type:Function},fmtVal:{type:Function},uptime:{}},emits:[`edit`],setup(e,{emit:t}){let n=e,r=t,i=L(()=>Object.entries(n.config)),a=L(()=>[{label:`Version`,value:n.info.version,icon:`lucide:tag`,color:`text-primary`},{label:`Uptime`,value:n.fmtUptime(n.uptime),icon:`lucide:clock`,color:`text-success`},{label:`Started`,value:n.fmtTime(n.info.startTime),icon:`lucide:play`,color:`text-info`},{label:`Preset`,value:n.info.presets.join(`, `)||`standard`,icon:`lucide:package`,color:`text-warning`},{label:`Pages`,value:String(n.info.pages),icon:`lucide:file-text`,color:`text-info`},{label:`API Routes`,value:String(n.info.apiRoutes),icon:`lucide:send`,color:`text-success`},{label:`Middleware`,value:String(n.info.middleware),icon:`lucide:layers`,color:`text-warning`},{label:`Layouts`,value:String(n.info.layouts),icon:`lucide:layout`,color:`text-purple-400`},{label:`Cron Jobs`,value:String(n.info.crons),icon:`lucide:clock-4`,color:`text-accent`}]);return(t,n)=>(M(),N(`div`,L0,[P(`div`,R0,[n[2]||=P(`span`,{class:`text-xs font-semibold text-foreground`},`Configuration`,-1),P(`button`,{class:`flex items-center gap-1 px-2 py-1 text-2xs font-medium text-muted-foreground hover:text-primary hover:bg-primary/10 rounded-md transition-colors cursor-pointer`,title:`Edit Config File`,onClick:n[0]||=e=>r(`edit`)},[F(j(B),{icon:`lucide:pencil`,size:12}),n[1]||=Ma(` Edit Config File `,-1)])]),P(`div`,z0,[P(`div`,B0,[(M(!0),N(ma,null,Zr(a.value,e=>(M(),N(`div`,{key:e.label,class:`bg-background border border-base rounded-lg p-2.5`},[P(`div`,V0,[F(j(B),{icon:e.icon,size:12,class:D(e.color)},null,8,[`icon`,`class`]),P(`span`,H0,O(e.label),1)]),P(`div`,{class:`text-xs font-semibold text-foreground font-mono truncate`,title:e.value},O(e.value),9,U0)]))),128))]),i.value.length>0?(M(),N(`div`,W0,[n[3]||=P(`div`,{class:`px-3 py-2 border-b border-base bg-secondary`},[P(`span`,{class:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`},`Resolved Config`)],-1),P(`div`,G0,[(M(!0),N(ma,null,Zr(i.value,([t,n])=>(M(),N(`div`,{key:t,class:`flex items-center px-3 py-2 gap-2 hover:bg-active transition-colors`},[P(`span`,K0,O(t),1),P(`span`,{class:`text-xs font-mono text-foreground truncate`,title:e.fmtVal(n)},O(e.fmtVal(n)),9,q0)]))),128))])])):I(``,!0),e.info.presets&&e.info.presets.length>0?(M(),N(`div`,J0,[n[4]||=P(`div`,{class:`px-3 py-2 border-b border-base bg-secondary`},[P(`span`,{class:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`},`Active Presets`)],-1),P(`div`,Y0,[(M(!0),N(ma,null,Zr(e.info.presets,e=>(M(),N(`span`,{key:e,class:`inline-flex items-center gap-1 px-2 py-0.5 bg-primary/10 text-primary text-[10px] font-semibold rounded-md`},[F(j(B),{icon:`lucide:package`,size:10}),Ma(` `+O(e),1)]))),128))])])):I(``,!0)])]))}}),Z0={class:`flex flex-col h-full`},Q0={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},$0={class:`relative flex-1 max-w-xs`},e2={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},t2={class:`flex-1 overflow-y-auto p-3.5`},n2={key:0,class:`flex flex-col gap-1`},r2={class:`flex flex-col min-w-0 flex-1`},i2={class:`font-mono text-sm font-medium text-foreground`},a2={class:`font-mono text-2xs text-accent/80`},o2=[`onClick`],s2=[`onClick`],c2=[`title`],l2={key:1,class:`empty-state`},u2=Tr({__name:`Crons`,props:{crons:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(null),o=L(()=>{let e=[...n.crons];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.schedule?.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e}),s=L(()=>a.value?`Are you sure you want to delete cron job "${a.value.name}"? A backup will be created.`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}return(t,n)=>(M(),N(`div`,Z0,[P(`div`,Q0,[P(`div`,$0,[F(j(B),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search cron jobs...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,i.value]])]),P(`span`,e2,O(o.value.length)+` jobs`,1),P(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New cron job (C)`,onClick:n[1]||=e=>r(`create`)},[F(j(B),{icon:`lucide:plus`,size:13}),n[3]||=Ma(` New `,-1)])]),P(`div`,t2,[o.value.length>0?(M(),N(`div`,n2,[(M(!0),N(ma,null,Zr(o.value,(t,n)=>(M(),N(`div`,{key:n,class:`list-item group`},[F(j(B),{icon:`lucide:clock`,size:14,class:`text-accent flex-shrink-0`}),P(`div`,r2,[P(`span`,i2,O(t.name),1),P(`span`,a2,O(t.schedule),1)]),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit cron job`,onClick:Cs(e=>r(`edit`,t),[`stop`])},[F(j(B),{icon:`lucide:pencil`,size:12})],8,o2),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete cron job`,onClick:e=>c(t)},[F(j(B),{icon:`lucide:trash-2`,size:12})],8,s2),t.filePath?(M(),N(`span`,{key:0,class:`file-name`,title:t.filePath},O(e.filePath(t.filePath)),9,c2)):I(``,!0)]))),128))])):(M(),N(`div`,l2,[F(j(B),{icon:`lucide:clock`,size:32,class:`text-muted-foreground/40 mb-3`}),n[4]||=P(`div`,{class:`empty-title`},`No cron jobs`,-1),n[5]||=P(`div`,{class:`empty-desc`},`Define scheduled tasks with defineScheduled()`,-1)]))]),F(y0,{open:!!a.value,title:`Delete Cron Job`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),d2={class:`w-full h-full relative bg-background`},f2={key:0,class:`w-full h-full relative`},p2={key:0,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground text-xs`},m2=[`src`],h2={key:1,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground px-10 py-10 text-center bg-background`},g2={key:1,class:`flex flex-col items-center justify-center h-full text-muted-foreground gap-3 px-10 py-10 text-center`},_2=Tr({__name:`DrizzleStudio`,props:{studioUrl:{},available:{type:Boolean}},setup(e){let t=e,n=k(!1),r=k(!1),i=t.studioUrl||`http://127.0.0.1:4983`;function a(){n.value=!0,r.value=!1}function o(){r.value=!0}function s(){window.open(i,`_blank`,`noopener,noreferrer`)}function c(){window.open(`https://local.drizzle.studio`,`_blank`,`noopener,noreferrer`)}return(t,l)=>(M(),N(`div`,d2,[e.available===!1?(M(),N(`div`,g2,[F(j(B),{icon:`lucide:database`,size:40,class:`text-muted-foreground/50`}),l[6]||=P(`div`,{class:`text-[15px] font-semibold text-foreground`},`Database Not Configured`,-1),l[7]||=P(`div`,{class:`text-xs leading-relaxed max-w-90 op-fade`},[Ma(` Drizzle Studio requires a database connection. Configure `),P(`code`,{class:`bg-secondary px-1.5 py-0.5 rounded text-[11px] font-mono text-primary`},`db0`),Ma(` or Drizzle ORM to enable. `)],-1)])):(M(),N(`div`,f2,[!n.value&&!r.value?(M(),N(`div`,p2,[l[0]||=P(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),l[1]||=P(`span`,null,`Connecting to Drizzle Studio...`,-1),l[2]||=P(`p`,{class:`text-[12px] text-muted-foreground/70 m-0`},[Ma(` Make sure `),P(`code`,{class:`bg-secondary px-1 py-0.5 rounded font-mono text-primary text-[11px]`},`drizzle-kit studio`),Ma(` is running on port 4983 `)],-1),P(`button`,{class:`btn-action-sm mt-2`,onClick:c},`Open local.drizzle.studio →`)])):I(``,!0),zn(P(`iframe`,{src:j(i),class:`w-full h-full border-none bg-white`,title:`Drizzle Studio`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups allow-modals`,onLoad:a,onError:o},null,40,m2),[[Lo,n.value]]),r.value||!e.available?(M(),N(`div`,h2,[F(j(B),{icon:`lucide:database`,size:40,class:`text-muted-foreground/50`}),l[3]||=P(`div`,{class:`text-[15px] font-semibold text-foreground`},`Drizzle Studio Not Connected`,-1),l[4]||=P(`div`,{class:`text-xs leading-relaxed max-w-90 op-fade`},` Drizzle Studio needs to be started separately. Run the command below and refresh: `,-1),l[5]||=P(`pre`,{class:`bg-secondary border border-base px-4 py-2.5 rounded-md font-mono text-xs text-foreground my-1`},`npx drizzle-kit studio`,-1),P(`button`,{class:`mt-2 px-4.5 py-2 bg-primary border-none rounded-md text-primary-foreground text-sm font-medium cursor-pointer transition-all hover:bg-primary/90`,onClick:s},` Open in Browser (`+O(j(i))+`) → `,1)])):I(``,!0)]))]))}}),v2={class:`flex flex-col h-full`},y2={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},b2={class:`relative flex-1 max-w-xs`},x2={class:`flex gap-1`},S2={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},C2={class:`flex-1 overflow-hidden p-3.5`},w2={key:0,class:`h-full`},T2={key:1,class:`h-full overflow-y-auto`},E2={key:0,class:`section-card`},D2={class:`section-header`},O2={class:`section-body`},k2={class:`info-key font-mono text-2xs flex items-center gap-1.5`},A2=[`title`],j2=[`onClick`],M2=[`onClick`],N2={key:1,class:`empty-state`},P2={class:`empty-title`},F2={class:`empty-desc`},I2=Tr({__name:`EnvVars`,props:{env:{},onAdd:{type:Function},onEdit:{type:Function},onDelete:{type:Function}},setup(e){let t=e,n=k(``),r=k(`list`),i=L(()=>{let e=Object.entries(t.env);if(n.value){let t=n.value.toLowerCase();e=e.filter(([e,n])=>e.toLowerCase().includes(t)||String(n).toLowerCase().includes(t))}return e.sort(([e],[t])=>e.localeCompare(t))}),a=L(()=>JSON.stringify(t.env,null,2));function o(e){let t=e.toUpperCase();return[`KEY`,`SECRET`,`TOKEN`,`PASSWORD`,`AUTH`,`CREDENTIAL`].some(e=>t.includes(e))}return(e,s)=>(M(),N(`div`,v2,[P(`div`,y2,[P(`div`,b2,[F(j(B),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),zn(P(`input`,{"onUpdate:modelValue":s[0]||=e=>n.value=e,type:`text`,placeholder:`Search env vars...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,n.value]])]),P(`div`,x2,[P(`button`,{class:D([`filter-chip`,r.value===`list`?`filter-chip-active`:`filter-chip-idle`]),onClick:s[1]||=e=>r.value=`list`},` List `,2),P(`button`,{class:D([`filter-chip`,r.value===`json`?`filter-chip-active`:`filter-chip-idle`]),onClick:s[2]||=e=>r.value=`json`},` JSON `,2)]),P(`button`,{class:`flex items-center gap-1 px-2 py-1 bg-primary text-primary-foreground rounded-md text-2xs font-medium hover:bg-primary/90 transition-colors cursor-pointer flex-shrink-0`,title:`Add env var`,onClick:s[3]||=(...e)=>t.onAdd&&t.onAdd(...e)},[F(j(B),{icon:`lucide:plus`,size:12}),s[4]||=Ma(` Add `,-1)]),P(`span`,S2,O(i.value.length)+` vars`,1)]),P(`div`,C2,[r.value===`json`?(M(),N(`div`,w2,[F(lQ,{"model-value":a.value,language:`json`,readonly:``,label:`Environment Variables`,height:`100%`},null,8,[`model-value`])])):(M(),N(`div`,T2,[i.value.length>0?(M(),N(`div`,E2,[P(`div`,D2,[F(j(B),{icon:`lucide:shield`,size:13,class:`text-warning`}),s[5]||=P(`span`,{class:`section-title`},`Environment Variables`,-1)]),P(`div`,O2,[(M(!0),N(ma,null,Zr(i.value,([e,n])=>(M(),N(`div`,{key:e,class:`info-row group`},[P(`span`,k2,[o(e)?(M(),wa(j(B),{key:0,icon:`lucide:eye-off`,size:11,class:`text-destructive`})):I(``,!0),Ma(` `+O(e),1)]),P(`span`,{class:`info-val truncate max-w-[200px]`,title:String(n)},O(String(n)),9,A2),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-5 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit env var`,onClick:Cs(r=>t.onEdit(e,String(n)),[`stop`])},[F(j(B),{icon:`lucide:pencil`,size:11})],8,j2),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-5 flex items-center justify-center text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete env var`,onClick:Cs(n=>t.onDelete(e),[`stop`])},[F(j(B),{icon:`lucide:trash-2`,size:11})],8,M2)]))),128))])])):(M(),N(`div`,N2,[F(j(B),{icon:`lucide:terminal`,size:32,class:`text-muted-foreground/40 mb-3`}),P(`div`,P2,O(n.value?`No env vars match your search`:`No environment variables`),1),P(`div`,F2,O(n.value?`Try different keywords`:`Define env vars in your .env file`),1)]))]))])]))}}),L2={class:`flex flex-col h-full`},R2={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},z2={class:`relative flex-1 max-w-xs`},B2={class:`text-[10px] text-muted-foreground ml-auto op-fade`},V2={class:`flex-1 overflow-y-auto p-3.5`},H2={key:0,class:`flex flex-col gap-1`},U2={class:`flex flex-col flex-1 min-w-0`},W2={class:`text-xs font-medium text-foreground truncate`},G2=[`title`],K2={key:0,class:`text-[10px] px-1.5 py-0.5 bg-purple-500/12 text-purple-400 rounded-md font-semibold`},q2=[`onClick`],J2=[`onClick`],Y2=[`title`],X2={key:1,class:`empty-state`},Z2=Tr({__name:`Layouts`,props:{layouts:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(null),o=L(()=>{let e=[...n.layouts];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t))}return e.sort((e,t)=>e.isDefault===t.isDefault?e.name.localeCompare(t.name):e.isDefault?-1:1)}),s=L(()=>a.value?`Are you sure you want to delete layout "${a.value.name}"? A backup will be created.`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}return(t,n)=>(M(),N(`div`,L2,[P(`div`,R2,[P(`div`,z2,[F(j(B),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search layouts...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,i.value]])]),P(`span`,B2,O(e.layouts.length)+` layouts`,1),P(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New layout (L)`,onClick:n[1]||=e=>r(`create`)},[F(j(B),{icon:`lucide:plus`,size:13}),n[3]||=Ma(` New `,-1)])]),P(`div`,V2,[o.value.length>0?(M(),N(`div`,H2,[(M(!0),N(ma,null,Zr(o.value,(t,n)=>(M(),N(`div`,{key:n,class:`list-item group`},[F(j(B),{icon:`lucide:layout`,size:14,class:`text-purple-400 flex-shrink-0`}),P(`div`,U2,[P(`span`,W2,O(t.name),1),P(`span`,{class:`text-[10px] text-muted-foreground font-mono truncate`,title:t.path},O(t.path),9,G2)]),t.isDefault?(M(),N(`span`,K2,` DEFAULT `)):I(``,!0),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit layout`,onClick:Cs(e=>r(`edit`,t),[`stop`])},[F(j(B),{icon:`lucide:pencil`,size:12})],8,q2),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete layout`,onClick:e=>c(t)},[F(j(B),{icon:`lucide:trash-2`,size:12})],8,J2),t.filePath?(M(),N(`span`,{key:1,class:`file-name`,title:t.filePath},O(e.filePath(t.filePath)),9,Y2)):I(``,!0)]))),128))])):(M(),N(`div`,X2,[F(j(B),{icon:`lucide:layout`,size:32,class:`text-muted-foreground/40 mb-3`}),n[4]||=P(`div`,{class:`empty-title`},`No layouts found`,-1),n[5]||=P(`div`,{class:`empty-desc`},`Add layout files to the layouts/ directory`,-1)]))]),F(y0,{open:!!a.value,title:`Delete Layout`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),Q2={class:`flex flex-col h-full`},$2={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},e4={class:`relative flex-1 max-w-xs`},t4={class:`flex gap-1`},n4={class:`flex-1 overflow-y-auto p-3.5`},r4={key:0,class:`flex flex-col gap-1`},i4=[`title`],a4={key:0,class:`text-[10px] px-1.5 py-0.5 bg-warning/12 text-warning rounded-md font-semibold`},o4=[`onClick`],s4=[`onClick`],c4=[`title`],l4={key:1,class:`empty-state`},u4=Tr({__name:`Middlewares`,props:{middlewares:{},filePath:{type:Function}},emits:[`delete`,`edit`,`create`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(`ALL`),o=k(null),s=L(()=>{let e=[...n.middlewares];if(a.value===`GLOBAL`?e=e.filter(e=>e.global):a.value===`ROUTE`&&(e=e.filter(e=>!e.global)),i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t))}return e.sort((e,t)=>e.global===t.global?e.path.localeCompare(t.path):e.global?-1:1)}),c=L(()=>n.middlewares.filter(e=>e.global).length),l=L(()=>n.middlewares.filter(e=>!e.global).length),u=L(()=>o.value?`Are you sure you want to delete middleware "${o.value.path}"? A backup will be created.`:``);function d(e){o.value=e}function f(){o.value&&=(r(`delete`,o.value),null)}return(t,n)=>(M(),N(`div`,Q2,[P(`div`,$2,[P(`div`,e4,[F(j(B),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search middlewares...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,i.value]])]),P(`div`,t4,[P(`button`,{class:D([`filter-chip`,a.value===`ALL`?`filter-chip-active`:`filter-chip-idle`]),onClick:n[1]||=e=>a.value=`ALL`},` All (`+O(e.middlewares.length)+`) `,3),P(`button`,{class:D([`filter-chip`,a.value===`GLOBAL`?`bg-warning/15 text-warning op100!`:`filter-chip-idle`]),onClick:n[2]||=e=>a.value=`GLOBAL`},` Global (`+O(c.value)+`) `,3),P(`button`,{class:D([`filter-chip`,a.value===`ROUTE`?`bg-info/15 text-info op100!`:`filter-chip-idle`]),onClick:n[3]||=e=>a.value=`ROUTE`},` Route (`+O(l.value)+`) `,3)]),P(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0 ml-auto`,title:`New middleware (M)`,onClick:n[4]||=e=>r(`create`)},[F(j(B),{icon:`lucide:plus`,size:13}),n[6]||=Ma(` New `,-1)])]),P(`div`,n4,[s.value.length>0?(M(),N(`div`,r4,[(M(!0),N(ma,null,Zr(s.value,(t,n)=>(M(),N(`div`,{key:n,class:`list-item group`},[F(j(B),{icon:`lucide:layers`,size:14,class:`text-warning flex-shrink-0`}),P(`span`,{class:`font-mono text-foreground flex-1 text-xs truncate`,title:t.path},O(t.path),9,i4),t.global?(M(),N(`span`,a4,` GLOBAL `)):I(``,!0),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Edit middleware`,onClick:Cs(e=>r(`edit`,t),[`stop`])},[F(j(B),{icon:`lucide:pencil`,size:12})],8,o4),P(`button`,{class:`opacity-0 group-hover:opacity-100 size-6 flex items-center justify-center text-muted-foreground hover:text-destructive rounded transition-all cursor-pointer flex-shrink-0`,title:`Delete middleware`,onClick:e=>d(t)},[F(j(B),{icon:`lucide:trash-2`,size:12})],8,s4),t.filePath?(M(),N(`span`,{key:1,class:`file-name`,title:t.filePath},O(e.filePath(t.filePath)),9,c4)):I(``,!0)]))),128))])):(M(),N(`div`,l4,[F(j(B),{icon:`lucide:layers`,size:32,class:`text-muted-foreground/40 mb-3`}),n[7]||=P(`div`,{class:`empty-title`},`No middlewares found`,-1),n[8]||=P(`div`,{class:`empty-desc`},`Add middleware files to intercept requests`,-1)]))]),F(y0,{open:!!o.value,title:`Delete Middleware`,message:u.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:f,onCancel:n[5]||=e=>o.value=null},null,8,[`open`,`message`])]))}}),d4={class:`p-3.5`},f4={class:`grid grid-cols-4 gap-2 mb-3`},p4={class:`text-lg font-semibold text-foreground leading-tight`},m4={class:`text-[11px] text-muted-foreground`},h4={class:`grid grid-cols-2 gap-2.5 mb-2.5`},g4={class:`section-card`},_4={class:`section-header`},v4={class:`section-body`},y4={class:`info-row`},b4={class:`info-val`},x4={class:`info-row`},S4={class:`info-val`},C4={class:`info-row`},w4={class:`info-val`},T4={class:`section-card`},E4={class:`section-header`},D4={class:`section-body`},O4={key:0,class:`px-3.5 py-2.5 flex flex-wrap gap-1.5`},k4={key:1,class:`empty-state py-6`},A4={key:0,class:`section-card`},j4={class:`section-header`},M4={class:`section-body`},N4={class:`info-key font-mono text-2xs`},P4={class:`info-val`},F4=Tr({__name:`Overview`,props:{info:{},uptime:{},fmtUptime:{type:Function},fmtTime:{type:Function},fmtVal:{type:Function}},setup(e){let t=e,n=L(()=>t.info?[{val:t.info.pages||0,label:`Pages`,icon:`lucide:file-text`,color:`primary`},{val:t.info.apiRoutes||0,label:`API Routes`,icon:`lucide:send`,color:`info`},{val:t.info.middleware||0,label:`Middleware`,icon:`lucide:layers`,color:`warning`},{val:t.info.crons||0,label:`Cron Jobs`,icon:`lucide:clock`,color:`accent`}]:[]),r={primary:`bg-primary/10 text-primary`,success:`bg-success/12 text-success`,warning:`bg-warning/12 text-warning`,info:`bg-info/12 text-info`,accent:`bg-accent/10 text-accent`,destructive:`bg-destructive/12 text-destructive`},i=[`primary`,`success`,`info`,`warning`,`accent`];return(t,a)=>(M(),N(`div`,d4,[P(`div`,f4,[(M(!0),N(ma,null,Zr(n.value,(e,t)=>(M(),N(`div`,{key:t,class:`flex items-center gap-2.5 px-3 py-2.5 bg-background border border-base rounded-lg`},[P(`div`,{class:D([`size-9 rounded-lg flex items-center justify-center flex-shrink-0`,[r[e.color]]])},[F(j(B),{icon:e.icon,size:18},null,8,[`icon`])],2),P(`div`,null,[P(`div`,p4,O(e.val),1),P(`div`,m4,O(e.label),1)])]))),128))]),P(`div`,h4,[P(`div`,g4,[P(`div`,_4,[F(j(B),{icon:`lucide:activity`,size:13,class:`text-primary`}),a[0]||=P(`span`,{class:`section-title`},`Server Status`,-1)]),P(`div`,v4,[a[4]||=P(`div`,{class:`info-row`},[P(`span`,{class:`info-key`},`Status`),P(`span`,{class:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold bg-success/12 text-success`},[P(`span`,{class:`size-1.5 rounded-full bg-success animate-pulse`}),Ma(` Running `)])],-1),P(`div`,y4,[a[1]||=P(`span`,{class:`info-key`},`Uptime`,-1),P(`span`,b4,O(e.fmtUptime(e.uptime)),1)]),P(`div`,x4,[a[2]||=P(`span`,{class:`info-key`},`Version`,-1),P(`span`,S4,`v`+O(e.info.version),1)]),P(`div`,C4,[a[3]||=P(`span`,{class:`info-key`},`Start Time`,-1),P(`span`,w4,O(e.fmtTime(e.info.startTime)),1)])])]),P(`div`,T4,[P(`div`,E4,[F(j(B),{icon:`lucide:cpu`,size:13,class:`text-info`}),a[5]||=P(`span`,{class:`section-title`},`Presets`,-1)]),P(`div`,D4,[e.info.presets&&e.info.presets.length>0?(M(),N(`div`,O4,[(M(!0),N(ma,null,Zr(e.info.presets,(e,t)=>(M(),N(`span`,{key:e,class:D([`inline-flex items-center px-2.5 py-1 rounded-md text-2xs font-medium`,[r[i[t%i.length]]]])},O(e),3))),128))])):(M(),N(`div`,k4,[...a[6]||=[P(`span`,{class:`text-xs text-muted-foreground`},`No presets loaded`,-1)]]))])])]),e.info.config&&Object.keys(e.info.config).length>0?(M(),N(`div`,A4,[P(`div`,j4,[F(j(B),{icon:`lucide:settings`,size:13,class:`text-warning`}),a[7]||=P(`span`,{class:`section-title`},`Configuration`,-1)]),P(`div`,M4,[(M(!0),N(ma,null,Zr(e.info.config,(t,n)=>(M(),N(`div`,{key:String(n),class:`info-row`},[P(`span`,N4,O(n),1),P(`span`,P4,O(e.fmtVal(t)),1)]))),128))])])):I(``,!0)]))}}),I4={class:`flex flex-col h-full`},L4={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},R4={class:`relative flex-1 max-w-xs`},z4={class:`text-2xs text-muted-foreground ml-auto flex-shrink-0 op-fade`},B4={class:`flex-1 overflow-y-auto p-3.5`},V4={key:0,class:`flex flex-col gap-1`},H4={class:`flex flex-col min-w-0 flex-1`},U4=[`title`],W4={key:0,class:`text-2xs text-muted-foreground flex items-center gap-1 mt-0.5`},G4=[`title`],K4=[`onClick`],q4=[`onClick`],J4=[`onClick`],Y4=[`onClick`],X4={key:1,class:`empty-state`},Z4={class:`empty-title`},Q4={class:`empty-desc`},$4=Tr({__name:`Pages`,props:{pages:{},filePath:{type:Function}},emits:[`delete`,`edit`,`edit-meta`,`create`],setup(e,{emit:t}){let n=e,r=t,i=k(``),a=k(null),o=L(()=>{let e=[...n.pages];if(i.value){let t=i.value.toLowerCase();e=e.filter(e=>e.path.toLowerCase().includes(t)||e.filePath&&e.filePath.toLowerCase().includes(t)||e.name&&e.name.toLowerCase().includes(t))}return e.sort((e,t)=>e.path.localeCompare(t.path))}),s=L(()=>a.value?`Are you sure you want to delete "${a.value.path}"? A backup will be created (.bak file).`:``);function c(e){a.value=e}function l(){a.value&&=(r(`delete`,a.value),null)}function u(e){let t=`${window.location.origin}${e}`;window.open(t,`_blank`)}return(t,n)=>(M(),N(`div`,I4,[P(`div`,L4,[P(`div`,R4,[F(j(B),{icon:`lucide:search`,size:14,class:`absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground`}),zn(P(`input`,{"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`text`,placeholder:`Search pages...`,class:`w-full pl-8 pr-3 py-1.5 bg-background border border-base rounded-md text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all`},null,512),[[ms,i.value]])]),P(`span`,z4,O(o.value.length)+` pages`,1),P(`button`,{class:`inline-flex items-center gap-1 px-2 py-1.5 rounded-md bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors cursor-pointer flex-shrink-0`,title:`New page (P)`,onClick:n[1]||=e=>r(`create`)},[F(j(B),{icon:`lucide:plus`,size:13}),n[3]||=Ma(` New `,-1)])]),P(`div`,B4,[o.value.length>0?(M(),N(`div`,V4,[(M(!0),N(ma,null,Zr(o.value,(t,n)=>(M(),N(`div`,{key:n,class:`list-item group`},[F(j(B),{icon:`lucide:file-text`,size:14,class:`text-primary flex-shrink-0`}),P(`div`,H4,[P(`span`,{class:`font-mono text-primary text-xs`,title:t.path},O(t.path),9,U4),t.layout?(M(),N(`span`,W4,[F(j(B),{icon:`lucide:layout`,size:11}),Ma(` `+O(t.layout),1)])):I(``,!0)]),t.filePath?(M(),N(`span`,{key:0,class:`file-name`,title:t.filePath},O(e.filePath(t.filePath)),9,G4)):I(``,!0),P(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer flex-shrink-0 ml-1`,title:`Open route in browser`,onClick:Cs(e=>u(t.path),[`stop`])},[F(j(B),{icon:`lucide:external-link`,size:12})],8,K4),P(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer flex-shrink-0 ml-1`,title:`Edit page properties (definePage)`,onClick:Cs(e=>r(`edit-meta`,t),[`stop`])},[F(j(B),{icon:`lucide:sliders-horizontal`,size:12})],8,q4),P(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer flex-shrink-0 ml-1`,title:`Edit page source`,onClick:Cs(e=>r(`edit`,t),[`stop`])},[F(j(B),{icon:`lucide:pencil`,size:12})],8,J4),P(`button`,{class:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-all cursor-pointer flex-shrink-0 ml-1`,title:`Delete page`,onClick:Cs(e=>c(t),[`stop`])},[F(j(B),{icon:`lucide:trash-2`,size:12})],8,Y4)]))),128))])):(M(),N(`div`,X4,[F(j(B),{icon:`lucide:file-text`,size:32,class:`text-muted-foreground/40 mb-3`}),P(`div`,Z4,O(i.value?`No pages match your search`:`No pages found`),1),P(`div`,Q4,O(i.value?`Try different keywords`:`Add .vue files in your pages directory`),1)]))]),F(y0,{open:!!a.value,title:`Delete Page`,message:s.value,"confirm-text":`Delete`,variant:`danger`,onConfirm:l,onCancel:n[2]||=e=>a.value=null},null,8,[`open`,`message`])]))}}),e3=2,t3=1,n3=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(e3,Math.floor(u/e.css.cell.width)),rows:Math.max(t3,Math.floor(l/e.css.cell.height))}}},r3=Object.defineProperty,i3=Object.getOwnPropertyDescriptor,a3=(e,t)=>{for(var n in t)r3(e,n,{get:t[n],enumerable:!0})},o3=(e,t,n,r)=>{for(var i=r>1?void 0:r?i3(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&r3(t,n,i),i},Z=(e,t)=>(n,r)=>t(n,r,e),s3=`Terminal input`,c3={get:()=>s3,set:e=>s3=e},l3=`Too much output to announce, navigate to rows manually to read`,u3={get:()=>l3,set:e=>l3=e};function d3(e){return e.replace(/\r?\n/g,`\r`)}function f3(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function p3(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function m3(e,t,n,r){e.stopPropagation(),e.clipboardData&&h3(e.clipboardData.getData(`text/plain`),t,n,r)}function h3(e,t,n,r){e=d3(e),e=f3(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function g3(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function _3(e,t,n,r,i){g3(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function v3(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function y3(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var b3=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},x3=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},S3=``,C3=` `,w3=class e{constructor(){this.fg=0,this.bg=0,this.extended=new T3}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},T3=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},E3=class e extends w3{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new T3,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?v3(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},D3=`di$target`,O3=`di$dependencies`,k3=new Map;function A3(e){return e[O3]||[]}function j3(e){if(k3.has(e))return k3.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);M3(t,e,r)};return t._id=e,k3.set(e,t),t}function M3(e,t,n){t[D3]===t?t[O3].push({id:e,index:n}):(t[O3]=[{id:e,index:n}],t[D3]=t)}var N3=j3(`BufferService`),P3=j3(`CoreMouseService`),F3=j3(`CoreService`),I3=j3(`CharsetService`),L3=j3(`InstantiationService`),R3=j3(`LogService`),z3=j3(`OptionsService`),B3=j3(`OscLinkService`),V3=j3(`UnicodeService`),H3=j3(`DecorationService`),U3=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new E3,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):W3(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};U3=o3([Z(0,N3),Z(1,z3),Z(2,B3)],U3);function W3(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
371
|
+
|
|
372
|
+
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var G3=j3(`CharSizeService`),K3=j3(`CoreBrowserService`),q3=j3(`MouseService`),J3=j3(`RenderService`),Y3=j3(`SelectionService`),X3=j3(`CharacterJoinerService`),Z3=j3(`ThemeService`),Q3=j3(`LinkProviderService`),$3=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?a6.isErrorNoTelemetry(e)?new a6(e.message+`
|
|
373
|
+
|
|
374
|
+
`+e.stack):Error(e.message+`
|
|
375
|
+
|
|
376
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function e6(e){n6(e)||$3.onUnexpectedError(e)}var t6=`Canceled`;function n6(e){return e instanceof r6||e instanceof Error&&e.name===t6&&e.message===t6}var r6=class extends Error{constructor(){super(t6),this.name=this.message}};function i6(e){return Error(e?`Illegal argument: ${e}`:`Illegal argument`)}var a6=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}},o6=class e extends Error{constructor(t){super(t||`An unexpected bug occurred.`),Object.setPrototypeOf(this,e.prototype)}};function s6(e,t=0){return e[e.length-(1+t)]}var c6;(e=>{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(c6||={});var l6=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||c6.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};l6.empty=new l6(e=>{});function u6(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var d6;(e=>{function t(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]}e.slice=_;function v(t,n=1/0){let r=[];if(n===0)return[r,t];let i=t[Symbol.iterator]();for(let t=0;t<n;t++){let t=i.next();if(t.done)return[r,e.empty()];r.push(t.value)}return[r,{[Symbol.iterator](){return i}}]}e.consume=v;async function y(e){let t=[];for await(let n of e)t.push(n);return Promise.resolve(t)}e.asyncToArray=y})(d6||={});var f6=null;function p6(e){return f6?.trackDisposable(e),e}function m6(e){f6?.markAsDisposed(e)}function h6(e,t){f6?.setParent(e,t)}function g6(e){return f6?.markAsSingleton(e),e}function _6(e){if(d6.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function v6(...e){return y6(()=>_6(e))}function y6(e){let t=p6({dispose:u6(()=>{m6(t),e()})});return t}var b6=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,p6(this)}dispose(){this._isDisposed||(m6(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{_6(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return h6(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),h6(e,null))}};b6.DISABLE_DISPOSED_WARNING=!1;var x6=b6,S6=class{constructor(){this._store=new x6,p6(this),h6(this._store,this)}dispose(){m6(this),this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}};S6.None=Object.freeze({dispose(){}});var C6=class{constructor(){this._isDisposed=!1,p6(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&h6(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,m6(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&h6(e,null),e}},w6=typeof window==`object`?window:globalThis,T6=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};T6.Undefined=new T6(void 0);var E6=T6,D6=class{constructor(){this._first=E6.Undefined,this._last=E6.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===E6.Undefined}clear(){let e=this._first;for(;e!==E6.Undefined;){let t=e.next;e.prev=E6.Undefined,e.next=E6.Undefined,e=t}this._first=E6.Undefined,this._last=E6.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new E6(e);if(this._first===E6.Undefined)this._first=n,this._last=n;else if(t){let e=this._last;this._last=n,n.prev=e,e.next=n}else{let e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==E6.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==E6.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==E6.Undefined&&e.next!==E6.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===E6.Undefined&&e.next===E6.Undefined?(this._first=E6.Undefined,this._last=E6.Undefined):e.next===E6.Undefined?(this._last=this._last.prev,this._last.next=E6.Undefined):e.prev===E6.Undefined&&(this._first=this._first.next,this._first.prev=E6.Undefined);--this._size}*[Symbol.iterator](){let e=this._first;for(;e!==E6.Undefined;)yield e.element,e=e.next}},O6=globalThis.performance&&typeof globalThis.performance.now==`function`,k6=class e{static create(t){return new e(t)}constructor(e){this._now=O6&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}},A6;(e=>{e.None=()=>S6.None;function t(e,t){return d(e,()=>{},0,void 0,!0,void 0,t)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(e,t,n){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=r;function i(e,t,n){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=i;function a(e,t,n){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=a;function o(e){return e}e.signal=o;function s(...e){return(t,n=null,r)=>u(v6(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=s;function c(e,t,n,i){let a=n;return r(e,e=>(a=t(a,e),a),i)}e.reduce=c;function l(e,t){let n,r=new Q({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function u(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function d(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new Q({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=0,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=d;function f(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)}e.accumulate=f;function p(e,t=(e,t)=>e===t,n){let r=!0,i;return a(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=p;function m(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=m;function h(e,t=!1,n=[],r){let i=n.slice(),a=e(e=>{i?i.push(e):s.fire(e)});r&&r.add(a);let o=()=>{i?.forEach(e=>s.fire(e)),i=null},s=new Q({onWillAddFirstListener(){a||(a=e(e=>s.fire(e)),r&&r.add(a))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){a&&a.dispose(),a=null}});return r&&r.add(s),s.event}e.buffer=h;function g(e,t){return(n,r,i)=>{let a=t(new v);return e(function(e){let t=a.evaluate(e);t!==_&&n.call(r,t)},void 0,i)}}e.chain=g;let _=Symbol(`HaltChainable`);class v{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:_),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:_}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===_)break;return e}}function y(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new Q({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=y;function b(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new Q({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=b;function x(e){return new Promise(t=>n(e)(t))}e.toPromise=x;function S(e){let t=new Q;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event}e.fromPromise=S;function C(e,t){return e(e=>t.fire(e))}e.forward=C;function w(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=w;class ee{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new Q(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function te(e,t){return new ee(e,t).emitter.event}e.fromObservable=te;function ne(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return r instanceof x6?r.add(s):Array.isArray(r)&&r.push(s),s}}e.fromObservableLight=ne})(A6||={});var j6=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new k6,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};j6.all=new Set,j6._idPool=0;var M6=j6,N6=-1,P6=class e{constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||=new Map;let r=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,r+1),--this._warnCountdown,this._warnCountdown<=0){this._warnCountdown=n*.5;let[e,r]=this.getMostFrequentStack(),i=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${r}):`;console.warn(i),console.warn(e);let a=new L6(i,e);this._errorHandler(a)}return()=>{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t<r)&&(e=[n,r],t=r);return e}};P6._idPool=1;var F6=P6,I6=class e{constructor(e){this.value=e}static create(){return new e(Error().stack??``)}print(){console.warn(this.value.split(`
|
|
377
|
+
`).slice(2).join(`
|
|
378
|
+
`))}},L6=class extends Error{constructor(e,t){super(e),this.name=`ListenerLeakError`,this.stack=t}},R6=class extends Error{constructor(e,t){super(e),this.name=`ListenerRefusalError`,this.stack=t}},z6=0,B6=class{constructor(e){this.value=e,this.id=z6++}},V6=2,H6,Q=class{constructor(e){this._size=0,this._options=e,this._leakageMon=N6>0||this._options?.leakWarningThreshold?new F6(e?.onListenerError??e6,this._options?.leakWarningThreshold??N6):void 0,this._perfMon=this._options?._profName?new M6(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new R6(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||e6)(n),S6.None}if(this._disposed)return S6.None;t&&(e=e.bind(t));let r=new B6(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=I6.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof B6?(this._deliveryQueue??=new U6,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=y6(()=>{H6?.unregister(a),i?.(),this._removeListener(r)});if(n instanceof x6?n.add(a):Array.isArray(n)&&n.push(a),H6){let e=Error().stack.split(`
|
|
379
|
+
`).slice(2,3).join(`
|
|
380
|
+
`).trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);H6.register(a,t?.[2]??e,a)}return a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*V6<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:r&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||e6;if(!n){e.value(t);return}try{e.value(t)}catch(e){n(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof B6)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},U6=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},W6=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Q,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Q,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};W6.INSTANCE=new W6;var G6=W6;function K6(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}G6.INSTANCE.onDidChangeZoomLevel;function q6(e){return G6.INSTANCE.getZoomFactor(e)}G6.INSTANCE.onDidChangeFullscreen;var J6=typeof navigator==`object`?navigator.userAgent:``,Y6=J6.indexOf(`Firefox`)>=0,X6=J6.indexOf(`AppleWebKit`)>=0,Z6=J6.indexOf(`Chrome`)>=0,Q6=!Z6&&J6.indexOf(`Safari`)>=0;J6.indexOf(`Electron/`),J6.indexOf(`Android`);var $6=!1;if(typeof w6.matchMedia==`function`){let e=w6.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=w6.matchMedia(`(display-mode: fullscreen)`);$6=e.matches,K6(w6,e,({matches:e})=>{$6&&t.matches||($6=e)})}function e8(){return $6}var t8=`en`,n8=!1,r8=!1,i8=!1,a8=!1,o8=!1,s8=t8,c8,l8=globalThis,u8;typeof l8.vscode<`u`&&typeof l8.vscode.process<`u`?u8=l8.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(u8=process);var d8=typeof u8?.versions?.electron==`string`&&u8?.type===`renderer`;if(typeof u8==`object`){n8=u8.platform===`win32`,r8=u8.platform===`darwin`,i8=u8.platform===`linux`,i8&&u8.env.SNAP&&u8.env.SNAP_REVISION,u8.env.CI||u8.env.BUILD_ARTIFACTSTAGINGDIRECTORY,s8=t8;let e=u8.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,s8=t.resolvedLanguage||t8,t.languagePack?.translationsConfigFile}catch{}a8=!0}else typeof navigator==`object`&&!d8?(c8=navigator.userAgent,n8=c8.indexOf(`Windows`)>=0,r8=c8.indexOf(`Macintosh`)>=0,(c8.indexOf(`Macintosh`)>=0||c8.indexOf(`iPad`)>=0||c8.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,i8=c8.indexOf(`Linux`)>=0,c8?.indexOf(`Mobi`),o8=!0,s8=globalThis._VSCODE_NLS_LANGUAGE||t8,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var f8=n8,p8=r8,m8=i8,h8=a8;o8&&typeof l8.importScripts==`function`&&l8.origin;var g8=c8,_8=s8,v8;(e=>{function t(){return _8}e.value=t;function n(){return _8.length===2?_8===`en`:_8.length>=3&&_8[0]===`e`&&_8[1]===`n`&&_8[2]===`-`}e.isDefaultVariant=n;function r(){return _8===`en`}e.isDefault=r})(v8||={});var y8=typeof l8.postMessage==`function`&&!l8.importScripts;(()=>{if(y8){let e=[];l8.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),l8.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var b8=!!(g8&&g8.indexOf(`Chrome`)>=0);g8&&g8.indexOf(`Firefox`),!b8&&g8&&g8.indexOf(`Safari`),g8&&g8.indexOf(`Edg/`),g8&&g8.indexOf(`Android`);var x8=typeof navigator==`object`?navigator:{};h8||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||x8&&x8.clipboard&&x8.clipboard.writeText,h8||x8&&x8.clipboard&&x8.clipboard.readText,h8||e8()||x8.keyboard,`ontouchstart`in w6||x8.maxTouchPoints,w6.PointerEvent&&(`ontouchstart`in w6||navigator.maxTouchPoints);var S8=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},C8=new S8,w8=new S8,T8=new S8,E8=Array(230),D8;(e=>{function t(e){return C8.keyCodeToStr(e)}e.toString=t;function n(e){return C8.strToKeyCode(e)}e.fromString=n;function r(e){return w8.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return T8.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return w8.strToKeyCode(e)||T8.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return C8.keyCodeToStr(e)}e.toElectronAccelerator=o})(D8||={});var O8=class e{constructor(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}equals(t){return t instanceof e&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){return`K${this.ctrlKey?`1`:`0`}${this.shiftKey?`1`:`0`}${this.altKey?`1`:`0`}${this.metaKey?`1`:`0`}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new k8([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},k8=class{constructor(e){if(e.length===0)throw i6(`chords`);this.chords=e}getHashCode(){let e=``;for(let t=0,n=this.chords.length;t<n;t++)t!==0&&(e+=`;`),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function A8(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return D8.fromString(t)}let t=e.keyCode;if(t===3)return 7;if(Y6)switch(t){case 59:return 85;case 60:if(m8)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(p8)return 57;break}else if(X6&&(p8&&t===93||!p8&&t===92))return 57;return E8[t]||0}var j8=p8?256:2048,M8=512,N8=1024,P8=p8?2048:256,F8=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.(`AltGraph`),this.keyCode=A8(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=j8),this.altKey&&(t|=M8),this.shiftKey&&(t|=N8),this.metaKey&&(t|=P8),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new O8(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},I8=new WeakMap;function L8(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.origin!==`null`&&n.origin!==`null`&&t.origin!==n.origin)return null}catch{return null}return e.parent}var R8=class{static getSameOriginWindowChain(e){let t=I8.get(e);if(!t){t=[],I8.set(e,t);let n=e,r;do r=L8(n),r?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=r;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,i=this.getSameOriginWindowChain(e);for(let e of i){let i=e.window.deref();if(n+=i?.scrollY??0,r+=i?.scrollX??0,i===t||!e.iframeElement)break;let a=e.iframeElement.getBoundingClientRect();n+=a.top,r+=a.left}return{top:n,left:r}}},z8=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type===`dblclick`&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX==`number`?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=R8.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},B8=class{constructor(e,t=0,n=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let r=!1;if(Z6){let e=navigator.userAgent.match(/Chrome\/(\d+)/);r=(e?parseInt(e[1]):123)<=122}if(e){let t=e,n=e,i=e.view?.devicePixelRatio||1;if(typeof t.wheelDeltaY<`u`)r?this.deltaY=t.wheelDeltaY/(120*i):this.deltaY=t.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<`u`&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type===`wheel`){let t=e;t.deltaMode===t.DOM_DELTA_LINE?Y6&&!p8?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof t.wheelDeltaX<`u`)Q6&&f8?this.deltaX=-(t.wheelDeltaX/120):r?this.deltaX=t.wheelDeltaX/(120*i):this.deltaX=t.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<`u`&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type===`wheel`){let t=e;t.deltaMode===t.DOM_DELTA_LINE?Y6&&!p8?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*i):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},V8=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),H8;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof U8?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:A6.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:V8})})(H8||={});var U8=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?V8:(this._emitter||=new Q,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},W8=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e==`function`&&typeof t==`number`&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new o6(`Calling 'cancelAndSet' on a disposed TimeoutTimer`);this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new o6(`Calling 'setIfNotSet' on a disposed TimeoutTimer`);this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},G8=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new o6(`Calling 'cancelAndSet' on a disposed IntervalTimer`);this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=y6(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var K8;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(K8||={});var q8=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new Q,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await A6.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};q8.EMPTY=q8.fromArray([]);function J8(e){return Y8(e,0)}function Y8(e,t){switch(typeof e){case`object`:return e===null?X8(349,t):Array.isArray(e)?$8(e,t):e5(e,t);case`string`:return Q8(e,t);case`boolean`:return Z8(e,t);case`number`:return X8(e,t);case`undefined`:return X8(937,t);default:return X8(617,t)}}function X8(e,t){return(t<<5)-t+e|0}function Z8(e,t){return X8(e?433:863,t)}function Q8(e,t){t=X8(149417,t);for(let n=0,r=e.length;n<r;n++)t=X8(e.charCodeAt(n),t);return t}function $8(e,t){return t=X8(104579,t),e.reduce((e,t)=>Y8(t,e),t)}function e5(e,t){return t=X8(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=Q8(n,t),Y8(e[n],t)),t)}var{registerWindow:Wce,getWindow:t5,getDocument:Gce,getWindows:Kce,getWindowsCount:qce,getWindowId:n5,getWindowById:Jce,hasWindow:Yce,onDidRegisterWindow:r5,onWillUnregisterWindow:Xce,onDidUnregisterWindow:Zce}=function(){let e=new Map,t={window:w6,disposables:new x6};e.set(w6.vscodeWindowId,t);let n=new Q,r=new Q,i=new Q;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return S6.None;let a=new x6,o={window:t,disposables:a.add(new x6)};return e.set(t.vscodeWindowId,o),a.add(y6(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(a5(t,m5.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:w6},getDocument(e){return t5(e).document}}}(),i5=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function a5(e,t,n,r){return new i5(e,t,n,r)}function o5(e,t){return function(n){return t(new z8(e,n))}}function s5(e){return function(t){return e(new F8(t))}}var c5=function(e,t,n,r){let i=n;return t===`click`||t===`mousedown`||t===`contextmenu`?i=o5(t5(e),n):(t===`keydown`||t===`keypress`||t===`keyup`)&&(i=s5(n)),a5(e,t,i,r)},l5,u5=class extends G8{constructor(e){super(),this.defaultTarget=e&&t5(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},d5=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){e6(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,r=new Map,i=i=>{n.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),r.set(i,!0);a.length>0;)a.sort(d5.sort),a.shift().execute();r.set(i,!1)};l5=(t,r,a=0)=>{let o=n5(t),s=new d5(r,a),c=e.get(o);return c||(c=[],e.set(o,c)),c.push(s),n.get(o)||(n.set(o,!0),t.requestAnimationFrame(()=>i(o))),s}})();var f5=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};f5.None=new f5(0,0);function p5(e){let t=e.getBoundingClientRect(),n=t5(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=J8(n),a=r.get(i);if(a)a.users+=1;else{let o=new Q,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(y6(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var m5={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:X6?`webkitAnimationStart`:`animationstart`,ANIMATION_END:X6?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:X6?`webkitAnimationIteration`:`animationiteration`},h5=class{constructor(e){this.domNode=e,this._maxWidth=``,this._width=``,this._height=``,this._top=``,this._left=``,this._bottom=``,this._right=``,this._paddingTop=``,this._paddingLeft=``,this._paddingBottom=``,this._paddingRight=``,this._fontFamily=``,this._fontWeight=``,this._fontSize=``,this._fontStyle=``,this._fontFeatureSettings=``,this._fontVariationSettings=``,this._textDecoration=``,this._lineHeight=``,this._letterSpacing=``,this._className=``,this._display=``,this._position=``,this._visibility=``,this._color=``,this._backgroundColor=``,this._layerHint=!1,this._contain=`none`,this._boxShadow=``}setMaxWidth(e){let t=g5(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=g5(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=g5(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=g5(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=g5(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=g5(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=g5(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=g5(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=g5(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=g5(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=g5(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=g5(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=g5(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=g5(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?`translate3d(0px, 0px, 0px)`:``)}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function g5(e){return typeof e==`number`?`${e}px`:e}function _5(e){return new h5(e)}var v5=class{constructor(){this._hooks=new x6,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let a=e;try{e.setPointerCapture(t),this._hooks.add(y6(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=t5(e)}this._hooks.add(a5(a,m5.POINTER_MOVE,e=>{if(e.buttons!==n){this.stopMonitoring(!0);return}e.preventDefault(),this._pointerMoveCallback(e)})),this._hooks.add(a5(a,m5.POINTER_UP,e=>this.stopMonitoring(!0)))}};function y5(e,t,n){let r=null,i=null;if(typeof n.value==`function`?(r=`value`,i=n.value,i.length!==0&&console.warn(`Memoize should only be used in functions with zero parameters`)):typeof n.get==`function`&&(r=`get`,i=n.get),!i)throw Error(`not supported`);let a=`$memoize$${t}`;n[r]=function(...e){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[a]}}var b5;(e=>(e.Tap=`-xterm-gesturetap`,e.Change=`-xterm-gesturechange`,e.Start=`-xterm-gesturestart`,e.End=`-xterm-gesturesend`,e.Contextmenu=`-xterm-gesturecontextmenu`))(b5||={});var x5=class e extends S6{constructor(){super(),this.dispatched=!1,this.targets=new D6,this.ignoreTargets=new D6,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(A6.runAndSubscribe(r5,({window:e,disposables:t})=>{t.add(a5(e.document,`touchstart`,e=>this.onTouchStart(e),{passive:!1})),t.add(a5(e.document,`touchend`,t=>this.onTouchEnd(e,t))),t.add(a5(e.document,`touchmove`,e=>this.onTouchMove(e),{passive:!1}))},{window:w6,disposables:this._store}))}static addTarget(t){return e.isTouchDevice()?(e.INSTANCE||=g6(new e),y6(e.INSTANCE.targets.push(t))):S6.None}static ignoreTarget(t){return e.isTouchDevice()?(e.INSTANCE||=g6(new e),y6(e.INSTANCE.ignoreTargets.push(t))):S6.None}static isTouchDevice(){return`ontouchstart`in w6||navigator.maxTouchPoints>0}dispose(){this.handle&&=(this.handle.dispose(),null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&=(this.handle.dispose(),null);for(let n=0,r=e.targetTouches.length;n<r;n++){let r=e.targetTouches.item(n);this.activeTouches[r.identifier]={id:r.identifier,initialTarget:r.target,initialTimeStamp:t,initialPageX:r.pageX,initialPageY:r.pageY,rollingTimestamps:[t],rollingPageX:[r.pageX],rollingPageY:[r.pageY]};let i=this.newGestureEvent(b5.Start,r.target);i.pageX=r.pageX,i.pageY=r.pageY,this.dispatchEvent(i)}this.dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}onTouchEnd(t,n){let r=Date.now(),i=Object.keys(this.activeTouches).length;for(let a=0,o=n.changedTouches.length;a<o;a++){let o=n.changedTouches.item(a);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn(`move of an UNKNOWN touch`,o);continue}let s=this.activeTouches[o.identifier],c=Date.now()-s.initialTimeStamp;if(c<e.HOLD_DELAY&&Math.abs(s.initialPageX-s6(s.rollingPageX))<30&&Math.abs(s.initialPageY-s6(s.rollingPageY))<30){let e=this.newGestureEvent(b5.Tap,s.initialTarget);e.pageX=s6(s.rollingPageX),e.pageY=s6(s.rollingPageY),this.dispatchEvent(e)}else if(c>=e.HOLD_DELAY&&Math.abs(s.initialPageX-s6(s.rollingPageX))<30&&Math.abs(s.initialPageY-s6(s.rollingPageY))<30){let e=this.newGestureEvent(b5.Contextmenu,s.initialTarget);e.pageX=s6(s.rollingPageX),e.pageY=s6(s.rollingPageY),this.dispatchEvent(e)}else if(i===1){let e=s6(s.rollingPageX),n=s6(s.rollingPageY),i=s6(s.rollingTimestamps)-s.rollingTimestamps[0],a=e-s.rollingPageX[0],o=n-s.rollingPageY[0],c=[...this.targets].filter(e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget));this.inertia(t,c,r,Math.abs(a)/i,a>0?1:-1,e,Math.abs(o)/i,o>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(b5.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&=(n.preventDefault(),n.stopPropagation(),!1)}newGestureEvent(e,t){let n=document.createEvent(`CustomEvent`);return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(t){if(t.type===b5.Tap){let n=new Date().getTime(),r=0;r=n-this._lastSetTapCountTime>e.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=n,t.tapCount=r}else(t.type===b5.Change||t.type===b5.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let e of this.ignoreTargets)if(e.contains(t.initialTarget))return;let e=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let r=0,i=t.initialTarget;for(;i&&i!==n;)r++,i=i.parentElement;e.push([r,n])}e.sort((e,t)=>e[0]-t[0]);for(let[n,r]of e)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,r,i,a,o,s,c,l){this.handle=l5(t,()=>{let u=Date.now(),d=u-r,f=0,p=0,m=!0;i+=e.SCROLL_FRICTION*d,s+=e.SCROLL_FRICTION*d,i>0&&(m=!1,f=a*i*d),s>0&&(m=!1,p=c*s*d);let h=this.newGestureEvent(b5.Change);h.translationX=f,h.translationY=p,n.forEach(e=>e.dispatchEvent(h)),m||this.inertia(t,n,u,i,a,o+f,s,c,l+p)})}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn(`end of an UNKNOWN touch`,r);continue}let i=this.activeTouches[r.identifier],a=this.newGestureEvent(b5.Change,i.initialTarget);a.translationX=r.pageX-s6(i.rollingPageX),a.translationY=r.pageY-s6(i.rollingPageY),a.pageX=r.pageX,a.pageY=r.pageY,this.dispatchEvent(a),i.rollingPageX.length>3&&(i.rollingPageX.shift(),i.rollingPageY.shift(),i.rollingTimestamps.shift()),i.rollingPageX.push(r.pageX),i.rollingPageY.push(r.pageY),i.rollingTimestamps.push(t)}this.dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}};x5.SCROLL_FRICTION=-.005,x5.HOLD_DELAY=700,x5.CLEAR_TAP_COUNT_TIME=400,o3([y5],x5,`isTouchDevice`,1);var S5=x5,C5=class extends S6{onclick(e,t){this._register(a5(e,m5.CLICK,n=>t(new z8(t5(e),n))))}onmousedown(e,t){this._register(a5(e,m5.MOUSE_DOWN,n=>t(new z8(t5(e),n))))}onmouseover(e,t){this._register(a5(e,m5.MOUSE_OVER,n=>t(new z8(t5(e),n))))}onmouseleave(e,t){this._register(a5(e,m5.MOUSE_LEAVE,n=>t(new z8(t5(e),n))))}onkeydown(e,t){this._register(a5(e,m5.KEY_DOWN,e=>t(new F8(e))))}onkeyup(e,t){this._register(a5(e,m5.KEY_UP,e=>t(new F8(e))))}oninput(e,t){this._register(a5(e,m5.INPUT,t))}onblur(e,t){this._register(a5(e,m5.BLUR,t))}onfocus(e,t){this._register(a5(e,m5.FOCUS,t))}onchange(e,t){this._register(a5(e,m5.CHANGE,t))}ignoreGesture(e){return S5.ignoreTarget(e)}},w5=11,T5=class extends C5{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement(`div`),this.bgDomNode.className=`arrow-background`,this.bgDomNode.style.position=`absolute`,this.bgDomNode.style.width=e.bgWidth+`px`,this.bgDomNode.style.height=e.bgHeight+`px`,typeof e.top<`u`&&(this.bgDomNode.style.top=`0px`),typeof e.left<`u`&&(this.bgDomNode.style.left=`0px`),typeof e.bottom<`u`&&(this.bgDomNode.style.bottom=`0px`),typeof e.right<`u`&&(this.bgDomNode.style.right=`0px`),this.domNode=document.createElement(`div`),this.domNode.className=e.className,this.domNode.style.position=`absolute`,this.domNode.style.width=w5+`px`,this.domNode.style.height=w5+`px`,typeof e.top<`u`&&(this.domNode.style.top=e.top+`px`),typeof e.left<`u`&&(this.domNode.style.left=e.left+`px`),typeof e.bottom<`u`&&(this.domNode.style.bottom=e.bottom+`px`),typeof e.right<`u`&&(this.domNode.style.right=e.right+`px`),this._pointerMoveMonitor=this._register(new v5),this._register(c5(this.bgDomNode,m5.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(c5(this.domNode,m5.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new u5),this._pointerdownScheduleRepeatTimer=this._register(new W8)}_arrowPointerDown(e){!e.target||!(e.target instanceof Element)||(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,t5(e))},200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault())}},E5=class e{constructor(e,t,n,r,i,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,n|=0,r|=0,i|=0,a|=0,o|=0),this.rawScrollLeft=r,this.rawScrollTop=o,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),o+i>a&&(o=a-i),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(t,n){return new e(this._forceIntegerValues,typeof t.width<`u`?t.width:this.width,typeof t.scrollWidth<`u`?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<`u`?t.height:this.height,typeof t.scrollHeight<`u`?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new e(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<`u`?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<`u`?t.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}},Qce=class extends S6{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new E5(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>`u`?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>`u`?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;r=t?new k5(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let t=this._state.withScrollPosition(e);this._smoothScrolling=k5.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},D5=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function O5(e,t){let n=t-e;return function(t){return e+n*tle(t)}}function $ce(e,t,n){return function(r){return r<n?e(r/n):t((r-n)/(1-n))}}var k5=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.duration=r,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let r,i;return e<t?(r=e+.75*n,i=t-.75*n):(r=e-.75*n,i=t+.75*n),$ce(O5(e,r),O5(i,t),.33)}return O5(e,t)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){let t=(e-this.startTime)/this.duration;return t<1?new D5(this.scrollLeft(t),this.scrollTop(t),!1):new D5(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,n,r){return e.start(t,n,r)}static start(t,n,r){r+=10;let i=Date.now()-10;return new e(t,n,i,r)}};function ele(e){return e**3}function tle(e){return 1-ele(1-e)}var nle=class extends S6{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new W8)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3||this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?` fade`:``)))}},rle=140,A5=class extends C5{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new nle(e.visibility,`visible scrollbar `+e.extraScrollbarClassName,`invisible scrollbar `+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new v5),this._shouldRender=!0,this.domNode=_5(document.createElement(`div`)),this.domNode.setAttribute(`role`,`presentation`),this.domNode.setAttribute(`aria-hidden`,`true`),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition(`absolute`),this._register(a5(this.domNode.domNode,m5.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new T5(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=_5(document.createElement(`div`)),this.slider.setClassName(`slider`),this.slider.setPosition(`absolute`),this.slider.setTop(e),this.slider.setLeft(t),typeof n==`number`&&this.slider.setWidth(n),typeof r==`number`&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain(`strict`),this.domNode.domNode.appendChild(this.slider.domNode),this._register(a5(this.slider.domNode,m5.POINTER_DOWN,e=>{e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))})),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX==`number`&&typeof e.offsetY==`number`)t=e.offsetX,n=e.offsetY;else{let r=p5(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName(`active`,!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let i=this._sliderOrthogonalPointerPosition(e),a=Math.abs(i-n);if(f8&&a>rle){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let o=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(o))},()=>{this.slider.toggleClassName(`active`,!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},j5=class e{constructor(e,t,n,r,i,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize===t?!1:(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize===t?!1:(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition===t?!1:(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,r,i){let a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=r>0&&r>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*o/r))),l=(o-c)/(r-n),u=i*l;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(c),computedSliderRatio:l,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;let t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}},ile=class extends A5{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new j5(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:`horizontal`,scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw Error(`horizontalHasArrows is not supported in xterm.js`);this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},ale=class extends A5{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new j5(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:`vertical`,scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw Error(`horizontalHasArrows is not supported in xterm.js`);this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},ole=500,M5=50,N5=!0,sle=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},P5=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,r=this._rear;do{let i=r===this._front?e:2**-n;if(e-=i,t+=this._memory[r].score*i,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}while(!0);return t<=.5}acceptStandardWheelEvent(e){if(Z6){let t=q6(t5(e.browserEvent));this.accept(Date.now(),e.deltaX*t,e.deltaY*t)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let r=null,i=new sle(e,t,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,r)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(n+=.25),t){let r=Math.abs(e.deltaX),i=Math.abs(e.deltaY),a=Math.abs(t.deltaX),o=Math.abs(t.deltaY),s=Math.max(Math.min(r,a),1),c=Math.max(Math.min(i,o),1),l=Math.max(r,a),u=Math.max(i,o);l%s===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};P5.INSTANCE=new P5;var cle=P5,lle=class extends C5{constructor(e,t,n){super(),this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Q),this.onWillScroll=this._onWillScroll.event,this._options=dle(t),this._scrollable=n,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let r={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new ale(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new ile(this._scrollable,this._options,r)),this._domNode=document.createElement(`div`),this._domNode.className=`xterm-scrollable-element `+this._options.className,this._domNode.setAttribute(`role`,`presentation`),this._domNode.style.position=`relative`,this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=_5(document.createElement(`div`)),this._leftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=_5(document.createElement(`div`)),this._topShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=_5(document.createElement(`div`)),this._topLeftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onmouseleave(this._listenOnDomNode,e=>this._onMouseLeave(e)),this._hideTimeout=this._register(new W8),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=_6(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p8&&(this._options.className+=` mac`),this._domNode.className=`xterm-scrollable-element `+this._options.className}updateOptions(e){typeof e.handleMouseWheel<`u`&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<`u`&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<`u`&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<`u`&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<`u`&&(this._options.horizontal=e.horizontal),typeof e.vertical<`u`&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<`u`&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<`u`&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<`u`&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new B8(e))}_setListeningToMouseWheel(e){this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=_6(this._mouseWheelToDispose),e)&&this._mouseWheelToDispose.push(a5(this._listenOnDomNode,m5.MOUSE_WHEEL,e=>{this._onMouseWheel(new B8(e))},{passive:!1}))}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=cle.INSTANCE;N5&&t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+r===0?i=r=0:Math.abs(r)>=Math.abs(i)?i=0:r=0),this._options.flipAxes&&([r,i]=[i,r]);let a=!p8&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,r*=this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),s={};if(r){let e=M5*r,t=o.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(s,t)}if(i){let e=M5*i,t=o.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(s,t)}s=this._scrollable.validateScrollPosition(s),(o.scrollLeft!==s.scrollLeft||o.scrollTop!==s.scrollTop)&&(N5&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(s):this._scrollable.setScrollPositionNow(s),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?` left`:``,i=t?` top`:``,a=n||t?` top-left-corner`:``;this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${i}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),ole)}},ule=class extends lle{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function dle(e){let t={lazyRender:typeof e.lazyRender<`u`&&e.lazyRender,className:typeof e.className<`u`?e.className:``,useShadows:typeof e.useShadows<`u`?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<`u`?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<`u`&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<`u`&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<`u`&&e.alwaysConsumeMouseWheel,scrollYToX:typeof e.scrollYToX<`u`&&e.scrollYToX,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<`u`?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<`u`?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<`u`?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<`u`?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<`u`?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<`u`?e.listenOnDomNode:null,horizontal:typeof e.horizontal<`u`?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<`u`?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<`u`&&e.horizontalHasArrows,vertical:typeof e.vertical<`u`?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<`u`?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<`u`&&e.verticalHasArrows,verticalSliderSize:typeof e.verticalSliderSize<`u`?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<`u`&&e.scrollByPage};return t.horizontalSliderSize=typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<`u`?e.verticalSliderSize:t.verticalScrollbarSize,p8&&(t.className+=` mac`),t}var F5=class extends S6{constructor(e,t,n,r,i,a,o,s){super(),this._bufferService=n,this._optionsService=o,this._renderService=s,this._onRequestScrollLines=this._register(new Q),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let c=this._register(new Qce({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:e=>l5(r.window,e)}));this._register(this._optionsService.onSpecificOptionChange(`smoothScrollDuration`,()=>{c.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new ule(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},c)),this._register(this._optionsService.onMultipleOptionChange([`scrollSensitivity`,`fastScrollSensitivity`,`overviewRuler`],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(e=>{this._scrollableElement.updateOptions({handleMouseWheel:!(e&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(A6.runAndSubscribe(a.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=a.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(y6(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement(`style`),t.appendChild(this._styleElement),this._register(y6(()=>this._styleElement.remove())),this._register(A6.runAndSubscribe(a.onChangeColors,()=>{this._styleElement.textContent=[`.xterm .xterm-scrollable-element > .scrollbar > .slider {`,` background: ${a.colors.scrollbarSliderBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider:hover {`,` background: ${a.colors.scrollbarSliderHoverBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider.active {`,` background: ${a.colors.scrollbarSliderActiveBackground.css};`,`}`].join(`
|
|
381
|
+
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};F5=o3([Z(2,N3),Z(3,K3),Z(4,P3),Z(5,Z3),Z(6,z3),Z(7,J3)],F5);var I5=class extends S6{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement(`div`),this._container.classList.add(`xterm-decoration-container`),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this._register(y6(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement(`div`);t.classList.add(`xterm-decoration`),t.classList.toggle(`xterm-decoration-top-layer`,e?.options?.layer===`top`),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display=`none`),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=`none`,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?`none`:`block`,this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||`left`)===`right`?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:``:t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:``}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};I5=o3([Z(1,N3),Z(2,K3),Z(3,H3),Z(4,J3)],I5);var fle=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||`full`]&&t<=e.endBufferLine+this._linePadding[n||`full`]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},L5={full:0,left:0,center:0,right:0},R5={full:0,left:0,center:0,right:0},z5={full:0,left:0,center:0,right:0},B5=class extends S6{constructor(e,t,n,r,i,a,o,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._themeService=o,this._coreBrowserService=s,this._colorZoneStore=new fle,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-decoration-overview-ruler`),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(y6(()=>this._canvas?.remove()));let c=this._canvas.getContext(`2d`);if(c)this._ctx=c;else throw Error(`Ctx cannot be null`);this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?`none`:`block`})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange(`overviewRuler`,()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);R5.full=this._canvas.width,R5.left=e,R5.center=t,R5.right=e,this._refreshDrawHeightConstants(),z5.full=1,z5.left=1,z5.center=1+R5.left,z5.right=1+R5.left+R5.center}_refreshDrawHeightConstants(){L5.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);L5.left=t,L5.center=t,L5.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*L5.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*L5.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*L5.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*L5.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!==`full`&&this._renderColorZone(t);for(let t of e)t.position===`full`&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(z5[e.position||`full`],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-L5[e.position||`full`]/2),R5[e.position||`full`],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+L5[e.position||`full`]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};B5=o3([Z(2,N3),Z(3,H3),Z(4,J3),Z(5,z3),Z(6,Z3),Z(7,K3)],B5);var $;(e=>(e.NUL=`\0`,e.SOH=``,e.STX=``,e.ETX=``,e.EOT=``,e.ENQ=``,e.ACK=``,e.BEL=`\x07`,e.BS=`\b`,e.HT=` `,e.LF=`
|
|
382
|
+
`,e.VT=`\v`,e.FF=`\f`,e.CR=`\r`,e.SO=``,e.SI=``,e.DLE=``,e.DC1=``,e.DC2=``,e.DC3=``,e.DC4=``,e.NAK=``,e.SYN=``,e.ETB=``,e.CAN=``,e.EM=``,e.SUB=``,e.ESC=`\x1B`,e.FS=``,e.GS=``,e.RS=``,e.US=``,e.SP=` `,e.DEL=``))($||={});var V5;(e=>(e.PAD=``,e.HOP=``,e.BPH=``,e.NBH=``,e.IND=``,e.NEL=`
`,e.SSA=``,e.ESA=``,e.HTS=``,e.HTJ=``,e.VTS=``,e.PLD=``,e.PLU=``,e.RI=``,e.SS2=``,e.SS3=``,e.DCS=``,e.PU1=``,e.PU2=``,e.STS=``,e.CCH=``,e.MW=``,e.SPA=``,e.EPA=``,e.SOS=``,e.SGCI=``,e.SCI=``,e.CSI=``,e.ST=``,e.OSC=``,e.PM=``,e.APC=``))(V5||={});var H5;(e=>e.ST=`${$.ESC}\\`)(H5||={});var U5=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=``}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent=``,this._dataAlreadySent=``,this._compositionView.classList.add(`active`)}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove(`active`),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let t;e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,``);this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${$.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+`px`,this._compositionView.style.top=n+`px`,this._compositionView.style.height=t+`px`,this._compositionView.style.lineHeight=t+`px`,this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+`px`;let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+`px`,this._textarea.style.top=n+`px`,this._textarea.style.width=Math.max(i.width,1)+`px`,this._textarea.style.height=Math.max(i.height,1)+`px`,this._textarea.style.lineHeight=i.height+`px`}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};U5=o3([Z(2,N3),Z(3,z3),Z(4,F3),Z(5,J3)],U5);var W5=0,G5=0,K5=0,q5=0,J5={css:`#00000000`,rgba:0},Y5;(e=>{function t(e,t,n,r){return r===void 0?`#${e7(e)}${e7(t)}${e7(n)}`:`#${e7(e)}${e7(t)}${e7(n)}${e7(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(Y5||={});var X5;(e=>{function t(e,t){if(q5=(t.rgba&255)/255,q5===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return W5=a+Math.round((n-a)*q5),G5=o+Math.round((r-o)*q5),K5=s+Math.round((i-s)*q5),{css:Y5.toCss(W5,G5,K5),rgba:Y5.toRgba(W5,G5,K5)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=$5.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return Y5.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[W5,G5,K5]=$5.toChannels(t),{css:Y5.toCss(W5,G5,K5),rgba:t}}e.opaque=i;function a(e,t){return q5=Math.round(t*255),[W5,G5,K5]=$5.toChannels(e.rgba),{css:Y5.toCss(W5,G5,K5,q5),rgba:Y5.toRgba(W5,G5,K5,q5)}}e.opacity=a;function o(e,t){return q5=e.rgba&255,a(e,q5*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(X5||={});var Z5;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return W5=parseInt(e.slice(1,2).repeat(2),16),G5=parseInt(e.slice(2,3).repeat(2),16),K5=parseInt(e.slice(3,4).repeat(2),16),Y5.toColor(W5,G5,K5);case 5:return W5=parseInt(e.slice(1,2).repeat(2),16),G5=parseInt(e.slice(2,3).repeat(2),16),K5=parseInt(e.slice(3,4).repeat(2),16),q5=parseInt(e.slice(4,5).repeat(2),16),Y5.toColor(W5,G5,K5,q5);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return W5=parseInt(r[1]),G5=parseInt(r[2]),K5=parseInt(r[3]),q5=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),Y5.toColor(W5,G5,K5,q5);if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[W5,G5,K5,q5]=t.getImageData(0,0,1,1).data,q5!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:Y5.toRgba(W5,G5,K5,q5),css:e}}e.toColor=r})(Z5||={});var Q5;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(Q5||={});var $5;(e=>{function t(e,t){if(q5=(t&255)/255,q5===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return W5=a+Math.round((n-a)*q5),G5=o+Math.round((r-o)*q5),K5=s+Math.round((i-s)*q5),Y5.toRgba(W5,G5,K5)}e.blend=t;function n(e,t,n){let a=Q5.relativeLuminance(e>>8),o=Q5.relativeLuminance(t>>8);if(t7(a,o)<n){if(o<a){let o=r(e,t,n),s=t7(a,Q5.relativeLuminance(o>>8));if(s<n){let r=i(e,t,n);return s>t7(a,Q5.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=t7(a,Q5.relativeLuminance(s>>8));if(c<n){let i=r(e,t,n);return c>t7(a,Q5.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=t7(Q5.relativeLuminance2(o,s,c),Q5.relativeLuminance2(r,i,a));for(;l<n&&(o>0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=t7(Q5.relativeLuminance2(o,s,c),Q5.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=t7(Q5.relativeLuminance2(o,s,c),Q5.relativeLuminance2(r,i,a));for(;l<n&&(o<255||s<255||c<255);)o=Math.min(255,o+Math.ceil((255-o)*.1)),s=Math.min(255,s+Math.ceil((255-s)*.1)),c=Math.min(255,c+Math.ceil((255-c)*.1)),l=t7(Q5.relativeLuminance2(o,s,c),Q5.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})($5||={});function e7(e){let t=e.toString(16);return t.length<2?`0`+t:t}function t7(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var ple=class extends w3{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},n7=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new E3}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],r=t.translateToString(!0),i=0,a=0,o=0,s=t.getFg(0),c=t.getBg(0);for(let e=0;e<t.getTrimmedLength();e++)if(t.loadCell(e,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==s||this._workCell.bg!==c){if(e-i>1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}i=e,o=a,s=this._workCell.fg,c=this._workCell.bg}a+=this._workCell.getChars().length||C3.length}if(this._bufferService.cols-i>1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}return n}_getJoinedRanges(e,t,n,r,i){let a=e.substring(t,n),o=[];try{o=this._characterJoiners[0].handler(a)}catch(e){console.error(e)}for(let e=1;e<this._characterJoiners.length;e++)try{let t=this._characterJoiners[e].handler(a);for(let e=0;e<t.length;e++)n7._mergeRanges(o,t[e])}catch(e){console.error(e)}return this._stringRangesToCellRanges(o,r,i),o}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,a=0,o=e[r];if(o){for(let s=n;s<this._bufferService.cols;s++){let n=t.getWidth(s),c=t.getString(s).length||C3.length;if(n!==0){if(!i&&o[0]<=a&&(o[0]=s,i=!0),o[1]<=a){if(o[1]=s,o=e[++r],!o)break;o[0]<=a?(o[0]=s,i=!0):i=!1}a+=c}}o&&(o[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};n7=o3([Z(0,N3)],n7);function mle(e){return 57508<=e&&e<=57558}function hle(e){return 9472<=e&&e<=9631}function gle(e){return mle(e)||hle(e)}function _le(){return{css:{canvas:r7(),cell:r7()},device:{canvas:r7(),cell:r7(),char:{width:0,height:0,left:0,top:0}}}}function r7(){return{width:0,height:0}}var i7=class{constructor(e,t,n,r,i,a,o){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._themeService=o,this._workCell=new E3,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,a,o,s,c,l,u){let d=[],f=this._characterJoinerService.getJoinedCharacters(t),p=this._themeService.colors,m=e.getNoBgTrimmedLength();n&&m<a+1&&(m=a+1);let h,g=0,_=``,v=0,y=0,b=0,x=0,S=!1,C=0,w=!1,ee=0,te=0,ne=[],re=l!==-1&&u!==-1;for(let ie=0;ie<m;ie++){e.loadCell(ie,this._workCell);let m=this._workCell.getWidth();if(m===0)continue;let ae=!1,oe=ie>=te,se=ie,T=this._workCell;if(f.length>0&&ie===f[0][0]&&oe){let r=f.shift(),i=this._isCellInSelection(r[0],t);for(v=r[0]+1;v<r[1];v++)oe&&=i===this._isCellInSelection(v,t);oe&&=!n||a<r[0]||a>=r[1],oe?(ae=!0,T=new ple(this._workCell,e.translateToString(!0,r[0],r[1]),r[1]-r[0]),se=r[1]-1,m=T.getWidth()):te=r[1]}let ce=this._isCellInSelection(ie,t),le=n&&ie===a,E=re&&ie>=l&&ie<=u,ue=!1;this._decorationService.forEachDecorationAtCell(ie,t,void 0,e=>{ue=!0});let de=T.getChars()||C3;if(de===` `&&(T.isUnderline()||T.isOverline())&&(de=`\xA0`),ee=m*s-c.get(de,T.isBold(),T.isItalic()),!h)h=this._document.createElement(`span`);else if(g&&(ce&&w||!ce&&!w&&T.bg===y)&&(ce&&w&&p.selectionForeground||T.fg===b)&&T.extended.ext===x&&E===S&&ee===C&&!le&&!ae&&!ue&&oe){T.isInvisible()?_+=C3:_+=de,g++;continue}else g&&(h.textContent=_),h=this._document.createElement(`span`),g=0,_=``;if(y=T.bg,b=T.fg,x=T.extended.ext,S=E,C=ee,w=ce,ae&&a>=ie&&a<=se&&(a=ie),!this._coreService.isCursorHidden&&le&&this._coreService.isCursorInitialized){if(ne.push(`xterm-cursor`),this._coreBrowserService.isFocused)o&&ne.push(`xterm-cursor-blink`),ne.push(r===`bar`?`xterm-cursor-bar`:r===`underline`?`xterm-cursor-underline`:`xterm-cursor-block`);else if(i)switch(i){case`outline`:ne.push(`xterm-cursor-outline`);break;case`block`:ne.push(`xterm-cursor-block`);break;case`bar`:ne.push(`xterm-cursor-bar`);break;case`underline`:ne.push(`xterm-cursor-underline`);break;default:break}}if(T.isBold()&&ne.push(`xterm-bold`),T.isItalic()&&ne.push(`xterm-italic`),T.isDim()&&ne.push(`xterm-dim`),_=T.isInvisible()?C3:T.getChars()||C3,T.isUnderline()&&(ne.push(`xterm-underline-${T.extended.underlineStyle}`),_===` `&&(_=`\xA0`),!T.isUnderlineColorDefault()))if(T.isUnderlineColorRGB())h.style.textDecorationColor=`rgb(${w3.toColorRGB(T.getUnderlineColor()).join(`,`)})`;else{let e=T.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&T.isBold()&&e<8&&(e+=8),h.style.textDecorationColor=p.ansi[e].css}T.isOverline()&&(ne.push(`xterm-overline`),_===` `&&(_=`\xA0`)),T.isStrikethrough()&&ne.push(`xterm-strikethrough`),E&&(h.style.textDecoration=`underline`);let fe=T.getFgColor(),pe=T.getFgColorMode(),me=T.getBgColor(),he=T.getBgColorMode(),ge=!!T.isInverse();if(ge){let e=fe;fe=me,me=e;let t=pe;pe=he,he=t}let _e,D,ve=!1;this._decorationService.forEachDecorationAtCell(ie,t,void 0,e=>{e.options.layer!==`top`&&ve||(e.backgroundColorRGB&&(he=50331648,me=e.backgroundColorRGB.rgba>>8&16777215,_e=e.backgroundColorRGB),e.foregroundColorRGB&&(pe=50331648,fe=e.foregroundColorRGB.rgba>>8&16777215,D=e.foregroundColorRGB),ve=e.options.layer===`top`)}),!ve&&ce&&(_e=this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque,me=_e.rgba>>8&16777215,he=50331648,ve=!0,p.selectionForeground&&(pe=50331648,fe=p.selectionForeground.rgba>>8&16777215,D=p.selectionForeground)),ve&&ne.push(`xterm-decoration-top`);let ye;switch(he){case 16777216:case 33554432:ye=p.ansi[me],ne.push(`xterm-bg-${me}`);break;case 50331648:ye=Y5.toColor(me>>16,me>>8&255,me&255),this._addStyle(h,`background-color:#${a7((me>>>0).toString(16),`0`,6)}`);break;default:ge?(ye=p.foreground,ne.push(`xterm-bg-257`)):ye=p.background}switch(_e||T.isDim()&&(_e=X5.multiplyOpacity(ye,.5)),pe){case 16777216:case 33554432:T.isBold()&&fe<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(fe+=8),this._applyMinimumContrast(h,ye,p.ansi[fe],T,_e,void 0)||ne.push(`xterm-fg-${fe}`);break;case 50331648:let e=Y5.toColor(fe>>16&255,fe>>8&255,fe&255);this._applyMinimumContrast(h,ye,e,T,_e,D)||this._addStyle(h,`color:#${a7(fe.toString(16),`0`,6)}`);break;default:this._applyMinimumContrast(h,ye,p.foreground,T,_e,D)||ge&&ne.push(`xterm-fg-257`)}ne.length&&=(h.className=ne.join(` `),0),!le&&!ae&&!ue&&oe?g++:h.textContent=_,ee!==this.defaultSpacing&&(h.style.letterSpacing=`${ee}px`),d.push(h),ie=se}return h&&g&&(h.textContent=_),d}_applyMinimumContrast(e,t,n,r,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||gle(r.getCode()))return!1;let o=this._getContrastCache(r),s;if(!i&&!a&&(s=o.getColor(t.rgba,n.rgba)),s===void 0){let e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=X5.ensureContrastRatio(i||t,a||n,e),o.setColor((i||t).rgba,(a||n).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(`style`,`${e.getAttribute(`style`)||``}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0]}};i7=o3([Z(1,X3),Z(2,z3),Z(3,K3),Z(4,F3),Z(5,H3),Z(6,Z3)],i7);function a7(e,t,n){for(;e.length<n;)e=t+e;return e}var vle=class{constructor(e,t){this._flat=new Float32Array(256),this._font=``,this._fontSize=0,this._weight=`normal`,this._weightBold=`bold`,this._measureElements=[],this._container=e.createElement(`div`),this._container.classList.add(`xterm-width-cache-measure-container`),this._container.setAttribute(`aria-hidden`,`true`),this._container.style.whiteSpace=`pre`,this._container.style.fontKerning=`none`;let n=e.createElement(`span`);n.classList.add(`xterm-char-measure-element`);let r=e.createElement(`span`);r.classList.add(`xterm-char-measure-element`),r.style.fontWeight=`bold`;let i=e.createElement(`span`);i.classList.add(`xterm-char-measure-element`),i.style.fontStyle=`italic`;let a=e.createElement(`span`);a.classList.add(`xterm-char-measure-element`),a.style.fontWeight=`bold`,a.style.fontStyle=`italic`,this._measureElements=[n,r,i,a],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(a),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,n){let r=0;if(!t&&!n&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let t=this._measure(e,0);return t>0&&(this._flat[r]=t),t}let i=e;t&&(i+=`B`),n&&(i+=`I`);let a=this._holey.get(i);if(a===void 0){let r=0;t&&(r|=1),n&&(r|=2),a=this._measure(e,r),a>0&&this._holey.set(i,a)}return a}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},yle=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);if(s>=e.rows||c<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function ble(){return new yle}var o7=`xterm-dom-renderer-owner-`,s7=`xterm-rows`,c7=`xterm-fg-`,l7=`xterm-bg-`,u7=`xterm-focus`,d7=`xterm-selection`,xle=1,f7=class extends S6{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=a,this._linkifier2=o,this._charSizeService=c,this._optionsService=l,this._bufferService=u,this._coreService=d,this._coreBrowserService=f,this._themeService=p,this._terminalClass=xle++,this._rowElements=[],this._selectionRenderModel=ble(),this.onRequestRedraw=this._register(new Q).event,this._rowContainer=this._document.createElement(`div`),this._rowContainer.classList.add(s7),this._rowContainer.style.lineHeight=`normal`,this._rowContainer.setAttribute(`aria-hidden`,`true`),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement(`div`),this._selectionContainer.classList.add(d7),this._selectionContainer.setAttribute(`aria-hidden`,`true`),this.dimensions=_le(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(e=>this._injectCss(e))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(i7,document),this._element.classList.add(o7+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(e=>this._handleLinkHover(e))),this._register(this._linkifier2.onHideLinkUnderline(e=>this._handleLinkLeave(e))),this._register(y6(()=>{this._element.classList.remove(o7+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new vle(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=`hidden`;this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${s7} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${s7} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${s7} .xterm-dim { color: ${X5.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${s7}.${u7} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${s7}.${u7} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${s7}.${u7} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${s7} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${s7} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${s7} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${s7} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${s7} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${d7} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${d7} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${d7} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,r]of e.ansi.entries())t+=`${this._terminalSelector} .${c7}${n} { color: ${r.css}; }${this._terminalSelector} .${c7}${n}.xterm-dim { color: ${X5.multiplyOpacity(r,.5).css}; }${this._terminalSelector} .${l7}${n} { background-color: ${r.css}; }`;t+=`${this._terminalSelector} .${c7}257 { color: ${X5.opaque(e.background).css}; }${this._terminalSelector} .${c7}257.xterm-dim { color: ${X5.multiplyOpacity(X5.opaque(e.background),.5).css}; }${this._terminalSelector} .${l7}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get(`W`,!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){let e=this._document.createElement(`div`);this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(u7),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(u7),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(n){let n=e[0]>t[0];s.appendChild(this._createSelectionElement(a,n?t[0]:e[0],n?e[0]:t[0],o-a+1))}else{let n=r===a?e[0]:0,c=a===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,n,c));let l=o-a-1;if(s.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,l)),a!==o){let e=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement(`div`),a=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(n-t);return a+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-a),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${a}px`,i.style.width=`${o}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let c=e;c<=t;c++){let e=c+n.ydisp,t=this._rowElements[c],l=n.lines.get(e);if(!t||!l)break;t.replaceChildren(...this._rowFactory.createRow(l,e,e===r,o,s,i,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${o7}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,a){n<0&&(e=0),r<0&&(t=0);let o=this._bufferService.rows-1;n=Math.max(Math.min(n,o),0),r=Math.max(Math.min(r,o),0),i=Math.min(i,this._bufferService.cols);let s=this._bufferService.buffer,c=s.ybase+s.y,l=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=n;o<=r;++o){let p=o+s.ydisp,m=this._rowElements[o],h=s.lines.get(p);if(!m||!h)break;m.replaceChildren(...this._rowFactory.createRow(h,p,p===c,d,f,l,u,this.dimensions.css.cell.width,this._widthCache,a?o===n?e:0:-1,a?(o===r?t:i)-1:-1))}}};f7=o3([Z(7,L3),Z(8,G3),Z(9,z3),Z(10,N3),Z(11,F3),Z(12,K3),Z(13,Z3)],f7);var p7=class extends S6{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Q),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Cle(this._optionsService))}catch{this._measureStrategy=this._register(new Sle(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange([`fontFamily`,`fontSize`],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};p7=o3([Z(2,z3)],p7);var m7=class extends S6{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},Sle=class extends m7{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement(`span`),this._measureElement.classList.add(`xterm-char-measure-element`),this._measureElement.textContent=`W`.repeat(32),this._measureElement.setAttribute(`aria-hidden`,`true`),this._measureElement.style.whiteSpace=`pre`,this._measureElement.style.fontKerning=`none`,this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},Cle=class extends m7{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(`2d`);let t=this._ctx.measureText(`W`);if(!(`width`in t&&`fontBoundingBoxAscent`in t&&`fontBoundingBoxDescent`in t))throw Error(`Required font metrics not supported`)}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText(`W`);return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},wle=class extends S6{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new Tle(this._window)),this._onDprChange=this._register(new Q),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Q),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(e=>this._screenDprMonitor.setWindow(e))),this._register(A6.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(a5(this._textarea,`focus`,()=>this._isFocused=!0)),this._register(a5(this._textarea,`blur`,()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},Tle=class extends S6{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new C6),this._onDprChange=this._register(new Q),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(y6(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=a5(this._parentWindow,`resize`,()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},Ele=class extends S6{constructor(){super(),this.linkProviders=[],this._register(y6(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function h7(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),a=parseInt(i.getPropertyValue(`padding-left`)),o=parseInt(i.getPropertyValue(`padding-top`));return[t.clientX-r.left-a,t.clientY-r.top-o]}function Dle(e,t,n,r,i,a,o,s,c){if(!a)return;let l=h7(e,t,n);if(l)return l[0]=Math.ceil((l[0]+(c?o/2:0))/o),l[1]=Math.ceil(l[1]/s),l[0]=Math.min(Math.max(l[0],1),r+ +!!c),l[1]=Math.min(Math.max(l[1],1),i),l}var g7=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return Dle(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=h7(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};g7=o3([Z(0,J3),Z(1,G3)],g7);var Ole=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t),!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},_7={};a3(_7,{getSafariVersion:()=>Ale,isChromeOS:()=>E7,isFirefox:()=>x7,isIpad:()=>jle,isIphone:()=>Mle,isLegacyEdge:()=>kle,isLinux:()=>T7,isMac:()=>C7,isNode:()=>v7,isSafari:()=>S7,isWindows:()=>w7});var v7=typeof process<`u`&&`title`in process,y7=v7?`node`:navigator.userAgent,b7=v7?`node`:navigator.platform,x7=y7.includes(`Firefox`),kle=y7.includes(`Edge`),S7=/^((?!chrome|android).)*safari/i.test(y7);function Ale(){if(!S7)return 0;let e=y7.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var C7=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].includes(b7),jle=b7===`iPad`,Mle=b7===`iPhone`,w7=[`Windows`,`Win16`,`Win32`,`WinCE`].includes(b7),T7=b7.indexOf(`Linux`)>=0,E7=/\bCrOS\b/.test(y7),D7=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&=(this._cancelCallback(this._idleCallback),void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||=this._requestCallback(this._process.bind(this))}_process(e){this._idleCallback=void 0;let t=0,n=0,r=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),i=e.timeRemaining(),n*1.5>i){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},Nle=class extends D7{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},Ple=class extends D7{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},O7=!v7&&`requestIdleCallback`in window?Ple:Nle,Fle=class{constructor(){this._queue=new O7}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},k7=class extends S6{constructor(e,t,n,r,i,a,o,s,c){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=r,this._coreService=i,this._coreBrowserService=s,this._renderer=this._register(new C6),this._pausedResizeTask=new Fle,this._observerDisposable=this._register(new C6),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new Q),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Q),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Q),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Q),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new Ole((e,t)=>this._renderRows(e,t),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new Ile(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(y6(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(o.onResize(()=>this._fullRefresh())),this._register(o.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(a.onDecorationRegistered(()=>this._fullRefresh())),this._register(a.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange([`customGlyphs`,`drawBoldTextInBrightColors`,`letterSpacing`,`lineHeight`,`fontFamily`,`fontSize`,`fontWeight`,`fontWeightBold`,`minimumContrastRatio`,`rescaleOverlappingGlyphs`],()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange([`cursorBlink`,`cursorStyle`],()=>this.refreshRows(o.buffer.y,o.buffer.y,!0))),this._register(c.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(e=>this._registerIntersectionObserver(e,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if(`IntersectionObserver`in e){let n=new e.IntersectionObserver(e=>this._handleIntersectionChange(e[e.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=y6(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&=(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(e=>this.refreshRows(e.start,e.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};k7=o3([Z(2,z3),Z(3,G3),Z(4,F3),Z(5,H3),Z(6,N3),Z(7,K3),Z(8,Z3)],k7);var Ile=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function Lle(e,t,n,r){let i=n.buffer.x,a=n.buffer.y;if(!n.buffer.hasScrollback)return Ble(i,a,e,t,n,r)+A7(a,t,n,r)+Vle(i,a,e,t,n,r);let o;if(a===t)return o=i>e?`D`:`C`,F7(Math.abs(i-e),P7(o,r));o=a>t?`D`:`C`;let s=Math.abs(a-t);return F7(zle(a>t?e:i,n)+(s-1)*n.cols+1+Rle(a>t?i:e,n),P7(o,r))}function Rle(e,t){return e-1}function zle(e,t){return t.cols-e}function Ble(e,t,n,r,i,a){return A7(t,r,i,a).length===0?``:F7(N7(e,t,e,t-j7(t,i),!1,i).length,P7(`D`,a))}function A7(e,t,n,r){let i=e-j7(e,n),a=t-j7(t,n);return F7(Math.abs(i-a)-Hle(e,t,n),P7(M7(e,t),r))}function Vle(e,t,n,r,i,a){let o;o=A7(t,r,i,a).length>0?r-j7(r,i):t;let s=r,c=Ule(e,t,n,r,i,a);return F7(N7(e,o,n,s,c===`C`,i).length,P7(c,a))}function Hle(e,t,n){let r=0,i=e-j7(e,n),a=t-j7(t,n);for(let o=0;o<Math.abs(i-a);o++){let a=M7(e,t)===`A`?-1:1;n.buffer.lines.get(i+a*o)?.isWrapped&&r++}return r}function j7(e,t){let n=0,r=t.buffer.lines.get(e),i=r?.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r?.isWrapped;return n}function Ule(e,t,n,r,i,a){let o;return o=A7(n,r,i,a).length>0?r-j7(r,i):t,e<n&&o<=r||e>=n&&o<r?`C`:`D`}function M7(e,t){return e>t?`A`:`B`}function N7(e,t,n,r,i,a){let o=e,s=t,c=``;for(;(o!==n||s!==r)&&s>=0&&s<a.buffer.lines.length;)o+=i?1:-1,i&&o>a.cols-1?(c+=a.buffer.translateBufferLineToString(s,!1,e,o),o=0,e=0,s++):!i&&o<0&&(c+=a.buffer.translateBufferLineToString(s,!1,0,e+1),o=a.cols-1,e=o,s--);return c+a.buffer.translateBufferLineToString(s,!1,e,o)}function P7(e,t){let n=t?`O`:`[`;return $.ESC+n+e}function F7(e,t){e=Math.floor(e);let n=``;for(let r=0;r<e;r++)n+=t;return n}var Wle=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function I7(e,t){if(e.start.y>e.end.y)throw Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var L7=50,Gle=15,Kle=50,qle=500,Jle=RegExp(`\xA0`,`g`),R7=class extends S6{constructor(e,t,n,r,i,a,o,s,c){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=a,this._optionsService=o,this._renderService=s,this._coreBrowserService=c,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new E3,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Q),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Q),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Q),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Q),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(e=>this._handleTrim(e)),this._register(this._bufferService.buffers.onBufferActivate(e=>this._handleBufferActivate(e))),this.enable(),this._model=new Wle(this._bufferService),this._activeSelectionMode=0,this._register(y6(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(e=>{e.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return``;let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return``;let i=e[0]<t[0]?e[0]:t[0],a=e[0]<t[0]?t[0]:e[0];for(let o=e[1];o<=t[1];o++){let e=n.translateBufferLineToString(o,!0,i,a);r.push(e)}}else{let i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let i=e[1]+1;i<=t[1]-1;i++){let e=n.lines.get(i),t=n.translateBufferLineToString(i,!0);e?.isWrapped?r[r.length-1]+=t:r.push(t)}if(e[1]!==t[1]){let e=n.lines.get(t[1]),i=n.translateBufferLineToString(t[1],!0,0,t[0]);e&&e.isWrapped?r[r.length-1]+=i:r.push(i)}}return r.map(e=>e.replace(Jle,` `)).join(w7?`\r
|
|
383
|
+
`:`
|
|
384
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),T7&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=I7(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=h7(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-L7),L7),t/=L7,t/Math.abs(t)+Math.round(t*(Gle-1)))}shouldForceSelection(e){return C7?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(`mouseup`,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),Kle)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(`mouseup`,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(C7&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){let e=n.lines.get(this._model.selectionEnd[1]);e&&e.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<qle&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let t=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&t[0]!==void 0&&t[1]!==void 0){let e=Lle(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!n){this._oldHasSelection&&this._fireOnSelectionChange(e,t,n);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(e=>this._handleTrim(e))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,a=i.lines.get(e[1]);if(!a)return;let o=i.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(a,e[0]),c=s,l=e[0]-s,u=0,d=0,f=0,p=0;if(o.charAt(s)===` `){for(;s>0&&o.charAt(s-1)===` `;)s--;for(;c<o.length&&o.charAt(c+1)===` `;)c++}else{let t=e[0],n=e[0];a.getWidth(t)===0&&(u++,t--),a.getWidth(n)===2&&(d++,n++);let r=a.getString(n).length;for(r>1&&(p+=r-1,c+=r-1);t>0&&s>0&&!this._isCharWordSeparator(a.loadCell(t-1,this._workCell));){a.loadCell(t-1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,t--):e>1&&(f+=e-1,s-=e-1),s--,t--}for(;n<a.length&&c+1<o.length&&!this._isCharWordSeparator(a.loadCell(n+1,this._workCell));){a.loadCell(n+1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===2?(d++,n++):e>1&&(p+=e-1,c+=e-1),c++,n++}}c++;let m=s+l-u+f,h=Math.min(this._bufferService.cols,c-s+u+d-f-p);if(!(!t&&o.slice(s,c).trim()===``)){if(n&&m===0&&a.getCodePoint(0)!==32){let t=i.lines.get(e[1]-1);if(t&&a.isWrapped&&t.getCodePoint(this._bufferService.cols-1)!==32){let t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){let e=this._bufferService.cols-t.start;m-=e,h+=e}}}if(r&&m+h===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let t=i.lines.get(e[1]+1);if(t?.isWrapped&&t.getCodePoint(0)!==32){let t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(h+=t.length)}}return{start:m,length:h}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=I7(n,this._bufferService.cols)}};R7=o3([Z(3,N3),Z(4,F3),Z(5,q3),Z(6,z3),Z(7,J3),Z(8,K3)],R7);var z7=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},B7=class{constructor(){this._color=new z7,this._css=new z7}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},V7=Object.freeze((()=>{let e=[Z5.toColor(`#2e3436`),Z5.toColor(`#cc0000`),Z5.toColor(`#4e9a06`),Z5.toColor(`#c4a000`),Z5.toColor(`#3465a4`),Z5.toColor(`#75507b`),Z5.toColor(`#06989a`),Z5.toColor(`#d3d7cf`),Z5.toColor(`#555753`),Z5.toColor(`#ef2929`),Z5.toColor(`#8ae234`),Z5.toColor(`#fce94f`),Z5.toColor(`#729fcf`),Z5.toColor(`#ad7fa8`),Z5.toColor(`#34e2e2`),Z5.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:Y5.toCss(r,i,a),rgba:Y5.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:Y5.toCss(n,n,n),rgba:Y5.toRgba(n,n,n)})}return e})()),H7=Z5.toColor(`#ffffff`),U7=Z5.toColor(`#000000`),W7=Z5.toColor(`#ffffff`),G7=U7,K7={css:`rgba(255, 255, 255, 0.3)`,rgba:4294967117},Yle=H7,q7=class extends S6{constructor(e){super(),this._optionsService=e,this._contrastCache=new B7,this._halfContrastCache=new B7,this._onChangeColors=this._register(new Q),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:H7,background:U7,cursor:W7,cursorAccent:G7,selectionForeground:void 0,selectionBackgroundTransparent:K7,selectionBackgroundOpaque:X5.blend(U7,K7),selectionInactiveBackgroundTransparent:K7,selectionInactiveBackgroundOpaque:X5.blend(U7,K7),scrollbarSliderBackground:X5.opacity(H7,.2),scrollbarSliderHoverBackground:X5.opacity(H7,.4),scrollbarSliderActiveBackground:X5.opacity(H7,.5),overviewRulerBorder:H7,ansi:V7.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange(`minimumContrastRatio`,()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange(`theme`,()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=J7(e.foreground,H7),t.background=J7(e.background,U7),t.cursor=X5.blend(t.background,J7(e.cursor,W7)),t.cursorAccent=X5.blend(t.background,J7(e.cursorAccent,G7)),t.selectionBackgroundTransparent=J7(e.selectionBackground,K7),t.selectionBackgroundOpaque=X5.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=J7(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=X5.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?J7(e.selectionForeground,J5):void 0,t.selectionForeground===J5&&(t.selectionForeground=void 0),X5.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=X5.opacity(t.selectionBackgroundTransparent,.3)),X5.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=X5.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=J7(e.scrollbarSliderBackground,X5.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=J7(e.scrollbarSliderHoverBackground,X5.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=J7(e.scrollbarSliderActiveBackground,X5.opacity(t.foreground,.5)),t.overviewRulerBorder=J7(e.overviewRulerBorder,Yle),t.ansi=V7.slice(),t.ansi[0]=J7(e.black,V7[0]),t.ansi[1]=J7(e.red,V7[1]),t.ansi[2]=J7(e.green,V7[2]),t.ansi[3]=J7(e.yellow,V7[3]),t.ansi[4]=J7(e.blue,V7[4]),t.ansi[5]=J7(e.magenta,V7[5]),t.ansi[6]=J7(e.cyan,V7[6]),t.ansi[7]=J7(e.white,V7[7]),t.ansi[8]=J7(e.brightBlack,V7[8]),t.ansi[9]=J7(e.brightRed,V7[9]),t.ansi[10]=J7(e.brightGreen,V7[10]),t.ansi[11]=J7(e.brightYellow,V7[11]),t.ansi[12]=J7(e.brightBlue,V7[12]),t.ansi[13]=J7(e.brightMagenta,V7[13]),t.ansi[14]=J7(e.brightCyan,V7[14]),t.ansi[15]=J7(e.brightWhite,V7[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;r<n;r++)t.ansi[r+16]=J7(e.extendedAnsi[r],V7[r+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let e=0;e<this._restoreColors.ansi.length;++e)this._colors.ansi[e]=this._restoreColors.ansi[e];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};q7=o3([Z(0,z3)],q7);function J7(e,t){if(e!==void 0)try{return Z5.toColor(e)}catch{}return t}var Xle=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(let[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},Zle=class{constructor(){this._services=new Xle,this._services.set(L3,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=A3(e).sort((e,t)=>e.index-t.index),r=[];for(let t of n){let n=this._services.get(t.id);if(!n)throw Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id._id}.`);r.push(n)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},Qle={trace:0,debug:1,info:2,warn:3,error:4,off:5},$le=`xterm.js: `,Y7=class extends S6{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),eue=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=Qle[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:$le)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Y7=o3([Z(0,z3)],Y7);var eue,X7=class extends S6{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new Q),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Q),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Q),this.onTrim=this.onTrimEmitter.event,this._array=Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw Error(`Can only recycle when the buffer is full`);return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...n){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let t=this._length-1;t>=e;t--)this._array[this._getCyclicIndex(t+n.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;t<n.length;t++)this._array[this._getCyclicIndex(e+t)]=n[t];if(n.length&&this.onInsertEmitter.fire({index:e,amount:n.length}),this._length+n.length>this._maxLength){let e=this._length+n.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw Error(`start argument out of range`);if(e+n<0)throw Error(`Cannot shift elements in list beyond index 0`);if(n>0){for(let r=t-1;r>=0;r--)this.set(e+r+n,this.get(e+r));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Z7=3,Q7=Object.freeze(new w3),$7=0,e9=2,t9=class e{constructor(e,t,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(e*Z7);let r=t||E3.fromCharData([0,S3,1,0]);for(let t=0;t<e;++t)this.setCell(t,r);this.length=e}get(e){let t=this._data[e*Z7+0],n=t&2097151;return[this._data[e*Z7+1],t&2097152?this._combined[e]:n?v3(n):``,t>>22,t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._data[e*Z7+1]=t[0],t[1].length>1?(this._combined[e]=t[1],this._data[e*Z7+0]=e|2097152|t[2]<<22):this._data[e*Z7+0]=t[1].charCodeAt(0)|t[2]<<22}getWidth(e){return this._data[e*Z7+0]>>22}hasWidth(e){return this._data[e*Z7+0]&12582912}getFg(e){return this._data[e*Z7+1]}getBg(e){return this._data[e*Z7+2]}hasContent(e){return this._data[e*Z7+0]&4194303}getCodePoint(e){let t=this._data[e*Z7+0];return t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):t&2097151}isCombined(e){return this._data[e*Z7+0]&2097152}getString(e){let t=this._data[e*Z7+0];return t&2097152?this._combined[e]:t&2097151?v3(t&2097151):``}isProtected(e){return this._data[e*Z7+2]&536870912}loadCell(e,t){return $7=e*Z7,t.content=this._data[$7+0],t.fg=this._data[$7+1],t.bg=this._data[$7+2],t.content&2097152&&(t.combinedData=this._combined[e]),t.bg&268435456&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){t.content&2097152&&(this._combined[e]=t.combinedData),t.bg&268435456&&(this._extendedAttrs[e]=t.extended),this._data[e*Z7+0]=t.content,this._data[e*Z7+1]=t.fg,this._data[e*Z7+2]=t.bg}setCellFromCodepoint(e,t,n,r){r.bg&268435456&&(this._extendedAttrs[e]=r.extended),this._data[e*Z7+0]=t|n<<22,this._data[e*Z7+1]=r.fg,this._data[e*Z7+2]=r.bg}addCodepointToCell(e,t,n){let r=this._data[e*Z7+0];r&2097152?this._combined[e]+=v3(t):r&2097151?(this._combined[e]=v3(r&2097151)+v3(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[e*Z7+0]=r}insertCells(e,t,n){if(e%=this.length,e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length-e){let r=new E3;for(let n=this.length-e-t-1;n>=0;--n)this.setCell(e+t+n,this.loadCell(e+n,r));for(let r=0;r<t;++r)this.setCell(e+r,n)}else for(let t=e;t<this.length;++t)this.setCell(t,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(e,t,n){if(e%=this.length,t<this.length-e){let r=new E3;for(let n=0;n<this.length-e-t;++n)this.setCell(e+n,this.loadCell(e+t+n,r));for(let e=this.length-t;e<this.length;++e)this.setCell(e,n)}else for(let t=e;t<this.length;++t)this.setCell(t,n);e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),this.getWidth(e)===0&&!this.hasContent(e)&&this.setCellFromCodepoint(e,0,1,n)}replaceCells(e,t,n,r=!1){if(r){for(e&&this.getWidth(e-1)===2&&!this.isProtected(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&this.getWidth(t-1)===2&&!this.isProtected(t)&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.isProtected(e)||this.setCell(e,n),e++;return}for(e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.setCell(e++,n)}resize(e,t){if(e===this.length)return this._data.length*4*e9<this._data.buffer.byteLength;let n=e*Z7;if(e>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n<e;++n)this.setCell(n,t)}else{this._data=this._data.subarray(0,n);let t=Object.keys(this._combined);for(let n=0;n<t.length;n++){let r=parseInt(t[n],10);r>=e&&delete this._combined[r]}let r=Object.keys(this._extendedAttrs);for(let t=0;t<r.length;t++){let n=parseInt(r[t],10);n>=e&&delete this._extendedAttrs[n]}}return this.length=e,n*4*e9<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*e9<this._data.buffer.byteLength){let e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e,t=!1){if(t){for(let t=0;t<this.length;++t)this.isProtected(t)||this.setCell(t,e);return}this._combined={},this._extendedAttrs={};for(let t=0;t<this.length;++t)this.setCell(t,e)}copyFrom(e){this.length===e.length?this._data.set(e._data):this._data=new Uint32Array(e._data),this.length=e.length,this._combined={};for(let t in e._combined)this._combined[t]=e._combined[t];this._extendedAttrs={};for(let t in e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped}clone(){let t=new e(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let e in this._combined)t._combined[e]=this._combined[e];for(let e in this._extendedAttrs)t._extendedAttrs[e]=this._extendedAttrs[e];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*Z7+0]&4194303)return e+(this._data[e*Z7+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*Z7+0]&4194303||this._data[e*Z7+2]&50331648)return e+(this._data[e*Z7+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){let a=e._data;if(i)for(let i=r-1;i>=0;i--){for(let e=0;e<Z7;e++)this._data[(n+i)*Z7+e]=a[(t+i)*Z7+e];a[(t+i)*Z7+2]&268435456&&(this._extendedAttrs[n+i]=e._extendedAttrs[t+i])}else for(let i=0;i<r;i++){for(let e=0;e<Z7;e++)this._data[(n+i)*Z7+e]=a[(t+i)*Z7+e];a[(t+i)*Z7+2]&268435456&&(this._extendedAttrs[n+i]=e._extendedAttrs[t+i])}let o=Object.keys(e._combined);for(let r=0;r<o.length;r++){let i=parseInt(o[r],10);i>=t&&(this._combined[i-t+n]=e._combined[i])}}translateToString(e,t,n,r){t??=0,n??=this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let i=``;for(;t<n;){let e=this._data[t*Z7+0],n=e&2097151,a=e&2097152?this._combined[t]:n?v3(n):C3;if(i+=a,r)for(let e=0;e<a.length;++e)r.push(t);t+=e>>22||1}return r&&r.push(t),i}};function tue(e,t,n,r,i,a){let o=[];for(let s=0;s<e.length-1;s++){let c=s,l=e.get(++c);if(!l.isWrapped)continue;let u=[e.get(s)];for(;c<e.length&&l.isWrapped;)u.push(l),l=e.get(++c);if(!a&&r>=s&&r<c){s+=u.length-1;continue}let d=0,f=n9(u,d,t),p=1,m=0;for(;p<u.length;){let e=n9(u,p,t),r=e-m,a=n-f,o=Math.min(r,a);u[d].copyCellsFrom(u[p],m,f,o,!1),f+=o,f===n&&(d++,f=0),m+=o,m===e&&(p++,m=0),f===0&&d!==0&&u[d-1].getWidth(n-1)===2&&(u[d].copyCellsFrom(u[d-1],n-1,f++,1,!1),u[d-1].setCell(n-1,i))}u[d].replaceCells(f,n,i);let h=0;for(let e=u.length-1;e>0&&(e>d||u[e].getTrimmedLength()===0);e--)h++;h>0&&(o.push(s+u.length-h),o.push(h)),s+=u.length-1}return o}function nue(e,t){let n=[],r=0,i=t[r],a=0;for(let o=0;o<e.length;o++)if(i===o){let n=t[++r];e.onDeleteEmitter.fire({index:o-a,amount:n}),o+=n-1,a+=n,i=t[++r]}else n.push(o);return{layout:n,countRemoved:a}}function rue(e,t){let n=[];for(let r=0;r<t.length;r++)n.push(e.get(t[r]));for(let t=0;t<n.length;t++)e.set(t,n[t]);e.length=t.length}function iue(e,t,n){let r=[],i=e.map((n,r)=>n9(e,r,t)).reduce((e,t)=>e+t),a=0,o=0,s=0;for(;s<i;){if(i-s<n){r.push(i-s);break}a+=n;let c=n9(e,o,t);a>c&&(a-=c,o++);let l=e[o].getWidth(a-1)===2;l&&a--;let u=l?n-1:n;r.push(u),s+=u}return r}function n9(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var r9=class e{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=e._nextId++,this._onDispose=this.register(new Q),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),_6(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}};r9._nextId=1;var aue=r9,i9={},a9=i9.B;i9[0]={"`":`◆`,a:`▒`,b:`␉`,c:`␌`,d:`␍`,e:`␊`,f:`°`,g:`±`,h:``,i:`␋`,j:`┘`,k:`┐`,l:`┌`,m:`└`,n:`┼`,o:`⎺`,p:`⎻`,q:`─`,r:`⎼`,s:`⎽`,t:`├`,u:`┤`,v:`┴`,w:`┬`,x:`│`,y:`≤`,z:`≥`,"{":`π`,"|":`≠`,"}":`£`,"~":`·`},i9.A={"#":`£`},i9.B=void 0,i9[4]={"#":`£`,"@":`¾`,"[":`ij`,"\\":`½`,"]":`|`,"{":`¨`,"|":`f`,"}":`¼`,"~":`´`},i9.C=i9[5]={"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},i9.R={"#":`£`,"@":`à`,"[":`°`,"\\":`ç`,"]":`§`,"{":`é`,"|":`ù`,"}":`è`,"~":`¨`},i9.Q={"@":`à`,"[":`â`,"\\":`ç`,"]":`ê`,"^":`î`,"`":`ô`,"{":`é`,"|":`ù`,"}":`è`,"~":`û`},i9.K={"@":`§`,"[":`Ä`,"\\":`Ö`,"]":`Ü`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`ß`},i9.Y={"#":`£`,"@":`§`,"[":`°`,"\\":`ç`,"]":`é`,"`":`ù`,"{":`à`,"|":`ò`,"}":`è`,"~":`ì`},i9.E=i9[6]={"@":`Ä`,"[":`Æ`,"\\":`Ø`,"]":`Å`,"^":`Ü`,"`":`ä`,"{":`æ`,"|":`ø`,"}":`å`,"~":`ü`},i9.Z={"#":`£`,"@":`§`,"[":`¡`,"\\":`Ñ`,"]":`¿`,"{":`°`,"|":`ñ`,"}":`ç`},i9.H=i9[7]={"@":`É`,"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},i9[`=`]={"#":`ù`,"@":`à`,"[":`é`,"\\":`ç`,"]":`ê`,"^":`î`,_:`è`,"`":`ô`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`û`};var o9=4294967295,s9=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Q7.clone(),this.savedCharset=a9,this.markers=[],this._nullCell=E3.fromCharData([0,S3,1,0]),this._whitespaceCell=E3.fromCharData([0,C3,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new O7,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new X7(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new T3),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new T3),this._whitespaceCell}getBlankLine(e,t){return new t9(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>o9?o9:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Q7);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new X7(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(Q7),r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);let a=0;if(this._rows<t)for(let r=this._rows;r<t;r++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new t9(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new t9(e,n)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let e=this.lines.length-i;e>0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend===`conpty`&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=tue(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Q7),n);if(r.length>0){let n=nue(this.lines,r);rue(this.lines,n.layout),this._reflowLargerAdjustViewport(e,t,n.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(Q7),i=n;for(;i-->0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new t9(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=this.getNullCell(Q7),i=[],a=0;for(let o=this.lines.length-1;o>=0;o--){let s=this.lines.get(o);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let c=[s];for(;s.isWrapped&&o>0;)s=this.lines.get(--o),c.unshift(s);if(!n){let e=this.ybase+this.y;if(e>=o&&e<o+c.length)continue}let l=c[c.length-1].getTrimmedLength(),u=iue(c,this._cols,e),d=u.length-c.length,f;f=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+d):Math.max(0,this.lines.length-this.lines.maxLength+d);let p=[];for(let e=0;e<d;e++){let e=this.getBlankLine(Q7,!0);p.push(e)}p.length>0&&(i.push({start:o+c.length+a,newLines:p}),a+=p.length),c.push(...p);let m=u.length-1,h=u[m];h===0&&(m--,h=u[m]);let g=c.length-d-1,_=l;for(;g>=0;){let e=Math.min(_,h);if(c[m]===void 0)break;c[m].copyCellsFrom(c[g],_-e,h-e,e,!0),h-=e,h===0&&(m--,h=u[m]),_-=e,_===0&&(g--,_=n9(c,Math.max(g,0),this._cols))}for(let t=0;t<c.length;t++)u[t]<e&&c[t].setCell(u[t],r);let v=d-f;for(;v-->0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+a)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}if(i.length>0){let e=[],t=[];for(let e=0;e<this.lines.length;e++)t.push(this.lines.get(e));let n=this.lines.length,r=n-1,o=0,s=i[o];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+a);let c=0;for(let l=Math.min(this.lines.maxLength-1,n+a-1);l>=0;l--)if(s&&s.start>r+c){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(l--,s.newLines[e]);l++,e.push({index:r+1,amount:s.newLines.length}),c+=s.newLines.length,s=i[++o]}else this.lines.set(l,t[r--]);let l=0;for(let t=e.length-1;t>=0;t--)e[t].index+=l,this.lines.onInsertEmitter.fire(e[t]),l+=e[t].amount;let u=Math.max(0,n+a-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):``}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(e==null?(this.tabs={},e=0):this.tabs[e]||(e=this.prevStop(e));e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e??=this.x;!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e??=this.x;!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new aue(e);return this.markers.push(t),t.register(this.lines.onTrim(e=>{t.line-=e,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(e=>{t.line>=e.index&&(t.line+=e.amount)})),t.register(this.lines.onDelete(e=>{t.line>=e.index&&t.line<e.index+e.amount&&t.dispose(),t.line>e.index&&(t.line-=e.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},oue=class extends S6{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new Q),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange(`scrollback`,()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange(`tabStopWidth`,()=>this.setupTabStops()))}reset(){this._normal=new s9(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new s9(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},c9=2,l9=1,u9=class extends S6{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new Q),this.onResize=this._onResize.event,this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,c9),this.rows=Math.max(e.rawOptions.rows||0,l9),this.buffers=this._register(new oue(e,this)),this._register(this.buffers.onBufferActivate(e=>{this._onScroll.fire(e.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,a=n.ybase+n.scrollBottom;if(n.scrollTop===0){let e=n.lines.isFull;a===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(a+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let e=a-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(a,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};u9=o3([Z(0,z3)],u9);var d9={cols:80,rows:24,cursorBlink:!1,cursorStyle:`block`,cursorWidth:1,cursorInactiveStyle:`outline`,customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:`alt`,fastScrollSensitivity:5,fontFamily:`monospace`,fontSize:15,fontWeight:`normal`,fontWeightBold:`bold`,ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:`info`,logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:C7,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:` ()[]{}',"\``,altClickMovesCursor:!0,convertEol:!1,termName:`xterm`,cancelEvents:!1,overviewRuler:{}},sue=[`normal`,`bold`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],cue=class extends S6{constructor(e){super(),this._onOptionChange=this._register(new Q),this.onOptionChange=this._onOptionChange.event;let t={...d9};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(e){console.error(e)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(y6(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=e=>{if(!(e in d9))throw Error(`No option with key "${e}"`);return this.rawOptions[e]},t=(e,t)=>{if(!(e in d9))throw Error(`No option with key "${e}"`);t=this._sanitizeAndValidateOption(e,t),this.rawOptions[e]!==t&&(this.rawOptions[e]=t,this._onOptionChange.fire(e))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case`cursorStyle`:if(t||=d9[e],!lue(t))throw Error(`"${t}" is not a valid value for ${e}`);break;case`wordSeparator`:t||=d9[e];break;case`fontWeight`:case`fontWeightBold`:if(typeof t==`number`&&1<=t&&t<=1e3)break;t=sue.includes(t)?t:d9[e];break;case`cursorWidth`:t=Math.floor(t);case`lineHeight`:case`tabStopWidth`:if(t<1)throw Error(`${e} cannot be less than 1, value: ${t}`);break;case`minimumContrastRatio`:t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case`scrollback`:if(t=Math.min(t,4294967295),t<0)throw Error(`${e} cannot be less than 0, value: ${t}`);break;case`fastScrollSensitivity`:case`scrollSensitivity`:if(t<=0)throw Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case`rows`:case`cols`:if(!t&&t!==0)throw Error(`${e} must be numeric, value: ${t}`);break;case`windowsPty`:t??={};break}return t}};function lue(e){return e===`block`||e===`underline`||e===`bar`}function f9(e,t=5){if(typeof e!=`object`)return e;let n=Array.isArray(e)?[]:{};for(let r in e)n[r]=t<=1?e[r]:e[r]&&f9(e[r],t-1);return n}var p9=Object.freeze({insertMode:!1}),m9=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),h9=class extends S6{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Q),this.onData=this._onData.event,this._onUserInput=this._register(new Q),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Q),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Q),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=f9(p9),this.decPrivateModes=f9(m9)}reset(){this.modes=f9(p9),this.decPrivateModes=f9(m9)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace(`sending data (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace(`sending binary (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onBinary.fire(e))}};h9=o3([Z(0,N3),Z(1,R3),Z(2,z3)],h9);var g9={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>e.action!==32||e.button!==3},ANY:{events:31,restrict:e=>!0}};function _9(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var v9=String.fromCharCode,y9={DEFAULT:e=>{let t=[_9(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?``:`\x1B[M${v9(t[0])}${v9(t[1])}${v9(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${_9(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${_9(e,!0)};${e.x};${e.y}${t}`}},b9=class extends S6{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol=``,this._activeEncoding=``,this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Q),this.onProtocolChange=this._onProtocolChange.event;for(let e of Object.keys(g9))this.addProtocol(e,g9[e]);for(let e of Object.keys(y9))this.addEncoding(e,y9[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol=`NONE`,this.activeEncoding=`DEFAULT`,this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding===`SGR_PIXELS`))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding===`DEFAULT`?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift}};b9=o3([Z(0,N3),Z(1,F3),Z(2,z3)],b9);var x9=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],uue=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],S9;function due(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var fue=class{constructor(){if(this.version=`6`,!S9){S9=new Uint8Array(65536),S9.fill(1),S9[0]=0,S9.fill(0,1,32),S9.fill(0,127,160),S9.fill(2,4352,4448),S9[9001]=2,S9[9002]=2,S9.fill(2,11904,42192),S9[12351]=1,S9.fill(2,44032,55204),S9.fill(2,63744,64256),S9.fill(2,65040,65050),S9.fill(2,65072,65136),S9.fill(2,65280,65377),S9.fill(2,65504,65511);for(let e=0;e<x9.length;++e)S9.fill(0,x9[e][0],x9[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?S9[e]:due(e,uue)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=C9.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return C9.createPropertyValue(0,n,r)}},C9=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new Q,this.onChange=this._onChange.event;let e=new fue;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return(e&1)!=0}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a<i;++a){let o=t.charCodeAt(a);if(55296<=o&&o<=56319){if(++a>=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},pue=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function w9(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var T9=2147483647,mue=256,E9=class e{constructor(e=32,t=32){if(this.maxLength=e,this.maxSubParamsLength=t,t>mue)throw Error(`maxSubParamsLength must not be greater than 256`);this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new e;if(!t.length)return n;for(let e=+!!Array.isArray(t[0]);e<t.length;++e){let r=t[e];if(Array.isArray(r))for(let e=0;e<r.length;++e)n.addSubParam(r[e]);else n.addParam(r)}return n}clone(){let t=new e(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let e=[];for(let t=0;t<this.length;++t){e.push(this.params[t]);let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>T9?T9:e}addSubParam(e){if(this._digitIsSub=!0,this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParams[this._subParamsLength++]=e>T9?T9:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(this._subParamsIdx[e]&255)-(this._subParamsIdx[e]>>8)>0}getSubParams(e){let t=this._subParamsIdx[e]>>8,n=this._subParamsIdx[e]&255;return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){let e={};for(let t=0;t<this.length;++t){let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[t-1];n[t-1]=~r?Math.min(r*10+e,T9):e}},D9=[],hue=class{constructor(){this._state=0,this._active=D9,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=D9}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=D9,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||D9,!this._active.length)this._handlerFb(this._id,`START`);else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,`PUT`,y3(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t<n;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&n-t>0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,`END`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=D9,this._id=-1,this._state=0}}},O9=class{constructor(e){this._handler=e,this._data=``,this._hitLimit=!1}start(){this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=y3(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(e=>(this._data=``,this._hitLimit=!1,e));return this._data=``,this._hitLimit=!1,t}},k9=[],gue=class{constructor(){this._handlers=Object.create(null),this._active=k9,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=k9}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=k9,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||k9,!this._active.length)this._handlerFb(this._ident,`HOOK`,t);else for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,`PUT`,y3(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,`UNHOOK`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=k9,this._ident=0}},A9=new E9;A9.addParam(0);var j9=class{constructor(e){this._handler=e,this._data=``,this._params=A9,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():A9,this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=y3(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(e=>(this._params=A9,this._data=``,this._hitLimit=!1,e));return this._params=A9,this._data=``,this._hitLimit=!1,t}},_ue=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<4|r}},M9=160,vue=function(){let e=new _ue(4095),t=Array.apply(null,Array(256)).map((e,t)=>t),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let a=n(0,14),o;for(o in e.setDefault(1,0),e.addMany(r,0,2,0),a)e.addMany([24,26,153,154],o,3,0),e.addMany(n(128,144),o,3,0),e.addMany(n(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(M9,0,2,0),e.add(M9,8,5,8),e.add(M9,6,0,6),e.add(M9,11,0,11),e.add(M9,13,13,13),e}(),yue=class extends S6{constructor(e=vue){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new E9,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(y6(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new hue),this._dcsParser=this._register(new gue),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:`\\`},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw Error(`only one byte as prefix supported`);if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw Error(`prefix must be in range 0x3c .. 0x3f`)}if(e.intermediates){if(e.intermediates.length>2)throw Error(`only two bytes as intermediates are supported`);for(let t=0;t<e.intermediates.length;++t){let r=e.intermediates.charCodeAt(t);if(32>r||r>47)throw Error(`intermediate must be in range 0x20 .. 0x2f`);n<<=8,n|=r}}if(e.final.length!==1)throw Error(`final must be a single byte`);let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join(``)}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r=0,i=0,a=0,o;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,Error(`improper continuation due to previous async handler, giving up parsing`);let t=this._parseStack.handlers,i=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](this._params),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 4:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],o=this._dcsParser.unhook(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],o=this._oscParser.end(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let n=a;n<t;++n){switch(r=e[n],i=this._transitions.table[this.currentState<<8|(r<160?r:M9)],i>>4){case 2:for(let i=n+1;;++i){if(i>=t||(r=e[i])<32||r>126&&r<M9){this._printHandler(e,n,i),n=i-1;break}if(++i>=t||(r=e[i])<32||r>126&&r<M9){this._printHandler(e,n,i),n=i-1;break}if(++i>=t||(r=e[i])<32||r>126&&r<M9){this._printHandler(e,n,i),n=i-1;break}if(++i>=t||(r=e[i])<32||r>126&&r<M9){this._printHandler(e,n,i),n=i-1;break}}break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:n,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let a=this._csiHandlers[this._collect<<8|r],s=a?a.length-1:-1;for(;s>=0&&(o=a[s](this._params),o!==!0);s--)if(o instanceof Promise)return this._preserveStack(3,a,s,i,n),o;s<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++n<t&&(r=e[n])>47&&r<60);n--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let c=this._escHandlers[this._collect<<8|r],l=c?c.length-1:-1;for(;l>=0&&(o=c[l](),o!==!0);l--)if(o instanceof Promise)return this._preserveStack(4,c,l,i,n),o;l<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let i=n+1;;++i)if(i>=t||(r=e[i])===24||r===26||r===27||r>127&&r<M9){this._dcsParser.put(e,n,i),n=i-1;break}break;case 14:if(o=this._dcsParser.unhook(r!==24&&r!==26),o)return this._preserveStack(6,[],0,i,n),o;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let i=n+1;;i++)if(i>=t||(r=e[i])<32||r>127&&r<M9){this._oscParser.put(e,n,i),n=i-1;break}break;case 6:if(o=this._oscParser.end(r!==24&&r!==26),o)return this._preserveStack(5,[],0,i,n),o;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&15}}},bue=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,xue=/^[\da-f]+$/;function N9(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf(`rgb:`)===0){t=t.slice(4);let e=bue.exec(t);if(e){let t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(t.indexOf(`#`)===0&&(t=t.slice(1),xue.exec(t)&&[3,6,9,12].includes(t.length))){let e=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){let i=parseInt(t.slice(e*r,e*r+e),16);n[r]=e===1?i<<4:e===2?i:e===3?i>>4:i>>8}return n}}function P9(e,t){let n=e.toString(16),r=n.length<2?`0`+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function Sue(e,t=16){let[n,r,i]=e;return`rgb:${P9(n,t)}/${P9(r,t)}/${P9(i,t)}`}var Cue={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F9=131072,I9=10;function L9(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var R9=5e3,z9=0,wue=class extends S6{constructor(e,t,n,r,i,a,o,s,c=new yue){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=a,this._coreMouseService=o,this._unicodeService=s,this._parser=c,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b3,this._utf8Decoder=new x3,this._windowTitle=``,this._iconName=``,this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Q7.clone(),this._eraseAttrDataInternal=Q7.clone(),this._onRequestBell=this._register(new Q),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Q),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Q),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Q),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Q),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Q),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Q),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Q),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Q),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Q),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Q),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Q),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new B9(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._parser.setCsiHandlerFallback((e,t)=>{this._logService.debug(`Unknown CSI code: `,{identifier:this._parser.identToString(e),params:t.toArray()})}),this._parser.setEscHandlerFallback(e=>{this._logService.debug(`Unknown ESC code: `,{identifier:this._parser.identToString(e)})}),this._parser.setExecuteHandlerFallback(e=>{this._logService.debug(`Unknown EXECUTE code: `,{code:e})}),this._parser.setOscHandlerFallback((e,t,n)=>{this._logService.debug(`Unknown OSC code: `,{identifier:e,action:t,data:n})}),this._parser.setDcsHandlerFallback((e,t,n)=>{t===`HOOK`&&(n=n.toArray()),this._logService.debug(`Unknown DCS code: `,{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setPrintHandler((e,t,n)=>this.print(e,t,n)),this._parser.registerCsiHandler({final:`@`},e=>this.insertChars(e)),this._parser.registerCsiHandler({intermediates:` `,final:`@`},e=>this.scrollLeft(e)),this._parser.registerCsiHandler({final:`A`},e=>this.cursorUp(e)),this._parser.registerCsiHandler({intermediates:` `,final:`A`},e=>this.scrollRight(e)),this._parser.registerCsiHandler({final:`B`},e=>this.cursorDown(e)),this._parser.registerCsiHandler({final:`C`},e=>this.cursorForward(e)),this._parser.registerCsiHandler({final:`D`},e=>this.cursorBackward(e)),this._parser.registerCsiHandler({final:`E`},e=>this.cursorNextLine(e)),this._parser.registerCsiHandler({final:`F`},e=>this.cursorPrecedingLine(e)),this._parser.registerCsiHandler({final:`G`},e=>this.cursorCharAbsolute(e)),this._parser.registerCsiHandler({final:`H`},e=>this.cursorPosition(e)),this._parser.registerCsiHandler({final:`I`},e=>this.cursorForwardTab(e)),this._parser.registerCsiHandler({final:`J`},e=>this.eraseInDisplay(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`J`},e=>this.eraseInDisplay(e,!0)),this._parser.registerCsiHandler({final:`K`},e=>this.eraseInLine(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`K`},e=>this.eraseInLine(e,!0)),this._parser.registerCsiHandler({final:`L`},e=>this.insertLines(e)),this._parser.registerCsiHandler({final:`M`},e=>this.deleteLines(e)),this._parser.registerCsiHandler({final:`P`},e=>this.deleteChars(e)),this._parser.registerCsiHandler({final:`S`},e=>this.scrollUp(e)),this._parser.registerCsiHandler({final:`T`},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:`X`},e=>this.eraseChars(e)),this._parser.registerCsiHandler({final:`Z`},e=>this.cursorBackwardTab(e)),this._parser.registerCsiHandler({final:"`"},e=>this.charPosAbsolute(e)),this._parser.registerCsiHandler({final:`a`},e=>this.hPositionRelative(e)),this._parser.registerCsiHandler({final:`b`},e=>this.repeatPrecedingCharacter(e)),this._parser.registerCsiHandler({final:`c`},e=>this.sendDeviceAttributesPrimary(e)),this._parser.registerCsiHandler({prefix:`>`,final:`c`},e=>this.sendDeviceAttributesSecondary(e)),this._parser.registerCsiHandler({final:`d`},e=>this.linePosAbsolute(e)),this._parser.registerCsiHandler({final:`e`},e=>this.vPositionRelative(e)),this._parser.registerCsiHandler({final:`f`},e=>this.hVPosition(e)),this._parser.registerCsiHandler({final:`g`},e=>this.tabClear(e)),this._parser.registerCsiHandler({final:`h`},e=>this.setMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`h`},e=>this.setModePrivate(e)),this._parser.registerCsiHandler({final:`l`},e=>this.resetMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`l`},e=>this.resetModePrivate(e)),this._parser.registerCsiHandler({final:`m`},e=>this.charAttributes(e)),this._parser.registerCsiHandler({final:`n`},e=>this.deviceStatus(e)),this._parser.registerCsiHandler({prefix:`?`,final:`n`},e=>this.deviceStatusPrivate(e)),this._parser.registerCsiHandler({intermediates:`!`,final:`p`},e=>this.softReset(e)),this._parser.registerCsiHandler({intermediates:` `,final:`q`},e=>this.setCursorStyle(e)),this._parser.registerCsiHandler({final:`r`},e=>this.setScrollRegion(e)),this._parser.registerCsiHandler({final:`s`},e=>this.saveCursor(e)),this._parser.registerCsiHandler({final:`t`},e=>this.windowOptions(e)),this._parser.registerCsiHandler({final:`u`},e=>this.restoreCursor(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`}`},e=>this.insertColumns(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`~`},e=>this.deleteColumns(e)),this._parser.registerCsiHandler({intermediates:`"`,final:`q`},e=>this.selectProtected(e)),this._parser.registerCsiHandler({intermediates:`$`,final:`p`},e=>this.requestMode(e,!0)),this._parser.registerCsiHandler({prefix:`?`,intermediates:`$`,final:`p`},e=>this.requestMode(e,!1)),this._parser.setExecuteHandler($.BEL,()=>this.bell()),this._parser.setExecuteHandler($.LF,()=>this.lineFeed()),this._parser.setExecuteHandler($.VT,()=>this.lineFeed()),this._parser.setExecuteHandler($.FF,()=>this.lineFeed()),this._parser.setExecuteHandler($.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler($.BS,()=>this.backspace()),this._parser.setExecuteHandler($.HT,()=>this.tab()),this._parser.setExecuteHandler($.SO,()=>this.shiftOut()),this._parser.setExecuteHandler($.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(V5.IND,()=>this.index()),this._parser.setExecuteHandler(V5.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(V5.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new O9(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new O9(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new O9(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new O9(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new O9(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new O9(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new O9(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new O9(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new O9(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new O9(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new O9(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new O9(e=>this.restoreCursorColor(e))),this._parser.registerEscHandler({final:`7`},()=>this.saveCursor()),this._parser.registerEscHandler({final:`8`},()=>this.restoreCursor()),this._parser.registerEscHandler({final:`D`},()=>this.index()),this._parser.registerEscHandler({final:`E`},()=>this.nextLine()),this._parser.registerEscHandler({final:`H`},()=>this.tabSet()),this._parser.registerEscHandler({final:`M`},()=>this.reverseIndex()),this._parser.registerEscHandler({final:`=`},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:`>`},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:`c`},()=>this.fullReset()),this._parser.registerEscHandler({final:`n`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`o`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`|`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`}`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`~`},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:`%`,final:`@`},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:`%`,final:`G`},()=>this.selectDefaultCharset());for(let e in i9)this._parser.registerEscHandler({intermediates:`(`,final:e},()=>this.selectCharset(`(`+e)),this._parser.registerEscHandler({intermediates:`)`,final:e},()=>this.selectCharset(`)`+e)),this._parser.registerEscHandler({intermediates:`*`,final:e},()=>this.selectCharset(`*`+e)),this._parser.registerEscHandler({intermediates:`+`,final:e},()=>this.selectCharset(`+`+e)),this._parser.registerEscHandler({intermediates:`-`,final:e},()=>this.selectCharset(`-`+e)),this._parser.registerEscHandler({intermediates:`.`,final:e},()=>this.selectCharset(`.`+e)),this._parser.registerEscHandler({intermediates:`/`,final:e},()=>this.selectCharset(`/`+e));this._parser.registerEscHandler({intermediates:`#`,final:`8`},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(e=>(this._logService.error(`Parsing error: `,e),e)),this._parser.registerDcsHandler({intermediates:`$`,final:`q`},new j9((e,t)=>this.requestStatusString(e,t)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((e,t)=>setTimeout(()=>t(`#SLOW_TIMEOUT`),R9))]).catch(e=>{if(e!==`#SLOW_TIMEOUT`)throw e;console.warn(`async parser handler taking longer than ${R9} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,a=0,o=this._parseStack.paused;if(o){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>F9&&(a=this._parseStack.position+F9)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e==`string`?` "${e}"`:` "${Array.prototype.map.call(e,e=>String.fromCharCode(e)).join(``)}"`}`),this._logService.logLevel===0&&this._logService.trace(`parsing data (codes)`,typeof e==`string`?e.split(``).map(e=>e.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<F9&&(this._parseBuffer=new Uint32Array(Math.min(e.length,F9))),o||this._dirtyRowTracker.clearRange(),e.length>F9)for(let t=a;t<e.length;t+=F9){let a=t+F9<e.length?t+F9:e.length,o=typeof e==`string`?this._stringDecoder.decode(e.substring(t,a),this._parseBuffer):this._utf8Decoder.decode(e.subarray(t,a),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,o))return this._preserveStack(r,i,o,t),this._logSlowResolvingAsync(n),n}else if(!o){let t=typeof e==`string`?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,t))return this._preserveStack(r,i,t,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==r||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),c=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);c<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(c,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,n){let r,i,a=this._charsetService.charset,o=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,c=this._coreService.decPrivateModes.wraparound,l=this._coreService.modes.insertMode,u=this._curAttrData,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let f=this._parser.precedingJoinState;for(let p=t;p<n;++p){if(r=e[p],r<127&&a){let e=a[String.fromCharCode(r)];e&&(r=e.charCodeAt(0))}let t=this._unicodeService.charProperties(r,f);i=C9.extractWidth(t);let n=C9.extractShouldJoin(t),m=n?C9.extractWidth(f):0;if(f=t,o&&this._onA11yChar.fire(v3(r)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-m>s){if(c){let e=d,t=this._activeBuffer.x-m;for(this._activeBuffer.x=m,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),m>0&&d instanceof t9&&d.copyCellsFrom(e,t,0,m,!1);t<s;)e.setCellFromCodepoint(t++,0,1,u)}else if(this._activeBuffer.x=s-1,i===2)continue}if(n&&this._activeBuffer.x){let e=d.getWidth(this._activeBuffer.x-1)?1:2;d.addCodepointToCell(this._activeBuffer.x-e,r,i);for(let e=i-m;--e>=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(l&&(d.insertCells(this._activeBuffer.x,i-m,this._activeBuffer.getNullCell(u)),d.getWidth(s-1)===2&&d.setCellFromCodepoint(s-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,r,i,u),i>0)for(;--i;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&n-t>0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final===`t`&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,e=>!L9(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new j9(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new O9(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(a.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n<this._bufferService.rows;n++)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(n);break;case 1:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+n)?.getTrimmedLength(););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(n,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Q7));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let n=e.params[0]||1,r=C9.extractWidth(t),i=this._activeBuffer.x-r,a=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),o=new Uint32Array(a.length*n),s=0;for(let e=0;e<a.length;){let t=a.codePointAt(e)||0;o[s++]=t,e+=t>65535?2:1}let c=s;for(let e=1;e<n;++e)o.copyWithin(c,0,s),c+=s;return this.print(o,0,c),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is(`xterm`)||this._is(`rxvt-unicode`)||this._is(`screen`)?this._coreService.triggerDataEvent($.ESC+`[?1;2c`):this._is(`linux`)&&this._coreService.triggerDataEvent($.ESC+`[?6c`)),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is(`xterm`)?this._coreService.triggerDataEvent($.ESC+`[>0;276;0c`):this._is(`rxvt-unicode`)?this._coreService.triggerDataEvent($.ESC+`[>85;95;0c`):this._is(`linux`)?this._coreService.triggerDataEvent(e.params[0]+`c`):this._is(`screen`)&&this._coreService.triggerDataEvent($.ESC+`[>83;40003;0c`)),!0}_is(e){return(this._optionsService.rawOptions.termName+``).indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,a9),this._charsetService.setgCharset(1,a9),this._charsetService.setgCharset(2,a9),this._charsetService.setgCharset(3,a9);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug(`Serial port requested application keypad.`),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol=`X10`;break;case 1e3:this._coreMouseService.activeProtocol=`VT200`;break;case 1002:this._coreMouseService.activeProtocol=`DRAG`;break;case 1003:this._coreMouseService.activeProtocol=`ANY`;break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug(`DECSET 1005 not supported (see #2507)`);break;case 1006:this._coreMouseService.activeEncoding=`SGR`;break;case 1015:this._logService.debug(`DECSET 1015 not supported (see #2507)`);break;case 1016:this._coreMouseService.activeEncoding=`SGR_PIXELS`;break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug(`Switching back to normal keypad.`),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol=`NONE`;break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug(`DECRST 1005 not supported (see #2507)`);break;case 1006:this._coreMouseService.activeEncoding=`DEFAULT`;break;case 1015:this._logService.debug(`DECRST 1015 not supported (see #2507)`);break;case 1016:this._coreMouseService.activeEncoding=`DEFAULT`;break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let n;(e=>(e[e.NOT_RECOGNIZED=0]=`NOT_RECOGNIZED`,e[e.SET=1]=`SET`,e[e.RESET=2]=`RESET`,e[e.PERMANENTLY_SET=3]=`PERMANENTLY_SET`,e[e.PERMANENTLY_RESET=4]=`PERMANENTLY_RESET`))(n||={});let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:a}=this._coreMouseService,o=this._coreService,{buffers:s,cols:c}=this._bufferService,{active:l,alt:u}=s,d=this._optionsService.rawOptions,f=(e,n)=>(o.triggerDataEvent(`${$.ESC}[${t?``:`?`}${e};${n}$y`),!0),p=e=>e?1:2,m=e.params[0];return t?m===2?f(m,4):m===4?f(m,p(o.modes.insertMode)):m===12?f(m,3):m===20?f(m,p(d.convertEol)):f(m,0):m===1?f(m,p(r.applicationCursorKeys)):m===3?f(m,d.windowOptions.setWinLines?c===80?2:+(c===132):0):m===6?f(m,p(r.origin)):m===7?f(m,p(r.wraparound)):m===8?f(m,3):m===9?f(m,p(i===`X10`)):m===12?f(m,p(d.cursorBlink)):m===25?f(m,p(!o.isCursorHidden)):m===45?f(m,p(r.reverseWraparound)):m===66?f(m,p(r.applicationKeypad)):m===67?f(m,4):m===1e3?f(m,p(i===`VT200`)):m===1002?f(m,p(i===`DRAG`)):m===1003?f(m,p(i===`ANY`)):m===1004?f(m,p(r.sendFocus)):m===1005?f(m,4):m===1006?f(m,p(a===`SGR`)):m===1015?f(m,4):m===1016?f(m,p(a===`SGR_PIXELS`)):m===1048?f(m,1):m===47||m===1047||m===1049?f(m,p(l===u)):m===2004?f(m,p(r.bracketedPasteMode)):m===2026?f(m,p(r.synchronizedOutput)):f(m,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=w3.fromColorRGB([n,r,i])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,a=0;do{if(r[a+i]=e.params[t+a],e.hasSubParams(t+a)){let n=e.getSubParams(t+a),o=0;do r[1]===5&&(i=1),r[a+o+1+i]=n[o];while(++o<n.length&&o+a+1+i<r.length);break}if(r[1]===5&&a+i>=2||r[1]===2&&a+i>=5)break;r[1]&&(i=1)}while(++a+t<e.length&&a+i<r.length);for(let e=2;e<r.length;++e)r[e]===-1&&(r[e]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return a}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Q7.fg,e.bg=Q7.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i<t;i++)n=e.params[i],n>=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=n-90|16777224):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=n-100|16777224):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=Q7.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=Q7.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):n===100?(r.fg&=-67108864,r.fg|=Q7.fg&16777215,r.bg&=-67108864,r.bg|=Q7.bg&16777215):this._logService.debug(`Unknown SGR attribute: %d.`,n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${$.ESC}[0n`);break;case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${$.ESC}[${e};${t}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${$.ESC}[?${e};${t}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Q7.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle=`block`;break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle=`underline`;break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle=`bar`;break}let e=t%2==1;this._coreService.decPrivateModes.cursorBlink=e}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!L9(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${$.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>I9&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>I9&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(`;`);for(;n.length>1;){let e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){let n=parseInt(e);if(V9(n))if(r===`?`)t.push({type:0,index:n});else{let e=N9(r);e&&t.push({type:1,index:n,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(`;`);if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):!n.trim()&&this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(`:`),r,i=n.findIndex(e=>e.startsWith(`id=`));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(`;`);for(let e=0;e<n.length&&!(t>=this._specialColors.length);++e,++t)if(n[e]===`?`)this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=N9(n[e]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(`;`);for(let e=0;e<n.length;++e)if(/^\d+$/.exec(n[e])){let r=parseInt(n[e]);V9(r)&&t.push({type:2,index:r})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug(`Serial port requested application keypad.`),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug(`Switching back to normal keypad.`),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,a9),!0}selectCharset(e){return e.length===2?(e[0]===`/`||this._charsetService.setgCharset(Cue[e[0]],i9[e[1]]||a9),!0):(this.selectDefaultCharset(),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Q7.clone(),this._eraseAttrDataInternal=Q7.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new E3;e.content=4194373,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let n=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(n);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let n=e=>(this._coreService.triggerDataEvent(`${$.ESC}${e}${$.ESC}\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e===`"q`?`P1$r${+!!this._curAttrData.isProtected()}"q`:e===`"p`?`P1$r61;1"p`:e===`r`?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e===`m`?`P1$r0m`:e===` q`?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-+!!i.cursorBlink} q`:`P0$r`)}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},B9=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(z9=e,e=t,t=z9),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};B9=o3([Z(0,N3)],B9);function V9(e){return 0<=e&&e<256}var Tue=5e7,H9=12,Eue=50,Due=class extends S6{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Q),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>Tue)throw Error(`write data discarded, use flow control to avoid losing data`);if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let e=this._writeBuffer[this._bufferOffset],r=this._action(e,t);if(r){r.catch(e=>(queueMicrotask(()=>{throw e}),Promise.resolve(!1))).then(e=>performance.now()-n>=H9?setTimeout(()=>this._innerWrite(0,e)):this._innerWrite(n,e));return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,performance.now()-n>=H9)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>Eue&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},U9=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(r,n)),this._dataByLinkId.set(r.id,r),r.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let a=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(o,a)),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(e=>e.line!==t)){let e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(n,e))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};U9=o3([Z(0,N3)],U9);var W9=!1,Oue=class extends S6{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new C6),this._onBinary=this._register(new Q),this.onBinary=this._onBinary.event,this._onData=this._register(new Q),this.onData=this._onData.event,this._onLineFeed=this._register(new Q),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Q),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Q),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Q),this._instantiationService=new Zle,this.optionsService=this._register(new cue(e)),this._instantiationService.setService(z3,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(u9)),this._instantiationService.setService(N3,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Y7)),this._instantiationService.setService(R3,this._logService),this.coreService=this._register(this._instantiationService.createInstance(h9)),this._instantiationService.setService(F3,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(b9)),this._instantiationService.setService(P3,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(C9)),this._instantiationService.setService(V3,this.unicodeService),this._charsetService=this._instantiationService.createInstance(pue),this._instantiationService.setService(I3,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(U9),this._instantiationService.setService(B3,this._oscLinkService),this._inputHandler=this._register(new wue(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(A6.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(A6.forward(this._bufferService.onResize,this._onResize)),this._register(A6.forward(this.coreService.onData,this._onData)),this._register(A6.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange([`windowsMode`,`windowsPty`],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new Due((e,t)=>this._inputHandler.parse(e,t))),this._register(A6.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Q),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!W9&&(this._logService.warn(`writeSync is unreliable and will be removed soon.`),W9=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,c9),t=Math.max(t,l9),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend===`conpty`&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(w9.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:`H`},()=>(w9(this._bufferService),!1))),this._windowsWrappingHeuristics.value=y6(()=>{for(let t of e)t.dispose()})}}},kue={48:[`0`,`)`],49:[`1`,`!`],50:[`2`,`@`],51:[`3`,`#`],52:[`4`,`$`],53:[`5`,`%`],54:[`6`,`^`],55:[`7`,`&`],56:[`8`,`*`],57:[`9`,`(`],186:[`;`,`:`],187:[`=`,`+`],188:[`,`,`<`],189:[`-`,`_`],190:[`.`,`>`],191:[`/`,`?`],192:["`",`~`],219:[`[`,`{`],220:[`\\`,`|`],221:[`]`,`}`],222:[`'`,`"`]};function Aue(e,t,n,r){let i={type:0,cancel:!1,key:void 0},a=!!e.shiftKey|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key===`UIKeyInputUpArrow`?t?i.key=$.ESC+`OA`:i.key=$.ESC+`[A`:e.key===`UIKeyInputLeftArrow`?t?i.key=$.ESC+`OD`:i.key=$.ESC+`[D`:e.key===`UIKeyInputRightArrow`?t?i.key=$.ESC+`OC`:i.key=$.ESC+`[C`:e.key===`UIKeyInputDownArrow`&&(t?i.key=$.ESC+`OB`:i.key=$.ESC+`[B`);break;case 8:i.key=e.ctrlKey?`\b`:$.DEL,e.altKey&&(i.key=$.ESC+i.key);break;case 9:if(e.shiftKey){i.key=$.ESC+`[Z`;break}i.key=$.HT,i.cancel=!0;break;case 13:i.key=e.altKey?$.ESC+$.CR:$.CR,i.cancel=!0;break;case 27:i.key=$.ESC,e.altKey&&(i.key=$.ESC+$.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;a?i.key=$.ESC+`[1;`+(a+1)+`D`:t?i.key=$.ESC+`OD`:i.key=$.ESC+`[D`;break;case 39:if(e.metaKey)break;a?i.key=$.ESC+`[1;`+(a+1)+`C`:t?i.key=$.ESC+`OC`:i.key=$.ESC+`[C`;break;case 38:if(e.metaKey)break;a?i.key=$.ESC+`[1;`+(a+1)+`A`:t?i.key=$.ESC+`OA`:i.key=$.ESC+`[A`;break;case 40:if(e.metaKey)break;a?i.key=$.ESC+`[1;`+(a+1)+`B`:t?i.key=$.ESC+`OB`:i.key=$.ESC+`[B`;break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=$.ESC+`[2~`);break;case 46:a?i.key=$.ESC+`[3;`+(a+1)+`~`:i.key=$.ESC+`[3~`;break;case 36:a?i.key=$.ESC+`[1;`+(a+1)+`H`:t?i.key=$.ESC+`OH`:i.key=$.ESC+`[H`;break;case 35:a?i.key=$.ESC+`[1;`+(a+1)+`F`:t?i.key=$.ESC+`OF`:i.key=$.ESC+`[F`;break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=$.ESC+`[5;`+(a+1)+`~`:i.key=$.ESC+`[5~`;break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=$.ESC+`[6;`+(a+1)+`~`:i.key=$.ESC+`[6~`;break;case 112:a?i.key=$.ESC+`[1;`+(a+1)+`P`:i.key=$.ESC+`OP`;break;case 113:a?i.key=$.ESC+`[1;`+(a+1)+`Q`:i.key=$.ESC+`OQ`;break;case 114:a?i.key=$.ESC+`[1;`+(a+1)+`R`:i.key=$.ESC+`OR`;break;case 115:a?i.key=$.ESC+`[1;`+(a+1)+`S`:i.key=$.ESC+`OS`;break;case 116:a?i.key=$.ESC+`[15;`+(a+1)+`~`:i.key=$.ESC+`[15~`;break;case 117:a?i.key=$.ESC+`[17;`+(a+1)+`~`:i.key=$.ESC+`[17~`;break;case 118:a?i.key=$.ESC+`[18;`+(a+1)+`~`:i.key=$.ESC+`[18~`;break;case 119:a?i.key=$.ESC+`[19;`+(a+1)+`~`:i.key=$.ESC+`[19~`;break;case 120:a?i.key=$.ESC+`[20;`+(a+1)+`~`:i.key=$.ESC+`[20~`;break;case 121:a?i.key=$.ESC+`[21;`+(a+1)+`~`:i.key=$.ESC+`[21~`;break;case 122:a?i.key=$.ESC+`[23;`+(a+1)+`~`:i.key=$.ESC+`[23~`;break;case 123:a?i.key=$.ESC+`[24;`+(a+1)+`~`:i.key=$.ESC+`[24~`;break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=$.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=$.DEL:e.keyCode===219?i.key=$.ESC:e.keyCode===220?i.key=$.FS:e.keyCode===221&&(i.key=$.GS);else if((!n||r)&&e.altKey&&!e.metaKey){let t=kue[e.keyCode]?.[+!!e.shiftKey];if(t)i.key=$.ESC+t;else if(e.keyCode>=65&&e.keyCode<=90){let t=e.ctrlKey?e.keyCode-64:e.keyCode+32,n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),i.key=$.ESC+n}else if(e.keyCode===32)i.key=$.ESC+(e.ctrlKey?$.NUL:` `);else if(e.key===`Dead`&&e.code.startsWith(`Key`)){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),i.key=$.ESC+t,i.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key===`_`&&(i.key=$.US),e.key===`@`&&(i.key=$.NUL));break}return i}var G9=0,jue=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new O7,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new O7,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((e,t)=>this._getKey(e)-this._getKey(t)),t=0,n=0,r=Array(this._array.length+this._insertedValues.length);for(let i=0;i<r.length;i++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(G9=this._search(t),G9===-1)||this._getKey(this._array[G9])!==t)return!1;do if(this._array[G9]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(G9),!0;while(++G9<this._array.length&&this._getKey(this._array[G9])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((e,t)=>e-t),t=0,n=Array(this._array.length-e.length),r=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:n[r++]=this._array[i];this._array=n,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(G9=this._search(e),!(G9<0||G9>=this._array.length)&&this._getKey(this._array[G9])===e))do yield this._array[G9];while(++G9<this._array.length&&this._getKey(this._array[G9])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(G9=this._search(e),!(G9<0||G9>=this._array.length)&&this._getKey(this._array[G9])===e))do t(this._array[G9]);while(++G9<this._array.length&&this._getKey(this._array[G9])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i<e)t=r+1;else{for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},K9=0,q9=0,Mue=class extends S6{constructor(){super(),this._decorations=new jue(e=>e?.marker.line),this._onDecorationRegistered=this._register(new Q),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Q),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(y6(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new Nue(e);if(t){let e=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(let a of this._decorations.getKeyIterator(t))r=a.options.x??0,i=r+(a.options.width??1),e>=r&&e<i&&(!n||(a.options.layer??`bottom`)===n)&&(yield a)}forEachDecorationAtCell(e,t,n,r){this._decorations.forEachByKey(t,t=>{K9=t.options.x??0,q9=K9+(t.options.width??1),e>=K9&&e<q9&&(!n||(t.options.layer??`bottom`)===n)&&r(t)})}},Nue=class extends x6{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new Q),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Q),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position=`full`)}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Z5.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Z5.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},Pue=1e3,Fue=class{constructor(e,t=Pue){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t);let r=performance.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},t)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},J9=20,Y9=class extends S6{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``;let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=i.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let e=0;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);if(this._topBoundaryFocusListener=e=>this._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new Fue(this._renderRows.bind(this))),!this._terminal.element)throw Error(`Cannot enable accessibility before Terminal.open`);this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this._register(this._terminal.onResize(e=>this._handleResize(e.rows))),this._register(this._terminal.onRender(e=>this._refreshRows(e.start,e.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(e=>this._handleChar(e))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
385
|
+
`))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(a5(i,`selectionchange`,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(y6(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(` `)}_handleChar(e){this._liveRegionLineCount<J9+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
386
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===J9+1&&(this._liveRegion.textContent+=u3.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(!(!a||!o)){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform=``;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let r=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};Y9=o3([Z(1,L3),Z(2,K3),Z(3,J3)],Y9);var X9=class extends S6{constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Q),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Q),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(y6(()=>{_6(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(a5(this._element,`mouseleave`,()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(a5(this._element,`mousemove`,this._handleMouseMove.bind(this))),this._register(a5(this._element,`mousedown`,this._handleMouseDown.bind(this))),this._register(a5(this._element,`mouseup`,this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e<n.length;e++){let t=n[e];if(t.classList.contains(`xterm`))break;if(t.classList.contains(`xterm-hover`))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(e=>{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,t=>{if(this._isMouseOut)return;let i=t?.map(e=>({link:e}));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let t=0;t<i.length;t++){let r=i[t],a=r.link.range.start.y<e?0:r.link.range.start.x,o=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;t<e;t++)(!this._activeProviderReplies.has(t)||this._activeProviderReplies.get(t))&&(i=!0);if(!i&&r){let e=r.find(e=>this._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;e<this._activeProviderReplies.size;e++){let r=this._activeProviderReplies.get(e)?.find(e=>this._linkAtPosition(e.link,t));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&Iue(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,_6(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};X9=o3([Z(1,q3),Z(2,J3),Z(3,N3),Z(4,Q3)],X9);function Iue(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var Lue=class extends Oue{constructor(e={}){super(e),this._linkifier=this._register(new C6),this.browser=_7,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new C6),this._onCursorMove=this._register(new Q),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Q),this.onKey=this._onKey.event,this._onRender=this._register(new Q),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Q),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Q),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Q),this.onBell=this._onBell.event,this._onFocus=this._register(new Q),this._onBlur=this._register(new Q),this._onA11yCharEmitter=this._register(new Q),this._onA11yTabEmitter=this._register(new Q),this._onWillOpen=this._register(new Q),this._setup(),this._decorationService=this._instantiationService.createInstance(Mue),this._instantiationService.setService(H3,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Ele),this._instantiationService.setService(Q3,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(U3)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(A6.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(A6.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(A6.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(A6.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(y6(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n=``;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=X5.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${$.ESC}]${n};${Sue(r)}${H5.ST}`);break;case 1:if(e===`ansi`)this._themeService.modifyColors(e=>e.ansi[t.index]=Y5.toColor(...t.color));else{let n=e;this._themeService.modifyColors(e=>e[n]=Y5.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Y9,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.ESC+`[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.ESC+`[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this._register(a5(this.element,`copy`,e=>{this.hasSelection()&&p3(e,this._selectionService)}));let e=e=>m3(e,this.textarea,this.coreService,this.optionsService);this._register(a5(this.textarea,`paste`,e)),this._register(a5(this.element,`paste`,e)),x7?this._register(a5(this.element,`mousedown`,e=>{e.button===2&&_3(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(a5(this.element,`contextmenu`,e=>{_3(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),T7&&this._register(a5(this.element,`auxclick`,e=>{e.button===1&&g3(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(a5(this.textarea,`keyup`,e=>this._keyUp(e),!0)),this._register(a5(this.textarea,`keydown`,e=>this._keyDown(e),!0)),this._register(a5(this.textarea,`keypress`,e=>this._keyPress(e),!0)),this._register(a5(this.textarea,`compositionstart`,()=>this._compositionHelper.compositionstart())),this._register(a5(this.textarea,`compositionupdate`,e=>this._compositionHelper.compositionupdate(e))),this._register(a5(this.textarea,`compositionend`,()=>this._compositionHelper.compositionend())),this._register(a5(this.textarea,`input`,e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(`div`),this.element.dir=`ltr`,this.element.classList.add(`terminal`),this.element.classList.add(`xterm`),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this._register(a5(this.screenElement,`mousemove`,e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement(`textarea`);this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,c3.get()),E7||this.textarea.setAttribute(`aria-multiline`,`false`),this.textarea.setAttribute(`autocorrect`,`off`),this.textarea.setAttribute(`autocapitalize`,`off`),this.textarea.setAttribute(`spellcheck`,`false`),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange(`disableStdin`,()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(wle,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<`u`?window.document:null)),this._instantiationService.setService(K3,this._coreBrowserService),this._register(a5(this.textarea,`focus`,e=>this._handleTextAreaFocus(e))),this._register(a5(this.textarea,`blur`,()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(p7,this._document,this._helperContainer),this._instantiationService.setService(G3,this._charSizeService),this._themeService=this._instantiationService.createInstance(q7),this._instantiationService.setService(Z3,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(n7),this._instantiationService.setService(X3,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(k7,this.rows,this.screenElement)),this._instantiationService.setService(J3,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(U5,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(g7),this._instantiationService.setService(q3,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(X9,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(F5,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(R7,this.element,this.screenElement,r)),this._instantiationService.setService(Y3,this._selectionService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(A6.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(I5,this.screenElement)),this._register(a5(this.element,`mousedown`,e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Y9,this)),this._register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(B5,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`overviewRuler`,e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(B5,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f7,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(t){let n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=t.buttons&1?0:t.buttons&4?1:t.buttons&2?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(e._customWheelEventHandler&&e._customWheelEventHandler(t)===!1)return!1;let n=t.deltaY;if(n===0||e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;i=n<0?0:1,r=4;break;default:return!1}return i===void 0||r===void 0||r>4?!1:e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.removeEventListener(`mousemove`,r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this._register(this.coreMouseService.onProtocolChange(e=>{e?(this.optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this.coreMouseService.explainEvents(e)),this.element.classList.add(`enable-mouse-events`),this._selectionService.disable()):(this._logService.debug(`Unbinding from mouse events.`),this.element.classList.remove(`enable-mouse-events`),this._selectionService.enable()),e&8?r.mousemove||=(t.addEventListener(`mousemove`,i.mousemove),i.mousemove):(t.removeEventListener(`mousemove`,r.mousemove),r.mousemove=null),e&16?r.wheel||=(t.addEventListener(`wheel`,i.wheel,{passive:!1}),i.wheel):(t.removeEventListener(`wheel`,r.wheel),r.wheel=null),e&2?r.mouseup||=i.mouseup:(this._document.removeEventListener(`mouseup`,r.mouseup),r.mouseup=null),e&4?r.mousedrag||=i.mousedrag:(this._document.removeEventListener(`mousemove`,r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(a5(t,`mousedown`,e=>{if(e.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(e)))return n(e),r.mouseup&&this._document.addEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.addEventListener(`mousemove`,r.mousedrag),this.cancel(e)})),this._register(a5(t,`wheel`,t=>{if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(t)===!1)return!1;if(!this.buffer.hasScrollback){if(t.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(t,!0);let n=$.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(t.deltaY<0?`A`:`B`);return this.coreService.triggerDataEvent(n,!0),this.cancel(t,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(`column-select`):this.element.classList.remove(`column-select`)}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){h3(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key===`Dead`||e.key===`AltGraph`)&&(this._unprocessedDeadKey=!0);let n=Aue(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===$.ETX||n.key===$.CR)&&(this.textarea.value=``),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Rue(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Q7));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains(`focus`)?this.coreService.triggerDataEvent($.ESC+`[I`):this.coreService.triggerDataEvent($.ESC+`[O`)}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let e=this._renderService.dimensions.css.canvas.width.toFixed(0),t=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.ESC}[4;${t};${e}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.ESC}[6;${r};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function Rue(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var zue=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw Error(`Could not dispose an addon that has not been loaded`);e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},Bue=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new E3)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},Z9=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new Bue(t)}getNullCell(){return new E3}},Vue=class extends S6{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new Q),this.onBufferChange=this._onBufferChange.event,this._normal=new Z9(this._core.buffers.normal,`normal`),this._alternate=new Z9(this._core.buffers.alt,`alternate`),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error(`Active buffer is neither normal nor alternate`)}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Hue=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Uue=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Wue=[`cols`,`rows`],Q9=0,Gue=class extends S6{constructor(e){super(),this._core=this._register(new Lue(e)),this._addonManager=this._register(new zue),this._publicOptions={...this._core.options};let t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(let e in this._core.options){let r={get:t.bind(this,e),set:n.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(Wue.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error(`You must set the allowProposedApi option to true to use proposed API`)}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||=new Hue(this._core),this._parser}get unicode(){return this._checkProposedApi(),new Uue(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||=this._register(new Vue(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t=`none`;switch(this._core.coreMouseService.activeProtocol){case`X10`:t=`x10`;break;case`VT200`:t=`vt200`;break;case`DRAG`:t=`drag`;break;case`ANY`:t=`any`;break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
387
|
+
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return c3.get()},set promptLabel(e){c3.set(e)},get tooMuchOutput(){return u3.get()},set tooMuchOutput(e){u3.set(e)}}}_verifyIntegers(...e){for(Q9 of e)if(Q9===1/0||isNaN(Q9)||Q9%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(Q9 of e)if(Q9&&(Q9===1/0||isNaN(Q9)||Q9%1!=0||Q9<0))throw Error(`This API only accepts positive integers`)}},Kue={class:`flex flex-col h-full`},que={class:`px-3.5 py-2 border-b border-base bg-background flex items-center gap-2 flex-shrink-0`},Jue=[`title`],Yue={class:`ml-auto text-2xs text-muted-foreground flex-shrink-0 op-fade`},Xue={class:`flex-1 relative overflow-hidden bg-[#0a0a0a]`},Zue={key:0,class:`absolute inset-0 flex flex-col items-center justify-center gap-3 text-muted-foreground text-xs bg-[#0a0a0a]`},Que={class:`op-fade`},$ue=Tr({__name:`Terminal`,props:{cwd:{},terminalStart:{type:Function},terminalInput:{type:Function},terminalResize:{type:Function},terminalPoll:{type:Function},terminalKill:{type:Function}},setup(e){let t=e,n=k(null),r=k(`Starting...`),i=k(!1),a=k(!0),o=k(`Initializing terminal...`),s=null,c=null,l=null,u=null,d=null,f=!1,p={background:`#0a0a0a`,foreground:`#e4e4e7`,cursor:`#e4e4e7`,cursorAccent:`#0a0a0a`,selectionBackground:`#264f78`,black:`#000000`,red:`#dc2626`,green:`#16a34a`,yellow:`#ca8a04`,blue:`#2563eb`,magenta:`#9333ea`,cyan:`#0891b2`,white:`#e4e4e7`,brightBlack:`#71717a`,brightRed:`#f87171`,brightGreen:`#4ade80`,brightYellow:`#facc15`,brightBlue:`#60a5fa`,brightMagenta:`#c084fc`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`};async function m(){if(!n.value||f)return;s=new Gue({cursorBlink:!0,fontSize:12,lineHeight:1.2,fontFamily:`'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,theme:p,allowProposedApi:!0,scrollback:5e3,convertEol:!1}),c=new n3,s.loadAddon(c),s.open(n.value);try{c.fit()}catch{}let e=s.cols,u=s.rows,d=await t.terminalStart({cwd:t.cwd||`.`,cols:e,rows:u});if(!d||f){f||(a.value=!0,o.value=`Failed to start terminal session`,r.value=`Error`);return}l=d.sessionId,a.value=!1,i.value=!1,r.value=`${e}×${u} · ${t.cwd?y(t.cwd):`cwd`}`,s.onData(e=>{l&&!i.value&&t.terminalInput(l,e)}),s.onResize(({cols:e,rows:n})=>{l&&(t.terminalResize(l,e,n),r.value=`${e}×${n} · ${t.cwd?y(t.cwd):`cwd`}`)}),s.focus(),h()}function h(){async function e(){if(!l||f)return;let n;try{n=await t.terminalPoll(l)}catch{f||(u=setTimeout(e,100));return}if(!f){if(n.data&&s&&s.write(n.data),n.exited){i.value=!0,r.value=`Exited (code ${n.exitCode})`;return}u=setTimeout(e,33)}}e()}function g(){s&&s.clear()}async function _(){l&&=(await t.terminalKill(l),null),u&&=(clearTimeout(u),null),s&&=(s.dispose(),null),c=null,i.value=!1,a.value=!0,o.value=`Restarting...`,r.value=`Restarting...`,await En(),await m()}function v(){n.value&&(d=new ResizeObserver(()=>{try{c?.fit()}catch{}}),d.observe(n.value))}function y(e){let t=e.split(`/`);return t.length<=2?e:`.../${t.slice(-2).join(`/`)}`}return Vr(async()=>{await m(),f||v()}),Ur(()=>{f=!0,u&&=(clearTimeout(u),null),d&&=(d.disconnect(),null),l&&=(t.terminalKill(l),null),s&&=(s.dispose(),null)}),(t,s)=>(M(),N(`div`,Kue,[P(`div`,que,[F(j(B),{icon:`lucide:square-terminal`,size:14,class:`text-primary flex-shrink-0`}),s[0]||=P(`span`,{class:`text-xs font-medium text-foreground flex-shrink-0`},`Terminal`,-1),e.cwd?(M(),N(`span`,{key:0,class:`text-2xs text-muted-foreground font-mono truncate max-w-[280px] op-fade`,title:e.cwd},O(e.cwd),9,Jue)):I(``,!0),P(`span`,Yue,[P(`span`,{class:D([`inline-block size-1.5 rounded-full mr-1.5`,i.value?`bg-destructive`:`bg-success`])},null,2),Ma(` `+O(r.value),1)]),P(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-active rounded transition-all cursor-pointer flex-shrink-0`,title:`Clear scrollback`,onClick:g},[F(j(B),{icon:`lucide:eraser`,size:12})]),P(`button`,{class:`size-6 flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 rounded transition-all cursor-pointer flex-shrink-0`,title:`Restart session`,onClick:_},[F(j(B),{icon:`lucide:rotate-cw`,size:12})])]),P(`div`,Xue,[P(`div`,{ref_key:`containerRef`,ref:n,class:`absolute inset-0 px-2 py-1.5`},null,512),a.value?(M(),N(`div`,Zue,[s[1]||=P(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),P(`span`,Que,O(o.value),1)])):I(``,!0)])]))}}),ede={class:`h-full flex flex-col bg-background text-foreground relative`},tde={key:0,class:`flex flex-col items-center justify-center h-full py-20 px-5 gap-3.5 text-muted-foreground`},nde={key:1,class:`p-3.5 overflow-y-auto h-full`},rde={class:`flex items-start gap-2.5 p-3 rounded-lg text-xs leading-relaxed bg-destructive/10 text-destructive border border-destructive/15`},ide={class:`op-fade`},ade={key:1,class:`h-full overflow-y-auto`},$9={key:3,class:`h-full flex flex-col`},ode={class:`flex gap-0.5 px-2.5 py-1.5 bg-background border-b border-base flex-shrink-0`},sde=[`data-active`],cde=[`data-active`],lde={key:4,class:`h-full flex flex-col`},ude={class:`flex gap-0.5 px-2.5 py-1.5 bg-background border-b border-base flex-shrink-0`},dde=[`data-active`],fde=[`data-active`],pde={key:12,class:`flex items-center justify-center h-full text-muted-foreground text-sm op-fade`};ks(Tr({__name:`App`,setup(e){let{loading:t,error:n,info:r,env:i,uptime:a,fmtUptime:o,fmtTime:s,fmtVal:c,filePath:l,methodClass:u,refresh:d,crudCreate:f,crudRead:p,crudUpdate:m,crudDelete:h,aiChatStream:g,terminalStart:_,terminalInput:v,terminalResize:y,terminalPoll:b,terminalKill:x}=rA(),S=L(()=>window.location.hash.slice(2)||`overview`),C=k(`routes`),w=k(`pages`),ee=k(`GET`),te=k(`/api/`);function ne(e){ee.value=e.method,te.value=e.path,C.value=`playground`}let re=L(()=>{switch(S.value){case`overview`:return`Overview`;case`pages`:return w.value===`layouts`?`Layouts`:`Pages`;case`api`:return C.value===`playground`?`API Playground`:`API Routes`;case`middleware`:return`Middlewares`;case`crons`:return`Crons`;case`env`:return`Environment Variables`;case`config`:return`Config`;case`api-docs`:return`API Docs`;case`database`:return`Database`;case`terminal`:return`Terminal`;default:return`DevTools`}}),ie=L(()=>r.value?.config.rootDir||``),ae=L(()=>{if(!r.value)return``;let e=r.value;switch(S.value){case`overview`:return`Project has ${e.pages} pages, ${e.apiRoutes} API routes, ${e.middleware} middleware, ${e.layouts} layouts, ${e.crons} cron jobs.`;case`pages`:return w.value===`layouts`?`${e.layouts} layouts available.`:`${e.pages} pages available.`;case`api`:return C.value===`playground`?`${e.apiRoutes} API routes available to test.`:`${e.apiRoutes} API routes available.`;case`middleware`:return`${e.middleware} middleware registered.`;case`crons`:return`${e.crons} cron jobs registered.`;case`env`:return`${Object.keys(i.value).length} environment variables.`;case`config`:return`Preset: ${e.presets.join(`, `)||`default`}`;default:return``}}),oe=k(!1),se=k(`page`),T=k(!1);async function ce(){T.value||(T.value=!0,await d(),setTimeout(()=>{T.value=!1},500))}let le={P:`page`,A:`api`,M:`middleware`,L:`layout`,C:`cron`};function E(e){se.value=e,oe.value=!0}function ue(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||oe.value)return;let t=e.key.toUpperCase();if(t===`N`&&(e.metaKey||e.ctrlKey)){e.preventDefault(),E(`page`);return}if(t===`R`){ce();return}le[t]&&E(le[t])}function de(e){h(`page`,{path:e.path})}function fe(e){e.filePath&&h(`api`,{path:e.filePath})}function pe(e){h(`middleware`,{path:e.path})}function me(e){h(`layout`,{path:e.path})}function he(e){e.filePath&&h(`cron`,{path:e.filePath})}let ge=k(!1),_e=k(``),ve=k(`page`),ye=k(``),be=k(`typescript`);function xe(e,t,n,r){_e.value=e,ve.value=t,ye.value=n,be.value=r||`typescript`,ge.value=!0}function Se(e){e.filePath&&xe(e.filePath,`page`,`Edit Page: ${e.path}`,`vue`)}function Ce(e){e.filePath&&xe(e.filePath,`api`,`Edit Route: ${e.method} ${e.path}`,`typescript`)}function we(e){e.filePath&&xe(e.filePath,`middleware`,`Edit Middleware: ${e.path}`,`typescript`)}function Te(e){e.filePath&&xe(e.filePath,`layout`,`Edit Layout: ${e.name}`,`vue`)}function Ee(e){e.filePath&&xe(e.filePath,`cron`,`Edit Cron: ${e.name}`,`typescript`)}function De(){xe(`ubean.config.ts`,`config`,`Edit Project Config`,`typescript`)}let Oe=k(!1),ke=k(``),Ae=k(``);function je(e){e.filePath&&(ke.value=e.filePath,Ae.value=e.path,Oe.value=!0)}let Me=k(!1),Ne=k(``),Pe=k(``),Fe=k(!1);function Ie(){Fe.value=!0,Ne.value=``,Pe.value=``,Me.value=!0}function Le(e,t){Fe.value=!1,Ne.value=e,Pe.value=t,Me.value=!0}async function Re(e,t){return(await m(`env`,{key:e,value:t})).success?(await d(),!0):!1}function ze(e){h(`env`,{key:e})}return Vr(()=>{window.addEventListener(`keydown`,ue)}),Ur(()=>{window.removeEventListener(`keydown`,ue)}),(e,h)=>(M(),wa(j($T),null,{default:Rn(()=>[P(`div`,ede,[j(t)?(M(),N(`div`,tde,[...h[13]||=[P(`img`,{src:`https://r2.soybeanjs.tech/soybeanjs/logo-ubean.svg`,alt:`ubean`,class:`size-10 op-fade`},null,-1),P(`div`,{class:`size-7 border-2 border-muted border-t-primary rounded-full animate-spin`},null,-1),P(`span`,{class:`text-sm op-fade`},`Loading DevTools...`,-1)]])):j(n)?(M(),N(`div`,nde,[P(`div`,rde,[F(j(B),{icon:`lucide:alert-circle`,size:16,class:`flex-shrink-0 mt-0.5`}),P(`div`,null,[h[14]||=P(`strong`,null,`Connection failed`,-1),h[15]||=P(`br`,null,null,-1),P(`span`,ide,O(j(n)),1)])])])):j(r)?(M(),N(ma,{key:2},[P(`button`,{class:`fixed bottom-3 right-3 z-40 size-8 flex items-center justify-center rounded-full bg-secondary border border-base text-muted-foreground hover:text-foreground hover:border-active shadow-md transition-all cursor-pointer`,title:`Refresh (R)`,onClick:ce},[F(j(B),{icon:`lucide:refresh-cw`,size:14,class:D([{"animate-spin":T.value},`transition-transform`])},null,8,[`class`])]),S.value===`ai`?I(``,!0):(M(),wa(h$,{key:0,"panel-context":re.value,"resource-summary":ae.value,"send-chat-stream":j(g),"on-refresh":j(d),"ai-enabled":j(r).ai?.enabled},null,8,[`panel-context`,`resource-summary`,`send-chat-stream`,`on-refresh`,`ai-enabled`])),S.value===`overview`?(M(),N(`div`,ade,[F(F4,{info:j(r),uptime:j(a),"fmt-uptime":j(o),"fmt-time":j(s),"fmt-val":j(c)},null,8,[`info`,`uptime`,`fmt-uptime`,`fmt-time`,`fmt-val`])])):S.value===`ai`?(M(),wa(m1,{key:2,class:`h-full`,info:j(r),"send-chat-stream":j(g),"on-refresh":j(d)},null,8,[`info`,`send-chat-stream`,`on-refresh`])):S.value===`api`?(M(),N(`div`,$9,[P(`div`,ode,[P(`button`,{class:`inline-flex items-center gap-1.5 px-2.5 py-1 bg-transparent border-none rounded-md text-muted-foreground text-xs font-medium cursor-pointer whitespace-nowrap transition-all duration-150 op-fade hover:op100 hover:text-foreground hover:bg-active data-[active=true]:bg-active data-[active=true]:text-foreground data-[active=true]:op100!`,"data-active":C.value===`routes`,onClick:h[0]||=e=>C.value=`routes`},[F(j(B),{icon:`lucide:send`,size:13}),h[16]||=Ma(` Routes `,-1)],8,sde),P(`button`,{class:`inline-flex items-center gap-1.5 px-3 py-1.5 bg-transparent border-none rounded-md text-muted-foreground text-xs font-medium cursor-pointer whitespace-nowrap transition-all duration-150 hover:text-foreground data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,"data-active":C.value===`playground`,onClick:h[1]||=e=>C.value=`playground`},[F(j(B),{icon:`lucide:play`,size:13}),h[17]||=Ma(` Playground `,-1)],8,cde)]),zn(F(I0,{class:`flex-1 overflow-hidden`,routes:j(r).routes||[],"file-path":j(l),"method-class":j(u),onTryRoute:ne,onEdit:Ce,onDelete:fe,onCreate:h[2]||=e=>E(`api`)},null,8,[`routes`,`file-path`,`method-class`]),[[Lo,C.value===`routes`]]),zn(F(s0,{class:`flex-1 overflow-hidden`,routes:j(r).routes||[],"method-class":j(u),"initial-method":ee.value,"initial-path":te.value},null,8,[`routes`,`method-class`,`initial-method`,`initial-path`]),[[Lo,C.value===`playground`]])])):S.value===`pages`?(M(),N(`div`,lde,[P(`div`,ude,[P(`button`,{class:`inline-flex items-center gap-1.5 px-2.5 py-1 bg-transparent border-none rounded-md text-muted-foreground text-xs font-medium cursor-pointer whitespace-nowrap transition-all duration-150 op-fade hover:op100 hover:text-foreground hover:bg-active data-[active=true]:bg-active data-[active=true]:text-foreground data-[active=true]:op100!`,"data-active":w.value===`pages`,onClick:h[3]||=e=>w.value=`pages`},[F(j(B),{icon:`lucide:file-text`,size:13}),h[18]||=Ma(` Pages `,-1)],8,dde),P(`button`,{class:`inline-flex items-center gap-1.5 px-3 py-1.5 bg-transparent border-none rounded-md text-muted-foreground text-xs font-medium cursor-pointer whitespace-nowrap transition-all duration-150 hover:text-foreground data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,"data-active":w.value===`layouts`,onClick:h[4]||=e=>w.value=`layouts`},[F(j(B),{icon:`lucide:layout`,size:13}),h[19]||=Ma(` Layouts `,-1)],8,fde)]),zn(F($4,{class:`flex-1 overflow-hidden`,pages:j(r).pagesList||[],"file-path":j(l),onEdit:Se,onEditMeta:je,onDelete:de,onCreate:h[5]||=e=>E(`page`)},null,8,[`pages`,`file-path`]),[[Lo,w.value===`pages`]]),zn(F(Z2,{class:`flex-1 overflow-hidden`,layouts:j(r).layoutsList||[],"file-path":j(l),onEdit:Te,onDelete:me,onCreate:h[6]||=e=>E(`layout`)},null,8,[`layouts`,`file-path`]),[[Lo,w.value===`layouts`]])])):S.value===`middleware`?(M(),wa(u4,{key:5,class:`h-full`,middlewares:j(r).middlewaresList||[],"file-path":j(l),onEdit:we,onDelete:pe,onCreate:h[7]||=e=>E(`middleware`)},null,8,[`middlewares`,`file-path`])):S.value===`crons`?(M(),wa(u2,{key:6,class:`h-full`,crons:j(r).cronsList||[],"file-path":j(l),onEdit:Ee,onDelete:he,onCreate:h[8]||=e=>E(`cron`)},null,8,[`crons`,`file-path`])):S.value===`env`?(M(),wa(I2,{key:7,class:`h-full`,env:j(i),"on-add":Ie,"on-edit":Le,"on-delete":ze},null,8,[`env`])):S.value===`config`?(M(),wa(X0,{key:8,class:`h-full`,config:j(r).config||{},info:j(r),"fmt-uptime":j(o),"fmt-time":j(s),"fmt-val":j(c),uptime:j(a),onEdit:De},null,8,[`config`,`info`,`fmt-uptime`,`fmt-time`,`fmt-val`,`uptime`])):S.value===`api-docs`?(M(),wa(v1,{key:9,class:`h-full`,enabled:j(r).openAPI?.enabled,"scalar-path":j(r).openAPI?.scalarPath},null,8,[`enabled`,`scalar-path`])):S.value===`database`?(M(),wa(_2,{key:10,class:`h-full`,available:j(r).database?.drizzleStudioAvailable,"studio-url":j(r).database?.studioUrl},null,8,[`available`,`studio-url`])):S.value===`terminal`?(M(),wa($ue,{key:11,class:`h-full`,cwd:ie.value,"terminal-start":j(_),"terminal-input":j(v),"terminal-resize":j(y),"terminal-poll":j(b),"terminal-kill":j(x)},null,8,[`cwd`,`terminal-start`,`terminal-input`,`terminal-resize`,`terminal-poll`,`terminal-kill`])):(M(),N(`div`,pde,` Unknown view: `+O(S.value),1))],64)):I(``,!0),F(EA,{open:oe.value,"initial-type":se.value,"on-create":j(f),onClose:h[9]||=e=>oe.value=!1},null,8,[`open`,`initial-type`,`on-create`]),F(DQ,{open:ge.value,"file-path":_e.value,"resource-type":ve.value,title:ye.value,language:be.value,"on-read":j(p),"on-save":j(m),onClose:h[10]||=e=>ge.value=!1,onSaved:j(d)},null,8,[`open`,`file-path`,`resource-type`,`title`,`language`,`on-read`,`on-save`,`onSaved`]),F(W$,{open:Oe.value,"file-path":ke.value,"page-path":Ae.value,"on-read":j(p),"on-save":j(m),onClose:h[11]||=e=>Oe.value=!1,onSaved:j(d)},null,8,[`open`,`file-path`,`page-path`,`on-read`,`on-save`,`onSaved`]),F(BQ,{open:Me.value,"is-new":Fe.value,"initial-key":Ne.value,"initial-value":Pe.value,"on-save":Re,onClose:h[12]||=e=>Me.value=!1},null,8,[`open`,`is-new`,`initial-key`,`initial-value`])])]),_:1}))}})).mount(`#app`);
|