PageSourceSearch

https://swisschess.ch/_nuxt/DOFw-xWB.js

js swisschess.ch collected 2026-10-02 21:21:40 UTC 643,241 bytes, 30 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BBMRuxCa.js","./entry.DQjQ3ZMO.css"])))=>i.map(i=>d[i]);
2import{_ as to}from"./DzDzduqt.js";import{_ as nn}from"./CEq3-3M3.js";import{_ as zs}from"./D9BTtWkk.js";import{E as no,aE as lc,d as J,s as dr,v as je,o as b,m as O,h as S,x as ie,b as f,k as Bt,K as H,B as $,C as ac,aF as ro,q as Sl,X as uc,y as Ce,V as cc,e as T,A as dc,aG as fc,P as qe,aH as kp,ac as dt,az as oo,g as A,aI as Ap,j as ne,aJ as pc,aK as mc,t as E,aL as Dp,aM as Sp,H as Rr,aN as Ep,aO as ut,J as hc,aP as Fp,aQ as Ht,c as _,F as W,r as de,i as w,_ as Ps,av as Se,a7 as Ae,a6 as ke,W as K,a as ot,N as Gn,O as Kn,Z as gt,af as Le,as as mt,aR as Bp,w as Qe,ah as gc,aw as Mr,ax as _r,ay as kr,ae as Wn,M as so,aS as El,Q as Vs,S as js,a4 as Re,f as bt,ag as ct,aT as Fl,aU as jr,aa as xn,$ as Fn,aV as _n,aW as Ia,aX as Rp,aY as bc,aZ as Rn,a_ as La,a$ as fi,u as Mp,b0 as Tp,b1 as $p,b2 as Ip,b3 as Lp,ai as yc,aj as Op,ak as vc,al as Hs,a9 as Np,a8 as qp,a0 as xc,b4 as Cc,b5 as wc,b6 as zp,b7 as Pp,b8 as _c,b9 as Vp,ba as Uo,bb as Ln,bc as jp,aA as un,bd as Ar,aq as Us,be as en,bf as _t,bg as fr,ad as Gs,bh as Jn,bi as Hp,bj as kc,a2 as Ac,bk as Up,bl as Gp,T as Dc,bm as Kp,bn as Wp,z as mo,bo as Jp,bp as Yp,bq as Qp,br as Zp,bs as Xp,bt as em,bu as tm,bv as nm,ar as rm,bw as om,D as sm}from"./BBMRuxCa.js";import{u as Ut}from"./BjWeoK67.js";import{u as rn}from"./CggafTFy.js";import{_ as im,u as lm}from"./CVUP4cAE.js";import{S as am,a as Ks,_ as um}from"./DBrrdIfO.js";import{_ as io}from"./DlAUqK2U.js";import{_ as pr}from"./B3dhEdvw.js";import{a as Hi,M as cm}from"./Dhs1NUnu.js";import{_ as Bl}from"./DWKLk9ao.js";import{_ as dm}from"./C9Bl0LkX.js";import{_ as fm,S as pm}from"./lMc9kCVi.js";import{_ as mm}from"./R_YyUzXd.js";import{u as hm}from"./LUN_N2kE.js";import{a as Sc}from"./CkBaL6sE.js";import{g as gm}from"./CYRng7Uy.js";import{_ as bm}from"./BUsHhbzb.js";import{M as ym}from"./Dhq7v6Zs.js";function vm(t){return t?t[0].toUpperCase()+t.slice(1):""}function xm(t=[],e,n){const r=[...t];return r[n]=e,r.sort((o,s)=>o-s)}function Ec(t,e,n){const s=100/(n-e)*(t-e);return lc(s,0,100)}function Cm(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function wm(t,e){if(t.length===1)return 0;const n=t.map(o=>Math.abs(o-e)),r=Math.min(...n);return n.indexOf(r)}function _m(t,e,n){const r=t/2,s=Rl([0,50],[0,r]);return(r-s(e)*n)*n}function km(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function Am(t,e){if(e>0){const n=km(t);return Math.min(...n)>=e}return!0}function Rl(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Dm(t){return(String(t).split(".")[1]||"").length}function Sm(t,e){const n=10**e;return Math.round(t*n)/n}const Fc=["PageUp","PageDown"],Bc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Rc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[Mc,Tc]=no(["SliderVertical","SliderHorizontal"]);var Em=J({__name:"SliderHorizontal",props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(t,{emit:e}){const n=t,r=e,{max:o,min:s,dir:i,inverted:l}=dr(n),{forwardRef:a,currentElement:u}=je(),c=mr(),d=H(),p=H(),m=$(()=>i?.value!=="rtl"&&!l.value||i?.value!=="ltr"&&l.value);function h(C,x){const k=p.value||u.value.getBoundingClientRect(),D=[...c.thumbElements.value][c.valueIndexToChangeRef.value],F=c.thumbAlignment.value==="contain"?D.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=C.clientX-D.getBoundingClientRect().left);const B=[0,k.width-F],R=m.value?[s.value,o.value]:[o.value,s.value],q=Rl(B,R);p.value=k;const N=x?C.clientX-k.left-F/2:C.clientX-k.left-(d.value??0);return q(N)}const g=$(()=>m.value?"left":"right"),y=$(()=>m.value?"right":"left"),v=$(()=>m.value?1:-1);return Tc({startEdge:g,endEdge:y,direction:v,size:"width"}),(C,x)=>(b(),O($c,{ref:f(a),dir:f(i),"data-orientation":"horizontal",style:Bt({"--reka-slider-thumb-transform":!m.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=k=>{const D=h(k,!0);r("slideStart",D)}),onSlideMove:x[1]||(x[1]=k=>{const D=h(k);r("slideMove",D)}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,r("slideEnd")}),onStepKeyDown:x[3]||(x[3]=k=>{const D=m.value?"from-left":"from-right",F=f(Rc)[D].includes(k.key);r("stepKeyDown",k,F?-1:1)}),onEndKeyDown:x[4]||(x[4]=k=>r("endKeyDown",k)),onHomeKeyDown:x[5]||(x[5]=k=>r("homeKeyDown",k))},{default:S(()=>[ie(C.$slots,"default")]),_:3},8,["dir","style"]))}}),Fm=Em,Bm=J({__name:"SliderVertical",props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(t,{emit:e}){const n=t,r=e,{max:o,min:s,inverted:i}=dr(n),l=mr(),{forwardRef:a,currentElement:u}=je(),c=H(),d=H(),p=$(()=>!i.value);function m(v,C){const x=d.value||u.value.getBoundingClientRect(),k=[...l.thumbElements.value][l.valueIndexToChangeRef.value],D=l.thumbAlignment.value==="contain"?k.clientHeight:0;!c.value&&!C&&l.thumbAlignment.value==="contain"&&(c.value=v.clientY-k.getBoundingClientRect().top);const F=[0,x.height-D],B=p.value?[o.value,s.value]:[s.value,o.value],R=Rl(F,B),q=C?v.clientY-x.top-D/2:v.clientY-x.top-(c.value??0);return d.value=x,R(q)}const h=$(()=>p.value?"bottom":"top"),g=$(()=>p.value?"top":"bottom"),y=$(()=>p.value?1:-1);return Tc({startEdge:h,endEdge:g,direction:y,size:"height"}),(v,C)=>(b(),O($c,{ref:f(a),"data-orientation":"vertical",style:Bt({"--reka-slider-thumb-transform":!p.value&&f(l).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:C[0]||(C[0]=x=>{const k=m(x,!0);r("slideStart",k)}),onSlideMove:C[1]||(C[1]=x=>{const k=m(x);r("slideMove",k)}),onSlideEnd:C[2]||(C[2]=()=>{d.value=void 0,c.value=void 0,r("slideEnd")}),onStepKeyDown:C[3]||(C[3]=x=>{const k=p.value?"from-bottom":"from-top",D=f(Rc)[k].includes(x.key);r("stepKeyDown",x,D?-1:1)}),onEndKeyDown:C[4]||(C[4]=x=>r("endKeyDown",x)),onHomeKeyDown:C[5]||(C[5]=x=>r("homeKeyDown",x))},{default:S(()=>[ie(v.$slots,"default")]),_:3},8,["style"]))}}),Rm=Bm;const[mr,Mm]=no("SliderRoot");var Tm=J({inheritAttrs:!1,__name:"SliderRoot",props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:"contain"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","valueCommit"],setup(t,{emit:e}){const n=t,r=e,{min:o,max:s,step:i,minStepsBetweenThumbs:l,orientation:a,disabled:u,thumbAlignment:c,dir:d}=dr(n),p=ac(d),{forwardRef:m,currentElement:h}=je(),g=dc(h),{CollectionSlot:y}=ro({isProvider:!0}),v=Sl(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),C=$(()=>Array.isArray(v.value)?[...v.value]:[]),x=H(0),k=H(C.value);function D(N){const X=wm(C.value,N);R(N,X)}function F(N){R(N,x.value)}function B(){const N=k.value[x.value];C.value[x.value]!==N&&r("valueCommit",fc(C.value))}function R(N,X,{commit:V}={commit:!1}){const G=Dm(i.value),Y=Sm(Math.round((N-o.value)/i.value)*i.value+o.value,G),ee=lc(Y,o.value,s.value),ue=xm(C.value,ee,X);if(Am(ue,l.value*i.value)){x.value=ue.indexOf(ee);const le=String(ue)!==String(v.value);le&&V&&r("valueCommit",ue),le&&(q.value[x.value]?.focus(),v.value=ue)}}const q=H([]);return Mm({modelValue:v,currentModelValue:C,valueIndexToChangeRef:x,thumbElements:q,orientation:a,min:o,max:s,disabled:u,thumbAlignment:c}),(N,X)=>(b(),O(f(y),null,{default:S(()=>[(b(),O(uc(f(a)==="horizontal"?Fm:Rm),Ce(N.$attrs,{ref:f(m),"as-child":N.asChild,as:N.as,min:f(o),max:f(s),dir:f(p),inverted:N.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:X[0]||(X[0]=()=>{f(u)||(k.value=C.value)}),onSlideStart:X[1]||(X[1]=V=>!f(u)&&D(V)),onSlideMove:X[2]||(X[2]=V=>!f(u)&&F(V)),onSlideEnd:X[3]||(X[3]=V=>!f(u)&&B()),onHomeKeyDown:X[4]||(X[4]=V=>!f(u)&&R(f(o),0,{commit:!0})),onEndKeyDown:X[5]||(X[5]=V=>!f(u)&&R(f(s),C.value.length-1,{commit:!0})),onStepKeyDown:X[6]||(X[6]=(V,G)=>
2{if(!f(u)){const ue=f(Fc).includes(V.key)||V.shiftKey&&f(Bc).includes(V.key)?10:1,le=x.value,ye=C.value[le],L=f(i)*ue*G;R(ye+L,le,{commit:!0})}})}),{default:S(()=>[ie(N.$slots,"default",{modelValue:f(v)}),f(g)&&N.name?(b(),O(f(cc),{key:0,type:"number",value:f(v),name:N.name,required:N.required,disabled:f(u),step:f(i)},null,8,["value","name","required","disabled","step"])):T("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),$m=Tm,Im=J({__name:"SliderImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(t,{emit:e}){const n=t,r=e,o=mr();return(s,i)=>(b(),O(f(qe),Ce({"data-slider-impl":""},n,{onKeydown:i[0]||(i[0]=l=>{l.key==="Home"?(r("homeKeyDown",l),l.preventDefault()):l.key==="End"?(r("endKeyDown",l),l.preventDefault()):f(Fc).concat(f(Bc)).includes(l.key)&&(r("stepKeyDown",l),l.preventDefault())}),onPointerdown:i[1]||(i[1]=l=>{const a=l.target;a.setPointerCapture(l.pointerId),l.preventDefault(),f(o).thumbElements.value.includes(a)?a.focus():r("slideStart",l)}),onPointermove:i[2]||(i[2]=l=>{l.target.hasPointerCapture(l.pointerId)&&r("slideMove",l)}),onPointerup:i[3]||(i[3]=l=>{const a=l.target;a.hasPointerCapture(l.pointerId)&&(a.releasePointerCapture(l.pointerId),r("slideEnd",l))})}),{default:S(()=>[ie(s.$slots,"default")]),_:3},16))}}),$c=Im,Lm=J({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=mr(),n=Mc();je();const r=$(()=>e.currentModelValue.value.map(i=>Ec(i,e.min.value,e.max.value))),o=$(()=>e.currentModelValue.value.length>1?Math.min(...r.value):0),s=$(()=>100-Math.max(...r.value,0));return(i,l)=>(b(),O(f(qe),{"data-disabled":f(e).disabled.value?"":void 0,"data-orientation":f(e).orientation.value,"as-child":i.asChild,as:i.as,style:Bt({[f(n).startEdge.value]:`${o.value}%`,[f(n).endEdge.value]:`${s.value}%`})},{default:S(()=>[ie(i.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),Om=Lm,Nm=J({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=mr(),r=Mc(),{forwardRef:o,currentElement:s}=je(),{CollectionItem:i}=ro(),l=$(()=>n.modelValue?.value?.[e.index]),a=$(()=>l.value===void 0?0:Ec(l.value,n.min.value??0,n.max.value??100)),u=$(()=>Cm(e.index,n.modelValue?.value?.length??0)),c=kp(s),d=$(()=>c[r.size].value),p=$(()=>n.thumbAlignment.value==="overflow"||!d.value?0:_m(d.value,a.value,r.direction.value)),m=Ap();return dt(()=>{n.thumbElements.value.push(s.value)}),oo(()=>{const h=n.thumbElements.value.findIndex(g=>g===s.value)??-1;n.thumbElements.value.splice(h,1)}),(h,g)=>(b(),O(f(i),null,{default:S(()=>[A(f(qe),Ce(h.$attrs,{ref:f(o),role:"slider",tabindex:f(n).disabled.value?void 0:0,"aria-label":h.$attrs["aria-label"]||u.value,"data-disabled":f(n).disabled.value?"":void 0,"data-orientation":f(n).orientation.value,"aria-valuenow":l.value,"aria-valuemin":f(n).min.value,"aria-valuemax":f(n).max.value,"aria-orientation":f(n).orientation.value,"as-child":h.asChild,as:h.as,style:{transform:"var(--reka-slider-thumb-transform)",position:"absolute",[f(r).startEdge.value]:`calc(${a.value}% + ${p.value}px)`,display:!f(m)&&l.value===void 0?"none":void 0},onFocus:g[0]||(g[0]=()=>{f(n).valueIndexToChangeRef.value=h.index})}),{default:S(()=>[ie(h.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),qm=Nm,zm=J({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,{getItems:n}=ro(),{forwardRef:r,currentElement:o}=je(),s=$(()=>o.value?n(!0).findIndex(i=>i.ref===o.value):-1);return(i,l)=>(b(),O(qm,Ce({ref:f(r)},e,{index:s.value}),{default:S(()=>[ie(i.$slots,"default")]),_:3},16,["index"]))}}),Oa=zm,Pm=J({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=mr();return je(),(n,r)=>(b(),O(f(qe),{"as-child":n.asChild,as:n.as,"data-disabled":f(e).disabled.value?"":void 0,"data-orientation":f(e).orientation.value},{default:S(()=>[ie(n.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),Vm=Pm,jm=J({__name:"PaginationEllipsis",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return je(),(n,r)=>(b(),O(f(qe),Ce(e,{"data-type":"ellipsis"}),{default:S(()=>[ie(n.$slots,"default",{},()=>[r[0]||(r[0]=ne("…"))])]),_:3},16))}}),Hm=jm;const[hr,Um]=no("PaginationRoot");var Gm=J({__name:"PaginationRoot",props:{page:{type:Number,required:!1},defaultPage:{type:Number,required:!1,default:1},itemsPerPage:{type:Number,required:!0},total:{type:Number,required:!1,default:0},siblingCount:{type:Number,required:!1,default:2},disabled:{type:Boolean,required:!1},showEdges:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:page"],setup(t,{emit:e}){const n=t,r=e,{siblingCount:o,disabled:s,showEdges:i}=dr(n);je();const l=Sl(n,"page",r,{defaultValue:n.defaultPage,passive:n.page===void 0}),a=$(()=>Math.max(1,Math.ceil(n.total/(n.itemsPerPage||1))));return Um({page:l,onPageChange(u){l.value=u},pageCount:a,siblingCount:o,disabled:s,showEdges:i}),(u,c)=>(b(),O(f(qe),{as:u.as,"as-child":u.asChild},{default:S(()=>[ie(u.$slots,"default",{page:f(l),pageCount:a.value})]),_:3},8,["as","as-child"]))}}),Km=Gm,Wm=J({__name:"PaginationFirst",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=hr();je();const r=$(()=>n.page.value===1||n.disabled.value);return(o,s)=>(b(),O(f(qe),Ce(e,{"aria-label":"First Page",type:o.as==="button"?"button":void 0,disabled:r.value,onClick:s[0]||(s[0]=i=>!r.value&&f(n).onPageChange(1))}),{default:S(()=>[ie(o.$slots,"default",{},()=>[s[1]||(s[1]=ne("First page"))])]),_:3},16,["type","disabled"]))}}),Jm=Wm,Ym=J({__name:"PaginationLast",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=hr();je();const r=$(()=>n.page.value===n.pageCount.value||n.disabled.value);return(o,s)=>(b(),O(f(qe),Ce(e,{"aria-label":"Last Page",type:o.as==="button"?"button":void 0,disabled:r.value,onClick:s[0]||(s[0]=i=>!r.value&&f(n).onPageChange(f(n).pageCount.value))}),{default:S(()=>[ie(o.$slots,"default",{},()=>[s[1]||(s[1]=ne("Last page"))])]),_:3},16,["type","disabled"]))}}),Qm=Ym;function ln(t,e){const n=e-t+1;return Array.from({length:n},(r,o)=>o+t)}function Zm(t){return t.map(e=>typeof e=="number"?{type:"page",value:e}:{type:"ellipsis"})}const ho="ellipsis";function Xm(t,e,n,r){const s=e,i=Math.max(t-n,1),l=Math.min(t+n,s);if(r){const u=Math.min(2*n+5,e)-2,c=i>3&&Math.abs(s-u-1+1)>2&&Math.abs(i-1)>2,d=l<s-2&&Math.abs(s-u)>2&&Math.abs(s-l)>2;if(!c&&d)return[...ln(1,u),ho,s];if(c&&!d){const m=ln(s-u+1,s);return[1,ho,...m]}if(c&&d){const m=ln(i,l);return[1,ho,...m,ho,s]}return ln(1,s)}else{const a=n*2+1;return e<a?ln(1,s):t<=n+1?ln(1,a):e-t<=n?ln(e-a+1,s):ln(i,l)}}var eh=J({__name:"PaginationList",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;je();const n=hr(),r=$(()=>Zm(Xm(n.page.value,n.pageCount.value,n.siblingCount.value,n.showEdges.value)));return(o,s)=>(b(),O(f(qe),pc(mc(e)),{default:S(()=>[ie(o.$slots,"default",{items:r.value})]),_:3},16))}}),th=eh,nh=J({__name:"PaginationListItem",props:{value:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;je();const n=hr(),r=$(()=>n.page.value===e.value),o=$(()=>n.disabled.value);return(s,i)=>(b(),O(f(qe),Ce(e,{"data-type":"page","aria-label":`Page ${s.value}`,"aria-current":r.value?"page":void 0,"data-selected":r.value?"true":void 0,disabled:o.value,type:s.as==="button"?"button":void 0,onClick:i[0]||(i[0]=l=>!o.value&&f(n).onPageChange(s.value))}),{default:S(()=>[ie(s.$slots,"default",{},()=>[ne(E(s.value),1)])]),_:3},16,["aria-label","aria-current","data-selected","disabled","type"]))}}),rh=nh,oh=J({__name:"PaginationNext",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;je();const n=hr(),r=$(()=>n.page.value===n.pageCount.value||n.disabled.value);return(o,s)=>(b(),O(f(qe),Ce(e,{"aria-label":"Next Page",type:o.as==="button"?"button":void 0,disabled:r.value,onClick:s[0]||(s[0]=i=>!r.value&&f(n).onPageChange(f(n).page.value+1))}),{default:S(()=>[ie(o.$slots,"default",{},()=>[s[1]||(s[1]=ne("Next page"))])]),_:3},16,["type","disabled"]))}}),sh=oh,ih=J({__name:"PaginationPrev",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;je();const n=hr(),r=$(()=>n.page.value===1||n.disabled.value);return(o,s)=>(b(),O(f(qe),Ce(e,{"aria-label":"Previous Page",type:o.as==="button"?"button":void 0,disabled:r.value,onClick:s[0]||(s[0]=i=>!r.value&&f(n).onPageChange(f(n).page.value-1))}),{default:S(()=>[ie(o.$slots,"default",{},()=>[s[1]||(s[1]=ne("Prev page"))])]),_:3},16,["type","disabled"]))}}),lh=ih;const[Ml,ah]=no("TagsInputRoot");var uh=J({__name:"TagsInputRoot",props:{modelValue:{type:[Array,null],required:!1},defaultValue:{type:Array,required:!1,default:()=>[]},addOnPaste:{type:Boolean,required:!1},addOnTab:{type:Boolean,required:!1},addOnBlur:{type:Boolean,required:!1},duplicate:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},delimiter:{type:null,required:!1,default:","},dir:{type:String,required:!1},max:{type:Number,required:!1,default:0},id:{type:String,required:!1},convertValue:{type:Function,required:!1},displayValue:{type:Function,required:!1,default:t=>t.toString()},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}}
2,emits:["update:modelValue","invalid","addTag","removeTag"],setup(t,{emit:e}){const n=t,r=e,{addOnPaste:o,disabled:s,delimiter:i,max:l,id:a,dir:u,addOnBlur:c,addOnTab:d}=dr(n),p=ac(u),m=Sl(n,"modelValue",r,{defaultValue:n.defaultValue,passive:!0,deep:!0}),{forwardRef:h,currentElement:g}=je(),{focused:y}=Dp(g),v=dc(g),{getItems:C,CollectionSlot:x}=ro({isProvider:!0}),k=H(),D=H(!1),F=$(()=>Array.isArray(m.value)?[...m.value]:[]);function B(R){if(R!==-1){const q=C().filter(N=>N.ref.dataset.disabled!=="");m.value=m.value.filter((N,X)=>X!==R),r("removeTag",q[R].value)}}return ah({modelValue:m,onAddValue:R=>{const q=[...F.value],N=q.length>0&&typeof q[0]=="object",X=q.length>0&&typeof n.defaultValue[0]=="object";if((N||X)&&typeof n.convertValue!="function")throw new Error("You must provide a `convertValue` function when using objects as values.");const V=n.convertValue?n.convertValue(R):R;if(q.length>=l.value&&l.value)return r("invalid",V),!1;if(n.duplicate)return m.value=[...q,V],r("addTag",V),!0;if(q.includes(V))D.value=!0;else return m.value=[...q,V],r("addTag",V),!0;return r("invalid",V),!1},onRemoveValue:B,onInputKeydown:R=>{if(R.isComposing)return;const q=R.target,N=C().map(V=>V.ref).filter(V=>V.dataset.disabled!=="");if(!N.length)return;const X=N.at(-1);switch(R.key){case"Delete":case"Backspace":{if(q.selectionStart!==0||q.selectionEnd!==0)break;if(k.value){const V=N.findIndex(G=>G===k.value);B(V),k.value=k.value===X?N.at(V-1):N.at(V+1),R.preventDefault()}else R.key==="Backspace"&&(k.value=X,R.preventDefault());break}case"Home":case"End":case"ArrowRight":case"ArrowLeft":{const V=R.key==="ArrowRight"&&p.value==="ltr"||R.key==="ArrowLeft"&&p.value==="rtl",G=!V;if(q.selectionStart!==0||q.selectionEnd!==0)break;if(G&&!k.value)k.value=X,R.preventDefault();else if(V&&X&&k.value===X)k.value=void 0,R.preventDefault();else if(k.value){const Y=Sp(R,k.value,void 0,{itemsArray:N,loop:!1,dir:p.value});Y&&(k.value=Y),R.preventDefault()}break}case"ArrowUp":case"ArrowDown":{k.value&&R.preventDefault();break}default:k.value=void 0}},selectedElement:k,isInvalidInput:D,addOnPaste:o,addOnBlur:c,addOnTab:d,dir:p,disabled:s,delimiter:i,max:l,id:a,displayValue:n.displayValue}),(R,q)=>(b(),O(f(x),null,{default:S(()=>[A(f(qe),{ref:f(h),dir:f(p),as:R.as,"as-child":R.asChild,"data-invalid":D.value?"":void 0,"data-disabled":f(s)?"":void 0,"data-focused":f(y)?"":void 0},{default:S(()=>[ie(R.$slots,"default",{modelValue:f(m)}),f(v)&&R.name?(b(),O(f(cc),{key:0,name:R.name,value:f(m),required:R.required,disabled:f(s)},null,8,["name","value","required","disabled"])):T("v-if",!0)]),_:3},8,["dir","as","as-child","data-invalid","data-disabled","data-focused"])]),_:3}))}}),ch=uh,dh=J({__name:"TagsInputInput",props:{placeholder:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},maxLength:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},setup(t){const e=t,n=Ml(),{forwardRef:r,currentElement:o}=je();function s(h){if(n.selectedElement.value=void 0,!n.addOnBlur.value)return;const g=h.target,y=h.relatedTarget,v=g.getAttribute("aria-controls");if(v&&y?.closest(`#${CSS.escape(v)}`)||!g.value)return;n.onAddValue(g.value)&&(g.value="")}function i(h){n.addOnTab.value&&c(h)}const{isComposing:l,handleCompositionStart:a,handleCompositionEnd:u}=Ep();async function c(h){if(l.value||(await ut(),h.defaultPrevented))return;const g=h.target;if(!g.value)return;n.onAddValue(g.value)&&(g.value=""),h.preventDefault()}function d(h){if(l.value||(n.isInvalidInput.value=!1,h.data===null))return;const g=n.delimiter.value;if(g===h.data||g instanceof RegExp&&g.test(h.data)){const v=h.target;if(v.value=v.value.replace(g,""),v.value.trim()===""){v.value="";return}n.onAddValue(v.value)&&(v.value="")}}function p(h){l.value||n.onInputKeydown(h)}function m(h){if(n.addOnPaste.value){h.preventDefault();const g=h.clipboardData;if(!g)return;const y=g.getData("text");n.delimiter.value?y.split(n.delimiter.value).forEach(C=>{n.onAddValue(C)}):n.onAddValue(y)}}return dt(()=>{const h=o.value.nodeName==="INPUT"?o.value:o.value.querySelector("input");h&&setTimeout(()=>{e.autoFocus&&h?.focus()},1)}),(h,g)=>(b(),O(f(qe),{id:f(n).id?.value,ref:f(r),type:"text",autocomplete:"off",autocorrect:"off",autocapitalize:"off",as:h.as,"as-child":h.asChild,maxlength:h.maxLength,placeholder:h.placeholder,disabled:f(n).disabled.value,"data-invalid":f(n).isInvalidInput.value?"":void 0,onInput:d,onKeydown:[Rr(c,["enter"]),Rr(i,["tab"]),p],onBlur:s,onCompositionstart:f(a),onCompositionend:f(u),onPaste:m},{default:S(()=>[ie(h.$slots,"default")]),_:3},8,["id","as","as-child","maxlength","placeholder","disabled","data-invalid","onCompositionstart","onCompositionend"]))}}),fh=dh;const[Ic,ph]=no("TagsInputItem");var mh=J({__name:"TagsInputItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{value:n}=dr(e),r=Ml(),{forwardRef:o,currentElement:s}=je(),{CollectionItem:i}=ro(),l=$(()=>r.selectedElement.value===s.value),a=$(()=>e.disabled||r.disabled.value),u=ph({value:n,isSelected:l,disabled:a,textId:"",displayValue:$(()=>r.displayValue(n.value))});return(c,d)=>(b(),O(f(i),{value:f(n)},{default:S(()=>[A(f(qe),{ref:f(o),as:c.as,"as-child":c.asChild,"aria-labelledby":f(u).textId,"aria-current":l.value,"data-disabled":a.value?"":void 0,"data-state":l.value?"active":"inactive"},{default:S(()=>[ie(c.$slots,"default")]),_:3},8,["as","as-child","aria-labelledby","aria-current","data-disabled","data-state"])]),_:3},8,["value"]))}}),hh=mh,gh=J({__name:"TagsInputItemDelete",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;je();const n=Ml(),r=Ic(),o=$(()=>r.disabled?.value||n.disabled.value);function s(){if(o.value)return;const i=n.modelValue.value.findIndex(l=>hc(l,r.value.value));n.onRemoveValue(i)}return(i,l)=>(b(),O(f(qe),Ce({tabindex:"-1"},e,{"aria-labelledby":f(r).textId,"aria-current":f(r).isSelected.value,"data-state":f(r).isSelected.value?"active":"inactive","data-disabled":o.value?"":void 0,type:i.as==="button"?"button":void 0,onClick:s}),{default:S(()=>[ie(i.$slots,"default")]),_:3},16,["aria-labelledby","aria-current","data-state","data-disabled","type"]))}}),bh=gh,yh=J({__name:"TagsInputItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=Ic();
vendor: 6,155 bytes, line 2
2return je(),n.textId||=Fp(void 0,"reka-tags-input-item-text"),(r,o)=>(b(),O(f(qe),Ce(e,{id:f(n).textId}),{default:S(()=>[ie(r.$slots,"default",{},()=>[ne(E(f(n).displayValue.value),1)])]),_:3},16,["id"]))}}),vh=yh;function Je(t){this.content=t}Je.prototype={constructor:Je,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),s=r.content.slice();return o==-1?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new Je(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Je(n)},addToStart:function(t,e){return new Je([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Je(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),s=r.find(t);return o.splice(s==-1?o.length:s,0,e,n),new Je(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Je.from(t),t.size?new Je(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Je.from(t),t.size?new Je(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Je.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Je.from=function(t){if(t instanceof Je)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Je(e)};function Lc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)n++;return n}if(o.content.size||s.content.size){let i=Lc(o.content,s.content,n+1);if(i!=null)return i}n+=o.nodeSize}}function Oc(t,e,n,r){for(let o=t.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:n,b:r};let i=t.child(--o),l=e.child(--s),a=i.nodeSize;if(i==l){n-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:n,b:r};if(i.isText&&i.text!=l.text){let u=0,c=Math.min(i.text.length,l.text.length);for(;u<c&&i.text[i.text.length-u-1]==l.text[l.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(i.content.size||l.content.size){let u=Oc(i.content,l.content,n-1,r-1);if(u)return u}n-=a,r-=a}}class P{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,s){for(let i=0,l=0;l<n;i++){let a=this.content[i],u=l+a.nodeSize;if(u>e&&r(a,o+l,s||null,i)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,n-c),r,o+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let s="",i=!0;return this.nodesBetween(e,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(i?i=!1:s+=r),s+=u},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new P(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let s=0,i=0;i<n;s++){let l=this.content[s],a=i+l.nodeSize;a>e&&((i<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,n-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,n-i-1))),r.push(l),o+=l.nodeSize),i=a}return new P(r,o)}cutByIndex(e,n){return e==n?P.empty:e==0&&n==this.content.length?this:new P(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new P(o,s)}addToStart(e){return new P([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new P(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return Lc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Oc(this,e,n,r)}findIndex(e){if(e==0)return go(0,e);if(e==this.size)return go(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),s=r+o.nodeSize;if(s>=e)return s==e?go(n+1,s):go(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return P.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return P.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return P.empty;let n,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(n||(n=e.slice(0,o)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new P(n||e,r)}static from(e){if(!e)return P.empty;if(e instanceof P)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new P([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}P.empty=new P([],0);const pi={index:0,offset:0};function go(t,e){return pi.index=t,pi.offset=e,pi}function Go(t,e){if(t===e)return!0;
vendor: 4,153 bytes, line 2
2if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Go(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Go(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Me=class Ui{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Go(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ui.none;if(e instanceof Ui)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};Me.none=[];class Ko extends Error{}class Z{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=qc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new Z(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Z(Nc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Z.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Z(P.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)o++;return new Z(e,r,o)}}Z.empty=new Z(P.empty,0,0);function Nc(t,e,n){let{index:r,offset:o}=t.findIndex(e),s=t.maybeChild(r),{index:i,offset:l}=t.findIndex(n);if(o==e||s.isText){if(l!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(Nc(s.content,e-o-1,n-o-1)))}function qc(t,e,n,r,o,s){let{index:i,offset:l}=t.findIndex(e),a=t.maybeChild(i);if(l==e||a.isText)return s&&r<=0&&o<=0&&!s.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let u=qc(a.content,e-l-1,n,i==0?r-1:0,i==t.childCount-1?o-1:0,a);return u&&t.replaceChild(i,a.copy(u))}function xh(t,e,n){if(n.openStart>t.depth)throw new Ko("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ko("Inconsistent open depths");return zc(t,e,n,0)}function zc(t,e,n,r){let o=t.index(r),s=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let i=zc(t,e,n,r+1);return s.copy(s.content.replaceChild(o,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let i=t.parent,l=i.content;return Nn(i,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:i,end:l}=Ch(n,t);return Nn(s,Vc(t,i,l,e,r))}else return Nn(s,Wo(t,e,r))}function Pc(t,e){if(!e.type.compatibleContent(t.type))throw new Ko("Cannot join "+e.type.n
vendor: 10,795 bytes, line 2
2ame+" onto "+t.type.name)}function Gi(t,e,n){let r=t.node(n);return Pc(r,e.node(n)),r}function On(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Tr(t,e,n,r){let o=(e||t).node(n),s=0,i=e?e.index(n):o.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(On(t.nodeAfter,r),s++));for(let l=s;l<i;l++)On(o.child(l),r);e&&e.depth==n&&e.textOffset&&On(e.nodeBefore,r)}function Nn(t,e){return t.type.checkContent(e),t.copy(e)}function Vc(t,e,n,r,o){let s=t.depth>o&&Gi(t,e,o+1),i=r.depth>o&&Gi(n,r,o+1),l=[];return Tr(null,t,o,l),s&&i&&e.index(o)==n.index(o)?(Pc(s,i),On(Nn(s,Vc(t,e,n,r,o+1)),l)):(s&&On(Nn(s,Wo(t,e,o+1)),l),Tr(e,n,o,l),i&&On(Nn(i,Wo(n,r,o+1)),l)),Tr(r,null,o,l),new P(l)}function Wo(t,e,n){let r=[];if(Tr(null,t,n,r),t.depth>n){let o=Gi(t,e,n+1);On(Nn(o,Wo(t,e,n+1)),r)}return Tr(e,null,n,r),new P(r)}function Ch(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)o=e.node(s).copy(P.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Hr{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)o+=r.child(s).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Me.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let l=r;r=o,o=l}let s=r.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!o||!s[i].isInSet(o.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!o||!r[s].isInSet(o.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Jo(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,s=n;for(let i=e;;){let{index:l,offset:a}=i.content.findIndex(s),u=s-a;if(r.push(i,l,o+a),!u||(i=i.child(l),i.isText))break;s=u-1,o+=a+1}return new Hr(n,r,s)}static resolveCached(e,n){let r=Na.get(e);if(r)for(let s=0;s<r.elts.length;s++){let i=r.elts[s];if(i.pos==n)return i}else Na.set(e,r=new wh);let o=r.elts[r.i]=Hr.resolve(e,n);return r.i=(r.i+1)%_h,o}}class wh{constructor(){this.elts=[],this.i=0}}const _h=12,Na=new WeakMap;class Jo{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const kh=Object.create(null);let yn=class Ki{constructor(e,n,r,o=Me.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||P.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Go(this.attrs,n||e.defaultAttrs||kh)&&Me.sameSet(this.marks,r||Me.none)}copy(e=null){return e==this.content?this:new Ki(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ki(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Z.empty;let o=this.resolve(e),s=this.resolve(n),i=r?0:o.sharedDepth(n),l=o.start(i),u=o.node(i).content.cut(o.pos-l,s.pos-l);return new Z(u,o.depth-i,s.depth-i)}replace(e,n,r){return xh(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return Hr.resolveCached(this,e)}resolveNoCache(e){return Hr.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),jc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=P.empty,o=0,s=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,o,s),l=i&&i.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=o;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(r),i=s&&s.matchFragment(this.content,n);return i?i.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Me.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Me.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=P.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,o,r);return s.type.checkAttrs(s.attrs),s}};yn.prototype.text=void 0;class Yo extends yn{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):jc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Yo(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Yo(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function jc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Pn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Ah(e,n);if(r.next==null)return Pn.empty;let o=Hc(r);r.next&&r.err("Unexpected trailing text");let s=Mh(Rh(o));return Th(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let s=n;o&&s<r;s++)o=o.matchType(e.child(s).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function s(i,l){let a=i.matchFragment(e,r);
vendor: 10,817 bytes, lines 2-3
2if(a&&(!n||a.validEnd))return P.from(l.map(u=>u.createAndFill()));for(let u=0;u<i.next.length;u++){let{type:c,next:d}=i.next[u];if(!(c.isText||c.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let p=s(d,l.concat(c));if(p)return p}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),s=o.match;if(s.matchType(e)){let i=[];for(let l=o;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:l,next:a}=s.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let s=o+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)s+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return s}).join(`
3`)}}Pn.empty=new Pn(!0);class Ah{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Hc(t){let e=[];do e.push(Dh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Dh(t){let e=[];do e.push(Sh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Sh(t){let e=Bh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Eh(t,e);else break;return e}function qa(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Eh(t,e){let n=qa(t),r=n;return t.eat(",")&&(t.next!="}"?r=qa(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Fh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let s in n){let i=n[s];i.isInGroup(e)&&o.push(i)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function Bh(t){if(t.eat("(")){let e=Hc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Fh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Rh(t){let e=[[]];return o(s(t,0),n()),e;function n(){return e.push([])-1}function r(i,l,a){let u={term:a,to:l};return e[i].push(u),u}function o(i,l){i.forEach(a=>a.to=l)}function s(i,l){if(i.type=="choice")return i.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(i.type=="seq")for(let a=0;;a++){let u=s(i.exprs[a],l);if(a==i.exprs.length-1)return u;o(u,l=n())}else if(i.type=="star"){let a=n();return r(l,a),o(s(i.expr,a),a),[r(a)]}else if(i.type=="plus"){let a=n();return o(s(i.expr,l),a),o(s(i.expr,a),a),[r(a)]}else{if(i.type=="opt")return[r(l)].concat(s(i.expr,l));if(i.type=="range"){let a=l;for(let u=0;u<i.min;u++){let c=n();o(s(i.expr,a),c),a=c}if(i.max==-1)o(s(i.expr,a),a);else for(let u=i.min;u<i.max;u++){let c=n();r(a,c),o(s(i.expr,a),c),a=c}return[r(a)]}else{if(i.type=="name")return[r(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function Uc(t,e){return e-t}function za(t,e){let n=[];return r(e),n.sort(Uc);function r(o){let s=t[o];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(o);for(let i=0;i<s.length;i++){let{term:l,to:a}=s[i];!l&&n.indexOf(a)==-1&&r(a)}}}function Mh(t){let e=Object.create(null);return n(za(t,0));function n(r){let o=[];r.forEach(i=>{t[i].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<o.length;c++)o[c][0]==l&&(u=o[c][1]);za(t,a).forEach(c=>{u||o.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=e[r.join(",")]=new Pn(r.indexOf(t.length-1)>-1);for(let i=0;i<o.length;i++){let l=o[i][1].sort(Uc);s.next.push({type:o[i][0],next:e[l.join(",")]||n(l)})}return s}}function Th(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],s=!o.validEnd,i=[];for(let l=0;l<o.next.length;l++){let{type:a,next:u}=o.next[l];i.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Gc(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Kc(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let s=t[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Wc(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let s=t[o];s.validate&&s.validate(e[o])}}function Jc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Ih(t,r,e[r]);return n}let Pa=class Yc{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Jc(e,r.attrs),this.defaultAttrs=Gc(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Pn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Kc(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yn(this,this.computeAttrs(e),P.from(n),Me.setFrom(r))}createChecked(e=null,n,r){return n=P.from(n),this.checkContent(n),new yn(this,this.computeAttrs(e),n,Me.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=P.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let o=this.contentMatch.matchFragment(n),s=o&&o.fillBefore(P.empty,!0);return s?new yn(this,e,n.append(s),Me.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Wc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Me.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,i)=>r[s]=new Yc(s,n,i));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function $h(t,e,n){let r=n.split("|");return o=>{let s=o===null?"null":typeof o;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class Ih{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$h(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ws{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=Jc(e,o.attrs),this.excluded=null;let s=Gc(this.attrs);this.instance=s?new Me(this,s):null}create(e=null){return!e&&this.instance?this.instance:new Me(this,Kc(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new Ws(s,o++,n,i)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Wc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Qc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=Je.from(e.nodes),n.marks=Je.from(e.marks||{}),this.nodes=Pa.compile(this.spec.nodes,this),this.marks=Ws.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],i=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[i]||(r[i]=Pn.parse(i,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?Va(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],i=s.spec.excludes;s.excluded=i==null?[s]:i==""?[]:Va(this,i.split(" "))}this.nodeFromJSON=o=>yn.fromJSON(this,o),this.markFromJSON=o=>Me.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Pa){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Yo(r,r.defaultAttrs,e,Me.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Va(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],s=t.marks[o],i=s;
vendor: 15,075 bytes, lines 3-5
3if(s)n.push(s);else for(let l in t.marks){let a=t.marks[l];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&n.push(i=a)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Lh(t){return t.tag!=null}function Oh(t){return t.style!=null}class jt{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(Lh(o))this.tags.push(o);else if(Oh(o)){let s=/[^=]*/.exec(o.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=e.nodes[o.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new Ha(this,n,!1);return r.addAll(e,Me.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Ha(this,n,!0);return r.addAll(e,Me.none,n.from,n.to),Z.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(zh(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,n,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],l=i.style;if(!(l.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(i.getAttrs){let a=i.getAttrs(n);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(e){let n=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<n.length;i++){let l=n[i];if((l.priority==null?50:l.priority)<s)break}n.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=Ua(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=Ua(i)),i.node||i.ignore||i.mark||(i.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new jt(e,jt.schemaRules(e)))}}const Zc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Nh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Xc={ol:!0,ul:!0},Ur=1,Wi=2,$r=4;function ja(t,e,n){return e!=null?(e?Ur:0)|(e==="full"?Wi:0):t&&t.whitespace=="pre"?Ur|Wi:n&~$r}class bo{constructor(e,n,r,o,s,i){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=Me.none,this.match=s||(i&$r?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(P.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ur)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let n=P.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(P.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Zc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ha{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,s,i=ja(null,n.preserveWhitespace,0)|(r?$r:0);o?s=new bo(o.type,o.attrs,Me.none,!0,n.topMatch||o.type.contentMatch,i):r?s=new bo(null,null,Me.none,!0,null,i):s=new bo(e.schema.topNodeType,null,Me.none,!0,null,i),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,s=o.options&Wi?"full":this.localPreserveWS||(o.options&Ur)>0,{schema:i}=this.parser;if(s==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
4`);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(i.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(i.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(i.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i=e.nodeName.toLowerCase(),l;Xc.hasOwnProperty(i)&&this.parser.normalizeLists&&qh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Nh.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let u,c=this.needsBlock;if(Zc.hasOwnProperty(i))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),u=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=a&&a.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(s),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,a,u,a.consuming===!1?l:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
5`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let s=this.parser.matchedStyles[o],i=r.getPropertyValue(s);if(i)for(let l=void 0;;){let a=this.parser.matchStyle(s,i,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(u=>!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,o){let s,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(i,n.attrs||null,r,n.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,o){let s=r||0;for(let i=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];i!=l;i=i.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(i,n);this.findAtPoint(e,s)}findPlace(e,n,r){let o,s;for(let i=this.open,l=0;i>=0;i--){let a=this.nodes[i],u=a.findWrapping(e);if(u&&(!o||o.length>u.length+l)&&(o=u,s=a,!u.length))break;if(a.solid){if(r)break;l+=2}}if(!o)return null;this.sync(s);for(let i=0;i<o.length;i++)n=this.enterInner(o[i],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let i=Me.none;for(let l of o.concat(e.marks))(s.type?s.type.allowsMarkType(l.type):Ga(l.type,e.type))&&(i=l.addToSet(i));return s.content.push(e.mark(i)),!0}return!1}enter(e,n,r,o){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,o)),s}enterInner(e,n,r,o=!1,s){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let l=ja(e,s,i.options);i.options&$r&&i.content.length==0&&(l|=$r);let a=Me.none;return r=r.filter(u=>(i.type?i.type.allowsMarkType(u.type):Ga(u.type,e))?(a=u.addToSet(a),!1):!0),this.nodes.push(new bo(e,n,a,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Ur)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),i=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let c=a>0||a==0&&o?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function qh(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Xc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function zh(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Ua(t){let e={};for(let n in t)e[n]=t[n];return e}function Ga(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let s=[],i=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==e||s.indexOf(c)<0&&i(c))return!0}};if(i(o.contentMatch))return!0}}class Js{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=yo(n).createDocumentFragment());let o=r,s=[];return e.forEach(i=>{if(s.length||i.marks.length){let l=0,a=0;for(;l<s.length&&a<i.marks.length;){let u=i.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)o=s.pop()[1];for(;a<i.marks.length;){let u=i.marks[a++],c=this.serializeMark(u,i.isInline,n);c&&(s.push([u,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(this.serializeNodeInner(i,n))}),r}serializeNodeInner(e,n){if(e.isText)return yo(n).createTextNode(e.text);let{dom:r,contentDOM:o}=No(yo(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&No(yo(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return typeof n=="string"?{dom:e.createTextNode(n)}:No(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Js(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Ka(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Ka(e.marks)}}function Ka(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function yo(t){return t.document||window.document}const Wa=new WeakMap;function Ph(t){let e=Wa.get(t);return e===void 0&&Wa.set(t,e=Vh(t)),e}function Vh(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function No(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let o=e[0],s;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Ph(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let l,a=n?t.createElementNS(n,o):t.createElement(o),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let p=d.indexOf(" ");p>0?a.setAttributeNS(d.slice(0,p),d.slice(p+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let p=e[d];if(p===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof p=="string")a.appendChild(t.createTextNode(p));else{let{dom:m,contentDOM:h}=No(t,p,n,r);if(a.appendChild(m),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}const ed=65535,td=Math.pow(2,16);function jh(t,e){return t+e*td}function Ja(t){return t&ed}function Hh(t){return(t-(t&ed))/td}const nd=1,rd=2,qo=4,od=8;class Ji{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&od)>0}get deletedBefore(){return(this.delInfo&(nd|qo))>0}get deletedAfter(){return(this.delInfo&(rd|qo))>0}get deletedAcross(){return(this.delInfo&qo)>0}}class xt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xt.empty)return xt.empty}recover(e){let n=0,r=Ja(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+Hh(e)}
vendor: 5,428 bytes, line 5
5mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let u=this.ranges[l+s],c=this.ranges[l+i],d=a+u;if(e<=d){let p=u?e==a?-1:e==d?1:n:n,m=a+o+(p<0?0:c);if(r)return m;let h=e==(n<0?a:d)?null:jh(l/3,e-a),g=e==a?rd:e==d?nd:qo;return(n<0?e!=a:e!=d)&&(g|=od),new Ji(m,g,h)}o+=c-u}return r?e+o:new Ji(e+o,0,null)}touches(e,n){let r=0,o=Ja(n),s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+s],c=a+u;if(e<=c&&l==o*3)return!0;r+=this.ranges[l+i]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let i=this.ranges[o],l=i-(this.inverted?s:0),a=i+(this.inverted?0:s),u=this.ranges[o+n],c=this.ranges[o+r];e(l,l+u,a,a+c),s+=c-u}}invert(){return new xt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xt.empty:new xt(e<0?[0,-e,0]:[0,0,e])}}xt.empty=new xt([]);class Qo{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Qo(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new Qo;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let s=this.from;s<this.to;s++){let i=this._maps[s],l=i.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new Ji(e,o,null)}}const mi=Object.create(null);class st{getMap(){return xt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=mi[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in mi)throw new RangeError("Duplicate use of step JSON ID "+e);return mi[e]=n,n.prototype.jsonID=e,n}}class Ve{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ve(e,null)}static fail(e){return new Ve(null,e)}static fromReplace(e,n,r,o){try{return Ve.ok(e.replace(n,r,o))}catch(s){if(s instanceof Ko)return Ve.fail(s.message);throw s}}}function Tl(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let s=t.child(o);s.content.size&&(s=s.copy(Tl(s.content,e,s))),s.isInline&&(s=e(s,n,o)),r.push(s)}return P.fromArray(r)}class mn extends st{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new Z(Tl(n.content,(i,l)=>!i.isAtom||!l.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),n.openStart,n.openEnd);return Ve.fromReplace(e,this.from,this.to,s)}invert(){return new Vt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mn(n.pos,r.pos,this.mark)}merge(e){return e instanceof mn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mn(n.from,n.to,e.markFromJSON(n.mark))}}st.jsonID("addMark",mn);class Vt extends st{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Z(Tl(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Ve.fromReplace(e,this.from,this.to,r)}invert(){return new mn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Vt(n.pos,r.pos,this.mark)}merge(e){return e instanceof Vt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Vt(n.from,n.to,e.markFromJSON(n.mark))}}st.jsonID("removeMark",Vt);class hn extends st{constructor(e,n){super(),this.pos=e,this.mark=n}
vendor: 9,299 bytes, line 5
5apply(e){let n=e.nodeAt(this.pos);if(!n)return Ve.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ve.fromReplace(e,this.pos,this.pos+1,new Z(P.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new hn(this.pos,n.marks[o]);return new hn(this.pos,this.mark)}}return new Vn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new hn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new hn(n.pos,e.markFromJSON(n.mark))}}st.jsonID("addNodeMark",hn);class Vn extends st{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ve.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ve.fromReplace(e,this.pos,this.pos+1,new Z(P.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new hn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Vn(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Vn(n.pos,e.markFromJSON(n.mark))}}st.jsonID("removeNodeMark",Vn);class Ne extends st{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Yi(e,this.from,this.to)?Ve.fail("Structure replace would overwrite content"):Ve.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ne(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&Ne.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Ne(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Ne)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Z.empty:new Z(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ne(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Z.empty:new Z(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ne(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ne(n.from,n.to,Z.fromJSON(e,n.slice),!!n.structure)}}Ne.MAP_BIAS=1;st.jsonID("replace",Ne);class Ke extends st{constructor(e,n,r,o,s,i,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=i,this.structure=l}apply(e){if(this.structure&&(Yi(e,this.from,this.gapFrom)||Yi(e,this.gapTo,this.to)))return Ve.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ve.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ve.fromReplace(e,this.from,this.to,r):Ve.fail("Content does not fit in gap")}getMap(){return new xt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Ke(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||s>r.pos?null:new Ke(n.pos,r.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ke(n.from,n.to,n.gapFrom,n.gapTo,Z.fromJSON(e,n.slice),n.insert,!!n.structure)}}st.jsonID("replaceAround",Ke);function Yi(t,e,n){let r=t.resolve(e),o=n-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let i=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function Uh(t,e,n,r){let o=[],s=[],i,l;t.doc.nodesBetween(e,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let p=Math.max(u,e),m=Math.min(u+a.nodeSize,n),h=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(h)||(i&&i.to==p&&i.mark.eq(d[g])?i.to=m:o.push(i=new Vt(p,m,d[g])));l&&l.to==p?l.to=m:s.push(l=new mn(p,m,r))}}),o.forEach(a=>t.step(a)),s.forEach(a=>t.step(a))}function Gh(t,e,n,r){let o=[],s=0;t.doc.nodesBetween(e,n,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(r instanceof Ws){let u=i.marks,c;for(;c=r.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(i.marks)&&(a=[r]):a=i.marks;if(a&&a.length){let u=Math.min(l+i.nodeSize,n);for(let c=0;c<a.length;c++){let d=a[c],p;for(let m=0;m<o.length;m++){let h=o[m];h.step==s-1&&d.eq(o[m].style)&&(p=h)}p?(p.to=u,p.step=s):o.push({style:d,from:Math.max(l,e),to:u,step:s})}}}),o.forEach(i=>t.step(new Vt(i.from,i.to,i.style)))}function $l(t,e,n,r=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),i=[],l=e+1;for(let a=0;a<s.childCount;a++){let u=s.child(a),c=l+u.nodeSize,d=r.matchType(u.type);if(!d)i.push(new Ne(l,c,Z.empty));else{r=d;for(let p=0;p<u.marks.length;p++)n.allowsMarkType(u.marks[p].type)||t.step(new Vt(l,c,u.marks[p]));if(o&&u.isText&&n.whitespace!="pre"){let p,m=/\r?\n|\r/g,h;for(;p=m.exec(u.text);)h||(h=new Z(P.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),i.push(new Ne(l+p.index,l+p.index+p[0].length,h))}}l=c}if(!r.validEnd){let a=r.fillBefore(P.empty,!0);t.replace(l,l,new Z(a,0,0))}for(let a=i.length-1;a>=0;a--)t.step(i[a])}function Kh(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Yn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,s=0;;--r){let i=t.$from.node(r),l=t.$from.index(r)+o,a=t.$to.indexAfter(r)-s;if(r<t.depth&&i.canReplace(l,a,n))return r;if(r==0||i.type.spec.isolating||!Kh(i,l,a))break;l&&(o=1),a<i.childCount&&(s=1)}return null}function Wh(t,e,n){let{$from:r,$to:o,depth:s}=e,i=r.before(s+1),l=o.after(s+1),a=i,u=l,c=P.empty,d=0;for(let h=s,g=!1;h>n;h--)g||r.index(h)>0?(g=!0,c=P.from(r.node(h).copy(c)),d++):a--;let p=P.empty,m=0;for(let h=s,g=!1;h>n;h--)g||o.after(h+1)<o.end(h)?(g=!0,p=P.from(o.node(h).copy(p)),m++):u++;t.step(new Ke(a,u,i,l,new Z(c.append(p),d,m),c.size-d,!0))}function Il(t,e,n=null,r=t){let o=Jh(t,e),s=o&&Yh(r,e);return s?o.map(Ya).concat({type:e,attrs:n}).concat(s.map(Ya)):null}function Ya(t){return{type:t,attrs:null}}function Jh(t,e){let{parent:n,startIndex:r,endIndex:o}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let i=s.length?s[0]:e;return n.canReplaceWith(r,o,i)?s:null}function Yh(t,e){let{parent:n,startIndex:r,endIndex:o}=t,s=n.child(r),i=e.contentMatch.findWrapping(s.type);if(!i)return null;let a=(i.length?i[i.length-1]:e).contentMatch;for(let u=r;a&&u<o;u++)a=a.matchType(n.child(u).type);return!a||!a.validEnd?null:i}function Qh(t,e,n){let r=P.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let l=n[i].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=P.from(n[i].type.create(n[i].attrs,r))}let o=e.start,s=e.end;t.step(new Ke(o,s,o,s,new Z(r,0,0),n.length,!0))}function Zh(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(i,l)=>{let a=typeof o=="function"?o(i):o;if(i.isTextblock&&!i.hasMarkup(r,a)&&Xh(t.doc,t.mapping.slice(s).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!h?u=!1:!m&&h&&(u=!0)}u===!1&&id(t,i,l,s),$l(t,t.mapping.slice(s).map(l,1),r,void 0,u===null);let c=t.mapping.slice(s),d=c.map(l,1),p=c.map(l+i.nodeSize,1);return t.step(new Ke(d,p,d+1,p-1,new Z(P.from(r.create(a,null,i.marks)),0,0),1,!0)),u===!0&&sd(t,i,l,s),!1}})}function sd(t,e,n,r){e.forEach((o,s)=>{if(o.isText){let i,l=/\r?\n|\r/g;
vendor: 9,361 bytes, lines 5-6
5for(;i=l.exec(o.text);){let a=t.mapping.slice(r).map(n+1+s+i.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function id(t,e,n,r){e.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+s);t.replaceWith(i,i+1,e.type.schema.text(`
6`))}})}function Xh(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function eg(t,e,n,r,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let i=n.create(r,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,i);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Ke(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new Z(P.from(i),0,0),1,!0))}function kt(t,e,n=1,r){let o=t.resolve(e),s=o.depth-n,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,c=n-2;u>s;u--,c--){let d=o.node(u),p=o.index(u);if(d.type.spec.isolating)return!1;let m=d.content.cutByIndex(p,d.childCount),h=r&&r[c+1];h&&(m=m.replaceChild(0,h.type.create(h.attrs)));let g=r&&r[c]||d;if(!d.canReplace(p+1,d.childCount)||!g.type.validContent(m))return!1}let l=o.indexAfter(s),a=r&&r[0];return o.node(s).canReplaceWith(l,l,a?a.type:o.node(s+1).type)}function tg(t,e,n=1,r){let o=t.doc.resolve(e),s=P.empty,i=P.empty;for(let l=o.depth,a=o.depth-n,u=n-1;l>a;l--,u--){s=P.from(o.node(l).copy(s));let c=r&&r[u];i=P.from(c?c.type.create(c.attrs,i):o.node(l).copy(i))}t.step(new Ne(e,e,new Z(s.append(i),n,n),!0))}function Kt(t,e){let n=t.resolve(e),r=n.index();return ld(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ng(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let s=e.child(o),i=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(i),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function ld(t,e){return!!(t&&e&&!t.isLeaf&&ng(t,e))}function gr(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let s,i,l=r.index(o);if(o==r.depth?(s=r.nodeBefore,i=r.nodeAfter):n>0?(s=r.node(o+1),l++,i=r.node(o).maybeChild(l)):(s=r.node(o).maybeChild(l-1),i=r.node(o+1)),s&&!s.isTextblock&&ld(s,i)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function rg(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-n),i=s.node().type;if(o&&i.inlineContent){let c=i.whitespace=="pre",d=!!i.contentMatch.matchType(o);c&&!d?r=!1:!c&&d&&(r=!0)}let l=t.steps.length;if(r===!1){let c=t.doc.resolve(e+n);id(t,c.node(),c.before(),l)}i.inlineContent&&$l(t,e+n-1,i,s.node().contentMatchAt(s.index()),r==null);let a=t.mapping.slice(l),u=a.map(e-n);if(t.step(new Ne(u,a.map(e+n,-1),Z.empty,!0)),r===!0){let c=t.doc.resolve(u);sd(t,c.node(),c.before(),t.steps.length)}return t}function og(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,n))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,n))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function sg(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let s=0;s<n.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let i=r.depth;i>=0;i--){let l=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,a=r.index(i)+(l>0?1:0),u=r.node(i),c=!1;if(s==1)c=u.canReplace(a,a,o);else{let d=u.contentMatchAt(a).findWrapping(o.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?r.pos:l<0?r.before(i+1):r.after(i+1)}return null}function Ys(t,e,n=e,r=Z.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),s=t.resolve(n);return ad(o,s,r)?new Ne(e,n,r):new ig(o,s,r).fit()}function ad(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class ig{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=P.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=P.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let s=this.placed,i=r.depth,l=o.depth;for(;i&&l&&s.childCount==1;)s=s.firstChild.content,i--,l--;let a=new Z(s,i,l);return e>-1?new Ke(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new Ne(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=hi(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let i=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(i?u.matchType(i.type)||(d=u.fillBefore(P.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(n==2&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=hi(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Z(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=hi(e,n);if(o.childCount<=1&&n>0){let s=e.size-n<=n+o.size;this.unplaced=new Z(Dr(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new Z(Dr(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let g=0;g<s.length;g++)this.openFrontierNode(s[g]);let i=this.unplaced,l=r?r.content:i.content,a=i.openStart-e,u=0,c=[],{match:d,type:p}=this.frontier[n];if(o){for(let g=0;g<o.childCount;g++)c.push(o.child(g));d=d.matchFragment(o)}let m=l.size+e-(i.content.size-i.openEnd);for(;u<l.childCount;){let g=l.child(u),y=d.matchType(g.type);if(!y)break;u++,(u>1||a==0||g.content.size)&&(d=y,c.push(ud(g.mark(p.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?m:-1)))}let h=u==l.childCount;h||(m=-1),this.placed=Sr(this.placed,n,P.from(c)),this.frontier[n].match=d,h&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=l;g<m;g++){let v=y.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),y=v.content}this.unplaced=h?e==0?Z.empty:new Z(Dr(i.content,e-1,1),e-1,m<0?i.openEnd:e-1):new Z(Dr(i.content,e,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!gi(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),i=gi(e,n,o,r,s);if(i){for(let l=n-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],c=gi(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:i,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Sr(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Sr(this.placed,this.depth,P.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(P.empty,!0);n.childCount&&(this.placed=Sr(this.placed,this.frontier.length,n))}}function Dr(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Dr(t.firstChild.content,e-1,n)))}function Sr(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Sr(t.lastChild.content,e-1,n)))}function hi(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function ud(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,ud(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(P.empty,!0)))),t.copy(r)}function gi(t,e,n,r,o){let s=t.node(e),i=o?t.indexAfter(e):t.index(e);if(i==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,i);
vendor: 8,697 bytes, line 6
6return l&&!lg(n,s.content,i)?l:null}function lg(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function ag(t){return t.spec.defining||t.spec.definingForContent}function ug(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(ad(o,s,r))return t.step(new Ne(e,n,r));let i=dd(o,s);i[i.length-1]==0&&i.pop();let l=-(o.depth+1);i.unshift(l);for(let p=o.depth,m=o.pos-1;p>0;p--,m--){let h=o.node(p).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;i.indexOf(p)>-1?l=p:o.before(p)==m&&i.splice(1,0,-p)}let a=i.indexOf(l),u=[],c=r.openStart;for(let p=r.content,m=0;;m++){let h=p.firstChild;if(u.push(h),m==r.openStart)break;p=h.content}for(let p=c-1;p>=0;p--){let m=u[p],h=ag(m.type);if(h&&!m.sameMarkup(o.node(Math.abs(l)-1)))c=p;else if(h||!m.type.isTextblock)break}for(let p=r.openStart;p>=0;p--){let m=(p+c+1)%(r.openStart+1),h=u[m];if(h)for(let g=0;g<i.length;g++){let y=i[(g+a)%i.length],v=!0;y<0&&(v=!1,y=-y);let C=o.node(y-1),x=o.index(y-1);if(C.canReplaceWith(x,x,h.type,h.marks))return t.replace(o.before(y),v?s.after(y):n,new Z(cd(r.content,0,r.openStart,m),m,r.openEnd))}}let d=t.steps.length;for(let p=i.length-1;p>=0&&(t.replace(e,n,r),!(t.steps.length>d));p--){let m=i[p];m<0||(e=o.before(m),n=s.after(m))}}function cd(t,e,n,r,o){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(cd(s.content,e+1,n,r,s)))}if(e>r){let s=o.contentMatchAt(0),i=s.fillBefore(t).append(t);t=i.append(s.matchFragment(i).fillBefore(P.empty,!0))}return t}function cg(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=og(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Z(P.from(r),0,0))}function dg(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n);if(r.parent.isTextblock&&o.parent.isTextblock&&r.start()!=o.start()&&r.parentOffset==0&&o.parentOffset==0){let i=r.sharedDepth(n),l=!1;for(let a=r.depth;a>i;a--)r.node(a).type.spec.isolating&&(l=!0);for(let a=o.depth;a>i;a--)o.node(a).type.spec.isolating&&(l=!0);if(!l){for(let a=r.depth;a>0&&e==r.start(a);a--)e=r.before(a);for(let a=o.depth;a>0&&n==o.start(a);a--)n=o.before(a);r=t.doc.resolve(e),o=t.doc.resolve(n)}}let s=dd(r,o);for(let i=0;i<s.length;i++){let l=s[i],a=i==s.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return t.delete(r.before(i),n);t.delete(e,n)}function dd(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let s=t.start(o);if(s<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&n.push(o)}return n}class ir extends st{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ve.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Ve.fromReplace(e,this.pos,this.pos+1,new Z(P.from(o),0,n.isLeaf?0:1))}getMap(){return xt.empty}invert(e){return new ir(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ir(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ir(n.pos,n.attr,n.value)}}st.jsonID("attr",ir);class Gr extends st{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Ve.ok(r)}getMap(){return xt.empty}invert(e){return new Gr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gr(n.attr,n.value)}}st.jsonID("docAttr",Gr);let ar=class extends Error{};ar=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};ar.prototype=Object.create(Error.prototype);ar.prototype.constructor=ar;ar.prototype.name="TransformError";class fd{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Qo}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new ar(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((s,i,l,a)=>{e=Math.min(e,l),n=Math.max(n,a)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Z.empty){let o=Ys(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Z(P.from(r),0,0))}delete(e,n){return this.replace(e,n,Z.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return ug(this,e,n,r),this}replaceRangeWith(e,n,r){return cg(this,e,n,r),this}deleteRange(e,n){return dg(this,e,n),this}lift(e,n){return Wh(this,e,n),this}join(e,n=1){return rg(this,e,n),this}wrap(e,n){return Qh(this,e,n),this}setBlockType(e,n=e,r,o=null){return Zh(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return eg(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new ir(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gr(e,n)),this}addNodeMark(e,n){return this.step(new hn(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Me)n.isInSet(r.marks)&&this.step(new Vn(e,n));else{let o=r.marks,s,i=[];for(;s=n.isInSet(o);)i.push(new Vn(e,s)),o=s.removeFromSet(o);for(let l=i.length-1;l>=0;l--)this.step(i[l])}return this}split(e,n=1,r){return tg(this,e,n,r),this}addMark(e,n,r){return Uh(this,e,n,r),this}removeMark(e,n,r){return Gh(this,e,n,r),this}clearIncompatible(e,n,r){return $l(this,e,n,r),this}}const bi=Object.create(null);class be{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new pd(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Z.empty){let r=n.content.lastChild,o=null;for(let l=0;l<n.openEnd;l++)o=r,r=r.lastChild;let s=e.steps.length,i=this.ranges;for(let l=0;l<i.length;l++){let{$from:a,$to:u}=i[l],c=e.mapping.slice(s);e.replaceRange(c.map(a.pos),c.map(u.pos),l?Z.empty:n),l==0&&Xa(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:i,$to:l}=o[s],a=e.mapping.slice(r),u=a.map(i.pos),c=a.map(l.pos);s?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),Xa(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new ce(e):rr(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let i=n<0?rr(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):rr(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(i)return i}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new ht(e.node(0))}static atStart(e){return rr(e,e,0,0,1)||new ht(e)}static atEnd(e){return rr(e,e,e.content.size,e.childCount,-1)||new ht(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=bi[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in bi)throw new RangeError("Duplicate use of selection JSON ID "+e);return bi[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ce.between(this.$anchor,this.$head).getBookmark()}}be.prototype.visible=!0;class pd{constructor(e,n){this.$from=e,this.$to=n}}let Qa=!1;function Za(t){!Qa&&!t.parent.inlineContent&&(Qa=!0,console.warn("TextSelection endpoint not pointing into a 
6node with inline content ("+t.parent.type.name+")"))}class ce extends be{constructor(e,n=e){Za(e),Za(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return be.near(r);let o=e.resolve(n.map(this.anchor));return new ce(o.parent.inlineContent?o:r,r)}replace(e,n=Z.empty){if(super.replace(e,n),n==Z.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ce&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Qs(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ce(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let s=be.findFrom(n,r,!0)||be.findFrom(n,-r,!0);if(s)n=s.$head;else return be.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(be.findFrom(e,-r,!0)||be.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new ce(e,n)}}be.jsonID("text",ce);class Qs{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Qs(e.map(this.anchor),e.map(this.head))}resolve(e){return ce.between(e.resolve(this.anchor),e.resolve(this.head))}}class pe extends be{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),s=e.resolve(o);return r?be.near(s):new pe(s)}content(){return new Z(P.from(this.node),0,0)}eq(e){return e instanceof pe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ll(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new pe(e.resolve(n.anchor))}static create(e,n){return new pe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}pe.prototype.visible=!1;be.jsonID("node",pe);class Ll{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Qs(r,r):new Ll(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&pe.isSelectable(r)?new pe(n):be.near(n)}}class ht extends be{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Z.empty){if(n==Z.empty){e.delete(0,e.doc.content.size);let r=be.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new ht(e)}map(e){return new ht(e)}eq(e){return e instanceof ht}getBookmark(){return fg}}be.jsonID("all",ht);const fg={map(){return this},resolve(t){return new ht(t)}};function rr(t,e,n,r,o,s=!1){if(e.inlineContent)return ce.create(t,n);for(let i=r-(o>0?0:1);o>0?i<e.childCount:i>=0;i+=o){let l=e.child(i);if(l.isAtom){if(!s&&pe.isSelectable(l))return pe.create(t,n-(o<0?l.nodeSize:0))}else{let a=rr(t,l,n+o,o<0?l.childCount:0,o,s);if(a)return a}n+=l.nodeSize*o}return null}function Xa(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof Ne||o instanceof Ke))return;let s=t.mapping.maps[r],i;s.forEach((l,a,u,c)=>{i==null&&(i=c)}),t.setSelection(be.near(t.doc.resolve(i),n))}function eu(t,e){return!e||!t?t:t.bind(e)}class vo{constructor(e,n,r){this.name=e,this.init=eu(n.init,r),this.apply=eu(n.apply,r)}}new vo("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new vo("selection",{init(t,e){return t.selection||be.atStart(e.doc)},apply(t){return t.selection}}),new vo("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new vo("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}});function md(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=md(o,e,{})),n[r]=o}return n}class He{constructor(e){this.spec=e,this.props={},e.props&&md(e.props,this,this.props),this.key=e.key?e.key.key:hd("plugin")}getState(e){return e[this.key]}}const yi=Object.create(null);function hd(t){return t in yi?t+"$"+ ++yi[t]:(yi[t]=0,t+"$")}class ze{constructor(e="key"){this.key=hd(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Qn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},gd=function(t,e,n,r){return n&&(tu(t,e,n,r,-1)||tu(t,e,n,r,1))},pg=/^(img|br|input|textarea|hr)$/i;function tu(t,e,n,r,o){for(var s;;){if(t==n&&e==r)return!0;
vendor: 4,188 bytes, line 6
6if(e==(o<0?0:Zo(t))){let i=t.parentNode;if(!i||i.nodeType!=1||Ol(t)||pg.test(t.nodeName)||t.contentEditable=="false")return!1;e=Qn(t)+(o<0?0:1),t=i}else if(t.nodeType==1){let i=t.childNodes[e+(o<0?-1:0)];if(i.nodeType==1&&i.contentEditable=="false")if(!((s=i.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=o;else return!1;else t=i,e=o<0?Zo(t):0}else return!1}}function Zo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mg(t,e,n){for(let r=e==0,o=e==Zo(t);r||o;){if(t==n)return!0;let s=Qn(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,o=o&&s==Zo(t)}}function Ol(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const bd=function(t){return t.focusNode&&gd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function yd(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const Gt=typeof navigator<"u"?navigator:null,nu=typeof document<"u"?document:null,kn=Gt&&Gt.userAgent||"",Qi=/Edge\/(\d+)/.exec(kn),vd=/MSIE \d/.exec(kn),Zi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kn),lo=!!(vd||Zi||Qi),xd=vd?document.documentMode:Zi?+Zi[1]:Qi?+Qi[1]:0,Zs=!lo&&/gecko\/(\d+)/i.test(kn);Zs&&+(/Firefox\/(\d+)/.exec(kn)||[0,0])[1];const Xi=!lo&&/Chrome\/(\d+)/.exec(kn),on=!!Xi,Cd=Xi?+Xi[1]:0,Zn=!lo&&!!Gt&&/Apple Computer/.test(Gt.vendor),Nl=Zn&&(/Mobile\/\w+/.test(kn)||!!Gt&&Gt.maxTouchPoints>2),Rt=Nl||(Gt?/Mac/.test(Gt.platform):!1),wd=Gt?/Win/.test(Gt.platform):!1,ao=/Android \d/.test(kn),ql=!!nu&&"webkitFontSmoothing"in nu.documentElement.style,hg=ql?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function gg(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),s=o&&o.size==0,i=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let l=r.resolve(i),a,u;if(bd(n)){for(a=i;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&pe.isSelectable(d)&&o.parent&&!(d.isInline&&mg(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;u=new pe(i==p?l:r.resolve(p))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=i,p=i;for(let m=0;m<n.rangeCount;m++){let h=n.getRangeAt(m);d=Math.min(d,t.docView.posFromDOM(h.startContainer,h.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(d<0)return null;[a,i]=p==t.state.selection.anchor?[p,d]:[d,p],l=r.resolve(i)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=r.resolve(a);if(!u){let d=e=="pointer"||t.state.selection.head<l.pos&&!s?1:-1;u=kd(t,c,l,d)}return u}function _d(t){return t.editable?t.hasFocus():xg(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function zl(t,e=!1){let n=t.state.selection;if(vg(t,n),!!_d(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&on){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&gd(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)yg(t);else{let{anchor:r,head:o}=n,s,i;ru&&!(n instanceof ce)&&(n.$from.parent.inlineContent||(s=ou(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=ou(t,n.to))),t.docView.setSelection(r,o,t,e),ru&&(s&&su(s),i&&su(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&bg(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const ru=Zn||on&&Cd<63;function ou(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(Zn&&o&&o.contentEditable=="false")return vi(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return vi(o);if(s)return vi(s)}}function vi(t){return t.contentEditable="true",Zn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function su(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function bg(t){let e=t.dom.ownerDocument;
vendor: 1,873 bytes, line 6
6e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!_d(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function yg(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Qn(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&lo&&xd<=11&&(n.disabled=!0,n.disabled=!1)}function vg(t,e){if(e instanceof pe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(iu(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else iu(t)}function iu(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function kd(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||ce.between(e,n,r)}function xg(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function el(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&be.findFrom(s,e)}function cn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function lu(t,e,n){let r=t.state.selection;if(r instanceof ce)if(n.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=t.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return cn(t,new ce(r.$anchor,i))}else if(r.empty){if(t.endOfTextblock(e>
vendor: 4,128 bytes, line 6
60?"forward":"backward")){let o=el(t.state,e);return o&&o instanceof pe?cn(t,o):!1}else if(!(Rt&&n.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,i;if(!s||s.isText)return!1;let l=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(i=t.docView.descAt(l))&&!i.contentDOM?pe.isSelectable(s)?cn(t,new pe(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):ql?cn(t,new ce(t.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof pe&&r.node.isInline)return cn(t,new ce(e>0?r.$to:r.$from));{let o=el(t.state,e);return o?cn(t,o):!1}}}function Xo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ir(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function nr(t,e){return e<0?Cg(t):wg(t)}function Cg(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,s,i=!1;for(Zs&&n.nodeType==1&&r<Xo(n)&&Ir(n.childNodes[r],-1)&&(i=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Ir(l,-1))o=n,s=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(Ad(n))break;{let l=n.previousSibling;for(;l&&Ir(l,-1);)o=n.parentNode,s=Qn(l),l=l.previousSibling;if(l)n=l,r=Xo(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}i?tl(t,n,r):o&&tl(t,o,s)}function wg(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Xo(n),s,i;for(;;)if(r<o){if(n.nodeType!=1)break;let l=n.childNodes[r];if(Ir(l,1))s=n,i=++r;else break}else{if(Ad(n))break;{let l=n.nextSibling;for(;l&&Ir(l,1);)s=l.parentNode,i=Qn(l)+1,l=l.nextSibling;if(l)n=l,r=0,o=Xo(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}s&&tl(t,s,i)}function Ad(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function _g(t,e){for(;t&&e==t.childNodes.length&&!Ol(t);)e=Qn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function kg(t,e){for(;t&&!e&&!Ol(t);)e=Qn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function tl(t,e,n){if(e.nodeType!=3){let s,i;(i=_g(e,n))?(e=i,n=0):(s=kg(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(bd(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&zl(t)},50)}function au(t,e){let n=t.state.doc.resolve(e);if(!(on||wd)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function uu(t,e,n){let r=t.state.selection;if(r instanceof ce&&!r.empty||n.indexOf("s")>-1||Rt&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let i=el(t.state,e);if(i&&i instanceof pe)return cn(t,i)}if(!o.parent.inlineContent){let i=e<0?o:s,l=r instanceof ht?be.near(i,e):be.findFrom(i,e);return l?cn(t,l):!1}return!1}function cu(t,e){if(!(t.state.selection instanceof ce))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=t.state.tr;return e<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),t.dispatch(i),!0}return!1}function du(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Ag(t){if(!Zn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;du(t,r,"true"),setTimeout(()=>du(t,r,"false"),20)}return!1}function Dg(t){let e="";
vendor: 4,149 bytes, lines 6-9
6return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function Sg(t,e){let n=e.keyCode,r=Dg(e);if(n==8||Rt&&n==72&&r=="c")return cu(t,-1)||nr(t,-1);if(n==46&&!e.shiftKey||Rt&&n==68&&r=="c")return cu(t,1)||nr(t,1);if(n==13||n==27)return!0;if(n==37||Rt&&n==66&&r=="c"){let o=n==37?au(t,t.state.selection.from)=="ltr"?-1:1:-1;return lu(t,o,r)||nr(t,o)}else if(n==39||Rt&&n==70&&r=="c"){let o=n==39?au(t,t.state.selection.from)=="ltr"?1:-1:1;return lu(t,o,r)||nr(t,o)}else{if(n==38||Rt&&n==80&&r=="c")return uu(t,-1,r)||nr(t,-1);if(n==40||Rt&&n==78&&r=="c")return Ag(t)||uu(t,1,r)||nr(t,1);if(r==(Rt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Dd(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let n=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let m=r.firstChild;n.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let i=t.someProp("clipboardSerializer")||Js.fromSchema(t.state.schema),l=Md(),a=l.createElement("div");a.appendChild(i.serializeFragment(r,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=Rd[u.nodeName.toLowerCase()]);){for(let m=c.length-1;m>=0;m--){let h=l.createElement(c[m]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`
7
8`);return{dom:a,text:p,slice:e}}function Sd(t,e,n,r,o){let s=o.parent.type.spec.code,i,l;if(!n&&!e)return null;let a=!!e&&(r||s||!n);if(a){if(t.someProp("transformPastedText",p=>{e=p(e,s||r,t)}),s)return l=new Z(P.from(t.state.schema.text(e.replace(/\r\n?/g,`
9`))),0,0),t.someProp("transformPasted",p=>{l=p(l,t,!0)}),l;let d=t.someProp("clipboardTextParser",p=>p(e,o,r,t));if(d)l=d;else{let p=o.marks(),{schema:m}=t.state,h=Js.fromSchema(m);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=i.appendChild(document.createElement("p"));g&&y.appendChild(h.serializeNode(m.text(g,p)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),i=Rg(n),ql&&Mg(i);let u=i&&i.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let p=i.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;i=p}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||jt.fromSchema(t.state.schema)).parseSlice(i,{preserveWhitespace:!!(a||c),context:o,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!Eg.test(p.parentNode.nodeName)?{ignore:!0}:null}})),c)l=Tg(fu(l,+c[1],+c[2]),c[4]);else if(l=Z.maxOpen(Fg(l.content,o),!0),l.openStart||l.openEnd){let d=0,p=0;for(let m=l.content.firstChild;d<l.openStart&&!m.type.spec.isolating;d++,m=m.firstChild);for(let m=l.content.lastChild;p<l.openEnd&&!m.type.spec.isolating;p++,m=m.lastChild);l=fu(l,d,p)}return t.someProp("transformPasted",d=>{l=d(l,t,a)}),l}const Eg=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Fg(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),s,i=[];if(t.forEach(l=>{if(!i)return;let a=o.findWrapping(l.type),u;if(!a)return i=null;if(u=i.length&&s.length&&Fd(a,s,l,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=Bd(i[i.length-1],s.length));let c=Ed(l,a);i.push(c),o=o.matchType(c.type),s=a}}),i)return P.from(i)}return t}function Ed(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,P.from(t));return t}function Fd(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let s=Fd(t,e,n,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(P.from(Ed(n,t,o+1))))}}function Bd(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Bd(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(P.empty,!0);return t.copy(n.append(r))}
vendor: 4,097 bytes, line 9
9function nl(t,e,n,r,o,s){let i=e<0?t.firstChild:t.lastChild,l=i.content;return t.childCount>1&&(s=0),o<r-1&&(l=nl(l,e,n,r,o+1,s)),o>=n&&(l=e<0?i.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(P.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,i.copy(l))}function fu(t,e,n){return e<t.openStart&&(t=new Z(nl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Z(nl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Rd={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let pu=null;function Md(){return pu||(pu=document.implementation.createHTMLDocument("title"))}let xi=null;function Bg(t){let e=window.trustedTypes;return e?(xi||(xi=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),xi.createHTML(t)):t}function Rg(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Md().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Rd[r[1].toLowerCase()])&&(t=o.map(s=>"<"+s+">").join("")+t+o.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=Bg(t),o)for(let s=0;s<o.length;s++)n=n.querySelector(o[s])||n;return n}function Mg(t){let e=t.querySelectorAll(on?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Tg(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:s,openEnd:i}=t;for(let l=r.length-2;l>=0;l-=2){let a=n.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=P.from(a.create(r[l+1],o)),s++,i++}return new Z(o,s,i)}const Nt={},At={};function gn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}At.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!$d(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(ao&&on&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Nl&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,yd(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||Sg(t,n)?n.preventDefault():gn(t,"key")};At.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};At.keypress=(t,e)=>{let n=e;if($d(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Rt&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ce)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),s=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o,s))&&t.dispatch(s()),n.preventDefault()}};function Xs(t){return{left:t.clientX,top:t.clientY}}function $g(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Pl(t,e,n,r,o){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let i=s.depth+1;i>0;i--)if(t.someProp(e,l=>i>s.depth?l(t,n,s.nodeAfter,s.before(i),o,!0):l(t,n,s.node(i),s.before(i),o,!1)))return!0;return!1}function lr(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function Ig(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&pe.isSelectable(r)?(lr(t,new pe(n)),!0):!1}function Lg(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof pe&&(r=n.node);let s=t.state.doc.resolve(e);for(let i=s.depth+1;i>0;i--){let l=i>s.depth?s.nodeAfter:s.node(i);if(pe.isSelectable(l)){r&&n.$from.depth>0&&i>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?o=s.before(n.$from.depth):o=s.before(i);break}}return o!=null?(lr(t,pe.create(t.state.doc,o)),!0):!1}function Og(t,e,n,r,o){return Pl(t,"handleClickOn",e,n,r)||t.someProp("handleClick",
vendor: 4,819 bytes, line 9
9s=>s(t,e,r))||(o?Lg(t,n):Ig(t,n))}function Ng(t,e,n,r){return Pl(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function qg(t,e,n,r){return Pl(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||zg(t,n,r)}function zg(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(lr(t,ce.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let i=s>o.depth?o.nodeAfter:o.node(s),l=o.before(s);if(i.inlineContent)lr(t,ce.create(r,l+1,l+1+i.content.size));else if(pe.isSelectable(i))lr(t,pe.create(r,l));else continue;return!0}}function Vl(t){return es(t)}const Td=Rt?"metaKey":"ctrlKey";Nt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Vl(t),o=Date.now(),s="singleClick";o-t.input.lastClick.time<500&&$g(n,t.input.lastClick)&&!n[Td]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:s,button:n.button};let i=t.posAtCoords(Xs(n));i&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Pg(t,i,n,!!r)):(s=="doubleClick"?Ng:qg)(t,i.pos,i.inside,n)?n.preventDefault():gn(t,"pointer"))};class Pg{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Td],this.allowDefault=r.shiftKey;let s,i;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),i=n.inside;else{let c=e.state.doc.resolve(n.pos);s=c.parent,i=c.depth?c.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof pe&&u.from<=i&&u.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Zs&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),gn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>zl(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Xs(e))),this.updateAllowDefault(e),this.allowDefault||!n?gn(this.view,"pointer"):Og(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Zn&&this.mightDrag&&!this.mightDrag.node.isAtom||on&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(lr(this.view,be.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):gn(this.view,"pointer")}move(e){this.updateAllowDefault(e),gn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Nt.touchstart=t=>{t.input.lastTouch=Date.now(),Vl(t),gn(t,"pointer")};Nt.touchmove=t=>{t.input.lastTouch=Date.now(),gn(t,"pointer")};Nt.contextmenu=t=>Vl(t);function $d(t,e){return t.composing?!0:Zn&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Vg=ao?5e3:-1;At.compositionstart=At.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ce&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||on&&wd&&jg(t)))t.markCursor=t.state.storedMarks||n.marks(),es(t,!0),t.markCursor=null;else if(es(t,!e.selection.empty),Zs&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,s=r.focusOffset;o&&o.nodeType==1&&s!=0;){let i=s<0?o.lastChild:o.childNodes[s-1];if(!i)break;if(i.nodeType==3){let l=t.domSelection();l&&l.collapse(i,i.nodeValue.length);break}else o=i,s=-1}}t.input.composing=!0}Id(t,Vg)}
vendor: 4,991 bytes, line 9
9;function jg(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}At.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Id(t,20))};function Id(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>es(t),e))}function Hg(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Ug());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Ug(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function es(t,e=!1){if(!(ao&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Hg(t),e||t.docView&&t.docView.dirty){let n=gg(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Gg(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Kr=lo&&xd<15||Nl&&hg<604;Nt.copy=At.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let s=Kr?null:n.clipboardData,i=r.content(),{dom:l,text:a}=Dd(t,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):Gg(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Kg(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Wg(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?rl(t,r.value,null,o,e):rl(t,r.textContent,r.innerHTML,o,e)},50)}function rl(t,e,n,r,o){let s=Sd(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,s||Z.empty)))return!0;if(!s)return!1;let i=Kg(s),l=i?t.state.tr.replaceSelectionWith(i,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ld(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}At.paste=(t,e)=>{let n=e;if(t.composing&&!ao)return;let r=Kr?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&rl(t,Ld(r),r.getData("text/html"),o,n)?n.preventDefault():Wg(t,n)};class Jg{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Yg=Rt?"altKey":"ctrlKey";function Od(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[Yg]}Nt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,s=o.empty?null:t.posAtCoords(Xs(n)),i;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof pe?o.to-1:o.to))){if(r&&r.mightDrag)i=pe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(i=pe.create(t.state.doc,d.posBefore))}}let l=(i||t.state.selection).content(),{dom:a,text:u,slice:c}=Dd(t,l);(!n.dataTransfer.files.length||!on||Cd>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Kr?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Kr||n.dataTransfer.setData("text/plain",u),t.dragging=new Jg(c,Od(t,n),i)};Nt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};At.dragover=At.dragenter=(t,e)=>e.preventDefault();At.drop=(t,e)=>{try{Qg(t,e,t.dragging)}finally{t.dragging=null}};function Qg(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Xs(e));if(!r)return;let o=t.state.doc.resolve(r.pos),s=n&&n.slice;s?t.someProp("transformPasted",m=>{s=m(s,t,!1)}):s=Sd(t,Ld(e.dataTransfer),Kr?null:e.dataTransfer.getData("text/html"),!1,o);let i=!!(n&&Od(t,e));if(t.someProp("handleDrop",m=>m(t,e,s||Z.empty,i))){e.preventDefault();return}if(!s)return;e.preventDefault();let l=s?sg(t.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let a=t.state.tr;if(i){let{node:m}=n;m?m.replace(a):a.deleteSelection()}
vendor: 9,461 bytes, line 9
9let u=a.mapping.map(l),c=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,s.content.firstChild):a.replaceRange(u,u,s),a.doc.eq(d))return;let p=a.doc.resolve(u);if(c&&pe.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))a.setSelection(new pe(p));else{let m=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((h,g,y,v)=>m=v),a.setSelection(kd(t,p,a.doc.resolve(m)))}t.focus(),t.dispatch(a.setMeta("uiEvent","drop"))}Nt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&zl(t)},20))};Nt.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Nt.beforeinput=(t,e)=>{if(on&&ao&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,yd(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in At)Nt[t]=At[t];function Wr(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ts{constructor(e,n){this.toDOM=e,this.spec=n||qn,this.side=this.spec.side||0}map(e,n,r,o){let{pos:s,deleted:i}=e.mapResult(n.from+o,this.side<0?-1:1);return i?null:new Mt(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof ts&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Wr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class vn{constructor(e,n){this.attrs=e,this.spec=n||qn}map(e,n,r,o){let s=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,i=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return s>=i?null:new Mt(s,i,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof vn&&Wr(this.attrs,e.attrs)&&Wr(this.spec,e.spec)}static is(e){return e.type instanceof vn}destroy(){}}class jl{constructor(e,n){this.attrs=e,this.spec=n||qn}map(e,n,r,o){let s=e.mapResult(n.from+o,1);if(s.deleted)return null;let i=e.mapResult(n.to+o,-1);return i.deleted||i.pos<=s.pos?null:new Mt(s.pos-r,i.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),s;return o==n.from&&!(s=e.child(r)).isText&&o+s.nodeSize==n.to}eq(e){return this==e||e instanceof jl&&Wr(this.attrs,e.attrs)&&Wr(this.spec,e.spec)}destroy(){}}class Mt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Mt(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Mt(e,e,new ts(n,r))}static inline(e,n,r,o){return new Mt(e,n,new vn(r,o))}static node(e,n,r,o){return new Mt(e,n,new jl(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof vn}get widget(){return this.type instanceof ts}}const or=[],qn={};class Pe{constructor(e,n){this.local=e.length?e:or,this.children=n.length?n:or}static create(e,n){return n.length?ns(n,e,0,qn):lt}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,s){for(let i=0;i<this.local.length;i++){let l=this.local[i];l.from<=n&&l.to>=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>e){let l=this.children[i]+1;this.children[i+2].findInner(e-l,n-l,r,o+l,s)}}map(e,n,r){return this==lt||e.maps.length==0?this:this.mapInner(e,n,0,0,r||qn)}mapInner(e,n,r,o,s){let i;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,o);a&&a.type.valid(n,a)?(i||(i=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?Zg(this.children,i||[],e,n,r,o,s):i?new Pe(i.sort(zn),or):lt}add(e,n){return n.length?this==lt?Pe.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,s=0;e.forEach((l,a)=>{let u=a+r,c;if(c=qd(n,l,u)){for(o||(o=this.children.slice());s<o.length&&o[s]<a;)s+=3;o[s]==a?o[s+2]=o[s+2].addInner(l,c,u+1):o.splice(s,0,a,a+l.nodeSize,ns(c,l,u+1,qn)),s+=3}});let i=Nd(s?zd(n):n,-r);for(let l=0;l<i.length;l++)i[l].type.valid(e,i[l])||i.splice(l--,1);return new Pe(i.length?this.local.concat(i).sort(zn):this.local,o||this.children)}remove(e){return e.length==0||this==lt?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let s=0;s<r.length;s+=3){let i,l=r[s]+n,a=r[s+1]+n;for(let c=0,d;c<e.length;c++)(d=e[c])&&d.from>l&&d.to<a&&(e[c]=null,(i||(i=[])).push(d));if(!i)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(i,l+1);u!=lt?r[s+2]=u:(r.splice(s,3),s-=3)}if(o.length){for(let s=0,i;s<e.length;s++)if(i=e[s])for(let l=0;l<o.length;l++)o[l].eq(i,n)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new Pe(o,r):lt}forChild(e,n){if(this==lt)return this;if(n.isLeaf)return Pe.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,i=s+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<i&&a.to>s&&a.type instanceof vn){let u=Math.max(s,a.from)-s,c=Math.min(i,a.to)-s;u<c&&(o||(o=[])).push(a.copy(u,c))}}if(o){let l=new Pe(o.sort(zn),or);return r?new Bn([l,r]):l}return r||lt}eq(e){if(this==e)return!0;if(!(e instanceof Pe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Hl(this.localsInner(e))}localsInner(e){if(this==lt)return or;if(e.inlineContent||!this.local.some(vn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof vn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Pe.empty=new Pe([],[]);Pe.removeOverlap=Hl;const lt=Pe.empty;class Bn{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,qn));return Bn.from(r)}forChild(e,n){if(n.isLeaf)return Pe.empty;let r=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,n);s!=lt&&(s instanceof Bn?r=r.concat(s.members):r.push(s))}return Bn.from(r)}eq(e){if(!(e instanceof Bn)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let i=0;i<s.length;i++)n.push(s[i])}}return n?Hl(r?n:n.sort(zn)):or}static from(e){switch(e.length){case 0:return lt;case 1:return e[0];default:return new Bn(e.every(n=>n instanceof Pe)?e:e.reduce((n,r)=>n.concat(r instanceof Pe?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Zg(t,e,n,r,o,s,i){let l=t.slice();for(let u=0,c=s;u<n.maps.length;u++){let d=0;n.maps[u].forEach((p,m,h,g)=>{let y=g-h-(m-p);for(let v=0;v<l.length;v+=3){let C=l[v+1];if(C<0||p>C+c-d)continue;let x=l[v]+c-d;m>=x?l[v+1]=p<=x?-2:-1:p>=c&&y&&(l[v]+=y,l[v+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=n.map(t[u]+s),d=c-o;if(d<0||d>=r.content.size){a=!0;continue}let p=n.map(t[u+1]+s,-1),m=p-o,{index:h,offset:g}=r.content.findIndex(d),y=r.maybeChild(h);if(y&&g==d&&g+y.nodeSize==m){let v=l[u+2].mapInner(n,y,c+1,t[u]+s+1,i);v!=lt?(l[u]=d,l[u+1]=m,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=Xg(l,t,e,n,o,s,i),c=ns(u,r,0,i);e=c.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,p=0;d<c.children.length;d+=3){let m=c.children[d];for(;p<l.length&&l[p]<m;)p+=3;l.splice(p,0,c.children[d],c.children[d+1],c.children[d+2])}}return new Pe(e.sort(zn),l)}function Nd(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Mt(o.from+e,o.to+e,o.type))}return n}function Xg(t,e,n,r,o,s,i){function l(a,u){for(let c=0;c<a.local.length;c++){let d=a.local[c].map(r,o,u);d?n.push(d):i.onRemove&&i.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&l(t[a+2],e[a]+s+1);return n}function qd(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let s=0,i;s<t.length;s++)(i=t[s])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),t[s]=null);return o}function zd(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function ns(t,e,n,r){let o=[],s=!1;e.forEach((l,a)=>{let u=qd(t,l,a+n);if(u){s=!0;let c=ns(u,l,n+a+1,r);c!=lt&&o.push(a,a+l.nodeSize,c)}});let i=Nd(s?zd(t):t,-n).sort(zn);for(let l=0;l<i.length;l++)i[l].type.valid(e,i[l])||(r.onRemove&&r.onRemove(i[l].spec),i.splice(l--,1));return i.length||o.length?new Pe(i,o):lt}function zn(t,e){return t.from-e.from||t.to-e.to}function Hl(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let s=e[o];
vendor: 21,116 bytes, lines 9-11
9if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[o]=s.copy(s.from,r.to),mu(e,o+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),mu(e,o,r.copy(s.from,r.to)));break}}}return e}function mu(t,e,n){for(;e<t.length&&zn(n,t[e])>0;)e++;t.splice(e,0,n)}var Cn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},rs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},e2=typeof navigator<"u"&&/Mac/.test(navigator.platform),t2=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ye=0;Ye<10;Ye++)Cn[48+Ye]=Cn[96+Ye]=String(Ye);for(var Ye=1;Ye<=24;Ye++)Cn[Ye+111]="F"+Ye;for(var Ye=65;Ye<=90;Ye++)Cn[Ye]=String.fromCharCode(Ye+32),rs[Ye]=String.fromCharCode(Ye);for(var Ci in Cn)rs.hasOwnProperty(Ci)||(rs[Ci]=Cn[Ci]);function n2(t){var e=e2&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||t2&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?rs:Cn)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const r2=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),o2=typeof navigator<"u"&&/Win/.test(navigator.platform);function s2(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,s,i;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))r2?i=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),i&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function i2(t){let e=Object.create(null);for(let n in t)e[s2(n)]=t[n];return e}function wi(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function l2(t){let e=i2(t);return function(n,r){let o=n2(r),s,i=e[wi(o,r)];if(i&&i(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[wi(o,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(o2&&r.ctrlKey&&r.altKey)&&(s=Cn[r.keyCode])&&s!=o){let l=e[wi(s,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const ei=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Pd(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Ul=(t,e,n)=>{let r=Pd(t,n);if(!r)return!1;let o=Kl(r);if(!o){let i=r.blockRange(),l=i&&Yn(i);return l==null?!1:(e&&e(t.tr.lift(i,l).scrollIntoView()),!0)}let s=o.nodeBefore;if(Qd(t,o,e,-1))return!0;if(r.parent.content.size==0&&(ur(s,"end")||pe.isSelectable(s)))for(let i=r.depth;;i--){let l=Ys(t.doc,r.before(i),r.after(i),Z.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=t.tr.step(l);a.setSelection(ur(s,"end")?be.findFrom(a.doc.resolve(a.mapping.map(o.pos,-1)),-1):pe.create(a.doc,o.pos-s.nodeSize)),e(a.scrollIntoView())}return!0}if(i==1||r.node(i-1).childCount>1)break}return s.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},Vd=(t,e,n)=>{let r=Pd(t,n);if(!r)return!1;let o=Kl(r);return o?Hd(t,o,e):!1},jd=(t,e,n)=>{let r=Ud(t,n);if(!r)return!1;let o=Yl(r);return o?Hd(t,o,e):!1};function Hd(t,e,n){let r=e.nodeBefore,o=r,s=e.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let c=o.lastChild;if(!c)return!1;o=c}let i=e.nodeAfter,l=i,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=Ys(t.doc,s,a,Z.empty);if(!u||u.from!=s||u instanceof Ne&&u.slice.size>=a-s)return!1;if(n){let c=t.tr.step(u);c.setSelection(ce.create(c.doc,s)),n(c.scrollIntoView())}return!0}function ur(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Gl=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=Kl(r)}let i=s&&s.nodeBefore;return!i||!pe.isSelectable(i)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function Kl(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Ud(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Wl=(t,e,n)=>{let r=Ud(t,n);if(!r)return!1;let o=Yl(r);if(!o)return!1;let s=o.nodeAfter;if(Qd(t,o,e,1))return!0;if(r.parent.content.size==0&&(ur(s,"start")||pe.isSelectable(s))){let i=Ys(t.doc,r.before(),r.after(),Z.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=t.tr.step(i);l.setSelection(ur(s,"start")?be.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):pe.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},Jl=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=Yl(r)}let i=s&&s.nodeAfter;return!i||!pe.isSelectable(i)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,s.pos)).scrollIntoView()),!0)};function Yl(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Gd=(t,e)=>{let n=t.selection,r=n instanceof pe,o;if(r){if(n.node.isTextblock||!Kt(t.doc,n.from))return!1;o=n.from}else if(o=gr(t.doc,n.from,-1),o==null)return!1;if(e){let s=t.tr.join(o);r&&s.setSelection(pe.create(s.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Kd=(t,e)=>{let n=t.selection,r;if(n instanceof pe){if(n.node.isTextblock||!Kt(t.doc,n.to))return!1;r=n.to}else if(r=gr(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Wd=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&Yn(o);return s==null?!1:(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},Ql=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
10`).scrollIntoView()),!0)};function Zl(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Jd=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),s=n.indexAfter(-1),i=Zl(o.contentMatchAt(s));if(!i||!o.canReplaceWith(s,s,i))return!1;if(e){let l=n.after(),a=t.tr.replaceWith(l,l,i.createAndFill());a.setSelection(be.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Xl=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof ht||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=Zl(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let i=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(i,s.createAndFill());l.setSelection(ce.create(l.doc,i+1)),e(l.scrollIntoView())}return!0},ea=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(kt(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Yn(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function a2(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof pe&&e.selection.node.isBlock)return!r.parentOffset||!kt(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],i,l,a=!1,u=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){a=r.end(m)==r.pos+(r.depth-m),u=r.start(m)==r.pos-(r.depth-m),l=Zl(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),s.unshift(a&&l?{type:l}:null),i=m;break}else{if(m==1)return!1;s.unshift(null)}let c=e.tr;(e.selection instanceof ce||e.selection instanceof ht)&&c.deleteSelection();let d=c.mapping.map(r.pos),p=kt(c.doc,d,s.length,s);if(p||(s[0]=l?{type:l}:null,p=kt(c.doc,d,s.length,s)),!p)return!1;if(c.split(d,s.length,s),!a&&u&&r.node(i).type!=l){let m=c.mapping.map(r.before(i)),h=c.doc.resolve(m);l&&r.node(i-1).canReplaceWith(h.index(),h.index()+1,l)&&c.setNodeMarkup(c.mapping.map(r.before(i)),l)}return n&&n(c.scrollIntoView()),!0}}const u2=a2(),Yd=(t,e)=>{let{$from:n,to:r}=t.selection,o,s=n.sharedDepth(r);return s==0?!1:(o=n.before(s),e&&e(t.tr.setSelection(pe.create(t.doc,o))),!0)};function c2(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||Kt(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Qd(t,e,n,r){let o=e.nodeBefore,s=e.nodeAfter,i,l,a=o.type.spec.isolating||s.type.spec.isolating;if(!a&&c2(t,e,n))return!0;let u=!a&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(i=(l=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&l.matchType(i[0]||s.type).validEnd){if(n){let m=e.pos+s.nodeSize,h=P.empty;for(let v=i.length-1;v>=0;v--)h=P.from(i[v].create(null,h));h=P.from(o.copy(h));let g=t.tr.step(new Ke(e.pos-1,m,e.pos,m,new Z(h,1,0),i.length,!0)),y=g.doc.resolve(m+2*i.length);y.nodeAfter&&y.nodeAfter.type==o.type&&Kt(g.doc,y.pos)&&g.join(y.pos),n(g.scrollIntoView())}return!0}let c=s.type.spec.isolating||r>0&&a?null:be.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),p=d&&Yn(d);if(p!=null&&p>=e.depth)return n&&n(t.tr.lift(d,p).scrollIntoView()),!0;if(u&&ur(s,"start",!0)&&ur(o,"end")){let m=o,h=[];for(;h.push(m),!m.isTextblock;)m=m.lastChild;let g=s,y=1;for(;!g.isTextblock;g=g.firstChild)y++;if(m.canReplace(m.childCount,m.childCount,g.content)){if(n){let v=P.empty;for(let x=h.length-1;x>=0;x--)v=P.from(h[x].copy(v));let C=t.tr.step(new Ke(e.pos-h.length,e.pos+s.nodeSize,e.pos+y,e.pos+s.nodeSize-y,new Z(v,h.length,0),0,!0));n(C.scrollIntoView())}return!0}}return!1}function Zd(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(n&&n(e.tr.setSelection(ce.create(e.doc,t<0?o.start(s):o.end(s)))),!0):!1}}const Xd=Zd(-1),ef=Zd(1);function tf(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s),l=i&&Il(i,t,e);return l?(r&&r(n.tr.wrap(i,l).scrollIntoView()),!0):!1}}function ss(t,e=null){return function(n,r){let o=!1;for(let s=0;s<n.selection.ranges.length&&!o;s++){let{$from:{pos:i},$to:{pos:l}}=n.selection.ranges[s];n.doc.nodesBetween(i,l,(a,u)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let c=n.doc.resolve(u),d=c.index();o=c.parent.canReplaceWith(d,d+1,t)}})}if(!o)return!1;if(r){let s=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[i];s.setBlockType(l,a,t,e)}r(s.scrollIntoView())}return!0}}function ta(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}ta(ei,Ul,Gl);ta(ei,Wl,Jl);ta(Ql,Xl,ea,u2);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function nf(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s);if(!i)return!1;let l=r?n.tr:null;return d2(l,i,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function d2(t,e,n,r=null){let o=!1,s=e,i=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=i.resolve(e.start-2);s=new Jo(a,a,e.depth),e.endIndex<e.parent.childCount&&(e=new Jo(e.$from,i.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let l=Il(s,n,r,e);return l?(t&&f2(t,e,l,o,n),!0):!1}function f2(t,e,n,r,o){let s=P.empty;for(let c=n.length-1;c>=0;c--)s=P.from(n[c].type.create(n[c].attrs,s));t.step(new Ke(e.start-(r?2:0),e.end,e.start,e.end,new Z(s,0,0),n.length,!0));let i=0;for(let c=0;c<n.length;c++)n[c].type==o&&(i=c+1);let l=n.length-i,a=e.start+n.length-(r?2:0),u=e.parent;for(let c=e.startIndex,d=e.endIndex,p=!0;c<d;c++,p=!1)!p&&kt(t.doc,a,l)&&(t.split(a,l),a+=2*l),a+=u.child(c).nodeSize;return t}function rf(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,i=>i.childCount>0&&i.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?p2(e,n,t,s):m2(e,n,s):!0:!1}}function p2(t,e,n,r){let o=t.tr,s=r.end,i=r.$to.end(r.depth);s<i&&(o.step(new Ke(s-1,i,s,i,new Z(P.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Jo(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const l=Yn(r);if(l==null)return!1;o.lift(r,l);let a=o.doc.resolve(o.mapping.map(s,-1)-1);return Kt(o.doc,a.pos)&&a.nodeBefore.type==a.nodeAfter.type&&o.join(a.pos),e(o.scrollIntoView()),!0}function m2(t,e,n){let r=t.tr,o=n.parent;for(let m=n.end,h=n.endIndex-1,g=n.startIndex;h>g;h--)m-=o.child(h).nodeSize,r.delete(m-1,m+1);let s=r.doc.resolve(n.start),i=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==o.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(l?0:1),c+1,i.content.append(a?P.empty:P.from(o))))return!1;let d=s.pos,p=d+i.nodeSize;return r.step(new Ke(d-(l?1:0),p+(a?1:0),d+1,p-1,new Z((l?P.empty:P.from(o.copy(P.empty))).append(a?P.empty:P.from(o.copy(P.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function of(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==t);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let l=s.parent,a=l.child(i-1);if(a.type!=t)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=P.from(u?t.create():null),d=new Z(P.from(t.create(null,P.from(l.type.create(null,c)))),u?3:1,0),p=s.start,m=s.end;n(e.tr.step(new Ke(p-(u?3:1),m,p,m,d,1,!0)).scrollIntoView())}return!0}}function sf(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}let h2=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:s}=r,i=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...c)=>{const d=a(...c)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l=[],a=!!e,u=e||s.tr,c=()=>(!a&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),l.every(p=>p===!0)),d={...Object.fromEntries(Object.entries(r).map(([p,m])=>[p,(...g)=>{const y=this.buildProps(u,n),v=m(...g)(y);return l.push(v),d}])),run:c};return d}createCan(e){const{rawCommands:n,state:r}=this,o=!1,s=e||r.tr,i=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(n).map(([a,u])=>[a,(...c)=>u(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l={tr:e,editor:o,view:i,state:sf({state:s,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,u])=>[a,(...c)=>u(...c)(l)]))}};return l}};function tt(t,e,n){return t.config[e]===void 0&&t.parent?tt(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?tt(t.parent,e,n):null}):t.config[e]}function g2(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Ze(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Oe(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,s])=>{if(!r[o]){r[o]=s;return}if(o==="class"){const l=s?String(s).split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(c=>!a.includes(c));r[o]=[...a,...u].join(" ")}else if(o==="style"){const l=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;a.forEach(c=>{const[d,p]=c.split(":").map(m=>m.trim());u.set(d,p)}),l.forEach(c=>{const[d,p]=c.split(":").map(m=>m.trim());u.set(d,p)}),r[o]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=s}),r},{})}function b2(t){return typeof t=="function"}function Ge(t,e=void 0,...n){return b2(t)?e?t.bind(e)(...n):t(...n):t}function y2(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class ti{constructor(e){this.find=e.find,this.handler=e.handler}}function v2(t){return Object.prototype.toString.call(t).slice(8,-1)}function xo(t){return v2(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function ni(t,e){const n={...t};return xo(t)&&xo(e)&&Object.keys(e).forEach(r=>{xo(e[r])&&xo(t[r])?n[r]=ni(t[r],e[r]):n[r]=e[r]}),n}let An=class ol{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ge(tt(this,"addOptions",{name:this.name}))),this.storage=Ge(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ol(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>ni(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new ol(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ge(tt(n,"addOptions",{name:n.name})),n.storage=Ge(tt(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const i=o.marks();if(!!!i.find(u=>u?.type.name===n.name))return!1;const a=i.find(u=>u?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}};class x2{constructor(e){this.find=e.find,this.handler=e.handler}}let sn=class sl{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ge(tt(this,"addOptions",{name:this.name}))),this.storage=Ge(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new sl(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>ni(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new sl({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ge(tt(n,"addOptions",{name:n.name})),n.storage=Ge(tt(n,"addStorage",{name:n.name,options:n.options})),n}};function C2(t,e,n){const{from:r,to:o}=e,{blockSeparator:s=`
11
12`,textSerializers:i={}}=n||{};let l="";return t.nodesBetween(r,o,(a,u,c,d)=>{var p;a.isBlock&&u>r&&(l+=s);const m=i?.[a.type.name];if(m)return c&&(l+=m({node:a,pos:u,parent:c,index:d,range:e})),!1;a.isText&&(l+=(p=a?.text)===null||p===void 0?void 0:p.slice(Math.max(r,u)-u,o-u))}),l}function w2(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}sn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new He({key:new ze("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(c=>c.$from.pos)),l=Math.max(...s.map(c=>c.$to.pos)),a=w2(n);return C2(r,{from:i,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}});const _2=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),k2=(t=!1)=>({commands:e})=>e.setContent("",t),A2=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:s,$to:i})=>{t.doc.nodesBetween(s.pos,i.pos,(l,a)=>{if(l.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(a)),p=u.resolve(c.map(a+l.nodeSize)),m=d.blockRange(p);if(!m)return;const h=Yn(m);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(m.start,g)}(h||h===0)&&e.lift(m,h)})}),!0},D2=t=>e=>t(e),S2=()=>({state:t,dispatch:e})=>Xl(t,e),E2=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new ce(r.doc.resolve(Math.max(i-1,0)))),!0},F2=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const l=o.before(s),a=o.after(s);t.delete(l,a).scrollIntoView()}return!0}return!1},B2=t=>({tr:e,state:n,dispatch:r})=>{const o=Ze(t,n.schema),s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===o){if(r){const a=s.before(i),u=s.after(i);e.delete(a,u).scrollIntoView()}return!0}return!1},R2=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},M2=()=>({state:t,dispatch:e})=>ei(t,e),T2=()=>({commands:t})=>t.keyboardShortcut("Enter"),$2=()=>({state:t,dispatch:e})=>Jd(t,e);function is(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:y2(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function lf(t,e,n={}){return t.find(r=>r.type===e&&is(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function hu(t,e,n={}){return!!lf(t,e,n)}function na(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!lf([...o.node.marks],e,n)))return;let i=o.index,l=t.start()+o.offset,a=i+1,u=l+o.node.nodeSize;for(;i>0&&hu([...t.parent.child(i-1).marks],e,n);)i-=1,l-=t.parent.child(i).nodeSize;for(;a<t.parent.childCount&&hu([...t.parent.child(a).marks],e,n);)u+=t.parent.child(a).nodeSize,a+=1;return{from:l,to:u}}function Dn(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const I2=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const s=Dn(t,r.schema),{doc:i,selection:l}=n,{$from:a,from:u,to:c}=l;if(o){const d=na(a,s,e);if(d&&d.from<=u&&d.to>=c){const p=ce.create(i,d.from,d.to);n.setSelection(p)}}return!0},L2=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function af(t){return t instanceof ce}function Mn(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function O2(t,e=null){if(!e)return null;const n=be.atStart(t),r=be.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,s=r.to;return e==="all"?ce.create(t,Mn(0,o,s),Mn(t.content.size,o,s)):ce.create(t,Mn(e,o,s),Mn(e,o,s))}function gu(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function ls(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function N2(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}const q2=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{(ls()||gu())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),N2()&&!ls()&&!gu()&&r.dom.focus({preventScroll:!0}))})};if(r.hasFocus()&&t===null||t===!1)return!0;
vendor: 12,984 bytes, line 12
12if(s&&t===null&&!af(n.state.selection))return i(),!0;const l=O2(o.doc,t)||n.state.selection,a=n.state.selection.eq(l);return s&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},z2=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),P2=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),uf=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&uf(r)}return t};function Co(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return uf(n)}function Jr(t,e,n){if(t instanceof yn||t instanceof P)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return P.fromArray(t.map(l=>e.nodeFromJSON(l)));const i=e.nodeFromJSON(t);return n.errorOnInvalidContent&&i.check(),i}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),Jr("",e,n)}if(o){if(n.errorOnInvalidContent){let i=!1,l="";const a=new Qc({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(i=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?jt.fromSchema(a).parseSlice(Co(t),n.parseOptions):jt.fromSchema(a).parse(Co(t),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const s=jt.fromSchema(e);return n.slice?s.parseSlice(Co(t),n.parseOptions).content:s.parse(Co(t),n.parseOptions)}return Jr("",e,n)}function V2(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Ne||o instanceof Ke))return;const s=t.mapping.maps[r];let i=0;s.forEach((l,a,u,c)=>{i===0&&(i=c)}),t.setSelection(be.near(t.doc.resolve(i),n))}const j2=t=>!("type"in t),H2=(t,e,n)=>({tr:r,dispatch:o,editor:s})=>{var i;if(o){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const a=y=>{s.emit("contentError",{editor:s,error:y,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Jr(e,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(y){a(y)}try{l=Jr(e,s.schema,{parseOptions:u,errorOnInvalidContent:(i=n.errorOnInvalidContent)!==null&&i!==void 0?i:s.options.enableContentCheck})}catch(y){return a(y),!1}let{from:c,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},p=!0,m=!0;if((j2(l)?l:[l]).forEach(y=>{y.check(),p=p?y.isText&&y.marks.length===0:!1,m=m?y.isBlock:!1}),c===d&&m){const{parent:y}=r.doc.resolve(c);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(c-=1,d+=1)}let g;if(p){if(Array.isArray(e))g=e.map(y=>y.text||"").join("");else if(e instanceof P){let y="";e.forEach(v=>{v.text&&(y+=v.text)}),g=y}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,c,d)}else g=l,r.replaceWith(c,d,g);n.updateSelection&&V2(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:g})}return!0},U2=()=>({state:t,dispatch:e})=>Gd(t,e),G2=()=>({state:t,dispatch:e})=>Kd(t,e),K2=()=>({state:t,dispatch:e})=>Ul(t,e),W2=()=>({state:t,dispatch:e})=>Wl(t,e),J2=()=>({state:t,dispatch:e,tr:n})=>{try{const r=gr(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Y2=()=>({state:t,dispatch:e,tr:n})=>{try{const r=gr(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Q2=()=>({state:t,dispatch:e})=>Vd(t,e),Z2=()=>({state:t,dispatch:e})=>jd(t,e);function cf(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function X2(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,s,i;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))ls()||cf()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}const e0=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const s=X2(t).split(/-(?!$)/),i=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a?.steps.forEach(u=>{const c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function ra(t,e,n={}){const{from:r,to:o,empty:s}=t.selection,i=e?Ze(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(d,p)=>{if(d.isText)return;const m=Math.max(r,p),h=Math.min(o,p+d.nodeSize);l.push({node:d,from:m,to:h})});const a=o-r,u=l.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>is(d.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((d,p)=>d+p.to-p.from,0)>=a}const t0=(t,e={})=>({state:n,dispatch:r})=>{const o=Ze(t,n.schema);return ra(n,o,e)?Wd(n,r):!1},n0=()=>({state:t,dispatch:e})=>ea(t,e),r0=t=>({state:e,dispatch:n})=>{const r=Ze(t,e.schema);return rf(r)(e,n)},o0=()=>({state:t,dispatch:e})=>Ql(t,e);function oa(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function bu(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const s0=(t,e)=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const l=oa(typeof t=="string"?t:t.name,r.schema);return l?(l==="node"&&(s=Ze(t,r.schema)),l==="mark"&&(i=Dn(t,r.schema)),o&&n.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(u,c)=>{s&&s===u.type&&n.setNodeMarkup(c,void 0,bu(u.attrs,e)),i&&u.marks.length&&u.marks.forEach(d=>{i===d.type&&n.addMark(c,c+u.nodeSize,i.create(bu(d.attrs,e)))})})}),!0):!1},i0=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),l0=()=>({tr:t,dispatch:e})=>{if(e){const n=new ht(t.doc);t.setSelection(n)}return!0},a0=()=>({state:t,dispatch:e})=>Gl(t,e),u0=()=>({state:t,dispatch:e})=>Jl(t,e),c0=()=>({state:t,dispatch:e})=>Yd(t,e),d0=()=>({state:t,dispatch:e})=>ef(t,e),f0=()=>({state:t,dispatch:e})=>Xd(t,e);function p0(t,e,n={},r={}){return Jr(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const m0=(t,e=!1,n={},r={})=>({editor:o,tr:s,dispatch:i,commands:l})=>{var a,u;const{doc:c}=s;if(n.preserveWhitespace!=="full"){const d=p0(t,o.schema,n,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:o.options.enableContentCheck});return i&&s.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!e),!0}return i&&s.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:c.content.size},t,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck})};function df(t,e){const n=Dn(e,t.schema),{from:r,to:o,empty:s}=t.selection,i=[];s?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{i.push(...a.marks)});const l=i.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function h0(t,e){const n=new fd(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function g0(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function b0(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,s)=>{n(o)&&r.push({node:o,pos:s})}),r}function ff(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function sa(t){return e=>ff(e.$from,t)}function y0(t,e){const n=Ze(e,t.schema),{from:r,to:o}=t.selection,s=[];t.doc.nodesBetween(r,o,l=>{s.push(l)});const i=s.reverse().find(l=>l.type.name===n.name);return i?{...i.attrs}:{}}function v0(t,e){const n=oa(typeof e=="string"?e:e.name,t.schema);return n==="node"?y0(t,e):n==="mark"?df(t,e):{}}function x0(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function C0(t){const e=x0(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,i)=>i!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function w0(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,s)=>{const i=[];if(o.ranges.length)o.forEach((l,a)=>{i.push({from:l,to:a})});else{const{from:l,to:a}=n[s];if(l===void 0||a===void 0)return;i.push({from:l,to:a})}i.forEach(({from:l,to:a})=>{const u=e.slice(s).map(l,-1),c=e.slice(s).map(a),d=e.invert().map(u,-1),p=e.invert().map(c);r.push({oldRange:{from:d,to:p},newRange:{from:u,to:c}})})}),C0(r)}function ia(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const s=n.resolve(t),i=na(s,o.type);i&&r.push({mark:o,...i})}):n.nodesBetween(t,e,(o,s)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(i=>({from:s,to:s+o.nodeSize,mark:i})))}),r}function zo(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}function _0(t,e,n={}){const{empty:r,ranges:o}=t.selection,s=e?Dn(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>is(d.attrs,n,{strict:!1}));let i=0;const l=[];if(o.forEach(({$from:d,$to:p})=>{const m=d.pos,h=p.pos;t.doc.nodesBetween(m,h,(g,y)=>{if(!g.isText&&!g.marks.length)return;const v=Math.max(m,y),C=Math.min(h,y+g.nodeSize),x=C-v;i+=x,l.push(...g.marks.map(k=>({mark:k,from:v,to:C})))})}),i===0)return!1;const a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>is(d.mark.attrs,n,{strict:!1})).reduce((d,p)=>d+p.to-p.from,0),u=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,p)=>d+p.to-p.from,0);return(a>0?a+u:a)>=i}function yu(t,e){const{nodeExtensions:n}=g2(e),r=n.find(i=>i.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=Ge(tt(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function pf(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(s=>{o!==!1&&(pf(s,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function k0(t){return t instanceof pe}function A0(t,e,n){var r;const{selection:o}=e;let s=null;if(af(o)&&(s=o.$cursor),s){const l=(r=t.storedMarks)!==null&&r!==void 0?r:s.marks();return!!n.isInSet(l)||!l.some(a=>a.type.excludes(n))}const{ranges:i}=o;return i.some(({$from:l,$to:a})=>{let u=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,a.pos,(c,d,p)=>{if(u)return!1;if(c.isInline){const m=!p||p.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(g=>g.type.excludes(n));u=m&&h}return!u}),u})}const D0=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=n,{empty:i,ranges:l}=s,a=Dn(t,r.schema);if(o)if(i){const u=df(r,a);n.addStoredMark(a.create({...u,...e}))}else l.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(p,m)=>{const h=Math.max(m,c),g=Math.min(m+p.nodeSize,d);p.marks.find(v=>v.type===a)?p.marks.forEach(v=>{a===v.type&&n.addMark(h,g,a.create({...v.attrs,...e}))}):n.addMark(h,g,a.create(e))})});return A0(r,n,a)},S0=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),E0=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const s=Ze(t,n.schema);let i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:l})=>ss(s,{...i,...e})(n)?!0:l.clearNodes()).command(({state:l})=>ss(s,{...i,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},F0=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Mn(t,0,r.content.size),s=pe.create(r,o);e.setSelection(s)}return!0},B0=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:s}=typeof t=="number"?{from:t,to:t}:t,i=ce.atStart(r).from,l=ce.atEnd(r).to,a=Mn(o,i,l),u=Mn(s,i,l),c=ce.create(r,a,u);e.setSelection(c)}return!0},R0=t=>({state:e,dispatch:n})=>{const r=Ze(t,e.schema);return of(r)(e,n)};function vu(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e?.includes(o.type.name));t.tr.ensureMarks(r)}}const M0=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:l,$to:a}
vendor: 4,479 bytes, line 12
12=s,u=o.extensionManager.attributes,c=zo(u,l.node().type.name,l.node().attrs);if(s instanceof pe&&s.node.isBlock)return!l.parentOffset||!kt(i,l.pos)?!1:(r&&(t&&vu(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const d=a.parentOffset===a.parent.content.size,p=l.depth===0?void 0:g0(l.node(-1).contentMatchAt(l.indexAfter(-1)));let m=d&&p?[{type:p,attrs:c}]:void 0,h=kt(e.doc,e.mapping.map(l.pos),1,m);if(!m&&!h&&kt(e.doc,e.mapping.map(l.pos),1,p?[{type:p}]:void 0)&&(h=!0,m=p?[{type:p,attrs:c}]:void 0),r){if(h&&(s instanceof ce&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,m),p&&!d&&!l.parentOffset&&l.parent.type!==p)){const g=e.mapping.map(l.before()),y=e.doc.resolve(g);l.node(-1).canReplaceWith(y.index(),y.index()+1,p)&&e.setNodeMarkup(e.mapping.map(l.before()),p)}t&&vu(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return h},T0=(t,e={})=>({tr:n,state:r,dispatch:o,editor:s})=>{var i;const l=Ze(t,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;const d=a.node(-1);if(d.type!==l)return!1;const p=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let v=P.empty;const C=a.index(-1)?1:a.index(-2)?2:3;for(let R=a.depth-C;R>=a.depth-3;R-=1)v=P.from(a.node(R).copy(v));const x=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,k={...zo(p,a.node().type.name,a.node().attrs),...e},D=((i=l.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(k))||void 0;v=v.append(P.from(l.createAndFill(null,D)||void 0));const F=a.before(a.depth-(C-1));n.replace(F,a.after(-x),new Z(v,4-C,0));let B=-1;n.doc.nodesBetween(F,n.doc.content.size,(R,q)=>{if(B>-1)return!1;R.isTextblock&&R.content.size===0&&(B=q+1)}),B>-1&&n.setSelection(ce.near(n.doc.resolve(B))),n.scrollIntoView()}return!0}const m=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...zo(p,d.type.name,d.attrs),...e},g={...zo(p,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,u.pos);const y=m?[{type:l,attrs:h},{type:m,attrs:g}]:[{type:l,attrs:h}];if(!kt(n.doc,a.pos,2))return!1;if(o){const{selection:v,storedMarks:C}=r,{splittableMarks:x}=s.extensionManager,k=C||v.$to.parentOffset&&v.$from.marks();if(n.split(a.pos,2,y).scrollIntoView(),!k||!o)return!0;const D=k.filter(F=>x.includes(F.type.name));n.ensureMarks(D)}return!0},_i=(t,e)=>{const n=sa(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===o?.type&&Kt(t.doc,n.pos)&&t.join(n.pos),!0},ki=(t,e)=>{const n=sa(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===o?.type&&Kt(t.doc,r)&&t.join(r),!0},$0=(t,e,n,r={})=>({editor:o,tr:s,state:i,dispatch:l,chain:a,commands:u,can:c})=>{const{extensions:d,splittableMarks:p}=o.extensionManager,m=Ze(t,i.schema),h=Ze(e,i.schema),{selection:g,storedMarks:y}=i,{$from:v,$to:C}=g,x=v.blockRange(C),k=y||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;const D=sa(F=>yu(F.type.name,d))(g);if(x.depth>=1&&D&&x.depth-D.depth<=1){if(D.node.type===m)return u.liftListItem(h);if(yu(D.node.type.name,d)&&m.validContent(D.node.content)&&l)return a().command(()=>(s.setNodeMarkup(D.pos,m),!0)).command(()=>_i(s,m)).command(()=>ki(s,m)).run()}return!n||!k||!l?a().command(()=>c().wrapInList(m,r)?!0:u.clearNodes()).wrapInList(m,r).command(()=>_i(s,m)).command(()=>ki(s,m)).run():a().command(()=>{const F=c().wrapInList(m,r),B=k.filter(R=>p.includes(R.type.name));return s.ensureMarks(B),F?!0:u.clearNodes()}).wrapInList(m,r).command(()=>_i(s,m)).command(()=>ki(s,m)).run()},I0=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,i=Dn(t,r.schema);return _0(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},L0=(t,e,n={})=>({state:r,commands:o})=>{const s=Ze(t,r.schema),i=Ze(e,r.schema),l=ra(r,s,n);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(i,a):o.setNode(s,{...a,...n})},O0=(t,e={})=>({state:n,commands:r})=>{const o=Ze(t,n.schema);return ra(n,o,e)?r.lift(o):r.wrapIn(o,e)},N0=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let s;
vendor: 9,966 bytes, line 12
12if(o.spec.isInputRules&&(s=o.getState(t))){if(e){const i=t.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a-=1)i.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,t.schema.text(s.text,a))}else i.delete(s.from,s.to)}return!0}}return!1},q0=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},z0=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:l}=n,a=Dn(t,r.schema),{$from:u,empty:c,ranges:d}=l;if(!o)return!0;if(c&&i){let{from:p,to:m}=l;const h=(s=u.marks().find(y=>y.type===a))===null||s===void 0?void 0:s.attrs,g=na(u,a,h);g&&(p=g.from,m=g.to),n.removeMark(p,m,a)}else d.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,a)});return n.removeStoredMark(a),!0},P0=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const l=oa(typeof t=="string"?t:t.name,r.schema);return l?(l==="node"&&(s=Ze(t,r.schema)),l==="mark"&&(i=Dn(t,r.schema)),o&&n.selection.ranges.forEach(a=>{const u=a.$from.pos,c=a.$to.pos;let d,p,m,h;n.selection.empty?r.doc.nodesBetween(u,c,(g,y)=>{s&&s===g.type&&(m=Math.max(y,u),h=Math.min(y+g.nodeSize,c),d=y,p=g)}):r.doc.nodesBetween(u,c,(g,y)=>{y<u&&s&&s===g.type&&(m=Math.max(y,u),h=Math.min(y+g.nodeSize,c),d=y,p=g),y>=u&&y<=c&&(s&&s===g.type&&n.setNodeMarkup(y,void 0,{...g.attrs,...e}),i&&g.marks.length&&g.marks.forEach(v=>{if(i===v.type){const C=Math.max(y,u),x=Math.min(y+g.nodeSize,c);n.addMark(C,x,i.create({...v.attrs,...e}))}}))}),p&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...p.attrs,...e}),i&&p.marks.length&&p.marks.forEach(g=>{i===g.type&&n.addMark(m,h,i.create({...g.attrs,...e}))}))}),!0):!1},V0=(t,e={})=>({state:n,dispatch:r})=>{const o=Ze(t,n.schema);return tf(o,e)(n,r)},j0=(t,e={})=>({state:n,dispatch:r})=>{const o=Ze(t,n.schema);return nf(o,e)(n,r)};var H0=Object.freeze({__proto__:null,blur:_2,clearContent:k2,clearNodes:A2,command:D2,createParagraphNear:S2,cut:E2,deleteCurrentNode:F2,deleteNode:B2,deleteRange:R2,deleteSelection:M2,enter:T2,exitCode:$2,extendMarkRange:I2,first:L2,focus:q2,forEach:z2,insertContent:P2,insertContentAt:H2,joinBackward:K2,joinDown:G2,joinForward:W2,joinItemBackward:J2,joinItemForward:Y2,joinTextblockBackward:Q2,joinTextblockForward:Z2,joinUp:U2,keyboardShortcut:e0,lift:t0,liftEmptyBlock:n0,liftListItem:r0,newlineInCode:o0,resetAttributes:s0,scrollIntoView:i0,selectAll:l0,selectNodeBackward:a0,selectNodeForward:u0,selectParentNode:c0,selectTextblockEnd:d0,selectTextblockStart:f0,setContent:m0,setMark:D0,setMeta:S0,setNode:E0,setNodeSelection:F0,setTextSelection:B0,sinkListItem:R0,splitBlock:M0,splitListItem:T0,toggleList:$0,toggleMark:I0,toggleNode:L0,toggleWrap:O0,undoInputRule:N0,unsetAllMarks:q0,unsetMark:z0,updateAttributes:P0,wrapIn:V0,wrapInList:j0});sn.create({name:"commands",addCommands(){return{...H0}}});sn.create({name:"drop",addProseMirrorPlugins(){return[new He({key:new ze("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}});sn.create({name:"editable",addProseMirrorPlugins(){return[new He({key:new ze("editable"),props:{editable:()=>this.editor.options.editable}})]}});const U0=new ze("focusEvents");sn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new He({key:U0,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}});sn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:l})=>{const{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:p,parent:m}=d,h=d.parent.isTextblock&&p>0?l.doc.resolve(p-1):d,g=h.parent.type.spec.isolating,y=d.pos-d.parentOffset,v=g&&h.parent.childCount===1?y===d.pos:be.atStart(u).from===p;return!c||!m.type.isTextblock||m.textContent.length||!v||v&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ls()||cf()?s:o},addProseMirrorPlugins(){return[new He({key:new ze("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(g=>g.getMeta("composition")))return;const r=t.some(g=>g.docChanged)&&!e.doc.eq(n.doc),o=t.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;const{empty:s,from:i,to:l}=e.selection,a=be.atStart(e.doc).from,u=be.atEnd(e.doc).to;if(s||!(i===a&&l===u)||!pf(n.doc))return;const p=n.tr,m=sf({state:n,transaction:p}),{commands:h}=new h2({editor:this.editor,state:m});if(h.clearNodes(),!!p.steps.length)return p}})]}});sn.create({name:"paste",addProseMirrorPlugins(){return[new He({key:new ze("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}});sn.create({name:"tabindex",addProseMirrorPlugins(){return[new He({key:new ze("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});function cr(t){return new ti({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Ge(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:s}=e,i=r[r.length-1],l=r[0];if(i){const a=l.search(/\S/),u=n.from+l.indexOf(i),c=u+i.length;if(ia(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(g=>g===t.type&&g!==m.mark.type)).filter(m=>m.to>u).length)return null;c<n.to&&s.delete(c,n.to),u>n.from&&s.delete(n.from+a,u);const p=n.from+a+i.length;s.addMark(n.from+a,p,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function G0(t){return new ti({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Ge(t.getAttributes,void 0,r)||{},{tr:s}=e,i=n.from;let l=n.to;const a=t.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let c=i+u;c>l?c=l:l=c+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,i+r[0].length-1),s.replaceWith(c,l,a)}else if(r[0]){const u=t.type.isInline?i:i-1;s.insert(u,t.type.create(o)).delete(s.mapping.map(i),s.mapping.map(l))}s.scrollIntoView()}})}function il(t){return new ti({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),s=Ge(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)}})}function Yr(t){return new ti({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const s=Ge(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),a=i.doc.resolve(n.from).blockRange(),u=a&&Il(a,t.type,s);if(!u)return null;if(i.wrap(a,u),t.keepMarks&&t.editor){const{selection:d,storedMarks:p}=e,{splittableMarks:m}=t.editor.extensionManager,h=p||d.$to.parentOffset&&d.$from.marks();if(h){const g=h.filter(y=>m.includes(y.type.name));i.ensureMarks(g)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,s).run()}const c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&Kt(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&i.join(n.from-1)}})}let Xe=class ll{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ge(tt(this,"addOptions",{name:this.name}))),this.storage=Ge(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ll(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>ni(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new ll(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ge(tt(n,"addOptions",{name:n.name})),n.storage=Ge(tt(n,"addStorage",{name:n.name,options:n.options})),n}};function jn(t){return new x2({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const s=Ge(t.getAttributes,void 0,r,o);if(s===!1||s===null)return null;const{tr:i}=e,l=r[r.length-1],a=r[0];let u=n.to;if(l){const c=a.search(/\S/),d=n.from+a.indexOf(l),p=d+l.length;if(ia(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(y=>y===t.type&&y!==h.mark.type)).filter(h=>h.to>d).length)return null;p<n.to&&i.delete(p,n.to),d>n.from&&i.delete(n.from+c,d),u=n.from+c+l.length,i.addMark(n.from+c,u,t.type.create(s||{})),i.removeStoredMark(t.type)}}})}function K0(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof pe){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let o=r.depth;for(;o>=0;){const s=r.index(o);if(r.node(o).contentMatchAt(s).matchType(e))return!0;o-=1}return!1}const W0=(t,e,n)=>{return r(t);function r(l){if(l.content&&(l.content=l.content.map(r)),l.type==="text"){if(l.marks){let c;
12return l.marks.reverse().forEach(d=>{const[p="span",m=d.attrs]=o(d,"mark");c=n(p,m,c||l.text)}),c}return l.text??""}const[a="div",u=l.attrs]=o(l);return n(a,u,l.content)}function o(l,a="node"){const u=s(l.type,a);if(!u?.renderHTML)return[];const c=i(l.attrs,u);return u.renderHTML({node:l,HTMLAttributes:c})}function s(l,a){const u=e.find(c=>c.type==a&&c.name==l);if(u)return{...u.config,options:u.options}}function i(l,a){const u=a.addAttributes?.();return!u||!l?l:Object.fromEntries(Object.entries(l).filter(([c])=>u[c]?.rendered!==!1))}};function mf(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}class J0{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:s}=r,i=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...c)=>{const d=a(...c)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l=[],a=!!e,u=e||s.tr,c=()=>(!a&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),l.every(p=>p===!0)),d={...Object.fromEntries(Object.entries(r).map(([p,m])=>[p,(...g)=>{const y=this.buildProps(u,n),v=m(...g)(y);return l.push(v),d}])),run:c};return d}createCan(e){const{rawCommands:n,state:r}=this,o=!1,s=e||r.tr,i=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(n).map(([a,u])=>[a,(...c)=>u(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l={tr:e,editor:o,view:i,state:mf({state:s,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,u])=>[a,(...c)=>u(...c)(l)]))}};return l}}function at(t,e,n){return t.config[e]===void 0&&t.parent?at(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?at(t.parent,e,n):null}):t.config[e]}function Y0(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function nt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Q0(t){return typeof t=="function"}function wt(t,e=void 0,...n){return Q0(t)?e?t.bind(e)(...n):t(...n):t}function Z0(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function X0(t){return Object.prototype.toString.call(t).slice(8,-1)}function wo(t){return X0(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function ri(t,e){const n={...t};return wo(t)&&wo(e)&&Object.keys(e).forEach(r=>{wo(e[r])&&wo(t[r])?n[r]=ri(t[r],e[r]):n[r]=e[r]}),n}class as{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=wt(at(this,"addOptions",{name:this.name}))),this.storage=wt(at(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new as(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>ri(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new as(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=wt(at(n,"addOptions",{name:n.name})),n.storage=wt(at(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const i=o.marks();if(!!!i.find(u=>u?.type.name===n.name))return!1;const a=i.find(u=>u?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}class Ot{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=wt(at(this,"addOptions",{name:this.name}))),this.storage=wt(at(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ot(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>ri(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ot({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=wt(at(n,"addOptions",{name:n.name})),n.storage=wt(at(n,"addStorage",{name:n.name,options:n.options})),n}}function e1(t,e,n){const{from:r,to:o}=e,{blockSeparator:s=`
13
14`,textSerializers:i={}}=n||{};let l="";return t.nodesBetween(r,o,(a,u,c,d)=>{var p;a.isBlock&&u>r&&(l+=s);const m=i?.[a.type.name];if(m)return c&&(l+=m({node:a,pos:u,parent:c,index:d,range:e})),!1;a.isText&&(l+=(p=a?.text)===null||p===void 0?void 0:p.slice(Math.max(r,u)-u,o-u))}),l}function t1(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}Ot.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new He({key:new ze("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(c=>c.$from.pos)),l=Math.max(...s.map(c=>c.$to.pos)),a=t1(n);return e1(r,{from:i,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}});const n1=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),r1=(t=!1)=>({commands:e})=>e.setContent("",t),o1=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:s,$to:i})=>{t.doc.nodesBetween(s.pos,i.pos,(l,a)=>{if(l.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(a)),p=u.resolve(c.map(a+l.nodeSize)),m=d.blockRange(p);if(!m)return;const h=Yn(m);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(m.start,g)}(h||h===0)&&e.lift(m,h)})}),!0},s1=t=>e=>t(e),i1=()=>({state:t,dispatch:e})=>Xl(t,e),l1=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new ce(r.doc.resolve(Math.max(i-1,0)))),!0},a1=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const l=o.before(s),a=o.after(s);t.delete(l,a).scrollIntoView()}return!0}return!1},u1=t=>({tr:e,state:n,dispatch:r})=>{const o=nt(t,n.schema),s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===o){if(r){const a=s.before(i),u=s.after(i);e.delete(a,u).scrollIntoView()}return!0}return!1},c1=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},d1=()=>({state:t,dispatch:e})=>ei(t,e),f1=()=>({commands:t})=>t.keyboardShortcut("Enter"),p1=()=>({state:t,dispatch:e})=>Jd(t,e);function us(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Z0(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function hf(t,e,n={}){return t.find(r=>r.type===e&&us(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function xu(t,e,n={}){return!!hf(t,e,n)}function gf(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(c=>c.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(c=>c.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!hf([...o.node.marks],e,n)))return;let i=o.index,l=t.start()+o.offset,a=i+1,u=l+o.node.nodeSize;for(;i>0&&xu([...t.parent.child(i-1).marks],e,n);)i-=1,l-=t.parent.child(i).nodeSize;for(;a<t.parent.childCount&&xu([...t.parent.child(a).marks],e,n);)u+=t.parent.child(a).nodeSize,a+=1;return{from:l,to:u}}function Sn(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const m1=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const s=Sn(t,r.schema),{doc:i,selection:l}=n,{$from:a,from:u,to:c}=l;if(o){const d=gf(a,s,e);if(d&&d.from<=u&&d.to>=c){const p=ce.create(i,d.from,d.to);n.setSelection(p)}}return!0},h1=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function bf(t){return t instanceof ce}function Tn(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function g1(t,e=null){if(!e)return null;const n=be.atStart(t),r=be.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,s=r.to;return e==="all"?ce.create(t,Tn(0,o,s),Tn(t.content.size,o,s)):ce.create(t,Tn(e,o,s),Tn(e,o,s))}function Cu(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function cs(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function b1(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}const y1=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{(cs()||Cu())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),b1()&&!cs()&&!Cu()&&r.dom.focus({preventScroll:!0}))})};if(r.hasFocus()&&t===null||t===!1)return!0;
vendor: 22,922 bytes, line 14
14if(s&&t===null&&!bf(n.state.selection))return i(),!0;const l=g1(o.doc,t)||n.state.selection,a=n.state.selection.eq(l);return s&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},v1=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),x1=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),yf=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&yf(r)}return t};function _o(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return yf(n)}function Qr(t,e,n){if(t instanceof yn||t instanceof P)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return P.fromArray(t.map(l=>e.nodeFromJSON(l)));const i=e.nodeFromJSON(t);return n.errorOnInvalidContent&&i.check(),i}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),Qr("",e,n)}if(o){if(n.errorOnInvalidContent){let i=!1,l="";const a=new Qc({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(i=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?jt.fromSchema(a).parseSlice(_o(t),n.parseOptions):jt.fromSchema(a).parse(_o(t),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const s=jt.fromSchema(e);return n.slice?s.parseSlice(_o(t),n.parseOptions).content:s.parse(_o(t),n.parseOptions)}return Qr("",e,n)}function C1(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Ne||o instanceof Ke))return;const s=t.mapping.maps[r];let i=0;s.forEach((l,a,u,c)=>{i===0&&(i=c)}),t.setSelection(be.near(t.doc.resolve(i),n))}const w1=t=>!("type"in t),_1=(t,e,n)=>({tr:r,dispatch:o,editor:s})=>{var i;if(o){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const a=y=>{s.emit("contentError",{editor:s,error:y,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Qr(e,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(y){a(y)}try{l=Qr(e,s.schema,{parseOptions:u,errorOnInvalidContent:(i=n.errorOnInvalidContent)!==null&&i!==void 0?i:s.options.enableContentCheck})}catch(y){return a(y),!1}let{from:c,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},p=!0,m=!0;if((w1(l)?l:[l]).forEach(y=>{y.check(),p=p?y.isText&&y.marks.length===0:!1,m=m?y.isBlock:!1}),c===d&&m){const{parent:y}=r.doc.resolve(c);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(c-=1,d+=1)}let g;if(p){if(Array.isArray(e))g=e.map(y=>y.text||"").join("");else if(e instanceof P){let y="";e.forEach(v=>{v.text&&(y+=v.text)}),g=y}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,c,d)}else g=l,r.replaceWith(c,d,g);n.updateSelection&&C1(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:g})}return!0},k1=()=>({state:t,dispatch:e})=>Gd(t,e),A1=()=>({state:t,dispatch:e})=>Kd(t,e),D1=()=>({state:t,dispatch:e})=>Ul(t,e),S1=()=>({state:t,dispatch:e})=>Wl(t,e),E1=()=>({state:t,dispatch:e,tr:n})=>{try{const r=gr(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},F1=()=>({state:t,dispatch:e,tr:n})=>{try{const r=gr(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},B1=()=>({state:t,dispatch:e})=>Vd(t,e),R1=()=>({state:t,dispatch:e})=>jd(t,e);function vf(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function M1(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,s,i;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))cs()||vf()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}const T1=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const s=M1(t).split(/-(?!$)/),i=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return a?.steps.forEach(u=>{const c=u.map(r.mapping);c&&o&&r.maybeStep(c)}),!0};function la(t,e,n={}){const{from:r,to:o,empty:s}=t.selection,i=e?nt(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(d,p)=>{if(d.isText)return;const m=Math.max(r,p),h=Math.min(o,p+d.nodeSize);l.push({node:d,from:m,to:h})});const a=o-r,u=l.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>us(d.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((d,p)=>d+p.to-p.from,0)>=a}const $1=(t,e={})=>({state:n,dispatch:r})=>{const o=nt(t,n.schema);return la(n,o,e)?Wd(n,r):!1},I1=()=>({state:t,dispatch:e})=>ea(t,e),L1=t=>({state:e,dispatch:n})=>{const r=nt(t,e.schema);return rf(r)(e,n)},O1=()=>({state:t,dispatch:e})=>Ql(t,e);function xf(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function wu(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const N1=(t,e)=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const l=xf(typeof t=="string"?t:t.name,r.schema);return l?(l==="node"&&(s=nt(t,r.schema)),l==="mark"&&(i=Sn(t,r.schema)),o&&n.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(u,c)=>{s&&s===u.type&&n.setNodeMarkup(c,void 0,wu(u.attrs,e)),i&&u.marks.length&&u.marks.forEach(d=>{i===d.type&&n.addMark(c,c+u.nodeSize,i.create(wu(d.attrs,e)))})})}),!0):!1},q1=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),z1=()=>({tr:t,dispatch:e})=>{if(e){const n=new ht(t.doc);t.setSelection(n)}return!0},P1=()=>({state:t,dispatch:e})=>Gl(t,e),V1=()=>({state:t,dispatch:e})=>Jl(t,e),j1=()=>({state:t,dispatch:e})=>Yd(t,e),H1=()=>({state:t,dispatch:e})=>ef(t,e),U1=()=>({state:t,dispatch:e})=>Xd(t,e);function G1(t,e,n={},r={}){return Qr(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const K1=(t,e=!1,n={},r={})=>({editor:o,tr:s,dispatch:i,commands:l})=>{var a,u;const{doc:c}=s;if(n.preserveWhitespace!=="full"){const d=G1(t,o.schema,n,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:o.options.enableContentCheck});return i&&s.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!e),!0}return i&&s.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:c.content.size},t,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck})};function W1(t,e){const n=Sn(e,t.schema),{from:r,to:o,empty:s}=t.selection,i=[];s?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{i.push(...a.marks)});const l=i.find(a=>a.type.name===n.name);return l?{...l.attrs}:{}}function J1(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Y1(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function aa(t){return e=>Y1(e.$from,t)}function Po(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}function Q1(t,e,n={}){const{empty:r,ranges:o}=t.selection,s=e?Sn(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>us(d.attrs,n,{strict:!1}));let i=0;const l=[];if(o.forEach(({$from:d,$to:p})=>{const m=d.pos,h=p.pos;t.doc.nodesBetween(m,h,(g,y)=>{if(!g.isText&&!g.marks.length)return;const v=Math.max(m,y),C=Math.min(h,y+g.nodeSize),x=C-v;i+=x,l.push(...g.marks.map(k=>({mark:k,from:v,to:C})))})}),i===0)return!1;const a=l.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>us(d.mark.attrs,n,{strict:!1})).reduce((d,p)=>d+p.to-p.from,0),u=l.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,p)=>d+p.to-p.from,0);return(a>0?a+u:a)>=i}function _u(t,e){const{nodeExtensions:n}=Y0(e),r=n.find(i=>i.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=wt(at(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function Cf(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(s=>{o!==!1&&(Cf(s,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function Z1(t,e,n){var r;const{selection:o}=e;let s=null;if(bf(o)&&(s=o.$cursor),s){const l=(r=t.storedMarks)!==null&&r!==void 0?r:s.marks();return!!n.isInSet(l)||!l.some(a=>a.type.excludes(n))}const{ranges:i}=o;return i.some(({$from:l,$to:a})=>{let u=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,a.pos,(c,d,p)=>{if(u)return!1;if(c.isInline){const m=!p||p.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(g=>g.type.excludes(n));u=m&&h}return!u}),u})}const X1=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=n,{empty:i,ranges:l}=s,a=Sn(t,r.schema);if(o)if(i){const u=W1(r,a);n.addStoredMark(a.create({...u,...e}))}else l.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(p,m)=>{const h=Math.max(m,c),g=Math.min(m+p.nodeSize,d);p.marks.find(v=>v.type===a)?p.marks.forEach(v=>{a===v.type&&n.addMark(h,g,a.create({...v.attrs,...e}))}):n.addMark(h,g,a.create(e))})});return Z1(r,n,a)},eb=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),tb=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const s=nt(t,n.schema);let i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:l})=>ss(s,{...i,...e})(n)?!0:l.clearNodes()).command(({state:l})=>ss(s,{...i,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},nb=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Tn(t,0,r.content.size),s=pe.create(r,o);e.setSelection(s)}return!0},rb=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:s}=typeof t=="number"?{from:t,to:t}:t,i=ce.atStart(r).from,l=ce.atEnd(r).to,a=Tn(o,i,l),u=Tn(s,i,l),c=ce.create(r,a,u);e.setSelection(c)}return!0},ob=t=>({state:e,dispatch:n})=>{const r=nt(t,e.schema);return of(r)(e,n)};function ku(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e?.includes(o.type.name));t.tr.ensureMarks(r)}}const sb=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:l,$to:a}=s,u=o.extensionManager.attributes,c=Po(u,l.node().type.name,l.node().attrs);if(s instanceof pe&&s.node.isBlock)return!l.parentOffset||!kt(i,l.pos)?!1:(r&&(t&&ku(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const d=a.parentOffset===a.parent.content.size,p=l.depth===0?void 0:J1(l.node(-1).contentMatchAt(l.indexAfter(-1)));let m=d&&p?[{type:p,attrs:c}]:void 0,h=kt(e.doc,e.mapping.map(l.pos),1,m);if(!m&&!h&&kt(e.doc,e.mapping.map(l.pos),1,p?[{type:p}]:void 0)&&(h=!0,m=p?[{type:p,attrs:c}]:void 0),r){if(h&&(s instanceof ce&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,m),p&&!d&&!l.parentOffset&&l.parent.type!==p)){const g=e.mapping.map(l.before()),y=e.doc.resolve(g);l.node(-1).canReplaceWith(y.index(),y.index()+1,p)&&e.setNodeMarkup(e.mapping.map(l.before()),p)}t&&ku(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return h},ib=(t,e={})=>({tr:n,state:r,dispatch:o,editor:s})=>{var i;const l=nt(t,r.schema),{$from:a,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;const d=a.node(-1);if(d.type!==l)return!1;const p=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let v=P.empty;const C=a.index(-1)?1:a.index(-2)?2:3;for(let R=a.depth-C;R>=a.depth-3;R-=1)v=P.from(a.node(R).copy(v));const x=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,k={...Po(p,a.node().type.name,a.node().attrs),...e},D=((i=l.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(k))||void 0;v=v.append(P.from(l.createAndFill(null,D)||void 0));const F=a.before(a.depth-(C-1));n.replace(F,a.after(-x),new Z(v,4-C,0));let B=-1;n.doc.nodesBetween(F,n.doc.content.size,(R,q)=>{if(B>-1)return!1;R.isTextblock&&R.content.size===0&&(B=q+1)}),B>-1&&n.setSelection(ce.near(n.doc.resolve(B))),n.scrollIntoView()}return!0}const m=u.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...Po(p,d.type.name,d.attrs),...e},g={...Po(p,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,u.pos);const y=m?[{type:l,attrs:h},{type:m,attrs:g}]:[{type:l,attrs:h}];if(!kt(n.doc,a.pos,2))return!1;if(o){const{selection:v,storedMarks:C}=r,{splittableMarks:x}=s.extensionManager,k=C||v.$to.parentOffset&&v.$from.marks();if(n.split(a.pos,2,y).scrollIntoView(),!k||!o)return!0;const D=k.filter(F=>x.includes(F.type.name));n.ensureMarks(D)}return!0},Ai=(t,e)=>{const n=aa(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===o?.type&&Kt(t.doc,n.pos)&&t.join(n.pos),!0},Di=(t,e)=>{const n=aa(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===o?.type&&Kt(t.doc,r)&&t.join(r),!0},lb=(t,e,n,r={})=>({editor:o,tr:s,state:i,dispatch:l,chain:a,commands:u,can:c})=>{const{extensions:d,splittableMarks:p}=o.extensionManager,m=nt(t,i.schema),h=nt(e,i.schema),{selection:g,storedMarks:y}=i,{$from:v,$to:C}=g,x=v.blockRange(C),k=y||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;const D=aa(F=>_u(F.type.name,d))(g);if(x.depth>=1&&D&&x.depth-D.depth<=1){if(D.node.type===m)return u.liftListItem(h);if(_u(D.node.type.name,d)&&m.validContent(D.node.content)&&l)return a().command(()=>(s.setNodeMarkup(D.pos,m),!0)).command(()=>Ai(s,m)).command(()=>Di(s,m)).run()}return!n||!k||!l?a().command(()=>c().wrapInList(m,r)?!0:u.clearNodes()).wrapInList(m,r).command(()=>Ai(s,m)).command(()=>Di(s,m)).run():a().command(()=>{const F=c().wrapInList(m,r),B=k.filter(R=>p.includes(R.type.name));return s.ensureMarks(B),F?!0:u.clearNodes()}).wrapInList(m,r).command(()=>Ai(s,m)).command(()=>Di(s,m)).run()},ab=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,i=Sn(t,r.schema);return Q1(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},ub=(t,e,n={})=>({state:r,commands:o})=>{const s=nt(t,r.schema),i=nt(e,r.schema),l=la(r,s,n);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?o.setNode(i,a):o.setNode(s,{...a,...n})},cb=(t,e={})=>({state:n,commands:r})=>{const o=nt(t,n.schema);return la(n,o,e)?r.lift(o):r.wrapIn(o,e)},db=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let s;if(o.spec.isInputRules&&(s=o.getState(t))){if(e){const i=t.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a-=1)i.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,t.schema.text(s.text,a))}else i.delete(s.from,s.to)}return!0}}return!1},fb=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},pb=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:l}=n,a=Sn(t,r.schema),{$from:u,empty:c,ranges:d}=l;if(!o)return!0;if(c&&i){let{from:p,to:m}=l;const h=(s=u.marks().find(y=>y.type===a))===null||s===void 0?void 0:s.attrs,g=gf(u,a,h);g&&(p=g.from,m=g.to),n.removeMark(p,m,a)}else d.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,a)});return n.removeStoredMark(a),!0},mb=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const l=xf(typeof t=="string"?t:t.name,r.schema);return l?(l==="node"&&(s=nt(t,r.schema)),l==="mark"&&(i=Sn(t,r.schema)),o&&n.selection.ranges.forEach(a=>{const u=a.$from.pos,c=a.$to.pos;let d,p,m,h;n.selection.empty?r.doc.nodesBetween(u,c,(g,y)=>{s&&s===g.type&&(m=Math.max(y,u),h=Math.min(y+g.nodeSize,c),d=y,p=g)}):r.doc.nodesBetween(u,c,(g,y)=>{y<u&&s&&s===g.type&&(m=Math.max(y,u),h=Math.min(y+g.nodeSize,c),d=y,p=g),y>=u&&y<=c&&(s&&s===g.type&&n.setNodeMarkup(y,void 0,{...g.attrs,...e}),i&&g.marks.length&&g.marks.forEach(v=>{if(i===v.type){const C=Math.max(y,u),x=Math.min(y+g.nodeSize,c);n.addMark(C,x,i.create({...v.attrs,...e}))}}))}),p&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...p.attrs,...e}),i&&p.marks.length&&p.marks.forEach(g=>{i===g.type&&n.addMark(m,h,i.create({...g.attrs,...e}))}))}),!0):!1},hb=(t,e={})=>({state:n,dispatch:r})=>{const o=nt(t,n.schema);return tf(o,e)(n,r)},gb=(t,e={})=>({state:n,dispatch:r})=>{const o=nt(t,n.schema);return nf(o,e)(n,r)};var bb=Object.freeze({__proto__:null,blur:n1,clearContent:r1,clearNodes:o1,command:s1,createParagraphNear:i1,cut:l1,deleteCurrentNode:a1,deleteNode:u1,deleteRange:c1,deleteSelection:d1,enter:f1,exitCode:p1,extendMarkRange:m1,first:h1,focus:y1,forEach:v1,insertContent:x1,insertContentAt:_1,joinBackward:D1,joinDown:A1,joinForward:S1,joinItemBackward:E1,joinItemForward:F1,joinTextblockBackward:B1,joinTextblockForward:R1,joinUp:k1,keyboardShortcut:T1,lift:$1,liftEmptyBlock:I1,liftListItem:L1,newlineInCode:O1,resetAttributes:N1,scrollIntoView:q1,selectAll:z1,selectNodeBackward:P1,selectNodeForward:V1,selectParentNode:j1,selectTextblockEnd:H1,selectTextblockStart:U1,setContent:K1,setMark:X1,setMeta:eb,setNode:tb,setNodeSelection:nb,setTextSelection:rb,sinkListItem:ob,splitBlock:sb,splitListItem:ib,toggleList:lb,toggleMark:ab,toggleNode:ub,toggleWrap:cb,undoInputRule:db,unsetAllMarks:fb,unsetMark:pb,updateAttributes:mb,wrapIn:hb,wrapInList:gb});Ot.create({name:"commands",addCommands(){return{...bb}}});Ot.create({name:"drop",addProseMirrorPlugins(){return[new He({key:new ze("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}});Ot.create({name:"editable",addProseMirrorPlugins(){return[new He({key:new ze("editable"),props:{editable:()=>this.editor.options.editable}})]}});const yb=new ze("focusEvents");Ot.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new He({key:yb,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}});Ot.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:l})=>{const{selection:a,doc:u}=l,{empty:c,$anchor:d}=a,{pos:p,parent:m}=d,h=d.parent.isTextblock&&p>0?l.doc.resolve(p-1):d,g=h.parent.type.spec.isolating,y=d.pos-d.parentOffset,v=g&&h.parent.childCount===1?y===d.pos:be.atStart(u).from===p;return!c||!m.type.isTextblock||m.textContent.length||!v||v&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return cs()||vf()?s:o},addProseMirrorPlugins(){return[new He({key:new ze("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(g=>g.getMeta("composition")))return;const r=t.some(g=>g.docChanged)&&!e.doc.eq(n.doc),o=t.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;const{empty:s,from:i,to:l}=e.selection,a=be.atStart(e.doc).from,u=be.atEnd(e.doc).to;if(s||!(i===a&&l===u)||!Cf(n.doc))return;const p=n.tr,m=mf({state:n,transaction:p}),{commands:h}=new J0({editor:this.editor,state:m});if(h.clearNodes(),!!p.steps.length)return p}})]}});Ot.create({name:"paste",addProseMirrorPlugins(){return[new He({key:new ze("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}});Ot.create({name:"tabindex",addProseMirrorPlugins(){return[new He({key:new ze("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class ds{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=wt(at(this,"addOptions",{name:this.name}))),this.storage=wt(at(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ds(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>ri(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new ds(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=wt(at(n,"addOptions",{name:n.name})),n.storage=wt(at(n,"addStorage",{name:n.name,options:n.options})),n}}const vb=(t,e)=>{const n=e.map(s=>
14(s.type=="mark"?as:ds).create({name:s.name,renderHTML({HTMLAttributes:l}){return s.render?[...s.render(l),0]:[s.component??(s.type=="mark"?"span":"div"),l,0]}})),r=n.map(({name:s})=>s);return[...t.filter(s=>r.indexOf(s.name)<0),...n]},xb=J({functional:!0,props:{content:{type:Object,required:!0},serializers:{type:Array,default:()=>[]},componentSerializers:{type:Array,default:()=>[]}},setup(t){return()=>{const e=JSON.parse(JSON.stringify(t.content)),n=vb(t.serializers,t.componentSerializers);return W0(e,n,(r,o,s)=>typeof r=="string"?Ht(r,o,s):Ht(r,o,{default:()=>s}))}}}),Cb=Xe.create({name:"doc",topNode:!0,content:"block+"}),wb=Xe.create({name:"text",group:"inline"}),_b=Xe.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),kb=Xe.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Oe(this.options.HTMLAttributes,t)]},renderText(){return`
15`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:s}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:l}=r.extensionManager,a=s||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&i){const d=a.filter(p=>l.includes(p.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Ab=Xe.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Oe(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>il({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
vendor: 7,383 bytes, lines 15-18
15)\\s$`),type:this.type,getAttributes:{level:t}}))}}),Db=/^```([a-z]+)?[\s\n]$/,Sb=/^~~~([a-z]+)?[\s\n]$/,Eb=Xe.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,s=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Oe(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(`
16
17`);return!s||!i?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:u})=>(u.setSelection(be.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[il({find:Db,type:this.type,getAttributes:t=>({language:t[1]})}),il({find:Sb,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new He({key:new ze("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,s=o?.mode;if(!n||!s)return!1;const{tr:i,schema:l}=t.state,a=l.text(n.replace(/\r\n?/g,`
18`));return i.replaceSelectionWith(this.type.create({language:s},a)),i.selection.$from.parent.type!==this.type&&i.setSelection(ce.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),t.dispatch(i),!0}}})]}}),Fb="listItem",Au="textStyle",Du=/^\s*([-+*])\s$/,Bb=Xe.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Fb,this.editor.getAttributes(Au)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Yr({find:Du,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Yr({find:Du,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Au),editor:this.editor})),[t]}}),Rb="listItem",Su="textStyle",Eu=/^(\d+)\.\s$/,Mb=Xe.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Oe(this.options.HTMLAttributes,n),0]:["ol",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Rb,this.editor.getAttributes(Su)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Yr({find:Eu,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Yr({find:Eu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Su)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),Tb=Xe.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Oe(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$b=/^\s*>\s$/,Ib=Xe.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Yr({find:$b,type:this.type})]}}),Lb=Xe.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Oe(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!K0(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$from:r,$to:o}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):k0(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:i,dispatch:l})=>{var a;if(l){const{$to:u}=i.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?i.setSelection(ce.create(i.doc,u.pos+1)):u.nodeAfter.isBlock?i.setSelection(pe.create(i.doc,u.pos)):i.setSelection(ce.create(i.doc,u.pos));else{const d=(a=u.parent.type.contentMatch.defaultType)===null||a===void 0?void 0:a.create();d&&(i.insert(c,d),i.setSelection(ce.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[G0({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
18ype})]}}),Ob="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yac
18hts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Nb="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",al="numeric",ul="ascii",cl="alpha",Lr="asciinumeric",Er="alphanumeric",dl="domain",wf="emoji",qb="scheme",zb="slashscheme",Si="whitespace";function Pb(t,e){return t in e||(e[t]=[]),e[t]}function $n(t,e,n){e[al]&&(e[Lr]=!0,e[Er]=!0),e[ul]&&(e[Lr]=!0,e[cl]=!0),e[Lr]&&(e[Er]=!0),e[cl]&&(e[Er]=!0),e[Er]&&(e[dl]=!0),e[wf]&&(e[dl]=!0);for(const r in e){const o=Pb(r,n);o.indexOf(t)<0&&o.push(t)}}function Vb(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function pt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}pt.groups={};pt.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],s=e.jr[r][1];if(s&&o.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||pt.groups;let o;return e&&e.j?o=e:(o=new pt(e),n&&r&&$n(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const s=t.length;if(!s)return o;for(let i=0;i<s-1;i++)o=o.tt(t[i]);return o.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||pt.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const s=e;let i,l=o.go(t);if(l?(i=new pt,Object.assign(i.j,l.j),i.jr.push.apply(i.jr,l.jr),i.jd=l.jd,i.t=l.t):i=new pt,s){if(r)if(i.t&&typeof i.t=="string"){const a=Object.assign(Vb(i.t,r),n);$n(s,a,r)}else n&&$n(s,n,r);i.t=s}return o.j[t]=i,i}};const xe=(t,e,n,r,o)=>t.ta(e,n,r,o),$e=(t,e,n,r,o)=>t.tr(e,n,r,o),Fu=(t,e,n,r,o)=>t.ts(e,n,r,o),U=(t,e,n,r,o)=>t.tt(e,n,r,o),Qt="WORD",fl="UWORD",_f="ASCIINUMERICAL",kf="ALPHANUMERICAL",Zr="LOCALHOST",pl="TLD",ml="UTLD",Vo="SCHEME",sr="SLASH_SCHEME",ua="NUM",hl="WS",ca="NL",Or="OPENBRACE",Nr="CLOSEBRACE",fs="OPENBRACKET",ps="CLOSEBRACKET",ms="OPENPAREN",hs="CLOSEPAREN",gs="OPENANGLEBRACKET",bs="CLOSEANGLEBRACKET",ys="FULLWIDTHLEFTPAREN",vs="FULLWIDTHRIGHTPAREN",xs="LEFTCORNERBRACKET",Cs="RIGHTCORNERBRACKET",ws="LEFTWHITECORNERBRACKET",_s="RIGHTWHITECORNERBRACKET",ks="FULLWIDTHLESSTHAN",As="FULLWIDTHGREATERTHAN",Ds="AMPERSAND",Ss="APOSTROPHE",Es="ASTERISK",dn="AT",Fs="BACKSLASH",Bs="BACKTICK",Rs="CARET",In="COLON",da="COMMA",Ms="DOLLAR",zt="DOT",Ts="EQUALS",fa="EXCLAMATION",Ft="HYPHEN",qr="PERCENT",$s="PIPE",Is="PLUS",Ls="POUND",zr="QUERY",pa="QUOTE",Af="FULLWIDTHMIDDLEDOT",ma="SEMI",Pt="SLASH",Pr="TILDE",Os="UNDERSCORE",Df="EMOJI",Ns="SYM";var Sf=Object.freeze({__proto__:null,ALPHANUMERICAL:kf,AMPERSAND:Ds,APOSTROPHE:Ss,ASCIINUMERICAL:_f,ASTERISK:Es,AT:dn,BACKSLASH:Fs,BACKTICK:Bs,CARET:Rs,CLOSEANGLEBRACKET:bs,CLOSEBRACE:Nr,CLOSEBRACKET:ps,CLOSEPAREN:hs,COLON:In,COMMA:da,DOLLAR:Ms,DOT:zt,EMOJI:Df,EQUALS:Ts,EXCLAMATION:fa,FULLWIDTHGREATERTHAN:As,FULLWIDTHLEFTPAREN:ys,FULLWIDTHLESSTHAN:ks,FULLWIDTHMIDDLEDOT:Af,FULLWIDTHRIGHTPAREN:vs,HYPHEN:Ft,LEFTCORNERBRACKET:xs,LEFTWHITECORNERBRACKET:ws,LOCALHOST:Zr,NL:ca,NUM:ua,OPENANGLEBRACKET:gs,OPENBRACE:Or,OPENBRACKET:fs,OPENPAREN:ms,PERCENT:qr,PIPE:$s,PLUS:Is,POUND:Ls,QUERY:zr,QUOTE:pa,RIGHTCORNERBRACKET:Cs,RIGHTWHITECORNERBRACKET:_s,SCHEME:Vo,SEMI:ma,SLASH:Pt,SLASH_SCHEME:sr,SYM:Ns,TILDE:Pr,TLD:pl,UNDERSCORE:Os,UTLD:ml,UWORD:fl,WORD:Qt,WS:hl});const Jt=/[a-z]/,Cr=new RegExp("\\p{L}","u"),Ei=new RegExp("\\p{Emoji}","u"),Yt=/\d/,Fi=/\s/,Bu="\r",Bi=`
19`,jb="️",Hb="‍",Ri="";let ko=null,Ao=null;function Ub(t=[]){const e={};pt.groups=e;const n=new pt;ko==null&&(ko=Ru(Ob)),Ao==null&&(Ao=Ru(Nb)),U(n,"'",Ss),U(n,"{",Or),U(n,"}",Nr),U(n,"[",fs),U(n,"]",ps),U(n,"(",ms),U(n,")",hs),U(n,"<",gs),U(n,">",bs),U(n,"(",ys),U(n,")",vs),U(n,"「",xs),U(n,"」",Cs),U(n,"『",ws),U(n,"』",_s),U(n,"<",ks),U(n,">",As),U(n,"&",Ds),U(n,"*",Es),U(n,"@",dn),U(n,"`",Bs),U(n,"^",Rs),U(n,":",In),U(n,",",da),U(n,"$",Ms),U(n,".",zt),U(n,"=",Ts),U(n,"!",fa),U(n,"-",Ft),U(n,"%",qr),U(n,"|",$
vendor: 12,934 bytes, lines 19-22
19s),U(n,"+",Is),U(n,"#",Ls),U(n,"?",zr),U(n,'"',pa),U(n,"/",Pt),U(n,";",ma),U(n,"~",Pr),U(n,"_",Os),U(n,"\\",Fs),U(n,"・",Af);const r=$e(n,Yt,ua,{[al]:!0});$e(r,Yt,r);const o=$e(r,Jt,_f,{[Lr]:!0}),s=$e(r,Cr,kf,{[Er]:!0}),i=$e(n,Jt,Qt,{[ul]:!0});$e(i,Yt,o),$e(i,Jt,i),$e(o,Yt,o),$e(o,Jt,o);const l=$e(n,Cr,fl,{[cl]:!0});$e(l,Jt),$e(l,Yt,s),$e(l,Cr,l),$e(s,Yt,s),$e(s,Jt),$e(s,Cr,s);const a=U(n,Bi,ca,{[Si]:!0}),u=U(n,Bu,hl,{[Si]:!0}),c=$e(n,Fi,hl,{[Si]:!0});U(n,Ri,c),U(u,Bi,a),U(u,Ri,c),$e(u,Fi,c),U(c,Bu),U(c,Bi),$e(c,Fi,c),U(c,Ri,c);const d=$e(n,Ei,Df,{[wf]:!0});U(d,"#"),$e(d,Ei,d),U(d,jb,d);const p=U(d,Hb);U(p,"#"),$e(p,Ei,d);const m=[[Jt,i],[Yt,o]],h=[[Jt,null],[Cr,l],[Yt,s]];for(let g=0;g<ko.length;g++)an(n,ko[g],pl,Qt,m);for(let g=0;g<Ao.length;g++)an(n,Ao[g],ml,fl,h);$n(pl,{tld:!0,ascii:!0},e),$n(ml,{utld:!0,alpha:!0},e),an(n,"file",Vo,Qt,m),an(n,"mailto",Vo,Qt,m),an(n,"http",sr,Qt,m),an(n,"https",sr,Qt,m),an(n,"ftp",sr,Qt,m),an(n,"ftps",sr,Qt,m),$n(Vo,{scheme:!0,ascii:!0},e),$n(sr,{slashscheme:!0,ascii:!0},e),t=t.sort((g,y)=>g[0]>y[0]?1:-1);for(let g=0;g<t.length;g++){const y=t[g][0],C=t[g][1]?{[qb]:!0}:{[zb]:!0};y.indexOf("-")>=0?C[dl]=!0:Jt.test(y)?Yt.test(y)?C[Lr]=!0:C[ul]=!0:C[al]=!0,Fu(n,y,y,C)}return Fu(n,"localhost",Zr,{ascii:!0}),n.jd=new pt(Ns),{start:n,tokens:Object.assign({groups:e},Sf)}}function Ef(t,e){const n=Gb(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[];let s=0,i=0;for(;i<r;){let l=t,a=null,u=0,c=null,d=-1,p=-1;for(;i<r&&(a=l.go(n[i]));)l=a,l.accepts()?(d=0,p=0,c=l):d>=0&&(d+=n[i].length,p++),u+=n[i].length,s+=n[i].length,i++;s-=d,i-=p,u-=d,o.push({t:c.t,v:e.slice(s-u,s),s:s-u,e:s})}return o}function Gb(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),s,i=o<55296||o>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(i),r+=i.length}return e}function an(t,e,n,r,o){let s;const i=e.length;for(let l=0;l<i-1;l++){const a=e[l];t.j[a]?s=t.j[a]:(s=new pt(r),s.jr=o.slice(),t.j[a]=s),t=s}return s=new pt(n),s.jr=o.slice(),t.j[e[i-1]]=s,s}function Ru(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let s=0;for(;o.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let i=parseInt(t.substring(r,r+s),10);i>0;i--)n.pop();r+=s}else n.push(t[r]),r++}return e}const Xr={defaultProtocol:"http",events:null,format:Mu,formatHref:Mu,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ha(t,e=null){let n=Object.assign({},Xr);t&&(n=Object.assign(n,t instanceof ha?t.o:t));const r=n.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}ha.prototype={o:Xr,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:Xr[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Mu(t){return t}function Ff(t,e){this.t="token",this.v=t,this.tk=e}Ff.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Xr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),s=this.toFormattedString(t),i={},l=t.get("className",n,e),a=t.get("target",n,e),u=t.get("rel",n,e),c=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return i.href=r,l&&(i.class=l),a&&(i.target=a),u&&(i.rel=u),c&&Object.assign(i,c),{tagName:o,attributes:i,content:s,eventListeners:d}}};function oi(t,e){class n extends Ff{constructor(o,s){super(o,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Kb=oi("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Tu=oi("text"),Wb=oi("nl"),Do=oi("url",{isLink:!0,toHref(t=Xr.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Zr&&t[1].t===In}}),St=t=>new pt(t);function Jb({groups:t}){const e=t.domain.concat([Ds,Es,dn,Fs,Bs,Rs,Ms,Ts,Ft,ua,qr,$s,Is,Ls,Pt,Ns,Pr,Os]),n=[Ss,In,da,zt,fa,qr,zr,pa,ma,gs,bs,Or,Nr,ps,fs,ms,hs,ys,vs,xs,Cs,ws,_s,ks,As],r=[Ds,Ss,Es,Fs,Bs,Rs,Ms,Ts,Ft,Or,Nr,qr,$s,Is,Ls,zr,Pt,Ns,Pr,Os],o=St(),s=U(o,Pr);xe(s,r,s),xe(s,t.domain,s);const i=St(),l=St(),a=St();xe(o,t.domain,i),xe(o,t.scheme,l),xe(o,t.slashscheme,a),xe(i,r,s),xe(i,t.domain,i);const u=U(i,dn);U(s,dn,u),U(l,dn,u),U(a,dn,u);const c=U(s,zt);xe(c,r,s),xe(c,t.domain,s);const d=St();xe(u,t.domain,d),xe(d,t.domain,d);const p=U(d,zt);xe(p,t.domain,d);const m=St(Kb);xe(p,t.tld,m),xe(p,t.utld,m),U(u,Zr,m);const h=U(d,Ft);U(h,Ft,h),xe(h,t.domain,d),xe(m,t.domain,d),U(m,zt,p),U(m,Ft,h);const g=U(i,Ft),y=U(i,zt);U(g,Ft,g),xe(g,t.domain,i),xe(y,r,s),xe(y,t.domain,i);const v=St(Do);xe(y,t.tld,v),xe(y,t.utld,v),xe(v,t.domain,i),xe(v,r,s),U(v,zt,y),U(v,Ft,g),U(v,dn,u);const C=U(v,In),x=St(Do);xe(C,t.numeric,x);const k=St(Do),D=St();xe(k,e,k),xe(k,n,D),xe(D,e,k),xe(D,n,D),U(v,Pt,k),U(x,Pt,k);const F=U(l,In),B=U(a,In),R=U(B,Pt),q=U(R,Pt);xe(l,t.domain,i),U(l,zt,y),U(l,Ft,g),xe(a,t.domain,i),U(a,zt,y),U(a,Ft,g),xe(F,t.domain,k),U(F,Pt,k),U(F,zr,k),xe(q,t.domain,k),xe(q,e,k),U(q,Pt,k);const N=[[Or,Nr],[fs,ps],[ms,hs],[gs,bs],[ys,vs],[xs,Cs],[ws,_s],[ks,As]];for(let X=0;X<N.length;X++){const[V,G]=N[X],Y=U(k,V);U(D,V,Y);const ee=St(Do);xe(Y,e,ee);const ue=St();xe(Y,n,ue),U(Y,G,k),xe(ee,e,ee),xe(ee,n,ue),xe(ue,e,ee),xe(ue,n,ue),U(ee,G,k),U(ue,G,k)}return U(o,Zr,v),U(o,ca,Wb),{start:o,tokens:Sf}}function Yb(t,e,n){let r=n.length,o=0,s=[],i=[];for(;o<r;){let l=t,a=null,u=null,c=0,d=null,p=-1;for(;o<r&&!(a=l.go(n[o].t));)i.push(n[o++]);for(;o<r&&(u=a||l.go(n[o].t));)a=null,l=u,l.accepts()?(p=0,d=l):p>=0&&p++,o++,c++;if(p<0)o-=c,o<r&&(i.push(n[o]),o++);else{i.length>0&&(s.push(Mi(Tu,e,i)),i=[]),o-=p,c-=p;const m=d.t,h=n.slice(o-c,o);s.push(Mi(m,e,h))}}return i.length>0&&s.push(Mi(Tu,e,i)),s}function Mi(t,e,n){const r=n[0].s,o=n[n.length-1].e,s=e.slice(r,o);return new t(s,n)}const Qb=typeof console<"u"&&console&&console.warn||(()=>{}),Zb="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Fe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Xb(){return pt.groups={},Fe.scanner=null,Fe.parser=null,Fe.tokenQueue=[],Fe.pluginQueue=[],Fe.customSchemes=[],Fe.initialized=!1,Fe}function $u(t,e=!1){if(Fe.initialized&&Qb(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Zb}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
201. Must only contain digits, lowercase ASCII letters or "-"
212. Cannot start or end with "-"
223. "-" cannot repeat`);Fe.customSchemes.push([t,e])}function ey(){Fe.scanner=Ub(Fe.customSchemes);for(let t=0;t<Fe.tokenQueue.length;t++)Fe.tokenQueue[t][1]({scanner:Fe.scanner});Fe.parser=Jb(Fe.scanner.tokens);for(let t=0;t<Fe.pluginQueue.length;t++)Fe.pluginQueue[t][1]({scanner:Fe.scanner,parser:Fe.parser});return Fe.initialized=!0,Fe}function ga(t){return Fe.initialized||ey(),Yb(Fe.parser.start,t,Ef(Fe.scanner.start,t))}ga.scan=Ef;function Bf(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new ha(n),o=ga(t),s=[];for(let i=0;i<o.length;i++){const l=o[i];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}const ba="[\0-   ᠎ -\u2029  ]",ty=new RegExp(ba),ny=new RegExp(`${ba}$`),ry=new RegExp(ba,"g");function oy(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function sy(t){return new He({key:new ze("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!o||s)return;const{tr:i}=r,l=h0(n.doc,[...e]);if(w0(l).forEach(({newRange:u})=>{const c=b0(r.doc,u,m=>m.isTextblock);let d,p;if(c.length>1)d=c[0],p=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){const m=r.doc.textBetween(u.from,u.to," "," ");if(!ny.test(m))return;d=c[0],p=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&p){const m=p.split(ty).filter(Boolean);if(m.length<=0)return!1;const h=m[m.length-1],g=d.pos+p.lastIndexOf(h);if(!h)return!1;const y=ga(h).map(v=>v.toObject(t.defaultProtocol));if(!oy(y))return!1;y.filter(v=>v.isLink).map(v=>({...v,from:g+v.start+1,to:g+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>t.validate(v.value)).filter(v=>t.shouldAutoLink(v.value)).forEach(v=>{ia(v.from,v.to,r.doc).some(C=>C.mark.type===t.type)||i.addMark(v.from,v.to,t.type.create({href:v.href}))})}}),!!i.steps.length)return i}})}function iy(t){return new He({key:new ze("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(r.button!==0||!e.editable)return!1;let i=r.target;const l=[];for(;i.nodeName!=="DIV";)l.push(i),i=i.parentNode;if(!l.find(p=>p.nodeName==="A"))return!1;const a=v0(e.state,t.type.name),u=r.target,c=(o=u?.href)!==null&&o!==void 0?o:a.href,d=(s=u?.target)!==null&&s!==void 0?s:a.target;return u&&c?(window.open(c,d),!0):!1}}})}function ly(t){return new He({key:new ze("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:i}=s;if(i)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const a=Bf(l,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!a?!1:t.editor.commands.setMark(t.type,{href:a.href})}}})}function En(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(ry,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const ay=An.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){$u(t);return}$u(t.scheme,t.optionalSlashes)})},onDestroy(){Xb()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!En(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!En(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!En(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Oe(this.options.HTMLAttributes,t),0]:["a",Oe(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!En(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!En(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[jn({find:t=>{const e=[];
vendor: 1,788 bytes, line 22
22if(t){const{protocols:n,defaultProtocol:r}=this.options,o=Bf(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:i=>!!En(i,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(sy({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!En(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(iy({type:this.type})),this.options.linkOnPaste&&t.push(ly({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),uy=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,cy=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,dy=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,fy=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,py=An.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}}
vendor: 2,476 bytes, line 22
22,addInputRules(){return[cr({find:uy,type:this.type}),cr({find:dy,type:this.type})]},addPasteRules(){return[jn({find:cy,type:this.type}),jn({find:fy,type:this.type})]}}),my=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,hy=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,gy=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,by=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,yy=An.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[cr({find:my,type:this.type}),cr({find:gy,type:this.type})]},addPasteRules(){return[jn({find:hy,type:this.type}),jn({find:by,type:this.type})]}}),vy=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,xy=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Cy=An.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[cr({find:vy,type:this.type})]},addPasteRules(){return[jn({find:xy,type:this.type})]}}),wy=/(^|[^`])`([^`]+)`(?!`)/,_y=/(^|[^`])`([^`]+)`(?!`)/g,ky=An.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
22,addInputRules(){return[cr({find:wy,type:this.type})]},addPasteRules(){return[jn({find:_y,type:this.type})]}}),Ay=An.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Dy=An.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Oe(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});let gl,bl;if(typeof WeakMap<"u"){let t=new WeakMap;gl=e=>t.get(e),bl=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;gl=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},bl=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var Ie=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let s=r+1,i=o+1;for(let l=1;s<this.width&&this.map[e+l]==n;l++)s++;for(let l=1;i<this.height&&this.map[e+this.width*l]==n;l++)i++;return{left:r,top:o,right:s,bottom:i}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:s,bottom:i}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[s*this.width+(n<0?r-1:o)]:(n<0?s==0:i==this.height)?null:this.map[r+this.width*(n<0?s-1:i)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:s}=this.findCell(t),{left:i,right:l,top:a,bottom:u}=this.findCell(e);return{left:Math.min(n,i),top:Math.min(o,a),right:Math.max(r,l),bottom:Math.max(s,u)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const s=r*this.width+o,i=this.map[s];n[i]||(n[i]=!0,!(o==t.left&&o&&this.map[s-1]==i||r==t.top&&r&&this.map[s-this.width]==i)&&e.push(i))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const s=o+n.child(r).nodeSize;if(r==t){let i=e+t*this.width;const l=(t+1)*this.width;for(;i<l&&this.map[i]<o;)i++;return i==l?s-1:this.map[i]}o=s}}static get(t){return gl(t)||bl(t,Sy(t))}};function Sy(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=Ey(t),n=t.childCount,r=[];let o=0,s=null;const i=[];for(let u=0,c=e*n;u<c;u++)r[u]=0;for(let u=0,c=0;u<n;u++){const d=t.child(u);c++;for(let h=0;;h++){for(;o<r.length&&r[o]!=0;)o++;if(h==d.childCount)break;const g=d.child(h),{colspan:y,rowspan:v,colwidth:C}=g.attrs;for(let x=0;x<v;x++){if(x+u>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:v-x});break}const k=o+x*e;for(let D=0;D<y;D++){r[k+D]==0?r[k+D]=c:(s||(s=[])).push({type:"collision",row:u,pos:c,n:y-D});const F=C&&C[D];if(F){const B=(k+D)%e*2,R=i[B];R==null||R!=F&&i[B+1]==1?(i[B]=F,i[B+1]=1):R==F&&i[B+1]++}}}o+=y,c+=g.nodeSize}const p=(u+1)*e;let m=0;for(;o<p;)r[o++]==0&&m++;m&&(s||(s=[])).push({type:"missing",row:u,n:m}),c++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new Ie(e,n,r,s);let a=!1;for(let u=0;!a&&u<i.length;u+=2)i[u]!=null&&i[u+1]<n&&(a=!0);return a&&Fy(l,i,t),l}function Ey(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let s=0;if(n)for(let i=0;i<r;i++){const l=t.child(i);for(let a=0;a<l.childCount;a++){const u=l.child(a);i+u.attrs.rowspan>r&&(s+=u.attrs.colspan)}}for(let i=0;i<o.childCount;i++){const l=o.child(i);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function Fy(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const s=t.map[o];if(r[s])continue;r[s]=!0;const i=n.nodeAt(s);if(!i)throw new RangeError(`No cell with offset ${s} found`);let l=null;const a=i.attrs;for(let u=0;u<a.colspan;u++){const c=e[(o+u)%t.width*2];c!=null&&(!a.colwidth||a.colwidth[u]!=c)&&((l||(l=By(a)))[u]=c)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function By(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function rt(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};
22for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}const pn=new ze("selectingCells");function Hn(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Ry(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function qt(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function si(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Hn(e.$head)||My(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function My(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function yl(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function Ty(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function ya(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Rf(t,e,n){const r=t.node(-1),o=Ie.get(r),s=t.start(-1),i=o.nextCell(t.pos-s,e,n);return i==null?null:t.node(0).resolve(s+i)}function Un(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function Mf(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function $y(t,e,n){const r=rt(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var De=class Zt extends be{constructor(e,n=e){const r=e.node(-1),o=Ie.get(r),s=e.start(-1),i=o.rectBetween(e.pos-s,n.pos-s),l=e.node(0),a=o.cellsInRect(i).filter(c=>c!=n.pos-s);a.unshift(n.pos-s);const u=a.map(c=>{const d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);const p=s+c+1;return new pd(l.resolve(p),l.resolve(p+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(yl(r)&&yl(o)&&ya(r,o)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Zt.rowSelection(r,o):s&&this.isColSelection()?Zt.colSelection(r,o):new Zt(r,o)}return ce.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=Ie.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},i=[];for(let a=o.top;a<o.bottom;a++){const u=[];for(let c=a*n.width+o.left,d=o.left;d<o.right;d++,c++){const p=n.map[c];if(s[p])continue;s[p]=!0;const m=n.findCell(p);let h=e.nodeAt(p);if(!h)throw new RangeError(`No cell with offset ${p} found`);const g=o.left-m.left,y=m.right-o.right;if(g>0||y>0){let v=h.attrs;if(g>0&&(v=Un(v,0,g)),y>0&&(v=Un(v,v.colspan-y,y)),m.left<o.left){if(h=h.type.createAndFill(v),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(v)}`)}else h=h.type.create(v,h.content)}if(m.top<o.top||m.bottom>o.bottom){const v={...h.attrs,rowspan:Math.min(m.bottom,o.bottom)-Math.max(m.top,o.top)};m.top<o.top?h=h.type.createAndFill(v):h=h.type.create(v,h.content)}u.push(h)}i.push(e.child(a).copy(P.from(u)))}const l=this.isColSelection()&&this.isRowSelection()?e:i;return new Z(P.from(l),1,1)}replace(e,n=Z.empty){const r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){const{$from:l,$to:a}=o[i],u=e.mapping.slice(r);e.replace(u.map(l.pos),u.map(a.pos),i?Z.empty:n)}const s=be.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Z(P.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=Ie.get(n),o=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let i=0;i<s.length;i++)e(n.nodeAt(s[i]),o+s[i])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=Ie.get(r),s=e.start(-1),i=o.findCell(e.pos-s),l=o.findCell(n.pos-s),a=e.node(0);return i.top<=l.top?(i.top>0&&(e=a.resolve(s+o.map[i.left])),l.bottom<o.height&&(n=a.resolve(s+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(s+o.map[l.left])),i.bottom<o.height&&(e=a.resolve(s+o.map[o.width*(o.height-1)+i.right-1]))),new Zt(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Ie.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(o,s)>0)return!1;const i=o+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,l)==n.width}eq(e){return e instanceof Zt&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=Ie.get(r),s=e.start(-1),i=o.findCell(e.pos-s),l=o.findCell(n.pos-s),a=e.node(0);return i.left<=l.left?(i.left>0&&(e=a.resolve(s+o.map[i.top*o.width])),l.right<o.width&&(n=a.resolve(s+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(s+o.map[l.top*o.width])),i.right<o.width&&(e=a.resolve(s+o.map[o.width*(i.top+1)-1]))),new Zt(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Zt(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Zt(e.resolve(n),e.resolve(r))}getBookmark(){return new Iy(this.$anchorCell.pos,this.$headCell.pos)}};De.prototype.visible=!1;be.jsonID("cell",De);var Iy=class Tf{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Tf(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&ya(n,r)?new De(n,r):be.near(r,1)}};function Ly(t){if(!(t.selection instanceof De))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Mt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Pe.create(t.doc,e)}function Oy({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);
22return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function Ny({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const s=t.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let o=e.depth;o>0;o--){const s=e.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function qy(t,e,n){const r=(e||t).selection,o=(e||t).doc;let s,i;if(r instanceof pe&&(i=r.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")s=De.create(o,r.from);else if(i=="row"){const l=o.resolve(r.from+1);s=De.rowSelection(l,l)}else if(!n){const l=Ie.get(r.node),a=r.from+1,u=a+l.map[l.width*l.height-1];s=De.create(o,a+1,u)}}else r instanceof ce&&Oy(r)?s=ce.create(o,r.from):r instanceof ce&&Ny(r)&&(s=ce.create(o,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}const zy=new ze("fix-tables");function $f(t,e,n,r){const o=t.childCount,s=e.childCount;e:for(let i=0,l=0;i<s;i++){const a=e.child(i);for(let u=l,c=Math.min(o,i+3);u<c;u++)if(t.child(u)==a){l=u+1,n+=a.nodeSize;continue e}r(a,n),l<o&&t.child(l).sameMarkup(a)?$f(t.child(l),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function If(t,e){let n;const r=(o,s)=>{o.type.spec.tableRole=="table"&&(n=Py(t,o,s,n))};return e?e.doc!=t.doc&&$f(e.doc,t.doc,0,r):t.doc.descendants(r),n}function Py(t,e,n,r){const o=Ie.get(e);if(!o.problems)return r;r||(r=t.tr);const s=[];for(let a=0;a<o.height;a++)s.push(0);for(let a=0;a<o.problems.length;a++){const u=o.problems[a];if(u.type=="collision"){const c=e.nodeAt(u.pos);if(!c)continue;const d=c.attrs;for(let p=0;p<d.rowspan;p++)s[u.row+p]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Un(d,d.colspan-u.n,u.n))}else if(u.type=="missing")s[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const c=r.mapping.map(n);r.delete(c,c+e.nodeSize)}}let i,l;for(let a=0;a<s.length;a++)s[a]&&(i==null&&(i=a),l=a);for(let a=0,u=n+1;a<o.height;a++){const c=e.child(a),d=u+c.nodeSize,p=s[a];if(p>0){let m="cell";c.firstChild&&(m=c.firstChild.type.spec.tableRole);const h=[];for(let y=0;y<p;y++){const v=rt(t.schema)[m].createAndFill();v&&h.push(v)}const g=(a==0||i==a-1)&&l==a?u+1:d-1;r.insert(r.mapping.map(g),h)}u=d}return r.setMeta(zy,{fixTables:!0})}function Wt(t){const e=t.selection,n=si(t),r=n.node(-1),o=n.start(-1),s=Ie.get(r);return{...e instanceof De?s.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):s.findCell(n.pos-o),tableStart:o,map:s,table:r}}function Lf(t,{map:e,tableStart:n,table:r},o){let s=o>0?-1:0;$y(e,r,o+s)&&(s=o==0||o==e.width?null:0);for(let i=0;i<e.height;i++){const l=i*e.width+o;if(o>0&&o<e.width&&e.map[l-1]==e.map[l]){const a=e.map[l],u=r.nodeAt(a);t.setNodeMarkup(t.mapping.map(n+a),null,Mf(u.attrs,o-e.colCount(a))),i+=u.attrs.rowspan-1}else{const a=s==null?rt(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,u=e.positionAt(i,o,r);t.insert(t.mapping.map(n+u),a.createAndFill())}}return t}function Vy(t,e){if(!qt(t))return!1;if(e){const n=Wt(t);e(Lf(t.tr,n,n.left))}return!0}function jy(t,e){if(!qt(t))return!1;if(e){const n=Wt(t);e(Lf(t.tr,n,n.right))}return!0}function Hy(t,{map:e,table:n,tableStart:r},o){const s=t.mapping.maps.length;for(let i=0;i<e.height;){const l=i*e.width+o,a=e.map[l],u=n.nodeAt(a),c=u.attrs;if(o>0&&e.map[l-1]==a||o<e.width-1&&e.map[l+1]==a)t.setNodeMarkup(t.mapping.slice(s).map(r+a),null,Un(c,o-e.colCount(a)));else{const d=t.mapping.slice(s).map(r+a);t.delete(d,d+u.nodeSize)}i+=c.rowspan}}function Uy(t,e){if(!qt(t))return!1;if(e){const n=Wt(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;Hy(r,n,o),o!=n.left;o--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw new RangeError("No table found");n.table=s,n.map=Ie.get(s)}e(r)}return!0}function Gy(t,e,n){var r;const o=rt(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))===null||r===void 0?void 0:r.type)!=o)return!1;return!0}function Of(t,{map:e,tableStart:n,table:r},o){let s=n;for(let u=0;u<o;u++)s+=r.child(u).nodeSize;const i=[];let l=o>0?-1:0;Gy(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let u=0,c=e.width*o;u<e.width;u++,c++)if(o>0&&o<e.height&&e.map[c]==e.map[c-e.width]){const d=e.map[c],p=r.nodeAt(d).attrs;t.setNodeMarkup(n+d,null,{...p,rowspan:p.rowspan+1}),u+=p.colspan-1}else{var a;const d=l==null?rt(r.type.schema).cell:(a=r.nodeAt(e.map[c+l*e.width]))===null||a===void 0?void 0:a.type,p=d?.createAndFill();p&&i.push(p)}return t.insert(s,rt(r.type.schema).row.create(null,i)),t}function Ky(t,e){if(!qt(t))return!1;if(e){const n=Wt(t);e(Of(t.tr,n,n.top))}return!0}function Wy(t,e){if(!qt(t))return!1;if(e){const n=Wt(t);e(Of(t.tr,n,n.bottom))}return!0}function Jy(t,{map:e,table:n,tableStart:r},o){let s=0;for(let u=0;u<o;u++)s+=n.child(u).nodeSize;const i=s+n.child(o).nodeSize,l=t.mapping.maps.length;t.delete(s+r,i+r);const a=new Set;for(let u=0,c=o*e.width;u<e.width;u++,c++){const d=e.map[c];if(!a.has(d)){if(a.add(d),o>0&&d==e.map[c-e.width]){const p=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(l).map(d+r),null,{...p,rowspan:p.rowspan-1}),u+=p.colspan-1}else if(o<e.height&&d==e.map[c+e.width]){const p=n.nodeAt(d),m=p.attrs,h=p.type.create({...m,rowspan:p.attrs.rowspan-1},p.content),g=e.positionAt(o+1,u,n);t.insert(t.mapping.slice(l).map(r+g),h),u+=m.colspan-1}}}}function Yy(t,e){if(!qt(t))return!1;if(e){const n=Wt(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;Jy(r,n,o),o!=n.top;o--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw new RangeError("No table found");n.table=s,n.map=Ie.get(n.table)}e(r)}return!0}function Iu(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Qy({width:t,height:e,map:n},r){let o=r.top*t+r.left,s=o,i=(r.bottom-1)*t+r.left,l=o+(r.right-r.left-1);for(let a=r.top;a<r.bottom;a++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[l]==n[l+1])return!0;s+=t,l+=t}for(let a=r.left;a<r.right;a++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[i]==n[i+t])return!0;o++,i++}return!1}function Lu(t,e){const n=t.selection;if(!(n instanceof De)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Wt(t),{map:o}=r;if(Qy(o,r))return!1;if(e){const s=t.tr,i={};let l=P.empty,a,u;for(let c=r.top;c<r.bottom;c++)for(let d=r.left;d<r.right;d++){const p=o.map[c*o.width+d],m=r.table.nodeAt(p);if(!(i[p]||!m))if(i[p]=!0,a==null)a=p,u=m;else{Iu(m)||(l=l.append(m.content));const h=s.mapping.map(p+r.tableStart);s.delete(h,h+m.nodeSize)}}if(a==null||u==null)return!0;
22if(s.setNodeMarkup(a+r.tableStart,null,{...Mf(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),l.size>0){const c=a+1+u.content.size,d=Iu(u)?a+1:c;s.replaceWith(d+r.tableStart,c+r.tableStart,l)}s.setSelection(new De(s.doc.resolve(a+r.tableStart))),e(s)}return!0}function Ou(t,e){const n=rt(t.schema);return Zy(({node:r})=>n[r.type.spec.tableRole])(t,e)}function Zy(t){return(e,n)=>{const r=e.selection;let o,s;if(r instanceof De){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{var i;if(o=Ry(r.$from),!o)return!1;s=(i=Hn(r.$from))===null||i===void 0?void 0:i.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs;const a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const c=Wt(e),d=e.tr;for(let m=0;m<c.right-c.left;m++)a.push(u?{...l,colwidth:u&&u[m]?[u[m]]:null}:l);let p;for(let m=c.top;m<c.bottom;m++){let h=c.map.positionAt(m,c.left,c.table);m==c.top&&(h+=o.nodeSize);for(let g=c.left,y=0;g<c.right;g++,y++)g==c.left&&m==c.top||d.insert(p=d.mapping.map(h+c.tableStart,1),t({node:o,row:m,col:g}).createAndFill(a[y]))}d.setNodeMarkup(s,t({node:o,row:c.top,col:c.left}),a[0]),r instanceof De&&d.setSelection(new De(d.doc.resolve(r.$anchorCell.pos),p?d.doc.resolve(p):void 0)),n(d)}return!0}}function Xy(t,e){return function(n,r){if(!qt(n))return!1;const o=si(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof De?n.selection.forEachCell((i,l)=>{i.attrs[t]!==e&&s.setNodeMarkup(l,null,{...i.attrs,[t]:e})}):s.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function ev(t){return function(e,n){if(!qt(e))return!1;if(n){const r=rt(e.schema),o=Wt(e),s=e.tr,i=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=i.map(a=>o.table.nodeAt(a));for(let a=0;a<i.length;a++)l[a].type==r.header_cell&&s.setNodeMarkup(o.tableStart+i[a],r.cell,l[a].attrs);if(s.steps.length===0)for(let a=0;a<i.length;a++)s.setNodeMarkup(o.tableStart+i[a],r.header_cell,l[a].attrs);n(s)}return!0}}function Nu(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const s=e.table.nodeAt(r[o]);if(s&&s.type!==n.header_cell)return!1}return!0}function eo(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?ev(t):function(n,r){if(!qt(n))return!1;if(r){const o=rt(n.schema),s=Wt(n),i=n.tr,l=Nu("row",s,o),a=Nu("column",s,o),u=(t==="column"?l:t==="row"&&a)?1:0,c=t=="column"?{left:0,top:u,right:1,bottom:s.map.height}:t=="row"?{left:u,top:0,right:s.map.width,bottom:1}:s,d=t=="column"?a?o.cell:o.header_cell:t=="row"?l?o.cell:o.header_cell:o.cell;s.map.cellsInRect(c).forEach(p=>{const m=p+s.tableStart,h=i.doc.nodeAt(m);h&&i.setNodeMarkup(m,d,h.attrs)}),r(i)}return!0}}eo("row",{useDeprecatedLogic:!0});eo("column",{useDeprecatedLogic:!0});const tv=eo("cell",{useDeprecatedLogic:!0});function nv(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const s=t.node(-1).child(r),i=s.lastChild;if(i)return o-1-i.nodeSize;o-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return o+1;o+=s.nodeSize}}return null}function qu(t){return function(e,n){if(!qt(e))return!1;const r=nv(si(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(ce.between(o,Ty(o))).scrollIntoView())}return!0}}function rv(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function So(t,e){const n=t.selection;if(!(n instanceof De))return!1;if(e){const r=t.tr,o=rt(t.schema).cell.createAndFill().content;n.forEachCell((s,i)=>{s.content.eq(o)||r.replace(r.mapping.map(i+1),r.mapping.map(i+s.nodeSize-1),new Z(o,0,0))}),r.docChanged&&e(r)}return!0}function ov(t){if(t.size===0)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),s=o.type.spec.tableRole,i=o.type.schema,l=[];
22if(s=="row")for(let a=0;a<e.childCount;a++){let u=e.child(a).content;const c=a?0:Math.max(0,n-1),d=a<e.childCount-1?0:Math.max(0,r-1);(c||d)&&(u=vl(rt(i).row,new Z(u,c,d)).content),l.push(u)}else if(s=="cell"||s=="header_cell")l.push(n||r?vl(rt(i).row,new Z(e,n,r)).content:e);else return null;return sv(i,l)}function sv(t,e){const n=[];for(let o=0;o<e.length;o++){const s=e[o];for(let i=s.childCount-1;i>=0;i--){const{rowspan:l,colspan:a}=s.child(i).attrs;for(let u=o;u<o+l;u++)n[u]=(n[u]||0)+a}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(P.empty),n[o]<r){const s=rt(t).cell.createAndFill(),i=[];for(let l=n[o];l<r;l++)i.push(s);e[o]=e[o].append(P.from(i))}return{height:e.length,width:r,rows:e}}function vl(t,e){const n=t.createAndFill();return new fd(n).replace(0,n.content.size,e).doc}function iv({width:t,height:e,rows:n},r,o){if(t!=r){const s=[],i=[];for(let l=0;l<n.length;l++){const a=n[l],u=[];for(let c=s[l]||0,d=0;c<r;d++){let p=a.child(d%a.childCount);c+p.attrs.colspan>r&&(p=p.type.createChecked(Un(p.attrs,p.attrs.colspan,c+p.attrs.colspan-r),p.content)),u.push(p),c+=p.attrs.colspan;for(let m=1;m<p.attrs.rowspan;m++)s[l+m]=(s[l+m]||0)+p.attrs.colspan}i.push(P.from(u))}n=i,t=r}if(e!=o){const s=[];for(let i=0,l=0;i<o;i++,l++){const a=[],u=n[l%e];for(let c=0;c<u.childCount;c++){let d=u.child(c);i+d.attrs.rowspan>o&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),a.push(d)}s.push(P.from(a))}n=s,e=o}return{width:t,height:e,rows:n}}function lv(t,e,n,r,o,s,i){const l=t.doc.type.schema,a=rt(l);let u,c;if(o>e.width)for(let d=0,p=0;d<e.height;d++){const m=n.child(d);p+=m.nodeSize;const h=[];let g;m.lastChild==null||m.lastChild.type==a.cell?g=u||(u=a.cell.createAndFill()):g=c||(c=a.header_cell.createAndFill());for(let y=e.width;y<o;y++)h.push(g);t.insert(t.mapping.slice(i).map(p-1+r),h)}if(s>e.height){const d=[];for(let h=0,g=(e.height-1)*e.width;h<Math.max(e.width,o);h++){const y=h>=e.width?!1:n.nodeAt(e.map[g+h]).type==a.header_cell;d.push(y?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}const p=a.row.create(null,P.from(d)),m=[];for(let h=e.height;h<s;h++)m.push(p);t.insert(t.mapping.slice(i).map(r+n.nodeSize-2),m)}return!!(u||c)}function zu(t,e,n,r,o,s,i,l){if(i==0||i==e.height)return!1;let a=!1;for(let u=o;u<s;u++){const c=i*e.width+u,d=e.map[c];if(e.map[c-e.width]==d){a=!0;const p=n.nodeAt(d),{top:m,left:h}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(l).map(d+r),null,{...p.attrs,rowspan:i-m}),t.insert(t.mapping.slice(l).map(e.positionAt(i,h,n)),p.type.createAndFill({...p.attrs,rowspan:m+p.attrs.rowspan-i})),u+=p.attrs.colspan-1}}return a}function Pu(t,e,n,r,o,s,i,l){if(i==0||i==e.width)return!1;let a=!1;for(let u=o;u<s;u++){const c=u*e.width+i,d=e.map[c];if(e.map[c-1]==d){a=!0;const p=n.nodeAt(d),m=e.colCount(d),h=t.mapping.slice(l).map(d+r);t.setNodeMarkup(h,null,Un(p.attrs,i-m,p.attrs.colspan-(i-m))),t.insert(h+p.nodeSize,p.type.createAndFill(Un(p.attrs,0,i-m))),u+=p.attrs.rowspan-1}}return a}function Vu(t,e,n,r,o){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let i=Ie.get(s);const{top:l,left:a}=r,u=a+o.width,c=l+o.height,d=t.tr;let p=0;function m(){if(s=n?d.doc.nodeAt(n-1):d.doc,!s)throw new Error("No table found");i=Ie.get(s),p=d.mapping.maps.length}lv(d,i,s,n,u,c,p)&&m(),zu(d,i,s,n,a,u,l,p)&&m(),zu(d,i,s,n,a,u,c,p)&&m(),Pu(d,i,s,n,l,c,a,p)&&m(),Pu(d,i,s,n,l,c,u,p)&&m();for(let h=l;h<c;h++){const g=i.positionAt(h,a,s),y=i.positionAt(h,u,s);d.replace(d.mapping.slice(p).map(g+n),d.mapping.slice(p).map(y+n),new Z(o.rows[h-l],
220,0))}m(),d.setSelection(new De(d.doc.resolve(n+i.positionAt(l,a,s)),d.doc.resolve(n+i.positionAt(c-1,u-1,s)))),e(d)}const av=l2({ArrowLeft:Eo("horiz",-1),ArrowRight:Eo("horiz",1),ArrowUp:Eo("vert",-1),ArrowDown:Eo("vert",1),"Shift-ArrowLeft":Fo("horiz",-1),"Shift-ArrowRight":Fo("horiz",1),"Shift-ArrowUp":Fo("vert",-1),"Shift-ArrowDown":Fo("vert",1),Backspace:So,"Mod-Backspace":So,Delete:So,"Mod-Delete":So});function jo(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Eo(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;if(s instanceof De)return jo(n,r,be.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const i=Nf(o,t,e);if(i==null)return!1;if(t=="horiz")return jo(n,r,be.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(i),a=Rf(l,t,e);let u;return a?u=be.near(a,1):e<0?u=be.near(n.doc.resolve(l.before(-1)),-1):u=be.near(n.doc.resolve(l.after(-1)),1),jo(n,r,u)}}}function Fo(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;let i;if(s instanceof De)i=s;else{const a=Nf(o,t,e);if(a==null)return!1;i=new De(n.doc.resolve(a))}const l=Rf(i.$headCell,t,e);return l?jo(n,r,new De(i.$anchorCell,l)):!1}}function uv(t,e){const n=t.state.doc,r=Hn(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new De(r))),!0):!1}function cv(t,e,n){if(!qt(t.state))return!1;let r=ov(n);const o=t.state.selection;if(o instanceof De){r||(r={width:1,height:1,rows:[P.from(vl(rt(t.state.schema).cell,n))]});const s=o.$anchorCell.node(-1),i=o.$anchorCell.start(-1),l=Ie.get(s).rectBetween(o.$anchorCell.pos-i,o.$headCell.pos-i);return r=iv(r,l.right-l.left,l.bottom-l.top),Vu(t.state,t.dispatch,i,l,r),!0}else if(r){const s=si(t.state),i=s.start(-1);return Vu(t.state,t.dispatch,i,Ie.get(s.node(-1)).findCell(s.pos-i),r),!0}else return!1}function dv(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;const r=ju(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof De)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Hn(t.state.selection.$anchor))!=null&&((n=Ti(t,e))===null||n===void 0?void 0:n.pos)!=o.pos)s(o,e),e.preventDefault();else if(!r)return;function s(a,u){let c=Ti(t,u);const d=pn.getState(t.state)==null;if(!c||!ya(a,c))if(d)c=a;else return;const p=new De(a,c);if(d||!t.state.selection.eq(p)){const m=t.state.tr.setSelection(p);d&&m.setMeta(pn,a.pos),t.dispatch(m)}}function i(){t.root.removeEventListener("mouseup",i),t.root.removeEventListener("dragstart",i),t.root.removeEventListener("mousemove",l),pn.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(pn,-1))}function l(a){const u=a,c=pn.getState(t.state);let d;if(c!=null)d=t.state.doc.resolve(c);else if(ju(t,u.target)!=r&&(d=Ti(t,e),!d))return i();d&&s(d,u)}t.root.addEventListener("mouseup",i),t.root.addEventListener("dragstart",i),t.root.addEventListener("mousemove",l)}function Nf(t,e,n){if(!(t.state.selection instanceof ce))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const s=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const i=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?i:null}}return null}function ju(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Ti(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:o}=n;return r>=0&&Hn(t.state.doc.resolve(r))||Hn(t.state.doc.resolve(o))}var fv=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xl(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,xl(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function xl(t,e,n,r,o,s){let i=0,l=!0,a=e.firstChild;const u=t.firstChild;if(u){for(let d=0,p=0;d<u.childCount;d++){const{colspan:m,colwidth:h}=u.child(d).attrs;for(let g=0;g<m;g++,p++){const y=o==p?s:h&&h[g],v=y?y+"px":"";if(i+=y||r,y||(l=!1),a)a.style.width!=v&&(a.style.width=v),a=a.nextSibling;else{const C=document.createElement("col");C.style.width=v,e.appendChild(C)}}}for(;a;){var c;const d=a.nextSibling;(c=a.parentNode)===null||c===void 0||c.removeChild(a),a=d}l?(n.style.width=i+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=i+"px")}}const Ct=new ze("tableColumnResizing");function pv({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=fv,lastColumnResizable:o=!0}={}){const s=new He({key:Ct,state:{init(i,l){var a;const u=(a=s.spec)===null||a===void 0||(a=a.props)===null||a===void 0?void 0:a.nodeViews,c=rt(l.schema).table.name;return r&&u&&(u[c]=(d,p)=>new r(d,n,p)),new mv(-1,!1)},apply(i,l){return l.apply(i)}},props:{attributes:i=>{const l=Ct.getState(i);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(i,l)=>{hv(i,l,t,o)},mouseleave:i=>{gv(i)},mousedown:(i,l)=>{bv(i,l,e,n)}},decorations:i=>{const l=Ct.getState(i);if(l&&l.activeHandle>-1)return wv(i,l.activeHandle)},nodeViews:{}}});return s}var mv=class Ho{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Ct);if(r&&r.setHandle!=null)return new Ho(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Ho(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return yl(e.doc.resolve(o))||(o=-1),new Ho(o,n.dragging)}return n}};function hv(t,e,n,r){if(!t.editable)return;const o=Ct.getState(t.state);if(o&&!o.dragging){const s=vv(e.target);let i=-1;
22if(s){const{left:l,right:a}=s.getBoundingClientRect();e.clientX-l<=n?i=Hu(t,e,"left",n):a-e.clientX<=n&&(i=Hu(t,e,"right",n))}if(i!=o.activeHandle){if(!r&&i!==-1){const l=t.state.doc.resolve(i),a=l.node(-1),u=Ie.get(a),c=l.start(-1);if(u.colCount(l.pos-c)+l.nodeAfter.attrs.colspan-1==u.width-1)return}qf(t,i)}}}function gv(t){if(!t.editable)return;const e=Ct.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&qf(t,-1)}function bv(t,e,n,r){var o;if(!t.editable)return!1;const s=(o=t.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,i=Ct.getState(t.state);if(!i||i.activeHandle==-1||i.dragging)return!1;const l=t.state.doc.nodeAt(i.activeHandle),a=yv(t,i.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Ct,{setDragging:{startX:e.clientX,startWidth:a}}));function u(d){s.removeEventListener("mouseup",u),s.removeEventListener("mousemove",c);const p=Ct.getState(t.state);p?.dragging&&(xv(t,p.activeHandle,Uu(p.dragging,d,n)),t.dispatch(t.state.tr.setMeta(Ct,{setDragging:null})))}function c(d){if(!d.which)return u(d);const p=Ct.getState(t.state);if(p&&p.dragging){const m=Uu(p.dragging,d,n);Gu(t,p.activeHandle,m,r)}}return Gu(t,i.activeHandle,a,r),s.addEventListener("mouseup",u),s.addEventListener("mousemove",c),e.preventDefault(),!0}function yv(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const s=t.domAtPos(e);let i=s.node.childNodes[s.offset].offsetWidth,l=n;if(r)for(let a=0;a<n;a++)r[a]&&(i-=r[a],l--);return i/l}function vv(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Hu(t,e,n,r){const o=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!s)return-1;const{pos:i}=s,l=Hn(t.state.doc.resolve(i));if(!l)return-1;if(n=="right")return l.pos;const a=Ie.get(l.node(-1)),u=l.start(-1),c=a.map.indexOf(l.pos-u);return c%a.width==0?-1:u+a.map[c-1]}function Uu(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function qf(t,e){t.dispatch(t.state.tr.setMeta(Ct,{setHandle:e}))}function xv(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),s=Ie.get(o),i=r.start(-1),l=s.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1,a=t.state.tr;for(let u=0;u<s.height;u++){const c=u*s.width+l;if(u&&s.map[c]==s.map[c-s.width])continue;const d=s.map[c],p=o.nodeAt(d).attrs,m=p.colspan==1?0:l-s.colCount(d);if(p.colwidth&&p.colwidth[m]==n)continue;const h=p.colwidth?p.colwidth.slice():Cv(p.colspan);h[m]=n,a.setNodeMarkup(i+d,null,{...p,colwidth:h})}a.docChanged&&t.dispatch(a)}function Gu(t,e,n,r){const o=t.state.doc.resolve(e),s=o.node(-1),i=o.start(-1),l=Ie.get(s).colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1;let a=t.domAtPos(o.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&xl(s,a.firstChild,a,r,l,n)}function Cv(t){return Array(t).fill(0)}function wv(t,e){const n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return Pe.empty;const s=Ie.get(o),i=r.start(-1),l=s.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1;for(let u=0;u<s.height;u++){const c=l+u*s.width;if((l==s.width-1||s.map[c]!=s.map[c+1])&&(u==0||s.map[c]!=s.map[c-s.width])){var a;const d=s.map[c],p=i+d+o.nodeAt(d).nodeSize-1,m=document.createElement("div");m.className="column-resize-handle",!((a=Ct.getState(t))===null||a===void 0)&&a.dragging&&n.push(Mt.node(i+d,i+d+o.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(Mt.widget(p,m))}}return Pe.create(t.doc,n)}function _v({allowTableNodeSelection:t=!1}={}){return new He({key:pn,state:{init(){return null},apply(e,n){const r=e.getMeta(pn);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:s}=e.mapping.mapResult(n);return o?null:s}},props:{decorations:Ly,handleDOMEvents:{mousedown:dv},createSelectionBetween(e){return pn.getState(e.state)!=null?e.state.selection:null},handleTripleClick:uv,handleKeyDown:av,handlePaste:cv},appendTransaction(e,n,r){return qy(r,If(r,n),t)}})}function Cl(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Ku(t,e,n,r,o,s){var i;let l=0,a=!0,u=e.firstChild;const c=t.firstChild;if(c!==null)for(let d=0,p=0;d<c.childCount;d+=1){const{colspan:m,colwidth:h}=c.child(d).attrs;for(let g=0;g<m;g+=1,p+=1){const y=o===p?s:h&&h[g],v=y?`${y}px`:"";if(l+=y||r,y||(a=!1),u){if(u.style.width!==v){const[C,x]=Cl(r,y);u.style.setProperty(C,x)}u=u.nextSibling}else{const C=document.createElement("col"),[x,k]=Cl(r,y);C.style.setProperty(x,k),e.appendChild(C)}}}for(;u;){const d=u.nextSibling;(i=u.parentNode)===null||i===void 0||i.removeChild(u),u=d}a?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class kv{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Ku(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,Ku(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function Av(t,e,n,r){let o=0,s=!0;const i=[],l=t.firstChild;if(!l)return{};for(let d=0,p=0;d<l.childCount;d+=1){const{colspan:m,colwidth:h}=l.child(d).attrs;for(let g=0;g<m;
22g+=1,p+=1){const y=n===p?r:h&&h[g];o+=y||e,y||(s=!1);const[v,C]=Cl(e,y);i.push(["col",{style:`${v}: ${C}`}])}}const a=s?`${o}px`:"",u=s?"":`${o}px`;return{colgroup:["colgroup",{},...i],tableWidth:a,tableMinWidth:u}}function Wu(t,e){return t.createAndFill()}function Dv(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function Sv(t,e,n,r,o){const s=Dv(t),i=[],l=[];for(let u=0;u<n;u+=1){const c=Wu(s.cell);if(c&&l.push(c),r){const d=Wu(s.header_cell);d&&i.push(d)}}const a=[];for(let u=0;u<e;u+=1)a.push(s.row.createChecked(null,r&&u===0?i:l));return s.table.createChecked(null,a)}function Ev(t){return t instanceof De}const Bo=({editor:t})=>{const{selection:e}=t.state;if(!Ev(e))return!1;let n=0;const r=ff(e.ranges[0].$from,s=>s.type.name==="table");return r?.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},Fv=Xe.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:kv,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=Av(t,this.options.cellMinWidth),s=["table",Oe(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},s]:s},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{const i=Sv(s.schema,t,e,n);if(o){const l=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection(ce.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Vy(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>jy(t,e),deleteColumn:()=>({state:t,dispatch:e})=>Uy(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Ky(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Wy(t,e),deleteRow:()=>({state:t,dispatch:e})=>Yy(t,e),deleteTable:()=>({state:t,dispatch:e})=>rv(t,e),mergeCells:()=>({state:t,dispatch:e})=>Lu(t,e),splitCell:()=>({state:t,dispatch:e})=>Ou(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>eo("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>eo("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>tv(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Lu(t,e)?!0:Ou(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>Xy(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>qu(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>qu(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&If(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=De.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Bo,"Mod-Backspace":Bo,Delete:Bo,"Mod-Delete":Bo}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[pv({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],_v({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:Ge(tt(t,"tableRole",e))}}}),Bv=Xe.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Oe(this.options.HTMLAttributes,t),0]}}),Rv=Xe.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Oe(this.options.HTMLAttributes,t),0]}}),Mv=Xe.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Oe(this.options.HTMLAttributes,t),0]}}),Tv=sn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}}
22,addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),$v=[Cb,wb,_b,kb,Ab,Eb,Bb,Mb,Tb,Ib,Lb,ay,py,yy,Cy,ky,Ay,Dy,Fv,Bv,Rv,Mv,Tv],Iv=J({__name:"FlexibleEditorContent",props:{content:{},serializers:{},componentSerializers:{},relationBlocks:{},relationInlineBlocks:{},relationMarks:{}},setup(t){const e=t,n=e.serializers??$v.slice(0)??[],r=Xe.create({name:"relation-block",renderHTML({node:i,HTMLAttributes:l}){if(e.relationBlocks){for(const{collection:a,component:u}of e.relationBlocks)if(l.collection==a)return[u,l,0]}return[i.type,l,0]}}),o=Xe.create({name:"relation-inline-block",renderHTML({node:i,HTMLAttributes:l}){if(e.relationInlineBlocks){for(const{collection:a,component:u}of e.relationInlineBlocks)if(l.collection==a)return[u,l,0]}return[i.type,l,0]}}),s=An.create({name:"relation-mark",renderHTML({HTMLAttributes:i}){if(e.relationMarks){for(const{collection:l,component:a}of e.relationMarks)if(i.collection==l)return[a,i,0]}return["span",i,0]}});return n.push(r),n.push(o),n.push(s),(i,l)=>t.content?(b(),O(f(xb),{key:0,content:t.content,serializers:f(n),componentSerializers:t.componentSerializers},null,8,["content","serializers","componentSerializers"])):T("",!0)}}),Lv=(t,e,n="id",r="item")=>{return o(e);function o(s){if(!s)return null;const i=["relation-block","relation-inline-block"];if(s.type&&i.indexOf(s.type)>=0&&s.attrs?.id){const l=t.find(a=>a[n]===s.attrs.id);s.attrs.data=l?.[r]}return s.type=="text"&&s.marks?.length&&s.marks.map(l=>{if(l.type!="relation-mark"||!l.attrs?.id)return l;const a=t.find(u=>u[n]===l.attrs.id);return l.attrs.data=a?.[r],l}),s.content?.map(o),s}},Ov={},Nv=["value"];function qv(t,e){return b(),_("input",{type:"text",value:t.$slots.default()[0].children},null,8,Nv)}const Ju=Object.assign(io(Ov,[["render",qv]]),{__name:"Lucerne360BlocksFlexibleEditorBlocksTextfield"}),zv=J({__name:"DefinitionList",props:{id:{},junction:{},collection:{},data:{}},setup(t){return(e,n)=>(b(),_("dl",null,[(b(!0),_(W,null,de(t.data.items,(r,o)=>(b(),_(W,{key:o},[w("dt",null,E(r.term),1),w("dd",null,E(r.definition),1)],64))),128))]))}}),Pv=Object.assign(zv,{__name:"Lucerne360BlocksFlexibleEditorBlocksDefinitionList"}),Vv=["href"],jv=J({__name:"Link",props:{id:{},junction:{},collection:{},data:{}},setup(t){const{getNewsLink:e}=Ut(),{getMemberLink:n}=Ut();return(r,o)=>{const s=nn,i=Ps;return b(),_(W,null,[t.data.type=="external"?(b(),_("a",{key:0,href:t.data.url,target:"_blank"},[ie(r.$slots,"default")],8,Vv)):T("",!0),t.data.type=="news"?(b(),O(s,{key:1,to:f(e)(t.data.news)},{default:S(()=>[ie(r.$slots,"default")]),_:3},8,["to"])):T("",!0),t.data.type=="page"?(b(),O(s,{key:2,to:t.data.page?.slug},{default:S(()=>[ie(r.$slots,"default")]),_:3},8,["to"])):T("",!0),t.data.type=="member"?(b(),O(s,{key:3,to:f(n)(t.data.member)},{default:S(()=>[ie(r.$slots,"default")]),_:3},8,["to"])):T("",!0),t.data.type=="download"&&t.data.download?(b(),O(i,{key:4,to:"/lucerne360/assets/"+t.data.download?.id+"/"+t.data.download?.filename_download+"?download",external:""},{default:S(()=>[ie(r.$slots,"default")]),_:3},8,["to"])):T("",!0)],64)}}}),Hv=Object.assign(jv,{__name:"Lucerne360BlocksFlexibleEditorBlocksLink"}),Uv=J({__name:"FileLink",props:{file:{}},setup(t){const{humanFileSize:e}=rn(),{pick:n}=Se();return(r,o)=>{const s=Ae,i=Ps;return t.file?(b(),O(i,{key:0,to:"/lucerne360/assets/"+t.file.id+"/"+t.file.filename_download+"?download",external:"",class:"text-left"},{default:S(()=>[A(s,{icon:"i-lucide-download",variant:"link",class:"cursor-pointer"},{default:S(()=>[ne(E(f(n)(t.file,"title"))+" ("+E(f(e)(t.file.filesize))+")",1)]),_:1})]),_:1},8,["to"])):T("",!0)}}}),va=Object.assign(Uv,{__name:"Lucerne360BlocksFileLink"}),Gv={key:0,class:"font-semibold"},Kv={class:"pb-4"},Wv=J({__name:"FileList",props:{id:{},junction:{},collection:{},data:{}},setup(t){const e=t,n=$(()=>r(e.data?.files));function r(l){return Array.isArray(l)?[...l].filter(a=>a?.directus_files_id?.id).sort(o):[]}function o(l,a){const u=s(l?.directus_files_id)-s(a?.directus_files_id);return u!==0?u:i(l?.directus_files_id).localeCompare(i(a?.directus_files_id),"de-CH")}function s(l){const a=Number(l?.sort);return Number.isFinite(a)?a:Number.MAX_SAFE_INTEGER}
22function i(l){return l?.title||l?.filename_download||l?.id||""}return(l,a)=>(b(),_("div",null,[e.data.title?(b(),_("div",Gv,E(e.data.title),1)):T("",!0),w("div",Kv,[(b(!0),_(W,null,de(f(n),u=>(b(),_("div",{class:"",key:u.id},[A(va,{file:u.directus_files_id},null,8,["file"])]))),128))])]))}}),Jv=Object.assign(Wv,{__name:"Lucerne360BlocksFlexibleEditorBlocksFileList"}),Yv={class:"p-4"},Qv=J({__name:"AccordionItem",props:{item:{}},setup(t){const e=H(t.item.open||!1),n=$(()=>e.value?"i-lucide-chevron-up":"i-lucide-chevron-down"),r=$(()=>e.value?"font-semibold":"");return(o,s)=>{const i=Ae,l=pr;return b(),O(l,{open:f(e),"onUpdate:open":s[0]||(s[0]=a=>ke(e)?e.value=a:null),class:"flex flex-col gap-2 w-full py-1"},{content:S(()=>[w("div",Yv,[A(xa,{content:t.item.content,nodes:t.item.editor_nodes},null,8,["content","nodes"])])]),default:S(()=>[A(i,{label:t.item.title,color:"neutral",variant:"accordion",size:"xl",class:K(f(r)),"trailing-icon":f(n),block:""},null,8,["label","class","trailing-icon"])]),_:1},8,["open"])}}}),Zv=Object.assign(Qv,{__name:"Lucerne360BlocksFlexibleEditorBlocksAccordionItem"}),Xv=J({__name:"Accordion",props:{id:{},junction:{},collection:{},data:{}},setup(t){const e=t;return(n,r)=>(b(!0),_(W,null,de(e.data?.items,o=>(b(),_("div",null,[A(Zv,{item:o},null,8,["item"])]))),256))}}),ex=Object.assign(Xv,{__name:"Lucerne360BlocksFlexibleEditorBlocksAccordion"}),tx={key:0,class:"text-muted py-4"},nx={class:"pb-4"},rx=J({__name:"FilesAccordion",props:{id:{},junction:{},collection:{},data:{}},setup(t){const e=t,n=H(e?.data?.open||!1),r=$(()=>o(e.data?.files));function o(c){return Array.isArray(c)?[...c].filter(d=>d?.directus_files_id?.id).sort(s):[]}function s(c,d){const p=i(c?.directus_files_id)-i(d?.directus_files_id);return p!==0?p:l(c?.directus_files_id).localeCompare(l(d?.directus_files_id),"de-CH")}function i(c){const d=Number(c?.sort);return Number.isFinite(d)?d:Number.MAX_SAFE_INTEGER}function l(c){return c?.title||c?.filename_download||c?.id||""}const{$directus:a,$readFiles:u}=ot();return(c,d)=>{const p=Ae,m=pr;return b(),O(m,{open:f(n),"onUpdate:open":d[0]||(d[0]=h=>ke(n)?n.value=h:null),class:"flex flex-col gap-2 w-full py-1"},{content:S(()=>[e.data.description?(b(),_("div",tx,E(e.data.description),1)):T("",!0),w("div",nx,[(b(!0),_(W,null,de(f(r),h=>(b(),_("div",{class:"",key:h.id},[A(va,{file:h.directus_files_id},null,8,["file"])]))),128))])]),default:S(()=>[A(p,{label:e.data.title,color:"neutral",variant:"soft",class:"w-full cursor-pointer",size:"xl","trailing-icon":"i-lucide-chevron-down",block:""},null,8,["label"])]),_:1},8,["open"])}}}),ox=Object.assign(rx,{__name:"Lucerne360BlocksFlexibleEditorBlocksFilesAccordion"}),sx={base:"relative column-1 md:columns-2 lg:columns-3 gap-8 space-y-8 *:break-inside-avoid-column *:will-change-transform"},ix={__name:"UPageColumns",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(t){const n=Gn("pageColumns",t),r=Kn(),o=$(()=>gt({extend:gt(sx),...r.ui?.pageColumns||{}}));return(s,i)=>(b(),O(f(qe),{as:f(n).as,class:K(o.value({class:[f(n).ui?.base,f(n).class]}))},{default:S(()=>[ie(s.$slots,"default")]),_:3},8,["as","class"]))}},lx={class:"mb-2"},ax={class:"rounded-lg overflow-hidden bg-default ring ring-default divide-y divide-default p-4 text-black hover:bg-slate-50"},ux={class:"font-bold"},cx={class:"text-sm truncate my-1"},dx={key:0,class:"text-sm text-muted"},fx={class:"text-sm text-muted"},px={class:"mt-2"},mx=J({__name:"Kader",props:{id:{},junction:{},collection:{},data:{}},setup(t){const{getMemberLink:e}=Ut(),{t:n}=Le(),r=t;function o(i){return i.map(l=>l.clubs_id.title).join(", ")}function s(i){return i==="female"?"i-lucide-venus":i==="male"?"i-lucide-mars":""}return(i,l)=>{const a=mt,u=nn,c=ix;return b(),O(c,{class:"gap-2"},{default:S(()=>[(b(!0),_(W,null,de(r.data?.special_list?.members,d=>(b(),_("div",lx,[d.members_id?(b(),O(u,{key:0,to:f(e)(d.members_id),class:"p-0"},{default:S(()=>[w("div",ax,[w("div",null,[w("div",ux,[ne(E(d.members_id.first_name)+" "+E(d.members_id.last_name)+" ",1),A(a,{class:"text-xs text-gray-300",name:s(d.members_id.gender)},null,8,["name"])]),w("div",cx,E(o(d.members_id.clubs)),1),d.members_id.c
22ategory?(b(),_("div",dx,E(i.$t("Kategorie"))+": "+E(d.members_id.category),1)):T("",!0),w("div",fx,E(i.$t("Jahrgang"))+": "+E(d.members_id.year_of_birth),1),w("div",px,[A(Hi,{chg:d.members_id.stat_elo_std_chg,gms:d.members_id.stat_elo_std_gms,elo:d.members_id.stat_elo_std,tc:"std",size:"sm",ychg:d.members_id.stat_elo_std_ychg},null,8,["chg","gms","elo","ychg"])])])])]),_:2},1032,["to"])):T("",!0)]))),256))]),_:1})}}}),hx=Object.assign(mx,{__name:"Lucerne360BlocksFlexibleEditorBlocksKader"}),gx=["href"],bx=J({__name:"EmailSafe.client",props:{emailEncrypted:{},title:{}},setup(t){const e=t,{deobfuscateEmail:n}=Ut(),r=H("");return dt(()=>{e.emailEncrypted&&(r.value=n(e.emailEncrypted))}),(o,s)=>r.value?(b(),_("a",{key:0,href:`mailto:${r.value}`},E(e.title?.trim()||r.value),9,gx)):T("",!0)}}),yx=Object.assign(bx,{__name:"Lucerne360BlocksFlexibleEditorBlocksEmailSafe"}),vx=J({__name:"EMail",props:{id:{},junction:{},collection:{},data:{}},setup(t){return(e,n)=>(b(),O(yx,{title:t.data?.title,"email-encrypted":t.data?.email_encrypted},null,8,["title","email-encrypted"]))}}),xx=Object.assign(vx,{__name:"Lucerne360BlocksFlexibleEditorBlocksEMail"}),Cx=J({__name:"EditorContent",props:["content","nodes"],setup(t){Lv(t.nodes,t.content);const e=[{collection:"definition_list",component:Pv},{collection:"files_accordion",component:ox},{collection:"file_list",component:Jv},{collection:"accordion",component:ex},{collection:"kader",component:hx}],n=[{collection:"email",component:xx}],r=[{collection:"link",component:Hv}],o=[{name:"italic",type:"mark",component:Ju},{name:"bold",type:"mark",render:l=>[Ju,{...l,style:"background:lightgreen"}]},{name:"heading",render:l=>["textarea",l]}],s=H(!1),i=H(!0);return(l,a)=>(b(),O(f(Iv),{content:t.content,"component-serializers":s.value?o:[],"relation-blocks":i.value?e:[],"relation-inline-blocks":i.value?n:[],"relation-marks":i.value?r:[],class:"luc-content"},null,8,["content","component-serializers","relation-blocks","relation-inline-blocks","relation-marks"]))}}),xa=Object.assign(io(Cx,[["__scopeId","data-v-148a899a"]]),{__name:"Lucerne360BlocksFlexibleEditorContent"}),zf=Bp("/img/no-image.png"),wx={class:"grid gap-2 md:gap-4 grid-cols-2 lg:grid-cols-4 auto-rows-[220px] max-[991px]:hidden"},_x=["src","alt"],kx={key:1,src:zf,class:"absolute inset-0 w-full h-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"},Ax={class:"absolute top-1 left-3"},Dx={class:"absolute bottom-0 left-0 right-0 pb-2 pl-4 pr-4 text-white bg-black/60"},Sx={class:"inline-flex items-center mb-0 text-white text-xs font-mono opacity-80"},Ex={class:"grid w-full min-[992px]:hidden"},Fx=["src","alt"],Bx={class:"absolute top-3 left-3 z-20"},Rx={class:"absolute inset-x-0 bottom-0 z-20 min-w-0 bg-black/40 p-3 text-white"},Mx={class:"mb-1 block w-full truncate text-xs font-mono text-white opacity-80"},Tx={class:"m-0 block w-full overflow-hidden break-words text-base font-semibold leading-tight text-white line-clamp-2"},$x=J({__name:"TopNews",props:{tags:{default:()=>[]},tags_connect:{default:"or"}},async setup(t){let e,n;const r=t,{locale:o}=Le(),s=Wn(),i=$(()=>r.tags.map(y).filter(Boolean)),l=$(()=>String(r.tags_connect||"or").toLowerCase()==="and"?"and":"or"),a=$(()=>({limit:5,tags:i.value.length?i.value.join(","):void 0,tags_connect:i.value.length?l.value:void 0})),u=$(()=>`news:top:5:${l.value}:${i.value.slice().sort().join(",")}`),{data:c,error:d}=([e,n]=Qe(()=>gc("/api/query/news/latest",{key:u,query:a},"$OkJjM0wepd")),e=await e,n(),e),{pick:p}=Se(),m=new Mr(o.value+"-CH",{day:"2-digit",month:"2-digit",year:"numeric"});function h(v){const C=_r(v,s.public.timeZone),x=kr(C,s.public.timeZone);return m.format(x.toDate())}function g(v){return v.author?v.author:v.user_created?.first_name+" "+v.user_created?.last_name}function y(v){const C=v?.news_tags_id??v?.id??v;return C&&typeof C=="object"?String(C.id??C.news_tags_id??"").trim():String(C??"").trim()}return(v,C)=>{const x=to,k=nn,D=zs;return b(),_(W,null,[w("div",wx,[f(c)?(b(!0),_(W,{key:0},de(f(c),(F,B)=>(b(),O(k,{to:"/news"+F.slug,class:K(["relative rounded-xl overflow-hidden group",{"lg:col-span-2 lg:row-span-2":B==0}])},{default:S(()=>[F.thumbnail?(b(),_("img",{key:0,src:"/lucerne360/assets/"+F.thumbnail?.id+"/"+F.thumbnail?.filename_download+"?key=thumbn
22ail",alt:F.thumbnail?.title,class:"absolute inset-0 w-full h-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"},null,8,_x)):(b(),_("img",kx)),C[0]||(C[0]=w("div",{class:"absolute inset-0 bg-transparent"},null,-1)),w("div",Ax,[(b(!0),_(W,null,de(F.tags,R=>(b(),O(x,{class:"mr-1",style:Bt([{backgroundColor:R.news_tags_id?.color},{color:"white"}]),size:"sm"},{default:S(()=>[ne(E(f(p)(R.news_tags_id,"title")),1)]),_:2},1032,["style"]))),256))]),w("div",Dx,[w("p",Sx,E(h(F.published_at))+" – "+E(g(F)),1),w("h3",{class:K(["mt-0 font-semibold leading-tight line-clamp-1 text-pretty text-sm text-slate-200",{"line-clamp-2":B===0,"text-xl":B===0}])},E(f(p)(F,"title")),3)])]),_:2},1032,["to","class"]))),256)):T("",!0)]),w("div",Ex,[A(D,{items:f(c)??[],autoplay:{delay:4e3},dots:"",loop:"",class:"w-full mx-auto rounded-xl mb-10 group p-2",ui:{dot:"bg-white"}},{default:S(({item:F})=>[A(k,{to:"/news"+F.slug,class:"relative block h-[350px] w-full overflow-hidden rounded-xl group"},{default:S(()=>[w("img",{src:"/lucerne360/assets/"+F.thumbnail?.id+"/"+F.thumbnail?.filename_download+"?key=thumbnail",alt:F.thumbnail?.title,class:"absolute inset-0 z-0 h-full w-full rounded-xl object-cover transition-transform duration-300 group-hover:scale-[1.02]"},null,8,Fx),C[1]||(C[1]=w("div",{class:"absolute inset-0 z-10 rounded-xl"},null,-1)),w("div",Bx,[(b(!0),_(W,null,de(F.tags,B=>(b(),O(x,{class:"mr-1",style:Bt([{backgroundColor:B.news_tags_id?.color},{color:"white"}])},{default:S(()=>[ne(E(f(p)(B.news_tags_id,"title")),1)]),_:2},1032,["style"]))),256))]),w("div",Rx,[w("p",Mx,E(h(F.published_at))+" – "+E(g(F)),1),w("h3",Tx,E(f(p)(F,"title")),1)])]),_:2},1032,["to"])]),_:1},8,["items"])])],64)}}}),Ix=Object.assign($x,{__name:"Lucerne360BlocksNewsTopNews"}),Lx={slots:{root:"",list:"flex items-center gap-1",ellipsis:"pointer-events-none",label:"min-w-5 text-center",first:"",prev:"",item:"",next:"",last:""}},ii={__name:"UPagination",props:{as:{type:null,required:!1},firstIcon:{type:null,required:!1},prevIcon:{type:null,required:!1},nextIcon:{type:null,required:!1},lastIcon:{type:null,required:!1},ellipsisIcon:{type:null,required:!1},color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"outline"},activeColor:{type:null,required:!1,default:"primary"},activeVariant:{type:null,required:!1,default:"solid"},showControls:{type:Boolean,required:!1,default:!0},size:{type:null,required:!1},to:{type:Function,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultPage:{type:Number,required:!1},disabled:{type:Boolean,required:!1},itemsPerPage:{type:Number,required:!1,default:10},page:{type:Number,required:!1},showEdges:{type:Boolean,required:!1,default:!1},siblingCount:{type:Number,required:!1,default:2},total:{type:Number,required:!1,default:0}},emits:["update:page"],setup(t,{emit:e}){const n=t,r=e,o=so(),s=Gn("pagination",n),{dir:i}=El(),l=Kn(),a=Vs(js(s,"as","defaultPage","disabled","itemsPerPage","page","showEdges","siblingCount","total"),r),u=$(()=>s.firstIcon||(i.value==="rtl"?l.ui.icons.chevronDoubleRight:l.ui.icons.chevronDoubleLeft)),c=$(()=>s.prevIcon||(i.value==="rtl"?l.ui.icons.chevronRight:l.ui.icons.chevronLeft)),d=$(()=>s.nextIcon||(i.value==="rtl"?l.ui.icons.chevronLeft:l.ui.icons.chevronRight)),p=$(()=>s.lastIcon||(i.value==="rtl"?l.ui.icons.chevronDoubleLeft:l.ui.icons.chevronDoubleRight)),m=$(()=>gt({extend:gt(Lx),...l.ui?.pagination||{}})());return(h,g)=>(b(),O(f(Km),Ce(f(a),{"data-slot":"root",class:m.value.root({class:[f(s).ui?.root,f(s).class]})}),{default:S(({page:y,pageCount:v})=>[A(f(th),{"data-slot":"list",class:K(m.value.list({class:f(s).ui?.list}))},{default:S(({items:C})=>[f(s).showControls||o.first?(b(),O(f(Jm),{key:0,"as-child":"","data-slot":"first",class:K(m.value.first({class:f(s).ui?.first}))},{default:S(()=>[ie(h.$slots,"first",{},()=>[A(Ae,{color:f(s).color,variant:f(s).variant,size:f(s).size,icon:u.value,to:f(s).to?.(1)},null,8,["color","variant","size","icon","to"])])]),_:3},8,["class"])):T("",!0),f(s).showControls||o.prev?(b(),O(f(lh),{key:1,"as-child":"","data-slot":"prev",class:K(m.value.prev({class:f(s).ui?.prev}))},{default:S(()=>[ie(h.$slots,"prev",{},()=>[A(Ae,{color:f(s).color,variant:f(s).variant,size:f(s).size,icon:c.value,to:y>1?f(s).to?.(y-1):void 0},null,8,["color","variant","size","icon","to"])])]),_:2},1032,["class"])):T("",!0),(b(!0),_(W,null,de(C,(x,k)=>(b(),_(W,{key:k},[x.type==="page"?(b(),O(f(rh),{key:0,"as-child":"",value:x.value,"data-slot":"item",class:K(m.value.item({class:f(s).ui?.item}))},{default:S(()=>[ie(h.$slots,"item",Ce({ref_for:!0},{item:x,index:k,page:y,pageCount:v}),()=>[A(Ae,{color:y===x.value?f(s).activeColor:f(s).color,variant:y===x.value?f(s).activeVariant:f(s).variant,size:f(s).size,label:String(x.value),ui:{label:m.value.label()},to:f(s).to?.(x.value),square:""},null,8,["color","variant","size","label","ui","to"])])]),_:2},1032,["value","class"])):(b(),O(f(Hm),{key:1,"as-child":"","data-slot":"ellipsis",class:K(m.value.ellipsis({class:f(s).ui?.ellipsis}))},{default:S(()=>[ie(h.$slots,"ellipsis",{ui:m.value},()=>[A(Ae,{as:"div",color:f(s).color,variant:f(s).variant,size:f(s).size,icon:f(s).ellipsisIcon||f(l).ui.icons.ellipsis},null,8,["color","variant","size","icon"])])]),_:3},8,["class"]))],64))),128)),f(s).showControls||o.next?(b(),O(f(sh),{key:2,"as-child":"","data-slot":"next",class:K(m.value.next({class:f(s).ui?.next}))},{default:S(()=>[ie(h.$slots,"next",{},()=>[A(Ae,{color:f(s).color,variant:f(s).variant,size:f(s).size,icon:d.value,to:y<v?f(s).to?.(y+1):void 0},null,8,["color","variant","size","icon","to"])])]),_:2},1032,["class"])):T("",!0),f(s).showControls||o.last?(b(),O(f(Qm),{key:3,"as-child":"","data-slot":"last",class:K(m.value.last({class:f(s).ui?.last}))},{default:S(()=>[ie(h.$slots,"last",{},()=>[A(Ae,{color:f(s).color,variant:f(s).variant,size:f(s).size,icon:p.value,to:f(s).to?.(v)},null,8,["color","variant","size","icon","to"])])]),_:2},1032,["class"])):T("",!0)]),_:2},1032,["class"])]),_:3},16,["class"]))}},Ox={class:"relative group/blog-post py-2 overflow-hidden grid grid-cols-4 lg:grid-cols-8 items-start gap-x-3 col-span-2 w-full border-b border-b-default"},Nx={class:"relative overflow-hidden w-full pointer-events-none shadow-lg rounded-lg aspect-square lg:col-span-1"}
22,qx=["alt","src"],zx={key:1,src:zf,class:"absolute inset-0 w-full h-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"},Px={class:"min-w-0 flex-1 flex flex-col col-span-3 lg:col-span-7"},Vx={class:"flex gap-1 my-1 justify-between"},jx={class:"text-gray-500 text-sm font-mono"},Hx={class:"gap-2 flex"},Ux={class:"line-clamp-2 leading-tight font-semibold text-muted md:my-0 md:text-base text-pretty"},Gx={class:"mt-1 text-sm md:text-sm line-clamp-2 md:line-clamp-3 text-pretty text-muted"},Kx=J({__name:"NewsTeaser",props:["item"],setup(t){const{pick:e}=Se(),{getNewsLink:n}=Ut(),{formatDate:r}=rn();return(o,s)=>{const i=to,l=nn;return b(),O(l,{to:f(n)(t.item)},{default:S(()=>[w("article",Ox,[w("div",Nx,[t.item.thumbnail?(b(),_("img",{key:0,alt:f(e)(t.item,"title"),class:"object-cover object-top w-full h-full",src:"/lucerne360/assets/"+t.item.thumbnail?.id+"/"+t.item.thumbnail?.filename_download+"?key=thumbnail"},null,8,qx)):(b(),_("img",zx))]),w("div",Px,[w("div",Vx,[w("span",jx,E(f(r)(t.item.published_at)),1),w("div",Hx,[(b(!0),_(W,null,de(t.item.tags?.slice(0,2),a=>(b(),O(i,{size:"sm",class:"mr-0 bg-gray-200 text-gray-600",variant:"soft"},{default:S(()=>[ne(E(f(e)(a.news_tags_id,"title")),1)]),_:2},1024))),256))])]),w("span",Ux,E(f(e)(t.item,"title")),1),w("div",Gx,E(f(e)(t.item,"teaser")),1)])])]),_:1},8,["to"])}}}),Wx=Object.assign(Kx,{__name:"Lucerne360BlocksNewsTeaser"}),Jx={class:"md:flex md:justify-between"},Yx={key:0,class:"flex gap-1 flex-wrap mb-1"},Qx=["onClick"],Zx=J({__name:"NewsFilter",props:{tag:{default:()=>""},tagModifiers:{}},emits:["update:tag"],async setup(t){let e,n;const r=Re(t,"tag"),{pick:o}=Se();function s(d){return r.value===d?r.value="":r.value=d}function i(){r.value=""}const{$directus:l,$readItems:a}=ot(),{data:u,error:c}=([e,n]=Qe(()=>bt("news-tags",async()=>l.request(a("news_tags",{fields:["id","title","translations.*"],sort:"sort"})))),e=await e,n(),e);return(d,p)=>{const m=mt,h=Ae,g=im;return b(),_("div",Jx,[f(u)&&f(u).length?(b(),_("div",Yx,[A(h,{label:"Reset",color:"neutral",variant:"soft",onClick:i,class:K(["cursor-pointer",{hidden:r.value===""}])},{default:S(()=>[A(m,{name:"i-lucide-funnel-x"})]),_:1},8,["class"]),A(h,{label:f(o)(f(u)[0],"title"),class:K(["bg-[#C2F4E5] text-green-800 cursor-pointer hover:text-white",{"bg-primary text-white":r.value===f(u)[0]?.id}]),onClick:p[0]||(p[0]=y=>s(f(u)[0]?.id))},null,8,["label","class"]),A(h,{label:f(o)(f(u)[1],"title"),class:K(["bg-[#CAEFFA] text-sky-800 cursor-pointer hover:text-white",{"bg-primary text-white":r.value===f(u)[1]?.id}]),onClick:p[1]||(p[1]=y=>s(f(u)[1]?.id))},null,8,["label","class"]),A(h,{label:f(o)(f(u)[2],"title"),class:K(["bg-[#F8E3CA] text-orange-800 cursor-pointer hover:text-white",{"bg-primary text-white":r.value===f(u)[2]?.id}]),onClick:p[2]||(p[2]=y=>s(f(u)[2]?.id))},null,8,["label","class"]),A(h,{label:f(o)(f(u)[3],"title"),class:K(["bg-[#E8DDF6] text-violet-800 cursor-pointer hover:text-white",{"bg-primary text-white":r.value===f(u)[3]?.id}]),onClick:p[3]||(p[3]=y=>s(f(u)[3]?.id))},null,8,["label","class"]),A(g,{ui:{content:"w-48"},items:f(u).slice(3),"value-key":"id","label-key":"title"},{item:S(({item:y})=>[w("div",{onClick:v=>s(y.id),class:"w-full cursor-pointer text-left"},E(f(o)(y,"title")),9,Qx)]),default:S(()=>[A(h,{label:"more",color:"neutral",variant:"soft"},{default:S(()=>[A(m,{name:"i-lucide-ellipsis"})]),_:1})]),_:1},8,["items"])])):T("",!0)])}}}),Xx=Object.assign(Zx,{__name:"Lucerne360BlocksNewsFilter"}),eC={class:"md:flex md:justify-between items-center"},tC={class:""},nC={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"},rC={class:"w-full flex justify-center text-center sm:w-auto sm:justify-start sm:text-left"},oC={class:"text-sm text-muted"},sC={class:"w-full flex justify-center sm:w-auto sm:justify-end"},iC={key:0,class:"text-red-500 text-sm"},lC=J({__name:"NewsList2",props:{tags:{default:()=>[]},tags_connect:{default:"or"},feed:{default:null},limit:{default:20},title:{default:""},translations:{default:()=>[]}},async setup(t){let e,n;const{pickT:r}
22=Se(),{t:o}=Le(),s=t,i=H(1),l=$(()=>{const x=Number(s.limit);return Number.isFinite(x)&&x>0?x:20}),{locale:a}=Le(),u=H("");s.tags&&s.tags.length&&(u.value=s.tags[0].news_tags_id.id);const c=()=>{const x=[],k=d();return s.feed&&x.push({feed:{_eq:s.feed}}),Object.keys(k).length&&x.push(k),x.length?{_and:x}:{}},d=()=>!u||u.value==""?{}:{tags:{news_tags_id:{id:{_eq:u.value}}}},p=$(()=>`news:${l.value}:${i.value}:${s.feed??""}:${u.value}`),{$directus:m,$readItems:h}=ot(),{data:g,error:y}=([e,n]=Qe(async()=>bt(p,async()=>await $fetch("/lucerne360/items/news",{query:{fields:["*","thumbnail.*","user_created.*","tags.news_tags_id.*","tags.news_tags_id.translations.*","translations.*"],sort:"-published_at",page:i.value,limit:l.value,meta:"filter_count",filter:c()}}),{watch:[u,i]})),e=await e,n(),e),v=$(()=>g.value?.meta?.filter_count??0),C=$(()=>Math.max(1,Math.ceil(v.value/l.value)));return ct(u,()=>{i.value=1}),(x,k)=>{const D=ii,F=Fl;return b(),O(F,{variant:"white",class:""},{header:S(()=>[w("div",eC,[w("div",null,E(f(r)(s.translations,s.title,"title")),1),A(Xx,{tag:f(u),"onUpdate:tag":k[0]||(k[0]=B=>ke(u)?u.value=B:null)},null,8,["tag"])])]),footer:S(()=>[w("div",nC,[w("div",rC,[w("span",oC,E(f(o)("newsList.entriesSummary",{total:f(v),page:f(i),totalPages:f(C)})),1)]),w("div",sC,[A(D,{page:f(i),"onUpdate:page":k[1]||(k[1]=B=>ke(i)?i.value=B:null),total:f(v),"page-count":f(l),"items-per-page":f(l),variant:"soft",class:"my-4"},null,8,["page","total","page-count","items-per-page"])])]),f(y)?(b(),_("div",iC,E(f(y).message),1)):T("",!0)]),default:S(()=>[w("div",tC,[(b(!0),_(W,null,de(f(g)?.data??[],B=>(b(),O(Wx,{item:B},null,8,["item"]))),256))])]),_:1})}}}),aC=Object.assign(lC,{__name:"Lucerne360BlocksNewsList2"}),uC={slots:{root:"flex gap-1.5",item:"group relative flex flex-1 gap-3",container:"relative flex items-center gap-1.5",indicator:"group-data-[state=completed]:text-inverted group-data-[state=active]:text-inverted text-muted",separator:"flex-1 rounded-full bg-elevated",wrapper:"w-full",date:"text-dimmed text-xs/5",title:"font-medium text-highlighted text-sm",description:"text-muted text-wrap text-sm"},variants:{orientation:{horizontal:{root:"flex-row w-full",item:"flex-col",separator:"h-0.5"},vertical:{root:"flex-col",container:"flex-col",separator:"w-0.5"}},color:{primary:{indicator:"group-data-[state=completed]:bg-primary group-data-[state=active]:bg-primary"},secondary:{indicator:"group-data-[state=completed]:bg-secondary group-data-[state=active]:bg-secondary"},success:{indicator:"group-data-[state=completed]:bg-success group-data-[state=active]:bg-success"},info:{indicator:"group-data-[state=completed]:bg-info group-data-[state=active]:bg-info"},warning:{indicator:"group-data-[state=completed]:bg-warning group-data-[state=active]:bg-warning"},error:{indicator:"group-data-[state=completed]:bg-error group-data-[state=active]:bg-error"},neutral:{indicator:"group-data-[state=completed]:bg-inverted group-data-[state=active]:bg-inverted"}},size:{"3xs":"","2xs":"",xs:"",sm:"",md:"",lg:"",xl:"","2xl":"","3xl":""},reverse:{true:""}},compoundVariants:[{color:"primary",reverse:!1,class:{separator:"group-data-[state=completed]:bg-primary"}},{color:"secondary",reverse:!1,class:{separator:"group-data-[state=completed]:bg-secondary"}},{color:"success",reverse:!1,class:{separator:"group-data-[state=completed]:bg-success"}},{color:"info",reverse:!1,class:{separator:"group-data-[state=completed]:bg-info"}},{color:"warning",reverse:!1,class:{separator:"group-data-[state=completed]:bg-warning"}},{color:"error",reverse:!1,class:{separator:"group-data-[state=completed]:bg-error"}},{color:"primary",reverse:!0,class:{separator:"group-data-[state=active]:bg-primary group-data-[state=completed]:bg-primary"}},{color:"secondary",reverse:!0,class:{separator:"group-data-[state=active]:bg-secondary group-data-[state=completed]:bg-secondary"}},{color:"success",reverse:!0,class:{separator:"group-data-[state=active]:bg-success group-data-[state=completed]:bg-success"}},{color:"info",reverse:!0,class:{separator:"group-data-[state=active]:bg-info group-data-[state=completed]:bg-info"}},{color:"warning",reverse:!0,class:{separator:"group-data-[state=active]:bg-warning group-data-[state=completed]:bg-warning"}},{color:"error",reverse:!0,class:{separator:"group-data-[state=active]:bg-error group-data-[state=completed]:bg-error"}},{color:"neutral",reverse:!1,class:{separator:"group-data-[state=completed]:bg-inverted"}},{color:"neutral",reverse:!0,class:{separator:"group-data-[state=active]:bg-inverted group-data-[state=completed]:bg-inverted"}},{orientation:"horizontal",size:"3xs",class:{wrapper:"pe-4.5"}},{orientation:"horizontal",size:"2xs",class:{wrapper:"pe-5"}},{orientation:"horizontal",size:"xs",class:{wrapper:"pe-5.5"}},{orientation:"horizontal",size:"sm",class:{wrapper:"pe-6"}},{orientation:"horizontal",size:"md",class:{wrapper:"pe-6.5"}},{orientation:"horizontal",size:"lg",class:{wrapper:"pe-7"}},{orientation:"horizontal",size:"xl",class:{wrapper:"pe-7.5"}},{orientation:"horizontal",size:"2xl",class:{wrapper:"pe-8"}},{orientation:"horizontal",size:"3xl",class:{wrapper:"pe-8.5"}},{orientation:"vertical",size:"3xs",class:{wrapper:"-mt-0.5 pb-4.5"}},{orientation:"vertical",size:"2xs",class:{wrapper:"pb-5"}},{orientation:"vertical",size:"xs",class:{wrapper:"mt-0.5 pb-5.5"}},{orientation:"vertical",size:"sm",class:{wrapper:"mt-1 pb-6"}},{orientation:"vertical",size:"md",class:{wrapper:"mt-1.5 pb-6.5"}},{orientation:"vertical",size:"lg",class:{wrapper:"mt-2 pb-7"}},{orientation:"vertical",size:"xl",class:{wrapper:"mt-2.5 pb-7.5"}},{orientation:"vertical",size:"2xl",class:{wrapper:"mt-3 pb-8"}},{orientation:"vertical",size:"3xl",class:{wrapper:"mt-3.5 pb-8.5"}}],defaultVariants:{size:"md",color:"primary"}},cC=["data-state","onClick"],dC={__name:"UTimeline",props:xn({as:{type:null,required:!1},items:{type:Array,required:!0},size:{type:null,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},valueKey:{type:null,required:!1,default:"value"},defaultValue:{type:[String,Number],required:!1},reverse:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},{modelValue:{type:[String,Number]},modelModifiers:{}}),emits:xn(["select"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=e,o=so(),s=Gn("timeline",n),i=Re(t,"modelValue"),l=Kn(),a=$(()=>gt({extend:gt(uC),...l.ui?.timeline||{}})({orientation:s.orientation,size:s.size,color:s.color,reverse:s.reverse})),u=$(()=>{const p=i.value??s.defaultValue;return typeof p=="string"?s.items.findIndex(m=>Fn(m,s.valueKey)===p)??-1:s.reverse?p!=null?s.items.length-1-p:-1:p??-1});function c(p){if(u.value!==-1)return p===u.value?"active":s.reverse?p>u.value?"completed":void 0:p<u.value?"completed":void 0}function d(p,m){r("select",p,m)}return(p,m)=>(b(),O(f(qe),{as:f(s).as,"data-orientation":f(s).orientation,"data-slot":"root",class:K(a.value.root({class:[f(s).ui?.root,f(s).class]}))},{default:S(()=>[(b(!0),_(W,null,de(f(s).items,(h,g)=>(b(),_("div",{key:g,"data-slot":"item",class:K(a.value.item({class:[f(s).ui?.item,h.ui?.item,h.class]})),"data-state":c(g),onClick:y=>d(y,h)},[w("div",{"data-slot":"container",class:K(a.value.container({class:[f(s).ui?.container,h.ui?.container]}))},[A(jr,Ce({size:f(s).size,icon:h.icon},{ref_for:!0},typeof h.avatar=="object"?h.avatar:{},{"data-slot":"indicator",class:a.value.indicator({class:[f(s).ui?.indicator,h.ui?.indicator]}),ui:{icon:"text-inherit",fallback:"text-inherit"}}),{default:S(()=>[ie(p.$slots,h.slot?`${h.slot}-indicator`:"indicator",{item:h})]),_:2},1040,["size","icon","class"]),g<f(s).items.length-1?(b(),O(f(am),{key:0,"data-slot":"separator",class:K(a.value.separator({class:[f(s).ui?.separator,h.ui?.separator]})),orientation:f(s).orientation},null,8,["class","orientation"])):T("",!0)],2),w("div",{"data-slot":"wrapper",class:K(a.value.wrapper({class:[f(s).ui?.wrapper,h.ui?.wrapper]}))},[ie(p.$slots,h.slot?`${h.slot}-wrapper`:"wrapper",{item:h},()=>[h.date||o[h.slot?`${h.slot}-date`:"date"]?(b(),_("div",{key:0,"data-slot":"date",class:K(a.value.date({class:[f(s).ui?.date,h.ui?.date]}))},[ie(p.$slots,h.slot?`${h.slot}-date`:"date",{item:h},()=>[ne(E(h.date),1)])],2)):T("",!0),h.title||o[h.slot?`${h.slot}-title`:"title"]?(b(),_("div",{key:1,"data-slot":"title",class:K(a.value.title({class:[f(s).ui?.title,h.ui?.title]}))},[ie(p.$slots,h.slot?`${h.slot}-title`:"title",{item:h},()=>[ne(E(h.title),1)])],2)):T("",!0),h.description||o[h.slot?`${h.slot}-description`:"description"]?(b(),_("div",{key:2,"data-slot":"description",class:K(a.value.description({class:[f(s).ui?.description,h.ui?.description]}))},[ie(p.$slots,h.slot?`${h.slot}-description`:"description",{item:h},()=>[ne(E(h.description),1)])],2)):T("",!0)])],2)],10,cC))),128))]),_:3},8,["as","data-orientation","class"]))}};function qs(t="editor_nodes",e=1){const n=[`${t}.*`,`${t}.item:link.*`,`${t}.item:link.page.*`,`${t}.item:link.page.translations.*`,`${t}.item:link.news.*`,`${t}.item:link.news.translations.*`,`${t}.item:link.member.id`,`${t}.item:link.member.first_name`,`${t}.item:link.member.last_name`,`${t}.item:link.download.*`,`${t}.item:link.download.translations.*`,`${t}.item:email.email_encrypted`,`${t}.item:email.title`,`${t}.item:file_list.*`,`${t}.item:file_list.files.directus_files_id.*`,`${t}.item:files_accordion.*`,`${t}.item:files_accordion.files.directus_files_id.*`,`${t}.item:definition_list.*`,`${t}.item:kader.*`,`${t}.item:kader.special_list.*`,`${t}.item:kader.special_list.members.*`,`${t}.item:kader.special_list.members.members_id.*`,`${t}.item:kader.special_list.members.members_id.clubs.clubs_id.*`];return e>0&&n.push(`${t}.item:accordion.*`,`${t}.item:accordion.items.*`,...qs(`${t}.item:accordion.items.editor_nodes`,e-1)),n}function fC(){return qs("editor_nodes",1)}function pC(){return{editor_nodes:{"item:kader":{special_list:{members:{_sort:"members_id.last_name,members_id.first_name"}}},"item:accordion":{items:{editor_nodes:{"item:kader":{special_list:{members:{_sort:"members_id.last_name,members_id.first_name"}}}}}}}}}function Ca(t=2,e=["id","collection"]){return[...e,...Pf(t)]}function mC(t=2){return Ca(t,["id","collection","sort"])}function hC(){return[{blocks:Ca()}]}function Pf(t=2){return[...yC(),...xC(),...CC(),...vC(),...wC(),..._C(),...kC(),...AC(),...EC(t),...gC(),...bC(t),...DC(),...SC(),...FC(),...BC(),...RC()]}function gC(){return["item:block_news.*","item:block_news.translations.*","item:block_news.tags.*","item:block_news.tags.news_tags_id.*","item:block_news.tags.news_tags_id.translations.*"]}function bC(t){const e=t>0?mC(t-1):["id","collection","sort"];return["item:block_layout.*",{"item:block_layout.blocks_0":e},{"item:block_layout.blocks_1":e},{"item:block_layout.blocks_2":e},{"item:block_layout.blocks_3":e}]}function yC(){return["item:block_calendar.*","item:block_calendar.translations.*"]}function vC(){return["item:block_ebook.*","item:block_ebook.pdf.id","item:block_ebook.pdf.title","item:block_ebook.pdf.filename_download","item:block_ebook.pdf.filesize"]}function xC(){return["item:block_shortcuts.*","item:block_shortcuts.items.*","item:block_shortcuts.items.page.*","item:block_shortcuts.items.page.translations.*"]}function CC(){return["item:block_commission.*","item:block_commission.translations.*","item:block_commission.items.*","item:block_commission.commission.*","item:block_commission.contacts.*"]}function wC(){return["item:block_images.*","item:block_images.items.*","item:block_images.items.directus_files_id.*","item:block_images.items.directus_files_id.translations.*"]}function _C(){return["item:block_gallery.*","item:block_gallery.items.*"]}function kC(){return["item:block_linklist.*","item:block_linklist.translations.*","item:block_linklist.links.*","item:block_linklist.links.page.id","item:block_linklist.links.page.title","item:block_linklist.links.page.slug","item:block_linklist.links.page.translations.id","item:block_linklist.links.page.translations.languages_code","item:block_linklist.links.page.translations.title","item:block_linklist.links.news.id","item:block_linklist.links.news.title","item:block_linklist.links.news.slug","item:block_linklist.links.news.translations.id","item:block_linklist.links.news.translations.languages_code","item:block_linklist.links.news.translations.title","item:block_linklist.links.member.id","item:block_linklist.links.member.first_name","
22item:block_linklist.links.member.last_name","item:block_linklist.links.files.*","item:block_linklist.links.files.directus_files_id.id","item:block_linklist.links.files.directus_files_id.sort","item:block_linklist.links.files.directus_files_id.title","item:block_linklist.links.files.directus_files_id.filename_download","item:block_linklist.links.files.directus_files_id.filesize","item:block_linklist.links.files.directus_files_id.type","item:block_linklist.links.files.directus_files_id.translations.id","item:block_linklist.links.files.directus_files_id.translations.languages_code","item:block_linklist.links.files.directus_files_id.translations.title","item:block_linklist.links.translations.*","item:block_linklist.links.translations.files.*","item:block_linklist.links.translations.files.directus_files_id.id","item:block_linklist.links.translations.files.directus_files_id.sort","item:block_linklist.links.translations.files.directus_files_id.title","item:block_linklist.links.translations.files.directus_files_id.filename_download","item:block_linklist.links.translations.files.directus_files_id.filesize","item:block_linklist.links.translations.files.directus_files_id.type","item:block_linklist.links.translations.files.directus_files_id.translations.id","item:block_linklist.links.translations.files.directus_files_id.translations.languages_code","item:block_linklist.links.translations.files.directus_files_id.translations.title"]}function AC(){return["item:block_content.*",...qs("item:block_content.editor_nodes",1),"item:block_content.translations.*",...qs("item:block_content.translations.editor_nodes",1)]}function DC(){return["item:block_richtext.*","item:block_richtext.translations.*"]}function SC(){return["item:block_code.*","item:block_code.translations.*"]}function EC(t){return["item:block_accordion.*","item:block_accordion.items.*","item:block_accordion.items.translations.*",{"item:block_accordion.items.blocks":t>0?Ca(t-1):["id","collection"]}]}function FC(){return["item:block_member.*"]}function BC(){return["item:block_tournament.*"]}function RC(){return["item:block_people.*","item:block_people.squads.*","item:block_people.squads.special_lists_id","item:block_people.officials.*","item:block_people.officials.commissions_officials_id","item:block_people.officials.commissions_officials_id.id","item:block_people.officials.commissions_officials_id.role","item:block_people.officials.commissions_officials_id.sort","item:block_people.officials.commissions_officials_id.translations.id","item:block_people.officials.commissions_officials_id.translations.languages_code","item:block_people.officials.commissions_officials_id.translations.role","item:block_people.officials.commissions_officials_id.officials_id","item:block_people.officials.commissions_officials_id.officials_id.id","item:block_people.officials.commissions_officials_id.officials_id.first_name","item:block_people.officials.commissions_officials_id.officials_id.last_name","item:block_people.officials.commissions_officials_id.officials_id.image"]}function MC(){return{getBlocksFields:hC,getBlocksFieldsIntern:Pf,getFlexibleEditorFields:fC,getFlexibleEditorDeep:pC}}const TC={class:"font-mono"},$C={class:"font-semibold"},IC={class:"mt-0"},LC={key:1,class:"mt-2 text-sm text-red-600"},OC=J({__name:"ShortMessagesList",props:{tags:{},limit:{}},async setup(t){let e,n;const{locale:r}=Le(),{formatDate:o}=rn(),{getFlexibleEditorFields:s}=MC();function i(){if(t.tags&&t.tags.length>0)return{tag:{_eq:t.tags[0].news_tag_id}}}const{$directus:l,$readItems:a}=ot(),u=H(1),c=H([]),d=H(null),p=H(!1),m=H(null),h=$(()=>d.value==null?c.value.length===u.value*t.limit:c.value.length<d.value);async function g(C){p.value=!0,m.value=null;try{const x=await l.request(a("shortmessages",{fields:["id","title","date",...s()],sort:["-date"],page:C,filter:i(),limit:t.limit,meta:"filter_count"})),k=Array.isArray(x)?x:x?.data??[],D=x?.meta?.filter_count??x?.meta?.filterCount??null;typeof D=="number"&&(d.value=D),C===1?c.value=k:c.value=[...c.value,...k]}catch(x){m.value=x}finally{p.value=!1}}[e,n]=Qe(()=>g(1)),await e,n();async function y(){p.value||!h.value||(u.value+=1,await g(u.value))}const v=$(()=>c.value.map(C=>({title:C.title??"",description:C.content??"",date:C.date,icon:"i-lucide-message-square-text",active:!0,content:C.content??void 0,editor_nodes:C.editor_nodes??void 0})));return(C,x)=>{const k=dC,D=Ae;return b(),_("div",null,[w("h2",null,E(),1),A(k,{items:f(v),color:"primary",ui:{wrapper:"pb-0"}},{date:S(({item:F})=>[w("span",TC,E(f(o)(F.date)),1)]),title:S(({item:F})=>[w("span",$C,E(F.title),1)]),description:S(({item:F})=>[A(xa,{content:F.content,nodes:F.editor_nodes},null,8,["content","nodes"])]),_:1},8,["items"]),w("div",IC,[f(h)?(b(),O(D,{key:0,class:"text-sm underline disabled:opacity-50 cursor-pointer",disabled:f(p),variant:"link","trailing-icon":"i-lucide-chevron-down",color:"neutral",onClick:y},{default:S(()=>[ne(E(f(p)?"lädt...":"weitere anzeigen"),1)]),_:1},8,["disabled"])):T("",!0),f(m)?(b(),_("div",LC," Fehler beim Laden ")):T("",!0)])])}}}),NC=Object.assign(OC,{__name:"Lucerne360BlocksShortmessagesShortMessagesList"}),qC={key:0},zC={key:1},PC={key:2},VC=J({__name:"News",props:{id:{},type:{},tags:{},feed:{},tags_connect:{},limit:{},title:{},translations:{}},setup(t){return(e,n)=>(b(),_(W,null,[t.type==="top"?(b(),_("div",qC,[A(Ix,{tags:t.tags,tags_connect:t.tags_connect},null,8,["tags","tags_connect"])])):T("",!0),t.type==="shortmessages-list"?(b(),_("div",zC,[A(NC,{limit:t.limit,tags:t.tags},null,8,["limit","tags"])])):t.type==="list"?(b(),_("div",PC,[A(aC,{limit:t.limit,tags:t.tags,tags_connect:t.tags_connect,title:t.title,feed:t.feed,translations:t.translations},null,8,["limit","tags","tags_connect","title","feed","translations"])])):T("",!0)],64))}}),jC=Object.assign(VC,{__name:"Lucerne360BlocksNews"}),HC={key:0,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"}
22,UC={key:1,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"},GC={key:2,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 gap-4"},KC={key:3,class:"grid grid-cols-3 gap-6"},WC={class:"col-span-3 md:col-span-2"},JC={class:"col-span-3 md:col-span-1"},YC=J({__name:"Layout",props:{id:{},type:{},blocks_0:{},blocks_1:{},blocks_2:{},blocks_3:{}},setup(t){const e=t,n=$(()=>e.blocks_0??[]),r=$(()=>e.blocks_1??[]),o=$(()=>e.blocks_2??[]),s=$(()=>e.blocks_3??[]);return(i,l)=>(b(),_("div",null,[t.type==="1-1-1-1"?(b(),_("div",HC,[w("div",null,[A(Et,{blocks:f(n)},null,8,["blocks"])]),w("div",null,[A(Et,{blocks:f(r)},null,8,["blocks"])]),w("div",null,[A(Et,{blocks:f(o)},null,8,["blocks"])]),w("div",null,[A(Et,{blocks:f(s)},null,8,["blocks"])])])):T("",!0),t.type==="1-1-1"?(b(),_("div",UC,[w("div",null,[A(Et,{blocks:f(n)},null,8,["blocks"])]),w("div",null,[A(Et,{blocks:f(r)},null,8,["blocks"])]),w("div",null,[A(Et,{blocks:f(o)},null,8,["blocks"])])])):T("",!0),t.type==="1-1"?(b(),_("div",GC,[w("div",null,[A(Et,{blocks:f(n)},null,8,["blocks"])]),w("div",null,[A(Et,{blocks:f(r)},null,8,["blocks"])])])):T("",!0),t.type==="3-1"?(b(),_("div",KC,[w("div",WC,[A(Et,{blocks:f(n)},null,8,["blocks"])]),w("div",JC,[A(Et,{blocks:f(r)},null,8,["blocks"])])])):T("",!0)]))}}),QC=Object.assign(YC,{__name:"Lucerne360BlocksLayout"}),ZC={class:"grid"},XC={class:"bg-white rounded-xl"},ew=["src"],tw=["href"],nw={class:"bg-white rounded-xl"},rw=["src"],ow=J({__name:"Shortcuts",props:{items:{}},setup(t){return(e,n)=>{const r=nn,o=zs;return b(),_("div",ZC,[A(o,{items:t.items,ui:{item:"basis-1/2 lg:basis-1/4"},class:"w-full mx-auto lg:mt-4"},{default:S(({item:s})=>[s.type==="Page"?(b(),O(r,{key:0,to:s.type==="Page"?s.page?.slug:s.url},{default:S(()=>[w("div",XC,[w("img",{src:"/lucerne360/assets/"+s.image,class:"rounded-xl"},null,8,ew)])]),_:2},1032,["to"])):(b(),_("a",{key:1,href:s.url,target:"_blank"},[w("div",nw,[w("img",{src:"/lucerne360/assets/"+s.image,class:"rounded-xl"},null,8,rw)])],8,tw))]),_:1},8,["items"])])}}}),sw=Object.assign(ow,{__name:"Lucerne360BlocksShortcuts"}),iw=["onClick"],lw=["src","alt"],aw={key:1,class:"inline-block"},uw=["src","alt"],cw={class:"p-3"},dw=["src","alt"],fw={class:"mt-3 flex items-center justify-between"},pw={class:"text-xs opacity-70"},mw=J({__name:"Gallery",props:{id:{},title:{},items:{}},setup(t){const e=H(!1),n=H(0);function r(o){n.value=o,e.value=!0}return(o,s)=>{const i=zs,l=Ae,a=_n;return b(),_(W,null,[t.items.length>1?(b(),O(i,{key:0,prev:{variant:"soft"},next:{variant:"soft"},items:t.items,ui:{item:"basis-full ps-0 pe-2 sm:basis-1/2 md:basis-1/3 lg:basis-1/4",prev:"sm:start-8",next:"sm:end-8",container:"ms-0"},class:"w-full",indicators:"",arrows:""},{default:S(({item:u,index:c})=>[w("div",{class:"relative group w-full overflow-hidden rounded-lg hover:cursor-pointer",onClick:d=>r(c)},[w("img",{src:"/lucerne360/assets/"+u.directus_file,alt:u.alt||"",class:"h-40 w-full object-cover transition group-hover:brightness-75",loading:"lazy"},null,8,lw),s[4]||(s[4]=w("div",{class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-200 bg-black/20"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[w("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z"})])],-1))],8,iw)]),_:1},8,["items"])):(b(),_("div",aw,[w("div",{class:"relative group cursor-pointer overflow-hidden rounded-lg w-auto",onClick:s[0]||(s[0]=u=>r(0))},[w("img",{src:"/lucerne360/assets/"+t.items[0].directus_file,alt:t.items[0].alt||"",class:"h-50 object-cover rounded-lg transition duration-200 hover:brightness-75",loading:"lazy"},null,8,uw),s[5]||(s[5]=w("div",{class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-200 bg-black/20 w-auto"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[w("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z"})])],-1))])])),A(a,{open:f(e),"onUpdate:open":s[3]||(s[3]=u=>ke(e)?e.value=u:null),ui:{width:"sm:max-w-5xl"},"close-icon":"i-lucide-arrow-right"},{content:S(()=>[w("div",cw,[w("img",{src:"/lucerne360/assets/"+t.items[f(n)]?.directus_file,alt:t.items[f(n)]?.alt||"",class:"max-h-[80vh] w-full object-contain rounded-lg"},null,8,dw),w("div",fw,[A(l,{avatar:{icon:"iconify i-lucide:arrow-left"},size:"md",color:"neutral",variant:"soft",class:"rounded-full",disabled:f(n)===0,onClick:s[1]||(s[1]=u=>n.value--)},null,8,["disabled"]),w("div",pw,E(f(n)+1)+" / "+E(t.items.length),1),A(l,{avatar:{icon:"iconify i-lucide:arrow-right"},size:"md",color:"neutral",variant:"soft",class:"rounded-full",disabled:f(n)===t.items.length-1,onClick:s[2]||(s[2]=u=>n.value++)},null,8,["disabled"])])])]),_:1},8,["open"])],64)}}}),hw=Object.assign(mw,{__name:"Lucerne360BlocksGallery"}),gw={key:0,class:"py-1"},bw={key:0,class:"pt-3 pb-1 text-sm font-semibold"},yw={key:1,class:"space-y-2 py-1"},vw={key:2,class:"py-1 text-sm text-red-600"},xw={key:3},Cw=J({__name:"FolderFiles",props:{item:{},background:{default:"light"}},async setup(t){let e,n;const r=t,{humanFileSize:o}=rn(),{pick:s}=Se(),{locale:i,t:l}=Le(),a=$(()=>y(g(r.item))),u=$(()=>s(r.item,"title")||""),c=$(()=>r.background==="dark"?"primary":"normal"),{data:d,pending:p,error:m}=([e,n]=Qe(()=>bt(`link-folder-files:${r.item?.id??"unknown"}`,async()=>a.value?$fetch("/api/files/folder",{query:{folder:a.value}}):{folder:"",files:[]},{watch:[a]})),e=await e,n(),e),h=$(()=>[...d.value?.files??[]].sort(x));function g(D){const F=D?.translations?.find(B=>B.languages_code===i.value);return F?.folder??F?.folders??D?.folder??D?.folders}function y(D){return D?String(typeof D=="object"?D.id??"":D):""}function v(D){return s(D,"title")||D.filename_download||D.id}function C(D){return`/lucerne360/assets/${D.id}/${D.filename_download??D.id}?download`}function x(D,F){const B=r.item?.sorting?.toLowerCase()==="za"?-1:1,R=k(D)-k(F);return R!==0?R*B:v(D).localeCompare(v(F),i.value||"de-CH")*B}function k(D){const F=Number(D?.sort);return Number.isFinite(F)?F:Number.MAX_SAFE_INTEGER}return(D,F)=>{const B=Bl,R=Ae,q=Ps;return f(a)?(b(),_("div",gw,[f(u)?(b(),_("div",bw,E(f(u)),1)):T("",!0),f(p)?(b(),_("div",yw,[A(B,{class:"h-5 w-64"}),A(B,{class:"h-5 w-52"})])):f(m)?(b(),_("div",vw,E(f(l)("linkList.folderLoadFailed")),1)):(b(),_("div",xw,[(b(!0),_(W,null,de(f(h),N=>(b(),_("div",{key:N.id},[A(q,{to:C(N),external:"",class:"text-left"},{default:S(()=>[A(R,{icon:"i-lucide-download",size:"xl",color:f(c),variant:"solid",class:"p-0 text-sm hover:cursor-pointer underline hover:no-underline py-1 text-left"},{default:S(()=>[ne(E(v(N)),1),N.filesize?(b(),_(W,{key:0},[ne(" ("+E(f(o)(N.filesize))+")",1)],64)):T("",!0)]),_:2},1032,["color"])]),_:2},1032,["to"])]))),128))]))])):T("",!0)}}}),ww=Object.assign(Cw,{__name:"Lucerne360BlocksLinksFolderFiles"}),_w={key:0,class:"pb-2"},kw={key:0,class:"font-bold text-lg"},Aw={key:1,class:"pb-2"},Dw={key:0},Sw={key:1},Ew={key:2}
22,Fw={key:0,class:"pt-3 pb-1 text-sm font-semibold"},Bw={key:4},Rw={key:5},Mw=J({__name:"Links",props:{id:{},title:{},description:{},translations:{default:()=>[]},links:{default:()=>[]},background:{default:"light"}},setup(t){const e=t,{humanFileSize:n}=rn(),{pick:r,pickT:o}=Se(),{getMemberLink:s,getNewsLink:i,getSafeLink:l}=Ut(),{locale:a}=Le(),u=$(()=>[...e.links??[]].sort((C,x)=>h(C)-h(x)));function c(C,x){return r(C,"title")||x||""}function d(C){const x=C.translations?.find(D=>D.languages_code===a.value)?.files,k=Array.isArray(x)&&x.length>0?x:C.files;return Array.isArray(k)?k.map(D=>D?.directus_files_id??D).filter(D=>D?.id).sort((D,F)=>g(D,F,C.sorting)):[]}function p(C,x,k){const D=c(C);return D&&k===1?D:r(x,"title")||x.filename_download||D}function m(C){return`/lucerne360/assets/${C.id}/${C.filename_download}?download`}function h(C){return Number.isFinite(Number(C?.sort))?Number(C.sort):0}function g(C,x,k){const D=k?.toLowerCase()==="za"?-1:1,F=y(C)-y(x);return F!==0?F*D:v(C).localeCompare(v(x),a.value||"de-CH")*D}function y(C){const x=Number(C?.sort);return Number.isFinite(x)?x:Number.MAX_SAFE_INTEGER}function v(C){return r(C,"title")||C?.filename_download||C?.id||""}return(C,x)=>{const k=Ae,D=nn,F=Ps;return b(),_("div",{class:K(["rounded-lg p-4 my-4 pb-8 lg:p-6",t.background==="dark"?"bg-primary text-white":"bg-gray-100"])},[t.title||t.description?(b(),_("div",_w,[t.title?(b(),_("div",kw,E(f(o)(t.translations,t.title,"title")),1)):T("",!0),t.description?(b(),_("div",Aw,E(f(o)(t.translations,t.description,"description")),1)):T("",!0)])):T("",!0),(b(!0),_(W,null,de(f(u),B=>(b(),_(W,{key:B.id},[B.type==="page"&&B.page?(b(),_("div",Dw,[A(D,{to:B.page?.slug,class:"text-left"},{default:S(()=>[A(k,{icon:"i-lucide-link",size:"xl",color:t.background==="dark"?"primary":"normal",variant:"solid",class:"p-0 text-sm hover:cursor-pointer underline hover:no-underline py-1 text-left"},{default:S(()=>[ne(E(c(B,f(r)(B.page,"title"))),1)]),_:2},1032,["color"])]),_:2},1032,["to"])])):T("",!0),B.type==="external"&&f(r)(B,"external")?(b(),_("div",Sw,[A(F,{to:f(l)(f(r)(B,"external")),external:"",target:"_blank",class:"text-left"},{default:S(()=>[A(k,{icon:"i-lucide-external-link",size:"xl",color:t.background==="dark"?"primary":"normal",variant:"solid",class:"p-0 text-sm hover:cursor-pointer underline hover:no-underline py-1 text-left"},{default:S(()=>[ne(E(c(B,f(r)(B,"external"))),1)]),_:2},1032,["color"])]),_:2},1032,["to"])])):T("",!0),B.type==="files"&&d(B).length?(b(),_("div",Ew,[c(B)&&d(B).length>1?(b(),_("div",Fw,E(c(B)),1)):T("",!0),(b(!0),_(W,null,de(d(B),R=>(b(),_("div",{key:R.id},[A(F,{to:m(R),external:"",class:"text-left"},{default:S(()=>[A(k,{icon:"i-lucide-download",size:"xl",color:t.background==="dark"?"primary":"normal",variant:"solid",class:"p-0 text-sm hover:cursor-pointer underline hover:no-underline py-1 text-left"},{default:S(()=>[ne(E(p(B,R,d(B).length))+" ("+E(f(n)(R.filesize))+")",1)]),_:2},1032,["color"])]),_:2},1032,["to"])]))),128))])):T("",!0),B.type==="folder"?(b(),O(ww,{key:3,item:B,background:t.background},null,8,["item","background"])):T("",!0),B.type==="news"&&B.news?(b(),_("div",Bw,[A(D,{to:f(i)(B.news)},{default:S(()=>[A(k,{icon:"i-lucide-newspaper",size:"xl",color:t.background==="dark"?"primary":"normal",variant:"solid",class:"p-0 text-sm hover:cursor-pointer underline hover:no-underline py-1"},{default:S(()=>[ne(E(c(B,f(r)(B.news,"title"))),1)]),_:2},1032,["color"])]),_:2},1032,["to"])])):T("",!0),B.type==="member"&&B.member?(b(),_("div",Rw,[A(D,{to:f(s)(B.member)},{default:S(()=>[A(k,{icon:"i-lucide-user",size:"xl",color:t.background==="dark"?"primary":"normal",variant:"solid",class:"p-0 text-sm hover:cursor-pointer underline hover:no-underline py-1"},{default:S(()=>[ne(E(c(B,`${B.member.first_name??""} ${B.member.last_name??""}`.trim())),1)]),_:2},1032,["color"])]),_:2},1032,["to"])])):T("",!0)],64))),128))],2)}}}),Tw=Object.assign(Mw,{__name:"Lucerne360BlocksLinks"});var Fr={exports:{}};var $w=Fr.exports,Yu;function Iw(){return Yu||(Yu=1,(function(t,e){(function(n){var r=e,o=t&&t.exports==r&&t,s=typeof Ia=="object"&&Ia;(s.global===s||s.window===s)&&(n=s);var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[\x01-\x7F]/g,a=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,u=/<\u20D2|=\u20E5|>
22\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","	
vendor: 12,149 bytes, line 22
22":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"ap
vendor: 8,150 bytes, line 22
22acir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr",ª:"ordf",á:"aacute",Á:"Aacute",à:"agrave",À:"Agrave",ă:"abreve",Ă:"Abreve",â:"acirc",Â:"Acirc",å:"aring",Å:"angst",ä:"auml",Ä:"Auml",ã:"atilde",Ã:"Atilde",ą:"aogon",Ą:"Aogon",ā:"amacr",Ā:"Amacr",æ:"aelig",Æ:"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf",ℬ:"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf",ℭ:"Cfr","𝒞":"Cscr",ℂ:"Copf",ć:"cacute",Ć:"Cacute",ĉ:"ccirc",Ĉ:"Ccirc",č:"ccaron",Č:"Ccaron",ċ:"cdot",Ċ:"Cdot",ç:"ccedil",Ç:"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf",ď:"dcaron",Ď:"Dcaron",đ:"dstrok",Đ:"Dstrok",ð:"eth",Ð:"ETH","ⅇ":"ee",ℯ:"escr","𝔢":"efr","𝕖":"eopf",ℰ:"Escr","𝔈":"Efr","𝔼":"Eopf",é:"eacute",É:"Eacute",è:"egrave",È:"Egrave",ê:"ecirc",Ê:"Ecirc",ě:"ecaron",Ě:"Ecaron",ë:"euml",Ë:"Euml",ė:"edot",Ė:"Edot",ę:"eogon",Ę:"Eogon",ē:"emacr",Ē:"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf",ℱ:"Fscr",ff:"fflig",ffi:"ffilig",ffl:"ffllig",fi:"filig",fj:"fjlig",fl:"fllig",ƒ:"fnof",ℊ:"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr",ǵ:"gacute",ğ:"gbreve",Ğ:"Gbreve",ĝ:"gcirc",Ĝ:"Gcirc",ġ:"gdot",Ġ:"Gdot",Ģ:"Gcedil","𝔥":"hfr",ℎ:"planckh","𝒽":"hscr","𝕙":"hopf",ℋ:"Hscr",ℌ:"Hfr",ℍ:"Hopf",ĥ:"hcirc",Ĥ:"Hcirc",ℏ:"hbar",ħ:"hstrok",Ħ:"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf",ℐ:"Iscr",ℑ:"Im",í:"iacute",Í:"Iacute",ì:"igrave",Ì:"Igrave",î:"icirc",Î:"Icirc",ï:"iuml",Ï:"Iuml",ĩ:"itilde",Ĩ:"Itilde",İ:"Idot",į:"iogon",Į:"Iogon",ī:"imacr",Ī:"Imacr",ij:"ijlig",IJ:"IJlig",ı:"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf",ĵ:"jcirc",Ĵ:"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr",ķ:"kcedil",Ķ:"Kcedil","𝔩":"lfr","𝓁":"lscr",ℓ:"ell","𝕝":"lopf",ℒ:"Lscr","𝔏":"Lfr","𝕃":"Lopf",ĺ:"lacute",Ĺ:"Lacute",ľ:"lcaron",Ľ:"Lcaron",ļ:"lcedil",Ļ:"Lcedil",ł:"lstrok",Ł:"Lstrok",ŀ:"lmidot",Ŀ:"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf",ℳ:"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr",ℕ:"Nopf","𝒩":"Nscr","𝔑":"Nfr",ń:"nacute",Ń:"Nacute",ň:"ncaron",Ň:"Ncaron",ñ:"ntilde",Ñ:"Ntilde",ņ:"ncedil",Ņ:"Ncedil","№":"numero",ŋ:"eng",Ŋ:"ENG","𝕠":"oopf","𝔬":"ofr",ℴ:"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf",º:"ordm",ó:"oacute",Ó:"Oacute",ò:"ograve",Ò:"Ograve",ô:"ocirc",Ô:"Ocirc",ö:"ouml",Ö:"Ouml",ő:"odblac",Ő:"Odblac",õ:"otilde",Õ:"Otilde",ø:"oslash",Ø:"Oslash",ō:"omacr",Ō:"Omacr",œ:"oelig",Œ:"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf",ℙ:"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr",ℚ:"Qopf",ĸ:"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr",ℛ:"Rscr",ℜ:"Re",ℝ:"Ropf",ŕ:"racute",Ŕ:"Racute",ř:"rcaron",Ř:"Rcaron",ŗ:"rcedil",Ŗ:"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS",ś:"sacute",Ś:"Sacute",ŝ:"scirc",Ŝ:"Scirc",š:"scaron",Š:"Scaron",ş:"scedil",Ş:"Scedil",ß:"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf",ť:"tcaron",Ť:"Tcaron",ţ:"tcedil",Ţ:"Tcedil","™":"trade",ŧ:"tstrok",Ŧ:"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr",ú:"uacute",Ú:"Uacute",ù:"ugrave",Ù:"Ugrave",ŭ:"ubreve",Ŭ:"Ubreve",û:"ucirc",Û:"Ucirc",ů:"uring",Ů:"Uring",ü:"uuml",Ü:"Uuml",ű:"udblac",Ű:"Udblac",ũ:"utilde",Ũ:"Utilde",ų:"uogon",Ų:"Uogon",ū:"umacr",Ū:"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr",ŵ:"wcirc",Ŵ:"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf",ý:"yacute",Ý:"Yacute",ŷ:"ycirc",Ŷ:"Ycirc",ÿ:"yuml",Ÿ:"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf",ℨ:"Zfr",ℤ:"Zopf","𝒵":"Zscr",ź:"zacute",Ź:"Zacute",ž:"zcaron",Ž:"Zcaron",ż:"zdot",Ż:"Zdot",Ƶ:"imped",þ:"thorn",Þ:"THORN",ʼn:"napos",α:"alpha",Α:"Alpha",β:"beta",Β:"Beta",γ:"gamma",Γ:"Gamma",δ:"delta",Δ:"Delta",ε:"epsi","ϵ":"epsiv",Ε:"Epsilon",ϝ:"gammad",Ϝ:"Gammad",ζ:"zeta",Ζ:"Zeta",η:"eta",Η:"Eta",θ:"theta",ϑ:"thetav",Θ:"Theta",ι:"iota",Ι:"Iota",κ:"kappa",ϰ:"kappav",Κ:"Kappa",λ:"lambda",Λ:"Lambda",μ:"mu",µ:"micro",Μ:"Mu",ν:"nu",Ν:"Nu",ξ:"xi",Ξ:"Xi",ο:"omicron",Ο:"Omicron",π:"pi",ϖ:"piv",Π:"Pi",ρ:"rho",ϱ:"rhov",Ρ:"Rho",σ:"sigma",Σ:"Sigma",ς:"sigmaf",τ:"tau",Τ:"Tau",υ:"upsi",Υ:"Upsilon",ϒ:"Upsi",φ:"phi",ϕ:"phiv",Φ:"Phi",χ:"chi",Χ:"Chi",ψ:"psi",Ψ:"Psi",ω:"omega",Ω:"ohm",а:"acy",А:"Acy",б:"bcy",Б:"Bcy",в:"vcy",В:"Vcy",г:"gcy",Г:"Gcy",ѓ:"gjcy",Ѓ:"GJcy",д:"dcy",Д:"Dcy",ђ:"djcy",Ђ:"DJcy",е:"iecy",Е:"IEcy",ё:"iocy",Ё:"IOcy",є:"jukcy",Є:"Jukcy",ж:"zhcy",Ж:"ZHcy",з:"zcy",З:"Zcy",ѕ:"dscy",Ѕ:"DScy",и:"icy",И:"Icy",і:"iukcy",І:"Iukcy",ї:"yicy",Ї:"YIcy",й:"jcy",Й:"Jcy",ј:"jsercy",Ј:"Jsercy",к:"kcy",К:"Kcy",ќ:"kjcy",Ќ:"KJcy",л:"lcy",Л:"Lcy",љ:"ljcy",Љ:"LJcy",м:"mcy",М:"Mcy",н:"ncy",Н:"Ncy",њ:"njcy",Њ:"NJcy",о:"ocy",О:"Ocy",п:"pcy",П:"Pcy",р:"rcy",Р:"Rcy",с:"scy",С:"Scy",т:"tcy",Т:"Tcy",ћ:"tshcy",Ћ:"TSHcy",у:"ucy",У:"Ucy",ў:"ubrcy",Ў:"Ubrcy",ф:"fcy",Ф:"Fcy",х:"khcy",Х:"KHcy",ц:"tscy",Ц:"TScy",ч:"chcy",Ч:"CHcy",џ:"dzcy",Џ:"DZcy",ш:"shcy",Ш:"SHcy",щ:"shchcy",Щ:"SHCHcy",ъ:"hardcy",Ъ:"HARDcy",ы:"ycy",Ы:"Ycy",ь:"softcy",Ь:"SOFTcy",э:"ecy",Э:"Ecy",ю:"yucy",Ю:"YUcy",я:"yacy",Я:"YAcy",ℵ:"aleph",ℶ:"beth",ℷ:"gimel",ℸ:"daleth"},d=/["&'<>`]/g,
22p={'"':"&quot;","&":"&amp;","'":"&#x27;","<":"&lt;",">":"&gt;","`":"&#x60;"},m=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h
vendor: 17,081 bytes, line 22
22=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,
22y
vendor: 12,184 bytes, line 22
22={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"â©°",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"Ã¥",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"â«§",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"â§«",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"â«­",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"â©´",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"â©­",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"â©·",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"â§¶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"â©®",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"â©·",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"â§£",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"â§¥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ä¢",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"Ä¡",Gdot:"Ä ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"Ä¥",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"Ä«",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Ä®",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"Ä©",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ä´",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"È·",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"Ä·",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Ð¥",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ä»",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"â©¿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"â
vendor: 4,691 bytes, lines 22-23
22‹–",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ä¿",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"â§«",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"â©»",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"â«°",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
23`,nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"â
vendor: 6,268 bytes, line 23
23‹ ",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"â«®",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"â§´",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"Å¡",Scaron:"Å ",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",
vendor: 5,581 bytes, line 23
23solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"	",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},
23v={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},C={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},x=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],k=String.fromCharCode,D={},F=D.hasOwnProperty,B=function(L,I){return F.call(L,I)},R=function(L,I){for(var oe=-1,we=L.length;++oe<we;)if(L[oe]==I)return!0;return!1},q=function(L,I){if(!L)return I;var oe={},we;for(we in I)oe[we]=B(L,we)?L[we]:I[we];return oe},N=function(L,I){var oe="";return L>=55296&&L<=57343||L>1114111?(I&&G("character reference outside the permissible Unicode range"),"�"):B(C,L)?(I&&G("disallowed character reference"),C[L]):(I&&R(x,L)&&G("disallowed character reference"),L>65535&&(L-=65536,oe+=k(L>>>10&1023|55296),L=56320|L&1023),oe+=k(L),oe)},X=function(L){return"&#x"+L.toString(16).toUpperCase()+";"},V=function(L){return"&#"+L+";"},G=function(L){throw Error("Parse error: "+L)},Y=function(L,I){I=q(I,Y.options);var oe=I.strict;oe&&h.test(L)&&G("forbidden code point");var we=I.encodeEverything,Be=I.useNamedReferences,_e=I.allowUnsafeSymbols,it=I.decimal?V:X,We=function(Q){return it(Q.charCodeAt(0))};return we?(L=L.replace(l,function(Q){return Be&&B(c,Q)?"&"+c[Q]+";":We(Q)}),Be&&(L=L.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),Be&&(L=L.replace(u,function(Q){return"&"+c[Q]+";"}))):Be?(_e||(L=L.replace(d,function(Q){return"&"+c[Q]+";"})),L=L.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;"),L=L.replace(u,function(Q){return"&"+c[Q]+";"})):_e||(L=L.replace(d,We)),L.replace(i,function(Q){var yt=Q.charCodeAt(0),ft=Q.charCodeAt(1),M=(yt-55296)*1024+ft-56320+65536;return it(M)}).replace(a,We)};Y.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var ee=function(L,I){I=q(I,ee.options);var oe=I.strict;return oe&&m.test(L)&&G("malformed character reference"),L.replace(g,function(we,Be,_e,it,We,Q,yt,ft,M){var j,ae,z,ve,te,fe;return Be?(te=Be,y[te]):_e?(te=_e,fe=it,fe&&I.isAttributeValue?(oe&&fe=="="&&G("`&` did n
23ot start a character reference"),we):(oe&&G("named character reference was not terminated by a semicolon"),v[te]+(fe||""))):We?(z=We,ae=Q,oe&&!ae&&G("character reference was not terminated by a semicolon"),j=parseInt(z,10),N(j,oe)):yt?(ve=yt,ae=ft,oe&&!ae&&G("character reference was not terminated by a semicolon"),j=parseInt(ve,16),N(j,oe)):(oe&&G("named character reference was not terminated by a semicolon"),we)})};ee.options={isAttributeValue:!1,strict:!1};var ue=function(L){return L.replace(d,function(I){return p[I]})},le={version:"1.2.0",encode:Y,decode:ee,escape:ue,unescape:ee};if(r&&!r.nodeType)if(o)o.exports=le;else for(var ye in le)B(le,ye)&&(r[ye]=le[ye]);else n.he=le})($w)})(Fr,Fr.exports)),Fr.exports}var Lw=Iw();const li=Rp(Lw),Ow={key:0},Nw={key:0},qw={class:"text-xs"},zw={class:"font-bold"},Pw={key:1,class:"mt-4"},Vw={class:"text-xs"},jw={key:2,class:"mt-4"},Hw={class:"text-xs"},Uw={class:"flex gap-1"},Gw={key:3,class:"mt-4"},Kw={class:"text-xs"},Ww={class:"flex gap-1"},Jw={key:4,class:"mt-4"},Yw={class:"text-xs"},Qw=["href"],Zw={class:"text-primary underline"},Xw={key:5,class:"mt-4"},e_={class:"text-xs"},t_={key:6,class:"mt-4"},n_={class:"text-xs"},r_=J({__name:"EventDetails",props:["e"],setup(t){const{t:e,locale:n}=Le(),{pick:r}=Se();return(o,s)=>{const i=to,l=mt,a=nn;return t.e?(b(),_("div",Ow,[t.e.event_id.organizer?(b(),_("div",Nw,[w("div",qw,E(o.$t("Organisator")),1),w("div",zw,E(t.e.event_id.organizer),1)])):T("",!0),t.e.event_id.playing_venue?(b(),_("div",Pw,[w("div",Vw,E(o.$t("Adresse")),1),w("div",null,E(t.e.event_id.playing_venue),1),w("div",null,E(t.e.event_id.address),1),w("div",null,E(t.e.event_id.zip_code)+" "+E(t.e.event_id.city),1)])):T("",!0),t.e.event_id.timecontrol&&t.e.event_id.timecontrol.length?(b(),_("div",jw,[w("div",Hw,E(o.$t("Bedenkzeit")),1),w("div",null,[w("div",Uw,[(b(!0),_(W,null,de(t.e.event_id.timecontrol,u=>(b(),O(i,{icon:u.timecontrols_id.symbol,variant:"soft",label:u.timecontrols_id.title},null,8,["icon","label"]))),256))])])])):T("",!0),t.e.event_id.tags&&t.e.event_id.tags.length?(b(),_("div",Gw,[w("div",Kw,E(o.$t("Tags")),1),w("div",null,[w("div",Ww,[(b(!0),_(W,null,de(t.e.event_id.tags,u=>(b(),O(i,{variant:"soft",label:u.event_tags_id.title},null,8,["label"]))),256))])])])):T("",!0),t.e.event_id.type!=="no-link"?(b(),_("div",Jw,[w("div",Yw,E(o.$t("Link")),1),t.e.event_id.type==="url"&&t.e.event_id.url?(b(),_("a",{key:0,href:t.e.event_id.url,target:"_blank",class:"text-primary underline"},[s[0]||(s[0]=ne("Website ",-1)),A(l,{name:"i-lucide-external-link"})],8,Qw)):t.e.event_id.type==="page"&&t.e.event_id.page?(b(),O(a,{key:1,to:t.e.event_id.page.slug,target:"_blank",class:""},{default:S(()=>[w("span",Zw,E(f(r)(t.e.event_id.page,"title")),1)]),_:1},8,["to"])):T("",!0)])):T("",!0),t.e.event_id.files&&t.e.event_id.files.length?(b(),_("div",Xw,[w("div",e_,E(o.$t("Files")),1),(b(!0),_(W,null,de(t.e.event_id.files,u=>(b(),_("div",null,[A(va,{file:u.directus_files_id},null,8,["file"])]))),256))])):T("",!0),t.e.event_id.accessibility&&t.e.event_id.accessibility.length?(b(),_("div",t_,[w("div",n_,E(o.$t("Barrierenfreiheit")),1),(b(!0),_(W,null,de(t.e.event_id.accessibility,u=>(b(),_("div",null,[A(i,{variant:"soft",color:"neutral",size:"lg",icon:u.venue_accessibility_features_id?.symbol,label:u.venue_accessibility_features_id?.title,class:"mb-1"},null,8,["icon","label"])]))),256))])):T("",!0)])):T("",!0)}}}),ai=Object.assign(r_,{__name:"Lucerne360BlocksCalendarEventDetails"}),o_={class:""},s_={key:0,class:"relative overflow-x-auto"},i_={class:"flex flex-wrap justify-baseline"},l_={class:"w-full"},a_={class:"text-gray-500 text-sm"},u_={class:"w-full"},c_={class:"truncate cursor-pointer font-bold text-muted"},d_=J({__name:"EventList",props:{title:{},translations:{}},async setup(t){let e,n;const{decode:r}=li,{locale:o}=Le(),{pickT:s}=Se(),{formatRange:i}=rn();Wn().public.timeZone;const{$directus:a,$readItems:u}=ot(),c=new Date,d=c.getFullYear()+"-"+String(c.getMonth()+1).padStart(2,"0")+"-"+String(c.getDate()).padStart(2,"0"),{data:p}=([e,n]=Qe(()=>bt("next-events",async()=>a.request(u("event_items",{fields:["*","id","title","event_id.*","event_id.page.*","event_id.tags.*","event_id.tags.event_tags_id.*","event_id.organizer","event_id.playing_venue","event_id.address","event_id.zip_code","event_id.city","event_id.accessibility.*","event_id.accessibility.venue_accessibility_features_id.*","event_id.timecontrol.*","event_id.timecontrol.timecontrols_id.*"],sort:"start",limit:8,filter:{_and:[{start:{_gte:d}},{end:{_gte:d}}]}})))),e=await e,n(),e);function m(g){const y=g?.event_id?.title??"",v=g?.title??"";
23return h([y,v].filter(Boolean).join(" "))}function h(g){return r(g??"")}return(g,y)=>{const v=_n,C=Ks,x=Fl;return b(),O(x,{variant:"white",class:""},{header:S(()=>[ne(E(f(s)(t.translations,t.title,"title")),1)]),footer:S(()=>[...y[0]||(y[0]=[])]),default:S(()=>[w("div",o_,[f(p)?(b(),_("div",s_,[(b(!0),_(W,null,de(f(p),k=>(b(),_("div",i_,[w("div",l_,[w("span",a_,E(f(i)(k.start,k.end)),1)]),w("div",u_,[A(v,{title:m(k),description:f(i)(k.start,k.end)},{body:S(()=>[A(ai,{e:k},null,8,["e"])]),default:S(()=>[w("div",c_,E(m(k)),1)]),_:2},1032,["title","description"])]),A(C,{class:"pb-1"})]))),256))])):T("",!0)])]),_:1})}}}),f_=Object.assign(d_,{__name:"Lucerne360BlocksCalendarEventList"}),p_={class:""},m_={key:0,class:"relative overflow-x-auto"},h_={class:"flex flex-wrap justify-baseline"},g_={class:"w-full"},b_={class:"text-gray-500 text-sm"},y_={class:"w-full"},v_={class:"truncate cursor-pointer font-bold text-muted"},x_=J({__name:"EventListTagged",props:{title:{},tag:{},translations:{}},async setup(t){let e,n;const{decode:r}=li,{locale:o}=Le(),{pickT:s}=Se(),{formatRange:i}=rn(),l=t;Wn().public.timeZone;const{$directus:u,$readItems:c}=ot(),d=new Date,p=d.getFullYear()+"-"+String(d.getMonth()+1).padStart(2,"0")+"-"+String(d.getDate()).padStart(2,"0"),m=$(()=>g(l.tag)),{data:h}=([e,n]=Qe(()=>bt(()=>`next-events-tagged:${m.value||"none"}`,async()=>m.value?u.request(c("event_items",{fields:["*","id","title","event_id.*","event_id.page.*","event_id.tags.*","event_id.tags.event_tags_id.*","event_id.organizer","event_id.playing_venue","event_id.address","event_id.zip_code","event_id.city","event_id.accessibility.*","event_id.accessibility.venue_accessibility_features_id.*","event_id.timecontrol.*","event_id.timecontrol.timecontrols_id.*"],sort:"start",limit:10,filter:{_and:[{start:{_gte:p}},{event_id:{tags:{event_tags_id:{_eq:m.value}}}}]},deep:{event_id:{tags:{_sort:["event_tags_id.sort"]}}}})):[],"$yJQlcjOTH_")),e=await e,n(),e);function g(C){const x=C?.event_tags_id??C?.tag??C?.id??C;return typeof x=="string"||typeof x=="number"?String(x).trim():x&&typeof x=="object"?String(x.id??x.event_tags_id??"").trim():""}function y(C){const x=C?.event_id?.title??"",k=C?.title??"";return v([x,k].filter(Boolean).join(" "))}function v(C){return r(C??"")}return(C,x)=>{const k=_n,D=Ks,F=Fl;return b(),O(F,{variant:"white",class:""},{header:S(()=>[ne(E(f(s)(t.translations,t.title,"title")),1)]),footer:S(()=>[...x[0]||(x[0]=[])]),default:S(()=>[w("div",p_,[f(h)?(b(),_("div",m_,[(b(!0),_(W,null,de(f(h),B=>(b(),_("div",h_,[w("div",g_,[w("span",b_,E(f(i)(B.start,B.end)),1)]),w("div",y_,[A(k,{title:y(B),description:f(i)(B.start,B.end)},{body:S(()=>[A(ai,{e:B},null,8,["e"])]),default:S(()=>[w("div",v_,E(y(B)),1)]),_:2},1032,["title","description"])]),A(D,{class:"pb-1"})]))),256))])):T("",!0)])]),_:1})}}}),C_=Object.assign(x_,{__name:"Lucerne360BlocksCalendarEventListTagged"}),w_={key:0,class:"relative overflow-x-auto"},__={class:"flex flex-wrap justify-baseline"},k_={class:"w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-2/6 p-0 sm:p-2"},A_={class:"text-gray-500 text-sm sm:text-base font-mono"},D_={class:"w-full sm:w-1/2 md:w-2/3 lg:w-3/4 xl:w-4/6 p-0 sm:p-2"},S_=J({__name:"MonthlyList",props:{events:{},eventsModifiers:{}},emits:["update:events"],setup(t){const{decode:e}=li,{formatRange:n}=rn(),r=Re(t,"events");function o(i){let l=i.event_id.title;return i.title&&i.title!=""&&(l+=" "+i.title),s(l)}function s(i){return e(i)}return(i,l)=>{const a=_n,u=Ks;return r.value?(b(),_("div",w_,[(b(!0),_(W,null,de(r.value,c=>(b(),_("div",__,[w("div",k_,[w("span",A_,E(f(n)(c.start,c.end)),1)]),w("div",D_,[A(a,{title:o(c),description:f(n)(c.start,c.end)},{body:S(()=>[A(ai,{e:c},null,8,["e"])]),default:S(()=>[w("div",null,E(o(c)),1)]),_:2},1032,["title","description"])]),A(u)]))),256))])):T("",!0)}}}),E_=Object.assign(S_,{__name:"Lucerne360BlocksCalendarMonthlyList"}),F_={class:"overflow-x-auto"},B_={key:0,class:"border border-gray-200 min-w-xl"},R_={class:"grid grid-cols-7 divide-gray-200 border-b border-gray-200"},M_={class:"p-3.5 flex flex-col sm:flex-row items-center justify-between border-r border-gray-200"},T_={class:"text-sm text-gray-500 font-bold"},$_={class:"grid grid-cols-7 divide-gray-200"},I_=J({__name:"MonthlyView",props:{events:{},eventsModifiers:{},days:{},daysModifiers:{},date:{},dateModifiers:{}},emits:["update:events","update:days","update:date"],setup(t){const{decode:e}=li,{locale:n}=Le();Se();const{formatRange:r}=rn(),s=Wn().public.timeZone,i=bc(Rn()),l=Re(t,"events"),a=Re(t,"days"),u=Re(t,"date");function c(C=n.value+"-CH",x="long"){const{format:k}=new Intl.DateTimeFormat(C,{weekday:x});return[...Array(7).keys()].map(D=>
23k(new Date(Date.UTC(2021,5,D))))}function d(C){return C.year===u.value.year&&C.month===u.value.month}function p(C,x){const k=_r(x.start,s),D=kr(k,s),F=_r(x.end,s),B=kr(F,s);return C>=La(D)&&C<=La(B)}function m(C,x){let k="";const D=_r(x.start,s),F=kr(D,s);fi(C,F)&&(k+="rounded-l ");const B=_r(x.end,s),R=kr(B,s);fi(C,R)&&(k+="rounded-r ");let q="bg-gray-200";if(x.event_id.tags){const N=x.event_id.tags;N[0]&&N[0].event_tags_id&&N[0].event_tags_id.color&&N[0].event_tags_id.color!==""&&(q=` bg-[${N[0].event_tags_id.color}] `)}return k+q}const{t:h}=Le();function g(C){return fi(C,i)}function y(C){let x=C.event_id.title;return C.title&&C.title!=""&&(x+=" "+C.title),v(x)}function v(C){return e(C)}return(C,x)=>{const k=_n;return b(),_("div",F_,[l.value?(b(),_("div",B_,[w("div",R_,[(b(!0),_(W,null,de(c(),D=>(b(),_("div",M_,[w("span",T_,E(D),1),x[0]||(x[0]=w("span",{class:"text-sm font-medium text-gray-900"},null,-1))]))),256))]),w("div",$_,[(b(!0),_(W,null,de(a.value,D=>(b(),_("div",{class:K([{"bg-gray-50":!d(D)},"pb-2 xl:aspect-auto lg:h-min-48 border-b border-r border-gray-200 flex justify-start flex-col max-lg:items-center min-h-[100px] transition-all duration-300 hover:bg-gray-100"])},[w("span",{class:K([{"bg-primary text-white":g(D)},"m-2 text-xs font-semibold text-gray-500 flex items-center justify-center w-7 h-7 rounded-full"])},E(D.day),3),l.value?(b(!0),_(W,{key:0},de(l.value,F=>(b(),O(k,{title:y(F),description:f(r)(F.start,F.end)},{body:S(()=>[A(ai,{e:F},null,8,["e"])]),default:S(()=>[p(D,F)?(b(),_("div",{key:0,class:K([m(D,F),"w-full m-0 p-0 font-medium text-xs px-1 py-0.5 mb-0.5 truncate cursor-pointer"])},E(y(F)),3)):T("",!0)]),_:2},1032,["title","description"]))),256)):T("",!0)],2))),256))])])):T("",!0)])}}}),L_=Object.assign(I_,{__name:"Lucerne360BlocksCalendarMonthlyView"}),O_={class:"md:flex md:justify-between"},N_={class:"flex gap-1 mb-1"},q_={class:"flex gap-1 flex-wrap mb-1"},z_=J({__name:"EventFilter",props:{tag:{default:()=>""},tagModifiers:{},timecontrol:{default:()=>""},timecontrolModifiers:{}},emits:["update:tag","update:timecontrol"],setup(t){const e=Re(t,"tag"),n=Re(t,"timecontrol");function r(s){return e.value===s?e.value="":e.value=s}function o(){e.value="",n.value=""}return(s,i)=>{const l=mt,a=Ae;return b(),_("div",O_,[w("div",N_,[A(a,{label:"Reset",color:"neutral",variant:"soft",onClick:o,class:K(["mr-2",{"text-dimmed":e.value===""&&n.value===""}])},{default:S(()=>[A(l,{name:"i-lucide-funnel-x"})]),_:1},8,["class"])]),w("div",q_,[A(a,{label:"SSB",class:K(["bg-[#F2A7B5] text-red-800",{"bg-primary text-white":e.value==="SSB"}]),onClick:i[0]||(i[0]=u=>r("SSB"))},null,8,["class"]),A(a,{label:"Senioren",class:K(["bg-[#C2F4E5] text-green-800",{"bg-primary text-white":e.value==="Senioren"}]),onClick:i[1]||(i[1]=u=>r("Senioren"))},null,8,["class"]),A(a,{label:"Jugend",class:K(["bg-[#CAEFFA] text-sky-800",{"bg-primary text-white":e.value==="Jugend"}]),onClick:i[2]||(i[2]=u=>r("Jugend"))},null,8,["class"]),A(a,{label:"Ausbildung",class:K(["bg-[#F8E3CA] text-orange-800",{"bg-primary text-white":e.value==="Ausbildung"}]),onClick:i[3]||(i[3]=u=>r("Ausbildung"))},null,8,["class"])])])}}}),P_=Object.assign(z_,{__name:"Lucerne360BlocksCalendarEventFilter"}),V_={class:"relative py-4 pb-4"},j_={class:"w-full mx-auto"},H_={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between justify-between my-2"},U_={class:"w-full sm:max-w-sm justify-end"},G_={class:"flex items-center gap-2"},K_={class:"w-full sm:max-w-48"},W_={class:"my-4"},J_=J({__name:"Calendar",props:{id:{},title:{},type:{},tags:{}},async setup(t){let e,n;const r=Mp(),{locale:o,t:s}=Le();Wn().public.timeZone;const{$directus:l,$readItems:a}=ot();new Mr(o.value+"-CH",{dateStyle:"medium"});const u=new Mr(o.value+"-CH",{month:"long",year:"numeric"});new Mr(o.value+"-CH",{day:"numeric"});const c=H(bc(Rn())),d=H(),p=H(),m=H(),h=H("calendar");C(c.value);const g=H(""),y=H(""),v=()=>{let Y={};g.value&&g.value!==""&&(Y={event_id:{tags:{event_tags_id:{_eq:g.value}}}});let ee={};return y.value&&y.value!==""&&(ee={event_id:{timecontrol:{timecontrols_id:{_eq:y.value}}}}),{_and:[Y||{},ee||{},{start:{_lte:m.value.toString()}},{end:{_gte:p.value.toString()}}]}};
23function C(Y){p.value=Tp($p(Y),o.value+"-CH","mon"),m.value=Ip(Lp(Y),o.value+"-CH","mon"),d.value=Y.month}const{data:x,pending:k,error:D,refresh:F}=([e,n]=Qe(()=>bt("event-items",()=>l.request(a("event_items",{fields:["*","id","title","event_id.*","event_id.files.directus_files_id.id","event_id.files.directus_files_id.title","event_id.files.directus_files_id.filesize","event_id.files.directus_files_id.filename_download","event_id.page.*","event_id.tags.*","event_id.tags.event_tags_id.*","event_id.organizer","event_id.playing_venue","event_id.address","event_id.zip_code","event_id.city","event_id.accessibility.*","event_id.accessibility.venue_accessibility_features_id.*","event_id.timecontrol.*","event_id.timecontrol.timecontrols_id.*"],filter:v(),sort:"start",deep:{event_id:{tags:{_sort:["event_tags_id.sort"]}}}})),{watch:[g,y,p]})),e=await e,n(),e);function B(Y,ee){const ue=[];let le=Y.value;for(;le.compare(ee.value)<=0;)ue.push(le),le=le.add({days:1});return ue}const R=$(()=>B(p,m));function q(){c.value=c.value.subtract({months:1})}const N=()=>{c.value=c.value.add({months:1})};function X(){c.value=c.value.subtract({years:1})}const V=()=>{c.value=c.value.add({years:1})},G=H([{label:s("Liste"),value:"list"},{label:s("Kalender"),value:"calendar"}]);return ct(c,Y=>{C(c.value)},{deep:!0,immediate:!0}),(Y,ee)=>{const ue=Ae,le=dm;return b(),_(W,null,[w("section",V_,[w("div",j_,[w("div",H_,[w("div",U_,[w("div",G_,[A(ue,{icon:"i-lucide-chevrons-left",size:"xl",color:"neutral",variant:"soft",onClick:ee[0]||(ee[0]=ye=>X())}),A(ue,{icon:"i-lucide-chevron-left",size:"xl",color:"neutral",variant:"soft",onClick:ee[1]||(ee[1]=ye=>q())}),A(ue,{color:"ghost",variant:"subtle",icon:"i-lucide-calendar",class:"w-40",onClick:ee[2]||(ee[2]=()=>{})},{default:S(()=>[ne(E(f(u).format(f(c).toDate(f(Rn)()))),1)]),_:1}),A(ue,{icon:"i-lucide-chevron-right",size:"xl",color:"neutral",variant:"soft",onClick:ee[3]||(ee[3]=ye=>N())}),A(ue,{icon:"i-lucide-chevrons-right",size:"xl",color:"neutral",variant:"soft",onClick:ee[4]||(ee[4]=ye=>V())})])]),w("div",K_,[w("div",null,[A(le,{content:!1,items:f(G),class:"w-full",modelValue:f(h),"onUpdate:modelValue":ee[5]||(ee[5]=ye=>ke(h)?h.value=ye:null)},null,8,["items","modelValue"])])])]),A(P_,{class:"my-4",tag:f(g),"onUpdate:tag":ee[6]||(ee[6]=ye=>ke(g)?g.value=ye:null),timecontrol:f(y),"onUpdate:timecontrol":ee[7]||(ee[7]=ye=>ke(y)?y.value=ye:null)},null,8,["tag","timecontrol"]),f(h)=="calendar"?(b(),O(L_,{key:0,date:f(c),"onUpdate:date":ee[8]||(ee[8]=ye=>ke(c)?c.value=ye:null),days:f(R),"onUpdate:days":ee[9]||(ee[9]=ye=>ke(R)?R.value=ye:null),events:f(x),"onUpdate:events":ee[10]||(ee[10]=ye=>ke(x)?x.value=ye:null)},null,8,["date","days","events"])):(b(),O(E_,{key:1,events:f(x),"onUpdate:events":ee[11]||(ee[11]=ye=>ke(x)?x.value=ye:null)},null,8,["events"])),w("div",W_,[A(ue,{icon:"i-lucide-plus",size:"lg",to:f(r)("/kalender/create")},{default:S(()=>[ne(E(f(s)("calendarCreate.title")),1)]),_:1},8,["to"])])])]),ee[12]||(ee[12]=w("div",{class:"bg-[#C6012D] bg-[#B84300] bg-[#B36F00] bg-[#7F8500] bg-[#0F6A79] bg-[#1A3C8B] bg-[#5B2C83] bg-[#8E2C6A] bg-[#2C3E50] bg-[#99a1af] bg-[#CAEFFA] bg-[#D0CBFA] bg-[#C2F4E5] bg-[#F8E3CA] bg-[#E45D60] bg-[#F2A7B5]"},null,-1))],64)}}}),Y_=Object.assign(io(J_,[["__scopeId","data-v-f822b88a"]]),{__name:"Lucerne360BlocksCalendar"}),Q_=J({__name:"CreateEvent",setup(t){const e=H(),n=Cc({start:null,end:null}),r=H(null),o=new Mr("de-CH",{dateStyle:"medium"}),s=H(!0),i=H(["Open","Jugendturnier","Seniorenturnier","Ausbildung","Jubiläum"]),l=H(["Klassisch","Rapid","Blitz","Chess960"]);return(a,u)=>{const c=yc,d=Hs,p=vc,m=um,h=Ae,g=qp,y=Np,v=xc,C=fm,x=Op;return b(),_(W,null,[A(c,{color:"error",variant:"subtle",title:"Formular inaktiv",description:"Dieses Formular ist noch nicht aktiviert. Bitte benutzen Sie für Nachrichten und Dateneinbaben die alte SSB-Webseite.",icon:"i-lucide-terminal",class:"my-8"}),A(x,{state:f(e),class:"space-y-4 w-128"},{default:S(()=>[A(p,{label:"Turniername",name:"name"},{default:S(()=>[A(d,{required:"",class:"w-full"})]),_:1}),A(p,{label:"Organisator",name:"organizer"},{default:S(()=>[A(d,{required:"",class:"w-full"})]),_:1}),A(p,{label:"Dauer",name:"multiday"},{default:S(()=>[A(m,{modelValue:f(s),"onUpdate:modelValue":u[0]||(u[0]=k=>ke(s)?s.value=k:null),label:"mehrtägig"},null,8,["modelValue"])]),_:1}),A(p,{label:"Datum",name:"date_range"},{default:S(()=>[A(y,null,{content:S(()=>[f(s)?(b(),O(g,{key:1,modelValue:f(n),"onUpdate:modelValue":u[2]||(u[2]=k=>ke(n)?n.value=k:null),class:"p-2","number-of-months":2,range:""},null,8,["modelValue"])):(b(),O(g,{key:0,modelValue:f(r),"onUpdate:modelValue":u[1]||(u[1]=k=>ke(r)?r.value=k:null),class:"p-2","number-of-months":2},null,8,["modelValue"]))]),default:S(()=>[A(h,{color:"neutral",variant:"outline",icon:"i-lucide-calendar",class:"w-full"},{default:S(()=>[f(s)?f(n).start?(b(),_(W,{key:1},[f(n).end?(b(),_(W,{key:0},[ne(E(f(o).format(f(n).start.toDate(f(Rn)())))+" – "+E(f(o).format(f(n).end.toDate(f(Rn)()))),1)],64)):(b(),_(W,{key:1},[ne(E(f(o).format(f(n).start.toDate(f(Rn)()))),1)],64))],64)):(b(),_(W,{key:2},[ne(" Wähle das Datum ")],64)):(b(),_(W,{key:0},[f(r)?(b(),_(W,{key:0},[ne(E(f(o).format(f(r).toDate(f(Rn)()))),1)],64)):(b(),_(W,{key:1},[ne(" Wähle das Datum ")],64))],64))]),_:1})]),_:1})]),_:1}),A(p,{label:"E-Mail Adresse",name:"email"},{default:S(()=>[A(d,{required:"",class:"w-full"})]),_:1}),A(p,{label:"Turnierwebseite",name:"web"},{default:S(()=>[A(d,{class:"w-full"})]),_:1}),A(p,{label:"Spiellokal",name:"playinghall"},{default:S(()=>[A(d,{class:"w-full"})]),_:1}),A(p,{label:"Adresse",name:"address"},{default:S(()=>[A(d,{class:"w-full"})]),_:1}),A(p,{label:"PLZ",name:"zip"},{default:S(()=>[A(d,{class:"w-full"})]),_:1}),A(p,{label:"Ort",name:"ort"},{default:S(()=>[A(d,{class:"w-full"})]),_:1}),A(p,{label:"Behindertengerecht"},{default:S(()=>[A(v,{class:"w-full",label:"rollstuhlgängig"})]),_:1}),A(p,{label:"Kategorie",name:"categorie"},{default:S(()=>[A(C,{multiple:"",items:f(i),class:"w-full"},null,8,["items"])]),_:1}),A(p,{label:"Bedenkzeit",name:"time"},{default:S(()=>[A(C,{multiple:"",items:f(l),class:"w-full"},null,8,["items"])]),_:1}
23),A(h,{type:"submit",class:"mt-4"},{default:S(()=>[...u[3]||(u[3]=[ne(" Turnier hinzufügen ",-1)])]),_:1})]),_:1},8,["state"])],64)}}}),Z_=Object.assign(Q_,{__name:"Lucerne360BlocksFormsCreateEvent"}),X_={key:0},ek={key:1},tk={key:2},nk={key:3},rk=J({__name:"Events",props:{id:{},title:{},type:{},tag:{},tags:{},translations:{}},setup(t){const n=Wn().public.debug;return(r,o)=>t.type==="next"?(b(),_("div",X_,[A(f_,{title:t.title,translations:t.translations},null,8,["title","translations"])])):t.type==="new"&&f(n)==="true"?(b(),_("div",ek,[A(Z_)])):t.type==="tagged"?(b(),_("div",tk,[A(C_,{title:t.title,tag:t.tag,translations:t.translations},null,8,["title","tag","translations"])])):t.type==="full"?(b(),_("div",nk,[A(Y_,{title:t.title,id:t.id,type:t.type,tags:t.tags},null,8,["title","id","type","tags"])])):T("",!0)}}),ok=Object.assign(rk,{__name:"Lucerne360BlocksEvents"}),sk={class:"text-sm"},ik={class:"mb-4"},lk=["onClick"],ak=["onClick"],uk=J({__name:"CommissionsMenu",props:xn({items:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const{pick:e}=Se(),n=Re(t,"modelValue"),r=o=>{n.value=o};return(o,s)=>{const i=Ks;return b(),_("div",sk,[(b(!0),_(W,null,de(t.items,l=>(b(),_("div",ik,[w("div",{class:K(["font-bold",[l.officials?.length?"text-primary":"",l.items?.length&&!l.officials?.length?"text-foreground":""]])},E(f(e)(l,"title")),3),l.items?.length?(b(!0),_(W,{key:0},de(l.items,a=>(b(),_("div",{class:K(["my-2 text-primary cursor-pointer underline",[a.officials?.length?"text-primary underline":"",a.items?.length&&!a.officials?.length?"text-foreground":""]])},[w("div",{class:"",onClick:u=>r(a)},E(f(e)(a,"title")),9,lk),a.items?.length?(b(!0),_(W,{key:0},de(a.items,u=>(b(),_("div",null,[w("div",{class:K(["ml-2",[u.officials?.length?"text-primary underline cursor-pointer":"",u.items?.length&&!u.officials?.length?"text-foreground":""]]),onClick:c=>r(u)},E(f(e)(u,"title")),11,ak)]))),256)):T("",!0)],2))),256)):T("",!0),A(i)]))),256))])}}}),Qu=Object.assign(uk,{__name:"Lucerne360BlocksCommissionsMenu"}),ck={slots:{root:"relative group/user",wrapper:"",name:"font-medium",description:"text-muted",avatar:"shrink-0"},variants:{orientation:{horizontal:{root:"flex items-center"},vertical:{root:"flex flex-col"}},to:{true:{name:["text-default peer-hover:text-highlighted peer-focus-visible:text-highlighted","transition-colors"],description:["peer-hover:text-toned peer-focus-visible:text-toned","transition-colors"],avatar:"transform transition-transform duration-200 group-hover/user:scale-115 group-has-focus-visible/user:scale-115"},false:{name:"text-highlighted",description:""}},size:{"3xs":{root:"gap-1",wrapper:"flex items-center gap-1",name:"text-xs",description:"text-xs"},"2xs":{root:"gap-1.5",wrapper:"flex items-center gap-1.5",name:"text-xs",description:"text-xs"},xs:{root:"gap-1.5",wrapper:"flex items-center gap-1.5",name:"text-xs",description:"text-xs"},sm:{root:"gap-2",name:"text-xs",description:"text-xs"},md:{root:"gap-2",name:"text-sm",description:"text-xs"},lg:{root:"gap-2.5",name:"text-sm",description:"text-sm"},xl:{root:"gap-2.5",name:"text-base",description:"text-sm"},"2xl":{root:"gap-3",name:"text-base",description:"text-base"},"3xl":{root:"gap-3",name:"text-lg",description:"text-base"}}},defaultVariants:{size:"md"}},dk=Object.assign({inheritAttrs:!1},{__name:"UUser",props:{as:{type:null,required:!1},name:{type:String,required:!1},description:{type:String,required:!1},avatar:{type:Object,required:!1},chip:{type:[Boolean,Object],required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},to:{type:null,required:!1},target:{type:[String,Object,null],required:!1},onClick:{type:Function,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(t){const e=t,n=so(),r=Gn("user",e),o=Kn(),s=hm(),i=$(()=>gt({extend:gt(ck),...o.ui?.user||{}})({size:r.size,orientation:r.orientation,to:!!r.to||!!r.onClick}));return(l,a)=>(b(),O(f(qe),{as:f(r).as,"data-orientation":f(r).orientation,"data-slot":"root",class:K(i.value.root({class:[f(r).ui?.root,f(r).class]})),onClick:f(r).onClick},{default:S(()=>[ie(l.$slots,"avatar",{ui:i.value},()=>[f(r).chip&&f(r).avatar?(b(),O(wc,Ce({key:0,inset:""},typeof f(r).chip=="object"?f(r).chip:{},{size:f(r).size}),{default:S(()=>[A(jr,Ce({alt:f(r).name},f(r).avatar,{size:f(r).size,"data-slot":"avatar",class:i.value.avatar({class:f(r).ui?.avatar})}),null,16,["alt","size","class"])]),_:1},16,["size"])):f(r).avatar?(b(),O(jr,Ce({key:1,alt:f(r).name},f(r).avatar,{size:f(r).size,"data-slot":"avatar",class:i.value.avatar({class:f(r).ui?.avatar})}),null,16,["alt","size","class"])):T("",!0)]),w("div",{"data-slot":"wrapper",class:K(i.value.wrapper({class:f(r).ui?.wrapper}))},[f(r).to?(b(),O(zp,Ce({key:0,"aria-label":f(r).name},{to:f(r).to,target:f(r).target,...l.$attrs},{class:f(s)("focus:outline-none peer"),raw:""}),{default:S(()=>[w("span",{class:K(f(s)("absolute inset-0")),"aria-hidden":"true"},null,2)]),_:1},16,["aria-label","class"])):T("",!0),ie(l.$slots,"default",{},()=>[f(r).name||n.name?(b(),_("p",{key:0,"data-slot":"name",class:K(i.value.name({class:f(r).ui?.name}))},[ie(l.$slots,"name",{}
23,()=>[ne(E(f(r).name),1)])],2)):T("",!0),f(r).description||n.description?(b(),_("p",{key:1,"data-slot":"description",class:K(i.value.description({class:f(r).ui?.description}))},[ie(l.$slots,"description",{},()=>[ne(E(f(r).description),1)])],2)):T("",!0)])],2)]),_:3},8,["as","data-orientation","class","onClick"]))}}),fk=["src"],pk={key:1,class:"h-25 w-25 aspect-square rounded-lg flex items-center justify-center bg-accented"},mk=J({__name:"Official",props:{officialId:{},name:{},role:{},image:{}},setup(t){const e=t,{open:n}=Pp(),r=$(()=>e.image?typeof e.image=="object"?e.image.id:e.image:null);function o(){e.officialId&&n(e.officialId)}return(s,i)=>{const l=mt,a=dk;return t.officialId||t.name?(b(),O(a,{key:0,name:t.name??"",description:t.role??void 0,size:"xl",class:K(["py-2 px-4 rounded col-span-12 xl:col-span-6",t.officialId?"hover:bg-gray-200 cursor-pointer":""]),onClick:o},{avatar:S(()=>[f(r)?(b(),_("img",{key:0,src:`/lucerne360/assets/${f(r)}?key=square-100`,class:"h-25 w-25 aspect-square rounded-lg object-cover"},null,8,fk)):(b(),_("div",pk,[A(l,{name:"i-lucide-user",class:"w-12 h-12 opacity-20",style:{"font-size":"48px"}})]))]),_:1},8,["name","description","class"])):T("",!0)}}}),wa=Object.assign(mk,{__name:"Lucerne360BlocksCommissionsOfficial"});function _a(){const{pick:t}=Se();function e(l){const a=n(l),u=r(l,a);if(!u?.id)return null;const c=u.first_name??"",d=u.last_name??"",p=`${c} ${d}`.trim();return{id:u.id,name:p,role:t(a,"role")??t(l,"role"),image:u.image??null}}function n(l){return l?.commissions_officials_id&&typeof l.commissions_officials_id=="object"?l.commissions_officials_id:l}function r(l,a){return a?.officials_id&&typeof a.officials_id=="object"?a.officials_id:l?.officials_id&&typeof l.officials_id=="object"?l.officials_id:o(l)?l:null}function o(l){return!!(l?.first_name||l?.last_name||l?.image)}function s(l){return Array.isArray(l)?[...l].sort((a,u)=>i(a)-i(u)).map(e).filter(a=>!!a):[]}function i(l){const a=l?.sort??l?.commissions_officials_id?.sort;return Number.isFinite(Number(a))?Number(a):0}return{normalizeOfficial:e,normalizeOfficials:s}}const hk={class:"grid grid-cols-12"},gk=["innerHTML"],bk=J({__name:"Commission",props:{item:{}},setup(t){const{pick:e}=Se(),n=t,{normalizeOfficials:r}=_a(),o=$(()=>r(n.item?.officials));return(s,i)=>t.item?(b(),_(W,{key:0},[w("div",hk,[f(o).length?(b(!0),_(W,{key:0},de(f(o),l=>(b(),O(wa,{key:l.id,"official-id":l.id,name:l.name,role:l.role,image:l.image},null,8,["official-id","name","role","image"]))),128)):T("",!0)]),w("div",{innerHTML:f(e)(t.item,"text"),class:"p-4 text-muted text-sm luc-content"},null,8,gk)],64)):T("",!0)}}),Vf=Object.assign(bk,{__name:"Lucerne360BlocksCommissionsCommission"}),yk={class:"grid grid-cols-12 gap-2 w-full"},vk={class:"col-span-12 lg:col-span-9 bg-white rounded px-4"},xk={class:"luc-content mb-4 mt-4 w-full"},Ck={class:"min-h-0 flex-1 overflow-y-auto p-4"},wk={class:"luc-content mb-4 hidden lg:block"},_k={class:"lg:col-span-3 col-span-12 bg-white rounded p-4 hidden lg:block"},kk=J({__name:"CommissionsList",async setup(t){let e,n,r=H(),o=H(!1);const{pick:s}=Se(),{$directus:i,$readItems:l}=ot(),{data:a}=([e,n]=Qe(()=>bt("commissions",async()=>i.request(l("commissions",{fields:["id","title","short","text",{translations:["*"],officials:["role","officials_id","officials_id.first_name","officials_id.last_name","officials_id.id","officials_id.image",{translations:["*"]}],items:["id","title","short","text",{translations:["*"],officials:["role","officials_id","officials_id.first_name","officials_id.last_name","officials_id.id","officials_id.image",{translations:["*"]}],items:["id","title","short","text",{translations:["*"],officials:["role","officials_id","officials_id.first_name","officials_id.last_name","officials_id.id","officials_id.image",{translations:["*"]}],items:["id","title","short","text"]}]}]}],filter:{parent:{_null:!0}}})))),e=await e,n(),e);function u(c,d){if(!c?.length)return null;for(const p of c){if((p.short??"").trim()===d)return p;const m=u(p.items,d);if(m)return m}return null}return _c(()=>{if(r.value){o.value=!1;return}const c=a.value;c&&(r.value=u(c,"ZV"))}),(c,d)=>{const p=Ae,m=mm;return b(),_("div",yk,[w("div",vk,[A(m,{direction:"right",open:f(o),"onUpdate:open":d[1]||(d[1]=h=>ke(o)?o.value=h:o=h),class:"lg:hidden"},{content:S(()=>[w("div",Ck,[A(Qu,{items:f(a),modelValue:f(r),"onUpdate:modelValue":d[
230]||(d[0]=h=>ke(r)?r.value=h:r=h)},null,8,["items","modelValue"])])]),default:S(()=>[w("div",xk,[A(p,{label:f(s)(f(r),"title"),color:"neutral",variant:"soft",icon:"i-lucide-menu",class:"w-full font-bold text-xl"},null,8,["label"])])]),_:1},8,["open"]),f(r)?(b(),_(W,{key:0},[w("div",wk,[w("h2",null,[ne(E(f(s)(f(r),"title"))+" ",1),f(r).short?(b(),_(W,{key:0},[ne("("+E(f(s)(f(r),"short"))+")",1)],64)):T("",!0)])]),A(Vf,{item:f(r)},null,8,["item"])],64)):T("",!0)]),w("div",_k,[A(Qu,{items:f(a),modelValue:f(r),"onUpdate:modelValue":d[2]||(d[2]=h=>ke(r)?r.value=h:r=h)},null,8,["items","modelValue"])])])}}}),jf=Object.assign(kk,{__name:"Lucerne360BlocksCommissionsList"}),Ak={class:""},Dk={class:"luc-content"},Sk={key:0},Ek=["innerHTML"],Fk={class:"grid grid-cols-12 gap-2 w-full"},Bk=J({__name:"CommissionOfficials",props:{contacts:{default:()=>[]},title:{},text:{},translations:{default:()=>[]}},async setup(t){let e,n;const r=t,{pickT:o}=Se(),{$directus:s,$readItems:i}=ot(),{normalizeOfficials:l}=_a(),a=$(()=>(r.contacts??[]).map(d=>typeof d=="object"?d.id:d).filter(Boolean)),{data:u}=([e,n]=Qe(()=>bt(`contacts-${a.value.join("-")}`,async()=>a.value.length?s.request(i("block_commission_commissions_officials",{filter:{id:{_in:a.value}},limit:a.value.length,fields:["id","sort",{commissions_officials_id:["id","role","sort",{officials_id:["id","first_name","last_name","image"],translations:["id","languages_code","role"]}]}]})):[])),e=await e,n(),e),c=$(()=>l(u.value?.map(d=>d.commissions_officials_id)??[]));return(d,p)=>(b(),_("div",Ak,[w("div",Dk,[t.title?(b(),_("h2",Sk,E(f(o)(t.translations,t.title,"title")),1)):T("",!0),t.text?(b(),_("div",{key:1,innerHTML:f(o)(t.translations,t.text,"text")},null,8,Ek)):T("",!0)]),w("div",Fk,[f(c).length?(b(!0),_(W,{key:0},de(f(c),m=>(b(),O(wa,{key:m.id,"official-id":m.id,name:m.name,role:m.role,image:m.image},null,8,["official-id","name","role","image"]))),128)):T("",!0)])]))}}),Rk=Object.assign(Bk,{__name:"Lucerne360BlocksCommissionsCommissionOfficials"}),Mk=J({__name:"CommissionSingle",props:{commission:{}},async setup(t){let e,n;const{$directus:r,$readItems:o}=ot(),{data:s}=([e,n]=Qe(()=>bt("commissions-"+t.commission,async()=>r.request(o("commissions",{fields:["id","title","short","text",{translations:["*"],officials:["role","officials_id","officials_id.first_name","officials_id.last_name","officials_id.id","officials_id.image",{translations:["*"]}]}],filter:{id:{_eq:t.commission}},limit:1})),"$YsdTkJxjae")),e=await e,n(),e);return(i,l)=>f(s)&&f(s).length?(b(),O(Vf,{key:0,item:f(s)[0]},null,8,["item"])):T("",!0)}}),Hf=Object.assign(Mk,{__name:"Lucerne360BlocksCommissionsCommissionSingle"}),Tk={key:0},$k={key:1},Ik={key:2},Lk=J({__name:"Commissions",props:{id:{},title:{},type:{},translations:{},commission:{},contacts:{},text:{}},setup(t){return(e,n)=>t.type==="full"?(b(),_("div",Tk,[A(jf)])):t.type==="single"?(b(),_("div",$k,[A(Hf,{commission:t.commission},null,8,["commission"])])):t.type==="contacts"?(b(),_("div",Ik,[A(Rk,{contacts:t.contacts,title:t.title,text:t.text,translations:t.translations},null,8,["contacts","title","text","translations"])])):T("",!0)}}),Ok=Object.assign(Lk,{__name:"Lucerne360BlocksCommissions"}),Nk=J({__name:"SSBTournament",props:{id:{}},async setup(t){let e,n;const{$directus:r,$readItems:o}=ot(),{data:s}=([e,n]=Qe(async()=>bt(()=>`ssb_tournament-${t.id}`,async()=>(await r.request(o("ssb_tournaments",{fields:["id","title","type","season","links","rating_list.title","rating_list.id","translations.*","leagues.id","leagues.sort","leagues.short","leagues.stats","leagues.title","leagues.translations.*","leagues.groups.id","leagues.groups.group_code","leagues.groups.short","leagues.groups.title","leagues.groups.ranking_json","leagues.groups.translations.*"],filter:{id:{_eq:t.id}},limit:1})))?.[0]??null,"$TwTJ2xTasi")),e=await e,n(),e),{data:i}=([e,n]=Qe(async()=>bt(()=>`ssb_tournament-seasons-${s.value?.type??t.id}`,async()=>s.value?.type?await r.request(o("ssb_tournaments",{fields:["id","season","leagues.id","leagues.sort","leagues.short","leagues.title","leagues.groups.id","leagues.groups.group_code","leagues.groups.short","leagues.groups.title"],filter:{type:{_eq:s.value.type}}
23,sort:["-season"],limit:-1})):[],{watch:[()=>s.value?.type]})),e=await e,n(),e);return(l,a)=>f(s)?(b(),O(pm,{key:0,tournament:f(s),"season-tournaments":f(i)??[],"tournament-type":f(s).type,season:f(s).season},null,8,["tournament","season-tournaments","tournament-type","season"])):T("",!0)}}),qk=Object.assign(Nk,{__name:"Lucerne360BlocksTournamentSSBTournament"}),zk=J({__name:"Tournament",props:{id:{},tournament:{}},setup(t){return(e,n)=>(b(),O(qk,{id:t.tournament},null,8,["id"]))}}),Pk=Object.assign(zk,{__name:"Lucerne360BlocksTournament"});function bn(t,e){return typeof t=="function"?t(e):t}function Dt(t,e){return n=>{e.setState(r=>({...r,[t]:bn(n,r[t])}))}}function ui(t){return t instanceof Function}function Vk(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function jk(t,e){const n=[],r=o=>{o.forEach(s=>{n.push(s);const i=e(s);i!=null&&i.length&&r(i)})};return r(t),n}function he(t,e,n){let r=[],o;return s=>{let i;n.key&&n.debug&&(i=Date.now());const l=t(s);if(!(l.length!==r.length||l.some((c,d)=>r[d]!==c)))return o;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),o=e(...l),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,p=d/16,m=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c⏱ ${m(d,5)} /${m(c,5)} ms`,`
24            font-size: .6rem;
25            font-weight: bold;
26            color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return o}}function ge(t,e,n,r){return{debug:()=>{var o;return(o=t?.debugAll)!=null?o:t[e]},key:!1,onChange:r}}function Hk(t,e,n,r){const o=()=>{var i;return(i=s.getValue())!=null?i:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(r),renderValue:o,getContext:he(()=>[t,n,e,s],(i,l,a,u)=>({table:i,column:l,row:a,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(t.options,"debugCells"))};return t._features.forEach(i=>{i.createCell==null||i.createCell(s,n,e,t)},{}),s}function Uk(t,e,n,r){var o,s;const l={...t._getDefaultColumnDef(),...e},a=l.accessorKey;let u=(o=(s=l.id)!=null?s:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,c;if(l.accessorFn?c=l.accessorFn:a&&(a.includes(".")?c=p=>{let m=p;for(const g of a.split(".")){var h;m=(h=m)==null?void 0:h[g]}return m}:c=p=>p[l.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:he(()=>[!0],()=>{var p;return[d,...(p=d.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},ge(t.options,"debugColumns")),getLeafColumns:he(()=>[t._getOrderColumnsFn()],p=>{var m;if((m=d.columns)!=null&&m.length){let h=d.columns.flatMap(g=>g.getLeafColumns());return p(h)}return[d]},ge(t.options,"debugColumns"))};for(const p of t._features)p.createColumn==null||p.createColumn(d,t);return d}const et="debugHeaders";function Zu(t,e,n){var r;let s={id:(r=n.id)!=null?r:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(l),i.push(a)};return l(s),i},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(i=>{i.createHeader==null||i.createHeader(s,t)}),s}const Gk={createTable:t=>{t.getHeaderGroups=he(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,o)=>{var s,i;const l=(s=r?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?s:[],a=(i=o?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?i:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Ro(e,[...l,...u,...a],t)},ge(t.options,et)),t.getCenterHeaderGroups=he(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,o)=>(n=n.filter(s=>
vendor: 46,438 bytes, line 26
26!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),Ro(e,n,t,"center")),ge(t.options,et)),t.getLeftHeaderGroups=he(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,r)=>{var o;const s=(o=r?.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return Ro(e,s,t,"left")},ge(t.options,et)),t.getRightHeaderGroups=he(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,r)=>{var o;const s=(o=r?.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return Ro(e,s,t,"right")},ge(t.options,et)),t.getFooterGroups=he(()=>[t.getHeaderGroups()],e=>[...e].reverse(),ge(t.options,et)),t.getLeftFooterGroups=he(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),ge(t.options,et)),t.getCenterFooterGroups=he(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),ge(t.options,et)),t.getRightFooterGroups=he(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),ge(t.options,et)),t.getFlatHeaders=he(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,et)),t.getLeftFlatHeaders=he(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,et)),t.getCenterFlatHeaders=he(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,et)),t.getRightFlatHeaders=he(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),ge(t.options,et)),t.getCenterLeafHeaders=he(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ge(t.options,et)),t.getLeftLeafHeaders=he(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ge(t.options,et)),t.getRightLeafHeaders=he(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ge(t.options,et)),t.getLeafHeaders=he(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,r)=>{var o,s,i,l,a,u;return[...(o=(s=e[0])==null?void 0:s.headers)!=null?o:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(a=(u=r[0])==null?void 0:u.headers)!=null?a:[]].map(c=>c.getLeafHeaders()).flat()},ge(t.options,et))}};function Ro(t,e,n,r){var o,s;let i=0;const l=function(p,m){m===void 0&&(m=1),i=Math.max(i,m),p.filter(h=>h.getIsVisible()).forEach(h=>{var g;(g=h.columns)!=null&&g.length&&l(h.columns,m+1)},0)};l(t);let a=[];const u=(p,m)=>{const h={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];p.forEach(y=>{const v=[...g].reverse()[0],C=y.column.depth===h.depth;let x,k=!1;if(C&&y.column.parent?x=y.column.parent:(x=y.column,k=!0),v&&v?.column===x)v.subHeaders.push(y);else{const D=Zu(n,x,{id:[r,m,x.id,y?.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${g.filter(F=>F.column===x).length}`:void 0,depth:m,index:g.length});D.subHeaders.push(y),g.push(D)}h.headers.push(y),y.headerGroup=h}),a.push(h),m>0&&u(g,m-1)},c=e.map((p,m)=>Zu(n,p,{depth:i,index:m}));u(c,i-1),a.reverse();const d=p=>p.filter(h=>h.column.getIsVisible()).map(h=>{let g=0,y=0,v=[0];h.subHeaders&&h.subHeaders.length?(v=[],d(h.subHeaders).forEach(x=>{let{colSpan:k,rowSpan:D}=x;g+=k,v.push(D)})):g=1;const C=Math.min(...v);return y=y+C,h.colSpan=g,h.rowSpan=y,{colSpan:g,rowSpan:y}});return d((o=(s=a[0])==null?void 0:s.headers)!=null?o:[]),a}const ka=(t,e,n,r,o,s,i)=>{let l={id:e,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(l._valuesCache.hasOwnProperty(a))return l._valuesCache[a];const u=t.getColumn(a);if(u!=null&&u.accessorFn)return l._valuesCache[a]=u.accessorFn(l.original,r),l._valuesCache[a]},getUniqueValues:a=>{if(l._uniqueValuesCache.hasOwnProperty(a))return l._uniqueValuesCache[a];const u=t.getColumn(a);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[a]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[a]):(l._uniqueValuesCache[a]=[l.getValue(a)],l._uniqueValuesCache[a])},renderValue:a=>{var u;return(u=l.getValue(a))!=null?u:t.options.renderFallbackValue},subRows:[],getLeafRows:()=>jk(l.subRows,a=>a.subRows),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let a=[],u=l;for(;;){const c=u.getParentRow();if(!c)break;a.push(c),u=c}return a.reverse()},getAllCells:he(()=>[t.getAllLeafColumns()],a=>a.map(u=>Hk(t,l,u,u.id)),ge(t.options,"debugRows")),_getAllCellsByColumnId:he(()=>[l.getAllCells()],a=>a.reduce((u,c)=>(u[c.column.id]=c,u),{}),ge(t.options,"debugRows"))};for(let a=0;a<t._features.length;a++){const u=t._features[a];u==null||u.createRow==null||u.createRow(l,t)}return l},Kk={createColumn:(t,e)=>{t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},Uf=(t,e,n)=>{var r,o;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};Uf.autoRemove=t=>It(t);const Gf=(t,e,n)=>{var r;return!!(!((r=t.getValue(e))==null||(r=r.toString())==null)&&r.includes(n))};Gf.autoRemove=t=>It(t);const Kf=(t,e,n)=>{var r;return((r=t.getValue(e))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Kf.autoRemove=t=>It(t);const Wf=(t,e,n)=>{var r;return(r=t.getValue(e))==null?void 0:r.includes(n)};Wf.autoRemove=t=>It(t);const Jf=(t,e,n)=>!n.some(r=>{var o;return!((o=t.getValue(e))!=null&&o.includes(r))});Jf.autoRemove=t=>It(t)||!(t!=null&&t.length);const Yf=(t,e,n)=>n.some(r=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(r)});Yf.autoRemove=t=>It(t)||!(t!=null&&t.length);const Qf=(t,e,n)=>t.getValue(e)===n;Qf.autoRemove=t=>It(t);const Zf=(t,e,n)=>t.getValue(e)==n;Zf.autoRemove=t=>It(t);const Aa=(t,e,n)=>{let[r,o]=n;const s=t.getValue(e);return s>=r&&s<=o};Aa.resolveFilterValue=t=>{let[e,n]=t,r=typeof e!="number"?parseFloat(e):e,o=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(s>i){const l=s;s=i,i=l}return[s,i]};Aa.autoRemove=t=>It(t)||It(t[0])&&It(t[1]);const Xt={includesString:Uf,includesStringSensitive:Gf,equalsString:Kf,arrIncludes:Wf,arrIncludesAll:Jf,arrIncludesSome:Yf,equals:Qf,weakEquals:Zf,inNumberRange:Aa};function It(t){return t==null||t===""}const Wk={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Dt("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],r=n?.getValue(t.id);return typeof r=="string"?Xt.includesString:typeof r=="number"?Xt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Xt.equals:Array.isArray(r)?Xt.arrIncludes:Xt.weakEquals},t.getFilterFn=()=>{var n,r;return ui(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(r=e.options.filterFns)==null?void 0:r[t.columnDef.filterFn])!=null?n:Xt[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,r,o;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((r=e.options.enableColumnFilters)!=null?r:!0)&&((o=e.options.enableFilters)!=null?o:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(r=>r.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,r;return(n=(r=e.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(r=>{const o=t.getFilterFn(),s=r?.find(c=>c.id===t.id),i=bn(n,s?s.value:void 0);if(Xu(o,i,t)){var l;return(l=r?.filter(c=>c.id!==t.id))!=null?l:[]}const a={id:t.id,value:i};if(s){var u;return(u=r?.map(c=>c.id===t.id?a:c))!=null?u:[]}return r!=null&&r.length?[...r,a]:[a]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),r=o=>{var s;return(s=bn(e,o))==null?void 0:s.filter(i=>{const l=n.find(a=>a.id===i.id);if(l){const a=l.getFilterFn();if(Xu(a,i.value,l))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(r)},t.resetColumnFilters=e=>{var n,r;t.setColumnFilters(e?[]:(n=(r=t.initialState)==null?void 0:r.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function Xu(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Jk=(t,e,n)=>n.reduce((r,o)=>{const s=o.getValue(t);return r+(typeof s=="number"?s:0)},0),Yk=(t,e,n)=>{let r;return n.forEach(o=>{const s=o.getValue(t);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},Qk=(t,e,n)=>{let r;return n.forEach(o=>{const s=o.getValue(t);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},Zk=(t,e,n)=>{let r,o;return n.forEach(s=>{const i=s.getValue(t);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},Xk=(t,e)=>{let n=0,r=0;if(e.forEach(o=>{let s=o.getValue(t);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},eA=(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Vk(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((s,i)=>s-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},tA=(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),nA=(t,e)=>new Set(e.map(n=>n.getValue(t))).size,rA=(t,e)=>e.length,$i={sum:Jk,min:Yk,max:Qk,extent:Zk,mean:Xk,median:eA,unique:tA,uniqueCount:nA,count:rA},oA={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Dt("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(r=>r!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,r;return((n=t.columnDef.enableGrouping)!=null?n:!0)&&((r=e.options.enableGrouping)!=null?r:!0)&&(!!t.accessorFn||!!t.columnDef.getGroupingValue)},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],r=n?.getValue(t.id);if(typeof r=="number")return $i.sum;if(Object.prototype.toString.call(r)==="[object Date]")return $i.extent},t.getAggregationFn=()=>{var n,r;if(!t)throw new Error;return ui(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(r=e.options.aggregationFns)==null?void 0:r[t.columnDef.aggregationFn])!=null?n:$i[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,r;t.setGrouping(e?[]:(n=(r=t.initialState)==null?void 0:r.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const r=e.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(t._groupingValuesCache[n]=r.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,r)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var o;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function sA(t,e,n){if(!(e!=null&&e.length)||!n)return t;const r=t.filter(s=>!e.includes(s.id));return n==="remove"?r:[...e.map(s=>t.find(i=>i.id===s)).filter(Boolean),...r]}const iA={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Dt("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=he(n=>[Vr(e,n)],n=>n.findIndex(r=>r.id===t.id),ge(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var r;return((r=Vr(e,n)[0])==null?void 0:r.id)===t.id},t.getIsLastColumn=n=>{var r;const o=Vr(e,n);return((r=o[o.length-1])==null?void 0:r.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=he(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,r)=>o=>{let s=[];if(!(e!=null&&e.length))s=o;else{const i=[...e],l=[...o];for(;l.length&&i.length;){const a=i.shift(),u=l.findIndex(c=>c.id===a);u>-1&&s.push(l.splice(u,1)[0])}s=[...s,...l]}return sA(s,n,r)},ge(t.options,"debugTable"))}},Ii=()=>({left:[],right:[]}),lA={getInitialState:t=>({columnPinning:Ii(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Dt("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const r=t.getLeafColumns().map(o=>o.id).filter(Boolean);e.setColumnPinning(o=>{var s,i;if(n==="right"){var l,a;return{left:((l=o?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((a=o?.right)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,c;return{left:[...((u=o?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=o?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=o?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((i=o?.right)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d)))}})},t.getCanPin=()=>t.getLeafColumns().some(r=>{var o,s,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(i=e.options.enableColumnPinning)!=null?i:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(l=>l.id),{left:r,right:o}=e.getState().columnPinning,s=n.some(l=>r?.includes(l)),i=n.some(l=>o?.includes(l));return s?"left":i?"right":!1},t.getPinnedIndex=()=>{var n,r;const o=t.getIsPinned();return o?(n=(r=e.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.getCenterVisibleCells=he(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,r,o)=>{const s=[...r??[],...o??[]];return n.filter(i=>!s.includes(i.column.id))},ge(e.options,"debugRows")),t.getLeftVisibleCells=he(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),ge(e.options,"debugRows")),t.getRightVisibleCells=he(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),ge(e.options,"debugRows"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,r;return t.setColumnPinning(e?Ii():(n=(r=t.initialState)==null?void 0:r.columnPinning)!=null?n:Ii())},t.getIsSomeColumnsPinned=e=>{var n;const r=t.getState().columnPinning;if(!e){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((n=r[e])!=null&&n.length)},t.getLeftLeafColumns=he(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(r=>e.find(o=>o.id===r)).filter(Boolean),ge(t.options,"debugColumns")),t.getRightLeafColumns=he(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(r=>e.find(o=>o.id===r)).filter(Boolean),ge(t.options,"debugColumns")),t.getCenterLeafColumns=he(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r)=>{const o=[...n??[],...r??[]];return e.filter(s=>!o.includes(s.id))},ge(t.options,"debugColumns"))}};function aA(t){return t||(typeof document<"u"?document:null)}const Mo={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Li=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),uA={getDefaultColumnDef:()=>Mo,getInitialState:t=>({columnSizing:{},columnSizingInfo:Li(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Dt("columnSizing",t),onColumnSizingInfoChange:Dt("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,r,o;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:Mo.minSize,(r=s??t.columnDef.size)!=null?r:Mo.size),(o=t.columnDef.maxSize)!=null?o:Mo.maxSize)},t.getStart=he(n=>[n,Vr(e,n),e.getState().columnSizing],(n,r)=>r.slice(0,t.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),ge(e.options,"debugColumns")),t.getAfter=he(n=>[n,Vr(e,n),e.getState().columnSizing],(n,r)=>r.slice(t.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),ge(e.options,"debugColumns")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:r,...o}=n;return o})},t.getCanResize=()=>{var n,r;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((r=e.options.enableColumnResizing)!=null?r:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;n+=(s=o.column.getSize())!=null?s:0}};return r(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const r=e.getColumn(t.column.id),o=r?.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),Oi(s)&&s.touches&&s.touches.length>1))return;const i=t.getSize(),l=t?t.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],a=Oi(s)?Math.round(s.touches[0].clientX):s.clientX,u={},c=(v,C)=>{typeof C=="number"&&(e.setColumnSizingInfo(x=>{var k,D;const F=e.options.columnResizeDirection==="rtl"?-1:1,B=(C-((k=x?.startOffset)!=null?k:0))*F,R=Math.max(B/((D=x?.startSize)!=null?D:0),-.999999);return x.columnSizingStart.forEach(q=>{let[N,X]=q;u[N]=Math.round(Math.max(X+X*R,0)*100)/100}),{...x,deltaOffset:B,deltaPercentage:R}}),(e.options.columnResizeMode==="onChange"||v==="end")&&e.setColumnSizing(x=>({...x,...u})))},d=v=>c("move",v),p=v=>{c("end",v),e.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=aA(n),h={moveHandler:v=>d(v.clientX),upHandler:v=>{m?.removeEventListener("mousemove",h.moveHandler),m?.removeEventListener("mouseup",h.upHandler),p(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var C;m?.removeEventListener("touchmove",g.moveHandler),m?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),p((C=v.touches[0])==null?void 0:C.clientX)}},y=cA()?{passive:!1}:!1;Oi(s)?(m?.addEventListener("touchmove",g.moveHandler,y),m?.addEventListener("touchend",g.upHandler,y)):(m?.addEventListener("mousemove",h.moveHandler,y),m?.addEventListener("mouseup",h.upHandler,y)),e.setColumnSizingInfo(v=>({...v,startOffset:a,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?Li():(n=t.initialState.columnSizingInfo)!=null?n:Li())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0}}};let To=null;function cA(){if(typeof To=="boolean")return To;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return To=t,To}function Oi(t){return t.type==="touchstart"}const dA={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Dt("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(r=>({...r,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,r;const o=t.columns;return(n=o.length?o.some(s=>s.getIsVisible()):(r=e.getState().columnVisibility)==null?void 0:r[t.id])!=null?n:!0},t.getCanHide=()=>{var n,r;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((r=e.options.enableHiding)!=null?r:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=he(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),ge(e.options,"debugRows")),t.getVisibleCells=he(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],ge(e.options,"debugRows"))},createTable:t=>{const e=(n,r)=>he(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),ge(t.options,"debugColumns"));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var r;t.setColumnVisibility(n?{}:(r=t.initialState.columnVisibility)!=null?r:{})},t.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;t.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Vr(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const fA={createTable:t=>{t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},pA={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Dt("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const r=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(t,e)=>{t.getCanGlobalFilter=()=>{var n,r,o,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=e.options.enableGlobalFilter)!=null?r:!0)&&((o=e.options.enableFilters)!=null?o:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>Xt.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:r}=t.options;return ui(r)?r:r==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[r])!=null?e:Xt[r]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},mA={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Dt("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var r,o;if(!e){t._queue(()=>{e=!0});return}if((r=(o=t.options.autoResetAll)!=null?o:t.options.autoResetExpanded)!=null?r:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=r=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(r),t.toggleAllRowsExpanded=r=>{r??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=r=>{var o,s;t.setExpanded(r?{}:(o=(s=t.initialState)==null?void 0:s.expanded)!=null?o:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const r=t.getState().expanded;return r===!0||Object.values(r).some(Boolean)},t.getIsAllRowsExpanded=()=>{const r=t.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||t.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},t.getExpandedDepth=()=>{let r=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(s=>{const i=s.split(".");r=Math.max(r,i.length)}),r},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(r=>{var o;const s=r===!0?!0:!!(r!=null&&r[t.id]);let i={};if(r===!0?Object.keys(e.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(o=n)!=null?o:!s,!s&&n)return{...i,[t.id]:!0};if(s&&!n){const{[t.id]:l,...a}=i;return a}return r})},t.getIsExpanded=()=>{var n;const r=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:r===!0||r?.[t.id])},t.getCanExpand=()=>{var n,r,o;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((r=e.options.enableExpanding)!=null?r:!0)&&!!((o=t.subRows)!=null&&o.length)},t.getIsAllParentsExpanded=()=>{let n=!0,r=t;for(;n&&r.parentId;)r=e.getRow(r.parentId,!0),n=r.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},wl=0,_l=10,Ni=()=>({pageIndex:wl,pageSize:_l}),hA={getInitialState:t=>({...t,pagination:{...Ni(),...t?.pagination}}),getDefaultOptions:t=>({onPaginationChange:Dt("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var r,o;if(!e){t._queue(()=>{e=!0});return}if((r=(o=t.options.autoResetAll)!=null?o:t.options.autoResetPageIndex)!=null?r:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=r=>{const o=s=>bn(r,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(o)},t.resetPagination=r=>{var o;t.setPagination(r?Ni():(o=t.initialState.pagination)!=null?o:Ni())},t.setPageIndex=r=>{t.setPagination(o=>{let s=bn(r,o.pageIndex);const i=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...o,pageIndex:s}})},t.resetPageIndex=r=>{var o,s;t.setPageIndex(r?wl:(o=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:wl)},t.resetPageSize=r=>{var o,s;t.setPageSize(r?_l:(o=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:_l)},t.setPageSize=r=>{t.setPagination(o=>{const s=Math.max(1,bn(r,o.pageSize)),i=o.pageSize*o.pageIndex,l=Math.floor(i/s);return{...o,pageIndex:l,pageSize:s}})},t.setPageCount=r=>t.setPagination(o=>{var s;let i=bn(r,(s=t.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),t.getPageOptions=he(()=>[t.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,i)=>i)),o},ge(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:r}=t.getState().pagination,o=t.getPageCount();return o===-1?!0:o===0?!1:r<o-1},t.previousPage=()=>t.setPageIndex(r=>r-1),t.nextPage=()=>t.setPageIndex(r=>r+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var r;return(r=t.options.pageCount)!=null?r:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var r;return(r=t.options.rowCount)!=null?r:t.getPrePaginationRowModel().rows.length}}},qi=()=>({top:[],bottom:[]}),gA={getInitialState:t=>({rowPinning:qi(),...t}),getDefaultOptions:t=>({onRowPinningChange:Dt("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,r,o)=>{const s=r?t.getLeafRows().map(a=>{let{id:u}=a;return u}):[],i=o?t.getParentRows().map(a=>{let{id:u}=a;return u}):[],l=new Set([...i,t.id,...s]);e.setRowPinning(a=>{var u,c;if(n==="bottom"){var d,p;return{top:((d=a?.top)!=null?d:[]).filter(g=>!(l!=null&&l.has(g))),bottom:[...((p=a?.bottom)!=null?p:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)]}}if(n==="top"){var m,h;return{top:[...((m=a?.top)!=null?m:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)],bottom:((h=a?.bottom)!=null?h:[]).filter(g=>!(l!=null&&l.has(g)))}}return{top:((u=a?.top)!=null?u:[]).filter(g=>!(l!=null&&l.has(g))),bottom:((c=a?.bottom)!=null?c:[]).filter(g=>!(l!=null&&l.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=e.options;return typeof r=="function"?r(t):(n=r??o)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:r,bottom:o}=e.getState().rowPinning,s=n.some(l=>r?.includes(l)),i=n.some(l=>o?.includes(l));return s?"top":i?"bottom":!1},t.getPinnedIndex=()=>{var n,r;const o=t.getIsPinned();if(!o)return-1;const s=(n=o==="top"?e.getTopRows():e.getBottomRows())==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=s?.indexOf(t.id))!=null?r:-1}},createTable:t=>{t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,r;return t.setRowPinning(e?qi():(n=(r=t.initialState)==null?void 0:r.rowPinning)!=null?n:qi())},t.getIsSomeRowsPinned=e=>{var n;const r=t.getState().rowPinning;if(!e){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[e])!=null&&n.length)},t._getPinnedRows=(e,n,r)=>{var o;return((o=t.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const l=t.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>e.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},t.getTopRows=he(()=>[t.getRowModel().rows,t.getState().rowPinning.top],(e,n)=>t._getPinnedRows(e,n,"top"),ge(t.options,"debugRows")),t.getBottomRows=he(()=>[t.getRowModel().rows,t.getState().rowPinning.bottom],(e,n)=>t._getPinnedRows(e,n,"bottom"),ge(t.options,"debugRows")),t.getCenterRows=he(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,r)=>{const o=new Set([...n??[],...r??[]]);return e.filter(s=>!o.has(s.id))},ge(t.options,"debugRows"))}},bA={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Dt("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const r={...n},o=t.getPreGroupedRowModel().flatRows;return e?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const r=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),o={...n};return t.getRowModel().rows.forEach(s=>{kl(o,s.id,r,!0,t)}),o}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=he(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?zi(t,n):{rows:[],flatRows:[],rowsById:{}},ge(t.options,"debugTable")),t.getFilteredSelectedRowModel=he(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?zi(t,n):{rows:[],flatRows:[],rowsById:{}},ge(t.options,"debugTable")),t.getGroupedSelectedRowModel=he(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?zi(t,n):{rows:[],flatRows:[],rowsById:{}},ge(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let r=!!(e.length&&Object.keys(n).length);return r&&e.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=t.getState();let r=!!e.length;return r&&e.some(o=>!n[o.id])&&(r=!1),r},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,r)=>{const o=t.getIsSelected();e.setRowSelection(s=>{var i;if(n=typeof n<"u"?n:!o,t.getCanSelect()&&o===n)return s;const l={...s};return kl(l,t.id,n,(i=r?.selectChildren)!=null?i:!0,e),l})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Da(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return Al(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return Al(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return r=>{var o;n&&t.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},kl=(t,e,n,r,o)=>{var s;const i=o.getRow(e,!0);n?(i.getCanMultiSelect()||Object.keys(t).forEach(l=>delete t[l]),i.getCanSelect()&&(t[e]=!0)):delete t[e],r&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>kl(t,l.id,n,r,o))};function zi(t,e){const n=t.getState().rowSelection,r=[],o={},s=function(i,l){return i.map(a=>{var u;const c=Da(a,n);if(c&&(r.push(a),o[a.id]=a),(u=a.subRows)!=null&&u.length&&(a={...a,subRows:s(a.subRows)}),c)return a}).filter(Boolean)};return{rows:s(e.rows),flatRows:r,rowsById:o}}function Da(t,e){var n;return(n=e[t.id])!=null?n:!1}function Al(t,e,n){var r;if(!((r=t.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return t.subRows.forEach(i=>{if(!(s&&!o)&&(i.getCanSelect()&&(Da(i,e)?s=!0:o=!1),i.subRows&&i.subRows.length)){const l=Al(i,e);l==="all"?s=!0:(l==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const Dl=/([0-9]+)/gm,yA=(t,e,n)=>Xf(wn(t.getValue(n)).toLowerCase(),wn(e.getValue(n)).toLowerCase()),vA=(t,e,n)=>Xf(wn(t.getValue(n)),wn(e.getValue(n))),xA=(t,e,n)=>Sa(wn(t.getValue(n)).toLowerCase(),wn(e.getValue(n)).toLowerCase()),CA=(t,e,n)=>Sa(wn(t.getValue(n)),wn(e.getValue(n))),wA=(t,e,n)=>{const r=t.getValue(n),o=e.getValue(n);return r>o?1:r<o?-1:0},_A=(t,e,n)=>Sa(t.getValue(n),e.getValue(n));function Sa(t,e){return t===e?0:t>e?1:-1}function wn(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Xf(t,e){const n=t.split(Dl).filter(Boolean),r=e.split(Dl).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),s=r.shift(),i=parseInt(o,10),l=parseInt(s,10),a=[i,l].sort();if(isNaN(a[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const wr={alphanumeric:yA,alphanumericCaseSensitive:vA,text:xA,textCaseSensitive:CA,datetime:wA,basic:_A},kA={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Dt("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const s=o?.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return wr.datetime;if(typeof s=="string"&&(r=!0,s.split(Dl).length>1))return wr.alphanumeric}return r?wr.text:wr.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof n?.getValue(t.id)=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,r;if(!t)throw new Error;return ui(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(r=e.options.sortingFns)==null?void 0:r[t.columnDef.sortingFn])!=null?n:wr[t.columnDef.sortingFn]},t.toggleSorting=(n,r)=>{const o=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(i=>{const l=i?.find(m=>m.id===t.id),a=i?.findIndex(m=>m.id===t.id);let u=[],c,d=s?n:o==="desc";if(i!=null&&i.length&&t.getCanMultiSort()&&r?l?c="toggle":c="add":i!=null&&i.length&&a!==i.length-1?c="replace":l?c="toggle":c="replace",c==="toggle"&&(s||o||(c="remove")),c==="add"){var p;u=[...i,{id:t.id,desc:d}],u.splice(0,u.length-((p=e.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=i.map(m=>m.id===t.id?{...m,desc:d}:m):c==="remove"?u=i.filter(m=>m.id!==t.id):u=[{id:t.id,desc:d}];return u})},t.getFirstSortDir=()=>{var n,r;return((n=(r=t.columnDef.sortDescFirst)!=null?r:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var r,o;const s=t.getFirstSortDir(),i=t.getIsSorted();return i?i!==s&&((r=e.options.enableSortingRemoval)==null||r)&&(!(n&&(o=e.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":s},t.getCanSort=()=>{var n,r;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((r=e.options.enableSorting)!=null?r:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,r;return(n=(r=t.columnDef.enableMultiSort)!=null?r:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const r=(n=e.getState().sorting)==null?void 0:n.find(o=>o.id===t.id);return r?r.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,r;return(n=(r=e.getState().sorting)==null?void 0:r.findIndex(o=>o.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return r=>{n&&(r.persist==null||r.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(r):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,r;t.setSorting(e?[]:(n=(r=t.initialState)==null?void 0:r.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},AA=[Gk,dA,iA,lA,Kk,Wk,fA,pA,kA,oA,mA,hA,gA,bA,uA];function DA(t){var e,n;const r=[...AA,...(e=t._features)!=null?e:[]];let o={_features:r};const s=o._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(o)),{}),i=p=>o.options.mergeOptions?o.options.mergeOptions(s,p):{...s,...p};let a={...{},...(n=t.initialState)!=null?n:{}};o._features.forEach(p=>{var m;a=(m=p.getInitialState==null?void 0:p.getInitialState(a))!=null?m:a});const u=[];let c=!1;const d={_features:r,options:{...s,...t},initialState:a,_queue:p=>{u.push(p),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{o.setState(o.initialState)},setOptions:p=>{const m=bn(p,o.options);o.options=i(m)},getState:()=>o.options.state,setState:p=>{o.options.onStateChange==null||o.options.onStateChange(p)},_getRowId:(p,m,h)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(p,m,h))!=null?g:`${h?[h.id,m].join("."):m}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(p,m)=>{let h=(m?o.getPrePaginationRowModel():o.getRowModel()).rowsById[p];if(!h&&(h=o.getCoreRowModel().rowsById[p],!h))throw new Error;return h},_getDefaultColumnDef:he(()=>[o.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:h=>{const g=h.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:h=>{var g,y;return(g=(y=h.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...o._features.reduce((h,g)=>Object.assign(h,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...p}},ge(t,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:he(()=>[o._getColumnDefs()],p=>{const m=function(h,g,y){return y===void 0&&(y=0),h.map(v=>{const C=Uk(o,v,y,g),x=v;return C.columns=x.columns?m(x.columns,C,y+1):[],C})};return m(p)},ge(t,"debugColumns")),getAllFlatColumns:he(()=>[o.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),ge(t,"debugColumns")),_getAllFlatColumnsById:he(()=>[o.getAllFlatColumns()],p=>p.reduce((m,h)=>(m[h.id]=h,m),{}),ge(t,"debugColumns")),getAllLeafColumns:he(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(p,m)=>{let h=p.flatMap(g=>g.getLeafColumns());return m(h)},ge(t,"debugColumns")),getColumn:p=>o._getAllFlatColumnsById()[p]};Object.assign(o,d);for(let p=0;p<o._features.length;p++){const m=o._features[p];m==null||m.createTable==null||m.createTable(o)}return o}function SA(){return t=>he(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,s,i){s===void 0&&(s=0);const l=[];for(let u=0;u<o.length;u++){const c=ka(t,t._getRowId(o[u],u,i),o[u],u,s,void 0,i?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,l.push(c),t.options.getSubRows){var a;c.originalSubRows=t.options.getSubRows(o[u],u),(a=c.originalSubRows)!=null&&a.length&&(c.subRows=r(c.originalSubRows,s+1,c))}}return l};return n.rows=r(e),n},ge(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function EA(){return t=>he(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,r)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!r?n:ep(n),ge(t.options,"debugTable"))}function ep(t){const e=[],n=r=>{var o;e.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function FA(t,e,n){return n.options.filterFromLeafRows?BA(t,e,n):RA(t,e,n)}function BA(t,e,n){var r;const o=[],s={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(a,u){u===void 0&&(u=0);const c=[];for(let p=0;p<a.length;p++){var d;let m=a[p];const h=ka(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(h.columnFilters=m.columnFilters,(d=m.subRows)!=null&&d.length&&u<i){if(h.subRows=l(m.subRows,u+1),m=h,e(m)&&!h.subRows.length){c.push(m),s[m.id]=m,o.push(m);continue}if(e(m)||h.subRows.length){c.push(m),s[m.id]=m,o.push(m);continue}}else m=h,e(m)&&(c.push(m),s[m.id]=m,o.push(m))}return c};return{rows:l(t),flatRows:o,rowsById:s}}function RA(t,e,n){var r;const o=[],s={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(a,u){u===void 0&&(u=0);const c=[];for(let p=0;p<a.length;p++){let m=a[p];if(e(m)){var d;if((d=m.subRows)!=null&&d.length&&u<i){const g=ka(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=l(m.subRows,u+1),m=g}c.push(m),o.push(m),s[m.id]=m}}return c};return{rows:l(t),flatRows:o,rowsById:s}}function MA(){return t=>he(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,r)=>{if(!e.rows.length||!(n!=null&&n.length)&&!r){for(let p=0;p<e.flatRows.length;p++)e.flatRows[p].columnFilters={},e.flatRows[p].columnFiltersMeta={};return e}const o=[],s=[];
vendor: 4,384 bytes, line 26
26(n??[]).forEach(p=>{var m;const h=t.getColumn(p.id);if(!h)return;const g=h.getFilterFn();g&&o.push({id:p.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(p.value))!=null?m:p.value})});const i=(n??[]).map(p=>p.id),l=t.getGlobalFilterFn(),a=t.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());r&&l&&a.length&&(i.push("__global__"),a.forEach(p=>{var m;s.push({id:p.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?m:r})}));let u,c;for(let p=0;p<e.flatRows.length;p++){const m=e.flatRows[p];if(m.columnFilters={},o.length)for(let h=0;h<o.length;h++){u=o[h];const g=u.id;m.columnFilters[g]=u.filterFn(m,g,u.resolvedValue,y=>{m.columnFiltersMeta[g]=y})}if(s.length){for(let h=0;h<s.length;h++){c=s[h];const g=c.id;if(c.filterFn(m,g,c.resolvedValue,y=>{m.columnFiltersMeta[g]=y})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const d=p=>{for(let m=0;m<i.length;m++)if(p.columnFilters[i[m]]===!1)return!1;return!0};return FA(e.rows,d,t)},ge(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function tp(t){return e=>he(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:s}=n;let{rows:i,flatRows:l,rowsById:a}=r;const u=o*s,c=u+o;i=i.slice(u,c);let d;e.options.paginateExpandedRows?d={rows:i,flatRows:l,rowsById:a}:d=ep({rows:i,flatRows:l,rowsById:a}),d.flatRows=[];const p=m=>{d.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return d.rows.forEach(p),d},ge(e.options,"debugTable"))}function TA(){return t=>he(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const r=t.getState().sorting,o=[],s=r.filter(a=>{var u;return(u=t.getColumn(a.id))==null?void 0:u.getCanSort()}),i={};s.forEach(a=>{const u=t.getColumn(a.id);u&&(i[a.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=a=>{const u=a.map(c=>({...c}));return u.sort((c,d)=>{for(let m=0;m<s.length;m+=1){var p;const h=s[m],g=i[h.id],y=g.sortUndefined,v=(p=h?.desc)!=null?p:!1;let C=0;if(y){const x=c.getValue(h.id),k=d.getValue(h.id),D=x===void 0,F=k===void 0;if(D||F){if(y==="first")return D?-1:1;if(y==="last")return D?1:-1;C=D&&F?0:D?y:-y}}if(C===0&&(C=g.sortingFn(c,d,h.id)),C!==0)return v&&(C*=-1),g.invertSorting&&(C*=-1),C}return c.index-d.index}),u.forEach(c=>{var d;o.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=l(c.subRows))}),u};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}},ge(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}function $o(){return!0}const $A=Symbol("merge-proxy"),IA={get(t,e,n){return e===$A?n:t.get(e)},has(t,e){return t.has(e)},set:$o,deleteProperty:$o,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:$o,deleteProperty:$o}},ownKeys(t){return t.keys()}};function Pi(t){return"value"in t?t.value:t}function Br(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(r){for(let o=e.length-1;o>=0;o--){const s=Pi(e[o])[r];if(s!==void 0)return s}},has(r){for(let o=e.length-1;o>=0;o--)if(r in Pi(e[o]))return!0;return!1},keys(){const r=[];for(let o=0;o<e.length;o++)r.push(...Object.keys(Pi(e[o])));return[...Array.from(new Set(r))]}},IA)}const Vi=J({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?Ht(t.render,t.props):t.render});function ec(t){return Br(t,{data:f(t.data)})}function LA(t){const e=ke(t.data),n=Br({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(s,i){return e?{...s,...i}:Br(s,i)}},e?ec(t):t),r=DA(n);if(e){const s=Cc(t.data);ct(s,()=>{r.setState(i=>({...i,data:s.value}))},{immediate:!0})}const o=H(r.initialState);return _c(()=>{r.setOptions(s=>{var i;const l=new Proxy({},{get:(a,u)=>o.value[u]});return Br(s,e?ec(t):t,{state:Br(l,(i=t.state)!=null?i:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),r}const OA={slots:{root:"relative overflow-auto",base:"min-w-full overflow-clip",caption:"sr-only",thead:"relative",tbody:"isolate [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>
26tr]:data-[selectable=true]:focus-visible:outline-primary divide-y divide-default",tfoot:"relative",tr:"data-[selected=true]:bg-elevated/50",th:"px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",td:"p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0",separator:"absolute z-1 left-0 w-full h-px bg-(--ui-border-accented)",empty:"py-6 text-center text-sm text-muted",loading:"py-6 text-center"},variants:{pinned:{true:{th:"sticky bg-default/75 z-1",td:"sticky bg-default/75 z-1"}},sticky:{true:{thead:"sticky top-0 inset-x-0 bg-default/75 backdrop-blur z-1",tfoot:"sticky bottom-0 inset-x-0 bg-default/75 backdrop-blur z-1"},header:{thead:"sticky top-0 inset-x-0 bg-default/75 backdrop-blur z-1"},footer:{tfoot:"sticky bottom-0 inset-x-0 bg-default/75 backdrop-blur z-1"}},loading:{true:{thead:"after:absolute after:z-1 after:h-px"}},loadingAnimation:{carousel:"","carousel-inverse":"",swing:"",elastic:""},loadingColor:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""}},compoundVariants:[{loading:!0,loadingColor:"primary",class:{thead:"after:bg-primary"}},{loading:!0,loadingColor:"secondary",class:{thead:"after:bg-secondary"}},{loading:!0,loadingColor:"success",class:{thead:"after:bg-success"}},{loading:!0,loadingColor:"info",class:{thead:"after:bg-info"}},{loading:!0,loadingColor:"warning",class:{thead:"after:bg-warning"}},{loading:!0,loadingColor:"error",class:{thead:"after:bg-error"}},{loading:!0,loadingColor:"neutral",class:{thead:"after:bg-inverted"}},{loading:!0,loadingAnimation:"carousel",class:{thead:"after:animate-[carousel_2s_ease-in-out_infinite] rtl:after:animate-[carousel-rtl_2s_ease-in-out_infinite]"}},{loading:!0,loadingAnimation:"carousel-inverse",class:{thead:"after:animate-[carousel-inverse_2s_ease-in-out_infinite] rtl:after:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"}},{loading:!0,loadingAnimation:"swing",class:{thead:"after:animate-[swing_2s_ease-in-out_infinite]"}},{loading:!0,loadingAnimation:"elastic",class:{thead:"after:animate-[elastic_2s_ease-in-out_infinite]"}}],defaultVariants:{loadingColor:"primary",loadingAnimation:"carousel"}},NA=["data-selected","data-selectable","data-expanded","data-pinned","role","tabindex","onClick","onPointerenter","onContextmenu"],qA=["data-pinned","colspan","rowspan"],zA=["colspan"],PA=["data-pinned","scope","colspan","rowspan"],VA=["colspan"],jA=["colspan"],HA={key:1},UA=["colspan"],GA={key:2},KA=["colspan"],WA=["data-pinned","colspan","rowspan"],ci=Object.assign({inheritAttrs:!1},{__name:"UTable",props:xn({as:{type:null,required:!1},data:{type:Array,required:!1},columns:{type:Array,required:!1},caption:{type:String,required:!1},meta:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},empty:{type:String,required:!1},sticky:{type:[Boolean,String],required:!1},loading:{type:Boolean,required:!1},loadingColor:{type:null,required:!1},loadingAnimation:{type:null,required:!1},watchOptions:{type:Object,required:!1,default:()=>({deep:!0})},globalFilterOptions:{type:Object,required:!1},columnFiltersOptions:{type:Object,required:!1},columnPinningOptions:{type:Object,required:!1},columnSizingOptions:{type:Object,required:!1},visibilityOptions:{type:Object,required:!1},sortingOptions:{type:Object,required:!1},groupingOptions:{type:Object,required:!1},expandedOptions:{type:Object,required:!1},rowSelectionOptions:{type:Object,required:!1},rowPinningOptions:{type:Object,required:!1},paginationOptions:{type:Object,required:!1},facetedOptions:{type:Object,required:!1},onSelect:{type:Function,required:!1},onHover:{type:Function,required:!1},onContextmenu:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},state:{type:Object,required:!1},onStateChange:{type:Function,required:!1},renderFallbackValue:{type:null,required:!1},_features:{type:Array,required:!1},autoResetAll:{type:Boolean,required:!1},debugAll:{type:Boolean,required:!1},debugCells:{type:Boolean,required:!1},debugColumns:{type:Boolean,required:!1},debugHeaders:{type:Boolean,required:!1},debugRows:{type:Boolean,required:!1},debugTable:{type:Boolean,required:!1},defaultColumn:{type:Object,required:!1},getRowId:{type:Function,required:!1},getSubRows:{type:Function,required:!1},initialState:{type:Object,required:!1},mergeOptions:{type:Function,required:!1}},{globalFilter:{type:String},globalFilterModifiers:{},columnFilters:{type:Array}
26,columnFiltersModifiers:{},columnOrder:{type:Array},columnOrderModifiers:{},columnVisibility:{type:Object},columnVisibilityModifiers:{},columnPinning:{type:Object},columnPinningModifiers:{},columnSizing:{type:Object},columnSizingModifiers:{},columnSizingInfo:{type:Object},columnSizingInfoModifiers:{},rowSelection:{type:Object},rowSelectionModifiers:{},rowPinning:{type:Object},rowPinningModifiers:{},sorting:{type:Array},sortingModifiers:{},grouping:{type:Array},groupingModifiers:{},expanded:{type:[Boolean,Object]},expandedModifiers:{},pagination:{type:Object},paginationModifiers:{}}),emits:["update:globalFilter","update:columnFilters","update:columnOrder","update:columnVisibility","update:columnPinning","update:columnSizing","update:columnSizingInfo","update:rowSelection","update:rowPinning","update:sorting","update:grouping","update:expanded","update:pagination"],setup(t,{expose:e}){const n=t,r=so(),o=Gn("table",n),{t:s}=El(),i=Kn(),l=Vp(o.data??[],o.watchOptions?.deep!==!1),a=$(()=>o.meta??{}),u=$(()=>c(o.columns??Object.keys(l.value[0]??{}).map(z=>({accessorKey:z,header:vm(z)}))));function c(z){return z.map(ve=>{const te={...ve};return"columns"in te&&te.columns&&(te.columns=c(te.columns)),te.cell||(te.cell=({getValue:fe})=>{const me=fe();return me===""||me===null||me===void 0?" ":String(me)}),te})}const d=$(()=>gt({extend:gt(OA),...i.ui?.table||{}})({sticky:o.sticky,loading:o.loading,loadingColor:o.loadingColor,loadingAnimation:o.loadingAnimation})),[p,m]=Uo(),[h,g]=Uo({props:{row:{type:Object,required:!0},style:{type:Object,required:!1}}}),y=$(()=>{function z(ve){for(const te of ve)if("footer"in te||"columns"in te&&z(te.columns))return!0;return!1}return z(u.value)}),v=Re(t,"globalFilter"),C=Re(t,"columnFilters"),x=Re(t,"columnOrder"),k=Re(t,"columnVisibility"),D=Re(t,"columnPinning"),F=Re(t,"columnSizing"),B=Re(t,"columnSizingInfo"),R=Re(t,"rowSelection"),q=Re(t,"rowPinning"),N=Re(t,"sorting"),X=Re(t,"grouping"),V=Re(t,"expanded"),G=Re(t,"pagination"),Y=Ln("rootRef"),ee=Ln("tableRef"),ue=Vs(js(o,"_features","autoResetAll","debugAll","debugCells","debugColumns","debugHeaders","debugRows","debugTable","defaultColumn","getRowId","getSubRows","initialState","mergeOptions","renderFallbackValue")),le=LA({...ue.value,get data(){return l.value},get columns(){return u.value},meta:a.value,getCoreRowModel:SA(),...o.globalFilterOptions||{},...v.value!==void 0&&{onGlobalFilterChange:z=>Q(z,v)},...o.columnFiltersOptions||{},getFilteredRowModel:MA(),...C.value!==void 0&&{onColumnFiltersChange:z=>Q(z,C)},...x.value!==void 0&&{onColumnOrderChange:z=>Q(z,x)},...o.visibilityOptions||{},...k.value!==void 0&&{onColumnVisibilityChange:z=>Q(z,k)},...o.columnPinningOptions||{},...D.value!==void 0&&{onColumnPinningChange:z=>Q(z,D)},...o.columnSizingOptions||{},...F.value!==void 0&&{onColumnSizingChange:z=>Q(z,F)},...B.value!==void 0&&{onColumnSizingInfoChange:z=>Q(z,B)},...o.rowSelectionOptions||{},...R.value!==void 0&&{onRowSelectionChange:z=>Q(z,R)},...o.rowPinningOptions||{},...q.value!==void 0&&{onRowPinningChange:z=>Q(z,q)},...o.sortingOptions||{},getSortedRowModel:TA(),...N.value!==void 0&&{onSortingChange:z=>Q(z,N)},...o.groupingOptions||{},...X.value!==void 0&&{onGroupingChange:z=>Q(z,X)},...o.expandedOptions||{},getExpandedRowModel:EA(),...V.value!==void 0&&{onExpandedChange:z=>Q(z,V)},...o.paginationOptions||{},...G.value!==void 0&&{onPaginationChange:z=>Q(z,G)},...o.facetedOptions||{},state:{get globalFilter(){return v.value},get columnFilters(){return C.value},get columnOrder(){return x.value},get columnVisibility(){return k.value},get columnPinning(){return D.value},get expanded(){return V.value},get rowSelection(){return R.value},get sorting(){return N.value},get grouping(){return X.value},get rowPinning(){return q.value},get columnSizing(){return F.value},get columnSizingInfo(){return B.value},get pagination(){return G.value}}}),ye=$(()=>le.getRowModel().rows),L=$(()=>o.virtualize?[]:le.getTopRows()),I=$(()=>o.virtualize?[]:le.getBottomRows()),oe=$(()=>L.value.length||I.value.length?le.getCenterRows():ye.value),we=un(()=>Ar(typeof o.virtualize=="boolean"?{}:o.virtualize,{estimateSize:65,overscan:12})),Be=!!o.virtualize&&jp({...we.value,get count(){return oe.value.length},getScrollElement:()=>Y.value?.$el,estimateSize:z=>{const ve=we.value.estimateSize;return typeof ve=="function"?ve(z):ve}}),_e=$(()=>Be?Be.value.getVirtualItems():[]),it=$(()=>_e.value[0]?.start??0),We=$(()=>!Be||!_e.value.length?0:Be.value.getTotalSize()-(_e.value[_e.value.length-1]?.end??0));function Q(z,ve){ve.value=typeof z=="function"?z(ve.value):z}function yt(z,ve){if(!o.onSelect)return;const te=z.target;te.closest("button")||te.closest("a")||(z.preventDefault(),z.stopPropagation(),o.onSelect(z,ve))}function ft(z,ve){o.onHover&&o.onHover(z,ve)}function M(z,ve){o.onContextmenu&&(Array.isArray(o.onContextmenu)?o.onContextmenu.forEach(te=>te(z,ve)):o.onContextmenu(z,ve))}function j(z,ve){return typeof z=="function"?z(ve):z}function ae(z){const ve={},te=z.getIsPinned();return te==="left"?ve.left=`${z.getStart("left")}px`:te==="right"&&(ve.right=`${z.getAfter("right")}px`),ve}return ct(()=>o.data,()=>{l.value=o.data?[...o.data]:[]},o.watchOptions),e({get $el(){return Y.value?.$el},tableRef:ee,tableApi:le}),(z,ve)=>
26(b(),_(W,null,[A(f(h),null,{default:S(({row:te,style:fe})=>[w("tr",{"data-selected":te.getIsSelected(),"data-selectable":!!f(o).onSelect||!!f(o).onHover||!!f(o).onContextmenu,"data-expanded":te.getIsExpanded(),"data-pinned":te.getIsPinned()||void 0,role:f(o).onSelect?"button":void 0,tabindex:f(o).onSelect?0:void 0,"data-slot":"tr",class:K(d.value.tr({class:[f(o).ui?.tr,j(f(le).options.meta?.class?.tr,te)]})),style:Bt([j(f(le).options.meta?.style?.tr,te),fe]),onClick:me=>yt(me,te),onPointerenter:me=>ft(me,te),onPointerleave:ve[0]||(ve[0]=me=>ft(me,null)),onContextmenu:me=>M(me,te)},[(b(!0),_(W,null,de(te.getVisibleCells(),me=>(b(),_("td",{key:me.id,"data-pinned":me.column.getIsPinned(),colspan:j(me.column.columnDef.meta?.colspan?.td,me),rowspan:j(me.column.columnDef.meta?.rowspan?.td,me),"data-slot":"td",class:K(d.value.td({class:[f(o).ui?.td,j(me.column.columnDef.meta?.class?.td,me)],pinned:!!me.column.getIsPinned()})),style:Bt([ae(me.column),j(me.column.columnDef.meta?.style?.td,me)])},[ie(z.$slots,`${me.column.id}-cell`,Ce({ref_for:!0},me.getContext()),()=>[A(f(Vi),{render:me.column.columnDef.cell,props:me.getContext()},null,8,["render","props"])])],14,qA))),128))],46,NA),te.getIsExpanded()?(b(),_("tr",{key:0,"data-slot":"tr",class:K(d.value.tr({class:[f(o).ui?.tr]}))},[w("td",{colspan:te.getAllCells().length,"data-slot":"td",class:K(d.value.td({class:[f(o).ui?.td]}))},[ie(z.$slots,"expanded",{row:te})],10,zA)],2)):T("",!0)]),_:3}),A(f(p),null,{default:S(()=>[w("table",{ref_key:"tableRef",ref:ee,"data-slot":"base",class:K(d.value.base({class:[f(o).ui?.base]}))},[f(o).caption||r.caption?(b(),_("caption",{key:0,"data-slot":"caption",class:K(d.value.caption({class:[f(o).ui?.caption]}))},[ie(z.$slots,"caption",{},()=>[ne(E(f(o).caption),1)])],2)):T("",!0),w("thead",{"data-slot":"thead",class:K(d.value.thead({class:[f(o).ui?.thead]}))},[(b(!0),_(W,null,de(f(le).getHeaderGroups(),te=>(b(),_("tr",{key:te.id,"data-slot":"tr",class:K(d.value.tr({class:[f(o).ui?.tr]}))},[(b(!0),_(W,null,de(te.headers,fe=>(b(),_("th",{key:fe.id,"data-pinned":fe.column.getIsPinned(),scope:fe.colSpan>1?"colgroup":"col",colspan:fe.colSpan>1?fe.colSpan:void 0,rowspan:fe.rowSpan>1?fe.rowSpan:void 0,"data-slot":"th",class:K(d.value.th({class:[f(o).ui?.th,j(fe.column.columnDef.meta?.class?.th,fe)],pinned:!!fe.column.getIsPinned()})),style:Bt([ae(fe.column),j(fe.column.columnDef.meta?.style?.th,fe)])},[ie(z.$slots,`${fe.id}-header`,Ce({ref_for:!0},fe.getContext()),()=>[fe.isPlaceholder?T("",!0):(b(),O(f(Vi),{key:0,render:fe.column.columnDef.header,props:fe.getContext()},null,8,["render","props"]))])],14,PA))),128))],2))),128)),w("tr",{"data-slot":"separator",class:K(d.value.separator({class:[f(o).ui?.separator]}))},null,2)],2),w("tbody",{"data-slot":"tbody",class:K(d.value.tbody({class:[f(o).ui?.tbody]}))},[ie(z.$slots,"body-top"),ye.value.length?(b(),_(W,{key:0},[(b(!0),_(W,null,de(L.value,te=>(b(),O(f(g),{key:te.id,row:te},null,8,["row"]))),128)),f(Be)?(b(),_(W,{key:0},[it.value>0?(b(),_("tr",{key:0,style:Bt({height:`${it.value}px`}),"aria-hidden":"true"},[w("td",{colspan:f(le).getAllLeafColumns().length},null,8,VA)],4)):T("",!0),(b(!0),_(W,null,de(_e.value,te=>(b(),_(W,{key:oe.value[te.index]?.id??`virtual-${te.index}`},[oe.value[te.index]?(b(),O(f(g),{key:0,row:oe.value[te.index],style:Bt({height:`${te.size}px`})},null,8,["row","style"])):T("",!0)],64))),128)),We.value>0?(b(),_("tr",{key:1,style:Bt({height:`${We.value}px`}),"aria-hidden":"true"},[w("td",{colspan:f(le).getAllLeafColumns().length},null,8,jA)],4)):T("",!0)],64)):(b(!0),_(W,{key:1},de(oe.value,te=>(b(),O(f(g),{key:te.id,row:te},null,8,["row"]))),128)),(b(!0),_(W,null,de(I.value,te=>(b(),O(f(g),{key:te.id,row:te},null,8,["row"]))),128))],64)):f(o).loading&&r.loading?(b(),_("tr",HA,[w("td",{colspan:f(le).getAllLeafColumns().length,"data-slot":"loading",class:K(d.value.loading({class:f(o).ui?.loading}))},[ie(z.$slots,"loading")],10,UA)])):(b(),_("tr",GA,[w("td",{colspan:f(le).getAllLeafColumns().length,"data-slot":"empty",class:K(d.value.empty({class:f(o).ui?.empty}))},[ie(z.$slots,"empty",{},()=>[ne(E(f(o).empty||f(s)("table.noData")),1)])],10,KA)])),ie(z.$slots,"body-bottom")],2),y.value?(b(),_("tfoot",{key:1,"data-slot":"tfoot",class:K(d.value.tfoot({class:[f(o).ui?.tfoot]}))},[w("tr",{"data-slot":"separator",class:K(d.value.separator({class:[f(o).ui?.separator]}))},null,2),(b(!0),_(W,null,de(f(le).getFooterGroups(),te=>(b(),_("tr",{key:te.id,"data-slot":"tr",class:K(d.value.tr({class:[f(o).ui?.tr]}))},[(b(!0),_(W,null,de(te.headers,fe=>(b(),_("th",{key:fe.id,"data-pinned":fe.column.getIsPinned(),colspan:fe.colSpan>1?fe.colSpan:void 0,rowspan:fe.rowSpan>1?fe.rowSpan:void 0,"data-slot":"th",class:K(d.value.th({class:[f(o).ui?.th,j(fe.column.columnDef.meta?.class?.th,fe)],pinned:!!fe.column.getIsPinned()})),style:Bt([ae(fe.column),j(fe.column.columnDef.meta?.style?.th,fe)])},[ie(z.$slots,`${fe.id}-footer`,Ce({ref_for:!0},fe.getContext()),()=>[fe.isPlaceholder?T("",!0):(b(),O(f(Vi),{key:0,render:fe.column.columnDef.footer,props:fe.getContext()},null,8,["render","props"]))])],14,WA))),128))],2))),128))],2)):T("",!0)],2)]),_:3}),A(f(qe),Ce({ref_key:"rootRef",ref:Y,as:f(o).as},z.$attrs,{"data-slot":"root",class:d.value.root({class:[f(o).ui?.root,f(o).class]})}),{default:S(()=>[A(f(m))]),_:1},16,["as","class"])],64))}}),JA={class:"dark:bg-gray-800"},YA={key:0,class:"space-y-3"},QA={key:1,class:"text-red-500 text-sm"},ZA={key:2,class:""},XA={class:"p-4"},eD=999,tD={__name:"Lucerne360BlocksMemberArbiterList",async setup(t){let e,n;const{t:r}=Le(),{pick:o}=Se(),{data:s,pending:i,error:l}=([e,n]=Qe(async()=>bt(()=>"arbiters-by-category",async()=>await $fetch("/lucerne360/items/members_arbiter_categories",{query:{fields:["members_id.first_name","members_id.last_name","members_id.id","members_id.fide_id","arbiter_categories_id.id","arbiter_categories_id.code","arbiter_categories_id.title","arbiter_categories_id.translations.languages_code","arbiter_categories_id.translations.title","subcategory","start"],sort:"arbiter_categories_id.sort, members_id.last_name, members_id.first_name",limit:eD,filter:{_and:[{members_id:{status:"published"}},{members_id:{id:{_nnull:"true"}}}]}}}),"$dE0DsflkLG")),e=await e,n(),e),a=x=>x?.slice(0,4),u=$(()=>s.value?.data??[]),c=Us({}),d=$(()=>{const x=new Map;for(const k of u.value){const D=k.arbiter_categories_id;if(!D)continue;const F=String(D.id??D.code??D.title);x.has(F)||x.set(F,{id:F,category:D,rows:[]}),x.get(F).rows.push(k)}return Array.from(x.values())});function p(x){return o(x.category,"title")??x.category.code??""}function m(x){return`${p(x)} (${x.rows.length})`}function h(x){return!!c[x.id]}function g(x,k){c[x.id]=k}function y(x){return h(x)?"i-lucide-chevron-up":"i-lucide-chevron-down"}function v(x){return h(x)?"font-semibold":""}const C=$(()=>[{accessorKey:"members_id.id",header:r("arbiterList.columns.code")},{accessorKey:"members_id.fide_id",header:r("arbiterList.columns.fideId")},{accessorKey:"members_id.last_name",header:r("arbiterList.columns.lastName")},{accessorKey:"members_id.first_name",header:r("arbiterList.columns.firstName")},{id:"start",header:r("arbiterList.columns.since")},{id:"subcategory",header:r("arbiterList.columns.category")}]);return(x,k)=>{const D=Bl,F=Ae,B=ci,R=pr,q=Sc;return b(),_("div",JA,[A(q,{class:"lg:px-0 mt-0 pb-16"},{default:S(()=>[f(i)?(b(),_("div",YA,[(b(),_(W,null,de(4,N=>A(D,{key:N,class:"h-14 w-full"})),64))])):f(l)?(b(),_("div",QA,E(f(l).message),1)):(b(),_("div",ZA,[(b(!0),_(W,null,de(f(d),N=>(b(),O(R,{key:N.id,open:h(N),class:"flex w-full flex-col gap-2 py-1","onUpdate:open":X=>g(N,X)},{content:S(()=>[w("div",XA,[A(B,{columns:f(C),data:N.rows,sticky:""},{"arbiter-cell":S(({row:X})=>[ne(E(f(o)(X.original.arbiter_categories_id,"title")),1)]),"subcategory-cell":S(({row:X})=>[ne(E(X.original.arbiter_categories_id.code),1),X.original.subcategory?(b(),_(W,{key:0},[ne("-"+E(X.original.subcategory),1)],64)):T("",!0)]),"start-cell":S(({row:X})=>[ne(E(a(X.original.start)),1)]),_:1},8,["columns","data"])])]),default:S(()=>[A(F,{label:m(N),color:"neutral",variant:"accordion",size:"xl",class:K(v(N)),"trailing-icon":y(N),block:""},null,8,["label","class","trailing-icon"])]),_:2},1032,["open","onUpdate:open"]))),128))]))]),_:1})])}}},tc=(t,e)=>{for(const n of Object.keys(e))t.on(n,e[n])},np=t=>{for(const e of Object.keys(t)){const n=t[e];n&&fn(n.cancel)&&n.cancel()}},nD=t=>!t||typeof t.charAt!="function"?t:t.charAt(0).toUpperCase()+t.slice(1),fn=t=>typeof t=="function",Xn=(t,e,n)=>{for(const r in n){const o="set"+nD(r);t[o]?ct(()=>n[r],(s,i)=>{t[o](s,i)}):e[o]&&ct(()=>n[r],s=>{e[o](s)})}},er=(t,e,n={})=>{const r={...n};for(const o in t){const s=e[o],i=t[o];s&&(s&&s.custom===!0||i!==void 0&&(r[o]=i))}return r},br=t=>{const e={},n={};for(const r in t)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const o=r.slice(2).toLocaleLowerCase();e[o]=t[r]}else n[r]=t[r];return{listeners:e,attrs:n}},rD=async t=>{const e=await Promise.all([_t(()=>import("./D4k_ikNW.js"),[],import.meta.url),_t(()=>import("./C2eJqgqv.js"),[],import.meta.url),_t(()=>import("./DU6CIJ0p.js"),[],import.meta.url)]);delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:e[0].default,iconUrl:e[1].default,shadowUrl:e[2].default})},Io=t=>{const e=H((...r)=>console.warn(`Method ${t} has been invoked without being replaced`)),n=(...r)=>e.value(...r);return n.wrapped=e,en(t,n),n},Lo=(t,e)=>t.wrapped.value=e,tn=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,Lt=t=>{const e=Jn(t);if(e===void 0)throw new Error(`Attempt to inject ${t.description} before it was provided.`);return e},tr=Symbol("useGlobalLeaflet"),uo=Symbol("addLayer"),rp=Symbol("removeLayer"),op=Symbol("registerControl"),oD=Symbol("registerLayerControl"),sp=Symbol("canSetParentHtml"),ip=Symbol("setParentHtml"),lp=Symbol("setIcon"),sD=Symbol("bindPopup"),ap=Symbol("bindTooltip"),iD=Symbol("unbindPopup"),up=Symbol("unbindTooltip"),co={options:{type:Object,default:()=>({}),custom:!0}},fo=t=>({options:t.options,methods:{}}),yr={...co,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},cp=(t,e,n)=>{const r=Lt(uo),o=Lt(rp),{options:s,methods:i}=fo(t),l=er(t,yr,s),a=()=>r({leafletObject:e.value}),u=()=>
26o({leafletObject:e.value}),c={...i,setAttribution(d){u(),e.value.options.attribution=d,t.visible&&a()},setName(){u(),t.visible&&a()},setLayerType(){u(),t.visible&&a()},setVisible(d){e.value&&(d?a():u())},bindPopup(d){if(!e.value||!fn(e.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}e.value.bindPopup(d)},bindTooltip(d){if(!e.value||!fn(e.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}e.value.bindTooltip(d)},unbindTooltip(){e.value&&(fn(e.value.closeTooltip)&&e.value.closeTooltip(),fn(e.value.unbindTooltip)&&e.value.unbindTooltip())},unbindPopup(){e.value&&(fn(e.value.closePopup)&&e.value.closePopup(),fn(e.value.unbindPopup)&&e.value.unbindPopup())},updateVisibleProp(d){n.emit("update:visible",d)}};return en(sD,c.bindPopup),en(ap,c.bindTooltip),en(iD,c.unbindPopup),en(up,c.unbindTooltip),oo(()=>{c.unbindPopup(),c.unbindTooltip(),u()}),{options:l,methods:c}},lD=(t,e)=>{if(t&&e.default)return Ht("div",{style:{display:"none"}},e.default())},aD={...yr,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},dp={...aD,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},uD={...dp,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...uD});const vr={...co,position:{type:String}},cD=(t,e)=>{const{options:n,methods:r}=fo(t),o=er(t,vr,n),s={...r,setPosition(i){e.value&&e.value.setPosition(i)}};return oo(()=>{e.value&&e.value.remove()}),{options:o,methods:s}},dD=t=>t.default?Ht("div",{ref:"root"},t.default()):null;J({name:"LControl",props:{...vr,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(t,e){const n=H(),r=H(),o=Jn(tr),s=Lt(op),{options:i,methods:l}=cD(t,n);return dt(async()=>{const{Control:a,DomEvent:u}=o?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url),c=a.extend({onAdd(){return r.value}});n.value=fr(new c(i)),Xn(l,n.value,t),s({leafletObject:n.value}),t.disableClickPropagation&&r.value&&u.disableClickPropagation(r.value),t.disableScrollPropagation&&r.value&&u.disableScrollPropagation(r.value),ut(()=>e.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return dD(this.$slots)}});({...vr});({...vr});({...vr});({...vr});const fp={...yr};({...fp});({...fp});const Ea={...yr,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},pp=(t,e,n)=>{const{options:r,methods:o}=cp(t,e,n),s=er(t,Ea,r),i={...o,setTileComponent(){var l;(l=e.value)==null||l.redraw()}};return oo(()=>{e.value.off()}),{options:s,methods:i}},fD=(t,e,n,r)=>t.extend({initialize(o){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,o)},createTile(o){const s=this._tileCoordsToKey(o);this.tileComponents[s]=e.create("div");const i=Ht({setup:r,props:["coords"]},{coords:o});return Hp(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(o){const s=this._tileCoordsToKey(o.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});J({props:{...Ea,childRender:{type:Function,required:!0}},setup(t,e){const n=H(),r=H(null),o=H(!1),s=Jn(tr),i=Lt(uo),{options:l,methods:a}=pp(t,n,e);return dt(async()=>{const{GridLayer:u,DomUtil:c,Util:d}=s?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url),p=fD(u,c,d,t.childRender);n.value=fr(new p(l));const{listeners:m}=br(e.attrs);n.value.on(m),Xn(a,n.value,t),i({...t,...a,leafletObject:n.value}),o.value=!0,ut(()=>e.emit("ready",n.value))}),{root:r,ready:o,leafletObject:n}},render(){return this.ready?Ht("div",{style:{display:"none"},ref:"root"}):null}});const nc={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}};J({name:"LIcon",props:{...nc,...co},setup(t,e){const n=H(),r=Jn(tr),o=Lt(sp),s=Lt(ip),i=Lt(lp);let l,a,u,c,d;const p=(y,v,C)=>{const x=y&&y.innerHTML;if(!v){C&&d&&o()&&s(x);return}const{listeners:k}=br(e.attrs);d&&a(d,k);const{options:D}=fo(t),F=er(t,nc,D);x&&(F.html=x),d=F.html?u(F):c(F),l(d,k),i(d)},m=()=>{ut(()=>p(n.value,!0,!1))},h=()=>{ut(()=>p(n.value,!1,!0))},g={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return dt(async()=>{const{DomEvent:y,divIcon:v,icon:C}=r?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url);l=y.on,a=y.off,u=v,c=C,Xn(g,{},t),new MutationObserver(h).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const t=this.$slots.default?this.$slots.default():void 0;return Ht("div",{ref:"root"},t)}});({...yr});function mp(t,e,n){var r,o,s;e===void 0&&(e=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,l=(o=n.callback)!=null&&o,a=n.maxWait,u=
26Date.now(),c=[];function d(){if(a!==void 0){var m=Date.now()-u;if(m+e>=a)return a-m}return e}var p=function(){var m=[].slice.call(arguments),h=this;return new Promise(function(g,y){var v=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,u=Date.now(),!i){var x=t.apply(h,m);l&&l(x),c.forEach(function(k){return(0,k.resolve)(x)}),c=[]}},d()),v){var C=t.apply(h,m);return l&&l(C),g(C)}c.push({resolve:g,reject:y})})};return p.cancel=function(m){s!==void 0&&clearTimeout(s),c.forEach(function(h){return(0,h.reject)(m)}),c=[]},p}const rc={...co,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},pD=J({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:rc,setup(t,e){const n=H(),r=Us({ready:!1,layersToAdd:[],layersInControl:[]}),{options:o}=fo(t),s=er(t,rc,o),{listeners:i,attrs:l}=br(e.attrs),a=Io(uo),u=Io(rp),c=Io(op),d=Io(oD);en(tr,t.useGlobalLeaflet);const p=$(()=>{const v={};return t.noBlockingAnimations&&(v.animate=!1),v}),m=$(()=>{const v=p.value;return t.padding&&(v.padding=t.padding),t.paddingTopLeft&&(v.paddingTopLeft=t.paddingTopLeft),t.paddingBottomRight&&(v.paddingBottomRight=t.paddingBottomRight),v}),h={moveend:mp(v=>{r.leafletRef&&(e.emit("update:zoom",r.leafletRef.getZoom()),e.emit("update:center",r.leafletRef.getCenter()),e.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(v){const C=r.layersInControl.find(x=>x.name===v.name);C&&C.updateVisibleProp(!0)},overlayremove(v){const C=r.layersInControl.find(x=>x.name===v.name);C&&C.updateVisibleProp(!1)}};dt(async()=>{t.useGlobalLeaflet&&(tn.L=tn.L||await _t(()=>import("./BBMRuxCa.js").then(q=>q.l),__vite__mapDeps([0,1]),import.meta.url));const{map:v,CRS:C,Icon:x,latLngBounds:k,latLng:D,stamp:F}=t.useGlobalLeaflet?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url);try{s.beforeMapMount&&await s.beforeMapMount()}catch(q){console.error(`The following error occurred running the provided beforeMapMount hook ${q.message}`)}await rD(x);const B=typeof s.crs=="string"?C[s.crs]:s.crs;s.crs=B||C.EPSG3857;const R={addLayer(q){q.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(q):r.layersInControl.find(N=>F(N.leafletObject)===F(q.leafletObject))||(r.layerControl.addLayer(q),r.layersInControl.push(q))),q.visible!==!1&&r.leafletRef.addLayer(q.leafletObject)},removeLayer(q){q.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(N=>N.name!==q.name):(r.layerControl.removeLayer(q.leafletObject),r.layersInControl=r.layersInControl.filter(N=>F(N.leafletObject)!==F(q.leafletObject)))),r.leafletRef.removeLayer(q.leafletObject)},registerLayerControl(q){r.layerControl=q,r.layersToAdd.forEach(N=>{r.layerControl.addLayer(N)}),r.layersToAdd=[],c(q)},registerControl(q){r.leafletRef.addControl(q.leafletObject)},setZoom(q){const N=r.leafletRef.getZoom();q!==N&&r.leafletRef.setZoom(q,p.value)},setCrs(q){const N=r.leafletRef.getBounds();r.leafletRef.options.crs=q,r.leafletRef.fitBounds(N,{animate:!1,padding:[0,0]})},fitBounds(q){r.leafletRef.fitBounds(q,m.value)},setBounds(q){if(!q)return;const N=k(q);N.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(N,0)&&(r.lastSetBounds=N,r.leafletRef.fitBounds(N))},setCenter(q){if(q==null)return;const N=D(q),X=r.lastSetCenter||r.leafletRef.getCenter();(X.lat!==N.lat||X.lng!==N.lng)&&(r.lastSetCenter=N,r.leafletRef.panTo(N,p.value))}};Lo(a,R.addLayer),Lo(u,R.removeLayer),Lo(c,R.registerControl),Lo(d,R.registerLayerControl),r.leafletRef=fr(v(n.value,s)),Xn(R,r.leafletRef,t),tc(r.leafletRef,h),tc(r.leafletRef,i),r.ready=!0,ut(()=>e.emit("ready",r.leafletRef))}),Gs(()=>{np(h),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const g=$(()=>r.leafletRef),y=$(()=>r.ready);return{root:n,ready:y,leafletObject:g,attrs:l}},render({attrs:t}){return t.style||(t.style={}),t.style.width||(t.style.width="100%"),t.style.height||(t.style.height="100%"),Ht("div",{...t,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),mD=["Symbol(Comment)","Symbol(Text)"],hD=["LTooltip","LPopup"],hp={...yr,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},gD=(t,e,n)=>{const{options:r,methods:o}=cp(t,e,n),s=er(t,hp,r),i={...o,setDraggable(l){e.value.dragging&&(l?e.value.dragging.enable():e.value.dragging.disable())},latLngSync(l){n.emit("update:latLng",l.latlng),n.emit("update:lat-lng",l.latlng)}
26,setLatLng(l){if(l!=null&&e.value){const a=e.value.getLatLng();(!a||!a.equals(l))&&e.value.setLatLng(l)}}};return{options:s,methods:i}},bD=(t,e)=>{const n=e.slots.default&&e.slots.default();return n&&n.length&&n.some(yD)};function yD(t){return!(mD.includes(t.type.toString())||hD.includes(t.type.name))}const vD=J({name:"LMarker",props:hp,setup(t,e){const n=H(),r=H(!1),o=Jn(tr),s=Lt(uo);en(sp,()=>{var u;return!!((u=n.value)!=null&&u.getElement())}),en(ip,u=>{var c,d;const p=fn((c=n.value)==null?void 0:c.getElement)&&((d=n.value)==null?void 0:d.getElement());p&&(p.innerHTML=u)}),en(lp,u=>{var c;return((c=n.value)==null?void 0:c.setIcon)&&n.value.setIcon(u)});const{options:i,methods:l}=gD(t,n,e),a={moveHandler:mp(l.latLngSync)};return dt(async()=>{const{marker:u,divIcon:c}=o?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url);bD(i,e)&&(i.icon=c({className:""})),n.value=fr(u(t.latLng,i));const{listeners:d}=br(e.attrs);n.value.on(d),n.value.on("move",a.moveHandler),Xn(l,n.value,t),s({...t,...l,leafletObject:n.value}),r.value=!0,ut(()=>e.emit("ready",n.value))}),Gs(()=>np(a)),{ready:r,leafletObject:n}},render(){return lD(this.ready,this.$slots)}}),xD={...dp,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},oc={...xD},gp={...co,content:{type:String,default:null}},CD=(t,e)=>{const{options:n,methods:r}=fo(t),o={...r,setContent(s){e.value&&s!==null&&s!==void 0&&e.value.setContent(s)}};return{options:n,methods:o}},wD=t=>t.default?Ht("div",{ref:"root"},t.default()):null;({...gp});({...oc,latLngs:{...oc.latLngs}});const Fa={...Ea,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:t=>typeof t=="string"?!0:Array.isArray(t)?t.every(e=>typeof e=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},_D=(t,e,n)=>{const{options:r,methods:o}=pp(t,e,n),s=er(t,Fa,r),i={...o};return{options:s,methods:i}},kD=J({props:Fa,setup(t,e){const n=H(),r=Jn(tr),o=Lt(uo),{options:s,methods:i}=_D(t,n,e);return dt(async()=>{const{tileLayer:l}=r?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url);n.value=fr(l(t.url,s));const{listeners:a}=br(e.attrs);n.value.on(a),Xn(i,n.value,t),o({...t,...i,leafletObject:n.value}),ut(()=>e.emit("ready",n.value))}),{leafletObject:n}},render(){return null}}),AD={...gp},DD=(t,e)=>{const{options:n,methods:r}=CD(t,e),o=Lt(up);return Gs(()=>{o()}),{options:n,methods:r}},SD=J({name:"LTooltip",props:AD,setup(t,e){const n=H(),r=H(null),o=Jn(tr),s=Lt(ap),{options:i,methods:l}=DD(t,n);return dt(async()=>{const{tooltip:a}=o?tn.L:await _t(()=>import("./C210bVOb.js"),[],import.meta.url);n.value=fr(a(i)),Xn(l,n.value,t);const{listeners:u}=br(e.attrs);n.value.on(u),n.value.setContent(t.content||r.value||""),s(n.value),ut(()=>e.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return wD(this.$slots)}});({...Fa});const ED={class:"rounded-lg overflow-hidden border"},FD=8,BD=J({__name:"LocationMapPlain",props:{venues:{},clubs:{}},emits:["venueClick","ready"],setup(t,{expose:e,emit:n}){const r=n,o=t,s=[46.8,8.2];let i=null,l=null;async function a(g){i=g?.leafletObject??g,l=(await _t(async()=>{const{default:y}=await import("./BBMRuxCa.js").then(v=>v.l);return{default:y}},__vite__mapDeps([0,1]),import.meta.url)).default,r("ready")}function u(){i&&i.setView([46.8,8.2],8)}function c(){if(!i||!l)return;i.invalidateSize?.();const g=h.value.map(v=>v.latLng).filter(v=>Array.isArray(v)&&v.length===2&&Number.isFinite(v[0])&&Number.isFinite(v[1])&&v[0]>=-90&&v[0]<=90&&v[1]>=-180&&v[1]<=180);if(!g.length)return;console.log(g);const y=l.latLngBounds(g);console.log(y),i.fitBounds(y,{padding:[24,24],maxZoom:14})}e({resetView:u,fitAll:c});function d(g){const[y,v]=g.coordinates;return[v,y]}function p([g,y],v){return[g+Math.sin(v)*15e-5,y+Math.cos(v)*15e-5]}const m=H(null),h=$(()=>{const g=[];let y=0;for(const v of o.clubs??[])for(const C of v.playing_venues??[]){const x=C.location;!x||x.type!=="Point"||x.coordinates?.length!==2||(g.push({key:`${v.id}-${C.id}`,clubId:v.id,clubTitle:v.title,latLng:p(d(x),y)}),y++)}return g});return ct(()=>h.value.length,async()=>{await ut(),i.value?.fitAll?.(),i.value?.resetView?.()}),dt(async()=>{const g=(await _t(async()=>{const{default:y}=await import("./BBMRuxCa.js").then(v=>v.l);return{default:y}},__vite__mapDeps([0,1]),import.meta.url)).default;m.value=g.divIcon({className:"",html:`<div style="
27      width:18px;height:18px;border-radius:9999px;
28      background:#C6012D;border:2px solid white;
29      box-shadow:0 1px 6px rgba(0,0,0,.35);
30    "></div>`,iconSize:[12,12],iconAnchor:[6,6]}),r("ready")}),(g,y)=>{const v=kc;return b(),O(v,null,{default:S(()=>[w("div",ED,[A(f(pD),{"use-global-leaflet":!1,zoom:FD,center:s,style:{height:"520px",width:"100%"},onReady:a},{default:S(()=>[A(f(kD),{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"© OpenStreetMap contributors"}),f(m)?(b(!0),_(W,{key:0},de(f(h),C=>(b(),O(f(vD),{key:C.key,"lat-lng":C.latLng,icon:f(m),onClick:x=>r("venueClick",C.clubId)},{default:S(()=>[A(f(SD),{options:{direction:"top",offset:[0,-10],opacity:.95,sticky:!0}},{default:S(()=>[ne(E(C.clubTitle),1)]),_:2},1024)]),_:2},1032,["lat-lng","icon","onClick"]))),128)):T("",!0)]),_:1})])]),_:1})}}}),RD=Object.assign(io(BD,[["__scopeId","data-v-c8952b29"]]),{__name:"Lucerne360BlocksMapLocationMapPlain"}),MD={key:0},TD={key:0,class:""},$D={class:"text-xs"},ID={key:0},LD={class:"mb-4"},OD={class:"text-xs"},ND={key:0,class:"mb-4"},qD={class:"text-xs"},zD={key:2,class:"mb-4"},PD={class:"text-xs"},VD=["href"],jD=J({__name:"ClubDetails",props:["c"],setup(t){const{t:e,locale:n}=Le();Se();const{getSafeLink:r}=Ut();return(o,s)=>{const i=mt;return t.c?(b(),_("div",MD,[t.c.playing_venues&&t.c.playing_venues.length?(b(),_("div",TD,[t.c.regional_associations&&t.c.regional_associations.length>0?(b(),_("div",{class:"mb-4",key:t.c.regional_associations},[w("div",$D,E(o.$t("Regionalverband")),1),(b(!0),_(W,null,de(t.c.regional_associations,l=>(b(),_("div",null,[w("ul",null,[l.regional_associations_id?.title?(b(),_("li",ID,E(l.regional_associations_id.title),1)):T("",!0)])]))),256))])):T("",!0),t.c.playing_venues[0]?(b(),_(W,{key:1},[w("div",LD,[w("div",OD,E(o.$t("Spiellokal")),1),w("div",null,E(t.c.playing_venues[0].title),1),w("div",null,E(t.c.playing_venues[0].address_line_1),1),w("div",null,E(t.c.playing_venues[0].address_line_2),1),w("div",null,E(t.c.playing_venues[0].zip_code)+" "+E(t.c.playing_venues[0].city),1)]),t.c.playing_venues[0].play_days?(b(),_("div",ND,[w("div",qD,E(o.$t("Spieltage")),1),ne(" "+E(t.c.playing_venues[0].play_days),1)])):T("",!0)],64)):T("",!0),t.c.website?(b(),_("div",zD,[w("div",PD,E(o.$t("Link")),1),w("a",{href:f(r)(t.c.website),target:"_blank",class:"text-primary underline"},[ne(E(f(r)(t.c.website))+" ",1),A(i,{name:"i-lucide-external-link"})],8,VD)])):T("",!0)])):T("",!0)])):T("",!0)}}}),HD=Object.assign(jD,{__name:"Lucerne360BlocksMapClubDetails"}),UD={class:"relative"},GD={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between py-4"},KD={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"}
30,WD={class:"w-full flex justify-center text-center sm:w-auto sm:justify-start sm:text-left"},JD={class:"text-sm text-muted"},YD={class:"w-full flex justify-center sm:w-auto sm:justify-end"},QD={key:0,class:"text-red-500 text-sm"},sc=400,ZD={__name:"Lucerne360BlocksMapClubList",async setup(t){let e,n;const r=Ln("table"),{t:o}=Le(),{$directus:s,$readItems:i}=ot(),l=H(1),a=H(""),u=H("");ct(a,G=>{clearTimeout(o),setTimeout(()=>{u.value=G,l.value=1},250)});const c=G=>{const Y={ä:["ä","ae"],ö:["ö","oe"],ü:["ü","ue"],Ä:["ä","ae"],Ö:["ö","oe"],Ü:["ü","ue"],ß:["ss"]};let ee=[""];for(const ue of G){const le=Y[ue];le?ee=ee.flatMap(ye=>le.map(L=>ye+L)):ee=ee.map(ye=>ye+ue)}return[...new Set(ee)]},d=G=>G.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[.,;:!/?()\\[\]{}'"`´’_-]/g," ").replace(/\s+/g," ").trim(),p=()=>{const G=d(u.value??""),Y=G?G.split(" "):[],ee=[],ue=le=>({_or:c(le).flatMap(L=>[{title:{_icontains:L}}])});return Y.length&&ee.push(...Y.map(ue)),ee.length?{_and:ee}:null},{data:m,pending:h,error:g}=([e,n]=Qe(async()=>bt(()=>`clubs-${sc.value}-${l.value}-${u.value}`,async()=>{const G=p();return await $fetch("/lucerne360/items/clubs",{query:{fields:["id","title","website","president","playing_venues.location","playing_venues.id","playing_venues.title","playing_venues.address_line_1","playing_venues.address_line_2","playing_venues.zip_code","playing_venues.city","playing_venues.country","playing_venues.play_days","regional_associations.regional_associations_id.title"],sort:"title",page:l.value,limit:sc,meta:"filter_count",...G?{filter:JSON.stringify(G)}:{}}})},{watch:[l,u]})),e=await e,n(),e),y=$(()=>m.value?.data??[]),v=[{accessorKey:"id",header:"Code"},{accessorKey:"title",header:"Verein"},{id:"address",header:"Spiellokal"}];function C(G,Y){X(Y.original.id)}const x=$(()=>(m.value.data??[]).flatMap(G=>G.playing_venues??[]).filter(G=>G?.location?.type==="Point")),k=H({pageIndex:0,pageSize:15}),D=H(!1),F=H();function B(){a.value="",F.value.resetView()}function R(G){if(!G)return"";let Y=[];return G.title&&Y.push(G.title),G.zip_code&&Y.push(G.zip_code),G.city&&Y.push(G.city),Y.join(", ")}const q=H(null),N=H(!1);function X(G){q.value=G,N.value=!0}const V=$(()=>(m.value?.data??[]).find(G=>G.id===q.value));return(G,Y)=>{const ee=Ae,ue=Hs,le=ci,ye=ii,L=_n;return b(),_(W,null,[w("div",null,[w("div",null,[w("div",UD,[A(RD,{ref_key:"mapRef",ref:F,venues:f(x),clubs:f(m)?.data??[],onReady:Y[0]||(Y[0]=I=>D.value=!0),onVenueClick:X},null,8,["venues","clubs"])]),w("div",GD,[A(ue,{modelValue:f(a),"onUpdate:modelValue":Y[2]||(Y[2]=I=>ke(a)?a.value=I:null),icon:"i-lucide-search",placeholder:"Verein suchen…",class:"w-full sm:max-w-md",ui:{trailing:"pe-1"}},Ac({_:2},[f(a)?.length?{name:"trailing",fn:S(()=>[A(ee,{color:"neutral",variant:"link",size:"sm",icon:"i-lucide-x","aria-label":"Clear input",onClick:Y[1]||(Y[1]=I=>a.value="")})]),key:"0"}:void 0]),1032,["modelValue"]),A(ee,{onClick:Y[3]||(Y[3]=I=>B()),variant:"soft",color:"neutral"},{default:S(()=>[ne(E(G.$t("Karte zurücksetzen")),1)]),_:1})]),A(le,{columns:v,data:f(y),loading:f(h),ref_key:"table",ref:r,pagination:f(k),"onUpdate:pagination":Y[4]||(Y[4]=I=>ke(k)?k.value=I:null),sticky:"",onSelect:C,"pagination-options":{getPaginationRowModel:f(tp)()},ui:{tr:"transition-colors hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer"}},{"address-cell":S(({row:I})=>[I.original.playing_venues?(b(),_(W,{key:0},[ne(E(R(I.original.playing_venues[0])),1)],64)):T("",!0)]),_:1},8,["data","loading","pagination","pagination-options"]),w("div",KD,[w("div",WD,[w("span",JD,E(f(r)?.tableApi?.getFilteredRowModel().rows.length)+" Einträge ",1)]),w("div",YD,[A(ye,{page:(f(r)?.tableApi?.getState().pagination.pageIndex||0)+1,"items-per-page":f(r)?.tableApi?.getState().pagination.pageSize,total:f(r)?.tableApi?.getFilteredRowModel().rows.length,"onUpdate:page":Y[5]||(Y[5]=I=>f(r)?.tableApi?.setPageIndex(I-1)),class:"my-4"},null,8,["page","items-per-page","total"])])]),f(g)?(b(),_("div",QD,E(f(g).message),1)):T("",!0)])]),f(V)?(b(),O(L,{key:0,open:f(N),"onUpdate:open":Y[6]||(Y[6]=I=>
30ke(N)?N.value=I:null),title:f(V).title,description:`Code: ${f(V).id}`},{body:S(()=>[A(HD,{c:f(V)},null,8,["c"])]),_:1},8,["open","title","description"])):T("",!0)],64)}}},XD={key:0},eS={key:0,class:""},tS={class:"text-xs"},nS={key:0},rS={key:1,class:"mb-4"},oS={class:"text-xs"},sS=["href"],iS=J({__name:"RegionalAssociationDetails",props:["c"],setup(t){const{t:e,locale:n}=Le();Se();const{getSafeLink:r}=Ut();return(o,s)=>{const i=mt;return t.c?(b(),_("div",XD,[t.c.clubs?(b(),_("div",eS,[t.c.clubs&&t.c.clubs.length>0?(b(),_("div",{class:"mb-4",key:t.c.clubs},[w("div",tS,E(o.$t("Sektionen")),1),(b(!0),_(W,null,de(t.c.clubs,l=>(b(),_("div",null,[w("ul",null,[l.clubs_id?.title?(b(),_("li",nS,E(l.clubs_id?.title),1)):T("",!0)])]))),256))])):T("",!0),t.c.website?(b(),_("div",rS,[w("div",oS,E(o.$t("Link")),1),w("a",{href:f(r)(t.c.website),target:"_blank",class:"text-primary underline"},[ne(E(f(r)(t.c.website))+" ",1),A(i,{name:"i-lucide-external-link"})],8,sS)])):T("",!0)])):T("",!0)])):T("",!0)}}}),lS=Object.assign(iS,{__name:"Lucerne360BlocksRegionalAssociationsRegionalAssociationDetails"}),aS={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between py-4"},uS={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"},cS={class:"w-full flex justify-center text-center sm:w-auto sm:justify-start sm:text-left"},dS={class:"text-sm text-muted"},fS={class:"w-full flex justify-center sm:w-auto sm:justify-end"},pS={key:0,class:"text-red-500 text-sm"},ic=400,mS={__name:"Lucerne360BlocksRegionalAssociationsList",async setup(t){let e,n;const r=Ln("table"),{t:o}=Le(),{$directus:s,$readItems:i}=ot(),l=H(1),a=H(""),u=H("");ct(a,R=>{clearTimeout(o),setTimeout(()=>{u.value=R,l.value=1},250)});const c=R=>{const q={ä:["ä","ae"],ö:["ö","oe"],ü:["ü","ue"],Ä:["ä","ae"],Ö:["ö","oe"],Ü:["ü","ue"],ß:["ss"]};let N=[""];for(const X of R){const V=q[X];V?N=N.flatMap(G=>V.map(Y=>G+Y)):N=N.map(G=>G+X)}return[...new Set(N)]},d=R=>R.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[.,;:!/?()\\[\]{}'"`´’_-]/g," ").replace(/\s+/g," ").trim(),p=()=>{const R=d(u.value??""),q=R?R.split(" "):[],N=[],X=V=>({_or:c(V).flatMap(Y=>[{title:{_icontains:Y}}])});return q.length&&N.push(...q.map(X)),N.length?{_and:N}:null},{data:m,pending:h,error:g}=([e,n]=Qe(async()=>bt(()=>`regional_associations-${ic.value}-${l.value}-${u.value}`,async()=>{const R=p();return await $fetch("/lucerne360/items/regional_associations",{query:{fields:["id","title","registered","website","clubs.clubs_id.id","clubs.clubs_id.title"],sort:"-registered, title",page:l.value,limit:ic,meta:"filter_count",...R?{filter:JSON.stringify(R)}:{}}})},{watch:[l,u]})),e=await e,n(),e),y=$(()=>m.value?.data??[]),v=[{accessorKey:"id",header:"Code"},{accessorKey:"title",header:"Regionalverband"},{id:"registered",header:""}];function C(R,q){F(q.original.id)}const x=H({pageIndex:0,pageSize:15}),k=H(null),D=H(!1);function F(R){k.value=R,D.value=!0}const B=$(()=>(m.value?.data??[]).find(R=>R.id===k.value));return(R,q)=>{const N=Ae,X=Hs,V=to,G=ci,Y=ii,ee=_n;return b(),_(W,null,[w("div",null,[w("div",null,[w("div",aS,[A(X,{modelValue:f(a),"onUpdate:modelValue":q[1]||(q[1]=ue=>ke(a)?a.value=ue:null),icon:"i-lucide-search",placeholder:"Regionalverband suchen…",class:"w-full sm:max-w-md",ui:{trailing:"pe-1"}},Ac({_:2},[f(a)?.length?{name:"trailing",fn:S(()=>[A(N,{color:"neutral",variant:"link",size:"sm",icon:"i-lucide-x","aria-label":"Clear input",onClick:q[0]||(q[0]=ue=>a.value="")})]),key:"0"}:void 0]),1032,["modelValue"])]),A(G,{columns:v,data:f(y),loading:f(h),ref_key:"table",ref:r,pagination:f(x),"onUpdate:pagination":q[2]||(q[2]=ue=>ke(x)?x.value=ue:null),sticky:"",onSelect:C,"pagination-options":{getPaginationRowModel:f(tp)()},ui:{tr:"transition-colors hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer"}},{"registered-cell":S(({row:ue})=>[ue.original.registered?(b(),O(V,{key:0,icon:"i-lucide-check",label:"SSB Regionalverband"})):T("",!0)]),_:1},8,["data","loading","pagination","pagination-options"]),w("div",uS,[w("div",cS,[w("span",dS,E(f(r)?.tableApi?.getFilteredRowModel().rows.length)+" Einträge ",1)]),w("div",fS,[A(Y,{page:(f(r)?.tableApi?.getState().pagination.pageIndex||0)+1,"items-per-page":f(r)?.tableApi?.getState().pagination.pageSize,total:f
30(r)?.tableApi?.getFilteredRowModel().rows.length,"onUpdate:page":q[3]||(q[3]=ue=>f(r)?.tableApi?.setPageIndex(ue-1)),class:"my-4"},null,8,["page","items-per-page","total"])])]),f(g)?(b(),_("div",pS,E(f(g).message),1)):T("",!0)])]),f(B)?(b(),O(ee,{key:0,open:f(D),"onUpdate:open":q[4]||(q[4]=ue=>ke(D)?D.value=ue:null),title:f(B).title,description:`Code: ${f(B).id}`},{body:S(()=>[A(lS,{c:f(B)},null,8,["c"])]),_:1},8,["open","title","description"])):T("",!0)],64)}}},hS={slots:{root:"relative inline-flex items-center",base:["rounded-md","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none",trailingIcon:"shrink-0 text-dimmed",trailingClear:"p-0",arrow:"fill-bg stroke-default",content:"max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col",viewport:"relative scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",tagsItem:"px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75",tagsItemText:"truncate",tagsItemDelete:["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none","transition-colors"],tagsItemDeleteIcon:"shrink-0",tagsInput:"flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-sm/4 gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",tagsItem:"text-[10px]/3",tagsItemDeleteIcon:"size-3",empty:"p-2 text-xs"},sm:{base:"px-2.5 py-1.5 text-sm/4 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",tagsItem:"text-[10px]/3",tagsItemDeleteIcon:"size-3",empty:"p-2.5 text-xs"},md:{base:"px-2.5 py-1.5 text-base/5 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",tagsItem:"text-xs",tagsItemDeleteIcon:"size-3.5",empty:"p-2.5 text-sm"},lg:{base:"px-3 py-2 text-base/5 gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",tagsItem:"text-xs",tagsItemDeleteIcon:"size-3.5",empty:"p-3 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",tagsItem:"text-sm",tagsItemDeleteIcon:"size-4",empty:"p-3 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",n
30one:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}},multiple:{true:{root:"flex-wrap"},false:{base:"w-full border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"}}},compoundVariants:[{variant:"soft",multiple:!0,class:"has-focus:bg-elevated"},{variant:"ghost",multiple:!0,class:"has-focus:bg-elevated"},{color:"primary",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-primary"},{color:"secondary",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-secondary"},{color:"success",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-success"},{color:"info",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-info"},{color:"warning",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-warning"},{color:"error",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-error"},{color:"neutral",multiple:!0,variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inverted"},{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},gS=Object.assign({inheritAttrs:!1},{__name:"UInputMenu",props:xn({as:{type:null,required:!1},id:{type:String,required:!1},type:{type:null,required:!1,default:"text"},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},deleteIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},mode:{type:String,required:!1,default:"combobox"},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},openOnClick:{type:Boolean,required:!1},openOnFocus:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:xn(["change","blur","focus","create","clear","highlight","remove-tag","update:modelValue","update:open"],["update:searchTerm"]),setup(t,{expose:e,emit:n}){const r=t,o=n,s=so(),i=Gn("inputMenu",r),l=Re(t,"searchTerm",{type:String,default:""}),{t:a}=El(),u=Kn(),{filterGroups:c}=lm(),d=$(()=>i.mode==="autocomplete"),p=js(i,"as","modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","resetModelValueOnClear","highlightOnHover","openOnClick","openOnFocus","by"),m=Up(p,"multiple","resetSearchTermOnSelect","resetModelValueOnClear","by"),h=Vs($(()=>d.value?m:p),o),g=$(()=>d.value?Yp:Qp),y=Gp(un(()=>i.portal)),v=un(()=>Ar(i.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),C=un(()=>Ar(i.arrow,{rounded:!0})),x=$(()=>typeof i.clear=="object"?i.clear:{}),k=un(()=>i.virtualize?Ar(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:gm(ae.value,we.value||"md",i.descriptionKey,!!s["item-description"])}):!1),{emitFormBlur:D,emitFormFocus:F,emitFormChange:B,emitFormInput:R,size:q,color:N,id:X,name:V,highlight:G,disabled:Y,ariaAttrs:ee}=Dc(r),{orientation:ue,size:le}=Kp(r),{isLeading:ye,isTrailing:L,leadingIconName:I,trailingIconName:oe}=Wp(un(()=>Ar(i,{trailingIcon:u.ui.icons.chevronDown}))),we=$(()=>le.value||q.value),[Be,_e]=Uo(),[it,We]=Uo({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),Q=$(()=>gt({extend:gt(hS),...u.ui?.inputMenu||{}})({color:N.value??i.color,variant:i.variant,size:we?.value??i.size,loading:i.loading,highlight:G.value??i.highlight,fixed:i.fixed,leading:ye.value||!!i.avatar||!!s.leading,trailing:L.value||!!s.trailing,multiple:i.multiple,fieldGroup:ue.value,virtualize:!!i.virtualize})),yt=$(()=>M.value.flatMap(re=>re));function ft(re){return Zp(yt.value,re,{labelKey:i.labelKey,valueKey:i.valueKey,by:i.by})??""}const M=$(()=>i.items?.length?tm(i.items)?i.items:[i.items]:[]),j=$(()=>{if(i.ignoreFilter||!l.value)return M.value;const re=Array.isArray(i.filterFields)?i.filterFields:[i.labelKey];
30return c(M.value,l.value,{fields:re,isStructural:Ee=>Te(Ee)&&!!Ee.type&&["label","separator"].includes(Ee.type)})}),ae=$(()=>j.value.flatMap(re=>re)),z=$(()=>{if(!i.createItem||!l.value)return!1;const re=i.valueKey?{[i.valueKey]:l.value}:l.value;return typeof i.createItem=="object"&&i.createItem.when==="always"||i.createItem==="always"?!ae.value.find(Ee=>Xp(Ee,re,i.by??i.valueKey)):!ae.value.length}),ve=$(()=>typeof i.createItem=="object"?i.createItem.position:"bottom"),te=Ln("inputRef");function fe(){i.autofocus&&te.value?.$el?.focus()}dt(()=>{ut(()=>{d.value?l.value=String(i.modelValue??i.defaultValue??""):l.value=""}),setTimeout(()=>{fe()},i.autofocusDelay)}),ct(()=>i.modelValue,re=>{d.value&&(l.value=String(re??""))});function me(re){if(fc(i.modelValue)===re)return;i.modelModifiers?.trim&&(typeof re=="string"||re===null||re===void 0)&&(re=re?.trim()??null),i.modelModifiers?.number&&(re=em(re)),i.modelModifiers?.nullable&&(re??=null),i.modelModifiers?.optional&&!i.modelModifiers?.nullable&&re!==null&&(re??=void 0);const Ee=new Event("change",{target:{value:re}});o("change",Ee),B(),R(),d.value?l.value=String(re??""):i.resetSearchTermOnSelect&&(l.value="")}function di(re){d.value||(l.value=re)}function po(re){o("blur",re),D()}function Ba(re){o("focus",re),F()}const Ra=H(!1);function yp(re){Ra.value=re;let Ee;if(re){const se=new FocusEvent("focus");o("focus",se),F(),clearTimeout(Ee)}else{const se=new FocusEvent("blur");o("blur",se),D(),!d.value&&i.resetSearchTermOnBlur&&(Ee=setTimeout(()=>{l.value=""},100))}}function vp(re,Ee){if(i.multiple){const se=Ee.filter(Tt=>!hc(Tt,re));o("update:modelValue",se),o("remove-tag",re),me(se)}}function xp(re){re.preventDefault(),re.stopPropagation(),o("create",l.value)}function Cp(re,Ee){if(Te(Ee)){if(Ee.disabled){re.preventDefault();return}Ee.onSelect?.(re)}}function Te(re){return typeof re=="object"&&re!==null}function wp(re){return i.multiple&&Array.isArray(re)?re.length===0:re==null||re===""}function _p(){o("clear")}const Ma=Ln("viewportRef"),Ta=Ln("comboboxRootRef");return ct(()=>i.items,async()=>{Ra.value&&(await ut(),Ta.value?.highlightFirstItem?.())},{flush:"post"}),e({inputRef:un(()=>te.value?.$el),viewportRef:un(()=>Ma.value)}),(re,Ee)=>(b(),_(W,null,[A(f(Be),null,{default:S(()=>[A(f(g).Item,{"data-slot":"item",class:K(Q.value.item({class:f(i).ui?.item})),value:l.value,onSelect:xp},{default:S(()=>[w("span",{"data-slot":"itemLabel",class:K(Q.value.itemLabel({class:f(i).ui?.itemLabel}))},[ie(re.$slots,"create-item-label",{item:l.value},()=>[ne(E(f(a)("inputMenu.create",{label:l.value})),1)])],2)]),_:3},8,["class","value"])]),_:3}),A(f(it),null,{default:S(({item:se,index:Tt})=>[Te(se)&&se.type==="label"?(b(),O(f(g).Label,{key:0,"data-slot":"label",class:K(Q.value.label({class:[f(i).ui?.label,se.ui?.label,se.class]}))},{default:S(()=>[ne(E(f(Fn)(se,f(i).labelKey)),1)]),_:2},1032,["class"])):Te(se)&&se.type==="separator"?(b(),O(f(g).Separator,{key:1,"data-slot":"separator",class:K(Q.value.separator({class:[f(i).ui?.separator,se.ui?.separator,se.class]}))},null,8,["class"])):(b(),O(f(g).Item,{key:2,"data-slot":"item",class:K(Q.value.item({class:[f(i).ui?.item,Te(se)&&se.ui?.item,Te(se)&&se.class]})),disabled:Te(se)&&se.disabled,value:f(i).valueKey&&Te(se)?f(Fn)(se,f(i).valueKey):se,onSelect:vt=>Cp(vt,se)},{default:S(()=>[ie(re.$slots,"item",{item:se,index:Tt,ui:Q.value},()=>[ie(re.$slots,"item-leading",{item:se,index:Tt,ui:Q.value},()=>[Te(se)&&se.icon?(b(),O(mt,{key:0,name:se.icon,"data-slot":"itemLeadingIcon",class:K(Q.value.itemLeadingIcon({class:[f(i).ui?.itemLeadingIcon,se.ui?.itemLeadingIcon]}))},null,8,["name","class"])):Te(se)&&se.avatar?(b(),O(jr,Ce({key:1,size:se.ui?.itemLeadingAvatarSize||f(i).ui?.itemLeadingAvatarSize||Q.value.itemLeadingAvatarSize()},se.avatar,{"data-slot":"itemLeadingAvatar",class:Q.value.itemLeadingAvatar({class:[f(i).ui?.itemLeadingAvatar,se.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):Te(se)&&se.chip?(b(),O(wc,Ce({key:2,size:se.ui?.itemLeadingChipSize||f(i).ui?.itemLeadingChipSize||Q.value.itemLeadingChipSize(),inset:"",standalone:""},se.chip,{"data-slot":"itemLeadingChip",class:Q.value.itemLeadingChip({class:[f(i).ui?.itemLeadingChip,se.ui?.itemLeadingChip]})}),null,16,["size","class"])):T("",!0)]),w("span",{"data-slot":"itemWrapper",class:K(Q.value.itemWrapper({class:[f(i).ui?.itemWrapper,Te(se)&&se.ui?.itemWrapper]}))},[w("span",{"data-slot":"itemLabel",class:K(Q.value.itemLabel({class:[f(i).ui?.itemLabel,Te(se)&&se.ui?.itemLabel]}))},[ie(re.$slots,"item-label",{item:se,index:Tt},()=>[ne(E(Te(se)?f(Fn)(se,f(i).labelKey):se),1)])],2),Te(se)&&(f(Fn)(se,f(i).descriptionKey)||s["item-description"])?(b(),_("span",{key:0,"data-slot":"itemDescription",class:K(Q.value.itemDescription({class:[f(i).ui?.itemDescription,Te(se)&&se.ui?.itemDescription]}))},[ie(re.$slots,"item-description",{item:se,index:Tt},()=>[ne(E(f(Fn)(se,f(i).descriptionKey)),1)])],2)):T("",!0)],2),w("span",{"data-slot":"itemTrailing",class:K(Q.value.itemTrailing({class:[f(i).ui?.itemTrailing,Te(se)&&se.ui?.itemTrailing]}))},[ie(re.$slots,"item-trailing",{item:se,index:Tt,ui:Q.value}),d.value?T("",!0):(b(),O(f(g).ItemIndicator,{key:0,"as-child":""},{default:S(()=>[A(mt,{name:f(i).selectedIcon||f(u).ui.icons.check,"data-slot":"itemTrailingIcon",class:K(Q.value.itemTrailingIcon({class:[f(i).ui?.itemTrailingIcon,Te(se)&&se.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024))],2)])]),_:2},1032,["class","disabled","value","onSelect"]))]),_:3}),A(f(g).Root,Ce({ref_key:"comboboxRootRef",ref:Ta},f(h),{name:f(V),disabled:f(Y),"data-slot":"root",class:Q.value.root({class:[f(i).ui?.root,f(i).class]}),"as-child":!!f(i).multiple&&!d.value,"ignore-filter":"","onUpdate:modelValue":me,"onUpdate:open":yp}),{default:S(({modelValue:se,open:Tt})=>[A(f(g).Anchor,{"as-child":!f(i).multiple,"data-slot":"base",class:K(Q.value.base({class:f(i).ui?.base}))},{default:S(()=>[f(i).multiple&&!d.value?(b(),O(f(ch),{key:0,"model-value":se,disabled:f(Y),required:f(i).required,delimiter:"","as-child":"",onBlur:po,onFocus:Ba,onRemoveTag:vt=>vp(vt,se)},{default:S(({modelValue:vt})=>[(b(!0),_(W,null,de(vt,(Ue,xr)=>(b(),O(f(hh),{key:xr,value:Ue,"data-slot":"tagsItem",class:K(Q.value.tagsItem({class:[f(i).ui?.tagsItem,Te(Ue)&&Ue.ui?.tagsItem]}))},{default:S(()=>[A(f(vh),{"data-slot":"tagsItemText",class:K(Q.value.tagsItemText({class:[f(i).ui?.tagsItemText,Te(Ue)&&Ue.ui?.tagsItemText]}))},{default:S(()=>[ie(re.$slots,"tags-item-text",{item:Ue,index:xr},()=>[ne(E(ft(Ue)),1)])]),_:2},1032,["class"]),A(f(bh),{"data-slot":"tagsItemDelete",class:K(Q.value.tagsItemDelete({class:[f(i).ui?.tagsItemDelete,Te(Ue)&&Ue.ui?.tagsItemDelete]})),disabled:f(Y)},{default:S(()=>[ie(re.$slots,"tags-item-delete",{item:Ue,index:xr,ui:Q.value},()=>[A(mt,{name:f(i).deleteIcon||f(u).ui.icons.close,"data-slot":"tagsItemDeleteIcon",class:K(Q.value.tagsItemDeleteIcon({class:[f(i).ui?.tagsItemDeleteIcon,Te(Ue)&&Ue.ui?.tagsItemDeleteIcon]}))},null,8,["name","class"])])]),_:2},1032,["class","disabled"])]),_:2},1032,["value","class"]))),128)),A(f(g).Input,{modelValue:l.value,"onUpdate:modelValue":Ee[1]||(Ee[1]=Ue=>l.value=Ue),"as-child":""},{default:S(()=>[A(f(fh),Ce({id:f(X),ref_key:"inputRef",ref:te},{...re.$attrs,...f(ee)}
30,{placeholder:f(i).placeholder,"data-slot":"tagsInput",class:Q.value.tagsInput({class:f(i).ui?.tagsInput}),onChange:Ee[0]||(Ee[0]=mo(()=>{},["stop"]))}),null,16,["id","placeholder","class"])]),_:1},8,["modelValue"])]),_:3},8,["model-value","disabled","required","onRemoveTag"])):(b(),O(f(g).Input,Ce({key:1,id:f(X),ref_key:"inputRef",ref:te},{...d.value?{}:{displayValue:ft},...re.$attrs,...f(ee)},{type:f(i).type,placeholder:f(i).placeholder,required:f(i).required,onBlur:po,onFocus:Ba,onChange:Ee[2]||(Ee[2]=mo(()=>{},["stop"])),"onUpdate:modelValue":di}),null,16,["id","type","placeholder","required"])),f(ye)||f(i).avatar||s.leading?(b(),_("span",{key:2,"data-slot":"leading",class:K(Q.value.leading({class:f(i).ui?.leading}))},[ie(re.$slots,"leading",{modelValue:se,open:Tt,ui:Q.value},()=>[f(ye)&&f(I)?(b(),O(mt,{key:0,name:f(I),"data-slot":"leadingIcon",class:K(Q.value.leadingIcon({class:f(i).ui?.leadingIcon}))},null,8,["name","class"])):f(i).avatar?(b(),O(jr,Ce({key:1,size:f(i).ui?.itemLeadingAvatarSize||Q.value.itemLeadingAvatarSize()},f(i).avatar,{"data-slot":"itemLeadingAvatar",class:Q.value.itemLeadingAvatar({class:f(i).ui?.itemLeadingAvatar})}),null,16,["size","class"])):T("",!0)])],2)):T("",!0),f(L)||s.trailing||f(i).clear?(b(),O(f(g).Trigger,{key:3,"data-slot":"trailing",class:K(Q.value.trailing({class:f(i).ui?.trailing}))},{default:S(()=>[ie(re.$slots,"trailing",{modelValue:se,open:Tt,ui:Q.value},()=>[f(i).clear&&!wp(se)?(b(),O(f(g).Cancel,{key:0,"as-child":""},{default:S(()=>[A(Ae,Ce({as:"span",icon:f(i).clearIcon||f(u).ui.icons.close,size:we.value,variant:"link",color:"neutral",tabindex:"-1"},x.value,{"data-slot":"trailingClear",class:Q.value.trailingClear({class:f(i).ui?.trailingClear}),onClick:mo(_p,["stop"])}),null,16,["icon","size","class"])]),_:1})):f(oe)?(b(),O(mt,{key:1,name:f(oe),"data-slot":"trailingIcon",class:K(Q.value.trailingIcon({class:f(i).ui?.trailingIcon}))},null,8,["name","class"])):T("",!0)])]),_:2},1032,["class"])):T("",!0)]),_:2},1032,["as-child","class"]),A(f(g).Portal,pc(mc(f(y))),{default:S(()=>[A(f(Jp),null,{default:S(()=>[A(f(g).Content,Ce({"data-slot":"content",class:Q.value.content({class:f(i).ui?.content})},v.value,{onFocusOutside:Ee[3]||(Ee[3]=mo(()=>{},["prevent"]))}),{default:S(()=>[ie(re.$slots,"content-top"),A(f(g).Empty,{"data-slot":"empty",class:K(Q.value.empty({class:f(i).ui?.empty}))},{default:S(()=>[ie(re.$slots,"empty",{searchTerm:l.value},()=>[ne(E(l.value?f(a)("inputMenu.noMatch",{searchTerm:l.value}):f(a)("inputMenu.noData")),1)])]),_:3},8,["class"]),w("div",{ref_key:"viewportRef",ref:Ma,role:"presentation","data-slot":"viewport",class:K(Q.value.viewport({class:f(i).ui?.viewport}))},[f(i).virtualize?(b(),_(W,{key:0},[z.value&&ve.value==="top"?(b(),O(f(_e),{key:0})):T("",!0),A(f(g).Virtualizer,Ce({options:ae.value,"text-content":vt=>Te(vt)?f(Fn)(vt,f(i).labelKey):String(vt)},k.value),{default:S(({option:vt,virtualItem:Ue})=>[A(f(We),{item:vt,index:Ue.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),z.value&&ve.value==="bottom"?(b(),O(f(_e),{key:1})):T("",!0)],64)):(b(),_(W,{key:1},[z.value&&ve.value==="top"?(b(),O(f(g).Group,{key:0,"data-slot":"group",class:K(Q.value.group({class:f(i).ui?.group}))},{default:S(()=>[A(f(_e))]),_:1},8,["class"])):T("",!0),(b(!0),_(W,null,de(j.value,(vt,Ue)=>(b(),O(f(g).Group,{key:`group-${Ue}`,"data-slot":"group",class:K(Q.value.group({class:f(i).ui?.group}))},{default:S(()=>[(b(!0),_(W,null,de(vt,(xr,$a)=>(b(),O(f(We),{key:`group-${Ue}-${$a}`,item:xr,index:$a},null,8,["item","index"]))),128))]),_:2},1032,["class"]))),128)),z.value&&ve.value==="bottom"?(b(),O(f(g).Group,{key:1,"data-slot":"group",class:K(Q.value.group({class:f(i).ui?.group}))},{default:S(()=>[A(f(_e))]),_:1},8,["class"])):T("",!0)],64))],2),ie(re.$slots,"content-bottom"),f(i).arrow?(b(),O(f(g).Arrow,Ce({key:0},C.value,{"data-slot":"arrow",class:Q.value.arrow({class:f(i).ui?.arrow})}),null,16,["class"])):T("",!0)]),_:3},16,["class"])]),_:3})]),_:3},16)]),_:3},16,["name","disabled","class","as-child"])],64))}}),bS={slots:{root:"relative flex items-center select-none touch-none",track:"relative bg-accented overflow-hidden rounded-full grow",range:"absolute rounded-full",thumb:"rounded-full bg-default ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"},variants:{color:{primary:{range:"bg-primary",thumb:"ring-primary focus-visible:outline-primary/50"},secondary:{range:"bg-secondary",thumb:"ring-secondary focus-visible:outline-secondary/50"},success:{range:"bg-success",thumb:"ring-success focus-visible:outline-success/50"},info:{range:"bg-info",thumb:"ring-info focus-visible:outline-info/50"},warning:{range:"bg-warning",thumb:"ring-warning focus-visible:outline-warning/50"},error:{range:"bg-error",thumb:"ring-error focus-visible:outline-error/50"},neutral:{range:"bg-inverted",thumb:"ring-inverted focus-visible:outline-inverted/50"}},size:{xs:{thumb:"size-3"},sm:{thumb:"size-3.5"},md:{thumb:"size-4"},lg:{thumb:"size-4.5"},xl:{thumb:"size-5"}},orientation:{horizontal:{root:"w-full",range:"h-full"},vertical:{root:"flex-col h-full",range:"w-full"}}
30,disabled:{true:{root:"opacity-75 cursor-not-allowed"}}},compoundVariants:[{orientation:"horizontal",size:"xs",class:{track:"h-[6px]"}},{orientation:"horizontal",size:"sm",class:{track:"h-[7px]"}},{orientation:"horizontal",size:"md",class:{track:"h-[8px]"}},{orientation:"horizontal",size:"lg",class:{track:"h-[9px]"}},{orientation:"horizontal",size:"xl",class:{track:"h-[10px]"}},{orientation:"vertical",size:"xs",class:{track:"w-[6px]"}},{orientation:"vertical",size:"sm",class:{track:"w-[7px]"}},{orientation:"vertical",size:"md",class:{track:"w-[8px]"}},{orientation:"vertical",size:"lg",class:{track:"w-[9px]"}},{orientation:"vertical",size:"xl",class:{track:"w-[10px]"}}],defaultVariants:{size:"md",color:"primary"}},yS={__name:"USlider",props:xn({as:{type:null,required:!1},size:{type:null,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},tooltip:{type:[Boolean,Object],required:!1},defaultValue:{type:[Number,Array],required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},name:{type:String,required:!1},disabled:{type:Boolean,required:!1},inverted:{type:Boolean,required:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1}},{modelValue:{type:null},modelModifiers:{}}),emits:xn(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=e,o=Gn("slider",n),s=Re(t,"modelValue"),i=Kn(),l=Vs(js(o,"as","orientation","min","max","step","minStepsBetweenThumbs","inverted"),r),{id:a,emitFormChange:u,emitFormInput:c,size:d,color:p,name:m,disabled:h,ariaAttrs:g}=Dc(n),y=$(()=>typeof o.defaultValue=="number"?[o.defaultValue]:o.defaultValue),v=$({get(){return typeof s.value=="number"?[s.value]:s.value??y.value},set(D){s.value=D?.length!==1?D:D[0]}}),C=$(()=>v.value?.length??1),x=$(()=>gt({extend:gt(bS),...i.ui?.slider||{}})({disabled:h.value,size:d.value??o.size,color:p.value??o.color,orientation:o.orientation}));function k(D){const F=new Event("change",{target:{value:D}});r("change",F),u()}return(D,F)=>(b(),O(f($m),Ce({...f(l),...f(g)},{id:f(a),modelValue:v.value,"onUpdate:modelValue":[F[0]||(F[0]=B=>v.value=B),F[1]||(F[1]=B=>f(c)())],name:f(m),disabled:f(h),"data-slot":"root",class:x.value.root({class:[f(o).ui?.root,f(o).class]}),"default-value":y.value,onValueCommit:k}),{default:S(()=>[A(f(Vm),{"data-slot":"track",class:K(x.value.track({class:f(o).ui?.track}))},{default:S(()=>[A(f(Om),{"data-slot":"range",class:K(x.value.range({class:f(o).ui?.range}))},null,8,["class"])]),_:1},8,["class"]),(b(!0),_(W,null,de(C.value,B=>(b(),_(W,{key:B},[f(o).tooltip?(b(),O(bm,Ce({key:0,text:C.value>1?String(v.value?.[B-1]):String(v.value),"disable-closing-trigger":""},{ref_for:!0},typeof f(o).tooltip=="object"?f(o).tooltip:{}),{default:S(()=>[A(f(Oa),{"data-slot":"thumb",class:K(x.value.thumb({class:f(o).ui?.thumb})),"aria-label":C.value===1?"Thumb":`Thumb ${B} of ${C.value}`},null,8,["class","aria-label"])]),_:2},1040,["text"])):(b(),O(f(Oa),{key:1,"data-slot":"thumb",class:K(x.value.thumb({class:f(o).ui?.thumb})),"aria-label":C.value===1?"Thumb":`Thumb ${B} of ${C.value}`},null,8,["class","aria-label"]))],64))),128))]),_:1},16,["id","modelValue","name","disabled","class","default-value"]))}};function bp(t,e){const o=H(""),s=H([]),i=H(!1),l=H(null);let a=null,u=0;async function c(d){if(d.length<1)return;const p=++u;i.value=!0,l.value=null;try{const m=await t(d);p===u&&(s.value=m)}catch(m){p===u&&(l.value=m)}finally{p===u&&(i.value=!1)}}return ct(o,d=>{clearTimeout(a);const p=(d??"").trim();if(p.length<2){s.value=[],i.value=!1;return}a=setTimeout(()=>c(p),250)}),{q:o,items:s,pending:i,error:l,run:c}}function vS(){const{$directus:t,$readItems:e}=ot(),n=bp(async o=>(await t.request(e("clubs",{fields:["id","title"],filter:{title:{_icontains:o}},sort:["title"],limit:20}))??[]).map(i=>({id:String(i.id),label:i.title})));async function r(o){const i=(await t.request(e("clubs",{fields:["id","title"],filter:{id:{_eq:o}},limit:1})))?.[0];return i?{id:String(i.id),label:i.title}:null}return{...n,getById:r}}function xS(){const{$directus:t,$readItems:e}=ot(),n=bp(async o=>(await t.request(e("regional_associations",{fields:["id","title"],filter:{title:{_icontains:o}},sort:["title"],limit:20}))??[]).map(i=>({id:String(i.id),label:i.title})));async function r(o){const i=(await t.request(e("regional_associations",{fields:["id","title"],filter:{id:{_eq:o}},limit:1})))?.[0];return i?{id:String(i.id),label:i.title}:null}return{...n,getById:r}}const CS={class:"rounded-xl border border-gray-200 bg-white p-4 space-y-4"},wS={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},_S={class:"flex items-end gap-2"},kS={class:"flex items-end gap-2 w-full"},AS={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-6 mt-4 p-4"},DS={class:"flex items-center justify-between"},SS={class:"flex items-center justify-between"},ES={class:"text-sm font-medium"},FS={class:"flex justify-between text-sm text-gray-500 mb-1"},BS={class:"flex justify-between text-sm text-gray-500 mb-1"},RS={class:"flex items-center mt-6 gap-2"},ji="-stat_elo_std",MS=J({__name:"MemberFilter",props:{initialFilters:{default:()=>({})},countries:{default:()=>[]},ageMin:{default:0},ageMax:{default:100},ageStep:{default:1},eloMin:{default:0},eloMax:{default:2950},eloStep:{default:50}},emits:["apply","reset"],setup(t,{emit:e}){const{t:n}=Le(),r=t,o=$(()=>[r.ageMin,r.ageMax]),s=$(()=>[r.eloMin,r.eloMax]),i=e,l=H(!1),a=vS(),u=xS(),c=Us({query:"",lastName:"",firstName:"",age:[r.ageMin,r.ageMax],elo:[r.eloMin,r.eloMax],clubId:"",mainClubOnly:!1,regionalAssociationId:"",womenOnly:!1,honoraryMember:!1,country:"",sort:ji});function d(){const L={},I=h(c.age,o.value),oe=h(c.elo,s.value);return c.query.trim()&&(L.query=c.query.trim()),c.lastName.trim()&&(L.lastName=c.lastName.trim()),c.firstName.trim()&&(L.firstName=c.firstName.trim()),(I[0]!==r.ageMin||I[1]!==r.ageMax)&&(L.age=I),(oe[0]!==r.eloMin||oe[1]!==r.eloMax)&&(L.elo=oe),c.clubId&&(L.clubId=c.clubId),c.clubId&&c.mainClubOnly&&
30(L.mainClubOnly=!0),c.regionalAssociationId&&(L.regionalAssociationId=c.regionalAssociationId),c.womenOnly&&(L.womenOnly=!0),c.country&&(L.country=c.country),c.honoraryMember&&(L.honoraryMember=!0),c.sort&&(L.sort=c.sort),L}const p=$({get:()=>h(c.age,o.value),set:L=>{c.age=h(L,o.value)}}),m=$({get:()=>h(c.elo,s.value),set:L=>{c.elo=h(L,s.value)}});function h(L,I){if(!Array.isArray(L)||L.length<2)return[...I];const oe=Number(L[0]),we=Number(L[1]);if(!Number.isFinite(oe)||!Number.isFinite(we))return[...I];if(oe===we&&oe===I[0])return[...I];const Be=Math.max(I[0],Math.min(Math.trunc(oe),I[1])),_e=Math.max(I[0],Math.min(Math.trunc(we),I[1]));return Be<=_e?[Be,_e]:[_e,Be]}const g=$(()=>Object.keys(d()).length-1);function y(){i("apply",d())}function v(){c.query="",c.lastName="",c.firstName="",c.age=[...o.value],c.elo=[...s.value],c.clubId="",c.mainClubOnly=!1,a.q.value="",x.value=null,c.regionalAssociationId="",u.q.value="",k.value=null,c.womenOnly=!1,c.honoraryMember=!1,c.country="",c.sort=ji,i("reset"),i("apply",{})}const C=$({get:()=>a.q.value,set:L=>{a.q.value=L}}),x=H(null),k=H(null),D=$(()=>N(a.items.value,x.value)),F=$(()=>a.pending.value),B=$({get:()=>u.q.value,set:L=>{u.q.value=L}}),R=$(()=>N(u.items.value,k.value)),q=$(()=>u.pending.value);function N(L,I){return I?L.some(oe=>oe.id===I.id)?L:[I,...L]:L}function X(L){x.value=Y(G(L),D.value),a.q.value=x.value?.label??""}function V(L){k.value=Y(G(L),R.value),u.q.value=k.value?.label??""}function G(L){return L?typeof L=="object"&&"id"in L?String(L.id):String(L):""}function Y(L,I){return L?I.find(oe=>oe.id===String(L))??null:null}async function ee(){c.clubId?(x.value=Y(c.clubId,D.value)??await a.getById(c.clubId),a.q.value=x.value?.label??""):(x.value=null,a.q.value=""),c.regionalAssociationId?(k.value=Y(c.regionalAssociationId,R.value)??await u.getById(c.regionalAssociationId),u.q.value=k.value?.label??""):(k.value=null,u.q.value="")}async function ue(L){c.query=L.query??"",c.lastName=L.lastName??"",c.firstName=L.firstName??"",c.age=h(L.age,o.value),c.elo=h(L.elo,s.value),c.clubId=L.clubId??"",c.mainClubOnly=L.mainClubOnly===!0,c.regionalAssociationId=L.regionalAssociationId??"",c.womenOnly=L.womenOnly===!0,c.honoraryMember=L.honoraryMember===!0,c.country=L.country??"",c.sort=L.sort??ji,await ee()}ct(()=>r.initialFilters,L=>{ue(L??{})},{immediate:!0,deep:!0});const le=$(()=>[{label:n("memberFilter.sort.alphabetical"),value:"last_name, first_name",icon:"i-lucide-arrow-down-a-z"},{label:n("memberFilter.sort.elo"),value:"-stat_elo_std",icon:"i-lucide-arrow-up-1-0"}]),ye=$(()=>le.value.find(L=>L.value===c.sort)?.icon);return(L,I)=>{const oe=Hs,we=vc,Be=to,_e=Ae,it=nm,We=xc,Q=gS,yt=yS,ft=pr;return b(),_("div",CS,[w("div",wS,[A(we,{label:f(n)("memberFilter.search.label")},{default:S(()=>[A(oe,{modelValue:f(c).query,"onUpdate:modelValue":I[0]||(I[0]=M=>f(c).query=M),placeholder:f(n)("memberFilter.search.placeholder"),onKeydown:Rr(y,["enter"]),class:"w-full"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w("div",_S,[A(_e,{color:"neutral",variant:"soft",icon:f(l)?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:I[1]||(I[1]=M=>l.value=!f(l)),block:"",class:"flex-2"},{default:S(()=>[ne(E(f(n)("memberFilter.actions.advanced"))+" ",1),f(g)?(b(),O(Be,{key:0,class:"ml-2",variant:"solid",size:"sm"},{default:S(()=>[ne(E(f(g)),1)]),_:1})):T("",!0)]),_:1},8,["icon"]),A(it,{class:"flex-1",color:"neutral",variant:"soft",modelValue:f(c).sort,"onUpdate:modelValue":I[2]||(I[2]=M=>f(c).sort=M),items:f(le),"value-key":"value",icon:f(ye),onChange:y},null,8,["modelValue","items","icon"])]),w("div",kS,[A(_e,{color:"neutral",block:"",variant:"soft",icon:"i-lucide-rotate-ccw",onClick:v},{default:S(()=>[ne(E(f(n)("memberFilter.actions.reset")),1)]),_:1}),A(_e,{block:"",icon:"i-lucide-search",onClick:y},{default:S(()=>[ne(E(f(n)("memberFilter.actions.apply")),1)]),_:1})])]),A(ft,{open:f(l),"onUpdate:open":I[14]||(I[14]=M=>ke(l)?l.value=M:null)},{content:S(()=>[w("div",AS,[A(we,{label:f(n)("memberFilter.fields.lastName")},{default:S(()=>[A(oe,{modelValue:f(c).lastName,"onUpdate:modelValue":I[3]||(I[3]=M=>f(c).lastName=M),placeholder:"Meier",onKeydown:Rr(y,["enter"]),class:"w-full"},null,8,["modelValue"])]),_:1},8,["label"]),A(we,{label:f(n)("memberFilter.fields.firstName")},{default:S(()=>[A(oe,{modelValue:f(c).firstName,"onUpdate:modelValue":I[4]||(I[4]=M=>f(c).firstName=M),placeholder:"Anna",onKeydown:Rr(y,["enter"]),class:"w-full"},null,8,["modelValue"])]),_:1},8,["label"]),A(we,{label:"Club",class:"w-full",ui:{label:"w-full"}},{label:S(()=>[w("div",DS,[w("div",null,E(f(n)("memberFilter.fields.club")),1),w("div",null,[A(We,{modelValue:f(c).mainClubOnly,"onUpdate:modelValue":I[5]||(I[5]=M=>f(c).mainClubOnly=M),label:f(n)("memberFilter.fields.mainClubOnly"),disabled:!f(c).clubId},null,8,["modelValue","label","disabled"])])])]),default:S(()=>[A(Q,{modelValue:f(c).clubId,"onUpdate:modelValue":[I[6]||(I[6]=M=>f(c).clubId=M),X],items:f(D),"value-key":"id","label-key":"label",loading:f(F),placeholder:f(n)("memberFilter.placeholders.club"),searchable:"",trailing:"",clear:"",class:"w-full","search-term":f(C),"onUpdate:searchTerm":I[7]||(I[7]=M=>{C.value=M,f(a).run(M)})},null,8,["modelValue","items","loading","placeholder","search-term"]),I[15]||(I[15]=w("div",{class:"mt-2"},null,-1))]),_:1}),A(we,{class:"w-full",ui:{label:"w-full"}},{label:S(()=>[w("div",SS,[w("div",null,E(f(n)("memberFilter.fields.regionalAssociation")),1),I[16]||(I[16]=w("div",null,null,-1))])]),default:S(()=>[A(Q,{modelValue:f(c).regionalAssociationId,"onUpdate:modelValue":[I[8]||(I[8]=M=>f(c).regionalAssociationId=M),V],items:f(R),"value-key":"id","label-key":"label",loading:f(q),class:"w-full",placeholder:f(n)("memberFilter.placeholders.regionalAssociation"),icon:"i-lucide-search",searchable:"",trailing:"",clear:"","search-term":f(B),"onUpdate:searchTerm":I[9]||(I[9]=M=>{B.value=M,f(u).run(M)})},null,8,["modelValue","items","loading","placeholder","search-term"])]),_:1}),w("div",null,[w("label",ES,E(f(n)("memberFilter.fields.age")),1),w("div",FS,[w("span",null,E(f(p)[0]),1),w("span",null,E(f(p)[1]),1)]),A(yt,{modelValue:f(p),"onUpdate:modelValue":I[10]||(I[10]=M=>ke(p)?p.value=M:null),"default-value":f(o),min:t.ageMin,max:t.ageMax,step:t.ageStep},null,8,["modelValue","default-value","min","max","step"])]),w("div",null,[I[17]||(I[17]=w("label",{class:"text-sm font-medium"},"Elo",-1)),w("div",BS,[w("span",null,E(f(m)[0]),1),w("span",null,E(f(m)[1]),1)]),A(yt,{modelValue:f(m),"onUpdate:modelValue":I[11]||(I[11]=M=>ke(m)?m.value=M:null),"default-value":f(s),min:t.eloMin,max:t.eloMax,step:t.eloStep},null,8,["modelValue","default-value","min","max","step"])]),w("div",RS,[A(We,{modelValue:f(c).womenOnly,"onUpdate:modelValue":I[12]||(I[12]=M=>f(c).womenOnly=M),label:f(n)("memberFilter.fields.womenOnly")},null,8,["modelValue","label"]),A(We,{modelValue:f(c).honoraryMember,"onUpdate:modelValue":I[13]||(I[13]=M=>f(c).honoraryMember=M),label:f(n)("memberFilter.fields.honoraryMembers")},null,8,["modelValue","label"])]),I[18]||(I[18]=w("div",{class:"flex items-center mt-6"},null,-1))])]),_:1},8,["open"])])}}}),TS=Object.assign(MS,{__name:"Lucerne360BlocksMemberFilter"});function $S(t,e){const n=new Date,r=new Date(n);r.setFullYear(n.getFullYear()-e);const o=new Date(n);return o.setFullYear(n.getFullYear()-t),{from:r.getFullYear(),to:o.getFullYear()}}function $t(t,e){e&&Object.keys(e).length&&t.push(e)}function IS(){const{$directus:t,$readItems:e,$aggregate:n}=ot();async function r(o,s={}){const i=s.page??1,l=s.limit??50,a=s.sort??["last_name","first_name"],u=s.fields??["id","fide_id","first_name","last_name","year_of_birth","stat_elo_std","license_code","gender","nationality","category","clubs.*","clubs.clubs_id.id","clubs.clubs_id.title"],c={firstName:"first_name",lastName:"last_name",birthdate:"year_of_birth",elo:"stat_elo_std",gender:"gender",honorary:"honorary_member",country:"nationality",...s.fieldMap??{}},d={clubs:"clubs",clubsClubId:"clubs_id",clubsSort:"sort",memberClubs:"clubs",memberClubsClub:"clubs_id",memberClubsSort:"sort",clubRegionalAssocs:"regional_associations",clubRegionalAssocsRa:"regional_associations_id",...s.relationMap??{}},p=[];
30if(o.query?.trim()){const g=o.query.trim().split(/\s+/).filter(Boolean).slice(0,5).map(y=>{const v=/^\d+$/.test(y)?Number(y):null,C=[{[c.firstName]:{_icontains:y}},{[c.lastName]:{_icontains:y}}];return v!==null&&C.push({id:{_eq:v}}),{_or:C}});$t(p,{_and:g})}if(o.lastName?.trim()&&$t(p,{[c.lastName]:{_icontains:o.lastName.trim()}}),o.firstName?.trim()&&$t(p,{[c.firstName]:{_icontains:o.firstName.trim()}}),o.age){const[h,g]=o.age,{from:y,to:v}=$S(h,g),C={[c.birthdate]:{_between:[y,v]}};$t(p,h===0&&g===100?{_or:[C,{[c.birthdate]:{_null:!0}}]}:C)}if(o.elo){const[h,g]=o.elo;$t(p,{[c.elo]:{_between:[h,g]}})}if(o.womenOnly&&$t(p,{[c.gender]:{_eq:"female"}}),o.country&&$t(p,{[c.country]:{_eq:o.country}}),o.honoraryMember&&$t(p,{[c.honorary]:{_eq:!0}}),o.clubId){const h={[d.clubsClubId]:{id:{_eq:o.clubId}}};o.mainClubOnly&&(h[d.clubsSort]={_eq:1}),$t(p,{[d.clubs]:h})}else o.mainClubOnly;o.regionalAssociationId&&o.mainClubOnly?$t(p,{[d.memberClubs]:{[d.memberClubsSort]:{_eq:1},[d.memberClubsClub]:{[d.clubRegionalAssocs]:{[d.clubRegionalAssocsRa]:{id:{_eq:o.regionalAssociationId}}}}}}):o.regionalAssociationId&&$t(p,{[d.memberClubs]:{[d.memberClubsClub]:{[d.clubRegionalAssocs]:{[d.clubRegionalAssocsRa]:{id:{_eq:o.regionalAssociationId}}}}}});const m=p.length?{_and:p}:{};if(s.stats&&s.stats!==""){let h,g;switch(s.stats){case"std":h="stat_elo_std",g={[h]:{_nnull:!0,_gt:0}};break;case"rpd":h="stat_elo_rpd",g={[h]:{_nnull:!0,_gt:0}};break;case"blz":h="stat_elo_blz",g={[h]:{_nnull:!0,_gt:0}};break;default:h="stat_elo_std",g={[h]:{_nnull:!0,_gt:0}}}return await t.request(n("members",{aggregate:{avg:[h],count:"*"},query:{filter:{_and:[m,g]}}}))}return await $fetch("/lucerne360/items/members",{query:{fields:u,filter:m,sort:a,page:i,limit:l,meta:"filter_count"}})}return{fetchMembers:r}}const LS={class:"space-y-6"},OS={key:0,class:"text-sm text-gray-500"},NS={class:"w-[200px] overflow-hidden text-ellipsis whitespace-nowrap"},qS={class:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"},zS={class:"w-full flex justify-center text-center sm:w-auto sm:justify-start sm:text-left"},PS={class:"text-sm text-muted"},VS={class:"w-full flex justify-center sm:w-auto sm:justify-end"},jS={class:"flex gap-2 items-center"},HS={class:"flex flex-col gap-3 rounded-lg bg-gray-50 p-4 sm:flex-row sm:items-center sm:justify-between"},US={class:"text-sm text-muted"},GS={class:"font-semibold text-default"},Oo="-stat_elo_std",KS=J({__name:"MemberListFiltered",setup(t){const{fetchMembers:e}=IS(),{t:n}=Le(),r=rm(),o=om(),s=[0,100],i=[0,2950],l=Y(r.query),a=H([]),u=H(!1),c=H(null),d=H(25),p=H(l.page),m=H(1),h=H(!1),g=H(l.filters),y=H({...l.filters});let v=!1;async function C(M){const j=_e(M);try{v=!0,p.value=1,await G(j,1),await x(j),await ut()}finally{v=!1}}async function x(M){const j=_e(M);u.value=!0,g.value=j;try{const ae=await e(j,{page:p.value,limit:d.value,sort:j.sort||Oo});a.value=ae.data??ae,c.value=ae.meta?.filter_count??null,c.value?m.value=Math.max(1,Math.ceil(c.value/d.value)):m.value=1}finally{u.value=!1,k.value=""}}dt(async()=>{await G(g.value,p.value),await x(g.value)}),ct(()=>p.value,async()=>{if(v)return;const M=_e(g.value);await G(M,p.value),await x(M)});const k=H("");async function D(){const j=(await e(_e(g.value),{stats:"std"}))?.[0]??null;if(!j)return k.value="–";const ae=Math.round(j.avg.stat_elo_std);k.value=n("memberListFiltered.stats.averageElo",{elo:ae,count:j.count})}function F(M){return M.original.clubs?.map(j=>j.clubs_id?.title).join(", ")}const{getMemberLink:B}=Ut();function R(M){o.push(B(M.original))}const q=$(()=>[{accessorKey:"id",header:n("memberListFiltered.columns.code")},{id:"fide",header:n("memberListFiltered.columns.fideId")},{id:"name",header:n("memberListFiltered.columns.lastName")},{id:"first_name",header:n("memberListFiltered.columns.firstName")},{accessorKey:"license_code",header:n("memberListFiltered.columns.license")},{id:"elo",header:n("memberListFiltered.columns.elo")},{id:"cat",header:n("memberListFiltered.columns.category")},{id:"club",header:n("memberListFiltered.columns.section")},{id:"action"}]),N=$(()=>{const M=o.resolve({path:r.path,query:ue(g.value,p.value)}).href;return new URL(M,window.location.origin).toString()});async function X(){navigator.clipboard?.writeText?await navigator.clipboard.writeText(N.value):V(N.value),h.value=!0,window.setTimeout(()=>{h.value=!1},1800)}function V(M){const j=document.createElement("textarea");j.value=M,j.setAttribute("readonly",""),j.style.position="fixed",j.style.opacity="0",document.body.appendChild(j),j.select(),document.execCommand("copy"),j.remove()}async function G(M,j){const ae=ue(M,j);yt(r.query,ae)||await o.replace({query:ae})}function Y(M){const j={},ae=le(M.q??M.query??M.search),z=le(M.last_name??M.lastName),ve=le(M.first_name??M.firstName),te=le(M.club??M.clubId),fe=le(M.ra??M.regional_association??M.regionalAssociationId),me=We(M.sortby??M.sort),di=oe(M.age,s)??I(M.age_min??M.ageMin,M.age_max??M.ageMax),po=oe(M.elo,i)??I(M.elo_min??M.eloMin,M.elo_max??M.eloMax);return ae&&(j.query=ae),z&&(j.lastName=z),ve&&(j.firstName=ve),j.age=di??s,j.elo=po??i,te&&(j.clubId=te),L(M.main??M.mainClubOnly)&&(j.mainClubOnly=!0),fe&&(j.regionalAssociationId=fe),L(M.women??M.womenOnly)&&
30(j.womenOnly=!0),L(M.honorary??M.honoraryMember)&&(j.honoraryMember=!0),le(M.country)&&(j.country=le(M.country)),j.sort=me||Oo,{filters:_e(j),page:Math.max(1,ye(M.page)??1)}}const ee=["q","query","search","last_name","lastName","first_name","firstName","age","age_min","ageMin","age_max","ageMax","elo","elo_min","eloMin","elo_max","eloMax","club","clubId","main","mainClubOnly","ra","regional_association","regionalAssociationId","women","womenOnly","honorary","honoraryMember","country","sortby","sort","page"];function ue(M,j){const ae={...r.query};for(const te of ee)delete ae[te];M.query&&(ae.q=M.query),M.lastName&&(ae.last_name=M.lastName),M.firstName&&(ae.first_name=M.firstName);const z=_e(M);z.age&&!Be(z.age,s)&&(ae.age=we(z.age)),z.elo&&!Be(z.elo,i)&&(ae.elo=we(z.elo)),z.clubId&&(ae.club=z.clubId),z.mainClubOnly&&(ae.main="1"),z.regionalAssociationId&&(ae.ra=z.regionalAssociationId),z.womenOnly&&(ae.women="1"),z.honoraryMember&&(ae.honorary="1"),z.country&&(ae.country=z.country);const ve=Q(z.sort);return ve&&(ae.sortby=ve),j>1&&(ae.page=String(j)),ae}function le(M){const j=Array.isArray(M)?M[0]:M;return typeof j=="string"?j.trim():j!=null?String(j).trim():""}function ye(M){const j=Number(le(M));return Number.isFinite(j)?Math.trunc(j):null}function L(M){const j=le(M).toLowerCase();return["1","true","yes","ja","oui","si"].includes(j)}function I(M,j){const ae=ye(M),z=ye(j);return ae!=null&&z!=null?[ae,z]:void 0}function oe(M,j){const ae=le(M);if(!ae)return;const[z,ve]=ae.split(/[-:,]/).map(te=>Number(te.trim()));return it(Number.isFinite(z)&&Number.isFinite(ve)?[Math.trunc(z),Math.trunc(ve)]:void 0,j)}function we(M){return`${M[0]}-${M[1]}`}function Be(M,j){return M[0]===j[0]&&M[1]===j[1]}function _e(M){return{...M,age:it(M.age,s),elo:it(M.elo,i),sort:M.sort||Oo}}function it(M,j){if(!Array.isArray(M)||M.length<2)return[...j];const ae=Number(M[0]),z=Number(M[1]);return!Number.isFinite(ae)||!Number.isFinite(z)?[...j]:ae===z&&ae===j[0]?[...j]:ae<=z?[Math.trunc(ae),Math.trunc(z)]:[Math.trunc(z),Math.trunc(ae)]}function We(M){const j=le(M);return{"-elo_stats":"-stat_elo_std","-elo":"-stat_elo_std",elo:"-stat_elo_std",elo_desc:"-stat_elo_std",name:"last_name, first_name",alphabetical:"last_name, first_name"}[j]??j}function Q(M){return!M||M===Oo?"":M==="last_name, first_name"?"name":M}function yt(M,j){return JSON.stringify(ft(M))===JSON.stringify(ft(j))}function ft(M){return Object.fromEntries(Object.entries(M).filter(([,j])=>j!=null&&j!=="").sort(([j],[ae])=>j.localeCompare(ae)))}return(M,j)=>{const ae=mt,z=nn,ve=ci,te=ii,fe=Ae;return b(),_("div",LS,[A(TS,{"initial-filters":f(y),onApply:C},null,8,["initial-filters"]),f(u)?(b(),_("div",OS,E(f(n)("memberListFiltered.loading")),1)):T("",!0),A(ve,{columns:f(q),data:f(a),loading:f(u),sticky:"",onSelect:R,ui:{tr:"transition-colors hover:bg-gray-100 dark:hover:bg-gray-800"}},{"fide-cell":S(({row:me})=>[ne(E(me.original.fide_id||"–"),1)]),"name-cell":S(({row:me})=>[ne(E(me.original.last_name),1)]),"first_name-cell":S(({row:me})=>[ne(E(me.original.first_name),1)]),"elo-cell":S(({row:me})=>[me.original.stat_elo_std?(b(),_(W,{key:0},[ne(E(me.original.stat_elo_std),1)],64)):(b(),_(W,{key:1},[ne(" – ")],64))]),"cat-cell":S(({row:me})=>[ne(E(me.original.category),1)]),"club-cell":S(({row:me})=>[w("div",NS,E(F(me)),1)]),"action-cell":S(({row:me})=>[A(z,{to:f(B)(me.original),class:"text-primary"},{default:S(()=>[A(ae,{name:"i-lucide-chart-line"}),ne(" "+E(f(n)("memberListFiltered.actions.profile")),1)]),_:1},8,["to"])]),_:1},8,["columns","data","loading"]),w("div",qS,[w("div",zS,[w("span",PS,E(f(n)("memberListFiltered.pagination",{total:f(c),page:f(p),totalPages:f(m)})),1)]),w("div",VS,[A(te,{page:f(p),"onUpdate:page":j[0]||(j[0]=me=>ke(p)?p.value=me:null),total:f(c),"page-count":f(d),"items-per-page":f(d),class:"my-4"},null,8,["page","total","page-count","items-per-page"])])]),w("div",jS,[A(fe,{icon:"i-lucide-circle-slash-2",onClick:j[1]||(j[1]=me=>D()),variant:"ghost"},{default:S(()=>[ne(E(f(n)("memberListFiltered.actions.calculateElo")),1)]),_:1}),w("div",null,E(f(k)),1)]),w("div",HS,[w("div",US,[w("div",GS,E(f(n)("memberListFiltered.permalink.title")),1),w("div",null,E(f(n)("memberListFiltered.permalink.description")),1)]),A(fe,{icon:"i-lucide-copy",color:"neutral",variant:"soft",class:"shrink-0",onClick:X},{default:S(()=>[ne(E(f(h)?f(n)("memberListFiltered.permalink.copied"):f(n)("memberListFiltered.permalink.copy")),1)]),_:1})])])}}}),WS=Object.assign(KS,{__name:"Lucerne360BlocksMemberListFiltered"}),JS={key:0},YS={key:1},QS={key:2},ZS={key:3},XS={key:4},e3={key:5},t3=J({__name:"Members",props:{id:{},type:{}},setup(t){const n=Wn().public.debug;return(r,o)=>t.type==="details"&&f(n)==="true"?(b(),_("div",JS,[A(cm)])):t.type==="list"?(b(),_("div",YS,[A(WS)])):t.type==="arbiters"?(b(),_("div",QS,[A(tD)])):t.type==="clubs"?(b(),_("div",ZS,[A(ZD)])):t.type==="stats"?(b(),_("div",XS,[A(ym)])):t.type==="regional_associations"?(b(),_("div",e3,[A(mS)])):T("",!0)}}),n3=Object.assign(t3,{__name:"Lucerne360BlocksMembers"}),r3=J({__name:"FlexibleEditor",props:{id:{},content:{},editor_nodes:{},translations:{}},setup(t){const{pickTD:e}=Se();return(n,r)=>(b(),O(xa,{nodes:f(e)(t.translations,t.editor_nodes,"editor_nodes"),content:f(e)(t.translations,t.content,"content")},null,8,["nodes","content"]))}}),o3=Object.assign(r3,{__name:"Lucerne360BlocksFlexibleEditor"}),s3=["onClick"],i3=["src","alt"],l3={key:1,class:"flex justify-center"},a3={class:"inline-block"},u3=["src","alt"],c3={class:"caption p-2 px-4"},d3={class:"p-3"},f3=["src","alt"],p3={class:"mt-3 flex items-center justify-between"},m3={class:"text-xs opacity-70"},h3={class:"caption p-2 px-4"},g3={class:"text-center"},b3=J({__name:"Images",props:{id:{},items:{}},setup(t){const{pick:e}=Se(),n=H(!1),r=H(0);function o(s){r.value=s,n.value=!0}return(s,i)=>{const l=zs,a=Ae,u=_n;return b(),_(W,null,[t.items.length>1?(b(),O(l,{key:0,prev:{variant:"soft"},next:{variant:"soft"},items:t.items,ui:{item:"basis-full ps-0 pe-2 sm:basis-1/2 md:basis-1/3 lg:basis-1/4",prev:"sm:start-8",next:"sm:end-8",container:"ms-0"},class:"w-full",indicators:"",arrows:""},{default:S(({item:c,index:d})=>[w("div",{class:"relative group w-full overflow-hidden rounded-lg hover:cursor-pointer",onClick:p=>o(d)},[w("img",{src:"/lucerne360/assets/"+c.directus_files_id.id+"?key=thumbn
30ail",alt:c.alt||"",class:"h-50 w-full object-cover transition group-hover:brightness-75",loading:"lazy"},null,8,i3),i[4]||(i[4]=w("div",{class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-200 bg-black/20"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[w("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z"})])],-1))],8,s3)]),_:1},8,["items"])):(b(),_("div",l3,[w("div",a3,[w("div",{class:"relative group cursor-pointer overflow-hidden rounded-lg w-auto justify-center",onClick:i[0]||(i[0]=c=>o(0))},[w("img",{src:"/lucerne360/assets/"+t.items[0].directus_files_id.id+"?key=miniatur",alt:t.items[0].alt||"",class:"object-cover rounded-lg transition duration-200 hover:brightness-75",loading:"lazy"},null,8,u3),i[5]||(i[5]=w("div",{class:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-200 bg-black/20 w-auto"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[w("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z"})])],-1))]),w("figcaption",c3,E(f(e)(t.items[0].directus_files_id,"description")),1)])])),A(u,{open:f(n),"onUpdate:open":i[3]||(i[3]=c=>ke(n)?n.value=c:null),ui:{width:"sm:max-w-5xl"},"close-icon":"i-lucide-arrow-right"},{content:S(()=>[w("div",d3,[w("img",{src:"/lucerne360/assets/"+t.items[f(r)]?.directus_files_id.id+"key=max",alt:t.items[f(r)]?.alt||"",class:"max-h-[80vh] w-full object-contain rounded-lg"},null,8,f3),w("div",p3,[A(a,{avatar:{icon:"iconify i-lucide:arrow-left"},size:"md",color:"neutral",variant:"soft",class:"rounded-full",disabled:f(r)===0,onClick:i[1]||(i[1]=c=>r.value--)},null,8,["disabled"]),w("div",m3,[w("div",h3,E(f(e)(t.items[f(r)].directus_files_id,"description")),1),w("div",g3,E(f(r)+1)+" / "+E(t.items.length),1)]),A(a,{avatar:{icon:"iconify i-lucide:arrow-right"},size:"md",color:"neutral",variant:"soft",class:"rounded-full",disabled:f(r)===t.items.length-1,onClick:i[2]||(i[2]=c=>r.value++)},null,8,["disabled"])])])]),_:1},8,["open"])],64)}}}),y3=Object.assign(b3,{__name:"Lucerne360BlocksImages"}),v3={class:"p-4"},x3=J({__name:"LazyAccordionItem",props:{item:{}},setup(t){const{pick:e}=Se(),n=H(t.item.open||!1),r=$(()=>n.value?"i-lucide-chevron-up":"i-lucide-chevron-down"),o=$(()=>n.value?"font-semibold":""),s=H(t.item.blocks?{blocks:t.item.blocks}:null),i=H(!1);async function l(a){if(!(s.value||i.value)){i.value=!0;try{s.value=await $fetch(`/api/accordion/${a}`)}finally{i.value=!1}}}return(a,u)=>{const c=Ae,d=pr;return b(),O(d,{open:f(n),"onUpdate:open":[u[0]||(u[0]=p=>ke(n)?n.value=p:null),u[1]||(u[1]=p=>l(t.item.id))],class:"flex flex-col gap-2 w-full py-1"},{content:S(()=>[w("div",v3,[f(s)?(b(),O(Et,{key:0,blocks:f(s).blocks},null,8,["blocks"])):T("",!0)])]),default:S(()=>[A(c,{label:f(e)(t.item,"title"),color:"neutral",variant:"accordion",size:"xl",loading:f(i),"loading-icon":"i-lucide-loader",class:K(f(o)),"trailing-icon":f(r),block:""},null,8,["label","loading","class","trailing-icon"])]),_:1},8,["open"])}}}),C3=Object.assign(x3,{__name:"Lucerne360BlocksAccordionLazyAccordionItem"}),w3={key:"item.id"},_3=J({__name:"Accordion",props:{items:{}},setup(t){const e=t;return(n,r)=>(b(!0),_(W,null,de(e.items,o=>(b(),_("div",w3,[A(C3,{item:o},null,8,["item"])]))),128))}}),k3=Object.assign(_3,{__name:"Lucerne360BlocksAccordion"}),A3=J({__name:"Real3DFlipbook",props:{pdfUrl:{}},setup(t){const e=t,n=H(null);let r=null;return dt(()=>{ut(()=>{if(!n.value)return;const o={pdfUrl:e.pdfUrl,sound:!1,btnShare:!1,btnPrint:!1,btnDownloadPages:!1,btnDownloadPdf:{enabled:!1},btnSound:!1,btnBookmark:!1,btnAutoplay:!1};r=new window.FlipBook(n.value,o)})}),oo(()=>{r?.destroy?.(),r=null}),(o,s)=>{const i=Sc;return b(),O(i,{class:""},{default:S(()=>[w("div",{ref_key:"container",ref:n,class:"flipbook-container h-100 w-full bg-amber-300"},null,512)]),_:1})}}}),D3=Object.assign(io(A3,[["__scopeId","data-v-90b47b67"]]),{__name:"Lucerne360BlocksFlipbookReal3DFlipbook"}),S3=J({__name:"Flipbook",props:{id:{},pdf:{}},setup(t){const e=t,n=$(()=>"/lucerne360/assets/"+e.pdf?.id+"/"+e.pdf?.filename_download);return(r,o)=>{const s=kc;return b(),O(s,null,{default:S(()=>[e.pdf?(b(),O(D3,{key:0,"pdf-url":f(n)},null,8,["pdf-url"])):T("",!0)]),_:1})}}}),E3=Object.assign(S3,{__name:"Lucerne360BlocksFlipbook"}),F3={key:0},B3={key:0,class:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3"},R3={key:2,class:"space-y-4"},M3={class:"text-2xl font-bold"},T3={class:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"},$3={class:"h-full overflow-hidden rounded-lg bg-default p-4 text-black ring ring-default divide-y divide-default hover:bg-slate-50"},I3={class:"font-bold"},L3={class:"my-1 truncate text-sm"},O3={key:0,class:"text-sm text-muted"},N3={class:"text-sm text-muted"},q3={class:"mt-2"},z3={key:3,class:"space-y-2"},P3={class:"p-4"},V3={class:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"},j3={class:"h-full overflow-hidden rounded-lg bg-default p-4 text-black ring ring-default divide-y divide-default hover:bg-slate-50"},H3={class:"font-bold"},U3={class:"my-1 truncate text-sm"},G3={key:0,class:"text-sm text-muted"},K3={class:"text-sm text-muted"},W3={class:"mt-2"},J3=J({__name:"Squads",props:{squads:{}},async setup(t){let e,n;const r=t,{t:o}=Le(),{pick:s}=Se(),{getMemberLink:i}=Ut(),l=Us({}),a=$(()=>g(r.squads)),u=$(()=>`/api/people/squads?ids=${encodeURIComponent(a.value.join(","))}`),{data:c,pending:d,error:p}=([e,n]=Qe(()=>gc(u,{default:()=>[]}
30,"$ppS4c-Q5hI")),e=await e,n(),e),m=$(()=>c.value??[]),h=$(()=>m.value.length===1?m.value[0]:null);function g(V){return(Array.isArray(V)?V:V==null?[]:[V]).flatMap(Y=>y(Y)).flatMap(Y=>String(Y).split(",")).map(Y=>Y.trim()).filter(Boolean).filter((Y,ee,ue)=>ue.indexOf(Y)===ee)}function y(V){if(Array.isArray(V))return V.flatMap(y);if(V&&typeof V=="object"){const G=V;if("special_lists_id"in G)return y(G.special_lists_id);if("squad"in G)return y(G.squad);if("id"in G)return y(G.id)}return typeof V=="string"||typeof V=="number"?[V]:[]}function v(V){return s(V,"title")||V.title||""}function C(V){return V.members??[]}function x(V){return V.members_id}function k(V){return[V.first_name,V.last_name].filter(Boolean).join(" ")}function D(V){return(V??[]).map(G=>G.clubs_id?s(G.clubs_id,"title")||G.clubs_id.title:null).filter(Boolean).join(", ")}function F(V){return V==="female"?"i-lucide-venus":V==="male"?"i-lucide-mars":""}function B(V){return String(V.id??"")}function R(V){return!!l[B(V)]}function q(V,G){l[B(V)]=G}function N(V){return R(V)?"i-lucide-chevron-up":"i-lucide-chevron-down"}function X(V){return R(V)?"font-semibold":""}return(V,G)=>{const Y=Bl,ee=yc,ue=mt,le=nn,ye=Ae,L=pr;return f(a).length?(b(),_("div",F3,[f(d)?(b(),_("div",B3,[(b(),_(W,null,de(6,I=>A(Y,{key:I,class:"h-32 rounded-lg"})),64))])):f(p)?(b(),O(ee,{key:1,color:"error",variant:"soft",icon:"i-lucide-circle-alert",title:f(o)("Kader konnten nicht geladen werden")},null,8,["title"])):f(h)?(b(),_("section",R3,[w("h2",M3,E(v(f(h))),1),w("div",T3,[(b(!0),_(W,null,de(C(f(h)),I=>(b(),_("div",{key:I.id??x(I)?.id,class:"min-w-0"},[x(I)?(b(),O(le,{key:0,to:f(i)(x(I)),class:"block h-full p-0"},{default:S(()=>[w("div",$3,[w("div",null,[w("div",I3,[ne(E(k(x(I)))+" ",1),F(x(I)?.gender)?(b(),O(ue,{key:0,class:"text-xs text-gray-300",name:F(x(I)?.gender)},null,8,["name"])):T("",!0)]),w("div",L3,E(D(x(I)?.clubs)),1),x(I)?.category?(b(),_("div",O3,E(f(o)("Kategorie"))+": "+E(x(I)?.category),1)):T("",!0),w("div",N3,E(f(o)("Jahrgang"))+": "+E(x(I)?.year_of_birth),1),w("div",q3,[A(Hi,{chg:x(I)?.stat_elo_std_chg,gms:x(I)?.stat_elo_std_gms,elo:x(I)?.stat_elo_std,tc:"std",
30size:"sm",ychg:x(I)?.stat_elo_std_ychg},null,8,["chg","gms","elo","ychg"])])])])]),_:2},1032,["to"])):T("",!0)]))),128))])])):(b(),_("div",z3,[(b(!0),_(W,null,de(f(m),I=>(b(),O(L,{key:I.id,open:R(I),class:"flex w-full flex-col gap-2 py-1","onUpdate:open":oe=>q(I,oe)},{content:S(()=>[w("div",P3,[w("div",V3,[(b(!0),_(W,null,de(C(I),oe=>(b(),_("div",{key:oe.id??x(oe)?.id,class:"min-w-0"},[x(oe)?(b(),O(le,{key:0,to:f(i)(x(oe)),class:"block h-full p-0"},{default:S(()=>[w("div",j3,[w("div",null,[w("div",H3,[ne(E(k(x(oe)))+" ",1),F(x(oe)?.gender)?(b(),O(ue,{key:0,class:"text-xs text-gray-300",name:F(x(oe)?.gender)},null,8,["name"])):T("",!0)]),w("div",U3,E(D(x(oe)?.clubs)),1),x(oe)?.category?(b(),_("div",G3,E(f(o)("Kategorie"))+": "+E(x(oe)?.category),1)):T("",!0),w("div",K3,E(f(o)("Jahrgang"))+": "+E(x(oe)?.year_of_birth),1),w("div",W3,[A(Hi,{chg:x(oe)?.stat_elo_std_chg,gms:x(oe)?.stat_elo_std_gms,elo:x(oe)?.stat_elo_std,tc:"std",size:"sm",ychg:x(oe)?.stat_elo_std_ychg},null,8,["chg","gms","elo","ychg"])])])])]),_:2},1032,["to"])):T("",!0)]))),128))])])]),default:S(()=>[A(ye,{label:v(I),color:"neutral",variant:"accordion",size:"xl",class:K(X(I)),"trailing-icon":N(I),block:""},null,8,["label","class","trailing-icon"])]),_:2},1032,["open","onUpdate:open"]))),128))]))])):T("",!0)}}}),Y3=Object.assign(J3,{__name:"Lucerne360BlocksPeopleSquads"}),Q3={class:"luc-content"},Z3={key:0},X3=["innerHTML"],eE={class:"grid grid-cols-12 gap-2 w-full"},tE=J({__name:"Officials",props:{officials:{default:()=>[]},title:{},text:{},translations:{default:()=>[]}},setup(t){const e=t,{pickT:n}=Se(),{normalizeOfficials:r}=_a(),o=$(()=>r(e.officials));return(s,i)=>(b(),_("div",null,[w("div",Q3,[t.title?(b(),_("h2",Z3,E(f(n)(t.translations,t.title,"title")),1)):T("",!0),t.text?(b(),_("div",{key:1,innerHTML:f(n)(t.translations,t.text,"text")},null,8,X3)):T("",!0)]),w("div",eE,[f(o).length?(b(!0),_(W,{key:0},de(f(o),l=>(b(),O(wa,{key:l.id,"official-id":l.id,name:l.name,role:l.role,image:l.image},null,8,["official-id","name","role","image"]))),128)):T("",!0)])]))}}),nE=Object.assign(tE,{__name:"Lucerne360BlocksPeopleOfficials"}),rE={key:0},oE={key:1},sE={key:2},iE={key:3},lE=J({__name:"People",props:{id:{},title:{},text:{},type:{},commission:{},officials:{},squad:{},squads:{},member:{},translations:{}},setup(t){const e=t,n=$(()=>Array.isArray(e.squads)&&e.squads.length?e.squads:e.squads??e.squad);return(r,o)=>t.type==="commission"&&!t.commission?(b(),_("div",rE,[A(jf)])):t.type==="commission"?(b(),_("div",oE,[A(Hf,{commission:t.commission},null,8,["commission"])])):t.type==="squad"?(b(),_("div",sE,[A(Y3,{squads:f(n)},null,8,["squads"])])):t.type==="officials"?(b(),_("div",iE,[A(nE,{officials:t.officials,title:t.title,text:t.text,translations:t.translations},null,8,["officials","title","text","translations"])])):T("",!0)}}),aE=Object.assign(lE,{__name:"Lucerne360BlocksPeople"}),uE=["innerHTML"],cE=J({__name:"Code",props:{id:{},code:{},script_src:{},script_url:{},script_init:{},translations:{}},setup(t){const e=t,{pick:n}=Se(),{locale:r}=Le(),o=H(null),s=H(""),i=$(()=>n(e,"code")||""),l=$(()=>p(n(e,"script_src")||n(e,"script_url")||e.script_src||e.script_url)),a=$(()=>p(n(e,"script_init")||e.script_init));let u=0;ct([i,l,a,r],()=>{c()},{immediate:!0}),dt(()=>{c()}),Gs(()=>{u+=1,h()});async function c(){const x=++u,{html:k,scripts:D}=d(i.value),F=l.value.map(R=>({attrs:[{name:"type",value:"text/javascript"}],content:"",src:R}));h(),s.value=k;const B=m([...D,...F]);B.length&&(await ut(),x===u&&(await g(B,x),x===u&&y()))}function d(x){if(!x)return{html:"",scripts:[]};const k=document.createElement("template");k.innerHTML=x;const D=Array.from(k.content.querySelectorAll("script")),F=D.map(B=>({attrs:Array.from(B.attributes).map(R=>({name:R.name,value:R.value})),content:B.textContent||"",src:B.getAttribute("src")}));return D.forEach(B=>B.remove()),{html:k.innerHTML,scripts:F}}function p(x){return x?(Array.isArray(x)?x:String(x).split(/[\n,]+/)).map(D=>String(D).trim()).filter(Boolean):[]}function m(x){const k=new Set;return x.filter(D=>D.src?k.has(D.src)?!1:(k.add(D.src),!0):!0)}function h(){o.value?.querySelectorAll('script[data-block-code-script="true"]').forEach(x=>x.remove())}async function g(x,k){for(const D of x){if(k!==u)return;await C(D)}}function y(){a.value.forEach(x=>{const k=v(x);if(k)try{k()}catch(D){console.error(`Failed to run block_code initializer "${x}"`,D)}})}function v(x){let k=window;return x.split(".").map(D=>
30D.trim()).filter(Boolean).forEach(D=>{if(!k||typeof k!="object"){k=void 0;return}k=k[D]}),typeof k=="function"?k:null}function C(x){return new Promise(k=>{const D=o.value;if(!D){k();return}const F=document.createElement("script"),B=x.attrs.some(R=>R.name==="async");x.attrs.forEach(R=>{R.name!=="src"&&F.setAttribute(R.name,R.value)}),F.dataset.blockCodeScript="true",x.src&&!B&&(F.async=!1),F.onload=()=>k(),F.onerror=()=>k();try{if(x.src){F.src=x.src,D.appendChild(F);return}F.textContent=x.content,D.appendChild(F),k()}catch(R){console.error("Failed to run block_code script",R),k()}})}return(x,k)=>(b(),_("div",{ref_key:"container",ref:o,innerHTML:f(s),class:"w-full"},null,8,uE))}}),dE=Object.assign(cE,{__name:"Lucerne360BlocksCode"}),fE={key:0},pE={key:1},mE=J({__name:"Form",props:{id:{},title:{},description:{},form:{},translations:{}},setup(t){const e=t,{pick:n}=Se();return(r,o)=>(b(),_("div",null,[e.title?(b(),_("h2",fE,E(f(n)(e,"title")),1)):T("",!0),e.description?(b(),_("p",pE,E(f(n)(e,"description")),1)):T("",!0),A(sm,{"form-id":e.form},null,8,["form-id"])]))}}),hE=Object.assign(mE,{__name:"Lucerne360BlocksForm"}),gE=J({__name:"Page",props:{blocks:{}},setup(t){const e=n=>{switch(n){case"block_news":return jC;case"block_layout":return QC;case"block_shortcuts":return sw;case"block_gallery":return hw;case"block_linklist":return Tw;case"block_calendar":return ok;case"block_commission":return Ok;case"block_member":return n3;case"block_tournament":return Pk;case"block_content":return o3;case"block_accordion":return k3;case"block_images":return y3;case"block_ebook":return E3;case"block_people":return aE;case"block_code":return dE;case"block_form":return hE;default:return"div"}};return(n,r)=>(b(!0),_(W,null,de(t.blocks,o=>(b(),_("div",{key:o.id},[(b(),O(uc(e(o.collection)),Ce({ref_for:!0},o.item),null,16))]))),128))}}),Et=Object.assign(gE,{__name:"Lucerne360Page"});export{xa as E,Et as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.