uEdition-Editor 2.0.0b7__py3-none-any.whl → 2.0.0b8__py3-none-any.whl

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.

Potentially problematic release.


This version of uEdition-Editor might be problematic. Click here for more details.

@@ -3,4 +3,4 @@
3
3
  # SPDX-License-Identifier: MIT
4
4
  """About this package."""
5
5
 
6
- __version__ = "2.0.0b7"
6
+ __version__ = "2.0.0b8"
@@ -147,12 +147,14 @@ async def merge_from_default(
147
147
  Signature(current_user["name"], current_user["sub"]),
148
148
  extra_parents=[default_branch_head.id],
149
149
  )
150
+ await cron.insecure_track_branches()
150
151
 
151
152
 
152
153
  @router.delete("/{branch_id}", status_code=204)
153
154
  async def delete_branch(
154
155
  branch_id: str,
155
156
  current_user: Annotated[dict, Depends(get_current_user)], # noqa:ARG001
157
+ local_delete: Annotated[bool, Header(alias="x-ueditor-delete-local-only")] = False, # noqa:FBT002
156
158
  ) -> None:
157
159
  """Delete the given branch locally and remotely."""
158
160
  async with BranchContextManager(branch_id) as repo:
@@ -160,7 +162,7 @@ async def delete_branch(
160
162
  if init_settings.git.default_branch == branch_id:
161
163
  raise HTTPException(422, detail=[{"msg": "you cannot delete the default branch"}])
162
164
  repo.checkout(repo.branches[init_settings.git.default_branch])
163
- if init_settings.git.remote_name in list(repo.remotes.names()):
165
+ if init_settings.git.remote_name in list(repo.remotes.names()) and not local_delete:
164
166
  if repo.branches[branch_id].upstream is not None:
165
167
  repo.remotes[init_settings.git.remote_name].push(
166
168
  [f":refs/heads/{branch_id}"], callbacks=RemoteRepositoryCallbacks()
uedition_editor/cron.py CHANGED
@@ -16,11 +16,18 @@ from uedition_editor.state import local_branches, remote_branches
16
16
  logger = logging.getLogger(__name__)
17
17
 
18
18
 
19
+ def format_remote_branch_title(title: str) -> str:
20
+ """Format the remote branch name as a title."""
21
+ if "/" in title:
22
+ return de_slugify(title[title.find("/") + 1 :])
23
+ return title
24
+
25
+
19
26
  async def insecure_track_branches():
20
27
  """
21
28
  Track the status of all git branches.
22
29
 
23
- Use only when the uedition_lock is already completed.
30
+ Use only when the uedition_lock is already aquired.
24
31
  """
25
32
  remote_branches.clear()
26
33
  local_branches.clear()
@@ -37,9 +44,10 @@ async def insecure_track_branches():
37
44
  if init_settings.git.remote_name in list(repo.remotes.names()):
38
45
  if repo.branches[branch_name].upstream is not None:
39
46
  pull_branch(repo, branch_name)
40
- diff = repo.diff(
41
- repo.revparse_single(init_settings.git.default_branch),
47
+ merge_base = repo.merge_base(
48
+ repo.revparse_single(init_settings.git.default_branch).id, repo.revparse_single(branch_name).id
42
49
  )
50
+ diff = repo.diff(merge_base, repo.revparse_single(init_settings.git.default_branch))
43
51
  local_branches.append(
44
52
  {
45
53
  "id": branch_name,
@@ -49,7 +57,7 @@ async def insecure_track_branches():
49
57
  )
50
58
  for branch_name in repo.branches.remote:
51
59
  if repo.branches[branch_name].remote_name == init_settings.git.remote_name and "HEAD" not in branch_name:
52
- remote_branches.append({"id": branch_name, "title": de_slugify(branch_name)})
60
+ remote_branches.append({"id": branch_name, "title": format_remote_branch_title(branch_name)})
53
61
  logger.debug("Tracking complete")
54
62
  except GitError as ge:
55
63
  logger.error(ge)
@@ -1,4 +1,4 @@
1
- import{S as af,i as hf,s as cf,F as ff,g as qn,G as uo,r as En,H as Rp,y as Ap,z as uf,E as wl,e as bi,c as df,t as Mp,f as Qt,h as pi,k as Lp,o as qp,p as Rr,q as Ep,n as Ar,w as $s,J as Un,x as xa,K as Vp,L as Dp,M as ka,N as vs,O as Wp,d as Of,j as pf,l as _p,P as Bp,u as mf,Q as jp}from"./index-D6QIwXwq.js";import{k as Yp,b as zp,s as Ip}from"./index-Vcq4gwWv.js";const gf=1024;let Up=0,We=class{constructor(e,t){this.from=e,this.to=t}};class L{constructor(e={}){this.id=Up++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ae.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}L.closedBy=new L({deserialize:n=>n.split(" ")});L.openedBy=new L({deserialize:n=>n.split(" ")});L.group=new L({deserialize:n=>n.split(" ")});L.isolate=new L({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});L.contextHash=new L({perNode:!0});L.lookAhead=new L({perNode:!0});L.mounted=new L({perNode:!0});class dn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[L.mounted.id]}}const Np=Object.create(null);class ae{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Np,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ae(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}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(L.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(L.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}ae.none=new ae("",Object.create(null),0,8);class Vn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new ae(i.name,r,i.id,i.flags):i)}return new Vn(t)}}const Nn=new WeakMap,wa=new WeakMap;var K;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(K||(K={}));class U{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=dn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}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 Mr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Nn.get(this)||this.topNode,s=new Mr(r);return s.moveTo(e,t),Nn.set(this,s._tree),s}get topNode(){return new be(this,0,0,null)}resolve(e,t=0){let i=On(Nn.get(this)||this.topNode,e,t,!1);return Nn.set(this,i),i}resolveInner(e,t=0){let i=On(wa.get(this)||this.topNode,e,t,!0);return wa.set(this,i),i}resolveStack(e,t=0){return Fp(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&K.IncludeAnonymous)>0;for(let a=this.cursor(o|K.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!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(e={}){return this.children.length<=8?this:vl(ae.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new U(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new U(ae.none,t,i,r)))}static build(e){return Kp(e)}}U.empty=new U(ae.none,[],[],0);class Pl{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 Pl(this.buffer,this.index)}}class Wt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ae.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],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(bf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Wt(s,o,this.set)}}function bf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function On(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof be&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:K.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof be&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Sf{cursor(e=0){return new Mr(this,e)}getChild(e,t=null,i=null){let r=Pa(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return Pa(this,e,t,i)}resolve(e,t=0){return On(this,e,t,!1)}resolveInner(e,t=0){return On(this,e,t,!0)}matchContext(e){return Oo(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class be extends Sf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,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(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(bf(r,i,f,f+c.length)){if(c instanceof Wt){if(s&K.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,r);if(u>-1)return new ot(new Gp(o,c,e,f),null,u)}else if(s&K.IncludeAnonymous||!c.type.isAnonymous||$l(c)){let u;if(!(s&K.IgnoreMounts)&&(u=dn.get(c))&&!u.overlay)return new be(u.tree,f,e,o);let d=new be(c,f,e,o);return s&K.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&K.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<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)}enter(e,t,i=0){let r;if(!(i&K.IgnoreOverlays)&&(r=dn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new be(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}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 Pa(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Oo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Gp{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class ot extends Sf{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,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new ot(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&K.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new ot(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ot(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ot(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new U(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Qf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof be&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new Hp(r,t)}class Hp{constructor(e,t){this.heads=e,this.node=t}get next(){return Qf(this.heads)}}function Fp(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof be?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=dn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new be(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(On(l,e,t,!1))}}return r?Qf(r):i}class Mr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof be)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.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:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof be?(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,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}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,i=this.mode){return this.buffer?i&K.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&K.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&K.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,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&K.IncludeAnonymous||l instanceof Wt||!l.type.isAnonymous||$l(l))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,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new ot(this.buffer,t,this.stack[r]);return this.bufferNode=new ot(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return Oo(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return Oo(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function $l(n){return n.children.some(e=>e instanceof Wt||!e.type.isAnonymous||$l(e))}function Kp(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=gf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Pl(t,t.length):t,a=i.types,h=0,c=0;function f(y,k,$,E,D,I){let{id:V,start:M,end:z,size:_}=l,N=c,fe=h;for(;_<0;)if(l.next(),_==-1){let xe=s[V];$.push(xe),E.push(M-y);return}else if(_==-3){h=V;return}else if(_==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${_}`);let ye=a[V],Ve,X,ue=M-y;if(z-M<=r&&(X=p(l.pos-k,D))){let xe=new Uint16Array(X.size-X.skip),Pe=l.pos-X.size,Re=xe.length;for(;l.pos>Pe;)Re=b(X.start,xe,Re);Ve=new Wt(xe,z-X.start,i),ue=X.start-y}else{let xe=l.pos-_;l.next();let Pe=[],Re=[],pt=V>=o?V:-1,Rt=0,It=z;for(;l.pos>xe;)pt>=0&&l.id==pt&&l.size>=0?(l.end<=It-r&&(O(Pe,Re,M,Rt,l.end,It,pt,N,fe),Rt=Pe.length,It=l.end),l.next()):I>2500?u(M,xe,Pe,Re):f(M,xe,Pe,Re,pt,I+1);if(pt>=0&&Rt>0&&Rt<Pe.length&&O(Pe,Re,M,Rt,M,It,pt,N,fe),Pe.reverse(),Re.reverse(),pt>-1&&Rt>0){let mt=d(ye,fe);Ve=vl(ye,Pe,Re,0,Pe.length,0,z-M,mt,mt)}else Ve=g(ye,Pe,Re,z-M,N-z,fe)}$.push(Ve),E.push(ue)}function u(y,k,$,E){let D=[],I=0,V=-1;for(;l.pos>k;){let{id:M,start:z,end:_,size:N}=l;if(N>4)l.next();else{if(V>-1&&z<V)break;V<0&&(V=_-r),D.push(M,z,_),I++,l.next()}}if(I){let M=new Uint16Array(I*4),z=D[D.length-2];for(let _=D.length-3,N=0;_>=0;_-=3)M[N++]=D[_],M[N++]=D[_+1]-z,M[N++]=D[_+2]-z,M[N++]=N;$.push(new Wt(M,D[2]-z,i)),E.push(z-y)}}function d(y,k){return($,E,D)=>{let I=0,V=$.length-1,M,z;if(V>=0&&(M=$[V])instanceof U){if(!V&&M.type==y&&M.length==D)return M;(z=M.prop(L.lookAhead))&&(I=E[V]+M.length+z)}return g(y,$,E,D,I,k)}}function O(y,k,$,E,D,I,V,M,z){let _=[],N=[];for(;y.length>E;)_.push(y.pop()),N.push(k.pop()+$-D);y.push(g(i.types[V],_,N,I-D,M-I,z)),k.push(D-$)}function g(y,k,$,E,D,I,V){if(I){let M=[L.contextHash,I];V=V?[M].concat(V):[M]}if(D>25){let M=[L.lookAhead,D];V=V?[M].concat(V):[M]}return new U(y,k,$,E,V)}function p(y,k){let $=l.fork(),E=0,D=0,I=0,V=$.end-r,M={size:0,start:0,skip:0};e:for(let z=$.pos-y;$.pos>z;){let _=$.size;if($.id==k&&_>=0){M.size=E,M.start=D,M.skip=I,I+=4,E+=4,$.next();continue}let N=$.pos-_;if(_<0||N<z||$.start<V)break;let fe=$.id>=o?4:0,ye=$.start;for($.next();$.pos>N;){if($.size<0)if($.size==-3)fe+=4;else break e;else $.id>=o&&(fe+=4);$.next()}D=ye,E+=_,I+=fe}return(k<0||E==y)&&(M.size=E,M.start=D,M.skip=I),M.size>4?M:void 0}function b(y,k,$){let{id:E,start:D,end:I,size:V}=l;if(l.next(),V>=0&&E<o){let M=$;if(V>4){let z=l.pos-(V-4);for(;l.pos>z;)$=b(y,k,$)}k[--$]=M,k[--$]=I-y,k[--$]=D-y,k[--$]=E}else V==-3?h=E:V==-4&&(c=E);return $}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let w=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new U(a[n.topID],S.reverse(),x.reverse(),w)}const $a=new WeakMap;function Sr(n,e){if(!n.isAnonymous||e instanceof Wt||e.type!=n)return 1;let t=$a.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof U)){t=1;break}t+=Sr(n,i)}$a.set(e,t)}return t}function vl(n,e,t,i,r,s,o,l,a){let h=0;for(let O=i;O<r;O++)h+=Sr(n,e[O]);let c=Math.ceil(h*1.5/8),f=[],u=[];function d(O,g,p,b,S){for(let x=p;x<b;){let w=x,y=g[x],k=Sr(n,O[x]);for(x++;x<b;x++){let $=Sr(n,O[x]);if(k+$>=c)break;k+=$}if(x==w+1){if(k>c){let $=O[w];d($.children,$.positions,0,$.children.length,g[w]+S);continue}f.push(O[w])}else{let $=g[x-1]+O[x-1].length-y;f.push(vl(n,O,g,w,x,y,$,null,a))}u.push(y+S-s)}}return d(e,t,i,r,0),(l||a)(f,u,o)}class yf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ot?this.setBuffer(e.context.buffer,e.index,t):e instanceof be&&this.map.set(e.tree,t)}get(e){return e instanceof ot?this.getBuffer(e.context.buffer,e.index):e instanceof be?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)}}class yt{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new yt(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let u=o;if(a>=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new yt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&r.push(u),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Cl{startParse(e,t,i){return typeof e=="string"&&(e=new Jp(e)),i=i?i.length?i.map(r=>new We(r.from,r.to)):[new We(0,0)]:[new We(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class Jp{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)}}function xf(n){return(e,t,i,r)=>new tm(e,n,t,i,r)}class va{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function Ca(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class em{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const po=new L({perNode:!0});class tm{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new U(i.type,i.children,i.positions,i.length,i.propValues.concat([[po,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[L.mounted.id]=new dn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new rm(this.fragments),t=null,i=null,r=new Mr(new be(this.baseTree,this.ranges[0].from,0,null),K.IncludeAnonymous|K.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=r.from&&u<=r.to&&!t.ranges.some(d=>d.from<u&&d.to>f)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=im(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||nm(r);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new em(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=Xa(this.ranges,s.overlay||(r.from<r.to?[new We(r.from,r.to)]:[]));c.length&&Ca(c),(c.length||!s.overlay)&&this.inner.push(new va(s.parser,c.length?s.parser.startParse(this.input,Ra(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new We(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new We(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Xa(this.ranges,t.ranges);h.length&&(Ca(h),this.inner.splice(t.index,0,new va(t.parser,t.parser.startParse(this.input,Ra(t.mounts,h),h),t.ranges.map(c=>new We(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function im(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Za(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function nm(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,u,d,O,g){let p=t[g],b=[],S=[];Za(o,c,p,b,S,d);let x=l[p+1],w=l[p+2];a.push(b.length);let y=g?h(p+4,l[p+3],o.set.types[l[p]],x,w-x,g-1):e.toTree();return b.push(y),S.push(x-d),Za(o,l[p+3],f,b,S,d),new U(u,b,S,O)}r.children[s]=h(0,l.length,ae.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],u=n.tree.positions[c];n.yield(new be(f,u+n.from,c,n._tree))}}class Ta{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(K.IncludeAnonymous|K.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,K.IgnoreOverlays|K.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof U)t=t.children[0];else break}return!1}}let rm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(po))!==null&&t!==void 0?t:i.to,this.inner=new Ta(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(po))!==null&&e!==void 0?e:t.to,this.inner=new Ta(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(L.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function Xa(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new We(a.from,o),a.to>l&&t.splice(s+1,0,new We(l,a.to))):a.to>l?t[s--]=new We(l,a.to):t.splice(s--,1))}}return i}function sm(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);u<d&&h.push(new We(u,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Ra(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(u=>new We(u.from+i,u.to+i)),f=sm(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,g=O?h:f[u].from;if(g>d&&t.push(new yt(d,g,r.tree,-o,s.from>=d||s.openStart,s.to<=g||s.openEnd)),O)break;d=f[u].to}}else t.push(new yt(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let mo=[],kf=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?kf:mo).push(t=t+n[e])})();function om(n){if(n<768)return!1;for(let e=0,t=mo.length;;){let i=e+t>>1;if(n<mo[i])t=i;else if(n>=kf[i])e=i+1;else return!0;if(e==t)return!1}}function Aa(n){return n>=127462&&n<=127487}const Ma=8205;function lm(n,e,t=!0,i=!0){return(t?wf:am)(n,e,i)}function wf(n,e,t){if(e==n.length)return e;e&&Pf(n.charCodeAt(e))&&$f(n.charCodeAt(e-1))&&e--;let i=Cs(n,e);for(e+=La(i);e<n.length;){let r=Cs(n,e);if(i==Ma||r==Ma||t&&om(r))e+=La(r),i=r;else if(Aa(r)){let s=0,o=e-2;for(;o>=0&&Aa(Cs(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function am(n,e,t){for(;e>0;){let i=wf(n,e-2,t);if(i<e)return i;e--}return 0}function Cs(n,e){let t=n.charCodeAt(e);if(!$f(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Pf(i)?(t-55296<<10)+(i-56320)+65536:t}function Pf(n){return n>=56320&&n<57344}function $f(n){return n>=55296&&n<56320}function La(n){return n<65536?1:2}class Y{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=$i(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),nt.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$i(this,e,t);let i=[];return this.decompose(e,t,i,0),nt.from(i,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),i=this.length-this.scanIdentical(e,-1),r=new sn(this),s=new sn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new sn(this,e)}iterRange(e,t=this.length){return new vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Cf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y.empty:e.length<=32?new ne(e):nt.from(ne.split(e,[]))}}class ne extends Y{constructor(e,t=hm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new cm(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ne(qa(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=Qr(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new ne(l,o.length+s.length));else{let a=l.length>>1;i.push(new ne(l.slice(0,a)),new ne(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ne))return super.replace(e,t,i);[e,t]=$i(this,e,t);let r=Qr(this.text,Qr(i.text,qa(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ne(r,s):nt.from(ne.split(r,[]),s)}sliceString(e,t=this.length,i=`
1
+ import{S as af,i as hf,s as cf,F as ff,g as qn,G as uo,r as En,H as Rp,y as Ap,z as uf,E as wl,e as bi,c as df,t as Mp,f as Qt,h as pi,k as Lp,o as qp,p as Rr,q as Ep,n as Ar,w as $s,J as Un,x as xa,K as Vp,L as Dp,M as ka,N as vs,O as Wp,d as Of,j as pf,l as _p,P as Bp,u as mf,Q as jp}from"./index-DAdhbT7C.js";import{k as Yp,b as zp,s as Ip}from"./index-Vcq4gwWv.js";const gf=1024;let Up=0,We=class{constructor(e,t){this.from=e,this.to=t}};class L{constructor(e={}){this.id=Up++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ae.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}L.closedBy=new L({deserialize:n=>n.split(" ")});L.openedBy=new L({deserialize:n=>n.split(" ")});L.group=new L({deserialize:n=>n.split(" ")});L.isolate=new L({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});L.contextHash=new L({perNode:!0});L.lookAhead=new L({perNode:!0});L.mounted=new L({perNode:!0});class dn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[L.mounted.id]}}const Np=Object.create(null);class ae{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Np,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ae(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}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(L.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(L.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}ae.none=new ae("",Object.create(null),0,8);class Vn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new ae(i.name,r,i.id,i.flags):i)}return new Vn(t)}}const Nn=new WeakMap,wa=new WeakMap;var K;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(K||(K={}));class U{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=dn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}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 Mr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Nn.get(this)||this.topNode,s=new Mr(r);return s.moveTo(e,t),Nn.set(this,s._tree),s}get topNode(){return new be(this,0,0,null)}resolve(e,t=0){let i=On(Nn.get(this)||this.topNode,e,t,!1);return Nn.set(this,i),i}resolveInner(e,t=0){let i=On(wa.get(this)||this.topNode,e,t,!0);return wa.set(this,i),i}resolveStack(e,t=0){return Fp(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&K.IncludeAnonymous)>0;for(let a=this.cursor(o|K.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!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(e={}){return this.children.length<=8?this:vl(ae.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new U(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new U(ae.none,t,i,r)))}static build(e){return Kp(e)}}U.empty=new U(ae.none,[],[],0);class Pl{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 Pl(this.buffer,this.index)}}class Wt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ae.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],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(bf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Wt(s,o,this.set)}}function bf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function On(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof be&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:K.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof be&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Sf{cursor(e=0){return new Mr(this,e)}getChild(e,t=null,i=null){let r=Pa(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return Pa(this,e,t,i)}resolve(e,t=0){return On(this,e,t,!1)}resolveInner(e,t=0){return On(this,e,t,!0)}matchContext(e){return Oo(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class be extends Sf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,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(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(bf(r,i,f,f+c.length)){if(c instanceof Wt){if(s&K.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,r);if(u>-1)return new ot(new Gp(o,c,e,f),null,u)}else if(s&K.IncludeAnonymous||!c.type.isAnonymous||$l(c)){let u;if(!(s&K.IgnoreMounts)&&(u=dn.get(c))&&!u.overlay)return new be(u.tree,f,e,o);let d=new be(c,f,e,o);return s&K.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&K.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<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)}enter(e,t,i=0){let r;if(!(i&K.IgnoreOverlays)&&(r=dn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new be(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}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 Pa(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Oo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Gp{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class ot extends Sf{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,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new ot(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&K.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new ot(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ot(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ot(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new U(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Qf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof be&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new Hp(r,t)}class Hp{constructor(e,t){this.heads=e,this.node=t}get next(){return Qf(this.heads)}}function Fp(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof be?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=dn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new be(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(On(l,e,t,!1))}}return r?Qf(r):i}class Mr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof be)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.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:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof be?(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,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}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,i=this.mode){return this.buffer?i&K.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&K.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&K.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,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&K.IncludeAnonymous||l instanceof Wt||!l.type.isAnonymous||$l(l))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,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new ot(this.buffer,t,this.stack[r]);return this.bufferNode=new ot(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return Oo(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return Oo(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function $l(n){return n.children.some(e=>e instanceof Wt||!e.type.isAnonymous||$l(e))}function Kp(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=gf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Pl(t,t.length):t,a=i.types,h=0,c=0;function f(y,k,$,E,D,I){let{id:V,start:M,end:z,size:_}=l,N=c,fe=h;for(;_<0;)if(l.next(),_==-1){let xe=s[V];$.push(xe),E.push(M-y);return}else if(_==-3){h=V;return}else if(_==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${_}`);let ye=a[V],Ve,X,ue=M-y;if(z-M<=r&&(X=p(l.pos-k,D))){let xe=new Uint16Array(X.size-X.skip),Pe=l.pos-X.size,Re=xe.length;for(;l.pos>Pe;)Re=b(X.start,xe,Re);Ve=new Wt(xe,z-X.start,i),ue=X.start-y}else{let xe=l.pos-_;l.next();let Pe=[],Re=[],pt=V>=o?V:-1,Rt=0,It=z;for(;l.pos>xe;)pt>=0&&l.id==pt&&l.size>=0?(l.end<=It-r&&(O(Pe,Re,M,Rt,l.end,It,pt,N,fe),Rt=Pe.length,It=l.end),l.next()):I>2500?u(M,xe,Pe,Re):f(M,xe,Pe,Re,pt,I+1);if(pt>=0&&Rt>0&&Rt<Pe.length&&O(Pe,Re,M,Rt,M,It,pt,N,fe),Pe.reverse(),Re.reverse(),pt>-1&&Rt>0){let mt=d(ye,fe);Ve=vl(ye,Pe,Re,0,Pe.length,0,z-M,mt,mt)}else Ve=g(ye,Pe,Re,z-M,N-z,fe)}$.push(Ve),E.push(ue)}function u(y,k,$,E){let D=[],I=0,V=-1;for(;l.pos>k;){let{id:M,start:z,end:_,size:N}=l;if(N>4)l.next();else{if(V>-1&&z<V)break;V<0&&(V=_-r),D.push(M,z,_),I++,l.next()}}if(I){let M=new Uint16Array(I*4),z=D[D.length-2];for(let _=D.length-3,N=0;_>=0;_-=3)M[N++]=D[_],M[N++]=D[_+1]-z,M[N++]=D[_+2]-z,M[N++]=N;$.push(new Wt(M,D[2]-z,i)),E.push(z-y)}}function d(y,k){return($,E,D)=>{let I=0,V=$.length-1,M,z;if(V>=0&&(M=$[V])instanceof U){if(!V&&M.type==y&&M.length==D)return M;(z=M.prop(L.lookAhead))&&(I=E[V]+M.length+z)}return g(y,$,E,D,I,k)}}function O(y,k,$,E,D,I,V,M,z){let _=[],N=[];for(;y.length>E;)_.push(y.pop()),N.push(k.pop()+$-D);y.push(g(i.types[V],_,N,I-D,M-I,z)),k.push(D-$)}function g(y,k,$,E,D,I,V){if(I){let M=[L.contextHash,I];V=V?[M].concat(V):[M]}if(D>25){let M=[L.lookAhead,D];V=V?[M].concat(V):[M]}return new U(y,k,$,E,V)}function p(y,k){let $=l.fork(),E=0,D=0,I=0,V=$.end-r,M={size:0,start:0,skip:0};e:for(let z=$.pos-y;$.pos>z;){let _=$.size;if($.id==k&&_>=0){M.size=E,M.start=D,M.skip=I,I+=4,E+=4,$.next();continue}let N=$.pos-_;if(_<0||N<z||$.start<V)break;let fe=$.id>=o?4:0,ye=$.start;for($.next();$.pos>N;){if($.size<0)if($.size==-3)fe+=4;else break e;else $.id>=o&&(fe+=4);$.next()}D=ye,E+=_,I+=fe}return(k<0||E==y)&&(M.size=E,M.start=D,M.skip=I),M.size>4?M:void 0}function b(y,k,$){let{id:E,start:D,end:I,size:V}=l;if(l.next(),V>=0&&E<o){let M=$;if(V>4){let z=l.pos-(V-4);for(;l.pos>z;)$=b(y,k,$)}k[--$]=M,k[--$]=I-y,k[--$]=D-y,k[--$]=E}else V==-3?h=E:V==-4&&(c=E);return $}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let w=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new U(a[n.topID],S.reverse(),x.reverse(),w)}const $a=new WeakMap;function Sr(n,e){if(!n.isAnonymous||e instanceof Wt||e.type!=n)return 1;let t=$a.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof U)){t=1;break}t+=Sr(n,i)}$a.set(e,t)}return t}function vl(n,e,t,i,r,s,o,l,a){let h=0;for(let O=i;O<r;O++)h+=Sr(n,e[O]);let c=Math.ceil(h*1.5/8),f=[],u=[];function d(O,g,p,b,S){for(let x=p;x<b;){let w=x,y=g[x],k=Sr(n,O[x]);for(x++;x<b;x++){let $=Sr(n,O[x]);if(k+$>=c)break;k+=$}if(x==w+1){if(k>c){let $=O[w];d($.children,$.positions,0,$.children.length,g[w]+S);continue}f.push(O[w])}else{let $=g[x-1]+O[x-1].length-y;f.push(vl(n,O,g,w,x,y,$,null,a))}u.push(y+S-s)}}return d(e,t,i,r,0),(l||a)(f,u,o)}class yf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ot?this.setBuffer(e.context.buffer,e.index,t):e instanceof be&&this.map.set(e.tree,t)}get(e){return e instanceof ot?this.getBuffer(e.context.buffer,e.index):e instanceof be?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)}}class yt{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new yt(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let u=o;if(a>=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new yt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&r.push(u),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Cl{startParse(e,t,i){return typeof e=="string"&&(e=new Jp(e)),i=i?i.length?i.map(r=>new We(r.from,r.to)):[new We(0,0)]:[new We(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class Jp{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)}}function xf(n){return(e,t,i,r)=>new tm(e,n,t,i,r)}class va{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function Ca(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class em{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const po=new L({perNode:!0});class tm{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new U(i.type,i.children,i.positions,i.length,i.propValues.concat([[po,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[L.mounted.id]=new dn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new rm(this.fragments),t=null,i=null,r=new Mr(new be(this.baseTree,this.ranges[0].from,0,null),K.IncludeAnonymous|K.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=r.from&&u<=r.to&&!t.ranges.some(d=>d.from<u&&d.to>f)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=im(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||nm(r);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new em(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=Xa(this.ranges,s.overlay||(r.from<r.to?[new We(r.from,r.to)]:[]));c.length&&Ca(c),(c.length||!s.overlay)&&this.inner.push(new va(s.parser,c.length?s.parser.startParse(this.input,Ra(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new We(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new We(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Xa(this.ranges,t.ranges);h.length&&(Ca(h),this.inner.splice(t.index,0,new va(t.parser,t.parser.startParse(this.input,Ra(t.mounts,h),h),t.ranges.map(c=>new We(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function im(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Za(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function nm(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,u,d,O,g){let p=t[g],b=[],S=[];Za(o,c,p,b,S,d);let x=l[p+1],w=l[p+2];a.push(b.length);let y=g?h(p+4,l[p+3],o.set.types[l[p]],x,w-x,g-1):e.toTree();return b.push(y),S.push(x-d),Za(o,l[p+3],f,b,S,d),new U(u,b,S,O)}r.children[s]=h(0,l.length,ae.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],u=n.tree.positions[c];n.yield(new be(f,u+n.from,c,n._tree))}}class Ta{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(K.IncludeAnonymous|K.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,K.IgnoreOverlays|K.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof U)t=t.children[0];else break}return!1}}let rm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(po))!==null&&t!==void 0?t:i.to,this.inner=new Ta(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(po))!==null&&e!==void 0?e:t.to,this.inner=new Ta(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(L.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function Xa(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new We(a.from,o),a.to>l&&t.splice(s+1,0,new We(l,a.to))):a.to>l?t[s--]=new We(l,a.to):t.splice(s--,1))}}return i}function sm(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);u<d&&h.push(new We(u,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Ra(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(u=>new We(u.from+i,u.to+i)),f=sm(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,g=O?h:f[u].from;if(g>d&&t.push(new yt(d,g,r.tree,-o,s.from>=d||s.openStart,s.to<=g||s.openEnd)),O)break;d=f[u].to}}else t.push(new yt(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let mo=[],kf=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?kf:mo).push(t=t+n[e])})();function om(n){if(n<768)return!1;for(let e=0,t=mo.length;;){let i=e+t>>1;if(n<mo[i])t=i;else if(n>=kf[i])e=i+1;else return!0;if(e==t)return!1}}function Aa(n){return n>=127462&&n<=127487}const Ma=8205;function lm(n,e,t=!0,i=!0){return(t?wf:am)(n,e,i)}function wf(n,e,t){if(e==n.length)return e;e&&Pf(n.charCodeAt(e))&&$f(n.charCodeAt(e-1))&&e--;let i=Cs(n,e);for(e+=La(i);e<n.length;){let r=Cs(n,e);if(i==Ma||r==Ma||t&&om(r))e+=La(r),i=r;else if(Aa(r)){let s=0,o=e-2;for(;o>=0&&Aa(Cs(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function am(n,e,t){for(;e>0;){let i=wf(n,e-2,t);if(i<e)return i;e--}return 0}function Cs(n,e){let t=n.charCodeAt(e);if(!$f(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Pf(i)?(t-55296<<10)+(i-56320)+65536:t}function Pf(n){return n>=56320&&n<57344}function $f(n){return n>=55296&&n<56320}function La(n){return n<65536?1:2}class Y{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=$i(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),nt.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$i(this,e,t);let i=[];return this.decompose(e,t,i,0),nt.from(i,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),i=this.length-this.scanIdentical(e,-1),r=new sn(this),s=new sn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new sn(this,e)}iterRange(e,t=this.length){return new vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Cf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y.empty:e.length<=32?new ne(e):nt.from(ne.split(e,[]))}}class ne extends Y{constructor(e,t=hm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new cm(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ne(qa(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=Qr(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new ne(l,o.length+s.length));else{let a=l.length>>1;i.push(new ne(l.slice(0,a)),new ne(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ne))return super.replace(e,t,i);[e,t]=$i(this,e,t);let r=Qr(this.text,Qr(i.text,qa(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ne(r,s):nt.from(ne.split(r,[]),s)}sliceString(e,t=this.length,i=`
2
2
  `){[e,t]=$i(this,e,t);let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=i),e<a&&t>s&&(r+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new ne(i,r)),i=[],r=-1);return r>-1&&t.push(new ne(i,r)),t}}class nt extends Y{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,r);r=l+1,i=a+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let h=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=$i(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[r]=a,new nt(c,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
3
3
  `){[e,t]=$i(this,e,t);let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=i),e<a&&t>o&&(r+=l.sliceString(e-o,t-o,i)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof nt))return 0;let i=0,[r,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==l)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new ne(d,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>s&&d instanceof nt)for(let g of d.children)f(g);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof ne&&a&&(O=c[c.length-1])instanceof ne&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new ne(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>r&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:nt.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new nt(l,t)}}Y.empty=new ne([""],0);function hm(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Qr(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let l=n[s],a=r+l.length;a>=t&&(a>i&&(l=l.slice(0,i-r)),r<t&&(l=l.slice(t-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function qa(n,e,t){return Qr(n,[""],e,t)}class sn{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 ne?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof ne?r.text.length:r.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
4
4
  `,this;e--}else if(r instanceof ne){let a=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ne?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class vf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new sn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}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 i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Cf{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Y.prototype[Symbol.iterator]=function(){return this.iter()},sn.prototype[Symbol.iterator]=vf.prototype[Symbol.iterator]=Cf.prototype[Symbol.iterator]=function(){return this});let cm=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function $i(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function pe(n,e,t=!0,i=!0){return lm(n,e,t,i)}function fm(n){return n>=56320&&n<57344}function um(n){return n>=55296&&n<56320}function ve(n,e){let t=n.charCodeAt(e);if(!um(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return fm(i)?(t-55296<<10)+(i-56320)+65536:t}function Zl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function rt(n){return n<65536?1:2}const go=/\r\n?|\n/;var Oe=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Oe||(Oe={}));class ht{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 i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){bo(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new ht(e)}composeDesc(e){return this.empty?e:e.empty?this:Zf(this,e)}mapDesc(e,t=!1){return e.empty?this:So(this,e,t)}mapPos(e,t=-1,i=Oe.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=r+l;if(a<0){if(h>e)return s+(e-r);s+=l}else{if(i!=Oe.Simple&&h>=e&&(i==Oe.TrackDel&&r<e&&h>e||i==Oe.TrackBefore&&r<e||i==Oe.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=t&&l>=e)return r<e&&l>t?"cover":!0;r=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ht(e)}static create(e){return new ht(e)}}class le extends ht{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return bo(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return So(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],l=t[r+1];if(l>=0){t[r]=l,t[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(Y.empty);i.push(o?e.slice(s,s+o):Y.empty)}s+=o}return new le(t,i)}compose(e){return this.empty?e:e.empty?this:Zf(this,e,!0)}map(e,t=!1){return e.empty?this:So(this,e,t,!0)}iterChanges(e,t=!1){bo(this,e,t)}get desc(){return ht.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new pn(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,a-l);me(r,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;me(t,c,f),f>0&&qt(i,t,s.text),s.forward(c),l+=c}let h=e[o++];for(;l<h;){if(s.done)break e;let c=Math.min(s.len,h-l);me(t,c,-1),me(r,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),l+=c}}return{changes:new le(t,i),filtered:ht.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,l=null;function a(c=!1){if(!c&&!r.length)return;o<t&&me(r,t-o,-1);let f=new le(r,s);l=l?l.compose(f.map(l)):f,r=[],s=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof le){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?Y.of(d.split(i||go)):d:Y.empty,g=O.length;if(f==u&&g==0)return;f<o&&a(),f>o&&me(r,f-o,-1),me(r,u-f,g),qt(s,r,O),o=u}}return h(e),a(!l),l}static empty(e){return new le(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(Y.empty);i[r]=Y.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new le(t,i)}static createSet(e,t){return new le(e,t)}}function me(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function qt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(Y.empty);n.push(t)}}function bo(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)r+=l,s+=l;else{let h=r,c=s,f=Y.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(r,h,s,c,f),r=h,s=c}}}function So(n,e,t,i=!1){let r=[],s=i?[]:null,o=new pn(n),l=new pn(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);me(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(me(r,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(me(r,0,o.ins),s&&qt(s,r,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;me(r,h,a<o.i?o.ins:0),s&&a<o.i&&qt(s,r,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return s?le.createSet(r,s):ht.create(r);throw new Error("Mismatched change set lengths")}}}function Zf(n,e,t=!1){let i=[],r=t?[]:null,s=new pn(n),o=new pn(e);for(let l=!1;;){if(s.done&&o.done)return r?le.createSet(i,r):ht.create(i);if(s.ins==0)me(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)me(i,0,o.ins,l),r&&qt(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;me(i,a,c,l),r&&c&&qt(r,i,o.text)}else o.ins==-1?(me(i,s.off?0:s.len,a,l),r&&qt(r,i,s.textBit(a))):(me(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&qt(r,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}}}class pn{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?Y.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?Y.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Kt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Kt(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Q.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Q.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!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 new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,t,i){return new Kt(e,t,i)}}class Q{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Q.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Q([this.main],0)}addRange(e,t=!0){return Q.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,Q.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(t=>Kt.fromJSON(t)),e.main)}static single(e,t=e){return new Q([Q.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return Q.normalized(e.slice(),t);i=s.to}return new Q(e,t)}static cursor(e,t=0,i,r){return Kt.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,t,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?Kt.create(t,e,48|s):Kt.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?Q.range(a,l):Q.range(l,a))}}return new Q(e,t)}}function Tf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Tl=0;class Z{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Tl++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Z(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Xl),!!e.static,e.enables)}of(e){return new yr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new yr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new yr(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Xl(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class yr{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Tl++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Qo(f,c)){let d=i(f);if(l?!Ea(d,f.values[o],r):!r(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[s];if(O!=null){let g=qr(u,O);if(this.dependencies.every(p=>p instanceof Z?u.facet(p)===f.facet(p):p instanceof ce?u.field(p,!1)==f.field(p,!1):!0)||(l?Ea(d=i(f),g,r):r(d=i(f),g)))return f.values[o]=g,0}else d=i(f);return f.values[o]=d,1}}}}function Ea(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Qo(n,e){let t=!1;for(let i of e)on(n,i)&1&&(t=!0);return t}function dm(n,e,t){let i=t.map(a=>n[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=qr(a,i[c]);if(r[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)on(a,h);return a.values[o]=l(a),1},update(a,h){if(!Qo(a,s))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=Qo(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&Xl(t,f))return a.values[o]=u,0;let d=l(a);return e.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const Va=Z.define({static:!0});class ce{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new ce(Tl++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Va).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Va.of({field:this,create:e})]}get extension(){return this}}const Gt={lowest:4,low:3,default:2,high:1,highest:0};function ji(n){return e=>new Xf(e,n)}const Zt={highest:ji(Gt.highest),high:ji(Gt.high),default:ji(Gt.default),low:ji(Gt.low),lowest:ji(Gt.lowest)};class Xf{constructor(e,t){this.inner=e,this.prec=t}}class us{of(e){return new yo(this,e)}reconfigure(e){return us.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class yo{constructor(e,t){this.compartment=e,this.inner=t}}class Lr{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let u of Om(e,t,o))u instanceof ce?r.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of r)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in s){let d=s[u],O=d[0].facet,g=c&&c[u]||[];if(d.every(p=>p.type==0))if(l[O.id]=a.length<<1|1,Xl(g,d))a.push(i.facet(O));else{let p=O.combine(d.map(b=>b.value));a.push(i&&O.compare(p,i.facet(O))?i.facet(O):p)}else{for(let p of d)p.type==0?(l[p.id]=a.length<<1|1,a.push(p.value)):(l[p.id]=h.length<<1,h.push(b=>p.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(p=>dm(p,O,d))}}let f=h.map(u=>u(l));return new Lr(e,o,f,l,a,s)}}function Om(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let a=r.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof yo&&t.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof yo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof Xf)s(o.inner,o.prec);else if(o instanceof ce)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof yr)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,Gt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,Gt.default),i.reduce((o,l)=>o.concat(l))}function on(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function qr(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Rf=Z.define(),xo=Z.define({combine:n=>n.some(e=>e),static:!0}),Af=Z.define({combine:n=>n.length?n[0]:void 0,static:!0}),Mf=Z.define(),Lf=Z.define(),qf=Z.define(),Ef=Z.define({combine:n=>n.length?n[0]:!1});class Tt{constructor(e,t){this.type=e,this.value=t}static define(){return new pm}}class pm{of(e){return new Tt(this,e)}}class mm{constructor(e){this.map=e}of(e){return new q(this,e)}}class q{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new q(this.type,t)}is(e){return this.type==e}static define(e={}){return new mm(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}q.reconfigure=q.define();q.appendConfig=q.define();class oe{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Tf(i,t.newLength),s.some(l=>l.type==oe.time)||(this.annotations=s.concat(oe.time.of(Date.now())))}static create(e,t,i,r,s,o){return new oe(e,t,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let 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(e){let t=this.annotation(oe.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}oe.time=Tt.define();oe.userEvent=Tt.define();oe.addToHistory=Tt.define();oe.remote=Tt.define();function gm(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Vf(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=le.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:q.mapEffects(n.effects,r).concat(q.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function ko(n,e,t){let i=e.selection,r=Si(e.annotations);return e.userEvent&&(r=r.concat(oe.userEvent.of(e.userEvent))),{changes:e.changes instanceof le?e.changes:le.of(e.changes||[],t,n.facet(Af)),selection:i&&(i instanceof Q?i:Q.single(i.anchor,i.head)),effects:Si(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function Df(n,e,t){let i=ko(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=Vf(i,ko(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=oe.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Sm(t?bm(r):r)}function bm(n){let e=n.startState,t=!0;for(let r of e.facet(Mf)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:gm(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=le.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=oe.create(e,r,n.selection&&n.selection.map(s),q.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(Lf);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof oe?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof oe?n=s[0]:n=Df(e,Si(s),!1)}return n}function Sm(n){let e=n.startState,t=e.facet(qf),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Vf(i,ko(e,s,n.changes.newLength),!0))}return i==n?n:oe.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Qm=[];function Si(n){return n==null?Qm:Array.isArray(n)?n:[n]}var ie=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ie||(ie={}));const ym=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wo;try{wo=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function xm(n){if(wo)return wo.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||ym.test(t)))return!0}return!1}function km(n){return e=>{if(!/\S/.test(e))return ie.Space;if(xm(e))return ie.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ie.Word;return ie.Other}}class W{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)on(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return on(this,i),qr(this,i)}update(...e){return Df(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let l of e.effects)l.is(us.reconfigure)?(t&&(r=new Map,t.compartments.forEach((a,h)=>r.set(h,a)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(q.reconfigure)?(t=null,i=l.value):l.is(q.appendConfig)&&(t=null,i=Si(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=Lr.resolve(i,r,this),s=new W(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(xo)?e.newSelection:e.newSelection.asSingle();new W(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Q.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Si(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(r);for(let u=0;u<l;u++)s[u]=s[u].map(c);let f=r.mapDesc(h,!0);s.push(a.range.map(f)),r=r.compose(c),o=q.mapEffects(o,c).concat(q.mapEffects(Si(a.effects),f))}return{changes:r,selection:Q.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof le?e:le.of(e,this.doc.length,this.facet(W.lineSeparator))}toText(e){return Y.of(e.split(this.facet(W.lineSeparator)||go))}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:(on(this,t),qr(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof ce&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(a=>o.spec.fromJSON(l,a)))}}return W.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Lr.resolve(e.extensions||[],new Map),i=e.doc instanceof Y?e.doc:Y.of((e.doc||"").split(t.staticFacet(W.lineSeparator)||go)),r=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return Tf(r,i.length),t.staticFacet(xo)||(r=r.asSingle()),new W(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(W.tabSize)}get lineBreak(){return this.facet(W.lineSeparator)||`
@@ -1 +1 @@
1
- import{S as tt,i as et,s as nt,I as R,m as lt,a as st,b as at,e as c,t as W,c as _,d as L,f as b,g as T,h as e,j as y,l as A,k as ot,n as E,o as it,p as k,q as rt,r as U,u as I,v as Z,w as ut,x as X,y as ct,z as ft,A as pt,B as dt,C as O,D as v,E as mt}from"./index-D6QIwXwq.js";function Y(i){let t,r,g,a,h,u,n,f,p,$,d,C;return r=new R({props:{path:pt,class:"w-4 h-4"}}),n=new R({props:{path:dt,class:"w-4 h-4"}}),{c(){t=c("button"),L(r.$$.fragment),g=_(),a=c("span"),a.textContent="Rename",h=_(),u=c("button"),L(n.$$.fragment),f=_(),p=c("span"),p.textContent="Delete this Folder",b(t,"data-button",""),b(u,"data-button","")},m(l,m){T(l,t,m),y(r,t,null),e(t,g),e(t,a),T(l,h,m),T(l,u,m),y(n,u,null),e(u,f),e(u,p),$=!0,d||(C=[A(t,"click",i[5]),A(u,"click",i[6])],d=!0)},i(l){$||(E(r.$$.fragment,l),E(n.$$.fragment,l),$=!0)},o(l){k(r.$$.fragment,l),k(n.$$.fragment,l),$=!1},d(l){l&&(U(t),U(h),U(u)),I(r),I(n),d=!1,Z(C)}}}function _t(i){var G,H,J;let t,r,g,a=((G=i[1])!=null&&G.fullpath?(H=i[1])==null?void 0:H.fullpath:"/")+"",h,u,n,f,p,$,d,C,l,m,S,q,j,F,w,z,x,B,D,M,N;p=new R({props:{path:lt,class:"w4 h-4"}}),m=new R({props:{path:st,class:"w4 h-4"}}),w=new R({props:{path:at,class:"w4 h-4"}});let s=((J=i[1])==null?void 0:J.fullpath)&&Y(i);return{c(){t=c("div"),r=c("h2"),g=W("Actions for the directory "),h=W(a),u=_(),n=c("div"),f=c("button"),L(p.$$.fragment),$=_(),d=c("span"),d.textContent="Create a new Folder",C=_(),l=c("button"),L(m.$$.fragment),S=_(),q=c("span"),q.textContent="Create a new File",j=_(),F=c("button"),L(w.$$.fragment),z=_(),x=c("span"),x.textContent="Upload Files",B=_(),s&&s.c(),b(r,"class","sr-only"),b(f,"data-button",""),b(l,"data-button",""),b(F,"data-button",""),b(n,"class","flex flex-col w-60 space-y-2"),b(t,"class","flex-1 px-2 py-2"),b(t,"tabindex","-1")},m(o,P){T(o,t,P),e(t,r),e(r,g),e(r,h),e(t,u),e(t,n),e(n,f),y(p,f,null),e(f,$),e(f,d),e(n,C),e(n,l),y(m,l,null),e(l,S),e(l,q),e(n,j),e(n,F),y(w,F,null),e(F,z),e(F,x),e(n,B),s&&s.m(n,null),i[7](t),D=!0,M||(N=[A(f,"click",i[2]),A(l,"click",i[3]),A(F,"click",i[4])],M=!0)},p(o,[P]){var K,Q,V;(!D||P&2)&&a!==(a=((K=o[1])!=null&&K.fullpath?(Q=o[1])==null?void 0:Q.fullpath:"/")+"")&&ot(h,a),(V=o[1])!=null&&V.fullpath?s?P&2&&E(s,1):(s=Y(o),s.c(),E(s,1),s.m(n,null)):s&&(it(),k(s,1,1,()=>{s=null}),rt())},i(o){D||(E(p.$$.fragment,o),E(m.$$.fragment,o),E(w.$$.fragment,o),E(s),D=!0)},o(o){k(p.$$.fragment,o),k(m.$$.fragment,o),k(w.$$.fragment,o),k(s),D=!1},d(o){o&&U(t),I(p),I(m),I(w),s&&s.d(),i[7](null),M=!1,Z(N)}}}function ht(i,t,r){let g;ut(i,X,d=>r(1,g=d));let a=null;ct(()=>{a&&a.focus()}),ft(X.subscribe(()=>{a&&a.focus()}));const h=()=>{O.set(v.FOLDER_CREATE)},u=()=>{O.set(v.FILE_CREATE)},n=()=>{O.set(v.FILE_UPLOAD)},f=()=>{O.set(v.FOLDER_RENAME)},p=()=>{O.set(v.FOLDER_DELETE)};function $(d){mt[d?"unshift":"push"](()=>{a=d,r(0,a)})}return[a,g,h,u,n,f,p,$]}class bt extends tt{constructor(t){super(),et(this,t,ht,_t,nt,{})}}export{bt as default};
1
+ import{S as tt,i as et,s as nt,I as R,m as lt,a as st,b as at,e as c,t as W,c as _,d as L,f as b,g as T,h as e,j as y,l as A,k as ot,n as E,o as it,p as k,q as rt,r as U,u as I,v as Z,w as ut,x as X,y as ct,z as ft,A as pt,B as dt,C as O,D as v,E as mt}from"./index-DAdhbT7C.js";function Y(i){let t,r,g,a,h,u,n,f,p,$,d,C;return r=new R({props:{path:pt,class:"w-4 h-4"}}),n=new R({props:{path:dt,class:"w-4 h-4"}}),{c(){t=c("button"),L(r.$$.fragment),g=_(),a=c("span"),a.textContent="Rename",h=_(),u=c("button"),L(n.$$.fragment),f=_(),p=c("span"),p.textContent="Delete this Folder",b(t,"data-button",""),b(u,"data-button","")},m(l,m){T(l,t,m),y(r,t,null),e(t,g),e(t,a),T(l,h,m),T(l,u,m),y(n,u,null),e(u,f),e(u,p),$=!0,d||(C=[A(t,"click",i[5]),A(u,"click",i[6])],d=!0)},i(l){$||(E(r.$$.fragment,l),E(n.$$.fragment,l),$=!0)},o(l){k(r.$$.fragment,l),k(n.$$.fragment,l),$=!1},d(l){l&&(U(t),U(h),U(u)),I(r),I(n),d=!1,Z(C)}}}function _t(i){var G,H,J;let t,r,g,a=((G=i[1])!=null&&G.fullpath?(H=i[1])==null?void 0:H.fullpath:"/")+"",h,u,n,f,p,$,d,C,l,m,S,q,j,F,w,z,x,B,D,M,N;p=new R({props:{path:lt,class:"w4 h-4"}}),m=new R({props:{path:st,class:"w4 h-4"}}),w=new R({props:{path:at,class:"w4 h-4"}});let s=((J=i[1])==null?void 0:J.fullpath)&&Y(i);return{c(){t=c("div"),r=c("h2"),g=W("Actions for the directory "),h=W(a),u=_(),n=c("div"),f=c("button"),L(p.$$.fragment),$=_(),d=c("span"),d.textContent="Create a new Folder",C=_(),l=c("button"),L(m.$$.fragment),S=_(),q=c("span"),q.textContent="Create a new File",j=_(),F=c("button"),L(w.$$.fragment),z=_(),x=c("span"),x.textContent="Upload Files",B=_(),s&&s.c(),b(r,"class","sr-only"),b(f,"data-button",""),b(l,"data-button",""),b(F,"data-button",""),b(n,"class","flex flex-col w-60 space-y-2"),b(t,"class","flex-1 px-2 py-2"),b(t,"tabindex","-1")},m(o,P){T(o,t,P),e(t,r),e(r,g),e(r,h),e(t,u),e(t,n),e(n,f),y(p,f,null),e(f,$),e(f,d),e(n,C),e(n,l),y(m,l,null),e(l,S),e(l,q),e(n,j),e(n,F),y(w,F,null),e(F,z),e(F,x),e(n,B),s&&s.m(n,null),i[7](t),D=!0,M||(N=[A(f,"click",i[2]),A(l,"click",i[3]),A(F,"click",i[4])],M=!0)},p(o,[P]){var K,Q,V;(!D||P&2)&&a!==(a=((K=o[1])!=null&&K.fullpath?(Q=o[1])==null?void 0:Q.fullpath:"/")+"")&&ot(h,a),(V=o[1])!=null&&V.fullpath?s?P&2&&E(s,1):(s=Y(o),s.c(),E(s,1),s.m(n,null)):s&&(it(),k(s,1,1,()=>{s=null}),rt())},i(o){D||(E(p.$$.fragment,o),E(m.$$.fragment,o),E(w.$$.fragment,o),E(s),D=!0)},o(o){k(p.$$.fragment,o),k(m.$$.fragment,o),k(w.$$.fragment,o),k(s),D=!1},d(o){o&&U(t),I(p),I(m),I(w),s&&s.d(),i[7](null),M=!1,Z(N)}}}function ht(i,t,r){let g;ut(i,X,d=>r(1,g=d));let a=null;ct(()=>{a&&a.focus()}),ft(X.subscribe(()=>{a&&a.focus()}));const h=()=>{O.set(v.FOLDER_CREATE)},u=()=>{O.set(v.FILE_CREATE)},n=()=>{O.set(v.FILE_UPLOAD)},f=()=>{O.set(v.FOLDER_RENAME)},p=()=>{O.set(v.FOLDER_DELETE)};function $(d){mt[d?"unshift":"push"](()=>{a=d,r(0,a)})}return[a,g,h,u,n,f,p,$]}class bt extends tt{constructor(t){super(),et(this,t,ht,_t,nt,{})}}export{bt as default};
@@ -1 +1 @@
1
- import{S as _,i as h,s as b,e as p,f as a,g as m,G as c,r as d,w as u,x as g,L as v,bn as f}from"./index-D6QIwXwq.js";function o(n){let r,e;return{c(){r=p("img"),f(r.src,e="/api/branches/"+n[0].id+"/files/"+n[1].fullpath)||a(r,"src",e),a(r,"alt","")},m(s,l){m(s,r,l)},p(s,l){l&3&&!f(r.src,e="/api/branches/"+s[0].id+"/files/"+s[1].fullpath)&&a(r,"src",e)},d(s){s&&d(r)}}}function B(n){let r,e=n[0]!==null&&n[1]&&o(n);return{c(){r=p("div"),e&&e.c(),a(r,"class","overflow-auto")},m(s,l){m(s,r,l),e&&e.m(r,null)},p(s,[l]){s[0]!==null&&s[1]?e?e.p(s,l):(e=o(s),e.c(),e.m(r,null)):e&&(e.d(1),e=null)},i:c,o:c,d(s){s&&d(r),e&&e.d()}}}function k(n,r,e){let s,l;u(n,g,i=>e(1,l=i));const t=v();return u(n,t,i=>e(0,s=i)),[s,l,t]}class w extends _{constructor(r){super(),h(this,r,k,B,b,{})}}export{w as default};
1
+ import{S as _,i as h,s as b,e as p,f as a,g as m,G as c,r as d,w as u,x as g,L as v,bn as f}from"./index-DAdhbT7C.js";function o(n){let r,e;return{c(){r=p("img"),f(r.src,e="/api/branches/"+n[0].id+"/files/"+n[1].fullpath)||a(r,"src",e),a(r,"alt","")},m(s,l){m(s,r,l)},p(s,l){l&3&&!f(r.src,e="/api/branches/"+s[0].id+"/files/"+s[1].fullpath)&&a(r,"src",e)},d(s){s&&d(r)}}}function B(n){let r,e=n[0]!==null&&n[1]&&o(n);return{c(){r=p("div"),e&&e.c(),a(r,"class","overflow-auto")},m(s,l){m(s,r,l),e&&e.m(r,null)},p(s,[l]){s[0]!==null&&s[1]?e?e.p(s,l):(e=o(s),e.c(),e.m(r,null)):e&&(e.d(1),e=null)},i:c,o:c,d(s){s&&d(r),e&&e.d()}}}function k(n,r,e){let s,l;u(n,g,i=>e(1,l=i));const t=v();return u(n,t,i=>e(0,s=i)),[s,l,t]}class w extends _{constructor(r){super(),h(this,r,k,B,b,{})}}export{w as default};
@@ -1,4 +1,4 @@
1
- import{R as He,T as tu,U as ea,V as nu,W as Je,X as ot,Y as Ds,Z as Ft,_ as vi,$ as _t,a0 as Di,a1 as Sr,a2 as ts,a3 as ru,a4 as iu,a5 as su,a6 as wn,a7 as ou,a8 as lu,a9 as Cr,aa as un,ab as G,ac as xs,ad as oi,ae as mr,af as au,ag as Is,ah as cu,ai as uu,aj as ta,ak as na,al as ra,am as Ps,an as Nn,ao as fu,ap as du,aq as hu,ar as pu,as as mu,at as gu,au as bu,av as In,aw as yu,ax as ku,ay as _u,az as xi,aA as gr,aB as Su,aC as Cu,aD as Rs,aE as Mu,aF as ns,aG as rs,aH as zr,aI as is,aJ as Ut,aK as wu,S as je,i as We,s as Ne,aL as me,aM as ge,aN as be,aO as ye,n as k,p as C,w as ce,F as de,g as v,o as ne,q as re,r as D,aP as De,aQ as Fr,aR as ie,aS as Dt,aT as pt,E as Pe,e as R,aU as se,aV as qe,l as ee,aW as Fe,v as ut,aX as ia,aY as ss,aZ as sa,a_ as Bs,G as te,t as he,k as xe,a$ as Tu,b0 as fe,b1 as rt,c as J,f as q,h as I,d as F,j as V,u as L,I as Me,b2 as Eu,b3 as Vr,H as ls,b4 as Ou,b5 as Cn,b6 as Qe,b7 as as,b8 as cs,b9 as us,ba as Nu,bb as zs,y as Au,bc as vt,bd as Mr,be as wr,bf as vu,O as Ii,bg as Du,P as Pi,bh as xu,bi as Iu,bj as Pu,bk as Ru,bl as Bu,bm as zu,J as ir,x as Fs,L as Fu,N as rn,M as Vs,z as Vu,Q as Lu}from"./index-D6QIwXwq.js";import{k as ju,b as Wu}from"./index-Vcq4gwWv.js";function li(r){return Array.from(r.querySelectorAll('[role="option"]:not([data-disabled])')).filter(e=>He(e))}function qu(r){return window.getComputedStyle(r).getPropertyValue("direction")}function Ju(r){return e=>{const t=e.target,n=tu(r);if(!n||!ea(t))return!1;const i=n.id;return!!(nu(t)&&i===t.htmlFor||t.closest(`label[for="${i}"]`))}}function $u(){return{elements:{root:Je("label",{action:e=>({destroy:ot(e,"mousedown",n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})})})}}}const Ku=[G.ARROW_LEFT,G.ESCAPE,G.ARROW_RIGHT,G.SHIFT,G.CAPS_LOCK,G.CONTROL,G.ALT,G.META,G.ENTER,G.F1,G.F2,G.F3,G.F4,G.F5,G.F6,G.F7,G.F8,G.F9,G.F10,G.F11,G.F12],Uu={positioning:{placement:"bottom",sameWidth:!0},scrollAlignment:"nearest",loop:!0,defaultOpen:!1,closeOnOutsideClick:!0,preventScroll:!0,closeOnEscape:!0,forceVisible:!1,portal:void 0,builder:"listbox",disabled:!1,required:!1,name:void 0,typeahead:!0,highlightOnHover:!0,onOutsideClick:void 0},Hu=["trigger","menu","label"];function Gu(r){const e={...Uu,...r},t=Ds(Ft(null)),n=Ds(Ft(null)),i=e.selected??Ft(e.defaultSelected),s=vi(i,e==null?void 0:e.onSelectedChange),o=_t(n,x=>x?Y(x):void 0),a=e.open??Ft(e.defaultOpen),l=vi(a,e==null?void 0:e.onOpenChange),c=Di({...Sr(e,"open","defaultOpen","builder","ids"),multiple:e.multiple??!1}),{scrollAlignment:u,loop:f,closeOnOutsideClick:d,closeOnEscape:h,preventScroll:p,portal:m,forceVisible:g,positioning:b,multiple:y,arrowSize:M,disabled:T,required:_,typeahead:E,name:W,highlightOnHover:w,onOutsideClick:O}=c,{name:S,selector:A}=ts(e.builder),K=Di({...ru(Hu),...e.ids}),{handleTypeaheadSearch:H}=iu({onMatch:x=>{n.set(x),x.scrollIntoView({block:u.get()})},getCurrentItem(){return n.get()}});function Y(x){const $=x.getAttribute("data-value"),le=x.getAttribute("data-label"),Ue=x.hasAttribute("data-disabled");return{value:$&&JSON.parse($),label:le??x.textContent??void 0,disabled:!!Ue}}const oe=x=>{s.update($=>{if(y.get()){const Ue=Array.isArray($)?[...$]:[];return Su(x,Ue,(nn,ue)=>wn(nn.value,ue.value))}return x})};function P(x){const $=Y(x);oe($)}async function tn(){l.set(!0);const x=document.getElementById(K.trigger.get());if(!x)return;x!==t.get()&&t.set(x),await oi();const $=document.getElementById(K.menu.get());if(!He($))return;const le=$.querySelector("[aria-selected=true]");He(le)&&n.set(le)}function Ke(){l.set(!1),n.set(null)}const er=su({open:l,forceVisible:g,activeTrigger:t}),tr=_t([s],([x])=>$=>Array.isArray(x)?x.some(le=>wn(le.value,$)):ou($)?wn(x==null?void 0:x.value,lu($,void 0)):wn(x==null?void 0:x.value,$)),ei=_t([o],([x])=>$=>wn(x==null?void 0:x.value,$)),ti=Je(S("trigger"),{stores:[l,n,T,K.menu,K.trigger,K.label],returned:([x,$,le,Ue,nn,ue])=>({"aria-activedescendant":$==null?void 0:$.id,"aria-autocomplete":"list","aria-controls":Ue,"aria-expanded":x,"aria-labelledby":ue,id:nn,role:"combobox",disabled:Cr(le),type:e.builder==="select"?"button":void 0}),action:x=>{const $=xi(x),le=un(ot(x,"click",()=>{x.focus(),l.get()?Ke():tn()}),ot(x,"keydown",ue=>{if(!l.get()){if(Ku.includes(ue.key)||ue.key===G.TAB||ue.key===G.BACKSPACE&&$&&x.value===""||ue.key===G.SPACE&&xs(x))return;tn(),oi().then(()=>{if(s.get())return;const Pt=document.getElementById(K.menu.get());if(!He(Pt))return;const ke=Array.from(Pt.querySelectorAll(`${A("item")}:not([data-disabled]):not([data-hidden])`)).filter(bt=>He(bt));ke.length&&(ue.key===G.ARROW_DOWN?(n.set(ke[0]),ke[0].scrollIntoView({block:u.get()})):ue.key===G.ARROW_UP&&(n.set(mr(ke)),mr(ke).scrollIntoView({block:u.get()})))})}if(ue.key===G.TAB){Ke();return}if(ue.key===G.ENTER&&!ue.isComposing||ue.key===G.SPACE&&xs(x)){ue.preventDefault();const Ve=n.get();Ve&&P(Ve),y.get()||Ke()}if(ue.key===G.ARROW_UP&&ue.altKey&&Ke(),au.includes(ue.key)){ue.preventDefault();const Ve=document.getElementById(K.menu.get());if(!He(Ve))return;const Pt=li(Ve);if(!Pt.length)return;const ke=Pt.filter(vs=>!Is(vs)&&vs.dataset.hidden===void 0),bt=n.get(),Rt=bt?ke.indexOf(bt):-1,rr=f.get(),eu=u.get();let it;switch(ue.key){case G.ARROW_DOWN:it=na(ke,Rt,rr);break;case G.ARROW_UP:it=ta(ke,Rt,rr);break;case G.PAGE_DOWN:it=uu(ke,Rt,10,rr);break;case G.PAGE_UP:it=cu(ke,Rt,10,rr);break;case G.HOME:it=ke[0];break;case G.END:it=mr(ke);break;default:return}n.set(it),it==null||it.scrollIntoView({block:eu})}else if(E.get()){const Ve=document.getElementById(K.menu.get());if(!He(Ve))return;H(ue.key,li(Ve))}}));let Ue=gr;return Ue=ra(x,{handler:Ke,enabled:_t([l,h],([ue,nr])=>ue&&nr)}).destroy,{destroy(){le(),Ue()}}}}),ni=Je(S("menu"),{stores:[er,K.menu],returned:([x,$])=>({hidden:x?void 0:!0,id:$,role:"listbox",style:Ps({display:x?void 0:"none"})}),action:x=>{let $=gr;const le=un(Nn([er,m,d,b,t],([Ue,nn,ue,nr,Ve])=>{$(),!(!Ue||!Ve)&&oi().then(()=>{$();const Pt=Ju(K.trigger.get());$=fu(x,{anchorElement:Ve,open:l,options:{floating:nr,focusTrap:null,modal:{closeOnInteractOutside:ue,onClose:Ke,open:Ue,shouldCloseOnInteractOutside:ke=>{var Rt;if((Rt=O.get())==null||Rt(ke),ke.defaultPrevented)return!1;const bt=ke.target;return!(!ea(bt)||bt===Ve||Ve.contains(bt)||Pt(ke))}},escapeKeydown:null,portal:du(x,nn)}}).destroy})}));return{destroy:()=>{le(),$()}}}}),{elements:{root:ri}}=$u(),{action:ii}=hu(ri),si=Je(S("label"),{stores:[K.label,K.trigger],returned:([x,$])=>({id:x,for:$}),action:ii}),z=Je(S("option"),{stores:[tr],returned:([x])=>$=>{const le=x($.value);return{"data-value":JSON.stringify($.value),"data-label":$.label,"data-disabled":Cr($.disabled),"aria-disabled":$.disabled?!0:void 0,"aria-selected":le,"data-selected":le?"":void 0,id:pu(),role:"option"}},action:x=>({destroy:un(ot(x,"click",le=>{if(Is(x)){le.preventDefault();return}P(x),y.get()||Ke()}),Nn(w,le=>le?un(ot(x,"mouseover",()=>{n.set(x)}),ot(x,"mouseleave",()=>{n.set(null)})):void 0))})}),Yc=Je(S("group"),{returned:()=>x=>({role:"group","aria-labelledby":x})}),Xc=Je(S("group-label"),{returned:()=>x=>({id:x})}),Zc=mu({value:_t([s],([x])=>{const $=Array.isArray(x)?x.map(le=>le.value):x==null?void 0:x.value;return typeof $=="string"?$:JSON.stringify($)}),name:gu(W),required:_,prefix:e.builder}),Qc=Je(S("arrow"),{stores:M,returned:x=>({"data-arrow":!0,style:Ps({position:"absolute",width:`var(--arrow-size, ${x}px)`,height:`var(--arrow-size, ${x}px)`})})});return bu(()=>{if(!In)return;const x=document.getElementById(K.menu.get()),$=document.getElementById(K.trigger.get());if($&&t.set($),!x)return;const le=x.querySelector("[data-selected]");He(le)}),Nn([n],([x])=>{if(!In)return;const $=document.getElementById(K.menu.get());He($)&&li($).forEach(le=>{le===x?yu(le):ku(le)})}),Nn([l],([x])=>{if(!In)return;let $=gr;return p.get()&&x&&($=_u()),()=>{$()}}),{ids:K,elements:{trigger:ti,group:Yc,option:z,menu:ni,groupLabel:Xc,label:si,hiddenInput:Zc,arrow:Qc},states:{open:l,selected:s,highlighted:o,highlightedItem:n},helpers:{isSelected:tr,isHighlighted:ei,closeMenu:Ke},options:c}}const{name:Yu}=ts("combobox");function Xu(r){const e=Gu({...r,builder:"combobox",typeahead:!1}),t=Ft(""),n=Ft(!1),i=Je(Yu("input"),{stores:[e.elements.trigger,t],returned:([s,o])=>({...Sr(s,"action"),role:"combobox",value:o,autocomplete:"off"}),action:s=>{const o=un(ot(s,"input",u=>{!xi(u.target)&&!Rs(u.target)||n.set(!0)}),Cu(s,"input",u=>{xi(u.target)&&t.set(u.target.value),Rs(u.target)&&t.set(u.target.innerText)}));let a=gr;a=ra(s,{handler:()=>{e.helpers.closeMenu()}}).destroy;const{destroy:c}=e.elements.trigger(s);return{destroy(){c==null||c(),o(),a()}}}});return Nn(e.states.open,s=>{s||n.set(!1)}),{...e,elements:{...Sr(e.elements,"trigger"),input:i},states:{...e.states,touchedInput:n,inputValue:t}}}const Zu={orientation:"horizontal",activateOnFocus:!0,loop:!0,autoSet:!0},{name:sr,selector:Qu}=ts("tabs");function ef(r){const e={...Zu,...r},t=Di(Sr(e,"defaultValue","value","onValueChange","autoSet")),{orientation:n,activateOnFocus:i,loop:s}=t,o=e.value??Ft(e.defaultValue),a=vi(o,e==null?void 0:e.onValueChange);let l=e.defaultValue??a.get();const c=Je(sr(),{stores:n,returned:p=>({"data-orientation":p})}),u=Je(sr("list"),{stores:n,returned:p=>({role:"tablist","aria-orientation":p,"data-orientation":p})}),f=p=>typeof p=="string"?{value:p}:p,d=Je(sr("trigger"),{stores:[a,n],returned:([p,m])=>g=>{const{value:b,disabled:y}=f(g);!p&&!l&&e.autoSet&&(l=b,p=b,a.set(b));const T=(In?p:l)===b;return{type:"button",role:"tab","data-state":T?"active":"inactive",tabindex:T?0:-1,"data-value":b,"data-orientation":m,"data-disabled":Cr(y),disabled:Cr(y)}},action:p=>({destroy:un(ot(p,"focus",()=>{const g=p.dataset.disabled==="true",b=p.dataset.value;i.get()&&!g&&b!==void 0&&a.set(b)}),ot(p,"click",g=>{if(p.focus(),g.preventDefault(),p.dataset.disabled==="true")return;const y=p.dataset.value;p.focus(),y!==void 0&&a.set(y)}),ot(p,"keydown",g=>{const b=p.dataset.value;if(!b)return;const y=g.currentTarget;if(!He(y))return;const M=y.closest(Qu());if(!He(M))return;const T=s.get(),E=Array.from(M.querySelectorAll('[role="tab"]')).filter(A=>He(A)).filter(A=>!A.hasAttribute("data-disabled")),W=E.findIndex(A=>A===g.target),w=qu(M),{nextKey:O,prevKey:S}=Mu(w,n.get());g.key===O?(g.preventDefault(),na(E,W,T).focus()):g.key===S?(g.preventDefault(),ta(E,W,T).focus()):g.key===G.ENTER||g.key===G.SPACE?(g.preventDefault(),a.set(b)):g.key===G.HOME?(g.preventDefault(),E[0].focus()):g.key===G.END&&(g.preventDefault(),mr(E).focus())}))})}),h=Je(sr("content"),{stores:a,returned:p=>m=>({role:"tabpanel","aria-labelledby":m,hidden:In?p===m?void 0:!0:l===m?void 0:!0,tabindex:0})});return{elements:{root:c,list:u,trigger:d,content:h},states:{value:a},options:t}}function tf(r,e){return r.length!==e.length?!1:r.every((t,n)=>t===e[n])}function fs(){return{NAME:"combobox",GROUP_NAME:"combobox-group",ITEM_NAME:"combobox-item",PARTS:["content","menu","input","item","label","group","group-label","arrow","hidden-input","indicator"]}}function Lr(){const{NAME:r}=fs();return Ut(r)}function nf(r){const{NAME:e,PARTS:t}=fs(),n=ns(e,t),i={...Xu({...rs(r),forceVisible:!0}),getAttrs:n};return zr(e,i),{...i,updateOption:is(i.options)}}function rf(r){const{ITEM_NAME:e}=fs(),t=Lr();return zr(e,r),t}function sf(r){const t={...{side:"bottom",align:"center",sameWidth:!0},...r},{options:{positioning:n}}=Lr();wu(n)(t)}const of=r=>({ids:r&1}),Ls=r=>({ids:r[0]});function lf(r){let e;const t=r[24].default,n=me(t,r,r[23],Ls);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&8388609)&&ge(n,t,i,i[23],e?ye(t,i[23],s,of):be(i[23]),Ls)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function af(r,e,t){let n,i,s,{$$slots:o={},$$scope:a}=e,{required:l=void 0}=e,{disabled:c=void 0}=e,{preventScroll:u=void 0}=e,{loop:f=void 0}=e,{closeOnEscape:d=void 0}=e,{closeOnOutsideClick:h=void 0}=e,{portal:p=void 0}=e,{name:m=void 0}=e,{multiple:g=!1}=e,{selected:b=void 0}=e,{onSelectedChange:y=void 0}=e,{open:M=void 0}=e,{onOpenChange:T=void 0}=e,{items:_=[]}=e,{onOutsideClick:E=void 0}=e,{inputValue:W=""}=e,{touchedInput:w=!1}=e;const{states:{open:O,selected:S,inputValue:A,touchedInput:K},updateOption:H,ids:Y}=nf({required:l,disabled:c,preventScroll:u,loop:f,closeOnEscape:d,closeOnOutsideClick:h,portal:p,name:m,onOutsideClick:E,multiple:g,forceVisible:!0,defaultSelected:Array.isArray(b)?[...b]:b,defaultOpen:M,onSelectedChange:({next:P})=>Array.isArray(P)?((!Array.isArray(b)||!tf(b,P))&&(y==null||y(P),t(4,b=P)),P):(b!==P&&(y==null||y(P),t(4,b=P)),t(6,W=(P==null?void 0:P.label)??(typeof(P==null?void 0:P.value)=="string"?P==null?void 0:P.value:"")),A.set(W),P),onOpenChange:({next:P})=>(M!==P&&(T==null||T(P),t(5,M=P)),P),items:_});ce(r,A,P=>t(21,n=P)),ce(r,K,P=>t(22,i=P));const oe=_t([Y.menu,Y.trigger,Y.label],([P,tn,Ke])=>({menu:P,trigger:tn,label:Ke}));return ce(r,oe,P=>t(0,s=P)),r.$$set=P=>{"required"in P&&t(8,l=P.required),"disabled"in P&&t(9,c=P.disabled),"preventScroll"in P&&t(10,u=P.preventScroll),"loop"in P&&t(11,f=P.loop),"closeOnEscape"in P&&t(12,d=P.closeOnEscape),"closeOnOutsideClick"in P&&t(13,h=P.closeOnOutsideClick),"portal"in P&&t(14,p=P.portal),"name"in P&&t(15,m=P.name),"multiple"in P&&t(16,g=P.multiple),"selected"in P&&t(4,b=P.selected),"onSelectedChange"in P&&t(17,y=P.onSelectedChange),"open"in P&&t(5,M=P.open),"onOpenChange"in P&&t(18,T=P.onOpenChange),"items"in P&&t(19,_=P.items),"onOutsideClick"in P&&t(20,E=P.onOutsideClick),"inputValue"in P&&t(6,W=P.inputValue),"touchedInput"in P&&t(7,w=P.touchedInput),"$$scope"in P&&t(23,a=P.$$scope)},r.$$.update=()=>{r.$$.dirty&4194304&&t(7,w=i),r.$$.dirty&6291456&&i&&t(6,W=n),r.$$.dirty&64&&W!==void 0&&A.set(W),r.$$.dirty&32&&M!==void 0&&O.set(M),r.$$.dirty&16&&b!==void 0&&S.set(Array.isArray(b)?[...b]:b),r.$$.dirty&256&&H("required",l),r.$$.dirty&512&&H("disabled",c),r.$$.dirty&1024&&H("preventScroll",u),r.$$.dirty&2048&&H("loop",f),r.$$.dirty&4096&&H("closeOnEscape",d),r.$$.dirty&8192&&H("closeOnOutsideClick",h),r.$$.dirty&16384&&H("portal",p),r.$$.dirty&32768&&H("name",m),r.$$.dirty&65536&&H("multiple",g),r.$$.dirty&1048576&&H("onOutsideClick",E)},[s,A,K,oe,b,M,W,w,l,c,u,f,d,h,p,m,g,y,T,_,E,n,i,a,o]}class oa extends je{constructor(e){super(),We(this,e,af,lf,Ne,{required:8,disabled:9,preventScroll:10,loop:11,closeOnEscape:12,closeOnOutsideClick:13,portal:14,name:15,multiple:16,selected:4,onSelectedChange:17,open:5,onOpenChange:18,items:19,onOutsideClick:20,inputValue:6,touchedInput:7})}}const cf=r=>({builder:r[0]&256}),js=r=>({builder:r[8]}),uf=r=>({builder:r[0]&256}),Ws=r=>({builder:r[8]}),ff=r=>({builder:r[0]&256}),qs=r=>({builder:r[8]}),df=r=>({builder:r[0]&256}),Js=r=>({builder:r[8]}),hf=r=>({builder:r[0]&256}),$s=r=>({builder:r[8]}),pf=r=>({builder:r[0]&256}),Ks=r=>({builder:r[8]});function mf(r){let e,t,n,i;const s=r[26].default,o=me(s,r,r[25],js);let a=[r[8],r[13]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[35](e),t=!0,n||(i=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[31])],n=!0)},p(c,u){o&&o.p&&(!t||u[0]&33554688)&&ge(o,s,c,c[25],t?ye(s,c[25],u,cf):be(c[25]),js),se(e,l=Fe(a,[u[0]&256&&c[8],u[0]&8192&&c[13]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[35](null),n=!1,ut(i)}}}function gf(r){let e,t,n,i,s;const o=r[26].default,a=me(o,r,r[25],Ws);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a&&a.c(),se(e,c)},m(u,f){v(u,e,f),a&&a.m(e,null),r[34](e),n=!0,i||(s=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[30])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&ge(a,o,r,r[25],n?ye(o,r[25],f,uf):be(r[25]),Ws),se(e,c=Fe(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),t&&t.end(1),n=!0)},o(u){C(a,u),u&&(t=ia(e,r[5],r[6])),n=!1},d(u){u&&D(e),a&&a.d(u),r[34](null),u&&t&&t.end(),i=!1,ut(s)}}}function bf(r){let e,t,n,i,s;const o=r[26].default,a=me(o,r,r[25],qs);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a&&a.c(),se(e,c)},m(u,f){v(u,e,f),a&&a.m(e,null),n=!0,i||(s=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[29])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&ge(a,o,r,r[25],n?ye(o,r[25],f,ff):be(r[25]),qs),se(e,c=Fe(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&(t||ss(()=>{t=sa(e,r[3],r[4]),t.start()})),n=!0)},o(u){C(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),i=!1,ut(s)}}}function yf(r){let e,t,n,i,s,o;const a=r[26].default,l=me(a,r,r[25],Js);let c=[r[8],r[13]],u={};for(let f=0;f<c.length;f+=1)u=ie(u,c[f]);return{c(){e=R("div"),l&&l.c(),se(e,u)},m(f,d){v(f,e,d),l&&l.m(e,null),r[33](e),i=!0,s||(o=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[28])],s=!0)},p(f,d){r=f,l&&l.p&&(!i||d[0]&33554688)&&ge(l,a,r,r[25],i?ye(a,r[25],d,df):be(r[25]),Js),se(e,u=Fe(c,[d[0]&256&&r[8],d[0]&8192&&r[13]]))},i(f){i||(k(l,f),f&&ss(()=>{i&&(n&&n.end(1),t=sa(e,r[3],r[4]),t.start())}),i=!0)},o(f){C(l,f),t&&t.invalidate(),f&&(n=ia(e,r[5],r[6])),i=!1},d(f){f&&D(e),l&&l.d(f),r[33](null),f&&n&&n.end(),s=!1,ut(o)}}}function kf(r){let e,t,n,i,s;const o=r[26].default,a=me(o,r,r[25],$s);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a&&a.c(),se(e,c)},m(u,f){v(u,e,f),a&&a.m(e,null),r[32](e),n=!0,i||(s=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[27])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&ge(a,o,r,r[25],n?ye(o,r[25],f,hf):be(r[25]),$s),se(e,c=Fe(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&ss(()=>{n&&(t||(t=Bs(e,r[1],r[2],!0)),t.run(1))}),n=!0)},o(u){C(a,u),u&&(t||(t=Bs(e,r[1],r[2],!1)),t.run(0)),n=!1},d(u){u&&D(e),a&&a.d(u),r[32](null),u&&t&&t.end(),i=!1,ut(s)}}}function _f(r){let e;const t=r[26].default,n=me(t,r,r[25],Ks);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s[0]&33554688)&&ge(n,t,i,i[25],e?ye(t,i[25],s,pf):be(i[25]),Ks)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Sf(r){let e,t,n,i;const s=[_f,kf,yf,bf,gf,mf],o=[];function a(l,c){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=a(r))&&(t=o[e]=s[e](r)),{c(){t&&t.c(),n=de()},m(l,c){~e&&o[e].m(l,c),v(l,n,c),i=!0},p(l,c){let u=e;e=a(l),e===u?~e&&o[e].p(l,c):(t&&(ne(),C(o[u],1,1,()=>{o[u]=null}),re()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),~e&&o[e].d(l)}}}function Cf(r,e,t){let n;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","el"];let s=De(e,i),o,a,{$$slots:l={},$$scope:c}=e,{transition:u=void 0}=e,{transitionConfig:f=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:h=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:m=void 0}=e,{asChild:g=!1}=e,{id:b=void 0}=e,{side:y="bottom"}=e,{align:M="center"}=e,{sideOffset:T=0}=e,{alignOffset:_=0}=e,{collisionPadding:E=8}=e,{avoidCollisions:W=!0}=e,{collisionBoundary:w=void 0}=e,{sameWidth:O=!0}=e,{fitViewport:S=!1}=e,{el:A=void 0}=e;const{elements:{menu:K},states:{open:H},ids:Y,getAttrs:oe}=Lr();ce(r,K,z=>t(24,a=z)),ce(r,H,z=>t(9,o=z));const P=Fr(),tn=oe("content");function Ke(z){pt.call(this,r,z)}function er(z){pt.call(this,r,z)}function tr(z){pt.call(this,r,z)}function ei(z){pt.call(this,r,z)}function ti(z){pt.call(this,r,z)}function ni(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}function ri(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}function ii(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}function si(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}return r.$$set=z=>{e=ie(ie({},e),Dt(z)),t(13,s=De(e,i)),"transition"in z&&t(1,u=z.transition),"transitionConfig"in z&&t(2,f=z.transitionConfig),"inTransition"in z&&t(3,d=z.inTransition),"inTransitionConfig"in z&&t(4,h=z.inTransitionConfig),"outTransition"in z&&t(5,p=z.outTransition),"outTransitionConfig"in z&&t(6,m=z.outTransitionConfig),"asChild"in z&&t(7,g=z.asChild),"id"in z&&t(14,b=z.id),"side"in z&&t(15,y=z.side),"align"in z&&t(16,M=z.align),"sideOffset"in z&&t(17,T=z.sideOffset),"alignOffset"in z&&t(18,_=z.alignOffset),"collisionPadding"in z&&t(19,E=z.collisionPadding),"avoidCollisions"in z&&t(20,W=z.avoidCollisions),"collisionBoundary"in z&&t(21,w=z.collisionBoundary),"sameWidth"in z&&t(22,O=z.sameWidth),"fitViewport"in z&&t(23,S=z.fitViewport),"el"in z&&t(0,A=z.el),"$$scope"in z&&t(25,c=z.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&16384&&b&&Y.menu.set(b),r.$$.dirty[0]&16777216&&t(8,n=a),r.$$.dirty[0]&256&&Object.assign(n,tn),r.$$.dirty[0]&16744960&&o&&sf({side:y,align:M,sideOffset:T,alignOffset:_,collisionPadding:E,avoidCollisions:W,collisionBoundary:w,sameWidth:O,fitViewport:S})},[A,u,f,d,h,p,m,g,n,o,K,H,P,s,b,y,M,T,_,E,W,w,O,S,a,c,l,Ke,er,tr,ei,ti,ni,ri,ii,si]}class la extends je{constructor(e){super(),We(this,e,Cf,Sf,Ne,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,el:0},null,[-1,-1])}}const Mf=r=>({builder:r&8,placeholder:r&4}),Us=r=>({builder:r[3],placeholder:r[2]});function wf(r){let e,t,n,i=[r[3],r[6],{placeholder:r[2]}],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("input"),se(e,s)},m(o,a){v(o,e,a),e.autofocus&&e.focus(),r[11](e),t||(n=[qe(r[3].action(e)),ee(e,"m-click",r[5]),ee(e,"m-keydown",r[5]),ee(e,"m-input",r[5])],t=!0)},p(o,a){se(e,s=Fe(i,[a&8&&o[3],a&64&&o[6],a&4&&{placeholder:o[2]}]))},i:te,o:te,d(o){o&&D(e),r[11](null),t=!1,ut(n)}}}function Tf(r){let e;const t=r[10].default,n=me(t,r,r[9],Us);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&524)&&ge(n,t,i,i[9],e?ye(t,i[9],s,Mf):be(i[9]),Us)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Ef(r){let e,t,n,i;const s=[Tf,wf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function Of(r,e,t){let n;const i=["asChild","placeholder","el","id"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{placeholder:u=void 0}=e,{el:f=void 0}=e,{id:d=void 0}=e;const{elements:{input:h},ids:p,getAttrs:m}=Lr();ce(r,h,M=>t(8,o=M));const g=Fr(),b=m("input");function y(M){Pe[M?"unshift":"push"](()=>{f=M,t(0,f)})}return r.$$set=M=>{e=ie(ie({},e),Dt(M)),t(6,s=De(e,i)),"asChild"in M&&t(1,c=M.asChild),"placeholder"in M&&t(2,u=M.placeholder),"el"in M&&t(0,f=M.el),"id"in M&&t(7,d=M.id),"$$scope"in M&&t(9,l=M.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&d&&p.trigger.set(d),r.$$.dirty&256&&t(3,n=o),r.$$.dirty&8&&Object.assign(n,b)},[f,c,u,n,h,g,s,d,o,l,a,y]}class aa extends je{constructor(e){super(),We(this,e,Of,Ef,Ne,{asChild:1,placeholder:2,el:0,id:7})}}const Nf=r=>({builder:r&16,isSelected:r&32}),Hs=r=>({builder:r[4],isSelected:r[5]}),Af=r=>({builder:r&16,isSelected:r&32}),Gs=r=>({builder:r[4],isSelected:r[5]});function vf(r){let e,t,n,i;const s=r[14].default,o=me(s,r,r[13],Hs),a=o||xf(r);let l=[r[4],r[9]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a.c(),se(e,c)},m(u,f){v(u,e,f),a.m(e,null),r[19](e),t=!0,n||(i=[qe(r[4].action(e)),ee(e,"m-click",r[8]),ee(e,"m-pointermove",r[8]),ee(e,"focusin",r[15]),ee(e,"keydown",r[16]),ee(e,"focusout",r[17]),ee(e,"pointerleave",r[18])],n=!0)},p(u,f){o?o.p&&(!t||f&8240)&&ge(o,s,u,u[13],t?ye(s,u[13],f,Nf):be(u[13]),Hs):a.p&&(!t||f&5)&&a.p(u,t?f:-1),se(e,c=Fe(l,[f&16&&u[4],f&512&&u[9]]))},i(u){t||(k(a,u),t=!0)},o(u){C(a,u),t=!1},d(u){u&&D(e),a.d(u),r[19](null),n=!1,ut(i)}}}function Df(r){let e;const t=r[14].default,n=me(t,r,r[13],Gs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&8240)&&ge(n,t,i,i[13],e?ye(t,i[13],s,Af):be(i[13]),Gs)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function xf(r){let e=(r[0]||r[2])+"",t;return{c(){t=he(e)},m(n,i){v(n,t,i)},p(n,i){i&5&&e!==(e=(n[0]||n[2])+"")&&xe(t,e)},d(n){n&&D(t)}}}function If(r){let e,t,n,i;const s=[Df,vf],o=[];function a(l,c){return l[3]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function Pf(r,e,t){let n,i;const s=["value","disabled","label","asChild","el"];let o=De(e,s),a,l,{$$slots:c={},$$scope:u}=e,{value:f}=e,{disabled:d=void 0}=e,{label:h=void 0}=e,{asChild:p=!1}=e,{el:m=void 0}=e;const{elements:{option:g},helpers:{isSelected:b},getAttrs:y}=rf(f);ce(r,g,S=>t(12,l=S)),ce(r,b,S=>t(11,a=S));const M=Fr(),T=y("item");function _(S){pt.call(this,r,S)}function E(S){pt.call(this,r,S)}function W(S){pt.call(this,r,S)}function w(S){pt.call(this,r,S)}function O(S){Pe[S?"unshift":"push"](()=>{m=S,t(1,m)})}return r.$$set=S=>{e=ie(ie({},e),Dt(S)),t(9,o=De(e,s)),"value"in S&&t(2,f=S.value),"disabled"in S&&t(10,d=S.disabled),"label"in S&&t(0,h=S.label),"asChild"in S&&t(3,p=S.asChild),"el"in S&&t(1,m=S.el),"$$scope"in S&&t(13,u=S.$$scope)},r.$$.update=()=>{r.$$.dirty&5&&!h&&typeof f=="string"&&t(0,h=f),r.$$.dirty&5125&&t(4,n=l({value:f,disabled:d,label:h})),r.$$.dirty&16&&Object.assign(n,T),r.$$.dirty&2052&&t(5,i=a(f))},[h,m,f,p,n,i,g,b,M,o,d,a,l,u,c,_,E,W,w,O]}class ca extends je{constructor(e){super(),We(this,e,Pf,If,Ne,{value:2,disabled:10,label:0,asChild:3,el:1})}}function Rf(){return{NAME:"separator",PARTS:["root"]}}function Bf(r){const{NAME:e,PARTS:t}=Rf(),n=ns(e,t),i={...Tu(rs(r)),getAttrs:n};return{...i,updateOption:is(i.options)}}const zf=r=>({builder:r&4}),Ys=r=>({builder:r[2]});function Ff(r){let e,t,n,i=[r[2],r[4]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("div"),se(e,s)},m(o,a){v(o,e,a),r[10](e),t||(n=qe(r[2].action(e)),t=!0)},p(o,a){se(e,s=Fe(i,[a&4&&o[2],a&16&&o[4]]))},i:te,o:te,d(o){o&&D(e),r[10](null),t=!1,n()}}}function Vf(r){let e;const t=r[9].default,n=me(t,r,r[8],Ys);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&260)&&ge(n,t,i,i[8],e?ye(t,i[8],s,zf):be(i[8]),Ys)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Lf(r){let e,t,n,i;const s=[Vf,Ff],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function jf(r,e,t){let n;const i=["orientation","decorative","asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{orientation:c="horizontal"}=e,{decorative:u=!0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{root:h},updateOption:p,getAttrs:m}=Bf({orientation:c,decorative:u});ce(r,h,y=>t(7,o=y));const g=m("root");function b(y){Pe[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=ie(ie({},e),Dt(y)),t(4,s=De(e,i)),"orientation"in y&&t(5,c=y.orientation),"decorative"in y&&t(6,u=y.decorative),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(8,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&p("orientation",c),r.$$.dirty&64&&p("decorative",u),r.$$.dirty&128&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,h,s,c,u,o,l,a,b]}class ua extends je{constructor(e){super(),We(this,e,jf,Lf,Ne,{orientation:5,decorative:6,asChild:1,el:0})}}function fa(){return{NAME:"tabs",PARTS:["root","content","list","trigger"]}}function Wf(r){const{NAME:e,PARTS:t}=fa(),n=ns(e,t),i={...ef(rs(r)),getAttrs:n};return zr(e,i),{...i,updateOption:is(i.options)}}function ds(){const{NAME:r}=fa();return Ut(r)}const qf=r=>({builder:r&4,value:r&8}),Xs=r=>({builder:r[2],value:r[3]}),Jf=r=>({builder:r&4,value:r&8}),Zs=r=>({builder:r[2],value:r[3]});function $f(r){let e,t,n,i;const s=r[15].default,o=me(s,r,r[14],Xs);let a=[r[2],r[6]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[16](e),t=!0,n||(i=qe(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&16396)&&ge(o,s,c,c[14],t?ye(s,c[14],u,qf):be(c[14]),Xs),se(e,l=Fe(a,[u&4&&c[2],u&64&&c[6]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[16](null),n=!1,i()}}}function Kf(r){let e;const t=r[15].default,n=me(t,r,r[14],Zs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&16396)&&ge(n,t,i,i[14],e?ye(t,i[14],s,Jf):be(i[14]),Zs)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Uf(r){let e,t,n,i;const s=[Kf,$f],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function Hf(r,e,t){let n;const i=["orientation","activateOnFocus","loop","autoSet","value","onValueChange","asChild","el"];let s=De(e,i),o,a,{$$slots:l={},$$scope:c}=e,{orientation:u=void 0}=e,{activateOnFocus:f=void 0}=e,{loop:d=void 0}=e,{autoSet:h=void 0}=e,{value:p=void 0}=e,{onValueChange:m=void 0}=e,{asChild:g=!1}=e,{el:b=void 0}=e;const{elements:{root:y},states:{value:M},updateOption:T,getAttrs:_}=Wf({orientation:u,activateOnFocus:f,loop:d,autoSet:h,defaultValue:p,onValueChange:({next:w})=>(p!==w&&(m==null||m(w),t(7,p=w)),w)});ce(r,y,w=>t(13,o=w)),ce(r,M,w=>t(3,a=w));const E=_("root");function W(w){Pe[w?"unshift":"push"](()=>{b=w,t(0,b)})}return r.$$set=w=>{e=ie(ie({},e),Dt(w)),t(6,s=De(e,i)),"orientation"in w&&t(8,u=w.orientation),"activateOnFocus"in w&&t(9,f=w.activateOnFocus),"loop"in w&&t(10,d=w.loop),"autoSet"in w&&t(11,h=w.autoSet),"value"in w&&t(7,p=w.value),"onValueChange"in w&&t(12,m=w.onValueChange),"asChild"in w&&t(1,g=w.asChild),"el"in w&&t(0,b=w.el),"$$scope"in w&&t(14,c=w.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&p!==void 0&&M.set(p),r.$$.dirty&256&&T("orientation",u),r.$$.dirty&512&&T("activateOnFocus",f),r.$$.dirty&1024&&T("loop",d),r.$$.dirty&2048&&T("autoSet",h),r.$$.dirty&8192&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,E)},[b,g,n,a,y,M,s,p,u,f,d,h,m,o,c,l,W]}class Gf extends je{constructor(e){super(),We(this,e,Hf,Uf,Ne,{orientation:8,activateOnFocus:9,loop:10,autoSet:11,value:7,onValueChange:12,asChild:1,el:0})}}const Yf=r=>({builder:r&4}),Qs=r=>({builder:r[2]}),Xf=r=>({builder:r&4}),eo=r=>({builder:r[2]});function Zf(r){let e,t,n,i;const s=r[8].default,o=me(s,r,r[7],Qs);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[9](e),t=!0,n||(i=qe(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&132)&&ge(o,s,c,c[7],t?ye(s,c[7],u,Yf):be(c[7]),Qs),se(e,l=Fe(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[9](null),n=!1,i()}}}function Qf(r){let e;const t=r[8].default,n=me(t,r,r[7],eo);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&132)&&ge(n,t,i,i[7],e?ye(t,i[7],s,Xf):be(i[7]),eo)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function ed(r){let e,t,n,i;const s=[Qf,Zf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function td(r,e,t){let n;const i=["value","asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{asChild:u=!1}=e,{el:f=void 0}=e;const{elements:{content:d},getAttrs:h}=ds();ce(r,d,g=>t(6,o=g));const p=h("content");function m(g){Pe[g?"unshift":"push"](()=>{f=g,t(0,f)})}return r.$$set=g=>{e=ie(ie({},e),Dt(g)),t(4,s=De(e,i)),"value"in g&&t(5,c=g.value),"asChild"in g&&t(1,u=g.asChild),"el"in g&&t(0,f=g.el),"$$scope"in g&&t(7,l=g.$$scope)},r.$$.update=()=>{r.$$.dirty&96&&t(2,n=o(c)),r.$$.dirty&4&&Object.assign(n,p)},[f,u,n,d,s,c,o,l,a,m]}class nd extends je{constructor(e){super(),We(this,e,td,ed,Ne,{value:5,asChild:1,el:0})}}const rd=r=>({builder:r&4}),to=r=>({builder:r[2]}),id=r=>({builder:r&4}),no=r=>({builder:r[2]});function sd(r){let e,t,n,i;const s=r[7].default,o=me(s,r,r[6],to);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[8](e),t=!0,n||(i=qe(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&68)&&ge(o,s,c,c[6],t?ye(s,c[6],u,rd):be(c[6]),to),se(e,l=Fe(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[8](null),n=!1,i()}}}function od(r){let e;const t=r[7].default,n=me(t,r,r[6],no);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&68)&&ge(n,t,i,i[6],e?ye(t,i[6],s,id):be(i[6]),no)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function ld(r){let e,t,n,i;const s=[od,sd],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function ad(r,e,t){let n;const i=["asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{el:u=void 0}=e;const{elements:{list:f},getAttrs:d}=ds();ce(r,f,m=>t(5,o=m));const h=d("list");function p(m){Pe[m?"unshift":"push"](()=>{u=m,t(0,u)})}return r.$$set=m=>{e=ie(ie({},e),Dt(m)),t(4,s=De(e,i)),"asChild"in m&&t(1,c=m.asChild),"el"in m&&t(0,u=m.el),"$$scope"in m&&t(6,l=m.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,h)},[u,c,n,f,s,o,l,a,p]}class cd extends je{constructor(e){super(),We(this,e,ad,ld,Ne,{asChild:1,el:0})}}const ud=r=>({builder:r&4}),ro=r=>({builder:r[2]}),fd=r=>({builder:r&4}),io=r=>({builder:r[2]});function dd(r){let e,t,n,i;const s=r[10].default,o=me(s,r,r[9],ro);let a=[r[2],{type:"button"},r[5]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("button"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),e.autofocus&&e.focus(),r[11](e),t=!0,n||(i=[qe(r[2].action(e)),ee(e,"m-click",r[4]),ee(e,"m-focus",r[4]),ee(e,"m-keydown",r[4])],n=!0)},p(c,u){o&&o.p&&(!t||u&516)&&ge(o,s,c,c[9],t?ye(s,c[9],u,ud):be(c[9]),ro),se(e,l=Fe(a,[u&4&&c[2],{type:"button"},u&32&&c[5]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[11](null),n=!1,ut(i)}}}function hd(r){let e;const t=r[10].default,n=me(t,r,r[9],io);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&516)&&ge(n,t,i,i[9],e?ye(t,i[9],s,fd):be(i[9]),io)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function pd(r){let e,t,n,i;const s=[hd,dd],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function md(r,e,t){let n;const i=["value","disabled","asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{disabled:u=void 0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{trigger:h},getAttrs:p}=ds();ce(r,h,y=>t(8,o=y));const m=Fr(),g=p("trigger");function b(y){Pe[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=ie(ie({},e),Dt(y)),t(5,s=De(e,i)),"value"in y&&t(6,c=y.value),"disabled"in y&&t(7,u=y.disabled),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(9,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&448&&t(2,n=o({value:c,disabled:u})),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,h,m,s,c,u,o,l,a,b]}class gd extends je{constructor(e){super(),We(this,e,md,pd,Ne,{value:6,disabled:7,asChild:1,el:0})}}/*!
1
+ import{R as He,T as tu,U as ea,V as nu,W as Je,X as ot,Y as Ds,Z as Ft,_ as vi,$ as _t,a0 as Di,a1 as Sr,a2 as ts,a3 as ru,a4 as iu,a5 as su,a6 as wn,a7 as ou,a8 as lu,a9 as Cr,aa as un,ab as G,ac as xs,ad as oi,ae as mr,af as au,ag as Is,ah as cu,ai as uu,aj as ta,ak as na,al as ra,am as Ps,an as Nn,ao as fu,ap as du,aq as hu,ar as pu,as as mu,at as gu,au as bu,av as In,aw as yu,ax as ku,ay as _u,az as xi,aA as gr,aB as Su,aC as Cu,aD as Rs,aE as Mu,aF as ns,aG as rs,aH as zr,aI as is,aJ as Ut,aK as wu,S as je,i as We,s as Ne,aL as me,aM as ge,aN as be,aO as ye,n as k,p as C,w as ce,F as de,g as v,o as ne,q as re,r as D,aP as De,aQ as Fr,aR as ie,aS as Dt,aT as pt,E as Pe,e as R,aU as se,aV as qe,l as ee,aW as Fe,v as ut,aX as ia,aY as ss,aZ as sa,a_ as Bs,G as te,t as he,k as xe,a$ as Tu,b0 as fe,b1 as rt,c as J,f as q,h as I,d as F,j as V,u as L,I as Me,b2 as Eu,b3 as Vr,H as ls,b4 as Ou,b5 as Cn,b6 as Qe,b7 as as,b8 as cs,b9 as us,ba as Nu,bb as zs,y as Au,bc as vt,bd as Mr,be as wr,bf as vu,O as Ii,bg as Du,P as Pi,bh as xu,bi as Iu,bj as Pu,bk as Ru,bl as Bu,bm as zu,J as ir,x as Fs,L as Fu,N as rn,M as Vs,z as Vu,Q as Lu}from"./index-DAdhbT7C.js";import{k as ju,b as Wu}from"./index-Vcq4gwWv.js";function li(r){return Array.from(r.querySelectorAll('[role="option"]:not([data-disabled])')).filter(e=>He(e))}function qu(r){return window.getComputedStyle(r).getPropertyValue("direction")}function Ju(r){return e=>{const t=e.target,n=tu(r);if(!n||!ea(t))return!1;const i=n.id;return!!(nu(t)&&i===t.htmlFor||t.closest(`label[for="${i}"]`))}}function $u(){return{elements:{root:Je("label",{action:e=>({destroy:ot(e,"mousedown",n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})})})}}}const Ku=[G.ARROW_LEFT,G.ESCAPE,G.ARROW_RIGHT,G.SHIFT,G.CAPS_LOCK,G.CONTROL,G.ALT,G.META,G.ENTER,G.F1,G.F2,G.F3,G.F4,G.F5,G.F6,G.F7,G.F8,G.F9,G.F10,G.F11,G.F12],Uu={positioning:{placement:"bottom",sameWidth:!0},scrollAlignment:"nearest",loop:!0,defaultOpen:!1,closeOnOutsideClick:!0,preventScroll:!0,closeOnEscape:!0,forceVisible:!1,portal:void 0,builder:"listbox",disabled:!1,required:!1,name:void 0,typeahead:!0,highlightOnHover:!0,onOutsideClick:void 0},Hu=["trigger","menu","label"];function Gu(r){const e={...Uu,...r},t=Ds(Ft(null)),n=Ds(Ft(null)),i=e.selected??Ft(e.defaultSelected),s=vi(i,e==null?void 0:e.onSelectedChange),o=_t(n,x=>x?Y(x):void 0),a=e.open??Ft(e.defaultOpen),l=vi(a,e==null?void 0:e.onOpenChange),c=Di({...Sr(e,"open","defaultOpen","builder","ids"),multiple:e.multiple??!1}),{scrollAlignment:u,loop:f,closeOnOutsideClick:d,closeOnEscape:h,preventScroll:p,portal:m,forceVisible:g,positioning:b,multiple:y,arrowSize:M,disabled:T,required:_,typeahead:E,name:W,highlightOnHover:w,onOutsideClick:O}=c,{name:S,selector:A}=ts(e.builder),K=Di({...ru(Hu),...e.ids}),{handleTypeaheadSearch:H}=iu({onMatch:x=>{n.set(x),x.scrollIntoView({block:u.get()})},getCurrentItem(){return n.get()}});function Y(x){const $=x.getAttribute("data-value"),le=x.getAttribute("data-label"),Ue=x.hasAttribute("data-disabled");return{value:$&&JSON.parse($),label:le??x.textContent??void 0,disabled:!!Ue}}const oe=x=>{s.update($=>{if(y.get()){const Ue=Array.isArray($)?[...$]:[];return Su(x,Ue,(nn,ue)=>wn(nn.value,ue.value))}return x})};function P(x){const $=Y(x);oe($)}async function tn(){l.set(!0);const x=document.getElementById(K.trigger.get());if(!x)return;x!==t.get()&&t.set(x),await oi();const $=document.getElementById(K.menu.get());if(!He($))return;const le=$.querySelector("[aria-selected=true]");He(le)&&n.set(le)}function Ke(){l.set(!1),n.set(null)}const er=su({open:l,forceVisible:g,activeTrigger:t}),tr=_t([s],([x])=>$=>Array.isArray(x)?x.some(le=>wn(le.value,$)):ou($)?wn(x==null?void 0:x.value,lu($,void 0)):wn(x==null?void 0:x.value,$)),ei=_t([o],([x])=>$=>wn(x==null?void 0:x.value,$)),ti=Je(S("trigger"),{stores:[l,n,T,K.menu,K.trigger,K.label],returned:([x,$,le,Ue,nn,ue])=>({"aria-activedescendant":$==null?void 0:$.id,"aria-autocomplete":"list","aria-controls":Ue,"aria-expanded":x,"aria-labelledby":ue,id:nn,role:"combobox",disabled:Cr(le),type:e.builder==="select"?"button":void 0}),action:x=>{const $=xi(x),le=un(ot(x,"click",()=>{x.focus(),l.get()?Ke():tn()}),ot(x,"keydown",ue=>{if(!l.get()){if(Ku.includes(ue.key)||ue.key===G.TAB||ue.key===G.BACKSPACE&&$&&x.value===""||ue.key===G.SPACE&&xs(x))return;tn(),oi().then(()=>{if(s.get())return;const Pt=document.getElementById(K.menu.get());if(!He(Pt))return;const ke=Array.from(Pt.querySelectorAll(`${A("item")}:not([data-disabled]):not([data-hidden])`)).filter(bt=>He(bt));ke.length&&(ue.key===G.ARROW_DOWN?(n.set(ke[0]),ke[0].scrollIntoView({block:u.get()})):ue.key===G.ARROW_UP&&(n.set(mr(ke)),mr(ke).scrollIntoView({block:u.get()})))})}if(ue.key===G.TAB){Ke();return}if(ue.key===G.ENTER&&!ue.isComposing||ue.key===G.SPACE&&xs(x)){ue.preventDefault();const Ve=n.get();Ve&&P(Ve),y.get()||Ke()}if(ue.key===G.ARROW_UP&&ue.altKey&&Ke(),au.includes(ue.key)){ue.preventDefault();const Ve=document.getElementById(K.menu.get());if(!He(Ve))return;const Pt=li(Ve);if(!Pt.length)return;const ke=Pt.filter(vs=>!Is(vs)&&vs.dataset.hidden===void 0),bt=n.get(),Rt=bt?ke.indexOf(bt):-1,rr=f.get(),eu=u.get();let it;switch(ue.key){case G.ARROW_DOWN:it=na(ke,Rt,rr);break;case G.ARROW_UP:it=ta(ke,Rt,rr);break;case G.PAGE_DOWN:it=uu(ke,Rt,10,rr);break;case G.PAGE_UP:it=cu(ke,Rt,10,rr);break;case G.HOME:it=ke[0];break;case G.END:it=mr(ke);break;default:return}n.set(it),it==null||it.scrollIntoView({block:eu})}else if(E.get()){const Ve=document.getElementById(K.menu.get());if(!He(Ve))return;H(ue.key,li(Ve))}}));let Ue=gr;return Ue=ra(x,{handler:Ke,enabled:_t([l,h],([ue,nr])=>ue&&nr)}).destroy,{destroy(){le(),Ue()}}}}),ni=Je(S("menu"),{stores:[er,K.menu],returned:([x,$])=>({hidden:x?void 0:!0,id:$,role:"listbox",style:Ps({display:x?void 0:"none"})}),action:x=>{let $=gr;const le=un(Nn([er,m,d,b,t],([Ue,nn,ue,nr,Ve])=>{$(),!(!Ue||!Ve)&&oi().then(()=>{$();const Pt=Ju(K.trigger.get());$=fu(x,{anchorElement:Ve,open:l,options:{floating:nr,focusTrap:null,modal:{closeOnInteractOutside:ue,onClose:Ke,open:Ue,shouldCloseOnInteractOutside:ke=>{var Rt;if((Rt=O.get())==null||Rt(ke),ke.defaultPrevented)return!1;const bt=ke.target;return!(!ea(bt)||bt===Ve||Ve.contains(bt)||Pt(ke))}},escapeKeydown:null,portal:du(x,nn)}}).destroy})}));return{destroy:()=>{le(),$()}}}}),{elements:{root:ri}}=$u(),{action:ii}=hu(ri),si=Je(S("label"),{stores:[K.label,K.trigger],returned:([x,$])=>({id:x,for:$}),action:ii}),z=Je(S("option"),{stores:[tr],returned:([x])=>$=>{const le=x($.value);return{"data-value":JSON.stringify($.value),"data-label":$.label,"data-disabled":Cr($.disabled),"aria-disabled":$.disabled?!0:void 0,"aria-selected":le,"data-selected":le?"":void 0,id:pu(),role:"option"}},action:x=>({destroy:un(ot(x,"click",le=>{if(Is(x)){le.preventDefault();return}P(x),y.get()||Ke()}),Nn(w,le=>le?un(ot(x,"mouseover",()=>{n.set(x)}),ot(x,"mouseleave",()=>{n.set(null)})):void 0))})}),Yc=Je(S("group"),{returned:()=>x=>({role:"group","aria-labelledby":x})}),Xc=Je(S("group-label"),{returned:()=>x=>({id:x})}),Zc=mu({value:_t([s],([x])=>{const $=Array.isArray(x)?x.map(le=>le.value):x==null?void 0:x.value;return typeof $=="string"?$:JSON.stringify($)}),name:gu(W),required:_,prefix:e.builder}),Qc=Je(S("arrow"),{stores:M,returned:x=>({"data-arrow":!0,style:Ps({position:"absolute",width:`var(--arrow-size, ${x}px)`,height:`var(--arrow-size, ${x}px)`})})});return bu(()=>{if(!In)return;const x=document.getElementById(K.menu.get()),$=document.getElementById(K.trigger.get());if($&&t.set($),!x)return;const le=x.querySelector("[data-selected]");He(le)}),Nn([n],([x])=>{if(!In)return;const $=document.getElementById(K.menu.get());He($)&&li($).forEach(le=>{le===x?yu(le):ku(le)})}),Nn([l],([x])=>{if(!In)return;let $=gr;return p.get()&&x&&($=_u()),()=>{$()}}),{ids:K,elements:{trigger:ti,group:Yc,option:z,menu:ni,groupLabel:Xc,label:si,hiddenInput:Zc,arrow:Qc},states:{open:l,selected:s,highlighted:o,highlightedItem:n},helpers:{isSelected:tr,isHighlighted:ei,closeMenu:Ke},options:c}}const{name:Yu}=ts("combobox");function Xu(r){const e=Gu({...r,builder:"combobox",typeahead:!1}),t=Ft(""),n=Ft(!1),i=Je(Yu("input"),{stores:[e.elements.trigger,t],returned:([s,o])=>({...Sr(s,"action"),role:"combobox",value:o,autocomplete:"off"}),action:s=>{const o=un(ot(s,"input",u=>{!xi(u.target)&&!Rs(u.target)||n.set(!0)}),Cu(s,"input",u=>{xi(u.target)&&t.set(u.target.value),Rs(u.target)&&t.set(u.target.innerText)}));let a=gr;a=ra(s,{handler:()=>{e.helpers.closeMenu()}}).destroy;const{destroy:c}=e.elements.trigger(s);return{destroy(){c==null||c(),o(),a()}}}});return Nn(e.states.open,s=>{s||n.set(!1)}),{...e,elements:{...Sr(e.elements,"trigger"),input:i},states:{...e.states,touchedInput:n,inputValue:t}}}const Zu={orientation:"horizontal",activateOnFocus:!0,loop:!0,autoSet:!0},{name:sr,selector:Qu}=ts("tabs");function ef(r){const e={...Zu,...r},t=Di(Sr(e,"defaultValue","value","onValueChange","autoSet")),{orientation:n,activateOnFocus:i,loop:s}=t,o=e.value??Ft(e.defaultValue),a=vi(o,e==null?void 0:e.onValueChange);let l=e.defaultValue??a.get();const c=Je(sr(),{stores:n,returned:p=>({"data-orientation":p})}),u=Je(sr("list"),{stores:n,returned:p=>({role:"tablist","aria-orientation":p,"data-orientation":p})}),f=p=>typeof p=="string"?{value:p}:p,d=Je(sr("trigger"),{stores:[a,n],returned:([p,m])=>g=>{const{value:b,disabled:y}=f(g);!p&&!l&&e.autoSet&&(l=b,p=b,a.set(b));const T=(In?p:l)===b;return{type:"button",role:"tab","data-state":T?"active":"inactive",tabindex:T?0:-1,"data-value":b,"data-orientation":m,"data-disabled":Cr(y),disabled:Cr(y)}},action:p=>({destroy:un(ot(p,"focus",()=>{const g=p.dataset.disabled==="true",b=p.dataset.value;i.get()&&!g&&b!==void 0&&a.set(b)}),ot(p,"click",g=>{if(p.focus(),g.preventDefault(),p.dataset.disabled==="true")return;const y=p.dataset.value;p.focus(),y!==void 0&&a.set(y)}),ot(p,"keydown",g=>{const b=p.dataset.value;if(!b)return;const y=g.currentTarget;if(!He(y))return;const M=y.closest(Qu());if(!He(M))return;const T=s.get(),E=Array.from(M.querySelectorAll('[role="tab"]')).filter(A=>He(A)).filter(A=>!A.hasAttribute("data-disabled")),W=E.findIndex(A=>A===g.target),w=qu(M),{nextKey:O,prevKey:S}=Mu(w,n.get());g.key===O?(g.preventDefault(),na(E,W,T).focus()):g.key===S?(g.preventDefault(),ta(E,W,T).focus()):g.key===G.ENTER||g.key===G.SPACE?(g.preventDefault(),a.set(b)):g.key===G.HOME?(g.preventDefault(),E[0].focus()):g.key===G.END&&(g.preventDefault(),mr(E).focus())}))})}),h=Je(sr("content"),{stores:a,returned:p=>m=>({role:"tabpanel","aria-labelledby":m,hidden:In?p===m?void 0:!0:l===m?void 0:!0,tabindex:0})});return{elements:{root:c,list:u,trigger:d,content:h},states:{value:a},options:t}}function tf(r,e){return r.length!==e.length?!1:r.every((t,n)=>t===e[n])}function fs(){return{NAME:"combobox",GROUP_NAME:"combobox-group",ITEM_NAME:"combobox-item",PARTS:["content","menu","input","item","label","group","group-label","arrow","hidden-input","indicator"]}}function Lr(){const{NAME:r}=fs();return Ut(r)}function nf(r){const{NAME:e,PARTS:t}=fs(),n=ns(e,t),i={...Xu({...rs(r),forceVisible:!0}),getAttrs:n};return zr(e,i),{...i,updateOption:is(i.options)}}function rf(r){const{ITEM_NAME:e}=fs(),t=Lr();return zr(e,r),t}function sf(r){const t={...{side:"bottom",align:"center",sameWidth:!0},...r},{options:{positioning:n}}=Lr();wu(n)(t)}const of=r=>({ids:r&1}),Ls=r=>({ids:r[0]});function lf(r){let e;const t=r[24].default,n=me(t,r,r[23],Ls);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&8388609)&&ge(n,t,i,i[23],e?ye(t,i[23],s,of):be(i[23]),Ls)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function af(r,e,t){let n,i,s,{$$slots:o={},$$scope:a}=e,{required:l=void 0}=e,{disabled:c=void 0}=e,{preventScroll:u=void 0}=e,{loop:f=void 0}=e,{closeOnEscape:d=void 0}=e,{closeOnOutsideClick:h=void 0}=e,{portal:p=void 0}=e,{name:m=void 0}=e,{multiple:g=!1}=e,{selected:b=void 0}=e,{onSelectedChange:y=void 0}=e,{open:M=void 0}=e,{onOpenChange:T=void 0}=e,{items:_=[]}=e,{onOutsideClick:E=void 0}=e,{inputValue:W=""}=e,{touchedInput:w=!1}=e;const{states:{open:O,selected:S,inputValue:A,touchedInput:K},updateOption:H,ids:Y}=nf({required:l,disabled:c,preventScroll:u,loop:f,closeOnEscape:d,closeOnOutsideClick:h,portal:p,name:m,onOutsideClick:E,multiple:g,forceVisible:!0,defaultSelected:Array.isArray(b)?[...b]:b,defaultOpen:M,onSelectedChange:({next:P})=>Array.isArray(P)?((!Array.isArray(b)||!tf(b,P))&&(y==null||y(P),t(4,b=P)),P):(b!==P&&(y==null||y(P),t(4,b=P)),t(6,W=(P==null?void 0:P.label)??(typeof(P==null?void 0:P.value)=="string"?P==null?void 0:P.value:"")),A.set(W),P),onOpenChange:({next:P})=>(M!==P&&(T==null||T(P),t(5,M=P)),P),items:_});ce(r,A,P=>t(21,n=P)),ce(r,K,P=>t(22,i=P));const oe=_t([Y.menu,Y.trigger,Y.label],([P,tn,Ke])=>({menu:P,trigger:tn,label:Ke}));return ce(r,oe,P=>t(0,s=P)),r.$$set=P=>{"required"in P&&t(8,l=P.required),"disabled"in P&&t(9,c=P.disabled),"preventScroll"in P&&t(10,u=P.preventScroll),"loop"in P&&t(11,f=P.loop),"closeOnEscape"in P&&t(12,d=P.closeOnEscape),"closeOnOutsideClick"in P&&t(13,h=P.closeOnOutsideClick),"portal"in P&&t(14,p=P.portal),"name"in P&&t(15,m=P.name),"multiple"in P&&t(16,g=P.multiple),"selected"in P&&t(4,b=P.selected),"onSelectedChange"in P&&t(17,y=P.onSelectedChange),"open"in P&&t(5,M=P.open),"onOpenChange"in P&&t(18,T=P.onOpenChange),"items"in P&&t(19,_=P.items),"onOutsideClick"in P&&t(20,E=P.onOutsideClick),"inputValue"in P&&t(6,W=P.inputValue),"touchedInput"in P&&t(7,w=P.touchedInput),"$$scope"in P&&t(23,a=P.$$scope)},r.$$.update=()=>{r.$$.dirty&4194304&&t(7,w=i),r.$$.dirty&6291456&&i&&t(6,W=n),r.$$.dirty&64&&W!==void 0&&A.set(W),r.$$.dirty&32&&M!==void 0&&O.set(M),r.$$.dirty&16&&b!==void 0&&S.set(Array.isArray(b)?[...b]:b),r.$$.dirty&256&&H("required",l),r.$$.dirty&512&&H("disabled",c),r.$$.dirty&1024&&H("preventScroll",u),r.$$.dirty&2048&&H("loop",f),r.$$.dirty&4096&&H("closeOnEscape",d),r.$$.dirty&8192&&H("closeOnOutsideClick",h),r.$$.dirty&16384&&H("portal",p),r.$$.dirty&32768&&H("name",m),r.$$.dirty&65536&&H("multiple",g),r.$$.dirty&1048576&&H("onOutsideClick",E)},[s,A,K,oe,b,M,W,w,l,c,u,f,d,h,p,m,g,y,T,_,E,n,i,a,o]}class oa extends je{constructor(e){super(),We(this,e,af,lf,Ne,{required:8,disabled:9,preventScroll:10,loop:11,closeOnEscape:12,closeOnOutsideClick:13,portal:14,name:15,multiple:16,selected:4,onSelectedChange:17,open:5,onOpenChange:18,items:19,onOutsideClick:20,inputValue:6,touchedInput:7})}}const cf=r=>({builder:r[0]&256}),js=r=>({builder:r[8]}),uf=r=>({builder:r[0]&256}),Ws=r=>({builder:r[8]}),ff=r=>({builder:r[0]&256}),qs=r=>({builder:r[8]}),df=r=>({builder:r[0]&256}),Js=r=>({builder:r[8]}),hf=r=>({builder:r[0]&256}),$s=r=>({builder:r[8]}),pf=r=>({builder:r[0]&256}),Ks=r=>({builder:r[8]});function mf(r){let e,t,n,i;const s=r[26].default,o=me(s,r,r[25],js);let a=[r[8],r[13]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[35](e),t=!0,n||(i=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[31])],n=!0)},p(c,u){o&&o.p&&(!t||u[0]&33554688)&&ge(o,s,c,c[25],t?ye(s,c[25],u,cf):be(c[25]),js),se(e,l=Fe(a,[u[0]&256&&c[8],u[0]&8192&&c[13]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[35](null),n=!1,ut(i)}}}function gf(r){let e,t,n,i,s;const o=r[26].default,a=me(o,r,r[25],Ws);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a&&a.c(),se(e,c)},m(u,f){v(u,e,f),a&&a.m(e,null),r[34](e),n=!0,i||(s=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[30])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&ge(a,o,r,r[25],n?ye(o,r[25],f,uf):be(r[25]),Ws),se(e,c=Fe(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),t&&t.end(1),n=!0)},o(u){C(a,u),u&&(t=ia(e,r[5],r[6])),n=!1},d(u){u&&D(e),a&&a.d(u),r[34](null),u&&t&&t.end(),i=!1,ut(s)}}}function bf(r){let e,t,n,i,s;const o=r[26].default,a=me(o,r,r[25],qs);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a&&a.c(),se(e,c)},m(u,f){v(u,e,f),a&&a.m(e,null),n=!0,i||(s=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[29])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&ge(a,o,r,r[25],n?ye(o,r[25],f,ff):be(r[25]),qs),se(e,c=Fe(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&(t||ss(()=>{t=sa(e,r[3],r[4]),t.start()})),n=!0)},o(u){C(a,u),n=!1},d(u){u&&D(e),a&&a.d(u),i=!1,ut(s)}}}function yf(r){let e,t,n,i,s,o;const a=r[26].default,l=me(a,r,r[25],Js);let c=[r[8],r[13]],u={};for(let f=0;f<c.length;f+=1)u=ie(u,c[f]);return{c(){e=R("div"),l&&l.c(),se(e,u)},m(f,d){v(f,e,d),l&&l.m(e,null),r[33](e),i=!0,s||(o=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[28])],s=!0)},p(f,d){r=f,l&&l.p&&(!i||d[0]&33554688)&&ge(l,a,r,r[25],i?ye(a,r[25],d,df):be(r[25]),Js),se(e,u=Fe(c,[d[0]&256&&r[8],d[0]&8192&&r[13]]))},i(f){i||(k(l,f),f&&ss(()=>{i&&(n&&n.end(1),t=sa(e,r[3],r[4]),t.start())}),i=!0)},o(f){C(l,f),t&&t.invalidate(),f&&(n=ia(e,r[5],r[6])),i=!1},d(f){f&&D(e),l&&l.d(f),r[33](null),f&&n&&n.end(),s=!1,ut(o)}}}function kf(r){let e,t,n,i,s;const o=r[26].default,a=me(o,r,r[25],$s);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a&&a.c(),se(e,c)},m(u,f){v(u,e,f),a&&a.m(e,null),r[32](e),n=!0,i||(s=[qe(r[8].action(e)),ee(e,"m-pointerleave",r[12]),ee(e,"keydown",r[27])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&ge(a,o,r,r[25],n?ye(o,r[25],f,hf):be(r[25]),$s),se(e,c=Fe(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&ss(()=>{n&&(t||(t=Bs(e,r[1],r[2],!0)),t.run(1))}),n=!0)},o(u){C(a,u),u&&(t||(t=Bs(e,r[1],r[2],!1)),t.run(0)),n=!1},d(u){u&&D(e),a&&a.d(u),r[32](null),u&&t&&t.end(),i=!1,ut(s)}}}function _f(r){let e;const t=r[26].default,n=me(t,r,r[25],Ks);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s[0]&33554688)&&ge(n,t,i,i[25],e?ye(t,i[25],s,pf):be(i[25]),Ks)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Sf(r){let e,t,n,i;const s=[_f,kf,yf,bf,gf,mf],o=[];function a(l,c){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=a(r))&&(t=o[e]=s[e](r)),{c(){t&&t.c(),n=de()},m(l,c){~e&&o[e].m(l,c),v(l,n,c),i=!0},p(l,c){let u=e;e=a(l),e===u?~e&&o[e].p(l,c):(t&&(ne(),C(o[u],1,1,()=>{o[u]=null}),re()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),~e&&o[e].d(l)}}}function Cf(r,e,t){let n;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","el"];let s=De(e,i),o,a,{$$slots:l={},$$scope:c}=e,{transition:u=void 0}=e,{transitionConfig:f=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:h=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:m=void 0}=e,{asChild:g=!1}=e,{id:b=void 0}=e,{side:y="bottom"}=e,{align:M="center"}=e,{sideOffset:T=0}=e,{alignOffset:_=0}=e,{collisionPadding:E=8}=e,{avoidCollisions:W=!0}=e,{collisionBoundary:w=void 0}=e,{sameWidth:O=!0}=e,{fitViewport:S=!1}=e,{el:A=void 0}=e;const{elements:{menu:K},states:{open:H},ids:Y,getAttrs:oe}=Lr();ce(r,K,z=>t(24,a=z)),ce(r,H,z=>t(9,o=z));const P=Fr(),tn=oe("content");function Ke(z){pt.call(this,r,z)}function er(z){pt.call(this,r,z)}function tr(z){pt.call(this,r,z)}function ei(z){pt.call(this,r,z)}function ti(z){pt.call(this,r,z)}function ni(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}function ri(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}function ii(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}function si(z){Pe[z?"unshift":"push"](()=>{A=z,t(0,A)})}return r.$$set=z=>{e=ie(ie({},e),Dt(z)),t(13,s=De(e,i)),"transition"in z&&t(1,u=z.transition),"transitionConfig"in z&&t(2,f=z.transitionConfig),"inTransition"in z&&t(3,d=z.inTransition),"inTransitionConfig"in z&&t(4,h=z.inTransitionConfig),"outTransition"in z&&t(5,p=z.outTransition),"outTransitionConfig"in z&&t(6,m=z.outTransitionConfig),"asChild"in z&&t(7,g=z.asChild),"id"in z&&t(14,b=z.id),"side"in z&&t(15,y=z.side),"align"in z&&t(16,M=z.align),"sideOffset"in z&&t(17,T=z.sideOffset),"alignOffset"in z&&t(18,_=z.alignOffset),"collisionPadding"in z&&t(19,E=z.collisionPadding),"avoidCollisions"in z&&t(20,W=z.avoidCollisions),"collisionBoundary"in z&&t(21,w=z.collisionBoundary),"sameWidth"in z&&t(22,O=z.sameWidth),"fitViewport"in z&&t(23,S=z.fitViewport),"el"in z&&t(0,A=z.el),"$$scope"in z&&t(25,c=z.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&16384&&b&&Y.menu.set(b),r.$$.dirty[0]&16777216&&t(8,n=a),r.$$.dirty[0]&256&&Object.assign(n,tn),r.$$.dirty[0]&16744960&&o&&sf({side:y,align:M,sideOffset:T,alignOffset:_,collisionPadding:E,avoidCollisions:W,collisionBoundary:w,sameWidth:O,fitViewport:S})},[A,u,f,d,h,p,m,g,n,o,K,H,P,s,b,y,M,T,_,E,W,w,O,S,a,c,l,Ke,er,tr,ei,ti,ni,ri,ii,si]}class la extends je{constructor(e){super(),We(this,e,Cf,Sf,Ne,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,el:0},null,[-1,-1])}}const Mf=r=>({builder:r&8,placeholder:r&4}),Us=r=>({builder:r[3],placeholder:r[2]});function wf(r){let e,t,n,i=[r[3],r[6],{placeholder:r[2]}],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("input"),se(e,s)},m(o,a){v(o,e,a),e.autofocus&&e.focus(),r[11](e),t||(n=[qe(r[3].action(e)),ee(e,"m-click",r[5]),ee(e,"m-keydown",r[5]),ee(e,"m-input",r[5])],t=!0)},p(o,a){se(e,s=Fe(i,[a&8&&o[3],a&64&&o[6],a&4&&{placeholder:o[2]}]))},i:te,o:te,d(o){o&&D(e),r[11](null),t=!1,ut(n)}}}function Tf(r){let e;const t=r[10].default,n=me(t,r,r[9],Us);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&524)&&ge(n,t,i,i[9],e?ye(t,i[9],s,Mf):be(i[9]),Us)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Ef(r){let e,t,n,i;const s=[Tf,wf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function Of(r,e,t){let n;const i=["asChild","placeholder","el","id"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{placeholder:u=void 0}=e,{el:f=void 0}=e,{id:d=void 0}=e;const{elements:{input:h},ids:p,getAttrs:m}=Lr();ce(r,h,M=>t(8,o=M));const g=Fr(),b=m("input");function y(M){Pe[M?"unshift":"push"](()=>{f=M,t(0,f)})}return r.$$set=M=>{e=ie(ie({},e),Dt(M)),t(6,s=De(e,i)),"asChild"in M&&t(1,c=M.asChild),"placeholder"in M&&t(2,u=M.placeholder),"el"in M&&t(0,f=M.el),"id"in M&&t(7,d=M.id),"$$scope"in M&&t(9,l=M.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&d&&p.trigger.set(d),r.$$.dirty&256&&t(3,n=o),r.$$.dirty&8&&Object.assign(n,b)},[f,c,u,n,h,g,s,d,o,l,a,y]}class aa extends je{constructor(e){super(),We(this,e,Of,Ef,Ne,{asChild:1,placeholder:2,el:0,id:7})}}const Nf=r=>({builder:r&16,isSelected:r&32}),Hs=r=>({builder:r[4],isSelected:r[5]}),Af=r=>({builder:r&16,isSelected:r&32}),Gs=r=>({builder:r[4],isSelected:r[5]});function vf(r){let e,t,n,i;const s=r[14].default,o=me(s,r,r[13],Hs),a=o||xf(r);let l=[r[4],r[9]],c={};for(let u=0;u<l.length;u+=1)c=ie(c,l[u]);return{c(){e=R("div"),a.c(),se(e,c)},m(u,f){v(u,e,f),a.m(e,null),r[19](e),t=!0,n||(i=[qe(r[4].action(e)),ee(e,"m-click",r[8]),ee(e,"m-pointermove",r[8]),ee(e,"focusin",r[15]),ee(e,"keydown",r[16]),ee(e,"focusout",r[17]),ee(e,"pointerleave",r[18])],n=!0)},p(u,f){o?o.p&&(!t||f&8240)&&ge(o,s,u,u[13],t?ye(s,u[13],f,Nf):be(u[13]),Hs):a.p&&(!t||f&5)&&a.p(u,t?f:-1),se(e,c=Fe(l,[f&16&&u[4],f&512&&u[9]]))},i(u){t||(k(a,u),t=!0)},o(u){C(a,u),t=!1},d(u){u&&D(e),a.d(u),r[19](null),n=!1,ut(i)}}}function Df(r){let e;const t=r[14].default,n=me(t,r,r[13],Gs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&8240)&&ge(n,t,i,i[13],e?ye(t,i[13],s,Af):be(i[13]),Gs)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function xf(r){let e=(r[0]||r[2])+"",t;return{c(){t=he(e)},m(n,i){v(n,t,i)},p(n,i){i&5&&e!==(e=(n[0]||n[2])+"")&&xe(t,e)},d(n){n&&D(t)}}}function If(r){let e,t,n,i;const s=[Df,vf],o=[];function a(l,c){return l[3]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function Pf(r,e,t){let n,i;const s=["value","disabled","label","asChild","el"];let o=De(e,s),a,l,{$$slots:c={},$$scope:u}=e,{value:f}=e,{disabled:d=void 0}=e,{label:h=void 0}=e,{asChild:p=!1}=e,{el:m=void 0}=e;const{elements:{option:g},helpers:{isSelected:b},getAttrs:y}=rf(f);ce(r,g,S=>t(12,l=S)),ce(r,b,S=>t(11,a=S));const M=Fr(),T=y("item");function _(S){pt.call(this,r,S)}function E(S){pt.call(this,r,S)}function W(S){pt.call(this,r,S)}function w(S){pt.call(this,r,S)}function O(S){Pe[S?"unshift":"push"](()=>{m=S,t(1,m)})}return r.$$set=S=>{e=ie(ie({},e),Dt(S)),t(9,o=De(e,s)),"value"in S&&t(2,f=S.value),"disabled"in S&&t(10,d=S.disabled),"label"in S&&t(0,h=S.label),"asChild"in S&&t(3,p=S.asChild),"el"in S&&t(1,m=S.el),"$$scope"in S&&t(13,u=S.$$scope)},r.$$.update=()=>{r.$$.dirty&5&&!h&&typeof f=="string"&&t(0,h=f),r.$$.dirty&5125&&t(4,n=l({value:f,disabled:d,label:h})),r.$$.dirty&16&&Object.assign(n,T),r.$$.dirty&2052&&t(5,i=a(f))},[h,m,f,p,n,i,g,b,M,o,d,a,l,u,c,_,E,W,w,O]}class ca extends je{constructor(e){super(),We(this,e,Pf,If,Ne,{value:2,disabled:10,label:0,asChild:3,el:1})}}function Rf(){return{NAME:"separator",PARTS:["root"]}}function Bf(r){const{NAME:e,PARTS:t}=Rf(),n=ns(e,t),i={...Tu(rs(r)),getAttrs:n};return{...i,updateOption:is(i.options)}}const zf=r=>({builder:r&4}),Ys=r=>({builder:r[2]});function Ff(r){let e,t,n,i=[r[2],r[4]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=R("div"),se(e,s)},m(o,a){v(o,e,a),r[10](e),t||(n=qe(r[2].action(e)),t=!0)},p(o,a){se(e,s=Fe(i,[a&4&&o[2],a&16&&o[4]]))},i:te,o:te,d(o){o&&D(e),r[10](null),t=!1,n()}}}function Vf(r){let e;const t=r[9].default,n=me(t,r,r[8],Ys);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&260)&&ge(n,t,i,i[8],e?ye(t,i[8],s,zf):be(i[8]),Ys)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Lf(r){let e,t,n,i;const s=[Vf,Ff],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function jf(r,e,t){let n;const i=["orientation","decorative","asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{orientation:c="horizontal"}=e,{decorative:u=!0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{root:h},updateOption:p,getAttrs:m}=Bf({orientation:c,decorative:u});ce(r,h,y=>t(7,o=y));const g=m("root");function b(y){Pe[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=ie(ie({},e),Dt(y)),t(4,s=De(e,i)),"orientation"in y&&t(5,c=y.orientation),"decorative"in y&&t(6,u=y.decorative),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(8,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&p("orientation",c),r.$$.dirty&64&&p("decorative",u),r.$$.dirty&128&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,h,s,c,u,o,l,a,b]}class ua extends je{constructor(e){super(),We(this,e,jf,Lf,Ne,{orientation:5,decorative:6,asChild:1,el:0})}}function fa(){return{NAME:"tabs",PARTS:["root","content","list","trigger"]}}function Wf(r){const{NAME:e,PARTS:t}=fa(),n=ns(e,t),i={...ef(rs(r)),getAttrs:n};return zr(e,i),{...i,updateOption:is(i.options)}}function ds(){const{NAME:r}=fa();return Ut(r)}const qf=r=>({builder:r&4,value:r&8}),Xs=r=>({builder:r[2],value:r[3]}),Jf=r=>({builder:r&4,value:r&8}),Zs=r=>({builder:r[2],value:r[3]});function $f(r){let e,t,n,i;const s=r[15].default,o=me(s,r,r[14],Xs);let a=[r[2],r[6]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[16](e),t=!0,n||(i=qe(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&16396)&&ge(o,s,c,c[14],t?ye(s,c[14],u,qf):be(c[14]),Xs),se(e,l=Fe(a,[u&4&&c[2],u&64&&c[6]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[16](null),n=!1,i()}}}function Kf(r){let e;const t=r[15].default,n=me(t,r,r[14],Zs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&16396)&&ge(n,t,i,i[14],e?ye(t,i[14],s,Jf):be(i[14]),Zs)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function Uf(r){let e,t,n,i;const s=[Kf,$f],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function Hf(r,e,t){let n;const i=["orientation","activateOnFocus","loop","autoSet","value","onValueChange","asChild","el"];let s=De(e,i),o,a,{$$slots:l={},$$scope:c}=e,{orientation:u=void 0}=e,{activateOnFocus:f=void 0}=e,{loop:d=void 0}=e,{autoSet:h=void 0}=e,{value:p=void 0}=e,{onValueChange:m=void 0}=e,{asChild:g=!1}=e,{el:b=void 0}=e;const{elements:{root:y},states:{value:M},updateOption:T,getAttrs:_}=Wf({orientation:u,activateOnFocus:f,loop:d,autoSet:h,defaultValue:p,onValueChange:({next:w})=>(p!==w&&(m==null||m(w),t(7,p=w)),w)});ce(r,y,w=>t(13,o=w)),ce(r,M,w=>t(3,a=w));const E=_("root");function W(w){Pe[w?"unshift":"push"](()=>{b=w,t(0,b)})}return r.$$set=w=>{e=ie(ie({},e),Dt(w)),t(6,s=De(e,i)),"orientation"in w&&t(8,u=w.orientation),"activateOnFocus"in w&&t(9,f=w.activateOnFocus),"loop"in w&&t(10,d=w.loop),"autoSet"in w&&t(11,h=w.autoSet),"value"in w&&t(7,p=w.value),"onValueChange"in w&&t(12,m=w.onValueChange),"asChild"in w&&t(1,g=w.asChild),"el"in w&&t(0,b=w.el),"$$scope"in w&&t(14,c=w.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&p!==void 0&&M.set(p),r.$$.dirty&256&&T("orientation",u),r.$$.dirty&512&&T("activateOnFocus",f),r.$$.dirty&1024&&T("loop",d),r.$$.dirty&2048&&T("autoSet",h),r.$$.dirty&8192&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,E)},[b,g,n,a,y,M,s,p,u,f,d,h,m,o,c,l,W]}class Gf extends je{constructor(e){super(),We(this,e,Hf,Uf,Ne,{orientation:8,activateOnFocus:9,loop:10,autoSet:11,value:7,onValueChange:12,asChild:1,el:0})}}const Yf=r=>({builder:r&4}),Qs=r=>({builder:r[2]}),Xf=r=>({builder:r&4}),eo=r=>({builder:r[2]});function Zf(r){let e,t,n,i;const s=r[8].default,o=me(s,r,r[7],Qs);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[9](e),t=!0,n||(i=qe(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&132)&&ge(o,s,c,c[7],t?ye(s,c[7],u,Yf):be(c[7]),Qs),se(e,l=Fe(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[9](null),n=!1,i()}}}function Qf(r){let e;const t=r[8].default,n=me(t,r,r[7],eo);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&132)&&ge(n,t,i,i[7],e?ye(t,i[7],s,Xf):be(i[7]),eo)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function ed(r){let e,t,n,i;const s=[Qf,Zf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function td(r,e,t){let n;const i=["value","asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{asChild:u=!1}=e,{el:f=void 0}=e;const{elements:{content:d},getAttrs:h}=ds();ce(r,d,g=>t(6,o=g));const p=h("content");function m(g){Pe[g?"unshift":"push"](()=>{f=g,t(0,f)})}return r.$$set=g=>{e=ie(ie({},e),Dt(g)),t(4,s=De(e,i)),"value"in g&&t(5,c=g.value),"asChild"in g&&t(1,u=g.asChild),"el"in g&&t(0,f=g.el),"$$scope"in g&&t(7,l=g.$$scope)},r.$$.update=()=>{r.$$.dirty&96&&t(2,n=o(c)),r.$$.dirty&4&&Object.assign(n,p)},[f,u,n,d,s,c,o,l,a,m]}class nd extends je{constructor(e){super(),We(this,e,td,ed,Ne,{value:5,asChild:1,el:0})}}const rd=r=>({builder:r&4}),to=r=>({builder:r[2]}),id=r=>({builder:r&4}),no=r=>({builder:r[2]});function sd(r){let e,t,n,i;const s=r[7].default,o=me(s,r,r[6],to);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("div"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),r[8](e),t=!0,n||(i=qe(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&68)&&ge(o,s,c,c[6],t?ye(s,c[6],u,rd):be(c[6]),to),se(e,l=Fe(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[8](null),n=!1,i()}}}function od(r){let e;const t=r[7].default,n=me(t,r,r[6],no);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&68)&&ge(n,t,i,i[6],e?ye(t,i[6],s,id):be(i[6]),no)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function ld(r){let e,t,n,i;const s=[od,sd],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function ad(r,e,t){let n;const i=["asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{el:u=void 0}=e;const{elements:{list:f},getAttrs:d}=ds();ce(r,f,m=>t(5,o=m));const h=d("list");function p(m){Pe[m?"unshift":"push"](()=>{u=m,t(0,u)})}return r.$$set=m=>{e=ie(ie({},e),Dt(m)),t(4,s=De(e,i)),"asChild"in m&&t(1,c=m.asChild),"el"in m&&t(0,u=m.el),"$$scope"in m&&t(6,l=m.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,h)},[u,c,n,f,s,o,l,a,p]}class cd extends je{constructor(e){super(),We(this,e,ad,ld,Ne,{asChild:1,el:0})}}const ud=r=>({builder:r&4}),ro=r=>({builder:r[2]}),fd=r=>({builder:r&4}),io=r=>({builder:r[2]});function dd(r){let e,t,n,i;const s=r[10].default,o=me(s,r,r[9],ro);let a=[r[2],{type:"button"},r[5]],l={};for(let c=0;c<a.length;c+=1)l=ie(l,a[c]);return{c(){e=R("button"),o&&o.c(),se(e,l)},m(c,u){v(c,e,u),o&&o.m(e,null),e.autofocus&&e.focus(),r[11](e),t=!0,n||(i=[qe(r[2].action(e)),ee(e,"m-click",r[4]),ee(e,"m-focus",r[4]),ee(e,"m-keydown",r[4])],n=!0)},p(c,u){o&&o.p&&(!t||u&516)&&ge(o,s,c,c[9],t?ye(s,c[9],u,ud):be(c[9]),ro),se(e,l=Fe(a,[u&4&&c[2],{type:"button"},u&32&&c[5]]))},i(c){t||(k(o,c),t=!0)},o(c){C(o,c),t=!1},d(c){c&&D(e),o&&o.d(c),r[11](null),n=!1,ut(i)}}}function hd(r){let e;const t=r[10].default,n=me(t,r,r[9],io);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&516)&&ge(n,t,i,i[9],e?ye(t,i[9],s,fd):be(i[9]),io)},i(i){e||(k(n,i),e=!0)},o(i){C(n,i),e=!1},d(i){n&&n.d(i)}}}function pd(r){let e,t,n,i;const s=[hd,dd],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),v(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(ne(),C(o[u],1,1,()=>{o[u]=null}),re(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){C(t),i=!1},d(l){l&&D(n),o[e].d(l)}}}function md(r,e,t){let n;const i=["value","disabled","asChild","el"];let s=De(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{disabled:u=void 0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{trigger:h},getAttrs:p}=ds();ce(r,h,y=>t(8,o=y));const m=Fr(),g=p("trigger");function b(y){Pe[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=ie(ie({},e),Dt(y)),t(5,s=De(e,i)),"value"in y&&t(6,c=y.value),"disabled"in y&&t(7,u=y.disabled),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(9,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&448&&t(2,n=o({value:c,disabled:u})),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,h,m,s,c,u,o,l,a,b]}class gd extends je{constructor(e){super(),We(this,e,md,pd,Ne,{value:6,disabled:7,asChild:1,el:0})}}/*!
2
2
  * deep-eql
3
3
  * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
4
4
  * MIT Licensed