@kvass/widgets 1.9.52 → 1.9.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es2.js CHANGED
@@ -1,11 +1,11 @@
1
- import{G as Ta,q as Q,d as z,o as E,c as O,i as Tn,f as H,b as P,z as qa,A as Wg,a as U,n as Se,g as L,C as Be,t as oe,y as kn,e as I,E as xe,w as ee,j as he,v as B,m as re,r as Qe,H as qc,I as Ug,P as Tk,J as be,K as Re,F as Oe,l as Mt,D as pi,M as lp,N as Ms,B as up,O as Kg,s as ls,R as Gg,X as Zt,S as cp,W as xr,Y as Xt,ak as Ok,u as dp,Q as pp,U as Jg,V as Yg,a0 as hp,a5 as Xg,a6 as Zg,Z as Ak,k as Wa,a1 as Qg,h as fp,ad as Mk,L as Mo,a7 as Ei,ab as mp,$ as _k,T as Dk,a4 as Ik}from"./_plugin-vue_export-helper.js";var Nk=Object.defineProperty,Rk=(t,e,n)=>e in t?Nk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jt=(t,e,n)=>(Rk(t,typeof e!="symbol"?e+"":e,n),n);function ev(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=ev(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Pk(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ev(t))&&(r&&(r+=" "),r+=e);return r}const $h=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,jh=Pk,rn=(t,e)=>n=>{var r;if(e?.variants==null)return jh(t,n?.class,n?.className);const{variants:i,defaultVariants:o}=e,s=Object.keys(i).map(u=>{const c=n?.[u],d=o?.[u];if(c===null)return null;const h=$h(c)||$h(d);return i[u][h]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:h,...p}=c;return Object.entries(p).every(f=>{let[m,g]=f;return Array.isArray(g)?g.includes({...o,...a}[m]):{...o,...a}[m]===g})?[...u,d,h]:u},[]);return jh(t,s,l,n?.class,n?.className)},tv=/^[a-z0-9]+(-[a-z0-9]+)*$/,nu=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:r,prefix:l,name:a};return e&&!Oa(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!Oa(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:o};return e&&!Oa(a,n)?null:a}return null},Oa=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,nv=Object.freeze({left:0,top:0,width:16,height:16}),Ua=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ru=Object.freeze({...nv,...Ua}),Wc=Object.freeze({...ru,body:"",hidden:!1});function Fk(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function zh(t,e){const n=Fk(t,e);for(const r in Wc)r in Ua?r in t&&!(r in n)&&(n[r]=Ua[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function Lk(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const a=r[s]&&r[s].parent,l=a&&o(a);l&&(i[s]=[a].concat(l))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function Bk(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function s(a){o=zh(r[a]||i[a],o)}return s(e),n.forEach(s),zh(t,o)}function rv(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=Lk(t);for(const i in r){const o=r[i];o&&(e(i,Bk(t,i,o)),n.push(i))}return n}const Vk={provider:"",aliases:{},not_found:{},...nv};function Uu(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function iv(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!Uu(t,Vk))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!Uu(o,Wc))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i||typeof s!="string"||!n[s]&&!r[s]||!Uu(o,Wc))return null}return e}const Hh=Object.create(null);function $k(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Yi(t,e){const n=Hh[t]||(Hh[t]=Object.create(null));return n[e]||(n[e]=$k(t,e))}function ov(t,e){return iv(e)?rv(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function jk(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let us=!1;function sv(t){return typeof t=="boolean"&&(us=t),us}function zk(t){const e=typeof t=="string"?nu(t,!0,us):t;if(e){const n=Yi(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Hk(t,e){const n=nu(t,!0,us);if(!n)return!1;const r=Yi(n.provider,n.prefix);return e?jk(r,n.name,e):(r.missing.add(n.name),!0)}function qk(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),us&&!e&&!t.prefix){let i=!1;return iv(t)&&(t.prefix="",rv(t,(o,s)=>{Hk(o,s)&&(i=!0)})),i}const n=t.prefix;if(!Oa({prefix:n,name:"a"}))return!1;const r=Yi(e,n);return!!ov(r,t)}const av=Object.freeze({width:null,height:null}),lv=Object.freeze({...av,...Ua}),Wk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qh(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Wk);if(r===null||!r.length)return t;const i=[];let o=r.shift(),s=Uk.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?i.push(o):i.push(Math.ceil(a*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function Kk(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),o=t.indexOf("</"+e);if(i===-1||o===-1)break;const s=t.indexOf(">",o);if(s===-1)break;n+=t.slice(i+1,o).trim(),t=t.slice(0,r).trim()+t.slice(s+1)}return{defs:n,content:t}}function Gk(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Jk(t,e,n){const r=Kk(t);return Gk(r.defs,e+r.content+n)}const Yk=t=>t==="unset"||t==="undefined"||t==="none";function Xk(t,e){const n={...ru,...t},r={...lv,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const g=[],b=m.hFlip,y=m.vFlip;let k=m.rotate;b?y?k+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=i.height/2+i.top,g.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:v=i.width/2+i.left,g.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(i.left!==i.top&&(v=i.left,i.left=i.top,i.top=v),i.width!==i.height&&(v=i.width,i.width=i.height,i.height=v)),g.length&&(o=Jk(o,'<g transform="'+g.join(" ")+'">',"</g>"))});const s=r.width,a=r.height,l=i.width,u=i.height;let c,d;s===null?(d=a===null?"1em":a==="auto"?u:a,c=qh(d,l/u)):(c=s==="auto"?l:s,d=a===null?qh(c,u/l):a==="auto"?u:a);const h={},p=(m,g)=>{Yk(g)||(h[m]=g.toString())};p("width",c),p("height",d);const f=[i.left,i.top,l,u];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:o}}const Zk=/\sid="(\S+)"/g,Qk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ew=0;function tw(t,e=Qk){const n=[];let r;for(;r=Zk.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof e=="function"?e(o):e+(ew++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const Uc=Object.create(null);function nw(t,e){Uc[t]=e}function Kc(t){return Uc[t]||Uc[""]}function gp(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const vp=Object.create(null),ta=["https://api.simplesvg.com","https://api.unisvg.com"],Gc=[];for(;ta.length>0;)ta.length===1||Math.random()>.5?Gc.push(ta.shift()):Gc.push(ta.pop());vp[""]=gp({resources:["https://api.iconify.design"].concat(Gc)});function uv(t,e){const n=gp(e);return n===null?!1:(vp[t]=n,!0)}function yp(t){return vp[t]}const rw=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let Wh=rw();function iw(t,e){const n=yp(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function ow(t){return t===404}const sw=(t,e,n)=>{const r=[],i=iw(t,e),o="icons";let s={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=i&&u>0&&(r.push(s),s={type:o,provider:t,prefix:e,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function aw(t){if(typeof t=="string"){const e=yp(t);if(e)return e.path}return"/"}const lw=(t,e,n)=>{if(!Wh){n("abort",424);return}let r=aw(e.provider);switch(e.type){case"icons":{const o=e.prefix,s=e.icons.join(","),a=new URLSearchParams({icons:s});r+=o+".json?"+a.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Wh(t+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(ow(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},uw={prepare:sw,send:lw};function cw(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,a=i.name,l=n[o]||(n[o]=Object.create(null)),u=l[s]||(l[s]=Yi(o,s));let c;a in u.icons?c=e.loaded:s===""||u.missing.has(a)?c=e.missing:c=e.pending;const d={provider:o,prefix:s,name:a};c.push(d)}),e}function cv(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function dw(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const s=o.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==i)return!0;const u=l.name;if(t.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||cv([t],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let pw=0;function hw(t,e,n){const r=pw++,i=cv.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function fw(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?nu(i,e,n):i;o&&r.push(o)}),r}var mw={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gw(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let x=t.resources.slice(0);for(s=[];x.length>1;){const C=Math.floor(Math.random()*x.length);s.push(x[C]),x=x.slice(0,C).concat(x.slice(C+1))}s=s.concat(x)}else s=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l="pending",u=0,c,d=null,h=[],p=[];typeof r=="function"&&p.push(r);function f(){d&&(clearTimeout(d),d=null)}function m(){l==="pending"&&(l="aborted"),f(),h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function g(x,C){C&&(p=[]),typeof x=="function"&&p.push(x)}function b(){return{startTime:a,payload:e,status:l,queriesSent:u,queriesPending:h.length,subscribe:g,abort:m}}function y(){l="failed",p.forEach(x=>{x(void 0,c)})}function k(){h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function v(x,C,M){const T=C!=="success";switch(h=h.filter(A=>A!==x),l){case"pending":break;case"failed":if(T||!t.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=M,y();return}if(T){c=M,h.length||(s.length?w():y());return}if(f(),k(),!t.random){const A=t.resources.indexOf(x.resource);A!==-1&&A!==t.index&&(t.index=A)}l="completed",p.forEach(A=>{A(M)})}function w(){if(l!=="pending")return;f();const x=s.shift();if(x===void 0){if(h.length){d=setTimeout(()=>{f(),l==="pending"&&(k(),y())},t.timeout);return}y();return}const C={status:"pending",resource:x,callback:(M,T)=>{v(C,M,T)}};h.push(C),u++,d=setTimeout(w,t.rotate),n(x,e,C.callback)}return setTimeout(w),b}function dv(t){const e={...mw,...t};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,a,l){const u=gw(e,s,a,(c,d)=>{r(),l&&l(c,d)});return n.push(u),u}function o(s){return n.find(a=>s(a))||null}return{query:i,find:o,setIndex:s=>{e.index=s},getIndex:()=>e.index,cleanup:r}}function Uh(){}const Ku=Object.create(null);function vw(t){if(!Ku[t]){const e=yp(t);if(!e)return;const n=dv(e),r={config:e,redundancy:n};Ku[t]=r}return Ku[t]}function yw(t,e,n){let r,i;if(typeof t=="string"){const o=Kc(t);if(!o)return n(void 0,424),Uh;i=o.send;const s=vw(t);s&&(r=s.redundancy)}else{const o=gp(t);if(o){r=dv(o);const s=t.resources?t.resources[0]:"",a=Kc(s);a&&(i=a.send)}}return!r||!i?(n(void 0,424),Uh):r.query(e,i,n)().abort}function Kh(){}function bw(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,dw(t)}))}function kw(t){const e=[],n=[];return t.forEach(r=>{(r.match(tv)?e:n).push(r)}),{valid:e,invalid:n}}function xo(t,e,n){function r(){const i=t.pendingIcons;e.forEach(o=>{i&&i.delete(o),t.icons[o]||t.missing.add(o)})}if(n&&typeof n=="object")try{if(!ov(t,n).length){r();return}}catch(i){console.error(i)}r(),bw(t)}function Gh(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function ww(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;if(delete t.iconsToLoad,!i||!i.length)return;const o=t.loadIcon;if(t.loadIcons&&(i.length>1||!o)){Gh(t.loadIcons(i,r,n),u=>{xo(t,i,u)});return}if(o){i.forEach(u=>{const c=o(u,r,n);Gh(c,d=>{const h=d?{prefix:r,icons:{[u]:d}}:null;xo(t,[u],h)})});return}const{valid:s,invalid:a}=kw(i);if(a.length&&xo(t,a,null),!s.length)return;const l=r.match(tv)?Kc(n):null;if(!l){xo(t,s,null);return}l.prepare(n,r,s).forEach(u=>{yw(n,u,c=>{xo(t,u.icons,c)})})}))}const xw=(t,e)=>{const n=fw(t,!0,sv()),r=cw(n);if(!r.pending.length){let l=!0;return e&&setTimeout(()=>{l&&e(r.loaded,r.missing,r.pending,Kh)}),()=>{l=!1}}const i=Object.create(null),o=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,o.push(Yi(u,c));const d=i[u]||(i[u]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:c,name:d}=l,h=Yi(u,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),i[u][c].push(d))}),o.forEach(l=>{const u=i[l.provider][l.prefix];u.length&&ww(l,u)}),e?hw(e,r,o):Kh};function Ew(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in av?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const Cw=/[\s,]+/;function Sw(t,e){e.split(Cw).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Tw(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function Ow(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Aw(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mw(t){return"data:image/svg+xml,"+Aw(t)}function _w(t){return'url("'+Mw(t)+'")'}const Jh={...lv,inline:!1},Dw={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Iw={display:"inline-block"},Jc={backgroundColor:"currentColor"},pv={backgroundColor:"transparent"},Yh={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Xh={webkitMask:Jc,mask:Jc,background:pv};for(const t in Xh){const e=Xh[t];for(const n in Yh)e[t+n]=Yh[n]}const Aa={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Aa[t+"-flip"]=e,Aa[t.slice(0,1)+"-flip"]=e,Aa[t+"Flip"]=e});function Zh(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Qh=(t,e)=>{const n=Ew(Jh,e),r={...Dw},i=e.mode||"svg",o={},s=e.style,a=typeof s=="object"&&!(s instanceof Array)?s:{};for(let m in e){const g=e[m];if(g!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[m]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&Sw(n,g);break;case"color":o.color=g;break;case"rotate":typeof g=="string"?n[m]=Tw(g):typeof g=="number"&&(n[m]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete r["aria-hidden"];break;default:{const b=Aa[m];b?(g===!0||g==="true"||g===1)&&(n[b]=!0):Jh[m]===void 0&&(r[m]=g)}}}const l=Xk(t,n),u=l.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),i==="svg"){r.style={...o,...a},Object.assign(r,u);let m=0,g=e.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),r.innerHTML=tw(l.body,g?()=>g+"ID"+m++:"iconifyVue"),ls("svg",r)}const{body:c,width:d,height:h}=t,p=i==="mask"||(i==="bg"?!1:c.indexOf("currentColor")!==-1),f=Ow(c,{...u,width:d+"",height:h+""});return r.style={...o,"--svg":_w(f),width:Zh(u.width),height:Zh(u.height),...Iw,...p?Jc:pv,...a},ls("span",r)};sv(!0);nw("",uw);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!qk(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;uv(n,i)||console.error(r)}catch{console.error(r)}}}}const Nw={...ru,body:""},Ze=Q({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,e,n){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let r;if(typeof t!="string"||(r=nu(t,!1,!0))===null)return this.abortLoading(),null;let i=zk(r);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:t,abort:xw([r],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==t&&(this._name=t,e&&e(t)),n){i=Object.assign({},i);const s=n(i.body,r.name,r.prefix,r.provider);typeof s=="string"&&(i.body=s)}const o=["iconify"];return r.prefix!==""&&o.push("iconify--"+r.prefix),r.provider!==""&&o.push("iconify--"+r.provider),{data:i,classes:o}}},render(){this.counter;const t=this.$attrs,e=this.iconMounted||t.ssr?this.getIcon(t.icon,t.onLoad,t.customise):null;if(!e)return Qh(Nw,t);let n=t;return e.classes&&(n={...t,class:(typeof t.class=="string"?t.class+" ":"")+e.classes.join(" ")}),Qh({...ru,...e.data},n)}});uv("",{resources:["https://icons.ui.kvass.no"]});function Rw(t){return!t||typeof t!="object"?!1:typeof t.then=="function"&&typeof t.catch=="function"}const Pw=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],Fw=(t,e)=>e==="default"?`var(--k-ui-${t})`:`var(--k-ui-${t}-${e})`,Ka=t=>{switch(t){case"start":case"end":return`flex-${t}`;default:return t}},bp=(t,e="spacing")=>t.split(" ").map(n=>typeof n=="number"||typeof n=="string"&&n.match(/^\d+$/)?`${n}rem`:typeof n=="string"&&Pw.includes(n)?Fw(e,n):n).join(" ");function Lw(){var t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=Math.random()*16;return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),(n==="x"?r:r&3|8).toString(16)})}const hv=(t,e)=>Object.fromEntries(Object.entries(e).map(([n,r])=>[`--k-${t}-${n}`,r])),Bw=function(t){return Object.prototype.toString.call(t)==="[object Object]"};function Vw(t){return Array.isArray(t)}const fv=Q({__name:"Spinner",props:{size:{default:"medium"}},setup(t){return(e,n)=>(E(),O("span",{class:Se(`k-spinner k-spinner--size-${e.size}`)},null,2))}}),$w={class:"k-button__content"},jw={key:0,class:"k-button__icon k-button__icon--left"},zw={key:1,class:"k-button__icon k-button__icon--right"},Hw={key:2,class:"k-button__confirm-label"},He=Q({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(t,{emit:e}){const n=t,r=e,i={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},o=I(()=>!h.value||u.value==="loading"?n.variant:u.value=="confirm"?"warning":i[u.value]||n.variant),s=I(()=>n.loading||u.value==="loading"),a=H(),l=I(()=>{if(u.value)return["error","success"].includes(u.value)||s.value}),u=H("idle"),c=H(),d=H(),h=I(()=>u.value||s.value),p=I(()=>["error","success"].includes(u.value)),f=I(()=>u.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function m(w){if(!w)return;g(),d.value=w,a.value=setTimeout(()=>u.value="loading",100);let x=C=>{g(),n.stateTimeout?(u.value=C,c.value=setTimeout(()=>{g(),r(C)},n.stateTimeout)):r(C)};d.value.then(()=>x("success")).catch(()=>x("error"))}function g(){a.value&&clearTimeout(a.value),c.value&&clearTimeout(c.value),d.value=null,u.value="idle"}xe(()=>n.promise,w=>{w&&Rw(w)&&m(w)});const b=H(),y=I(()=>u.value==="confirm");function k(w){if(n.confirm&&u.value!=="confirm")return u.value="confirm";g(),r("click",w)}const v=rn("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(w,x)=>(E(),z(Qe(w.is),re({type:"button",class:B(v)({variant:o.value,size:w.size,isLoading:s.value,isBusy:l.value}),"aria-busy":l.value,inert:l.value},w.$attrs,{onClick:k,ref_key:"rootElement",ref:b}),{default:ee(()=>[qa(U("span",$w,[w.icon||w.iconLeft||w.$slots.icon||w.$slots["icon-left"]?(E(),O("span",jw,[L(w.$slots,"icon-left",{},()=>[L(w.$slots,"icon",{},()=>[he(B(Ze),{icon:w.icon||w.iconLeft},null,8,["icon"])])])])):P("",!0),L(w.$slots,"default",{},()=>[Be(oe(w.label),1)]),w.iconRight||w.$slots["icon-right"]?(E(),O("span",zw,[L(w.$slots,"icon-right",{},()=>[he(B(Ze),{icon:w.iconRight},null,8,["icon"])])])):P("",!0)],512),[[Wg,!y.value]]),s.value?(E(),z(fv,{key:0})):P("",!0),p.value?(E(),z(B(Ze),{key:1,class:"k-button__state-indicator",icon:f.value},null,8,["icon"])):P("",!0),y.value?(E(),O("span",Hw,oe(w.confirmLabel),1)):P("",!0)]),_:3},16,["class","aria-busy","inert"]))}}),qw={class:"k-alert__content"},Ww={key:0,class:"k-alert__title"},Uw={class:"k-alert__icon"},vL=Q({__name:"Alert",props:{variant:{default:"neutral"},icon:{},title:{},content:{},action:{}},emits:["action"],setup(t,{emit:e}){const n=t,r=e,i=rn("k-alert",{variants:{variant:{success:"k-alert--success",neutral:"k-alert--neutral",info:"k-alert--info",danger:"k-alert--danger",warning:"k-alert--warning",primary:"k-alert--primary"}}}),o={success:"fa-pro-light:circle-check",info:"fa-pro-light:circle-question",warning:"fa-pro-light:exclamation-triangle",danger:"fa-pro-light:exclamation-circle"};return(s,a)=>(E(),O("div",{role:"alert",class:Se(B(i)({...n}))},[U("div",qw,[s.title||s.$slots.title?(E(),O("div",Ww,[L(s.$slots,"title",{},()=>[U("strong",null,oe(s.title),1)])])):P("",!0),L(s.$slots,"default",{},()=>[U("span",null,oe(s.content),1)]),s.action?(E(),z(He,{key:1,label:s.action,size:"small",class:"k-alert__action",onClick:a[0]||(a[0]=l=>r("action",{event:l,name:s.action}))},null,8,["label"])):P("",!0)]),U("div",Uw,[L(s.$slots,"icon",{},()=>[s.icon||o[s.variant]?(E(),z(B(Ze),{key:0,icon:s.icon||o[s.variant]},null,8,["icon"])):P("",!0)])])],2))}}),Kw={class:"k-badge__label"},yL=Q({__name:"Badge",props:{variant:{default:"neutral"},appearance:{default:"solid"},icon:{},dismissable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},label:{}},emits:["dismiss"],setup(t,{emit:e}){const n=t,r=e,i={task:"fa-pro-solid:circle",dot:"fa-pro-solid:circle"},o=rn("k-badge",{variants:{variant:{neutral:"k-badge--variant-neutral",info:"k-badge--variant-info",warning:"k-badge--variant-warning",success:"k-badge--variant-success",danger:"k-badge--variant-danger",primary:"k-badge--variant-primary"},appearance:{solid:"k-badge--appearance-solid",outline:"k-badge--appearance-outline",filled:"k-badge--appearance-filled",task:"k-badge--appearance-task",dot:"k-badge--appearance-dot"},rounded:{true:"k-badge--rounded",false:""}}}),s=H(!1);function a(){s.value=!0,r("dismiss",n)}return(l,u)=>s.value?P("",!0):(E(),O("span",{key:0,class:Se(B(o)({appearance:l.appearance,variant:l.variant,rounded:l.rounded}))},[L(l.$slots,"icon",{},()=>[l.icon||i[l.appearance]?(E(),z(B(Ze),{key:0,icon:l.icon||i[l.appearance],class:"k-badge__icon"},null,8,["icon"])):P("",!0)]),L(l.$slots,"default",{},()=>[U("span",Kw,oe(l.label),1)]),l.dismissable?(E(),O("button",{key:0,class:"k-badge__dismiss",onClick:a},[he(B(Ze),{icon:"fa-pro-light:times"})])):P("",!0)],2))}});var $n=(t,e=[])=>({parts:(...n)=>{if(Gw(e))return $n(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>$n(t,[...e,...n]),rename:n=>$n(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ci(t)}"][data-part="${Ci(r)}"]`,`& [data-scope="${Ci(t)}"][data-part="${Ci(r)}"]`].join(", "),attrs:{"data-scope":Ci(t),"data-part":Ci(r)}}}),{})}),Ci=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Gw=t=>t.length===0,ef=t=>Math.max(0,Math.min(1,t)),Gu=(...t)=>e=>t.reduce((n,r)=>r(n),e),Bi=()=>{},iu=t=>typeof t=="object"&&t!==null,J=t=>t?"":void 0,Jw=t=>t?"true":void 0,Yw=1,Xw=9,Zw=11,st=t=>iu(t)&&t.nodeType===Yw&&typeof t.nodeName=="string",kp=t=>iu(t)&&t.nodeType===Xw,Qw=t=>iu(t)&&t===t.window,mv=t=>st(t)?t.localName||"":"#document";function ex(t){return["html","body","#document"].includes(mv(t))}var tx=t=>iu(t)&&t.nodeType!==void 0,cs=t=>tx(t)&&t.nodeType===Zw&&"host"in t,nx=t=>st(t)&&t.localName==="input",rx=t=>st(t)?t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0:!1,ix=/(textarea|select)/;function ox(t){if(t==null||!st(t))return!1;try{return nx(t)&&t.selectionStart!=null||ix.test(t.localName)||t.isContentEditable||t.getAttribute("contenteditable")==="true"||t.getAttribute("contenteditable")===""}catch{return!1}}function Xi(t,e){var n;if(!t||!e||!st(t)||!st(e))return!1;const r=(n=e.getRootNode)==null?void 0:n.call(e);if(t===e||t.contains(e))return!0;if(r&&cs(r)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}function Wt(t){return kp(t)?t:Qw(t)?t.document:t?.ownerDocument??document}function sx(t){return Wt(t).documentElement}function pt(t){var e;return cs(t)?pt(t.host):kp(t)?t.defaultView??window:st(t)?((e=t.ownerDocument)==null?void 0:e.defaultView)??window:window}function gv(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const n=e.shadowRoot.activeElement;if(n===e)break;e=n}return e}function ax(t){if(mv(t)==="html")return t;const e=t.assignedSlot||t.parentNode||cs(t)&&t.host||sx(t);return cs(e)?e.host:e}var Ju=new WeakMap;function lx(t){return Ju.has(t)||Ju.set(t,pt(t).getComputedStyle(t)),Ju.get(t)}var ou=()=>typeof document<"u";function ux(){const t=navigator.userAgentData;return t?.platform??navigator.platform}function cx(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:e,version:n})=>`${e}/${n}`).join(" "):navigator.userAgent}var wp=t=>ou()&&t.test(ux()),dx=t=>ou()&&t.test(cx()),px=t=>ou()&&t.test(navigator.vendor),tf=()=>ou()&&!!navigator.maxTouchPoints,hx=()=>wp(/^iPhone/i),fx=()=>wp(/^iPad/i)||au()&&navigator.maxTouchPoints>1,su=()=>hx()||fx(),mx=()=>au()||su(),au=()=>wp(/^Mac/i),xp=()=>mx()&&px(/apple/i),gx=()=>dx(/Android/i);function vx(t){var e,n,r;return((e=t.composedPath)==null?void 0:e.call(t))??((r=(n=t.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n))}function dt(t){const e=vx(t);return e?.[0]??t.target}var yx=t=>Xi(t.currentTarget,dt(t));function bx(t){return t.mozInputSource===0&&t.isTrusted?!0:gx()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}var kx=t=>t.button===0,wx=t=>t.button===2||au()&&t.ctrlKey&&t.button===0,xx=t=>t.ctrlKey||t.altKey||t.metaKey,Ex=t=>"touches"in t&&t.touches.length>0,Cx={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},nf={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function vv(t,e={}){const{dir:n="ltr",orientation:r="horizontal"}=e;let i=t.key;return i=Cx[i]??i,n==="rtl"&&r==="horizontal"&&i in nf&&(i=nf[i]),i}var Sx=new Set(["PageUp","PageDown"]),Tx=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function Ox(t){return t.ctrlKey||t.metaKey?.1:Sx.has(t.key)||t.shiftKey&&Tx.has(t.key)?10:1}function Ep(t,e="client"){const n=Ex(t)?t.touches[0]||t.changedTouches[0]:t;return{x:n[`${e}X`],y:n[`${e}Y`]}}var Ne=(t,e,n,r)=>{const i=typeof t=="function"?t():t;return i?.addEventListener(e,n,r),()=>{i?.removeEventListener(e,n,r)}};function yv(t,e){const{type:n="HTMLInputElement",property:r="value"}=e,i=pt(t)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function Ax(t){if(t.localName==="input")return"HTMLInputElement";if(t.localName==="textarea")return"HTMLTextAreaElement";if(t.localName==="select")return"HTMLSelectElement"}function bv(t,e,n="value"){var r;if(!t)return;const i=Ax(t);i&&((r=yv(t,{type:i,property:n}).set)==null||r.call(t,e)),t.setAttribute(n,e)}function Cp(t,e){var n;t&&((n=yv(t,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(t,e),e?t.setAttribute("checked",""):t.removeAttribute("checked"))}function Mx(t,e){const{value:n,bubbles:r=!0}=e;if(!t)return;const i=pt(t);t instanceof i.HTMLInputElement&&(bv(t,`${n}`),t.dispatchEvent(new i.Event("input",{bubbles:r})))}function Sp(t,e){const{checked:n,bubbles:r=!0}=e;if(!t)return;const i=pt(t);t instanceof i.HTMLInputElement&&(Cp(t,n),t.dispatchEvent(new i.Event("click",{bubbles:r})))}function _x(t){return Dx(t)?t.form:t.closest("form")}function Dx(t){return t.matches("textarea, input, select, button")}function Ix(t,e){if(!t)return;const n=_x(t),r=i=>{i.defaultPrevented||e()};return n?.addEventListener("reset",r,{passive:!0}),()=>n?.removeEventListener("reset",r)}function Nx(t,e){const n=t?.closest("fieldset");if(!n)return;e(n.disabled);const r=pt(n),i=new r.MutationObserver(()=>e(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function lu(t,e){if(!t)return;const{onFieldsetDisabledChange:n,onFormReset:r}=e,i=[Ix(t,r),Nx(t,n)];return()=>i.forEach(o=>o?.())}var kv=t=>st(t)&&t.tagName==="IFRAME",Rx=t=>!Number.isNaN(parseInt(t.getAttribute("tabindex")||"0",10)),Px=t=>parseInt(t.getAttribute("tabindex")||"0",10)<0,Tp="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",wv=(t,e=!1)=>{if(!t)return[];const n=Array.from(t.querySelectorAll(Tp));(e==!0||e=="if-empty"&&n.length===0)&&st(t)&&hr(t)&&n.unshift(t);const r=n.filter(hr);return r.forEach((i,o)=>{if(kv(i)&&i.contentDocument){const s=i.contentDocument.body;r.splice(o,1,...wv(s))}}),r};function hr(t){return!t||t.closest("[inert]")?!1:t.matches(Tp)&&rx(t)}function xv(t,e){if(!t)return[];const n=Array.from(t.querySelectorAll(Tp)),r=n.filter(Br);return r.forEach((i,o)=>{if(kv(i)&&i.contentDocument){const s=i.contentDocument.body,a=xv(s);r.splice(o,1,...a)}}),!r.length&&e?n:r}function Br(t){return t!=null&&t.tabIndex>0?!0:hr(t)&&!Px(t)}function Eo(t){return t.tabIndex<0&&(/^(audio|video|details)$/.test(t.localName)||ox(t))&&!Rx(t)?0:t.tabIndex}function Fx(t){const e=new Set;function n(r){const i=globalThis.requestAnimationFrame(r);e.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(t)),function(){e.forEach(r=>r())}}function Ot(t){let e;const n=globalThis.requestAnimationFrame(()=>{e=t()});return()=>{globalThis.cancelAnimationFrame(n),e?.()}}function Yc(t){const e=ax(t);return ex(e)?Wt(e).body:st(e)&&Bx(e)?e:Yc(e)}var Lx=/auto|scroll|overlay|hidden|clip/;function Bx(t){const e=pt(t),{overflow:n,overflowX:r,overflowY:i,display:o}=e.getComputedStyle(t);return Lx.test(n+i+r)&&!["inline","contents"].includes(o)}function Vx(t,e){const{left:n,top:r,width:i,height:o}=e.getBoundingClientRect(),s={x:t.x-n,y:t.y-r},a={x:ef(s.x/i),y:ef(s.y/o)};function l(u={}){const{dir:c="ltr",orientation:d="horizontal",inverted:h}=u,p=typeof h=="object"?h.x:h,f=typeof h=="object"?h.y:h;return d==="horizontal"?c==="rtl"||p?1-a.x:a.x:f?1-a.y:a.y}return{offset:s,percent:a,getPercentValue:l}}var Vi="default",Xc="",Ma=new WeakMap;function $x(t={}){const{target:e,doc:n}=t,r=n??document,i=r.documentElement;return su()?(Vi==="default"&&(Xc=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Vi="disabled"):e&&(Ma.set(e,e.style.userSelect),e.style.userSelect="none"),()=>jx({target:e,doc:r})}function jx(t={}){const{target:e,doc:n}=t,r=(n??document).documentElement;if(su()){if(Vi!=="disabled")return;Vi="restoring",setTimeout(()=>{Fx(()=>{Vi==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=Xc||""),Xc="",Vi="default")})},300)}else if(e&&Ma.has(e)){const i=Ma.get(e);e.style.userSelect==="none"&&(e.style.userSelect=i??""),e.getAttribute("style")===""&&e.removeAttribute("style"),Ma.delete(e)}}function zx(t={}){const{defer:e,target:n,...r}=t,i=e?Ot:s=>s(),o=[];return o.push(i(()=>{const s=typeof n=="function"?n():n;o.push($x({...r,target:s}))})),()=>{o.forEach(s=>s?.())}}function Hx(t,e){const{onPointerMove:n,onPointerUp:r}=e,i=[Ne(t,"pointermove",o=>{const s=Ep(o),a=Math.sqrt(s.x**2+s.y**2),l=o.pointerType==="touch"?10:5;if(!(a<l)){if(o.pointerType==="mouse"&&o.button===0){r();return}n({point:s,event:o})}},!1),Ne(t,"pointerup",r,!1),Ne(t,"pointercancel",r,!1),Ne(t,"contextmenu",r,!1),zx({doc:t})];return()=>{i.forEach(o=>o())}}function Ev(t){const{pointerNode:e,keyboardNode:n=e,onPress:r,onPressStart:i,onPressEnd:o,isValidKey:s=y=>y.key==="Enter"}=t;if(!e)return Bi;const a=pt(e),l=Wt(e);let u=Bi,c=Bi,d=Bi;const h=y=>({point:Ep(y),event:y});function p(y){i?.(h(y))}function f(y){o?.(h(y))}const m=Ne(e,"pointerdown",y=>{c();const k=Ne(a,"pointerup",w=>{const x=dt(w);Xi(e,x)?r?.(h(w)):o?.(h(w))},{passive:!r,once:!0}),v=Ne(a,"pointercancel",f,{passive:!o,once:!0});c=Gu(k,v),l.activeElement===n&&y.pointerType==="mouse"&&y.preventDefault(),p(y)},{passive:!i}),g=Ne(n,"focus",b);u=Gu(m,g);function b(){const y=x=>{if(!s(x))return;const C=T=>{if(!s(T))return;const A=new a.PointerEvent("pointerup"),_=h(A);r?.(_),o?.(_)};c(),c=Ne(n,"keyup",C);const M=new a.PointerEvent("pointerdown");p(M)},k=()=>{const x=new a.PointerEvent("pointercancel");f(x)},v=Ne(n,"keydown",y),w=Ne(n,"blur",k);d=Gu(v,w)}return()=>{u(),c(),d()}}function Op(t,e){return Array.from(t?.querySelectorAll(e)??[])}var Cv=t=>t.id;function qx(t,e,n=Cv){return t.find(r=>n(r)===e)}function Sv(t,e,n=Cv){const r=qx(t,e,n);return r?t.indexOf(r):-1}function Wx(t,e,n=!0){let r=Sv(t,e);return r=n?(r+1)%t.length:Math.min(r+1,t.length-1),t[r]}function Ux(t,e,n=!0){let r=Sv(t,e);return r===-1?n?t[t.length-1]:null:(r=n?(r-1+t.length)%t.length:Math.max(0,r-1),t[r])}function Tv(t,e){const{onEntry:n,measure:r,box:i="border-box"}=e,o=(Array.isArray(t)?t:[t]).filter(st),s=pt(o[0]),a=u=>{const c=o.map(d=>r(d));n({rects:c,entries:u})};a([]);const l=new s.ResizeObserver(a);return o.forEach(u=>l.observe(u,{box:i})),()=>l.disconnect()}function Zc(t,e){if(!t)return Bi;const n=Object.keys(e).reduce((r,i)=>(r[i]=t.style.getPropertyValue(i),r),{});return Object.assign(t.style,e),()=>{Object.assign(t.style,n),t.style.length===0&&t.removeAttribute("style")}}function Kx(t,e,n){if(!t)return Bi;const r=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{t.style.setProperty(e,r),t.style.length===0&&t.removeAttribute("style")}}var Ap={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},Gx=1e3/60;function Jx(t,e){const n=t();if(st(n)&&n.isConnected)return e(n),()=>{};{const r=setInterval(()=>{const i=t();st(i)&&i.isConnected&&(e(i),clearInterval(r))},Gx);return()=>clearInterval(r)}}function Yx(t,e){const n=[];return t?.forEach(r=>{const i=Jx(r,e);n.push(i)}),()=>{n.forEach(r=>r())}}function Xx(t){return!(t.metaKey||!au()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}var Zx=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Qx(t,e,n){const r=n?dt(n):null,i=pt(r);return t=t||r instanceof i.HTMLInputElement&&!Zx.has(r?.type)||r instanceof i.HTMLTextAreaElement||r instanceof i.HTMLElement&&r.isContentEditable,!(t&&e==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(e1,n.key))}var hi=null,Qc=new Set,jo=new Map,ti=!1,ed=!1,e1={Tab:!0,Escape:!0};function uu(t,e){for(let n of Qc)n(t,e)}function Ga(t){ti=!0,Xx(t)&&(hi="keyboard",uu("keyboard",t))}function Bt(t){hi="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(ti=!0,uu("pointer",t))}function Ov(t){bx(t)&&(ti=!0,hi="virtual")}function Av(t){const e=dt(t);e===pt(e)||e===Wt(e)||(!ti&&!ed&&(hi="virtual",uu("virtual",t)),ti=!1,ed=!1)}function Mv(){ti=!1,ed=!0}function t1(t){if(typeof window>"u"||jo.get(pt(t)))return;const e=pt(t),n=Wt(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){hi="virtual",uu("virtual",null),ti=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ga,!0),n.addEventListener("keyup",Ga,!0),n.addEventListener("click",Ov,!0),e.addEventListener("focus",Av,!0),e.addEventListener("blur",Mv,!1),typeof e.PointerEvent<"u"?(n.addEventListener("pointerdown",Bt,!0),n.addEventListener("pointermove",Bt,!0),n.addEventListener("pointerup",Bt,!0)):(n.addEventListener("mousedown",Bt,!0),n.addEventListener("mousemove",Bt,!0),n.addEventListener("mouseup",Bt,!0)),e.addEventListener("beforeunload",()=>{n1(t)},{once:!0}),jo.set(e,{focus:r})}var n1=(t,e)=>{const n=pt(t),r=Wt(t);jo.has(n)&&(n.HTMLElement.prototype.focus=jo.get(n).focus,r.removeEventListener("keydown",Ga,!0),r.removeEventListener("keyup",Ga,!0),r.removeEventListener("click",Ov,!0),n.removeEventListener("focus",Av,!0),n.removeEventListener("blur",Mv,!1),typeof n.PointerEvent<"u"?(r.removeEventListener("pointerdown",Bt,!0),r.removeEventListener("pointermove",Bt,!0),r.removeEventListener("pointerup",Bt,!0)):(r.removeEventListener("mousedown",Bt,!0),r.removeEventListener("mousemove",Bt,!0),r.removeEventListener("mouseup",Bt,!0)),jo.delete(n))};function ds(){return hi==="keyboard"}function Mp(t={}){const{isTextInput:e,autoFocus:n,onChange:r,root:i}=t;t1(i),r?.({isFocusVisible:n||ds(),modality:hi});const o=(s,a)=>{Qx(!!e,s,a)&&r?.({isFocusVisible:ds(),modality:s})};return Qc.add(o),()=>{Qc.delete(o)}}function r1(t){return t?Array.isArray(t)?t:[t]:[]}var _v=t=>t[0],Dv=t=>t[t.length-1],i1=(t,e)=>t.indexOf(e)!==-1,o1=(t,...e)=>t.concat(e),s1=(t,...e)=>t.filter(n=>!e.includes(n)),a1=(t,e)=>i1(t,e)?s1(t,e):o1(t,e),rf=t=>t?.constructor.name==="Array",l1=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!_s(t[n],e[n]))return!1;return!0},_s=(t,e)=>{if(Object.is(t,e))return!0;if(t==null&&e!=null||t!=null&&e==null)return!1;if(typeof t?.isEqual=="function"&&typeof e?.isEqual=="function")return t.isEqual(e);if(typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();if(rf(t)&&rf(e))return l1(Array.from(t),Array.from(e));if(typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(e??Object.create(null)),r=n.length;for(let i=0;i<r;i++)if(!Reflect.has(t,n[i]))return!1;for(let i=0;i<r;i++){const o=n[i];if(!_s(t[o],e[o]))return!1}return!0},u1=t=>Array.isArray(t),Iv=t=>typeof t=="string",$i=t=>typeof t=="function",c1=Function.prototype.toString;c1.call(Object);var of=(...t)=>(...e)=>{t.forEach(function(n){n?.(...e)})},{floor:sf,abs:Ja,round:Nv,min:d1,max:p1,pow:h1,sign:f1}=Math,_o=t=>Number.isNaN(t),_p=t=>_o(t)?0:t,m1=(t,e,n)=>t===0?n:e[t-1],g1=(t,e,n)=>t===e.length-1?n:e[t+1],v1=(t,e,n)=>Nv((_p(t)-e)/n)*n+e,Ds=(t,e,n)=>d1(p1(_p(t),e),n),Dp=(t,e,n)=>(_p(t)-e)/(n-e),Rv=(t,e,n,r)=>Ds(v1(t*(n-e)+e,e,r),e,n),na=(t,e)=>{let n=t,r=e.toString(),i=r.indexOf("."),o=i>=0?r.length-i:0;if(o>0){let s=h1(10,o);n=Nv(n*s)/s}return n},Ip=(t,e,n,r)=>{e=Number(e),n=Number(n);let i=(t-(_o(e)?0:e))%r,o=na(Ja(i)*2>=r?t+f1(i)*(r-Ja(i)):t-i,r);return _o(e)?!_o(n)&&o>n&&(o=e+sf(na((n-e)/r,r))*r):o<e?o=e:!_o(n)&&o>n&&(o=e+sf(na((n-e)/r,r))*r),na(o,r)},Do=(t,e,n)=>t[e]===n?t:[...t.slice(0,e),n,...t.slice(e+1)];function Pv(t,e){const n=m1(t,e.values,e.min),r=g1(t,e.values,e.max);let i=e.values.slice();return function(o){let s=Ip(o,n,r,e.step);return i=Do(i,t,o),i[t]=s,i}}function y1(t,e){const n=e.values[t]+e.step;return Pv(t,e)(n)}function b1(t,e){const n=e.values[t]-e.step;return Pv(t,e)(n)}var k1=(t,e)=>{let n=t.findIndex(o=>e-o<0);if(n===0)return n;if(n===-1)return t.length-1;let r=t[n-1],i=t[n];return Ja(r-e)<Ja(i-e)?n-1:n},Fv=(t,e,n,r)=>t.map((i,o)=>({min:o===0?e:t[o-1]+r,max:o===t.length-1?n:t[o+1]-r,value:i})),td=(t,e)=>{const[n,r]=t,[i,o]=e;return s=>n===r||i===o?i:i+(o-i)/(r-n)*(s-n)},af=t=>t!=null?`${t}px`:void 0;function Lv(t){if(!w1(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(r=>typeof r=="string"),n={};for(const r of e){const i=t[r];i!==void 0&&(n[r]=Lv(i))}return n}var w1=t=>t&&typeof t=="object"&&t.constructor===Object;function x1(t,e){const n={};for(const r of e){const i=t[r];i!==void 0&&(n[r]=i)}return n}function nd(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}function E1(t,e){if(t==null)throw new Error(e())}function C1(t,e,n){let r=[];for(const i of e)t[i]==null&&r.push(i);if(r.length>0)throw new Error(`[zag-js] missing required props: ${r.join(", ")}`)}function cu(){return{and:(...t)=>function(e){return t.every(n=>e.guard(n))},or:(...t)=>function(e){return t.some(n=>e.guard(n))},not:t=>function(e){return!e.guard(t)}}}var Di=(t=>(t.NotStarted="Not Started",t.Started="Started",t.Stopped="Stopped",t))(Di||{}),Yu="__init__";function S1(t){const e=()=>{var o;return((o=t.getRootNode)==null?void 0:o.call(t))??document},n=()=>Wt(e()),r=()=>n().defaultView??window,i=()=>gv(e());return{...t,getRootNode:e,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:o=>o===i(),getById:o=>e().getElementById(o)}}function T1(t){return new Proxy({},{get(e,n){return n==="style"?r=>t({style:r}).style:t}})}var Kn=()=>t=>Array.from(new Set(t)),O1=$n("checkbox").parts("root","label","control","indicator"),ra=O1.build(),Bv=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`checkbox:${t.id}`},lf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`checkbox:${t.id}:label`},A1=t=>{var e;return((e=t.ids)==null?void 0:e.control)??`checkbox:${t.id}:control`},rd=t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`checkbox:${t.id}:input`},M1=t=>t.getById(Bv(t)),Io=t=>t.getById(rd(t));function _1(t,e){const{send:n,context:r,prop:i,computed:o,scope:s}=t,a=i("disabled"),l=i("readOnly"),u=i("invalid"),c=!a&&r.get("focused"),d=!a&&r.get("focusVisible"),h=o("checked"),p=o("indeterminate"),f={"data-active":J(r.get("active")),"data-focus":J(c),"data-focus-visible":J(d),"data-readonly":J(l),"data-hover":J(r.get("hovered")),"data-disabled":J(a),"data-state":p?"indeterminate":h?"checked":"unchecked","data-invalid":J(u)};return{checked:h,disabled:a,indeterminate:p,focused:c,checkedState:h,setChecked(m){n({type:"CHECKED.SET",checked:m,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:h,isTrusted:!1})},getRootProps(){return e.label({...ra.root.attrs,...f,dir:i("dir"),id:Bv(s),htmlFor:rd(s),onPointerMove(){a||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(m){dt(m)===Io(s)&&m.stopPropagation()}})},getLabelProps(){return e.element({...ra.label.attrs,...f,dir:i("dir"),id:lf(s)})},getControlProps(){return e.element({...ra.control.attrs,...f,dir:i("dir"),id:A1(s),"aria-hidden":!0})},getIndicatorProps(){return e.element({...ra.indicator.attrs,...f,dir:i("dir"),hidden:!p&&!h})},getHiddenInputProps(){return e.input({id:rd(s),type:"checkbox",required:i("required"),defaultChecked:h,disabled:a,"aria-labelledby":lf(s),"aria-invalid":u,name:i("name"),form:i("form"),value:i("value"),style:Ap,onFocus(){const m=ds();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:m}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(m){if(l){m.preventDefault();return}const g=m.currentTarget.checked;n({type:"CHECKED.SET",checked:g,isTrusted:!0})}})}}}var{not:uf}=cu(),D1={props({props:t}){return{value:"on",...t,defaultChecked:!!t.defaultChecked}},initialState(){return"ready"},context({prop:t,bindable:e}){return{checked:e(()=>({defaultValue:t("defaultChecked"),value:t("checked"),onChange(n){var r;(r=t("onCheckedChange"))==null||r({checked:n})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),focusVisible:e(()=>({defaultValue:!1})),active:e(()=>({defaultValue:!1})),focused:e(()=>({defaultValue:!1})),hovered:e(()=>({defaultValue:!1}))}},watch({track:t,context:e,prop:n,action:r}){t([()=>n("disabled")],()=>{r(["removeFocusIfNeeded"])}),t([()=>e.get("checked")],()=>{r(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:uf("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:uf("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:t})=>_a(t.get("checked")),checked:({context:t})=>I1(t.get("checked")),disabled:({context:t,prop:e})=>!!e("disabled")||t.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:t})=>!!t.isTrusted},effects:{trackPressEvent({context:t,computed:e,scope:n}){if(!e("disabled"))return Ev({pointerNode:M1(n),keyboardNode:Io(n),isValidKey:r=>r.key===" ",onPress:()=>t.set("active",!1),onPressStart:()=>t.set("active",!0),onPressEnd:()=>t.set("active",!1)})},trackFocusVisible({computed:t,scope:e}){var n;if(!t("disabled"))return Mp({root:(n=e.getRootNode)==null?void 0:n.call(e)})},trackFormControlState({context:t,scope:e}){return lu(Io(e),{onFieldsetDisabledChange(n){t.set("fieldsetDisabled",n)},onFormReset(){t.set("checked",t.initial("checked"))}})}},actions:{setContext({context:t,event:e}){for(const n in e.context)t.set(n,e.context[n])},syncInputElement({context:t,computed:e,scope:n}){const r=Io(n);r&&(Cp(r,e("checked")),r.indeterminate=_a(t.get("checked")))},removeFocusIfNeeded({context:t,prop:e}){e("disabled")&&t.get("focused")&&(t.set("focused",!1),t.set("focusVisible",!1))},setChecked({context:t,event:e}){t.set("checked",e.checked)},toggleChecked({context:t,computed:e}){const n=_a(e("checked"))?!0:!e("checked");t.set("checked",n)},dispatchChangeEvent({computed:t,scope:e}){queueMicrotask(()=>{const n=Io(e);Sp(n,{checked:t("checked")})})}}}};function _a(t){return t==="indeterminate"}function I1(t){return _a(t)?!1:!!t}Kn()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);function N1(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}var cf={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},R1="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function P1(t){return t in cf?cf[t]:t.startsWith("on")?`on${N1(t.substr(2))}`:R1.includes(t)?t:t.toLowerCase()}var fi=T1(t=>{const e={};for(const n in t){const r=t[n];n==="children"?typeof r=="string"&&(e.innerHTML=r):e[P1(n)]=t[n]}return e});function Ya(t){const e=t().defaultValue??t().value,n=t().isEqual??Object.is,r=Zt(e),i=I(()=>t().value!==void 0),o=Zt(i.value?t().value:r.value);return{initial:e,ref:o,get(){return i.value?t().value:r.value},set(s){var a,l;const u=i.value?t().value:r.value,c=$i(s)?s(u):s;t().debug&&console.log(`[bindable > ${t().debug}] setValue`,{next:c,prev:u}),i.value||(r.value=c),n(c,u)||(l=(a=t()).onChange)==null||l.call(a,c,u)},invoke(s,a){var l,u;(u=(l=t()).onChange)==null||u.call(l,s,a)},hash(s){var a,l;return((l=(a=t()).hash)==null?void 0:l.call(a,s))??String(s)}}}Ya.cleanup=t=>{Yg(()=>t())};Ya.ref=t=>{let e=t;return{get:()=>e,set:n=>{e=n}}};function F1(t){const e=H(t);return{get(n){return e.value[n]},set(n,r){e.value[n]=r}}}var L1=(t,e)=>{xe(()=>[...t.map(n=>n())],(n,r)=>{let i=!1;for(let o=0;o<n.length;o++)if(!_s(r[o],Xt(n[o]))){i=!0;break}i&&e()})};function mi(t,e={}){var n,r,i;const o=I(()=>{const{id:_,ids:N,getRootNode:$}=Xt(e);return S1({id:_,ids:N,getRootNode:$})}),s=(..._)=>{t.debug&&console.log(..._)},a=I(()=>{var _;return((_=t.props)==null?void 0:_.call(t,{props:Lv(Xt(e)),get scope(){return o.value}}))??Xt(e)}),l=B1(a),u=(n=t.context)==null?void 0:n.call(t,{prop:l,bindable:Ya,get scope(){return o.value},flush:df,getContext(){return c},getComputed(){return C},getRefs(){return b}}),c={get(_){var N;return(N=u[_])==null?void 0:N.get()},set(_,N){var $;($=u[_])==null||$.set(N)},initial(_){var N;return(N=u[_])==null?void 0:N.initial},hash(_){var N,$;const j=(N=u[_])==null?void 0:N.get();return($=u[_])==null?void 0:$.hash(j)}};let d=new Map,h=null,p={current:null},f={current:{type:""}};const m=()=>({...f.current,current(){return f.current},previous(){return p.current}}),g=()=>({...M,matches(..._){const N=M.get();return _.includes(N)},hasTag(_){var N,$;const j=M.get();return!!(($=(N=t.states[j])==null?void 0:N.tags)!=null&&$.includes(_))}}),b=F1(((r=t.refs)==null?void 0:r.call(t,{prop:l,context:c}))??{}),y=()=>({state:g(),context:c,event:m(),prop:l,send:A,action:k,guard:v,track:L1,refs:b,computed:C,flush:df,get scope(){return o.value},choose:x}),k=_=>{const N=$i(_)?_(y()):_;if(!N)return;const $=N.map(j=>{var q,K;const X=(K=(q=t.implementations)==null?void 0:q.actions)==null?void 0:K[j];return X||nd(`[zag-js] No implementation found for action "${JSON.stringify(j)}"`),X});for(const j of $)j?.(y())},v=_=>{var N,$;return $i(_)?_(y()):($=(N=t.implementations)==null?void 0:N.guards)==null?void 0:$[_](y())},w=_=>{const N=$i(_)?_(y()):_;if(!N)return;const $=N.map(q=>{var K,X;const fe=(X=(K=t.implementations)==null?void 0:K.effects)==null?void 0:X[q];return fe||nd(`[zag-js] No implementation found for effect "${JSON.stringify(q)}"`),fe}),j=[];for(const q of $){const K=q?.(y());K&&j.push(K)}return()=>j.forEach(q=>q?.())},x=_=>r1(_).find(N=>{let $=!N.guard;return Iv(N.guard)?$=!!v(N.guard):$i(N.guard)&&($=N.guard(y())),$}),C=_=>{E1(t.computed,()=>"[zag-js] No computed object found on machine");const N=t.computed[_];return N({context:c,event:m(),prop:l,refs:b,get scope(){return o.value},computed:C})},M=Ya(()=>({defaultValue:t.initialState({prop:l}),onChange(_,N){var $,j,q;if(N){const X=d.get(N);X?.(),d.delete(N)}N&&k(($=t.states[N])==null?void 0:$.exit),k(h?.actions);const K=w((j=t.states[_])==null?void 0:j.effects);if(K&&d.set(_,K),N===Yu){k(t.entry);const X=w(t.effects);X&&d.set(Yu,X)}k((q=t.states[_])==null?void 0:q.entry)}}));let T=Di.NotStarted;Tn(()=>{const _=T===Di.Started;T=Di.Started,s(_?"rehydrating...":"initializing..."),M.invoke(M.initial,Yu)}),pi(()=>{T=Di.Stopped,s("unmounting...");const _=d.values();for(const N of _)N?.();d=new Map,k(t.exit)});const A=_=>{var N,$;if(T!==Di.Started)return;p.current=f.current,f.current=_,s("send",_);let j=M.get();const q=((N=t.states[j].on)==null?void 0:N[_.type])??(($=t.on)==null?void 0:$[_.type]),K=x(q);if(!K)return;h=K;const X=K.target??j;s("transition",K);const fe=X!==j;fe?M.set(X):K.reenter&&!fe?M.invoke(j,j):k(K.actions)};return(i=t.watch)==null||i.call(t,y()),{state:g(),send:A,context:c,prop:l,get scope(){return o.value},refs:b,computed:C,event:m(),getStatus:()=>T}}function B1(t){return function(e){return t.value[e]}}var df=t=>{xr().then(()=>{t()})};function Qt(t={}){const{prefix:e}=t,n=Lw();return e?`${e}-${n}`:n}const V1={key:0,class:"k-checkbox__help"},pf=Q({__name:"Checkbox",props:{modelValue:{type:[Boolean,Array]},value:{},label:{},disabled:{type:Boolean},required:{type:Boolean},help:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;if(n.modelValue instanceof Array&&!n.value)throw new Error("props.value is required if props.modelValue is an array");const r=e,i=()=>{const{modelValue:l,value:u}=n;return l instanceof Array?l.some(c=>Mo(c)===Mo(u)):!!l};function o(l){const{modelValue:u,value:c}=n;if(!(u instanceof Array))return r("update:modelValue",typeof l=="boolean"?l:void 0);if(!(typeof l!="boolean"||!c))return l?r("update:modelValue",[...u,c]):r("update:modelValue",u.filter(d=>Mo(d)!==Mo(c)))}const s=mi(D1,{id:Qt(),defaultChecked:i(),onCheckedChange:({checked:l})=>{if(i()!==l)return o(l)},disabled:n.disabled,required:n.required}),a=I(()=>_1(s,fi));return xe(()=>n.modelValue,()=>{const l=i();if(a.value.checked!==l)return a.value.setChecked(l)}),(l,u)=>(E(),O("label",re({class:"k-checkbox"},a.value.getRootProps()),[U("div",be(Re(a.value.getControlProps())),[a.value.checked?(E(),z(B(Ze),{key:0,icon:"fa-pro-solid:check"})):P("",!0)],16),l.label||l.$slots.help||l.$slots.default?(E(),O("span",be(re({key:0},a.value.getLabelProps())),[U("span",{class:Se(["k-checkbox__label",{"k-checkbox__label-required":l.required}])},[L(l.$slots,"default",{},()=>[Be(oe(l.label),1)])],2),l.$slots.help||l.help?(E(),O("span",V1,[L(l.$slots,"help",{},()=>[Be(oe(l.help),1)])])):P("",!0)],16)):P("",!0),U("input",be(Re(a.value.getHiddenInputProps())),null,16)],16))}}),du=Symbol("form-control"),$1={class:"k-formcontrol"},j1=["for"],z1={key:1,class:"k-formcontrol__error"},H1={key:2,class:"k-formcontrol__help"},q1=Q({__name:"FormControl",props:{label:{},help:{},error:{},required:{type:Boolean}},emits:["blur","focus"],setup(t,{emit:e}){const n=t,r=e,i=Qt({prefix:"k-formcontrol"}),o=I(()=>`${i}_label`),s=I(()=>`${i}_help`),a={onBlur:()=>r("blur"),onFocus:()=>r("focus")};return Ik(du,I(()=>({...n,id:i,labelId:o.value,helpId:s.value,invalid:!!n.error,required:n.required,events:a}))),(l,u)=>(E(),O("div",$1,[l.$slots.label||l.label?(E(),O("label",{key:0,class:Se(["k-formcontrol__label",{"k-formcontrol__label-required":l.required}]),for:B(i)},[L(l.$slots,"label",{},()=>[Be(oe(l.label),1)])],10,j1)):P("",!0),L(l.$slots,"default",{id:B(i)}),l.$slots.error||l.error?(E(),O("span",z1,[L(l.$slots,"error",{},()=>[Be(oe(l.error),1)])])):P("",!0),l.$slots.help||l.help?(E(),O("span",H1,[L(l.$slots,"help",{},()=>[Be(oe(l.help),1)])])):P("",!0)]))}}),W1={class:"k-filter-type-dropdown"},U1=Q({__name:"Dropdown",props:qc({label:{},items:{}},{modelValue:{default:""},modelModifiers:{}}),emits:qc(["disable"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=Ug(t,"modelValue"),i=I(()=>{var a,l;return`${(r.value?[r.value]:[(l=(a=n.items)==null?void 0:a[0])==null?void 0:l.value]).map(u=>{var c;return(c=n.items.find(d=>d.value===u))==null?void 0:c.label}).join(", ")}`}),o=I(()=>n.items.map(a=>({...a,action:()=>s.value=a.value}))),s=I({get(){return r.value},set(a){r.value=a}});return(a,l)=>(E(),O("div",W1,[he(B(q1),{label:a.label},{default:ee(()=>[he(B(wu),{placement:"bottom-start",label:i.value,modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u),items:o.value},null,8,["label","modelValue","items"])]),_:1},8,["label"])]))}}),K1=Object.freeze(Object.defineProperty({__proto__:null,default:U1},Symbol.toStringTag,{value:"Module"}));function G1(t,e){let n,r,i;const o=Zt(!0),s=()=>{o.value=!0,i()};xe(t,s,{flush:"sync"});const a=typeof e=="function"?e:e.get,l=typeof e=="function"?void 0:e.set,u=Gg((c,d)=>(r=c,i=d,{get(){return o.value&&(n=a(n),o.value=!1),r(),n},set(h){l?.(h)}}));return Object.isExtensible(u)&&(u.trigger=s),u}function Np(t){return Xg()?(Zg(t),!0):!1}const Rp=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J1=t=>t!=null,Y1=Object.prototype.toString,X1=t=>Y1.call(t)==="[object Object]";function Z1(t){let e;function n(){return e||(e=t()),e}return n.reset=async()=>{const r=e;e=void 0,r&&await r},n}function Da(t){return Array.isArray(t)?t:[t]}function Q1(t,e,n={}){const{immediate:r=!0,immediateCallback:i=!1}=n,o=Zt(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){o.value=!1,a()}function u(...c){i&&t(),a(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=null,t(...c)},Xt(e))}return r&&(o.value=!0,Rp&&u()),Np(l),{isPending:Jg(o),start:u,stop:l}}function eE(t,e,n){return xe(t,e,{...n,immediate:!0})}const Vv=Rp?window:void 0,$v=Rp?window.navigator:void 0;function jv(t){var e;const n=Xt(t);return(e=n?.$el)!=null?e:n}function Pp(...t){const e=[],n=()=>{e.forEach(a=>a()),e.length=0},r=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),i=I(()=>{const a=Da(Xt(t[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),o=eE(()=>{var a,l;return[(l=(a=i.value)==null?void 0:a.map(u=>jv(u)))!=null?l:[Vv].filter(u=>u!=null),Da(Xt(i.value?t[1]:t[0])),Da(B(i.value?t[2]:t[1])),Xt(i.value?t[3]:t[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=X1(c)?{...c}:c;e.push(...a.flatMap(h=>l.flatMap(p=>u.map(f=>r(h,p,f,d)))))},{flush:"post"}),s=()=>{o(),n()};return Np(n),s}function tE(){const t=Zt(!1),e=cp();return e&&Tn(()=>{t.value=!0},e),t}function Fp(t){const e=tE();return I(()=>(e.value,!!t()))}function nE(t,e,n={}){const{window:r=Vv,...i}=n;let o;const s=Fp(()=>r&&"MutationObserver"in r),a=()=>{o&&(o.disconnect(),o=void 0)},l=I(()=>{const h=Xt(t),p=Da(h).map(jv).filter(J1);return new Set(p)}),u=xe(()=>l.value,h=>{a(),s.value&&h.size&&(o=new MutationObserver(e),h.forEach(p=>o.observe(p,i)))},{immediate:!0,flush:"post"}),c=()=>o?.takeRecords(),d=()=>{u(),a()};return Np(d),{isSupported:s,stop:d,takeRecords:c}}function hf(t,e={}){const{controls:n=!1,navigator:r=$v}=e,i=Fp(()=>r&&"permissions"in r),o=Zt(),s=typeof t=="string"?{name:t}:t,a=Zt(),l=()=>{var c,d;a.value=(d=(c=o.value)==null?void 0:c.state)!=null?d:"prompt"};Pp(o,"change",l,{passive:!0});const u=Z1(async()=>{if(i.value){if(!o.value)try{o.value=await r.permissions.query(s)}catch{o.value=void 0}finally{l()}if(n)return Mo(o.value)}});return u(),n?{state:a,isSupported:i,query:u}:a}function rE(t={}){const{navigator:e=$v,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=t,s=Fp(()=>e&&"clipboard"in e),a=hf("clipboard-read"),l=hf("clipboard-write"),u=I(()=>s.value||o),c=Zt(""),d=Zt(!1),h=Q1(()=>d.value=!1,i,{immediate:!1});async function p(){let y=!(s.value&&b(a.value));if(!y)try{c.value=await e.clipboard.readText()}catch{y=!0}y&&(c.value=g())}u.value&&n&&Pp(["copy","cut"],p,{passive:!0});async function f(y=Xt(r)){if(u.value&&y!=null){let k=!(s.value&&b(l.value));if(!k)try{await e.clipboard.writeText(y)}catch{k=!0}k&&m(y),c.value=y,d.value=!0,h.start()}}function m(y){const k=document.createElement("textarea");k.value=y??"",k.style.position="absolute",k.style.opacity="0",document.body.appendChild(k),k.select(),document.execCommand("copy"),k.remove()}function g(){var y,k,v;return(v=(k=(y=document?.getSelection)==null?void 0:y.call(document))==null?void 0:k.toString())!=null?v:""}function b(y){return y==="granted"||y==="prompt"}return{isSupported:u,text:c,copied:d,copy:f}}function pu(t){const e=cp(),n=G1(()=>null,()=>e.proxy.$el);return Tk(n.trigger),Tn(n.trigger),n}const iE={class:"k-filter-type-range"},oE={class:"k-filter-type-range__header"},sE={class:"k-filter-type-range__header-label"},aE={class:"k-filter-type-range__value"},lE={class:"k-filter-type-range__value-display"},uE=Q({__name:"RangeSlider",props:qc({min:{},max:{},label:{},suffix:{},step:{},type:{}},{modelValue:{default:[0,1e3]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=Ug(t,"modelValue"),n=pu();function r(){return!n.value||!("getRootNode"in n.value)?document:n.value.getRootNode()}const i=t;function o(s){return[s,i.suffix].filter(Boolean).join(" ")}return(s,a)=>(E(),O("div",iE,[U("div",oE,[U("label",sE,[U("span",null,oe(s.label),1),he(B(Ze),{icon:s.$attrs.icon},null,8,["icon"])]),L(s.$slots,"remove")]),U("div",aE,[he(B(yC),re({modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l)},i,{"min-steps-between-thumbs":1,"get-root-node":r}),null,16,["modelValue"]),U("div",lE,[U("span",null,oe(o(e.value[0])),1),U("span",null,oe(o(e.value[1])),1)])])]))}}),cE=Object.freeze(Object.defineProperty({__proto__:null,default:uE},Symbol.toStringTag,{value:"Module"})),ff=Object.assign({"./Dropdown.vue":K1,"./RangeSlider.vue":cE});for(const t in ff)t.replace(/(\.\/|\.vue)/g,""),ff[t].default;function fr(t){return typeof t=="string"||t instanceof String}function mf(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function zv(t,e){return Array.isArray(e)?zv(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,o]=r;return e(o,i)&&(n[i]=o),n},{})}const Y={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function dE(t){switch(t){case Y.LEFT:return Y.FORCE_LEFT;case Y.RIGHT:return Y.FORCE_RIGHT;default:return t}}function Xu(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Xa(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Xa(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const o=e instanceof Date,s=t instanceof Date;if(o&&s)return e.getTime()==t.getTime();if(o!=s)return!1;const a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;const u=Object.keys(e);for(i=0;i<u.length;i++)if(!Object.prototype.hasOwnProperty.call(t,u[i]))return!1;for(i=0;i<u.length;i++)if(!Xa(t[u[i]],e[u[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class pE{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Y.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Y.RIGHT:Y.LEFT}}function se(t,e){return new se.InputMask(t,e)}function Hv(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?se.MaskedRegExp:fr(t)?se.MaskedPattern:t===Date?se.MaskedDate:t===Number?se.MaskedNumber:Array.isArray(t)||t===Array?se.MaskedDynamic:se.Masked&&t.prototype instanceof se.Masked?t:se.Masked&&t instanceof se.Masked?t.constructor:t instanceof Function?se.MaskedFunction:(console.warn("Mask not found for mask",t),se.Masked)}function ps(t){if(!t)throw new Error("Options in not defined");if(se.Masked){if(t.prototype instanceof se.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof se.Masked?{mask:t}:mf(t)&&t.mask instanceof se.Masked?t:{};if(e){const r=e.mask;return{...zv(e,(i,o)=>!o.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return mf(t)?{...t}:{mask:t}}function Hn(t){if(se.Masked&&t instanceof se.Masked)return t;const e=ps(t),n=Hv(e.mask);if(!n)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}se.createMask=Hn;class Lp{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}se.MaskElement=Lp;const gf=90,hE=89;class hu extends Lp{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===gf&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===hE&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===gf&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}se.HTMLMaskElement=hu;class fE extends hu{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}se.HTMLMaskElement=hu;class qv extends hu{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,o=i.getSelection&&i.getSelection();o&&(o.removeAllRanges(),o.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}se.HTMLContenteditableMaskElement=qv;class fu{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>fu.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}fu.MAX_LENGTH=100;class mE{constructor(e,n){this.el=e instanceof Lp?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new qv(e):new fE(e),this.masked=Hn(n),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new fu,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof se.Masked)&&this.masked.constructor===Hv(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof se.Masked?e:Hn({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const n=this.masked.unmaskedValue,r=this.masked.value,i=this.masked.rawInputValue,o=this.displayValue,s=this.unmaskedValue!==n||this.value!==r||this._rawInputValue!==i;this._unmaskedValue=n,this._value=r,this._rawInputValue=i,this.el.value!==o&&(this.el.value=o),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),s&&this._fireChangeEvents(),!this._historyChanging&&(s||this.history.isEmpty)&&this.history.push({unmaskedValue:n,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),o=this.masked.optionsIsChanged(r);i&&(this.mask=n),o&&this.masked.updateOptions(r),(i||o)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Y.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const n=new pE({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,o=r===this.masked.rawInputValue?n.removeDirection:Y.NONE;let s=this.masked.nearestInputPos(n.startChangePos+i,o);o!==Y.NONE&&(s=this.masked.nearestInputPos(s,Y.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}se.InputMask=mE;class de{static normalize(e){return Array.isArray(e)?e:[e,new de]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}se.ChangeDetails=de;class mn{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class it{constructor(e){this._value="",this._update({...it.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new mn(this.extractInput(e,n),e)}appendTail(e){return fr(e)&&(e=new mn(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new de({inserted:e,rawInserted:e})):new de}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let o;if([e,o]=this.doPrepareChar(e,n),e&&(o=o.aggregate(this._appendCharRaw(e,n)),!o.rawInserted&&this.autofix==="pad")){const s=this.state;this.state=i;let a=this.pad(n);const l=this._appendCharRaw(e,n);a=a.aggregate(l),l.rawInserted||a.equals(o)?o=a:this.state=s}if(o.inserted){let s,a=this.doValidate(n)!==!1;if(a&&r!=null){const l=this.state;if(this.overwrite===!0){s=r.state;for(let c=0;c<o.rawInserted.length;++c)r.unshift(this.displayValue.length-o.tailShift)}let u=this.appendTail(r);if(a=u.rawInserted.length===r.toString().length,!(a&&u.inserted)&&this.overwrite==="shift"){this.state=l,s=r.state;for(let c=0;c<o.rawInserted.length;++c)r.shift();u=this.appendTail(r),a=u.rawInserted.length===r.toString().length}a&&u.inserted&&(this.state=l)}a||(o=new de,this.state=i,r&&s&&(r.state=s))}return o}_appendPlaceholder(){return new de}_appendEager(){return new de}append(e,n,r){if(!fr(e))throw new Error("value should be string");const i=fr(r)?new mn(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let o;[e,o]=this.doPrepare(e,n);for(let s=0;s<e.length;++s){const a=this._appendChar(e[s],n,i);if(!a.rawInserted&&!this.doSkipInvalid(e[s],n,i))break;o.aggregate(a)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&o.aggregate(this._appendEager()),i!=null&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new de}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),de.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),de.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,o){r===void 0&&(r=""),i===void 0&&(i=Y.NONE),o===void 0&&(o={input:!0});const s=e+n,a=this.extractTail(s),l=this.eager===!0||this.eager==="remove";let u;l&&(i=dE(i),u=this.extractInput(0,s,{raw:!0}));let c=e;const d=new de;if(i!==Y.NONE&&(c=this.nearestInputPos(e,n>1&&e!==0&&!l?Y.NONE:i),d.tailShift=c-e),d.aggregate(this.remove(c)),l&&i!==Y.NONE&&u===this.rawInputValue)if(i===Y.FORCE_LEFT){let h;for(;u===this.rawInputValue&&(h=this.displayValue.length);)d.aggregate(new de({tailShift:-1})).aggregate(this.remove(h-1))}else i===Y.FORCE_RIGHT&&a.unshift();return d.aggregate(this.append(r,o,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Xa(this,e)}typedValueEquals(e){const n=this.typedValue;return e===n||it.EMPTY_VALUES.includes(e)&&it.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new de}}it.DEFAULTS={skipInvalid:!0};it.EMPTY_VALUES=[void 0,null,""];se.Masked=it;class Hr{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=fr(e)?new mn(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof mn)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof Hr){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof se.MaskedPattern))return new mn(this.toString()).appendTo(e);const n=new de;for(let r=0;r<this.chunks.length;++r){const i=this.chunks[r],o=e._mapPosToBlock(e.displayValue.length),s=i.stop;let a;if(s!=null&&(!o||o.index<=s)&&((i instanceof Hr||e._stops.indexOf(s)>=0)&&n.aggregate(e._appendPlaceholder(s)),a=i instanceof Hr&&e._blocks[s]),a){const l=a.appendTail(i);n.aggregate(l);const u=i.toString().slice(l.rawInserted.length);u&&n.aggregate(e.append(u,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const o="chunks"in i?new Hr:new mn;return o.state=i,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],o=i.unshift(n);if(i.toString()){if(!o)break;++r}else this.chunks.splice(r,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class gE{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Y.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Y.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Y.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Y.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Y.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Y.NONE),!0})}}class Wv{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new de}nearestInputPos(e,n){n===void 0&&(n=Y.NONE);const r=0,i=this._value.length;switch(n){case Y.LEFT:case Y.FORCE_LEFT:return r;case Y.NONE:case Y.RIGHT:case Y.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new de;const r=this.eager===!0||this.eager==="append",i=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail,o=new de({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(n.raw||n.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new de;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new mn("")}appendTail(e){return fr(e)&&(e=new mn(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Za{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a,...l}=e;this.masked=Hn(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new de}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new de;const r=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i=new de,this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new de:(this.isFilled=!0,new de({inserted:this.placeholderChar}))}_appendEager(){return new de}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=Y.NONE);const r=0,i=this.value.length,o=Math.min(Math.max(e,r),i);switch(n){case Y.LEFT:case Y.FORCE_LEFT:return this.isComplete?o:r;case Y.RIGHT:case Y.FORCE_RIGHT:return this.isComplete?o:i;case Y.NONE:default:return o}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||e?._beforeTailState}}pad(e){return new de}}Za.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class vE extends it{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}se.MaskedRegExp=vE;class ot extends it{constructor(e){super({...ot.DEFAULTS,...e,definitions:Object.assign({},Za.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let o=0;o<n.length;++o){if(this.blocks){const u=n.slice(o),c=Object.keys(this.blocks).filter(h=>u.indexOf(h)===0);c.sort((h,p)=>p.length-h.length);const d=c[0];if(d){const{expose:h,repeat:p,...f}=ps(this.blocks[d]),m={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:p,parent:this},g=p!=null?new se.RepeatBlock(m):Hn(m);g&&(this._blocks.push(g),h&&(this.exposeBlock=g),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),o+=d.length-1;continue}}let s=n[o],a=s in e;if(s===ot.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){r=!r;continue}if(s==="["||s==="]"){i=!i;continue}if(s===ot.ESCAPE_CHAR){if(++o,s=n[o],!s)break;a=!1}const l=a?new Za({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ps(e[s]),parent:this}):new Wv({char:s,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:n,...r}=e;this._blocks.forEach((i,o)=>i.state=n[o]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new de;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const o=this._blocks[i]._appendEager();if(!o.inserted)break;n.aggregate(o)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new de;if(!r)return i;for(let s=r.index,a;a=this._blocks[s];++s){var o;const l=a._appendChar(e,{...n,_beforeTailState:(o=n._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]});if(i.aggregate(l),l.consumed)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new Hr;return e===n||this._forEachBlocksInRange(e,n,(i,o,s,a)=>{const l=i.extractTail(s,a);l.stop=this._findStopBefore(o),l.from=this._blockStartPos(o),l instanceof Hr&&(l.blockIndex=o),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(o,s,a,l)=>{i+=o.extractInput(a,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new de;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,o=e??this._blocks.length;return this._blocks.slice(i,o).forEach(s=>{if(!s.lazy||e!=null){var a;n.aggregate(s._appendPlaceholder((a=s._blocks)==null?void 0:a.length))}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],o=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const o=this._mapPosToBlock(n),s=o&&i.index===o.index,a=i.offset,l=o&&s?o.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,a,l),o&&!s){for(let u=i.index+1;u<o.index;++u)r(this._blocks[u],u,0,this._blocks[u].displayValue.length);r(this._blocks[o.index],o.index,0,o.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r.aggregate(i.remove(s,a))}),r}nearestInputPos(e,n){if(n===void 0&&(n=Y.NONE),!this._blocks.length)return 0;const r=new gE(this,e);if(n===Y.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===Y.LEFT||n===Y.FORCE_LEFT){if(n===Y.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===Y.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===Y.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===Y.RIGHT||n===Y.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===Y.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,Y.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r+=i.totalInputPositions(s,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}pad(e){const n=new de;return this._forEachBlocksInRange(0,this.displayValue.length,r=>n.aggregate(r.pad(e))),n}}ot.DEFAULTS={...it.DEFAULTS,lazy:!0,placeholderChar:"_"};ot.STOP_CHAR="`";ot.ESCAPE_CHAR="\\";ot.InputDefinition=Za;ot.FixedDefinition=Wv;se.MaskedPattern=ot;class Ia extends ot{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:o=this.autofix,...s}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=o;const a=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<l.length&&l[u]===a[u];)++u;s.mask=l.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(n="0".repeat(i.length)+o,r="9".repeat(i.length)+o),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,n);const r=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[o,s]=this.boundaries(this.value+e);return Number(s)<this.from?super._appendCharRaw(r[this.value.length],n):Number(o)>this.to?!n.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],n).aggregate(this._appendCharRaw(e,n)):super._appendCharRaw(i[this.value.length],n):super._appendCharRaw(e,n)}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[r,i]=this.boundaries(n);return this.from<=Number(i)&&Number(r)<=this.to&&super.doValidate(e)}pad(e){const n=new de;if(this.value.length===this.maxLength)return n;const r=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let o=0;o<i;++o)n.aggregate(super._appendCharRaw("0",e));r.split("").forEach(o=>this._appendCharRaw(o))}return n}}se.MaskedRange=Ia;const yE="d{.}`m{.}`Y";class Fn extends ot{static extractPatternOptions(e){const{mask:n,pattern:r,...i}=e;return{...i,mask:fr(n)?n:r}}constructor(e){super(Fn.extractPatternOptions({...Fn.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...o}={...Fn.DEFAULTS,...e},s=Object.assign({},Fn.GET_DEFAULT_BLOCKS());e.min&&(s.Y.from=e.min.getFullYear()),e.max&&(s.Y.to=e.max.getFullYear()),e.min&&e.max&&s.Y.from===s.Y.to&&(s.m.from=e.min.getMonth()+1,s.m.to=e.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=e.min.getDate(),s.d.to=e.max.getDate())),Object.assign(s,this.blocks,i),super._update({...o,mask:fr(n)?n:r,blocks:s})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Fn.extractPatternOptions(e))}}Fn.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ia,from:1,to:31,maxLength:2},m:{mask:Ia,from:1,to:12,maxLength:2},Y:{mask:Ia,from:1900,to:9999}});Fn.DEFAULTS={...ot.DEFAULTS,mask:Date,pattern:yE,format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}};se.MaskedDate=Fn;class mu extends it{constructor(e){super({...mu.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=ps(n),o=Hn({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=o),o}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,o=this.rawInputValue,s=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:o,a=o.slice(s.length),l=this.currentMask,u=new de,c=l?.state;return this.currentMask=this.doDispatch(e,{...n},r),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),s&&(this.currentMask.append(s,{raw:!0}),u.tailShift=this.currentMask.value.length-i.length),a&&(u.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),u}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new de;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let o;[r,o]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let o;[r,o]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new de;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...o}=e;n&&this.compiledMasks.forEach((s,a)=>s.state=n[a]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=o}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...o}=e[r];return Xa(n,o)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}mu.DEFAULTS={...it.DEFAULTS,dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,o=e.compiledMasks.map((s,a)=>{const l=e.currentMask===s,u=l?s.displayValue.length:s.nearestInputPos(s.displayValue.length,Y.FORCE_LEFT);return s.rawInputValue!==i?(s.reset(),s.append(i,{raw:!0})):l||s.remove(u),s.append(t,e.currentMaskFlags(n)),s.appendTail(r),{index:a,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,Y.FORCE_LEFT)))}});return o.sort((s,a)=>a.weight-s.weight||a.totalInputPositions-s.totalInputPositions),e.compiledMasks[o[0].index]}};se.MaskedDynamic=mu;class gu extends ot{constructor(e){super({...gu.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(a=>a.length),o=Math.min(...i),s=Math.max(...i)-o;r.mask="*".repeat(o),s&&(r.mask+="["+"*".repeat(s)+"]"),this.enum=n}super._update(r)}_appendCharRaw(e,n){n===void 0&&(n={});const r=Math.min(this.nearestInputPos(0,Y.FORCE_RIGHT),this.value.length),i=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+e,r));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(s,a)=>{const l=i[0][a];a>=this.value.length||l===s.value||(s.reset(),s._appendChar(l,n))});const o=super._appendCharRaw(i[0][this.value.length],n);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(s=>o.aggregate(super._appendCharRaw(s))),o}return new de({skip:!this.isComplete})}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new mn("",e)}remove(e,n){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),e===n)return new de;const r=Math.min(super.nearestInputPos(0,Y.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(r,i),r)).length>1);--i);const o=super.remove(i,n);return o.tailShift+=i-e,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}gu.DEFAULTS={...ot.DEFAULTS,matchValue:(t,e,n)=>t.indexOf(e,n)===n};se.MaskedEnum=gu;class bE extends it{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}se.MaskedFunction=bE;var Uv;class Ct extends it{constructor(e){super({...Ct.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+Xu(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Xu).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Xu(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){n===void 0&&(n={});const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=e;const s=this.number;let a=!isNaN(s),l=!1;if(a){let h;this.min!=null&&this.min<0&&this.number<this.min&&(h=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(h=this.max),h!=null&&(this.autofix?(this._value=this.format(h,this).replace(Ct.UNMASKED_RADIX,this.radix),l||(l=o===this._value&&!n.tail)):a=!1),a&&(a=!!this._value.match(this._numberRegExp))}let u;a?u=new de({inserted:this._value.slice(o.length),rawInserted:l?"":e,skip:l}):(this._value=o,u=new de),this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,d=this._separatorsCountFromSlice(c);return u.tailShift+=(d-i)*this.thousandsSeparator.length,u}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const s=this._separatorsCountFromSlice(r);return new de({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case Y.NONE:case Y.LEFT:case Y.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===Y.FORCE_LEFT)return r}break}case Y.RIGHT:case Y.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,o,s)=>i+s),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Ct.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ct.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Ct.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Ct.EMPTY_VALUES.includes(e)&&Ct.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Uv=Ct;Ct.UNMASKED_RADIX=".";Ct.EMPTY_VALUES=[...it.EMPTY_VALUES,0];Ct.DEFAULTS={...it.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Uv.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};se.MaskedNumber=Ct;const id={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Kv(t,e,n){e===void 0&&(e=id.MASKED),n===void 0&&(n=id.MASKED);const r=Hn(t);return i=>r.runIsolated(o=>(o[e]=i,o[n]))}function kE(t,e,n,r){return Kv(e,n,r)(t)}se.PIPE_TYPE=id;se.createPipe=Kv;se.pipe=kE;class wE extends ot{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var n,r,i;const{repeat:o,...s}=ps(e);this._blockOpts=Object.assign({},this._blockOpts,s);const a=Hn(this._blockOpts);this.repeat=(n=(r=o??a.repeat)!=null?r:this.repeat)!=null?n:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Hn(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,n){n===void 0&&(n={});const r=new de;for(let l=(i=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?i:Math.max(this._blocks.length-1,0),u,c;u=(s=this._blocks[l])!=null?s:c=!c&&this._allocateBlock(l);++l){var i,o,s,a;const d=u._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[l]});if(d.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(d),d.consumed)break}return r}_trimEmptyTail(e,n){var r,i;e===void 0&&(e=0);const o=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let s;n!=null&&(s=(i=this._mapPosToBlock(n))==null?void 0:i.index),s==null&&(s=this._blocks.length-1);let a=0;for(let l=s;o<=l&&!this._blocks[l].unmaskedValue;--l,++a);a&&(this._blocks.splice(s-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._trimEmptyTail(e,n),r}totalInputPositions(e,n){return e===void 0&&(e=0),n==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,n)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}se.RepeatBlock=wE;try{globalThis.IMask=se}catch{}function xE(t,e){let{emit:n,onAccept:r,onComplete:i,defaultValue:o,defaultUnmaskedValue:s,defaultTypedValue:a}=e===void 0?{}:e;const l=Ak(t)?t:H(t),u=H(),c=H(),d=H(""),h=H(""),p=H();let f,m=d.value,g=h.value,b=p.value;function y(){b=p.value=c.value.typedValue,g=h.value=c.value.unmaskedValue,m=d.value=c.value.value}function k(A){y(),n&&(n("accept",d.value,A),n("accept:masked",d.value,A),n("accept:typed",p.value,A),n("accept:unmasked",h.value,A)),r?.(A)}function v(A){n&&(n("complete",c.value.value,A),n("complete:masked",c.value.value,A),n("complete:typed",c.value.typedValue,A),n("complete:unmasked",c.value.unmaskedValue,A)),i?.(A)}const w=()=>{!c.value||h.value===void 0||(g!==h.value&&(c.value.unmaskedValue=h.value,c.value.unmaskedValue!==h.value&&k()),g=void 0)};xe(h,w);const x=()=>{!c.value||d.value===void 0||(m!==d.value&&(c.value.value=d.value,c.value.value!==d.value&&k()),m=void 0)};xe(d,x);const C=()=>{!c.value||p.value===void 0||(b!==p.value&&(c.value.typedValue=p.value,c.value.masked.typedValueEquals(p.value)||k()),b=void 0)};xe(p,C);function M(){f=u.value;const A=l.value;!f||!(A!=null&&A.mask)||(c.value=se(f,A),o!==void 0&&(d.value=o),s!==void 0&&(h.value=s),a!==void 0&&(p.value=a),w(),x(),C(),y(),c.value.on("accept",k).on("complete",v))}function T(){var A;(A=c.value)==null||A.destroy(),c.value=void 0}return Tn(M),Yg(T),xe([u,l],()=>{const A=u.value,_=l.value;(!(_!=null&&_.mask)||A!==f)&&T(),A&&(c.value?c.value.updateOptions(_):M())}),{el:u,mask:Jg(c),masked:d,unmasked:h,typed:p}}const EE={key:0,class:"k-input__prefix"},CE=["id","aria-labelledby","aria-describedby","required","type"],SE={key:1,class:"k-input__suffix"},TE=Q({__name:"Input",props:{invalid:{type:Boolean},id:{},modelValue:{},prefix:{},suffix:{},mask:{},align:{default:"left"},type:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=dp(),r=t,i=e;function o(p){r.mask||i("update:modelValue",p.target.value)}const s=rn("k-input",{variants:{invalid:{true:"k-input--invalid"},align:{left:"k-input--align-left",right:"k-input--align-right"}}}),a=pp(du,I(()=>({id:r.id,invalid:r.invalid,required:!1,events:{onBlur:()=>{},onFocus:()=>{}}}))),l=p=>{var f;(f=a.value.events)==null||f.onFocus(p),n.onFocus&&n.onFocus(p)},u=p=>{var f;(f=a.value.events)==null||f.onBlur(p),n.onBlur&&n.onBlur(p)},{unmasked:c,masked:d,el:h}=xE(r.mask,{defaultValue:String(r.modelValue),onAccept:()=>{var p,f;if((p=r.mask)!=null&&p.pattern)return;const m=((f=r.mask)==null?void 0:f.mask)===Number?parseFloat(c.value):d.value;m!==r.modelValue&&i("update:modelValue",m)}});return Tn(()=>{xe(()=>r.modelValue,p=>{r.mask&&c.value!==String(p)&&(c.value=String(p)),r.mask||(h.value.value=p)},{immediate:!0})}),(p,f)=>(E(),O("div",{class:Se(B(s)({invalid:B(a).invalid,align:p.align}))},[p.$slots.prefix||p.prefix?(E(),O("span",EE,[L(p.$slots,"prefix",{},()=>[Be(oe(p.prefix),1)])])):P("",!0),U("input",re({class:"k-input__input",id:B(a).id,"aria-labelledby":B(a).labelId,"aria-describedby":B(a).helpId,required:B(a).required,onInput:o,onBlur:u,onFocus:l,ref_key:"el",ref:h,type:r.type},{...B(a).events,...p.$attrs}),null,16,CE),p.$slots.suffix||p.suffix?(E(),O("span",SE,[L(p.$slots,"suffix",{},()=>[Be(oe(p.suffix),1)])])):P("",!0)],2))}}),OE=["id","value","aria-labelledby","aria-describedby","required"],bL=Q({__name:"TextArea",props:{invalid:{type:Boolean},id:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=dp(),r=t,i=e;function o(c){i("update:modelValue",c.target.value)}const s=rn("k-textarea",{variants:{invalid:{true:"k-textarea--invalid"}}}),a=pp(du,I(()=>({id:r.id,invalid:r.invalid,required:!1,events:{onBlur:()=>{},onFocus:()=>{}}}))),l=c=>{var d;(d=a.value.events)==null||d.onFocus(c),n.onFocus&&n.onFocus(c)},u=c=>{var d;(d=a.value.events)==null||d.onBlur(c),n.onBlur&&n.onBlur(c)};return(c,d)=>(E(),O("textarea",re({class:B(s)({invalid:B(a).invalid}),id:B(a).id,value:c.modelValue,"aria-labelledby":B(a).labelId,"aria-describedby":B(a).helpId,required:B(a).required,onInput:o,onBlur:u,onFocus:l},c.$attrs),null,16,OE))}});let AE=class{constructor(t,e){Jt(this,"key"),Jt(this,"goto"),this.key=t,this.goto=e,this.set()}get(){return localStorage.getItem(this.key)||""}set(t=this.get()){const e=this.goto(t);this.get()!==e&&localStorage.setItem(this.key,e)}destroy(){}},ME=class{constructor(t,e){Jt(this,"key"),Jt(this,"goto"),Jt(this,"current"),this.key=t,this.goto=e,this.set()}get(){return this.current||""}set(t=this.get()){this.current=this.goto(t)}destroy(){}};class _E{constructor(e,n){Jt(this,"key"),Jt(this,"goto"),this.key=e,this.goto=n,this.set()}get(){return sessionStorage.getItem(this.key)||""}set(e=this.get()){const n=this.goto(e);this.get()!==n&&sessionStorage.setItem(this.key,n)}destroy(){}}const DE=Object.freeze(Object.defineProperty({__proto__:null,localStorage:AE,none:ME,sessionStorage:_E},Symbol.toStringTag,{value:"Module"})),IE=["data-step"],NE={key:0,class:"k-stepper-breadcrumbs-wrapper"},RE={key:0,class:"k-stepper__breadcrumb-arrow"},PE=["disabled","onClick"],FE={class:"k-stepper__breadcrumb-icon"},LE={class:"k-stepper__breadcrumb-label"},BE={class:"k-stepper__component-wrapper"},VE={key:0,class:"k-stepper__navigation"},kL=Q({__name:"Stepper",props:{steps:{},stateHandler:{default:"none"},stateKey:{default:"step"},transitionPreset:{default:"slide"},transitionNext:{},transitionPrev:{},breadcrumbPlacement:{default:"top"},keepAlive:{type:Boolean},hidebreadcrumbs:{type:Boolean,default:!1}},setup(t,{expose:e}){const n=t,r=H(),i=H(),o=H(n.steps[0].id);let s;const a=typeof n.stateHandler=="string"?DE[n.stateHandler]:n.stateHandler;s=new a(n.stateKey,f),pi(()=>s.destroy());const l=I(()=>c(o.value)),u=I(()=>{const k=d(o.value);return{...k?.bind||{},step:k,onNext:h,onPrev:p}});function c(k){const v=d(k),w=n.steps.findIndex(({id:x})=>!v||x===v.id);return{prev:w>0?n.steps[w-1]:null,current:v,next:w<n.steps.length-1?n.steps[w+1]:null}}function d(k){return n.steps.find(v=>v.id===k)}const h=()=>l.value.next&&f(l.value.next.id),p=()=>l.value.prev&&f(l.value.prev.id);function f(k){var v;if(k===o.value)return o.value;const w=n.steps.find(x=>!k||x.id===k);return w!=null&&w.disabled?f((v=c(w.id).prev)==null?void 0:v.id):(o.value=(w||n.steps[0]).id,s&&s.set(o.value),o.value)}const m=fp({next:h,prev:p,goto:f});xe(o,(k,v)=>i.value=v);const g=()=>{if(!i.value)return"next";const{steps:k}=n;return k.findIndex(v=>v.id===i.value)>k.findIndex(v=>v.id===o.value)?"prev":"next"};function b(){const{transitionNext:k,transitionPreset:v,transitionPrev:w,breadcrumbPlacement:x}=n;if(k||w)return g()==="next"?k:w;if(v==="fade")return`k-stepper-${v}`;const C=["top","bottom"].includes(x)?"h":"v";return`k-stepper-${v}-${C}-${g()}`}const y=()=>{var k;const v=(k=r.value)==null?void 0:k.getBoundingClientRect();if(!v)return;const w=v.top-20;w>0||window.scrollTo({top:w+window.scrollY,behavior:"smooth"})};return e({goto:f,next:h,prev:p,meta:l}),(k,v)=>(E(),O("div",{class:Se(`k-stepper k-stepper--breadcrumb-placement-${k.breadcrumbPlacement}`),"data-step":o.value},[k.hidebreadcrumbs?P("",!0):(E(),O("div",NE,[L(k.$slots,"before-breadcrumbs",be(Re({meta:l.value,navigate:m}))),U("div",{class:"k-stepper__breadcrumbs",ref_key:"breadcrumb",ref:r},[(E(!0),O(Oe,null,Mt(k.steps,(w,x)=>(E(),O(Oe,null,[x>0?(E(),O("div",RE)):P("",!0),L(k.$slots,"breadcrumb",{step:w,isActive:w.id===o.value,index:x,select:()=>f(w.id)},()=>[U("button",{type:"button",class:Se(["k-stepper__breadcrumb",{"k-stepper__breadcrumb--default":w.isValid===void 0,"k-stepper__breadcrumb--active":w.id===o.value,"k-stepper__breadcrumb--invalid":w.isValid===!1,"k-stepper__breadcrumb--valid":w.isValid===!0}]),disabled:w.disabled,onClick:C=>f(w.id)},[U("span",FE,[L(k.$slots,"breadcrumb-icon",{step:w},()=>[w.isValid===!0?(E(),z(B(Ze),{key:0,icon:"heroicons-solid:check",width:12})):w.isValid===!1?(E(),z(B(Ze),{key:1,icon:"heroicons:exclamation-triangle",width:17})):(E(),O(Oe,{key:2},[Be(oe(x+1),1)],64))])]),U("span",LE,oe(w.label),1)],10,PE)])],64))),256))],512),L(k.$slots,"after-breadcrumbs",be(Re({meta:l.value,navigate:m})))])),L(k.$slots,"before-content",be(Re({meta:l.value,navigate:m}))),U("div",BE,[he(up,{name:b(),mode:"out-in",onAfterEnter:y},{default:ee(()=>[k.keepAlive?(E(),z(Mk,{key:0},[(E(),z(Qe(u.value.step.component),re({key:o.value},u.value),null,16))],1024)):(E(),z(Qe(u.value.step.component),re({key:o.value},u.value),null,16))]),_:1},8,["name"]),k.$slots.navigation?(E(),O("div",VE,[L(k.$slots,"navigation",be(Re({meta:l.value,navigate:m})))])):P("",!0)]),L(k.$slots,"after-content",be(Re({meta:l.value,navigate:m})))],10,IE))}}),$E=["src","alt"],vu=Q({__name:"Image",props:{src:{},preview:{},alt:{},caption:{},captionVisibility:{default:"hover"},captionTheme:{default:"dark"},size:{default:"cover"},position:{default:"center"},width:{},height:{},aspectRatio:{}},emits:["loaded","error"],setup(t,{emit:e}){const n=t,r=e,i=H(),o=H(!1),s=H(!1),a=H(),l=I(()=>({"--k-image-size":n.size,"--k-image-preview":n.preview||"","--k-image-position":n.position,"--k-image-width":n.width||"initial","--k-image-height":n.height||"initial","--k-image-aspectratio":(n.aspectRatio==="natural"?a.value:n.aspectRatio)||"initial"}));function u(){o.value=!0;const{naturalWidth:d=0,naturalHeight:h=0}=i.value||{};a.value=`${d}/${h}`,r("loaded")}function c(){o.value=!0,s.value=!0,r("error")}return Tn(()=>{var d;return((d=i.value)==null?void 0:d.complete)&&u()}),(d,h)=>(E(),O("figure",{class:Se(["k-image",[`k-image--size-${d.size}`,{"k-image--loaded":o.value,"k-image--loading":!o.value}]]),style:kn(l.value)},[o.value?P("",!0):(E(),z(fv,{key:0,size:"small"})),qa(U("img",{src:d.src,alt:d.alt||d.caption,onLoad:u,onError:c,ref_key:"image",ref:i},null,40,$E),[[Wg,!s.value]]),d.$slots.caption||d.caption?(E(),O("figcaption",{key:1,class:Se(`k-image__caption k-image__caption--visibility-${d.captionVisibility} k-image__caption--theme-${!o.value||s.value?"light":d.captionTheme}`)},[L(d.$slots,"caption",{},()=>[Be(oe(d.caption),1)])],2)):P("",!0)],6))}}),ni=Q({__name:"Flex",props:{is:{default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(t){const e=t,n=I(()=>hv("flex",{justify:Ka(e.justify)||"initial",align:Ka(e.align)||"initial",wrap:e.nowrap?"nowrap":"wrap",gap:bp(e.gap),direction:e.direction}));return(r,i)=>(E(),z(Qe(r.is),{class:"k-flex",style:kn(n.value)},{default:ee(()=>[L(r.$slots,"default")]),_:3},8,["style"]))}}),jE={key:0,class:"k-card__thumbnail"},zE={key:0,class:"k-card__title"},HE={key:1,class:"k-card__subtitle"},qE={key:2,class:"k-card__content"},WE=Q({inheritAttrs:!1,__name:"Card",props:{is:{default:"div"},title:{},subtitle:{},variant:{default:"default"},appearance:{default:"border"},thumbnail:{},thumbnailOptions:{default:()=>({size:"cover",aspectRatio:"16/9",width:"100%"})}},setup(t){const e=t,n=hp(),r=I(()=>e.thumbnail||n.thumbnail),i=I(()=>e.title||e.subtitle||n.header),o=I(()=>n.actions),s=I(()=>n.default);return(a,l)=>(E(),z(Qe(a.is),re({class:["k-card",`k-card--variant-${a.variant}`,`k-card--appearance-${a.appearance}`,{"k-card--has-thumbnail":r.value},{"k-card--has-header":i.value},{"k-card--has-content":s.value},{"k-card--has-actions":o.value}]},a.$attrs),{default:ee(()=>[r.value?(E(),O("div",jE,[L(a.$slots,"thumbnail",{},()=>[a.thumbnail?(E(),z(vu,re({key:0},a.thumbnailOptions,{src:a.thumbnail}),null,16,["src"])):P("",!0)])])):P("",!0),i.value?(E(),z(ni,{key:1,is:"header",direction:"column",gap:"0rem",class:"k-card__header"},{default:ee(()=>[L(a.$slots,"header",{},()=>[a.title?(E(),O("div",zE,oe(a.title),1)):P("",!0),a.subtitle?(E(),O("div",HE,oe(a.subtitle),1)):P("",!0)])]),_:3})):P("",!0),s.value?(E(),O("div",qE,[L(a.$slots,"default")])):P("",!0),o.value?(E(),z(ni,{key:3,justify:"center",align:"center",class:"k-card__actions"},{default:ee(()=>[L(a.$slots,"actions")]),_:3})):P("",!0)]),_:3},16,["class"]))}}),wL=Q({__name:"Skeleton",props:{variant:{default:"shiny"},aspectRatio:{},width:{},height:{},rounding:{}},setup(t){const e=()=>t.rounding?t.rounding==="full"?"9999px":bp(t.rounding,"rounding"):"initial",n=I(()=>({"--aspect-ratio":!t.aspectRatio||t.width&&t.height?"initial":t.aspectRatio,"--width":t.width||"initial","--height":t.height||"initial","--border-radius":e()}));return(r,i)=>(E(),O("span",{class:Se(["k-skeleton",`k-skeleton--variant-${r.variant}`]),style:kn(n.value)},[L(r.$slots,"default")],6))}});var UE=$n("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator"),ln=UE.build(),Gv=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`slider:${t.id}`},Jv=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.thumb)==null?void 0:r.call(n,e))??`slider:${t.id}:thumb:${e}`},od=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.hiddenInput)==null?void 0:r.call(n,e))??`slider:${t.id}:input:${e}`},Yv=t=>{var e;return((e=t.ids)==null?void 0:e.control)??`slider:${t.id}:control`},KE=t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}:track`},GE=t=>{var e;return((e=t.ids)==null?void 0:e.range)??`slider:${t.id}:range`},vf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`slider:${t.id}:label`},JE=t=>{var e;return((e=t.ids)==null?void 0:e.valueText)??`slider:${t.id}:value-text`},YE=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.marker)==null?void 0:r.call(n,e))??`slider:${t.id}:marker:${e}`},XE=t=>t.getById(Gv(t)),ZE=(t,e)=>t.getById(Jv(t,e)),Xv=t=>Op(Qv(t),"[role=slider]"),QE=t=>Xv(t)[0],Zv=(t,e)=>t.getById(od(t,e)),Qv=t=>t.getById(Yv(t)),yf=(t,e)=>{const{prop:n,scope:r}=t,i=Qv(r);if(!i)return;const o=Vx(e,i).getPercentValue({orientation:n("orientation"),dir:n("dir"),inverted:{y:!0}});return Rv(o,n("min"),n("max"),n("step"))},eC=(t,e)=>{e.forEach((n,r)=>{const i=Zv(t,r);i&&Mx(i,{value:n})})},tC=t=>({left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0});function nC(t){const e=t[0],n=t[t.length-1];return[e,n]}function rC(t){const{prop:e,computed:n}=t,r=n("valuePercent"),[i,o]=nC(r);if(r.length===1){if(e("origin")==="center"){const s=r[0]<50,a=s?`${r[0]}%`:"50%",l=s?"50%":`${100-r[0]}%`;return{start:a,end:l}}return e("origin")==="end"?{start:`${o}%`,end:"0%"}:{start:"0%",end:`${100-o}%`}}return{start:`${i}%`,end:`${100-o}%`}}function iC(t){const{computed:e}=t,n=e("isVertical"),r=e("isRtl");return n?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[r?"right":"left"]:"var(--slider-range-start)",[r?"left":"right"]:"var(--slider-range-end)"}}function oC(t,e){const{context:n,prop:r}=t,{height:i=0}=n.get("thumbSize")??{},o=td([r("min"),r("max")],[-i/2,i/2]);return parseFloat(o(e).toFixed(2))}function sC(t,e){const{computed:n,context:r,prop:i}=t,{width:o=0}=r.get("thumbSize")??{};if(n("isRtl")){const a=td([i("max"),i("min")],[-o/2,o/2]);return-1*parseFloat(a(e).toFixed(2))}const s=td([i("min"),i("max")],[-o/2,o/2]);return parseFloat(s(e).toFixed(2))}function aC(t,e,n){const{computed:r,prop:i}=t;if(i("thumbAlignment")==="center")return`${e}%`;const o=r("isVertical")?oC(t,n):sC(t,n);return`calc(${e}% - ${o}px)`}function ey(t,e){const{prop:n}=t,r=Dp(e,n("min"),n("max"))*100;return aC(t,r,e)}function ty(t){const{computed:e,prop:n}=t;let r="visible";return n("thumbAlignment")==="contain"&&!e("hasMeasuredThumbSize")&&(r="hidden"),r}function bf(t,e){const{computed:n}=t,r=n("isVertical")?"bottom":"insetInlineStart";return{visibility:ty(t),position:"absolute",transform:"var(--slider-thumb-transform)",[r]:`var(--slider-thumb-offset-${e})`}}function lC(){return{touchAction:"none",userSelect:"none",WebkitUserSelect:"none",position:"relative"}}function uC(t){const{context:e,computed:n}=t,r=n("isVertical"),i=n("isRtl"),o=rC(t),s=e.get("thumbSize");return{...e.get("value").reduce((a,l,u)=>{const c=ey(t,l);return{...a,[`--slider-thumb-offset-${u}`]:c}},{}),"--slider-thumb-width":af(s?.width),"--slider-thumb-height":af(s?.height),"--slider-thumb-transform":r?"translateY(50%)":i?"translateX(50%)":"translateX(-50%)","--slider-range-start":o.start,"--slider-range-end":o.end}}function cC(t,e){const{computed:n}=t,r=n("isHorizontal"),i=n("isRtl");return{visibility:ty(t),position:"absolute",pointerEvents:"none",[r?"insetInlineStart":"bottom"]:ey(t,e),translate:"var(--tx) var(--ty)","--tx":r?i?"50%":"-50%":"0%","--ty":r?"0%":"50%"}}function dC(){return{userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none",position:"relative"}}function pC(t,e){return e.map((n,r)=>sd(t,n,r))}function mr(t,e){const{context:n,prop:r}=t;return Fv(n.get("value"),r("min"),r("max"),r("minStepsBetweenThumbs"))[e]}function sd(t,e,n){const{prop:r}=t,i=mr(t,n),o=Ip(e,r("min"),r("max"),r("step"));return Ds(o,i.min,i.max)}function hC(t,e,n){const{context:r,prop:i}=t,o=e??r.get("focusedIndex"),s=mr(t,o),a=b1(o,{...s,step:n??i("step"),values:r.get("value")});return a[o]=Ds(a[o],s.min,s.max),a}function fC(t,e,n){const{context:r,prop:i}=t,o=e??r.get("focusedIndex"),s=mr(t,o),a=y1(o,{...s,step:n??i("step"),values:r.get("value")});return a[o]=Ds(a[o],s.min,s.max),a}function mC(t,e){const{context:n}=t;return k1(n.get("value"),e)}function ny(t,e){const{state:n,send:r,context:i,prop:o,computed:s,scope:a}=t,l=o("aria-label"),u=o("aria-labelledby"),c=i.get("value"),d=i.get("focusedIndex"),h=n.matches("focus"),p=n.matches("dragging"),f=s("isDisabled"),m=o("invalid"),g=s("isInteractive"),b=o("orientation")==="horizontal",y=o("orientation")==="vertical";function k(w){return Dp(w,o("min"),o("max"))}function v(w){return Rv(w,o("min"),o("max"),o("step"))}return{value:c,dragging:p,focused:h,setValue(w){r({type:"SET_VALUE",value:w})},getThumbValue(w){return c[w]},setThumbValue(w,x){r({type:"SET_VALUE",index:w,value:x})},getValuePercent:k,getPercentValue:v,getThumbPercent(w){return k(c[w])},setThumbPercent(w,x){const C=v(x);r({type:"SET_VALUE",index:w,value:C})},getThumbMin(w){return mr(t,w).min},getThumbMax(w){return mr(t,w).max},increment(w){r({type:"INCREMENT",index:w})},decrement(w){r({type:"DECREMENT",index:w})},focus(){g&&r({type:"FOCUS",index:0})},getLabelProps(){return e.label({...ln.label.attrs,dir:o("dir"),"data-disabled":J(f),"data-orientation":o("orientation"),"data-invalid":J(m),"data-dragging":J(p),"data-focus":J(h),id:vf(a),htmlFor:od(a,0),onClick(w){var x;g&&(w.preventDefault(),(x=QE(a))==null||x.focus())},style:{userSelect:"none",WebkitUserSelect:"none"}})},getRootProps(){return e.element({...ln.root.attrs,"data-disabled":J(f),"data-orientation":o("orientation"),"data-dragging":J(p),"data-invalid":J(m),"data-focus":J(h),id:Gv(a),dir:o("dir"),style:uC(t)})},getValueTextProps(){return e.element({...ln.valueText.attrs,dir:o("dir"),"data-disabled":J(f),"data-orientation":o("orientation"),"data-invalid":J(m),"data-focus":J(h),id:JE(a)})},getTrackProps(){return e.element({...ln.track.attrs,dir:o("dir"),id:KE(a),"data-disabled":J(f),"data-invalid":J(m),"data-dragging":J(p),"data-orientation":o("orientation"),"data-focus":J(h),style:{position:"relative"}})},getThumbProps(w){var x;const{index:C=0,name:M}=w,T=c[C],A=mr(t,C),_=(x=o("getAriaValueText"))==null?void 0:x({value:T,index:C}),N=Array.isArray(l)?l[C]:l,$=Array.isArray(u)?u[C]:u;return e.element({...ln.thumb.attrs,dir:o("dir"),"data-index":C,"data-name":M,id:Jv(a,C),"data-disabled":J(f),"data-orientation":o("orientation"),"data-focus":J(h&&d===C),"data-dragging":J(p&&d===C),draggable:!1,"aria-disabled":Jw(f),"aria-label":N,"aria-labelledby":$??vf(a),"aria-orientation":o("orientation"),"aria-valuemax":A.max,"aria-valuemin":A.min,"aria-valuenow":c[C],"aria-valuetext":_,role:"slider",tabIndex:f?void 0:0,style:bf(t,C),onPointerDown(j){g&&(r({type:"THUMB_POINTER_DOWN",index:C}),j.stopPropagation())},onBlur(){g&&r({type:"BLUR"})},onFocus(){g&&r({type:"FOCUS",index:C})},onKeyDown(j){if(j.defaultPrevented||!g)return;const q=Ox(j)*o("step"),K={ArrowUp(){b||r({type:"ARROW_INC",step:q,src:"ArrowUp"})},ArrowDown(){b||r({type:"ARROW_DEC",step:q,src:"ArrowDown"})},ArrowLeft(){y||r({type:"ARROW_DEC",step:q,src:"ArrowLeft"})},ArrowRight(){y||r({type:"ARROW_INC",step:q,src:"ArrowRight"})},PageUp(){r({type:"ARROW_INC",step:q,src:"PageUp"})},PageDown(){r({type:"ARROW_DEC",step:q,src:"PageDown"})},Home(){r({type:"HOME"})},End(){r({type:"END"})}},X=vv(j,{dir:o("dir"),orientation:o("orientation")}),fe=K[X];fe&&(fe(j),j.preventDefault(),j.stopPropagation())}})},getHiddenInputProps(w){const{index:x=0,name:C}=w;return e.input({name:C??(o("name")?o("name")+(c.length>1?"[]":""):void 0),form:o("form"),type:"text",hidden:!0,defaultValue:c[x],id:od(a,x)})},getRangeProps(){return e.element({id:GE(a),...ln.range.attrs,dir:o("dir"),"data-dragging":J(p),"data-focus":J(h),"data-invalid":J(m),"data-disabled":J(f),"data-orientation":o("orientation"),style:iC(t)})},getControlProps(){return e.element({...ln.control.attrs,dir:o("dir"),id:Yv(a),"data-dragging":J(p),"data-disabled":J(f),"data-orientation":o("orientation"),"data-invalid":J(m),"data-focus":J(h),style:lC(),onPointerDown(w){if(!g||!kx(w)||xx(w))return;const x=Ep(w);r({type:"POINTER_DOWN",point:x}),w.preventDefault(),w.stopPropagation()}})},getMarkerGroupProps(){return e.element({...ln.markerGroup.attrs,role:"presentation",dir:o("dir"),"aria-hidden":!0,"data-orientation":o("orientation"),style:dC()})},getMarkerProps(w){const x=cC(t,w.value);let C;return w.value<_v(c)?C="under-value":w.value>Dv(c)?C="over-value":C="at-value",e.element({...ln.marker.attrs,id:YE(a,w.value),role:"presentation",dir:o("dir"),"data-orientation":o("orientation"),"data-value":w.value,"data-disabled":J(f),"data-state":C,style:x})},getDraggingIndicatorProps(w){const{index:x=0}=w,C=x===d&&p;return e.element({...ln.draggingIndicator.attrs,role:"presentation",dir:o("dir"),hidden:!C,"data-orientation":o("orientation"),"data-state":C?"open":"closed",style:bf(t,x)})}}}var gC=(t,e)=>t?.width===e?.width&&t?.height===e?.height,kf=(t,e,n,r,i)=>Fv(t,e,n,i*r).map(o=>{const s=Ip(o.value,o.min,o.max,r);return Ds(s,o.min,o.max)}),ry={props({props:t}){const e=t.min??0,n=t.max??100,r=t.step??1,i=t.defaultValue??[e],o=t.minStepsBetweenThumbs??0;return{dir:"ltr",thumbAlignment:"contain",origin:"start",orientation:"horizontal",minStepsBetweenThumbs:o,...t,defaultValue:kf(i,e,n,r,o),value:t.value?kf(t.value,e,n,r,o):void 0,max:n,step:r,min:e}},initialState(){return"idle"},context({prop:t,bindable:e,getContext:n}){return{thumbSize:e(()=>({defaultValue:t("thumbSize")||null})),value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),isEqual:_s,hash(r){return r.join(",")},onChange(r){var i;(i=t("onValueChange"))==null||i({value:r})}})),focusedIndex:e(()=>({defaultValue:-1,onChange(r){var i;const o=n();(i=t("onFocusChange"))==null||i({focusedIndex:r,value:o.get("value")})}})),fieldsetDisabled:e(()=>({defaultValue:!1}))}},computed:{isHorizontal:({prop:t})=>t("orientation")==="horizontal",isVertical:({prop:t})=>t("orientation")==="vertical",isRtl:({prop:t})=>t("orientation")==="horizontal"&&t("dir")==="rtl",isDisabled:({context:t,prop:e})=>!!e("disabled")||t.get("fieldsetDisabled"),isInteractive:({prop:t,computed:e})=>!(t("readOnly")||e("isDisabled")),hasMeasuredThumbSize:({context:t})=>t.get("thumbSize")!=null,valuePercent({context:t,prop:e}){return t.get("value").map(n=>100*Dp(n,e("min"),e("max")))}},watch({track:t,action:e,context:n}){t([()=>n.hash("value")],()=>{e(["syncInputElements","dispatchChangeEvent"])})},effects:["trackFormControlState","trackThumbSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],INCREMENT:{actions:["incrementThumbAtIndex"]},DECREMENT:{actions:["decrementThumbAtIndex"]}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:["setFocusedIndex"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]}}},focus:{entry:["focusActiveThumb"],on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:["clearFocusedIndex"]}}},dragging:{entry:["focusActiveThumb"],effects:["trackPointerMove"],on:{POINTER_UP:{target:"focus",actions:["invokeOnChangeEnd"]},POINTER_MOVE:{actions:["setPointerValue"]}}}},implementations:{guards:{hasIndex:({event:t})=>t.index!=null},effects:{trackFormControlState({context:t,scope:e}){return lu(XE(e),{onFieldsetDisabledChange(n){t.set("fieldsetDisabled",n)},onFormReset(){t.set("value",t.initial("value"))}})},trackPointerMove({scope:t,send:e}){return Hx(t.getDoc(),{onPointerMove(n){e({type:"POINTER_MOVE",point:n.point})},onPointerUp(){e({type:"POINTER_UP"})}})},trackThumbSize({context:t,scope:e,prop:n}){if(!(n("thumbAlignment")!=="contain"||n("thumbSize")))return Tv(Xv(e),{box:"border-box",measure(r){return tC(r)},onEntry({rects:r}){const i=x1(r[0],["width","height"]);gC(t.get("thumbSize"),i)||t.set("thumbSize",i)}})}},actions:{dispatchChangeEvent({context:t,scope:e}){eC(e,t.get("value"))},syncInputElements({context:t,scope:e}){t.get("value").forEach((n,r)=>{const i=Zv(e,r);bv(i,n.toString())})},invokeOnChangeEnd({prop:t,context:e}){var n;(n=t("onValueChangeEnd"))==null||n({value:e.get("value")})},setClosestThumbIndex(t){const{context:e,event:n}=t,r=yf(t,n.point);if(r==null)return;const i=mC(t,r);e.set("focusedIndex",i)},setFocusedIndex({context:t,event:e}){t.set("focusedIndex",e.index)},clearFocusedIndex({context:t}){t.set("focusedIndex",-1)},setPointerValue(t){queueMicrotask(()=>{const{context:e,event:n}=t,r=yf(t,n.point);if(r==null)return;const i=e.get("focusedIndex"),o=sd(t,r,i);e.set("value",s=>Do(s,i,o))})},focusActiveThumb({scope:t,context:e}){Ot(()=>{const n=ZE(t,e.get("focusedIndex"));n?.focus({preventScroll:!0})})},decrementThumbAtIndex(t){const{context:e,event:n}=t,r=hC(t,n.index,n.step);e.set("value",r)},incrementThumbAtIndex(t){const{context:e,event:n}=t,r=fC(t,n.index,n.step);e.set("value",r)},setFocusedThumbToMin(t){const{context:e}=t,n=e.get("focusedIndex"),{min:r}=mr(t,n);e.set("value",i=>Do(i,n,r))},setFocusedThumbToMax(t){const{context:e}=t,n=e.get("focusedIndex"),{max:r}=mr(t,n);e.set("value",i=>Do(i,n,r))},setValueAtIndex(t){const{context:e,event:n}=t,r=sd(t,n.value,n.index);e.set("value",i=>Do(i,n.index,r))},setValue(t){const{context:e,event:n}=t,r=pC(t,n.value);e.set("value",r)}}}};Kn()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);Kn()(["index","name"]);const vC=["data-value"],yC=Q({__name:"RangeSlider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},minStepsBetweenThumbs:{},marker:{},markerFormat:{},format:{type:Function,default:()=>t=>t},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(ry,{id:Qt(),...n,defaultValue:n.modelValue,onValueChangeEnd:({value:l})=>{const[u,c]=[o.value.getThumbMin(0),o.value.getThumbMax(0)],[d,h]=[o.value.getThumbMin(1),o.value.getThumbMax(1)],p=Math.max(u,Math.min(c,l[0])),f=Math.min(h,Math.max(d,l[1]));n.modelValue[0]===p&&n.modelValue[1]===f||r("update:modelValue",[p,f])}}),o=I(()=>ny(i,fi)),s=l=>{const[u,c]=[o.value.getThumbMin(0),o.value.getThumbMax(0)],[d,h]=[o.value.getThumbMin(1),o.value.getThumbMax(1)],[p,f]=[o.value.getThumbValue(0),o.value.getThumbValue(1)],[m,g]=l;if(m===p&&g===f)return;const b=Math.max(u,Math.min(c,m)),y=Math.min(h,Math.max(d,g));return p===b&&f===y?r("update:modelValue",[b,y]):o.value.setValue([b,y])},a=I(()=>{if(!n.marker)return[];const l=Math.floor(n.max/n.marker)+1;return Array(l).fill(void 0).map((u,c)=>{const d=(n.marker||0)*c;return{value:d,label:n.markerFormat?n.markerFormat(d):n.format(d)}})});return xe(()=>n.modelValue,s,{deep:!0}),(l,u)=>(E(),O("div",re(o.value.getRootProps(),{class:"k-rangeslider"}),[U("div",be(Re(o.value.getControlProps())),[U("div",be(Re(o.value.getTrackProps())),[U("div",be(Re(o.value.getRangeProps())),null,16)],16),(E(!0),O(Oe,null,Mt(o.value.value,(c,d)=>(E(),O("div",re({key:d,ref_for:!0},o.value.getThumbProps({index:d})),[U("input",re({ref_for:!0},o.value.getHiddenInputProps({index:d})),null,16)],16))),128))],16),a.value.length?(E(),O("div",be(re({key:0},o.value.getMarkerGroupProps())),[(E(!0),O(Oe,null,Mt(a.value,c=>(E(),O("span",re({ref_for:!0},o.value.getMarkerProps({value:c.value}),{"data-value":c.label}),null,16,vC))),256))],16)):P("",!0)],16))}}),bC=["data-value"],xL=Q({__name:"Slider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},marker:{},format:{type:Function,default:()=>t=>t},markerFormat:{},markerHighlight:{type:Boolean,default:!1},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(ry,{id:Qt(),...n,defaultValue:[n.modelValue],onValueChange:({value:l})=>{r("update:modelValue",l[0])}}),o=I(()=>ny(i,fi)),s=l=>o.value.setValue([Math.max(n.min||l,Math.min(n.max||l,l))]),a=I(()=>{const l=c=>n.markerFormat?n.markerFormat(c):n.format(c);if(!n.marker)return[];if(n.marker instanceof Array)return n.marker.map(c=>({value:c,label:l(c)}));const u=Math.floor((n.max-n.min)/n.marker)+1;return Array(u).fill(void 0).map((c,d)=>{const h=n.min+n.marker*d;return{value:h,label:l(h)}})});return xe(()=>n.modelValue,s,{deep:!0}),(l,u)=>(E(),O("div",re(o.value.getRootProps(),{class:["k-slider",{"k-slider--marker-highlight":l.markerHighlight}]}),[U("div",be(Re(o.value.getControlProps())),[U("div",be(Re(o.value.getTrackProps())),[U("div",be(Re(o.value.getRangeProps())),null,16)],16),U("div",be(Re(o.value.getThumbProps({index:0}))),[U("input",be(Re(o.value.getHiddenInputProps({index:0}))),null,16)],16),U("output",be(Re(o.value.getValueTextProps())),[L(l.$slots,"value",{value:o.value.value},()=>[Be(oe(l.format(o.value.value.at(0))),1)])],16)],16),a.value.length?(E(),O("div",be(re({key:0},o.value.getMarkerGroupProps())),[(E(!0),O(Oe,null,Mt(a.value,c=>(E(),O("span",re({ref_for:!0},o.value.getMarkerProps({value:c.value}),{"data-value":c.label}),null,16,bC))),256))],16)):P("",!0)],16))}}),Zi=Math.min,Kr=Math.max,Qa=Math.round,ia=Math.floor,vn=t=>({x:t,y:t}),kC={left:"right",right:"left",bottom:"top",top:"bottom"},wC={start:"end",end:"start"};function ad(t,e,n){return Kr(t,Zi(e,n))}function Is(t,e){return typeof t=="function"?t(e):t}function ri(t){return t.split("-")[0]}function Ns(t){return t.split("-")[1]}function iy(t){return t==="x"?"y":"x"}function Bp(t){return t==="y"?"height":"width"}function Gr(t){return["top","bottom"].includes(ri(t))?"y":"x"}function Vp(t){return iy(Gr(t))}function xC(t,e,n){n===void 0&&(n=!1);const r=Ns(t),i=Vp(t),o=Bp(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=el(s)),[s,el(s)]}function EC(t){const e=el(t);return[ld(t),e,ld(e)]}function ld(t){return t.replace(/start|end/g,e=>wC[e])}function CC(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function SC(t,e,n,r){const i=Ns(t);let o=CC(ri(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(ld)))),o}function el(t){return t.replace(/left|right|bottom|top/g,e=>kC[e])}function TC(t){return{top:0,right:0,bottom:0,left:0,...t}}function oy(t){return typeof t!="number"?TC(t):{top:t,right:t,bottom:t,left:t}}function tl(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function wf(t,e,n){let{reference:r,floating:i}=t;const o=Gr(e),s=Vp(e),a=Bp(s),l=ri(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ns(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const OC=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=wf(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:g,fn:b}=a[m],{x:y,y:k,data:v,reset:w}=await b({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=y??c,d=k??d,p={...p,[g]:{...p[g],...v}},w&&f<=50&&(f++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:c,y:d}=wf(u,h,l)),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}};async function sy(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Is(e,t),f=oy(p),m=a[h?d==="floating"?"reference":"floating":d],g=tl(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},v=tl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(g.top-v.top+f.top)/k.y,bottom:(v.bottom-g.bottom+f.bottom)/k.y,left:(g.left-v.left+f.left)/k.x,right:(v.right-g.right+f.right)/k.x}}const AC=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=Is(t,e)||{};if(u==null)return{};const d=oy(c),h={x:n,y:r},p=Vp(i),f=Bp(p),m=await s.getDimensions(u),g=p==="y",b=g?"top":"left",y=g?"bottom":"right",k=g?"clientHeight":"clientWidth",v=o.reference[f]+o.reference[p]-h[p]-o.floating[f],w=h[p]-o.reference[p],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let C=x?x[k]:0;(!C||!await(s.isElement==null?void 0:s.isElement(x)))&&(C=a.floating[k]||o.floating[f]);const M=v/2-w/2,T=C/2-m[f]/2-1,A=Zi(d[b],T),_=Zi(d[y],T),N=A,$=C-m[f]-_,j=C/2-m[f]/2+M,q=ad(N,j,$),K=!l.arrow&&Ns(i)!=null&&j!==q&&o.reference[f]/2-(j<N?A:_)-m[f]/2<0,X=K?j<N?j-N:j-$:0;return{[p]:h[p]+X,data:{[p]:q,centerOffset:j-q-X,...K&&{alignmentOffset:X}},reset:K}}}),MC=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Is(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=ri(i),y=Gr(a),k=ri(a)===a,v=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=h||(k||!m?[el(a)]:EC(a)),x=f!=="none";!h&&x&&w.push(...SC(a,m,f,v));const C=[a,...w],M=await sy(e,g),T=[];let A=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&T.push(M[b]),d){const q=xC(i,s,v);T.push(M[q[0]],M[q[1]])}if(A=[...A,{placement:i,overflows:T}],!T.every(q=>q<=0)){var _,N;const q=(((_=o.flip)==null?void 0:_.index)||0)+1,K=C[q];if(K){var $;const fe=d==="alignment"?y!==Gr(K):!1,Ee=(($=A[0])==null?void 0:$.overflows[0])>0;if(!fe||Ee)return{data:{index:q,overflows:A},reset:{placement:K}}}let X=(N=A.filter(fe=>fe.overflows[0]<=0).sort((fe,Ee)=>fe.overflows[1]-Ee.overflows[1])[0])==null?void 0:N.placement;if(!X)switch(p){case"bestFit":{var j;const fe=(j=A.filter(Ee=>{if(x){const Ie=Gr(Ee.placement);return Ie===y||Ie==="y"}return!0}).map(Ee=>[Ee.placement,Ee.overflows.filter(Ie=>Ie>0).reduce((Ie,An)=>Ie+An,0)]).sort((Ee,Ie)=>Ee[1]-Ie[1])[0])==null?void 0:j[0];fe&&(X=fe);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};async function _C(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ri(n),a=Ns(n),l=Gr(n)==="y",u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Is(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof f=="number"&&(p=a==="end"?f*-1:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const DC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await _C(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},IC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:b,y}=g;return{x:b,y}}},...l}=Is(t,e),u={x:n,y:r},c=await sy(e,l),d=Gr(ri(i)),h=iy(d);let p=u[h],f=u[d];if(o){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+c[g],k=p-c[b];p=ad(y,p,k)}if(s){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=f+c[g],k=f-c[b];f=ad(y,f,k)}const m=a.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}};function yu(){return typeof window<"u"}function gi(t){return $p(t)?(t.nodeName||"").toLowerCase():"#document"}function _t(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function On(t){var e;return(e=($p(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $p(t){return yu()?t instanceof Node||t instanceof _t(t).Node:!1}function en(t){return yu()?t instanceof Element||t instanceof _t(t).Element:!1}function wn(t){return yu()?t instanceof HTMLElement||t instanceof _t(t).HTMLElement:!1}function xf(t){return!yu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _t(t).ShadowRoot}function Rs(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=tn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function NC(t){return["table","td","th"].includes(gi(t))}function bu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function jp(t){const e=zp(),n=en(t)?tn(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function RC(t){let e=Er(t);for(;wn(e)&&!Qi(e);){if(jp(e))return e;if(bu(e))return null;e=Er(e)}return null}function zp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qi(t){return["html","body","#document"].includes(gi(t))}function tn(t){return _t(t).getComputedStyle(t)}function ku(t){return en(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Er(t){if(gi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xf(t)&&t.host||On(t);return xf(e)?e.host:e}function ay(t){const e=Er(t);return Qi(e)?t.ownerDocument?t.ownerDocument.body:t.body:wn(e)&&Rs(e)?e:ay(e)}function hs(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=ay(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=_t(i);if(o){const a=ud(s);return e.concat(s,s.visualViewport||[],Rs(i)?i:[],a&&n?hs(a):[])}return e.concat(i,hs(i,[],n))}function ud(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ly(t){const e=tn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=wn(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Qa(n)!==o||Qa(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Hp(t){return en(t)?t:t.contextElement}function Wi(t){const e=Hp(t);if(!wn(e))return vn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=ly(e);let s=(o?Qa(n.width):n.width)/r,a=(o?Qa(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const PC=vn(0);function uy(t){const e=_t(t);return!zp()||!e.visualViewport?PC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function FC(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==_t(t)?!1:e}function ii(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Hp(t);let s=vn(1);e&&(r?en(r)&&(s=Wi(r)):s=Wi(t));const a=FC(o,n,r)?uy(o):vn(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=_t(o),p=r&&en(r)?_t(r):r;let f=h,m=ud(f);for(;m&&r&&p!==f;){const g=Wi(m),b=m.getBoundingClientRect(),y=tn(m),k=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,v=b.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,d*=g.y,l+=k,u+=v,f=_t(m),m=ud(f)}}return tl({width:c,height:d,x:l,y:u})}function qp(t,e){const n=ku(t).scrollLeft;return e?e.left+n:ii(On(t)).left+n}function cy(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:qp(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function LC(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=On(r),a=e?bu(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=vn(1);const c=vn(0),d=wn(r);if((d||!d&&!o)&&((gi(r)!=="body"||Rs(s))&&(l=ku(r)),wn(r))){const p=ii(r);u=Wi(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=s&&!d&&!o?cy(s,l,!0):vn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function BC(t){return Array.from(t.getClientRects())}function VC(t){const e=On(t),n=ku(t),r=t.ownerDocument.body,i=Kr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Kr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+qp(t);const a=-n.scrollTop;return tn(r).direction==="rtl"&&(s+=Kr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function $C(t,e){const n=_t(t),r=On(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const u=zp();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function jC(t,e){const n=ii(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=wn(t)?Wi(t):vn(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:s,height:a,x:l,y:u}}function Ef(t,e,n){let r;if(e==="viewport")r=$C(t,n);else if(e==="document")r=VC(On(t));else if(en(e))r=jC(e,n);else{const i=uy(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tl(r)}function dy(t,e){const n=Er(t);return n===e||!en(n)||Qi(n)?!1:tn(n).position==="fixed"||dy(n,e)}function zC(t,e){const n=e.get(t);if(n)return n;let r=hs(t,[],!1).filter(a=>en(a)&&gi(a)!=="body"),i=null;const o=tn(t).position==="fixed";let s=o?Er(t):t;for(;en(s)&&!Qi(s);){const a=tn(s),l=jp(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&i&&["absolute","fixed"].includes(i.position)||Rs(s)&&!l&&dy(t,s))?r=r.filter(u=>u!==s):i=a,s=Er(s)}return e.set(t,r),r}function HC(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?bu(e)?[]:zC(e,this._c):[].concat(n),r],s=o[0],a=o.reduce((l,u)=>{const c=Ef(e,u,i);return l.top=Kr(c.top,l.top),l.right=Zi(c.right,l.right),l.bottom=Zi(c.bottom,l.bottom),l.left=Kr(c.left,l.left),l},Ef(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function qC(t){const{width:e,height:n}=ly(t);return{width:e,height:n}}function WC(t,e,n){const r=wn(e),i=On(e),o=n==="fixed",s=ii(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=vn(0);if(r||!r&&!o)if((gi(e)!=="body"||Rs(i))&&(a=ku(e)),r){const h=ii(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=qp(i));const u=i&&!r&&!o?cy(i,a):vn(0),c=s.left+a.scrollLeft-l.x-u.x,d=s.top+a.scrollTop-l.y-u.y;return{x:c,y:d,width:s.width,height:s.height}}function Zu(t){return tn(t).position==="static"}function Cf(t,e){if(!wn(t)||tn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return On(t)===n&&(n=n.ownerDocument.body),n}function py(t,e){const n=_t(t);if(bu(t))return n;if(!wn(t)){let i=Er(t);for(;i&&!Qi(i);){if(en(i)&&!Zu(i))return i;i=Er(i)}return n}let r=Cf(t,e);for(;r&&NC(r)&&Zu(r);)r=Cf(r,e);return r&&Qi(r)&&Zu(r)&&!jp(r)?n:r||RC(t)||n}const UC=async function(t){const e=this.getOffsetParent||py,n=this.getDimensions,r=await n(t.floating);return{reference:WC(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function KC(t){return tn(t).direction==="rtl"}const cd={convertOffsetParentRelativeRectToViewportRelativeRect:LC,getDocumentElement:On,getClippingRect:HC,getOffsetParent:py,getElementRects:UC,getClientRects:BC,getDimensions:qC,getScale:Wi,isElement:en,isRTL:KC};function hy(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function GC(t,e){let n=null,r;const i=On(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(a||e(),!h||!p)return;const f=ia(d),m=ia(i.clientWidth-(c+h)),g=ia(i.clientHeight-(d+p)),b=ia(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-b+"px",threshold:Kr(0,Zi(1,l))||1};let k=!0;function v(w){const x=w[0].intersectionRatio;if(x!==l){if(!k)return s();x?s(!1,x):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x===1&&!hy(u,t.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),o}function JC(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Hp(t),c=i||o?[...u?hs(u):[],...hs(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&a?GC(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(e)})),n()}),u&&!l&&p.observe(u),p.observe(e));let f,m=l?ii(t):null;l&&g();function g(){const b=ii(t);m&&!hy(m,b)&&n(),m=b,f=requestAnimationFrame(g)}return n(),()=>{var b;c.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const fy=DC,YC=IC,my=MC,XC=AC,gy=(t,e,n)=>{const r=new Map,i={platform:cd,...n},o={...i.platform,_c:r};return OC(t,e,{...i,platform:o})};function ZC(t){return QC(t)}function Qu(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function QC(t){for(let e=t;e;e=Qu(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Qu(t);e;e=Qu(e)){if(!(e instanceof Element))continue;const n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||n.filter!=="none"||e.tagName==="BODY"))return e}return null}const wu=Q({inheritAttrs:!1,__name:"Dropdown",props:{items:{},placement:{default:"bottom-start"},teleport:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},theme:{default:"border"},teleportTo:{default:"body"},offset:{default:8},variant:{},size:{},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{},stateTimeout:{},confirmLabel:{},label:{},icon:{},iconLeft:{},iconRight:{default:"fa-pro-regular:angle-down"}},setup(t,{expose:e}){const n=t,r=I(()=>{const{items:v,placement:w,teleport:x,keepOpen:C,...M}=n;return M}),i=H(!1),o=pu(),s=H(),a=H(),l=H({top:"",left:"",position:""});let u=()=>{};function c(){!s.value||!a.value||(u=JC(s.value.$el,a.value,()=>{!s.value||!a.value||gy(s.value.$el,a.value,{placement:n.placement,middleware:[fy(n.offset),my()],platform:{...cd,getOffsetParent:v=>cd.getOffsetParent(v,ZC)}}).then(({x:v,y:w})=>{l.value={top:`${w}px`,left:`${v}px`,position:"absolute"}})}))}pi(u),lp(()=>{if(i.value)return c();u()});const d=({target:v},w="dom")=>{if(v instanceof Element&&!(!s.value||!a.value)){if(w==="dom")return[s.value.$el,a.value].some(x=>x&&(v===x||x.contains(v)))?void 0:p(!1);if(w==="shadow-dom"){const x=o.value.getRootNode();return v.shadowRoot===x?void 0:p(!1)}}},h=({key:v})=>v==="Escape"&&p(!1),p=(v=!i.value)=>(v?y():k(),i.value=v,!0),f=I(()=>o.value.getRootNode()),m=I(()=>f.value instanceof ShadowRoot);function g(v){d(v,"dom")}function b(v){d(v,"shadow-dom")}function y(){window.addEventListener("keydown",h),m.value?(f.value.addEventListener("click",g),window.addEventListener("click",b)):window.addEventListener("click",g)}function k(){window.removeEventListener("keydown",h),m.value?(f.value.removeEventListener("click",g),window.removeEventListener("click",b)):window.removeEventListener("click",g)}return e({isOpen:i}),(v,w)=>(E(),O(Oe,null,[he(He,re({...r.value,...v.$attrs},{onClick:w[0]||(w[0]=()=>p()),ref_key:"trigger",ref:s,class:["k-dropdown-trigger",{"k-dropdown-trigger--open":!!i.value}]}),Ms({_:2},[v.$slots["icon-left"]?{name:"icon-left",fn:ee(()=>[L(v.$slots,"icon-left")]),key:"0"}:void 0,v.$slots.trigger?{name:"default",fn:ee(()=>[L(v.$slots,"trigger")]),key:"1"}:void 0,v.$slots["icon-right"]?{name:"icon-right",fn:ee(()=>[L(v.$slots,"icon-right")]),key:"2"}:void 0]),1040,["class"]),(E(),z(Kg,{to:v.teleportTo,disabled:!v.teleport},[he(up,{name:"k-dropdown"},{default:ee(()=>[i.value?(E(),O("div",{key:0,class:Se(`k-dropdown k-dropdown--theme-${v.theme}`),style:kn(l.value),ref_key:"content",ref:a,onClick:w[1]||(w[1]=()=>!v.keepOpen&&p(!1))},[L(v.$slots,"default",{close:p.bind(null,!1)},()=>[(E(!0),O(Oe,null,Mt(v.items,({action:x,icon:C,...M})=>(E(),z(He,re({ref_for:!0},M,{variant:"tertiary","icon-right":M.iconRight||C,onClick:()=>x()}),null,16,["icon-right","onClick"]))),256))])],6)):P("",!0)]),_:3})],8,["to","disabled"]))],64))}});function eS(t){return t!=null&&typeof t=="object"&&"$el"in t}function dd(t){if(eS(t)){const e=t.$el;return $p(e)&&gi(e)==="#comment"?null:e}return t}function Ii(t){return typeof t=="function"?t():B(t)}function tS(t){return{name:"arrow",options:t,fn(e){const n=dd(Ii(t.element));return n==null?{}:XC({element:n,padding:t.padding}).fn(e)}}}function vy(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Sf(t,e){const n=vy(t);return Math.round(e*n)/n}function nS(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=I(()=>{var C;return(C=Ii(n.open))!=null?C:!0}),o=I(()=>Ii(n.middleware)),s=I(()=>{var C;return(C=Ii(n.placement))!=null?C:"bottom"}),a=I(()=>{var C;return(C=Ii(n.strategy))!=null?C:"absolute"}),l=I(()=>{var C;return(C=Ii(n.transform))!=null?C:!0}),u=I(()=>dd(t.value)),c=I(()=>dd(e.value)),d=H(0),h=H(0),p=H(a.value),f=H(s.value),m=Zt({}),g=H(!1),b=I(()=>{const C={position:p.value,left:"0",top:"0"};if(!c.value)return C;const M=Sf(c.value,d.value),T=Sf(c.value,h.value);return l.value?{...C,transform:"translate("+M+"px, "+T+"px)",...vy(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:M+"px",top:T+"px"}});let y;function k(){if(u.value==null||c.value==null)return;const C=i.value;gy(u.value,c.value,{middleware:o.value,placement:s.value,strategy:a.value}).then(M=>{d.value=M.x,h.value=M.y,p.value=M.strategy,f.value=M.placement,m.value=M.middlewareData,g.value=C!==!1})}function v(){typeof y=="function"&&(y(),y=void 0)}function w(){if(v(),r===void 0){k();return}if(u.value!=null&&c.value!=null){y=r(u.value,c.value,k);return}}function x(){i.value||(g.value=!1)}return xe([o,s,a,i],k,{flush:"sync"}),xe([u,c],w,{flush:"sync"}),xe(i,x,{flush:"sync"}),Xg()&&Zg(v),{x:Ei(d),y:Ei(h),strategy:Ei(p),placement:Ei(f),middlewareData:Ei(m),isPositioned:Ei(g),floatingStyles:b,update:k}}const rS=["innerHTML"],iS=Q({__name:"ColumnLabel",props:{label:{},tooltip:{}},setup(t){const e=t,n=H(!1),r=H(!1),i=H(!1),o=H(null),s=H(null),a=H(null),{floatingStyles:l,middlewareData:u,placement:c,update:d}=nS(o,s,{placement:"top",middleware:[fy(8),my(),YC({padding:8}),tS({element:a})]}),h=I(()=>{const{x:b,y}=u.value.arrow||{},k={left:b!=null?`${b}px`:"",top:y!=null?`${y}px`:""},v=c.value||"top";return v.startsWith("top")&&(k.bottom="-6px"),v.startsWith("bottom")&&(k.top="-6px"),v.startsWith("left")&&(k.right="-6px"),v.startsWith("right")&&(k.left="-6px"),k});lp(()=>{n.value=i.value||r.value,n.value&&d()});const p=()=>{i.value=!0,r.value=!1},f=()=>{i.value=!1,r.value=!1},m=b=>{r.value=!r.value,b.stopPropagation()},g=()=>{r.value=!1};return Tn(()=>{document.addEventListener("click",g)}),pi(()=>{document.removeEventListener("click",g)}),(b,y)=>(E(),O(Oe,null,[U("span",{ref_key:"labelEl",ref:o,onClick:m,onMouseenter:p,onMouseleave:f,innerHTML:e.label},null,40,rS),n.value&&e.tooltip?(E(),O("div",{key:0,class:"k-datatable-label__tooltip",ref_key:"tooltipEl",ref:s,style:kn(B(l))},[Be(oe(e.tooltip)+" ",1),U("div",{ref_key:"arrowEl",ref:a,style:kn(h.value),class:"k-datatable-label__tooltip-arrow"},null,4)],4)):P("",!0)],64))}}),oS={key:0,class:"k-datatable__row"},sS={key:0,class:"k-datatable__cell k-datatable__cell-select"},aS=["data-col-id","onClick"],lS={key:1,class:"k-datatable__cell k-datatable__cell-actions"},uS={key:0,class:"k-datatable__cell k-datatable__cell-select"},cS={key:1,class:"k-datatable__cell k-datatable__cell-actions"},dS={key:0,class:"k-datatable__footer"},EL=Q({__name:"DataTable",props:{items:{},selected:{},theme:{default:"default"},header:{type:Boolean,default:!0},sticky:{type:[Boolean,String]},sortBy:{},sortableBy:{default:()=>[]},isDisabled:{type:Function,default:()=>!1},columns:{},labels:{default:()=>({selection:"Valgt",resetSelection:"Tilbakestill valg"})},cellWrapper:{type:Function,default:()=>({component:"div"})},rowWrapper:{type:Function,default:()=>({component:"div"})}},emits:["update:selected","update:sortBy"],setup(t,{emit:e}){const n=t,r=hp(),i=e,o=H([-1]),s=I(()=>n.items.filter(f=>!n.isDisabled(f))),a=I(()=>!!n.selected),l=I(()=>!!(Object.keys(n.sortBy||{}).length&&n.sortableBy.length)),u=I(()=>!!r.rowActions),c=I({get:()=>!!(s.value.length&&s.value.every(f=>n.selected&&n.selected.includes(f))),set:f=>i("update:selected",f?[...s.value]:[])}),d=I(()=>[a.value?"2.5rem":!1,...n.columns.filter(({disabled:f})=>!f).map(f=>f.size||"auto"),u.value?"0px":!1].filter(Boolean).join(" "));function h(f){var m;if(!l.value||!n.sortableBy.includes(f))return;let g=((m=n.sortBy)==null?void 0:m[f])||-1;i("update:sortBy",{[f]:g*-1})}function p(f,m){if(!f.isTrusted||!(f.target instanceof HTMLInputElement))return;let g=o.value.slice(-1).pop()||-1,b=[];if(f.shiftKey){let y=g>m,k=g+(y?-1:1);for(;y?k>m:k<m;){let v=n.items[k];!(n.selected||[]).includes(v)&&!n.isDisabled(v)&&b.push(v),y?k--:k++}}f.target.checked?o.value.push(m):g===m&&o.value.pop(),i("update:selected",[...n.selected||[],...b])}return(f,m)=>(E(),O("div",{class:Se([`k-datatable k-datatable--${f.theme}`,{"k-datatable--sticky":!!f.sticky,"k-datatable--no-header":!f.header}]),style:kn(`--k-datatable-layout: ${d.value}; --k-datatable-sticky-top: ${typeof f.sticky=="string"?f.sticky:"0"}`)},[f.header?(E(),O("div",oS,[a.value?(E(),O("div",sS,[he(pf,{class:"k-datatable__checkbox",modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=g=>c.value=g),disabled:!f.items.length},null,8,["modelValue","disabled"])])):P("",!0),(E(!0),O(Oe,null,Mt(f.columns.filter(({disabled:g})=>!g),g=>(E(),O("div",{class:Se(["k-datatable__cell",`k-datatable__cell--text-align-${g.align||"start"}`,{"k-datatable__cell-sort":l.value&&f.sortableBy.includes(g.id),"k-datatable__cell-sort--active":g.id in(f.sortBy||{})}]),key:g.id,"data-col-id":g.id,onClick:b=>h(g.id)},[L(f.$slots,`${g.id}-label`,{item:g},()=>[he(iS,{label:g.label,tooltip:g.tooltip},null,8,["label","tooltip"])]),he(B(Ze),{class:"k-datatable__cell-sort-icon",icon:(f.sortBy||{})[g.id]<0?"fa-pro-solid:caret-up":"fa-pro-solid:caret-down"},null,8,["icon"])],10,aS))),128)),u.value?(E(),O("div",lS)):P("",!0)])):P("",!0),(E(!0),O(Oe,null,Mt(f.items,(g,b)=>(E(),O("div",{class:"k-datatable__row",key:f.sortBy?g?.id||B(Qt)():b},[a.value?(E(),O("div",uS,[he(pf,{class:"k-datatable__checkbox","model-value":f.selected||[],"onUpdate:modelValue":m[1]||(m[1]=y=>i("update:selected",y)),value:g,onMousedown:m[2]||(m[2]=Wa(()=>{},["prevent"])),onClick:y=>p(y,b),disabled:f.isDisabled(g)},null,8,["model-value","value","onClick","disabled"])])):P("",!0),(E(),z(Qe(f.rowWrapper(g).component),re({class:"k-datatable__row-wrapper",ref_for:!0},f.rowWrapper(g).bind,Qg(f.rowWrapper(g).listeners)),{default:ee(()=>[(E(!0),O(Oe,null,Mt(f.columns.filter(({disabled:y})=>!y),(y,k)=>(E(),z(Qe(f.cellWrapper(g,y).component),re({ref_for:!0},f.cellWrapper(g,y).bind,{class:`k-datatable__cell k-datatable__cell--text-align-${y.align||"start"}`,key:`col-${y.id}`,"data-cell-id":y.id}),{default:ee(()=>[L(f.$slots,y.id,{item:g,column:y,rowIndex:b,colIndex:k})]),_:2},1040,["class","data-cell-id"]))),128))]),_:2},1040)),f.$slots["row-actions"]?(E(),O("div",cS,[L(f.$slots,"row-actions",{item:g})])):P("",!0)]))),128)),he(up,{name:"k-datatable-footer"},{default:ee(()=>{var g,b;return[f.$slots.footer||(g=f.selected)!=null&&g.length?(E(),O("div",dS,[(b=f.selected)!=null&&b.length?(E(),z(wu,{key:0,label:`${f.labels.selection} (${f.selected.length})`,teleport:!0},{default:ee(()=>[L(f.$slots,"select-actions"),he(He,{label:f.labels.resetSelection,"icon-right":"fa-pro-light:times-square",variant:"tertiary",onClick:m[3]||(m[3]=y=>i("update:selected",[]))},null,8,["label"])]),_:3},8,["label"])):P("",!0),L(f.$slots,"footer")])):P("",!0)]}),_:3})],6))}});var pS=$n("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Si=pS.build(),nl=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`radio-group:${t.id}`},Tf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`radio-group:${t.id}:label`},yy=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.item)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:${e}`},pd=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.itemHiddenInput)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:input:${e}`},hS=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.itemControl)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:control:${e}`},fS=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.itemLabel)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:label:${e}`},by=t=>{var e;return((e=t.ids)==null?void 0:e.indicator)??`radio-group:${t.id}:indicator`},xu=t=>t.getById(nl(t)),mS=(t,e)=>t.getById(pd(t,e)),gS=t=>t.getById(by(t)),vS=t=>{var e;return(e=xu(t))==null?void 0:e.querySelector("input:not(:disabled)")},yS=t=>{var e;return(e=xu(t))==null?void 0:e.querySelector("input:not(:disabled):checked")},Of=t=>{const e=`input[type=radio][data-ownedby='${CSS.escape(nl(t))}']:not([disabled])`;return Op(xu(t),e)},bS=(t,e)=>{if(e)return t.getById(yy(t,e))},kS=t=>({left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0}),wS=t=>({width:`${t.width}px`,height:`${t.height}px`,left:`${t.left}px`,top:`${t.top}px`});function xS(t,e){const{context:n,send:r,computed:i,prop:o,scope:s}=t,a=i("isDisabled"),l=o("readOnly");function u(h){const p=n.get("focusedValue")===h.value,f=p&&ds();return{value:h.value,invalid:!!h.invalid,disabled:!!h.disabled||a,checked:n.get("value")===h.value,focused:p,focusVisible:f,hovered:n.get("hoveredValue")===h.value,active:n.get("activeValue")===h.value}}function c(h){const p=u(h);return{"data-focus":J(p.focused),"data-focus-visible":J(p.focusVisible),"data-disabled":J(p.disabled),"data-readonly":J(l),"data-state":p.checked?"checked":"unchecked","data-hover":J(p.hovered),"data-invalid":J(p.invalid),"data-orientation":o("orientation"),"data-ssr":J(n.get("ssr"))}}const d=()=>{const h=yS(s)??vS(s);h?.focus()};return{focus:d,value:n.get("value"),setValue(h){r({type:"SET_VALUE",value:h,isTrusted:!1})},clearValue(){r({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return e.element({...Si.root.attrs,role:"radiogroup",id:nl(s),"aria-labelledby":Tf(s),"data-orientation":o("orientation"),"data-disabled":J(a),"aria-orientation":o("orientation"),dir:o("dir"),style:{position:"relative"}})},getLabelProps(){return e.element({...Si.label.attrs,dir:o("dir"),"data-orientation":o("orientation"),"data-disabled":J(a),id:Tf(s),onClick:d})},getItemState:u,getItemProps(h){const p=u(h);return e.label({...Si.item.attrs,dir:o("dir"),id:yy(s,h.value),htmlFor:pd(s,h.value),...c(h),onPointerMove(){p.disabled||p.hovered||r({type:"SET_HOVERED",value:h.value,hovered:!0})},onPointerLeave(){p.disabled||r({type:"SET_HOVERED",value:null})},onPointerDown(f){p.disabled||(p.focused&&f.pointerType==="mouse"&&f.preventDefault(),r({type:"SET_ACTIVE",value:h.value,active:!0}))},onPointerUp(){p.disabled||r({type:"SET_ACTIVE",value:null})},onClick(){var f;!p.disabled&&xp()&&((f=mS(s,h.value))==null||f.focus())}})},getItemTextProps(h){return e.element({...Si.itemText.attrs,dir:o("dir"),id:fS(s,h.value),...c(h)})},getItemControlProps(h){const p=u(h);return e.element({...Si.itemControl.attrs,dir:o("dir"),id:hS(s,h.value),"data-active":J(p.active),"aria-hidden":!0,...c(h)})},getItemHiddenInputProps(h){const p=u(h);return e.input({"data-ownedby":nl(s),id:pd(s,h.value),type:"radio",name:o("name")||o("id"),form:o("form"),value:h.value,onClick(f){if(l){f.preventDefault();return}f.currentTarget.checked&&r({type:"SET_VALUE",value:h.value,isTrusted:!0})},onBlur(){r({type:"SET_FOCUSED",value:null,focused:!1})},onFocus(){r({type:"SET_FOCUSED",value:h.value,focused:!0})},onKeyDown(f){f.defaultPrevented||f.key===" "&&r({type:"SET_ACTIVE",value:h.value,active:!0})},onKeyUp(f){f.defaultPrevented||f.key===" "&&r({type:"SET_ACTIVE",value:null})},disabled:p.disabled,defaultChecked:p.checked,style:Ap})},getIndicatorProps(){const h=n.get("indicatorRect");return e.element({id:by(s),...Si.indicator.attrs,dir:o("dir"),hidden:n.get("value")==null,"data-disabled":J(a),"data-orientation":o("orientation"),style:{"--transition-property":"left, top, width, height","--left":h?.left,"--top":h?.top,"--width":h?.width,"--height":h?.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:n.get("canIndicatorTransition")?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[o("orientation")==="horizontal"?"left":"top"]:o("orientation")==="horizontal"?"var(--left)":"var(--top)"}})}}}var{not:ES}=cu(),CS={props({props:t}){return{orientation:"vertical",...t}},initialState(){return"idle"},context({prop:t,bindable:e}){return{value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var r;(r=t("onValueChange"))==null||r({value:n})}})),activeValue:e(()=>({defaultValue:null})),focusedValue:e(()=>({defaultValue:null})),hoveredValue:e(()=>({defaultValue:null})),indicatorRect:e(()=>({defaultValue:{}})),canIndicatorTransition:e(()=>({defaultValue:!1})),fieldsetDisabled:e(()=>({defaultValue:!1})),ssr:e(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null}},computed:{isDisabled:({prop:t,context:e})=>!!t("disabled")||e.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:t,action:e,context:n}){t([()=>n.get("value")],()=>{e(["setIndicatorTransition","syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:ES("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:t})=>!!t.isTrusted},effects:{trackFormControlState({context:t,scope:e}){return lu(xu(e),{onFieldsetDisabledChange(n){t.set("fieldsetDisabled",n)},onFormReset(){t.set("value",t.initial("value"))}})},trackFocusVisible({scope:t}){var e;return Mp({root:(e=t.getRootNode)==null?void 0:e.call(t)})}},actions:{setValue({context:t,event:e}){t.set("value",e.value)},setHovered({context:t,event:e}){t.set("hoveredValue",e.value)},setActive({context:t,event:e}){t.set("activeValue",e.value)},setFocused({context:t,event:e}){t.set("focusedValue",e.value)},syncInputElements({context:t,scope:e}){Of(e).forEach(n=>{n.checked=n.value===t.get("value")})},setIndicatorTransition({context:t}){t.set("canIndicatorTransition",Iv(t.get("value")))},cleanupObserver({refs:t}){var e;(e=t.get("indicatorCleanup"))==null||e()},syncSsr({context:t}){t.set("ssr",!1)},syncIndicatorRect({context:t,scope:e,refs:n}){var r;if((r=n.get("indicatorCleanup"))==null||r(),!gS(e))return;const i=t.get("value"),o=bS(e,i);if(i==null||!o){t.set("canIndicatorTransition",!1),t.set("indicatorRect",{});return}const s=Tv([o],{measure(a){return kS(a)},onEntry({rects:a}){t.set("indicatorRect",wS(a[0]))}});n.set("indicatorCleanup",s)},dispatchChangeEvent({context:t,scope:e}){Of(e).forEach(n=>{const r=n.value===t.get("value");r!==n.checked&&Sp(n,{checked:r})})}}}};Kn()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);Kn()(["value","disabled","invalid"]);const SS=["aria-describedby"],CL=Q({__name:"RadioGroup",props:{label:{},modelValue:{},items:{},variant:{default:"radio"},direction:{default:"vertical"},disabled:{type:Boolean},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=pp(du,I(()=>({label:""}))),r=t,i=e,o=mi(CS,{id:Qt(),name:Qt(),...r,defaultValue:r.modelValue,onValueChange:({value:a})=>i("update:modelValue",a)}),s=I(()=>xS(o,fi));return xe(()=>r.modelValue,a=>s.value.setValue(a)),(a,l)=>(E(),O("div",re({class:["k-radiogroup",`k-radiogroup--variant-${a.variant} k-radiogroup--direction-${a.direction}`]},s.value.getRootProps(),{"aria-describedby":B(n).helpId}),[a.variant==="radio"&&(B(n).label||a.label)?(E(),O("span",be(re({key:0},s.value.getLabelProps())),oe(B(n).label||a.label),17)):P("",!0),a.variant==="segment"?(E(),O("div",be(re({key:1},s.value.getIndicatorProps())),null,16)):P("",!0),(E(!0),O(Oe,null,Mt(a.items,u=>(E(),O("label",re({ref_for:!0},s.value.getItemProps({value:u.id})),[U("span",re({ref_for:!0},s.value.getItemTextProps({value:u.id})),oe(u.label),17),U("input",re({ref_for:!0},s.value.getItemHiddenInputProps({value:u.id})),null,16),U("div",re({ref_for:!0},s.value.getItemControlProps({value:u.id})),null,16)],16))),256))],16,SS))}}),SL=Q({__name:"Grid",props:{is:{default:"div"},columns:{default:1},align:{},rows:{},gap:{default:"default"},areas:{}},setup(t){const e=t,n=(o,s)=>o?typeof o=="number"||typeof o=="string"&&o.match(/^\d+$/)?`repeat(${o}, 1fr)`:o.match(/^(\d+\s?)+$/)?o.split(" ").map(a=>`${a}fr`).join(" "):o:s,r=o=>{if(o)return Array.isArray(o)?o.map(s=>`"${s}"`).join(`
1
+ import{E as Ta,q as Q,o as E,d as z,i as Tn,c as O,b as P,y as qa,z as Wg,a as U,n as Se,g as L,x as kn,f as H,e as I,D as xe,w as ee,j as he,v as B,B as Be,t as oe,m as re,r as Qe,G as Ug,H as qc,O as Tk,I as be,J as Re,F as Oe,l as Mt,C as pi,L as lp,M as Ms,A as up,N as Kg,s as ls,Q as Gg,V as Zt,U as xr,X as Xt,aj as Ok,u as cp,P as dp,R as Jg,S as Yg,$ as pp,a4 as Xg,a5 as Zg,W as Ak,Y as hp,k as Wa,a0 as Qg,ac as Mk,h as fp,K as Mo,a6 as Ei,aa as mp,T as _k,Z as Dk,a3 as Ik}from"./_plugin-vue_export-helper.js";var Nk=Object.defineProperty,Rk=(t,e,n)=>e in t?Nk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jt=(t,e,n)=>(Rk(t,typeof e!="symbol"?e+"":e,n),n);function ev(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=ev(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Pk(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ev(t))&&(r&&(r+=" "),r+=e);return r}const $h=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,jh=Pk,rn=(t,e)=>n=>{var r;if(e?.variants==null)return jh(t,n?.class,n?.className);const{variants:i,defaultVariants:o}=e,s=Object.keys(i).map(u=>{const c=n?.[u],d=o?.[u];if(c===null)return null;const h=$h(c)||$h(d);return i[u][h]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:h,...p}=c;return Object.entries(p).every(f=>{let[m,g]=f;return Array.isArray(g)?g.includes({...o,...a}[m]):{...o,...a}[m]===g})?[...u,d,h]:u},[]);return jh(t,s,l,n?.class,n?.className)},tv=/^[a-z0-9]+(-[a-z0-9]+)*$/,nu=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:r,prefix:l,name:a};return e&&!Oa(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!Oa(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:o};return e&&!Oa(a,n)?null:a}return null},Oa=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,nv=Object.freeze({left:0,top:0,width:16,height:16}),Ua=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ru=Object.freeze({...nv,...Ua}),Wc=Object.freeze({...ru,body:"",hidden:!1});function Fk(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function zh(t,e){const n=Fk(t,e);for(const r in Wc)r in Ua?r in t&&!(r in n)&&(n[r]=Ua[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function Lk(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const a=r[s]&&r[s].parent,l=a&&o(a);l&&(i[s]=[a].concat(l))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function Bk(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function s(a){o=zh(r[a]||i[a],o)}return s(e),n.forEach(s),zh(t,o)}function rv(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=Lk(t);for(const i in r){const o=r[i];o&&(e(i,Bk(t,i,o)),n.push(i))}return n}const Vk={provider:"",aliases:{},not_found:{},...nv};function Uu(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function iv(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!Uu(t,Vk))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!Uu(o,Wc))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i||typeof s!="string"||!n[s]&&!r[s]||!Uu(o,Wc))return null}return e}const Hh=Object.create(null);function $k(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Yi(t,e){const n=Hh[t]||(Hh[t]=Object.create(null));return n[e]||(n[e]=$k(t,e))}function ov(t,e){return iv(e)?rv(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function jk(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let us=!1;function sv(t){return typeof t=="boolean"&&(us=t),us}function zk(t){const e=typeof t=="string"?nu(t,!0,us):t;if(e){const n=Yi(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Hk(t,e){const n=nu(t,!0,us);if(!n)return!1;const r=Yi(n.provider,n.prefix);return e?jk(r,n.name,e):(r.missing.add(n.name),!0)}function qk(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),us&&!e&&!t.prefix){let i=!1;return iv(t)&&(t.prefix="",rv(t,(o,s)=>{Hk(o,s)&&(i=!0)})),i}const n=t.prefix;if(!Oa({prefix:n,name:"a"}))return!1;const r=Yi(e,n);return!!ov(r,t)}const av=Object.freeze({width:null,height:null}),lv=Object.freeze({...av,...Ua}),Wk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qh(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Wk);if(r===null||!r.length)return t;const i=[];let o=r.shift(),s=Uk.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?i.push(o):i.push(Math.ceil(a*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}function Kk(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),o=t.indexOf("</"+e);if(i===-1||o===-1)break;const s=t.indexOf(">",o);if(s===-1)break;n+=t.slice(i+1,o).trim(),t=t.slice(0,r).trim()+t.slice(s+1)}return{defs:n,content:t}}function Gk(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Jk(t,e,n){const r=Kk(t);return Gk(r.defs,e+r.content+n)}const Yk=t=>t==="unset"||t==="undefined"||t==="none";function Xk(t,e){const n={...ru,...t},r={...lv,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(m=>{const g=[],b=m.hFlip,y=m.vFlip;let k=m.rotate;b?y?k+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=i.height/2+i.top,g.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:v=i.width/2+i.left,g.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(i.left!==i.top&&(v=i.left,i.left=i.top,i.top=v),i.width!==i.height&&(v=i.width,i.width=i.height,i.height=v)),g.length&&(o=Jk(o,'<g transform="'+g.join(" ")+'">',"</g>"))});const s=r.width,a=r.height,l=i.width,u=i.height;let c,d;s===null?(d=a===null?"1em":a==="auto"?u:a,c=qh(d,l/u)):(c=s==="auto"?l:s,d=a===null?qh(c,u/l):a==="auto"?u:a);const h={},p=(m,g)=>{Yk(g)||(h[m]=g.toString())};p("width",c),p("height",d);const f=[i.left,i.top,l,u];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:o}}const Zk=/\sid="(\S+)"/g,Qk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ew=0;function tw(t,e=Qk){const n=[];let r;for(;r=Zk.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof e=="function"?e(o):e+(ew++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const Uc=Object.create(null);function nw(t,e){Uc[t]=e}function Kc(t){return Uc[t]||Uc[""]}function gp(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const vp=Object.create(null),ta=["https://api.simplesvg.com","https://api.unisvg.com"],Gc=[];for(;ta.length>0;)ta.length===1||Math.random()>.5?Gc.push(ta.shift()):Gc.push(ta.pop());vp[""]=gp({resources:["https://api.iconify.design"].concat(Gc)});function uv(t,e){const n=gp(e);return n===null?!1:(vp[t]=n,!0)}function yp(t){return vp[t]}const rw=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let Wh=rw();function iw(t,e){const n=yp(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function ow(t){return t===404}const sw=(t,e,n)=>{const r=[],i=iw(t,e),o="icons";let s={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=i&&u>0&&(r.push(s),s={type:o,provider:t,prefix:e,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function aw(t){if(typeof t=="string"){const e=yp(t);if(e)return e.path}return"/"}const lw=(t,e,n)=>{if(!Wh){n("abort",424);return}let r=aw(e.provider);switch(e.type){case"icons":{const o=e.prefix,s=e.icons.join(","),a=new URLSearchParams({icons:s});r+=o+".json?"+a.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Wh(t+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(ow(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},uw={prepare:sw,send:lw};function cw(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,a=i.name,l=n[o]||(n[o]=Object.create(null)),u=l[s]||(l[s]=Yi(o,s));let c;a in u.icons?c=e.loaded:s===""||u.missing.has(a)?c=e.missing:c=e.pending;const d={provider:o,prefix:s,name:a};c.push(d)}),e}function cv(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function dw(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const s=o.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==i)return!0;const u=l.name;if(t.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||cv([t],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let pw=0;function hw(t,e,n){const r=pw++,i=cv.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function fw(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?nu(i,e,n):i;o&&r.push(o)}),r}var mw={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gw(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let x=t.resources.slice(0);for(s=[];x.length>1;){const C=Math.floor(Math.random()*x.length);s.push(x[C]),x=x.slice(0,C).concat(x.slice(C+1))}s=s.concat(x)}else s=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l="pending",u=0,c,d=null,h=[],p=[];typeof r=="function"&&p.push(r);function f(){d&&(clearTimeout(d),d=null)}function m(){l==="pending"&&(l="aborted"),f(),h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function g(x,C){C&&(p=[]),typeof x=="function"&&p.push(x)}function b(){return{startTime:a,payload:e,status:l,queriesSent:u,queriesPending:h.length,subscribe:g,abort:m}}function y(){l="failed",p.forEach(x=>{x(void 0,c)})}function k(){h.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),h=[]}function v(x,C,M){const T=C!=="success";switch(h=h.filter(A=>A!==x),l){case"pending":break;case"failed":if(T||!t.dataAfterTimeout)return;break;default:return}if(C==="abort"){c=M,y();return}if(T){c=M,h.length||(s.length?w():y());return}if(f(),k(),!t.random){const A=t.resources.indexOf(x.resource);A!==-1&&A!==t.index&&(t.index=A)}l="completed",p.forEach(A=>{A(M)})}function w(){if(l!=="pending")return;f();const x=s.shift();if(x===void 0){if(h.length){d=setTimeout(()=>{f(),l==="pending"&&(k(),y())},t.timeout);return}y();return}const C={status:"pending",resource:x,callback:(M,T)=>{v(C,M,T)}};h.push(C),u++,d=setTimeout(w,t.rotate),n(x,e,C.callback)}return setTimeout(w),b}function dv(t){const e={...mw,...t};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,a,l){const u=gw(e,s,a,(c,d)=>{r(),l&&l(c,d)});return n.push(u),u}function o(s){return n.find(a=>s(a))||null}return{query:i,find:o,setIndex:s=>{e.index=s},getIndex:()=>e.index,cleanup:r}}function Uh(){}const Ku=Object.create(null);function vw(t){if(!Ku[t]){const e=yp(t);if(!e)return;const n=dv(e),r={config:e,redundancy:n};Ku[t]=r}return Ku[t]}function yw(t,e,n){let r,i;if(typeof t=="string"){const o=Kc(t);if(!o)return n(void 0,424),Uh;i=o.send;const s=vw(t);s&&(r=s.redundancy)}else{const o=gp(t);if(o){r=dv(o);const s=t.resources?t.resources[0]:"",a=Kc(s);a&&(i=a.send)}}return!r||!i?(n(void 0,424),Uh):r.query(e,i,n)().abort}function Kh(){}function bw(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,dw(t)}))}function kw(t){const e=[],n=[];return t.forEach(r=>{(r.match(tv)?e:n).push(r)}),{valid:e,invalid:n}}function xo(t,e,n){function r(){const i=t.pendingIcons;e.forEach(o=>{i&&i.delete(o),t.icons[o]||t.missing.add(o)})}if(n&&typeof n=="object")try{if(!ov(t,n).length){r();return}}catch(i){console.error(i)}r(),bw(t)}function Gh(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function ww(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;if(delete t.iconsToLoad,!i||!i.length)return;const o=t.loadIcon;if(t.loadIcons&&(i.length>1||!o)){Gh(t.loadIcons(i,r,n),u=>{xo(t,i,u)});return}if(o){i.forEach(u=>{const c=o(u,r,n);Gh(c,d=>{const h=d?{prefix:r,icons:{[u]:d}}:null;xo(t,[u],h)})});return}const{valid:s,invalid:a}=kw(i);if(a.length&&xo(t,a,null),!s.length)return;const l=r.match(tv)?Kc(n):null;if(!l){xo(t,s,null);return}l.prepare(n,r,s).forEach(u=>{yw(n,u,c=>{xo(t,u.icons,c)})})}))}const xw=(t,e)=>{const n=fw(t,!0,sv()),r=cw(n);if(!r.pending.length){let l=!0;return e&&setTimeout(()=>{l&&e(r.loaded,r.missing,r.pending,Kh)}),()=>{l=!1}}const i=Object.create(null),o=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,o.push(Yi(u,c));const d=i[u]||(i[u]=Object.create(null));d[c]||(d[c]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:c,name:d}=l,h=Yi(u,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),i[u][c].push(d))}),o.forEach(l=>{const u=i[l.provider][l.prefix];u.length&&ww(l,u)}),e?hw(e,r,o):Kh};function Ew(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in av?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const Cw=/[\s,]+/;function Sw(t,e){e.split(Cw).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Tw(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function Ow(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Aw(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mw(t){return"data:image/svg+xml,"+Aw(t)}function _w(t){return'url("'+Mw(t)+'")'}const Jh={...lv,inline:!1},Dw={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Iw={display:"inline-block"},Jc={backgroundColor:"currentColor"},pv={backgroundColor:"transparent"},Yh={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Xh={webkitMask:Jc,mask:Jc,background:pv};for(const t in Xh){const e=Xh[t];for(const n in Yh)e[t+n]=Yh[n]}const Aa={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Aa[t+"-flip"]=e,Aa[t.slice(0,1)+"-flip"]=e,Aa[t+"Flip"]=e});function Zh(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Qh=(t,e)=>{const n=Ew(Jh,e),r={...Dw},i=e.mode||"svg",o={},s=e.style,a=typeof s=="object"&&!(s instanceof Array)?s:{};for(let m in e){const g=e[m];if(g!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[m]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&Sw(n,g);break;case"color":o.color=g;break;case"rotate":typeof g=="string"?n[m]=Tw(g):typeof g=="number"&&(n[m]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete r["aria-hidden"];break;default:{const b=Aa[m];b?(g===!0||g==="true"||g===1)&&(n[b]=!0):Jh[m]===void 0&&(r[m]=g)}}}const l=Xk(t,n),u=l.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),i==="svg"){r.style={...o,...a},Object.assign(r,u);let m=0,g=e.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),r.innerHTML=tw(l.body,g?()=>g+"ID"+m++:"iconifyVue"),ls("svg",r)}const{body:c,width:d,height:h}=t,p=i==="mask"||(i==="bg"?!1:c.indexOf("currentColor")!==-1),f=Ow(c,{...u,width:d+"",height:h+""});return r.style={...o,"--svg":_w(f),width:Zh(u.width),height:Zh(u.height),...Iw,...p?Jc:pv,...a},ls("span",r)};sv(!0);nw("",uw);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!qk(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;uv(n,i)||console.error(r)}catch{console.error(r)}}}}const Nw={...ru,body:""},Ze=Q({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,e,n){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let r;if(typeof t!="string"||(r=nu(t,!1,!0))===null)return this.abortLoading(),null;let i=zk(r);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:t,abort:xw([r],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==t&&(this._name=t,e&&e(t)),n){i=Object.assign({},i);const s=n(i.body,r.name,r.prefix,r.provider);typeof s=="string"&&(i.body=s)}const o=["iconify"];return r.prefix!==""&&o.push("iconify--"+r.prefix),r.provider!==""&&o.push("iconify--"+r.provider),{data:i,classes:o}}},render(){this.counter;const t=this.$attrs,e=this.iconMounted||t.ssr?this.getIcon(t.icon,t.onLoad,t.customise):null;if(!e)return Qh(Nw,t);let n=t;return e.classes&&(n={...t,class:(typeof t.class=="string"?t.class+" ":"")+e.classes.join(" ")}),Qh({...ru,...e.data},n)}});uv("",{resources:["https://icons.ui.kvass.no"]});function Rw(t){return!t||typeof t!="object"?!1:typeof t.then=="function"&&typeof t.catch=="function"}const Pw=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],Fw=(t,e)=>e==="default"?`var(--k-ui-${t})`:`var(--k-ui-${t}-${e})`,Ka=t=>{switch(t){case"start":case"end":return`flex-${t}`;default:return t}},bp=(t,e="spacing")=>t.split(" ").map(n=>typeof n=="number"||typeof n=="string"&&n.match(/^\d+$/)?`${n}rem`:typeof n=="string"&&Pw.includes(n)?Fw(e,n):n).join(" ");function Lw(){var t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=Math.random()*16;return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),(n==="x"?r:r&3|8).toString(16)})}const hv=(t,e)=>Object.fromEntries(Object.entries(e).map(([n,r])=>[`--k-${t}-${n}`,r])),Bw=function(t){return Object.prototype.toString.call(t)==="[object Object]"};function Vw(t){return Array.isArray(t)}const fv=Q({__name:"Spinner",props:{size:{default:"medium"}},setup(t){return(e,n)=>(E(),O("span",{class:Se(`k-spinner k-spinner--size-${e.size}`)},null,2))}}),$w={class:"k-button__content"},jw={key:0,class:"k-button__icon k-button__icon--left"},zw={key:1,class:"k-button__icon k-button__icon--right"},Hw={key:2,class:"k-button__confirm-label"},He=Q({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(t,{emit:e}){const n=t,r=e,i={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},o=I(()=>!h.value||u.value==="loading"?n.variant:u.value=="confirm"?"warning":i[u.value]||n.variant),s=I(()=>n.loading||u.value==="loading"),a=H(),l=I(()=>{if(u.value)return["error","success"].includes(u.value)||s.value}),u=H("idle"),c=H(),d=H(),h=I(()=>u.value||s.value),p=I(()=>["error","success"].includes(u.value)),f=I(()=>u.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function m(w){if(!w)return;g(),d.value=w,a.value=setTimeout(()=>u.value="loading",100);let x=C=>{g(),n.stateTimeout?(u.value=C,c.value=setTimeout(()=>{g(),r(C)},n.stateTimeout)):r(C)};d.value.then(()=>x("success")).catch(()=>x("error"))}function g(){a.value&&clearTimeout(a.value),c.value&&clearTimeout(c.value),d.value=null,u.value="idle"}xe(()=>n.promise,w=>{w&&Rw(w)&&m(w)});const b=H(),y=I(()=>u.value==="confirm");function k(w){if(n.confirm&&u.value!=="confirm")return u.value="confirm";g(),r("click",w)}const v=rn("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(w,x)=>(E(),z(Qe(w.is),re({type:"button",class:B(v)({variant:o.value,size:w.size,isLoading:s.value,isBusy:l.value}),"aria-busy":l.value,inert:l.value},w.$attrs,{onClick:k,ref_key:"rootElement",ref:b}),{default:ee(()=>[qa(U("span",$w,[w.icon||w.iconLeft||w.$slots.icon||w.$slots["icon-left"]?(E(),O("span",jw,[L(w.$slots,"icon-left",{},()=>[L(w.$slots,"icon",{},()=>[he(B(Ze),{icon:w.icon||w.iconLeft},null,8,["icon"])])])])):P("",!0),L(w.$slots,"default",{},()=>[Be(oe(w.label),1)]),w.iconRight||w.$slots["icon-right"]?(E(),O("span",zw,[L(w.$slots,"icon-right",{},()=>[he(B(Ze),{icon:w.iconRight},null,8,["icon"])])])):P("",!0)],512),[[Wg,!y.value]]),s.value?(E(),z(fv,{key:0})):P("",!0),p.value?(E(),z(B(Ze),{key:1,class:"k-button__state-indicator",icon:f.value},null,8,["icon"])):P("",!0),y.value?(E(),O("span",Hw,oe(w.confirmLabel),1)):P("",!0)]),_:3},16,["class","aria-busy","inert"]))}}),qw={class:"k-alert__content"},Ww={key:0,class:"k-alert__title"},Uw={class:"k-alert__icon"},vL=Q({__name:"Alert",props:{variant:{default:"neutral"},icon:{},title:{},content:{},action:{}},emits:["action"],setup(t,{emit:e}){const n=t,r=e,i=rn("k-alert",{variants:{variant:{success:"k-alert--success",neutral:"k-alert--neutral",info:"k-alert--info",danger:"k-alert--danger",warning:"k-alert--warning",primary:"k-alert--primary"}}}),o={success:"fa-pro-light:circle-check",info:"fa-pro-light:circle-question",warning:"fa-pro-light:exclamation-triangle",danger:"fa-pro-light:exclamation-circle"};return(s,a)=>(E(),O("div",{role:"alert",class:Se(B(i)({...n}))},[U("div",qw,[s.title||s.$slots.title?(E(),O("div",Ww,[L(s.$slots,"title",{},()=>[U("strong",null,oe(s.title),1)])])):P("",!0),L(s.$slots,"default",{},()=>[U("span",null,oe(s.content),1)]),s.action?(E(),z(He,{key:1,label:s.action,size:"small",class:"k-alert__action",onClick:a[0]||(a[0]=l=>r("action",{event:l,name:s.action}))},null,8,["label"])):P("",!0)]),U("div",Uw,[L(s.$slots,"icon",{},()=>[s.icon||o[s.variant]?(E(),z(B(Ze),{key:0,icon:s.icon||o[s.variant]},null,8,["icon"])):P("",!0)])])],2))}}),Kw={class:"k-badge__label"},yL=Q({__name:"Badge",props:{variant:{default:"neutral"},appearance:{default:"solid"},icon:{},dismissable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},label:{}},emits:["dismiss"],setup(t,{emit:e}){const n=t,r=e,i={task:"fa-pro-solid:circle",dot:"fa-pro-solid:circle"},o=rn("k-badge",{variants:{variant:{neutral:"k-badge--variant-neutral",info:"k-badge--variant-info",warning:"k-badge--variant-warning",success:"k-badge--variant-success",danger:"k-badge--variant-danger",primary:"k-badge--variant-primary"},appearance:{solid:"k-badge--appearance-solid",outline:"k-badge--appearance-outline",filled:"k-badge--appearance-filled",task:"k-badge--appearance-task",dot:"k-badge--appearance-dot"},rounded:{true:"k-badge--rounded",false:""}}}),s=H(!1);function a(){s.value=!0,r("dismiss",n)}return(l,u)=>s.value?P("",!0):(E(),O("span",{key:0,class:Se(B(o)({appearance:l.appearance,variant:l.variant,rounded:l.rounded}))},[L(l.$slots,"icon",{},()=>[l.icon||i[l.appearance]?(E(),z(B(Ze),{key:0,icon:l.icon||i[l.appearance],class:"k-badge__icon"},null,8,["icon"])):P("",!0)]),L(l.$slots,"default",{},()=>[U("span",Kw,oe(l.label),1)]),l.dismissable?(E(),O("button",{key:0,class:"k-badge__dismiss",onClick:a},[he(B(Ze),{icon:"fa-pro-light:times"})])):P("",!0)],2))}});var $n=(t,e=[])=>({parts:(...n)=>{if(Gw(e))return $n(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>$n(t,[...e,...n]),rename:n=>$n(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ci(t)}"][data-part="${Ci(r)}"]`,`& [data-scope="${Ci(t)}"][data-part="${Ci(r)}"]`].join(", "),attrs:{"data-scope":Ci(t),"data-part":Ci(r)}}}),{})}),Ci=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Gw=t=>t.length===0,ef=t=>Math.max(0,Math.min(1,t)),Gu=(...t)=>e=>t.reduce((n,r)=>r(n),e),Bi=()=>{},iu=t=>typeof t=="object"&&t!==null,J=t=>t?"":void 0,Jw=t=>t?"true":void 0,Yw=1,Xw=9,Zw=11,st=t=>iu(t)&&t.nodeType===Yw&&typeof t.nodeName=="string",kp=t=>iu(t)&&t.nodeType===Xw,Qw=t=>iu(t)&&t===t.window,mv=t=>st(t)?t.localName||"":"#document";function ex(t){return["html","body","#document"].includes(mv(t))}var tx=t=>iu(t)&&t.nodeType!==void 0,cs=t=>tx(t)&&t.nodeType===Zw&&"host"in t,nx=t=>st(t)&&t.localName==="input",rx=t=>st(t)?t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0:!1,ix=/(textarea|select)/;function ox(t){if(t==null||!st(t))return!1;try{return nx(t)&&t.selectionStart!=null||ix.test(t.localName)||t.isContentEditable||t.getAttribute("contenteditable")==="true"||t.getAttribute("contenteditable")===""}catch{return!1}}function Xi(t,e){var n;if(!t||!e||!st(t)||!st(e))return!1;const r=(n=e.getRootNode)==null?void 0:n.call(e);if(t===e||t.contains(e))return!0;if(r&&cs(r)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}function Wt(t){return kp(t)?t:Qw(t)?t.document:t?.ownerDocument??document}function sx(t){return Wt(t).documentElement}function pt(t){var e;return cs(t)?pt(t.host):kp(t)?t.defaultView??window:st(t)?((e=t.ownerDocument)==null?void 0:e.defaultView)??window:window}function gv(t){let e=t.activeElement;for(;e!=null&&e.shadowRoot;){const n=e.shadowRoot.activeElement;if(n===e)break;e=n}return e}function ax(t){if(mv(t)==="html")return t;const e=t.assignedSlot||t.parentNode||cs(t)&&t.host||sx(t);return cs(e)?e.host:e}var Ju=new WeakMap;function lx(t){return Ju.has(t)||Ju.set(t,pt(t).getComputedStyle(t)),Ju.get(t)}var ou=()=>typeof document<"u";function ux(){const t=navigator.userAgentData;return t?.platform??navigator.platform}function cx(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:e,version:n})=>`${e}/${n}`).join(" "):navigator.userAgent}var wp=t=>ou()&&t.test(ux()),dx=t=>ou()&&t.test(cx()),px=t=>ou()&&t.test(navigator.vendor),tf=()=>ou()&&!!navigator.maxTouchPoints,hx=()=>wp(/^iPhone/i),fx=()=>wp(/^iPad/i)||au()&&navigator.maxTouchPoints>1,su=()=>hx()||fx(),mx=()=>au()||su(),au=()=>wp(/^Mac/i),xp=()=>mx()&&px(/apple/i),gx=()=>dx(/Android/i);function vx(t){var e,n,r;return((e=t.composedPath)==null?void 0:e.call(t))??((r=(n=t.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n))}function dt(t){const e=vx(t);return e?.[0]??t.target}var yx=t=>Xi(t.currentTarget,dt(t));function bx(t){return t.mozInputSource===0&&t.isTrusted?!0:gx()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}var kx=t=>t.button===0,wx=t=>t.button===2||au()&&t.ctrlKey&&t.button===0,xx=t=>t.ctrlKey||t.altKey||t.metaKey,Ex=t=>"touches"in t&&t.touches.length>0,Cx={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},nf={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function vv(t,e={}){const{dir:n="ltr",orientation:r="horizontal"}=e;let i=t.key;return i=Cx[i]??i,n==="rtl"&&r==="horizontal"&&i in nf&&(i=nf[i]),i}var Sx=new Set(["PageUp","PageDown"]),Tx=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function Ox(t){return t.ctrlKey||t.metaKey?.1:Sx.has(t.key)||t.shiftKey&&Tx.has(t.key)?10:1}function Ep(t,e="client"){const n=Ex(t)?t.touches[0]||t.changedTouches[0]:t;return{x:n[`${e}X`],y:n[`${e}Y`]}}var Ne=(t,e,n,r)=>{const i=typeof t=="function"?t():t;return i?.addEventListener(e,n,r),()=>{i?.removeEventListener(e,n,r)}};function yv(t,e){const{type:n="HTMLInputElement",property:r="value"}=e,i=pt(t)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function Ax(t){if(t.localName==="input")return"HTMLInputElement";if(t.localName==="textarea")return"HTMLTextAreaElement";if(t.localName==="select")return"HTMLSelectElement"}function bv(t,e,n="value"){var r;if(!t)return;const i=Ax(t);i&&((r=yv(t,{type:i,property:n}).set)==null||r.call(t,e)),t.setAttribute(n,e)}function Cp(t,e){var n;t&&((n=yv(t,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(t,e),e?t.setAttribute("checked",""):t.removeAttribute("checked"))}function Mx(t,e){const{value:n,bubbles:r=!0}=e;if(!t)return;const i=pt(t);t instanceof i.HTMLInputElement&&(bv(t,`${n}`),t.dispatchEvent(new i.Event("input",{bubbles:r})))}function Sp(t,e){const{checked:n,bubbles:r=!0}=e;if(!t)return;const i=pt(t);t instanceof i.HTMLInputElement&&(Cp(t,n),t.dispatchEvent(new i.Event("click",{bubbles:r})))}function _x(t){return Dx(t)?t.form:t.closest("form")}function Dx(t){return t.matches("textarea, input, select, button")}function Ix(t,e){if(!t)return;const n=_x(t),r=i=>{i.defaultPrevented||e()};return n?.addEventListener("reset",r,{passive:!0}),()=>n?.removeEventListener("reset",r)}function Nx(t,e){const n=t?.closest("fieldset");if(!n)return;e(n.disabled);const r=pt(n),i=new r.MutationObserver(()=>e(n.disabled));return i.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>i.disconnect()}function lu(t,e){if(!t)return;const{onFieldsetDisabledChange:n,onFormReset:r}=e,i=[Ix(t,r),Nx(t,n)];return()=>i.forEach(o=>o?.())}var kv=t=>st(t)&&t.tagName==="IFRAME",Rx=t=>!Number.isNaN(parseInt(t.getAttribute("tabindex")||"0",10)),Px=t=>parseInt(t.getAttribute("tabindex")||"0",10)<0,Tp="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",wv=(t,e=!1)=>{if(!t)return[];const n=Array.from(t.querySelectorAll(Tp));(e==!0||e=="if-empty"&&n.length===0)&&st(t)&&hr(t)&&n.unshift(t);const r=n.filter(hr);return r.forEach((i,o)=>{if(kv(i)&&i.contentDocument){const s=i.contentDocument.body;r.splice(o,1,...wv(s))}}),r};function hr(t){return!t||t.closest("[inert]")?!1:t.matches(Tp)&&rx(t)}function xv(t,e){if(!t)return[];const n=Array.from(t.querySelectorAll(Tp)),r=n.filter(Br);return r.forEach((i,o)=>{if(kv(i)&&i.contentDocument){const s=i.contentDocument.body,a=xv(s);r.splice(o,1,...a)}}),!r.length&&e?n:r}function Br(t){return t!=null&&t.tabIndex>0?!0:hr(t)&&!Px(t)}function Eo(t){return t.tabIndex<0&&(/^(audio|video|details)$/.test(t.localName)||ox(t))&&!Rx(t)?0:t.tabIndex}function Fx(t){const e=new Set;function n(r){const i=globalThis.requestAnimationFrame(r);e.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(t)),function(){e.forEach(r=>r())}}function Ot(t){let e;const n=globalThis.requestAnimationFrame(()=>{e=t()});return()=>{globalThis.cancelAnimationFrame(n),e?.()}}function Yc(t){const e=ax(t);return ex(e)?Wt(e).body:st(e)&&Bx(e)?e:Yc(e)}var Lx=/auto|scroll|overlay|hidden|clip/;function Bx(t){const e=pt(t),{overflow:n,overflowX:r,overflowY:i,display:o}=e.getComputedStyle(t);return Lx.test(n+i+r)&&!["inline","contents"].includes(o)}function Vx(t,e){const{left:n,top:r,width:i,height:o}=e.getBoundingClientRect(),s={x:t.x-n,y:t.y-r},a={x:ef(s.x/i),y:ef(s.y/o)};function l(u={}){const{dir:c="ltr",orientation:d="horizontal",inverted:h}=u,p=typeof h=="object"?h.x:h,f=typeof h=="object"?h.y:h;return d==="horizontal"?c==="rtl"||p?1-a.x:a.x:f?1-a.y:a.y}return{offset:s,percent:a,getPercentValue:l}}var Vi="default",Xc="",Ma=new WeakMap;function $x(t={}){const{target:e,doc:n}=t,r=n??document,i=r.documentElement;return su()?(Vi==="default"&&(Xc=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Vi="disabled"):e&&(Ma.set(e,e.style.userSelect),e.style.userSelect="none"),()=>jx({target:e,doc:r})}function jx(t={}){const{target:e,doc:n}=t,r=(n??document).documentElement;if(su()){if(Vi!=="disabled")return;Vi="restoring",setTimeout(()=>{Fx(()=>{Vi==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=Xc||""),Xc="",Vi="default")})},300)}else if(e&&Ma.has(e)){const i=Ma.get(e);e.style.userSelect==="none"&&(e.style.userSelect=i??""),e.getAttribute("style")===""&&e.removeAttribute("style"),Ma.delete(e)}}function zx(t={}){const{defer:e,target:n,...r}=t,i=e?Ot:s=>s(),o=[];return o.push(i(()=>{const s=typeof n=="function"?n():n;o.push($x({...r,target:s}))})),()=>{o.forEach(s=>s?.())}}function Hx(t,e){const{onPointerMove:n,onPointerUp:r}=e,i=[Ne(t,"pointermove",o=>{const s=Ep(o),a=Math.sqrt(s.x**2+s.y**2),l=o.pointerType==="touch"?10:5;if(!(a<l)){if(o.pointerType==="mouse"&&o.button===0){r();return}n({point:s,event:o})}},!1),Ne(t,"pointerup",r,!1),Ne(t,"pointercancel",r,!1),Ne(t,"contextmenu",r,!1),zx({doc:t})];return()=>{i.forEach(o=>o())}}function Ev(t){const{pointerNode:e,keyboardNode:n=e,onPress:r,onPressStart:i,onPressEnd:o,isValidKey:s=y=>y.key==="Enter"}=t;if(!e)return Bi;const a=pt(e),l=Wt(e);let u=Bi,c=Bi,d=Bi;const h=y=>({point:Ep(y),event:y});function p(y){i?.(h(y))}function f(y){o?.(h(y))}const m=Ne(e,"pointerdown",y=>{c();const k=Ne(a,"pointerup",w=>{const x=dt(w);Xi(e,x)?r?.(h(w)):o?.(h(w))},{passive:!r,once:!0}),v=Ne(a,"pointercancel",f,{passive:!o,once:!0});c=Gu(k,v),l.activeElement===n&&y.pointerType==="mouse"&&y.preventDefault(),p(y)},{passive:!i}),g=Ne(n,"focus",b);u=Gu(m,g);function b(){const y=x=>{if(!s(x))return;const C=T=>{if(!s(T))return;const A=new a.PointerEvent("pointerup"),_=h(A);r?.(_),o?.(_)};c(),c=Ne(n,"keyup",C);const M=new a.PointerEvent("pointerdown");p(M)},k=()=>{const x=new a.PointerEvent("pointercancel");f(x)},v=Ne(n,"keydown",y),w=Ne(n,"blur",k);d=Gu(v,w)}return()=>{u(),c(),d()}}function Op(t,e){return Array.from(t?.querySelectorAll(e)??[])}var Cv=t=>t.id;function qx(t,e,n=Cv){return t.find(r=>n(r)===e)}function Sv(t,e,n=Cv){const r=qx(t,e,n);return r?t.indexOf(r):-1}function Wx(t,e,n=!0){let r=Sv(t,e);return r=n?(r+1)%t.length:Math.min(r+1,t.length-1),t[r]}function Ux(t,e,n=!0){let r=Sv(t,e);return r===-1?n?t[t.length-1]:null:(r=n?(r-1+t.length)%t.length:Math.max(0,r-1),t[r])}function Tv(t,e){const{onEntry:n,measure:r,box:i="border-box"}=e,o=(Array.isArray(t)?t:[t]).filter(st),s=pt(o[0]),a=u=>{const c=o.map(d=>r(d));n({rects:c,entries:u})};a([]);const l=new s.ResizeObserver(a);return o.forEach(u=>l.observe(u,{box:i})),()=>l.disconnect()}function Zc(t,e){if(!t)return Bi;const n=Object.keys(e).reduce((r,i)=>(r[i]=t.style.getPropertyValue(i),r),{});return Object.assign(t.style,e),()=>{Object.assign(t.style,n),t.style.length===0&&t.removeAttribute("style")}}function Kx(t,e,n){if(!t)return Bi;const r=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{t.style.setProperty(e,r),t.style.length===0&&t.removeAttribute("style")}}var Ap={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},Gx=1e3/60;function Jx(t,e){const n=t();if(st(n)&&n.isConnected)return e(n),()=>{};{const r=setInterval(()=>{const i=t();st(i)&&i.isConnected&&(e(i),clearInterval(r))},Gx);return()=>clearInterval(r)}}function Yx(t,e){const n=[];return t?.forEach(r=>{const i=Jx(r,e);n.push(i)}),()=>{n.forEach(r=>r())}}function Xx(t){return!(t.metaKey||!au()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}var Zx=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Qx(t,e,n){const r=n?dt(n):null,i=pt(r);return t=t||r instanceof i.HTMLInputElement&&!Zx.has(r?.type)||r instanceof i.HTMLTextAreaElement||r instanceof i.HTMLElement&&r.isContentEditable,!(t&&e==="keyboard"&&n instanceof i.KeyboardEvent&&!Reflect.has(e1,n.key))}var hi=null,Qc=new Set,jo=new Map,ti=!1,ed=!1,e1={Tab:!0,Escape:!0};function uu(t,e){for(let n of Qc)n(t,e)}function Ga(t){ti=!0,Xx(t)&&(hi="keyboard",uu("keyboard",t))}function Bt(t){hi="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(ti=!0,uu("pointer",t))}function Ov(t){bx(t)&&(ti=!0,hi="virtual")}function Av(t){const e=dt(t);e===pt(e)||e===Wt(e)||(!ti&&!ed&&(hi="virtual",uu("virtual",t)),ti=!1,ed=!1)}function Mv(){ti=!1,ed=!0}function t1(t){if(typeof window>"u"||jo.get(pt(t)))return;const e=pt(t),n=Wt(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){hi="virtual",uu("virtual",null),ti=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ga,!0),n.addEventListener("keyup",Ga,!0),n.addEventListener("click",Ov,!0),e.addEventListener("focus",Av,!0),e.addEventListener("blur",Mv,!1),typeof e.PointerEvent<"u"?(n.addEventListener("pointerdown",Bt,!0),n.addEventListener("pointermove",Bt,!0),n.addEventListener("pointerup",Bt,!0)):(n.addEventListener("mousedown",Bt,!0),n.addEventListener("mousemove",Bt,!0),n.addEventListener("mouseup",Bt,!0)),e.addEventListener("beforeunload",()=>{n1(t)},{once:!0}),jo.set(e,{focus:r})}var n1=(t,e)=>{const n=pt(t),r=Wt(t);jo.has(n)&&(n.HTMLElement.prototype.focus=jo.get(n).focus,r.removeEventListener("keydown",Ga,!0),r.removeEventListener("keyup",Ga,!0),r.removeEventListener("click",Ov,!0),n.removeEventListener("focus",Av,!0),n.removeEventListener("blur",Mv,!1),typeof n.PointerEvent<"u"?(r.removeEventListener("pointerdown",Bt,!0),r.removeEventListener("pointermove",Bt,!0),r.removeEventListener("pointerup",Bt,!0)):(r.removeEventListener("mousedown",Bt,!0),r.removeEventListener("mousemove",Bt,!0),r.removeEventListener("mouseup",Bt,!0)),jo.delete(n))};function ds(){return hi==="keyboard"}function Mp(t={}){const{isTextInput:e,autoFocus:n,onChange:r,root:i}=t;t1(i),r?.({isFocusVisible:n||ds(),modality:hi});const o=(s,a)=>{Qx(!!e,s,a)&&r?.({isFocusVisible:ds(),modality:s})};return Qc.add(o),()=>{Qc.delete(o)}}function r1(t){return t?Array.isArray(t)?t:[t]:[]}var _v=t=>t[0],Dv=t=>t[t.length-1],i1=(t,e)=>t.indexOf(e)!==-1,o1=(t,...e)=>t.concat(e),s1=(t,...e)=>t.filter(n=>!e.includes(n)),a1=(t,e)=>i1(t,e)?s1(t,e):o1(t,e),rf=t=>t?.constructor.name==="Array",l1=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!_s(t[n],e[n]))return!1;return!0},_s=(t,e)=>{if(Object.is(t,e))return!0;if(t==null&&e!=null||t!=null&&e==null)return!1;if(typeof t?.isEqual=="function"&&typeof e?.isEqual=="function")return t.isEqual(e);if(typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();if(rf(t)&&rf(e))return l1(Array.from(t),Array.from(e));if(typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(e??Object.create(null)),r=n.length;for(let i=0;i<r;i++)if(!Reflect.has(t,n[i]))return!1;for(let i=0;i<r;i++){const o=n[i];if(!_s(t[o],e[o]))return!1}return!0},u1=t=>Array.isArray(t),Iv=t=>typeof t=="string",$i=t=>typeof t=="function",c1=Function.prototype.toString;c1.call(Object);var of=(...t)=>(...e)=>{t.forEach(function(n){n?.(...e)})},{floor:sf,abs:Ja,round:Nv,min:d1,max:p1,pow:h1,sign:f1}=Math,_o=t=>Number.isNaN(t),_p=t=>_o(t)?0:t,m1=(t,e,n)=>t===0?n:e[t-1],g1=(t,e,n)=>t===e.length-1?n:e[t+1],v1=(t,e,n)=>Nv((_p(t)-e)/n)*n+e,Ds=(t,e,n)=>d1(p1(_p(t),e),n),Dp=(t,e,n)=>(_p(t)-e)/(n-e),Rv=(t,e,n,r)=>Ds(v1(t*(n-e)+e,e,r),e,n),na=(t,e)=>{let n=t,r=e.toString(),i=r.indexOf("."),o=i>=0?r.length-i:0;if(o>0){let s=h1(10,o);n=Nv(n*s)/s}return n},Ip=(t,e,n,r)=>{e=Number(e),n=Number(n);let i=(t-(_o(e)?0:e))%r,o=na(Ja(i)*2>=r?t+f1(i)*(r-Ja(i)):t-i,r);return _o(e)?!_o(n)&&o>n&&(o=e+sf(na((n-e)/r,r))*r):o<e?o=e:!_o(n)&&o>n&&(o=e+sf(na((n-e)/r,r))*r),na(o,r)},Do=(t,e,n)=>t[e]===n?t:[...t.slice(0,e),n,...t.slice(e+1)];function Pv(t,e){const n=m1(t,e.values,e.min),r=g1(t,e.values,e.max);let i=e.values.slice();return function(o){let s=Ip(o,n,r,e.step);return i=Do(i,t,o),i[t]=s,i}}function y1(t,e){const n=e.values[t]+e.step;return Pv(t,e)(n)}function b1(t,e){const n=e.values[t]-e.step;return Pv(t,e)(n)}var k1=(t,e)=>{let n=t.findIndex(o=>e-o<0);if(n===0)return n;if(n===-1)return t.length-1;let r=t[n-1],i=t[n];return Ja(r-e)<Ja(i-e)?n-1:n},Fv=(t,e,n,r)=>t.map((i,o)=>({min:o===0?e:t[o-1]+r,max:o===t.length-1?n:t[o+1]-r,value:i})),td=(t,e)=>{const[n,r]=t,[i,o]=e;return s=>n===r||i===o?i:i+(o-i)/(r-n)*(s-n)},af=t=>t!=null?`${t}px`:void 0;function Lv(t){if(!w1(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(r=>typeof r=="string"),n={};for(const r of e){const i=t[r];i!==void 0&&(n[r]=Lv(i))}return n}var w1=t=>t&&typeof t=="object"&&t.constructor===Object;function x1(t,e){const n={};for(const r of e){const i=t[r];i!==void 0&&(n[r]=i)}return n}function nd(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}function E1(t,e){if(t==null)throw new Error(e())}function C1(t,e,n){let r=[];for(const i of e)t[i]==null&&r.push(i);if(r.length>0)throw new Error(`[zag-js] missing required props: ${r.join(", ")}`)}function cu(){return{and:(...t)=>function(e){return t.every(n=>e.guard(n))},or:(...t)=>function(e){return t.some(n=>e.guard(n))},not:t=>function(e){return!e.guard(t)}}}var Di=(t=>(t.NotStarted="Not Started",t.Started="Started",t.Stopped="Stopped",t))(Di||{}),Yu="__init__";function S1(t){const e=()=>{var o;return((o=t.getRootNode)==null?void 0:o.call(t))??document},n=()=>Wt(e()),r=()=>n().defaultView??window,i=()=>gv(e());return{...t,getRootNode:e,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:o=>o===i(),getById:o=>e().getElementById(o)}}function T1(t){return new Proxy({},{get(e,n){return n==="style"?r=>t({style:r}).style:t}})}var Kn=()=>t=>Array.from(new Set(t)),O1=$n("checkbox").parts("root","label","control","indicator"),ra=O1.build(),Bv=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`checkbox:${t.id}`},lf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`checkbox:${t.id}:label`},A1=t=>{var e;return((e=t.ids)==null?void 0:e.control)??`checkbox:${t.id}:control`},rd=t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`checkbox:${t.id}:input`},M1=t=>t.getById(Bv(t)),Io=t=>t.getById(rd(t));function _1(t,e){const{send:n,context:r,prop:i,computed:o,scope:s}=t,a=i("disabled"),l=i("readOnly"),u=i("invalid"),c=!a&&r.get("focused"),d=!a&&r.get("focusVisible"),h=o("checked"),p=o("indeterminate"),f={"data-active":J(r.get("active")),"data-focus":J(c),"data-focus-visible":J(d),"data-readonly":J(l),"data-hover":J(r.get("hovered")),"data-disabled":J(a),"data-state":p?"indeterminate":h?"checked":"unchecked","data-invalid":J(u)};return{checked:h,disabled:a,indeterminate:p,focused:c,checkedState:h,setChecked(m){n({type:"CHECKED.SET",checked:m,isTrusted:!1})},toggleChecked(){n({type:"CHECKED.TOGGLE",checked:h,isTrusted:!1})},getRootProps(){return e.label({...ra.root.attrs,...f,dir:i("dir"),id:Bv(s),htmlFor:rd(s),onPointerMove(){a||n({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){a||n({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(m){dt(m)===Io(s)&&m.stopPropagation()}})},getLabelProps(){return e.element({...ra.label.attrs,...f,dir:i("dir"),id:lf(s)})},getControlProps(){return e.element({...ra.control.attrs,...f,dir:i("dir"),id:A1(s),"aria-hidden":!0})},getIndicatorProps(){return e.element({...ra.indicator.attrs,...f,dir:i("dir"),hidden:!p&&!h})},getHiddenInputProps(){return e.input({id:rd(s),type:"checkbox",required:i("required"),defaultChecked:h,disabled:a,"aria-labelledby":lf(s),"aria-invalid":u,name:i("name"),form:i("form"),value:i("value"),style:Ap,onFocus(){const m=ds();n({type:"CONTEXT.SET",context:{focused:!0,focusVisible:m}})},onBlur(){n({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(m){if(l){m.preventDefault();return}const g=m.currentTarget.checked;n({type:"CHECKED.SET",checked:g,isTrusted:!0})}})}}}var{not:uf}=cu(),D1={props({props:t}){return{value:"on",...t,defaultChecked:!!t.defaultChecked}},initialState(){return"ready"},context({prop:t,bindable:e}){return{checked:e(()=>({defaultValue:t("defaultChecked"),value:t("checked"),onChange(n){var r;(r=t("onCheckedChange"))==null||r({checked:n})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),focusVisible:e(()=>({defaultValue:!1})),active:e(()=>({defaultValue:!1})),focused:e(()=>({defaultValue:!1})),hovered:e(()=>({defaultValue:!1}))}},watch({track:t,context:e,prop:n,action:r}){t([()=>n("disabled")],()=>{r(["removeFocusIfNeeded"])}),t([()=>e.get("checked")],()=>{r(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:uf("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:uf("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{indeterminate:({context:t})=>_a(t.get("checked")),checked:({context:t})=>I1(t.get("checked")),disabled:({context:t,prop:e})=>!!e("disabled")||t.get("fieldsetDisabled")},states:{ready:{}},implementations:{guards:{isTrusted:({event:t})=>!!t.isTrusted},effects:{trackPressEvent({context:t,computed:e,scope:n}){if(!e("disabled"))return Ev({pointerNode:M1(n),keyboardNode:Io(n),isValidKey:r=>r.key===" ",onPress:()=>t.set("active",!1),onPressStart:()=>t.set("active",!0),onPressEnd:()=>t.set("active",!1)})},trackFocusVisible({computed:t,scope:e}){var n;if(!t("disabled"))return Mp({root:(n=e.getRootNode)==null?void 0:n.call(e)})},trackFormControlState({context:t,scope:e}){return lu(Io(e),{onFieldsetDisabledChange(n){t.set("fieldsetDisabled",n)},onFormReset(){t.set("checked",t.initial("checked"))}})}},actions:{setContext({context:t,event:e}){for(const n in e.context)t.set(n,e.context[n])},syncInputElement({context:t,computed:e,scope:n}){const r=Io(n);r&&(Cp(r,e("checked")),r.indeterminate=_a(t.get("checked")))},removeFocusIfNeeded({context:t,prop:e}){e("disabled")&&t.get("focused")&&(t.set("focused",!1),t.set("focusVisible",!1))},setChecked({context:t,event:e}){t.set("checked",e.checked)},toggleChecked({context:t,computed:e}){const n=_a(e("checked"))?!0:!e("checked");t.set("checked",n)},dispatchChangeEvent({computed:t,scope:e}){queueMicrotask(()=>{const n=Io(e);Sp(n,{checked:t("checked")})})}}}};function _a(t){return t==="indeterminate"}function I1(t){return _a(t)?!1:!!t}Kn()(["defaultChecked","checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);function N1(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}var cf={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},R1="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function P1(t){return t in cf?cf[t]:t.startsWith("on")?`on${N1(t.substr(2))}`:R1.includes(t)?t:t.toLowerCase()}var fi=T1(t=>{const e={};for(const n in t){const r=t[n];n==="children"?typeof r=="string"&&(e.innerHTML=r):e[P1(n)]=t[n]}return e});function Ya(t){const e=t().defaultValue??t().value,n=t().isEqual??Object.is,r=Zt(e),i=I(()=>t().value!==void 0),o=Zt(i.value?t().value:r.value);return{initial:e,ref:o,get(){return i.value?t().value:r.value},set(s){var a,l;const u=i.value?t().value:r.value,c=$i(s)?s(u):s;t().debug&&console.log(`[bindable > ${t().debug}] setValue`,{next:c,prev:u}),i.value||(r.value=c),n(c,u)||(l=(a=t()).onChange)==null||l.call(a,c,u)},invoke(s,a){var l,u;(u=(l=t()).onChange)==null||u.call(l,s,a)},hash(s){var a,l;return((l=(a=t()).hash)==null?void 0:l.call(a,s))??String(s)}}}Ya.cleanup=t=>{Jg(()=>t())};Ya.ref=t=>{let e=t;return{get:()=>e,set:n=>{e=n}}};function F1(t){const e=H(t);return{get(n){return e.value[n]},set(n,r){e.value[n]=r}}}var L1=(t,e)=>{xe(()=>[...t.map(n=>n())],(n,r)=>{let i=!1;for(let o=0;o<n.length;o++)if(!_s(r[o],Xt(n[o]))){i=!0;break}i&&e()})};function mi(t,e={}){var n,r,i;const o=I(()=>{const{id:_,ids:N,getRootNode:$}=Xt(e);return S1({id:_,ids:N,getRootNode:$})}),s=(..._)=>{t.debug&&console.log(..._)},a=I(()=>{var _;return((_=t.props)==null?void 0:_.call(t,{props:Lv(Xt(e)),get scope(){return o.value}}))??Xt(e)}),l=B1(a),u=(n=t.context)==null?void 0:n.call(t,{prop:l,bindable:Ya,get scope(){return o.value},flush:df,getContext(){return c},getComputed(){return C},getRefs(){return b}}),c={get(_){var N;return(N=u[_])==null?void 0:N.get()},set(_,N){var $;($=u[_])==null||$.set(N)},initial(_){var N;return(N=u[_])==null?void 0:N.initial},hash(_){var N,$;const j=(N=u[_])==null?void 0:N.get();return($=u[_])==null?void 0:$.hash(j)}};let d=new Map,h=null,p={current:null},f={current:{type:""}};const m=()=>({...f.current,current(){return f.current},previous(){return p.current}}),g=()=>({...M,matches(..._){const N=M.get();return _.includes(N)},hasTag(_){var N,$;const j=M.get();return!!(($=(N=t.states[j])==null?void 0:N.tags)!=null&&$.includes(_))}}),b=F1(((r=t.refs)==null?void 0:r.call(t,{prop:l,context:c}))??{}),y=()=>({state:g(),context:c,event:m(),prop:l,send:A,action:k,guard:v,track:L1,refs:b,computed:C,flush:df,get scope(){return o.value},choose:x}),k=_=>{const N=$i(_)?_(y()):_;if(!N)return;const $=N.map(j=>{var q,K;const X=(K=(q=t.implementations)==null?void 0:q.actions)==null?void 0:K[j];return X||nd(`[zag-js] No implementation found for action "${JSON.stringify(j)}"`),X});for(const j of $)j?.(y())},v=_=>{var N,$;return $i(_)?_(y()):($=(N=t.implementations)==null?void 0:N.guards)==null?void 0:$[_](y())},w=_=>{const N=$i(_)?_(y()):_;if(!N)return;const $=N.map(q=>{var K,X;const fe=(X=(K=t.implementations)==null?void 0:K.effects)==null?void 0:X[q];return fe||nd(`[zag-js] No implementation found for effect "${JSON.stringify(q)}"`),fe}),j=[];for(const q of $){const K=q?.(y());K&&j.push(K)}return()=>j.forEach(q=>q?.())},x=_=>r1(_).find(N=>{let $=!N.guard;return Iv(N.guard)?$=!!v(N.guard):$i(N.guard)&&($=N.guard(y())),$}),C=_=>{E1(t.computed,()=>"[zag-js] No computed object found on machine");const N=t.computed[_];return N({context:c,event:m(),prop:l,refs:b,get scope(){return o.value},computed:C})},M=Ya(()=>({defaultValue:t.initialState({prop:l}),onChange(_,N){var $,j,q;if(N){const X=d.get(N);X?.(),d.delete(N)}N&&k(($=t.states[N])==null?void 0:$.exit),k(h?.actions);const K=w((j=t.states[_])==null?void 0:j.effects);if(K&&d.set(_,K),N===Yu){k(t.entry);const X=w(t.effects);X&&d.set(Yu,X)}k((q=t.states[_])==null?void 0:q.entry)}}));let T=Di.NotStarted;Tn(()=>{const _=T===Di.Started;T=Di.Started,s(_?"rehydrating...":"initializing..."),M.invoke(M.initial,Yu)}),pi(()=>{T=Di.Stopped,s("unmounting...");const _=d.values();for(const N of _)N?.();d=new Map,k(t.exit)});const A=_=>{var N,$;if(T!==Di.Started)return;p.current=f.current,f.current=_,s("send",_);let j=M.get();const q=((N=t.states[j].on)==null?void 0:N[_.type])??(($=t.on)==null?void 0:$[_.type]),K=x(q);if(!K)return;h=K;const X=K.target??j;s("transition",K);const fe=X!==j;fe?M.set(X):K.reenter&&!fe?M.invoke(j,j):k(K.actions)};return(i=t.watch)==null||i.call(t,y()),{state:g(),send:A,context:c,prop:l,get scope(){return o.value},refs:b,computed:C,event:m(),getStatus:()=>T}}function B1(t){return function(e){return t.value[e]}}var df=t=>{xr().then(()=>{t()})};function Qt(t={}){const{prefix:e}=t,n=Lw();return e?`${e}-${n}`:n}const V1={key:0,class:"k-checkbox__help"},pf=Q({__name:"Checkbox",props:{modelValue:{type:[Boolean,Array]},value:{},label:{},disabled:{type:Boolean},required:{type:Boolean},help:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;if(n.modelValue instanceof Array&&!n.value)throw new Error("props.value is required if props.modelValue is an array");const r=e,i=()=>{const{modelValue:l,value:u}=n;return l instanceof Array?l.some(c=>Mo(c)===Mo(u)):!!l};function o(l){const{modelValue:u,value:c}=n;if(!(u instanceof Array))return r("update:modelValue",typeof l=="boolean"?l:void 0);if(!(typeof l!="boolean"||!c))return l?r("update:modelValue",[...u,c]):r("update:modelValue",u.filter(d=>Mo(d)!==Mo(c)))}const s=mi(D1,{id:Qt(),defaultChecked:i(),onCheckedChange:({checked:l})=>{if(i()!==l)return o(l)},disabled:n.disabled,required:n.required}),a=I(()=>_1(s,fi));return xe(()=>n.modelValue,()=>{const l=i();if(a.value.checked!==l)return a.value.setChecked(l)}),(l,u)=>(E(),O("label",re({class:"k-checkbox"},a.value.getRootProps()),[U("div",be(Re(a.value.getControlProps())),[a.value.checked?(E(),z(B(Ze),{key:0,icon:"fa-pro-solid:check"})):P("",!0)],16),l.label||l.$slots.help||l.$slots.default?(E(),O("span",be(re({key:0},a.value.getLabelProps())),[U("span",{class:Se(["k-checkbox__label",{"k-checkbox__label-required":l.required}])},[L(l.$slots,"default",{},()=>[Be(oe(l.label),1)])],2),l.$slots.help||l.help?(E(),O("span",V1,[L(l.$slots,"help",{},()=>[Be(oe(l.help),1)])])):P("",!0)],16)):P("",!0),U("input",be(Re(a.value.getHiddenInputProps())),null,16)],16))}}),du=Symbol("form-control"),$1={class:"k-formcontrol"},j1=["for"],z1={key:1,class:"k-formcontrol__error"},H1={key:2,class:"k-formcontrol__help"},q1=Q({__name:"FormControl",props:{label:{},help:{},error:{},required:{type:Boolean}},emits:["blur","focus"],setup(t,{emit:e}){const n=t,r=e,i=Qt({prefix:"k-formcontrol"}),o=I(()=>`${i}_label`),s=I(()=>`${i}_help`),a={onBlur:()=>r("blur"),onFocus:()=>r("focus")};return Ik(du,I(()=>({...n,id:i,labelId:o.value,helpId:s.value,invalid:!!n.error,required:n.required,events:a}))),(l,u)=>(E(),O("div",$1,[l.$slots.label||l.label?(E(),O("label",{key:0,class:Se(["k-formcontrol__label",{"k-formcontrol__label-required":l.required}]),for:B(i)},[L(l.$slots,"label",{},()=>[Be(oe(l.label),1)])],10,j1)):P("",!0),L(l.$slots,"default",{id:B(i)}),l.$slots.error||l.error?(E(),O("span",z1,[L(l.$slots,"error",{},()=>[Be(oe(l.error),1)])])):P("",!0),l.$slots.help||l.help?(E(),O("span",H1,[L(l.$slots,"help",{},()=>[Be(oe(l.help),1)])])):P("",!0)]))}}),W1={class:"k-filter-type-dropdown"},U1=Q({__name:"Dropdown",props:qc({label:{},items:{}},{modelValue:{default:""},modelModifiers:{}}),emits:qc(["disable"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=Ug(t,"modelValue"),i=I(()=>{var a,l;return`${(r.value?[r.value]:[(l=(a=n.items)==null?void 0:a[0])==null?void 0:l.value]).map(u=>{var c;return(c=n.items.find(d=>d.value===u))==null?void 0:c.label}).join(", ")}`}),o=I(()=>n.items.map(a=>({...a,action:()=>s.value=a.value}))),s=I({get(){return r.value},set(a){r.value=a}});return(a,l)=>(E(),O("div",W1,[he(B(q1),{label:a.label},{default:ee(()=>[he(B(wu),{placement:"bottom-start",label:i.value,modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u),items:o.value},null,8,["label","modelValue","items"])]),_:1},8,["label"])]))}}),K1=Object.freeze(Object.defineProperty({__proto__:null,default:U1},Symbol.toStringTag,{value:"Module"}));function G1(t,e){let n,r,i;const o=Zt(!0),s=()=>{o.value=!0,i()};xe(t,s,{flush:"sync"});const a=typeof e=="function"?e:e.get,l=typeof e=="function"?void 0:e.set,u=Gg((c,d)=>(r=c,i=d,{get(){return o.value&&(n=a(n),o.value=!1),r(),n},set(h){l?.(h)}}));return Object.isExtensible(u)&&(u.trigger=s),u}function Np(t){return Xg()?(Zg(t),!0):!1}const Rp=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J1=t=>t!=null,Y1=Object.prototype.toString,X1=t=>Y1.call(t)==="[object Object]";function Z1(t){let e;function n(){return e||(e=t()),e}return n.reset=async()=>{const r=e;e=void 0,r&&await r},n}function Da(t){return Array.isArray(t)?t:[t]}function Q1(t,e,n={}){const{immediate:r=!0,immediateCallback:i=!1}=n,o=Zt(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){o.value=!1,a()}function u(...c){i&&t(),a(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=null,t(...c)},Xt(e))}return r&&(o.value=!0,Rp&&u()),Np(l),{isPending:Yg(o),start:u,stop:l}}function eE(t,e,n){return xe(t,e,{...n,immediate:!0})}const Vv=Rp?window:void 0,$v=Rp?window.navigator:void 0;function jv(t){var e;const n=Xt(t);return(e=n?.$el)!=null?e:n}function Pp(...t){const e=[],n=()=>{e.forEach(a=>a()),e.length=0},r=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),i=I(()=>{const a=Da(Xt(t[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),o=eE(()=>{var a,l;return[(l=(a=i.value)==null?void 0:a.map(u=>jv(u)))!=null?l:[Vv].filter(u=>u!=null),Da(Xt(i.value?t[1]:t[0])),Da(B(i.value?t[2]:t[1])),Xt(i.value?t[3]:t[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=X1(c)?{...c}:c;e.push(...a.flatMap(h=>l.flatMap(p=>u.map(f=>r(h,p,f,d)))))},{flush:"post"}),s=()=>{o(),n()};return Np(n),s}function tE(){const t=Zt(!1),e=hp();return e&&Tn(()=>{t.value=!0},e),t}function Fp(t){const e=tE();return I(()=>(e.value,!!t()))}function nE(t,e,n={}){const{window:r=Vv,...i}=n;let o;const s=Fp(()=>r&&"MutationObserver"in r),a=()=>{o&&(o.disconnect(),o=void 0)},l=I(()=>{const h=Xt(t),p=Da(h).map(jv).filter(J1);return new Set(p)}),u=xe(()=>l.value,h=>{a(),s.value&&h.size&&(o=new MutationObserver(e),h.forEach(p=>o.observe(p,i)))},{immediate:!0,flush:"post"}),c=()=>o?.takeRecords(),d=()=>{u(),a()};return Np(d),{isSupported:s,stop:d,takeRecords:c}}function hf(t,e={}){const{controls:n=!1,navigator:r=$v}=e,i=Fp(()=>r&&"permissions"in r),o=Zt(),s=typeof t=="string"?{name:t}:t,a=Zt(),l=()=>{var c,d;a.value=(d=(c=o.value)==null?void 0:c.state)!=null?d:"prompt"};Pp(o,"change",l,{passive:!0});const u=Z1(async()=>{if(i.value){if(!o.value)try{o.value=await r.permissions.query(s)}catch{o.value=void 0}finally{l()}if(n)return Mo(o.value)}});return u(),n?{state:a,isSupported:i,query:u}:a}function rE(t={}){const{navigator:e=$v,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=t,s=Fp(()=>e&&"clipboard"in e),a=hf("clipboard-read"),l=hf("clipboard-write"),u=I(()=>s.value||o),c=Zt(""),d=Zt(!1),h=Q1(()=>d.value=!1,i,{immediate:!1});async function p(){let y=!(s.value&&b(a.value));if(!y)try{c.value=await e.clipboard.readText()}catch{y=!0}y&&(c.value=g())}u.value&&n&&Pp(["copy","cut"],p,{passive:!0});async function f(y=Xt(r)){if(u.value&&y!=null){let k=!(s.value&&b(l.value));if(!k)try{await e.clipboard.writeText(y)}catch{k=!0}k&&m(y),c.value=y,d.value=!0,h.start()}}function m(y){const k=document.createElement("textarea");k.value=y??"",k.style.position="absolute",k.style.opacity="0",document.body.appendChild(k),k.select(),document.execCommand("copy"),k.remove()}function g(){var y,k,v;return(v=(k=(y=document?.getSelection)==null?void 0:y.call(document))==null?void 0:k.toString())!=null?v:""}function b(y){return y==="granted"||y==="prompt"}return{isSupported:u,text:c,copied:d,copy:f}}function pu(t){const e=hp(),n=G1(()=>null,()=>e.proxy.$el);return Tk(n.trigger),Tn(n.trigger),n}const iE={class:"k-filter-type-range"},oE={class:"k-filter-type-range__header"},sE={class:"k-filter-type-range__header-label"},aE={class:"k-filter-type-range__value"},lE={class:"k-filter-type-range__value-display"},uE=Q({__name:"RangeSlider",props:qc({min:{},max:{},label:{},suffix:{},step:{},type:{}},{modelValue:{default:[0,1e3]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=Ug(t,"modelValue"),n=pu();function r(){return!n.value||!("getRootNode"in n.value)?document:n.value.getRootNode()}const i=t;function o(s){return[s,i.suffix].filter(Boolean).join(" ")}return(s,a)=>(E(),O("div",iE,[U("div",oE,[U("label",sE,[U("span",null,oe(s.label),1),he(B(Ze),{icon:s.$attrs.icon},null,8,["icon"])]),L(s.$slots,"remove")]),U("div",aE,[he(B(yC),re({modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l)},i,{"min-steps-between-thumbs":1,"get-root-node":r}),null,16,["modelValue"]),U("div",lE,[U("span",null,oe(o(e.value[0])),1),U("span",null,oe(o(e.value[1])),1)])])]))}}),cE=Object.freeze(Object.defineProperty({__proto__:null,default:uE},Symbol.toStringTag,{value:"Module"})),ff=Object.assign({"./Dropdown.vue":K1,"./RangeSlider.vue":cE});for(const t in ff)t.replace(/(\.\/|\.vue)/g,""),ff[t].default;function fr(t){return typeof t=="string"||t instanceof String}function mf(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function zv(t,e){return Array.isArray(e)?zv(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,o]=r;return e(o,i)&&(n[i]=o),n},{})}const Y={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function dE(t){switch(t){case Y.LEFT:return Y.FORCE_LEFT;case Y.RIGHT:return Y.FORCE_RIGHT;default:return t}}function Xu(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Xa(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Xa(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const o=e instanceof Date,s=t instanceof Date;if(o&&s)return e.getTime()==t.getTime();if(o!=s)return!1;const a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;const u=Object.keys(e);for(i=0;i<u.length;i++)if(!Object.prototype.hasOwnProperty.call(t,u[i]))return!1;for(i=0;i<u.length;i++)if(!Xa(t[u[i]],e[u[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class pE{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Y.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Y.RIGHT:Y.LEFT}}function se(t,e){return new se.InputMask(t,e)}function Hv(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?se.MaskedRegExp:fr(t)?se.MaskedPattern:t===Date?se.MaskedDate:t===Number?se.MaskedNumber:Array.isArray(t)||t===Array?se.MaskedDynamic:se.Masked&&t.prototype instanceof se.Masked?t:se.Masked&&t instanceof se.Masked?t.constructor:t instanceof Function?se.MaskedFunction:(console.warn("Mask not found for mask",t),se.Masked)}function ps(t){if(!t)throw new Error("Options in not defined");if(se.Masked){if(t.prototype instanceof se.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof se.Masked?{mask:t}:mf(t)&&t.mask instanceof se.Masked?t:{};if(e){const r=e.mask;return{...zv(e,(i,o)=>!o.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return mf(t)?{...t}:{mask:t}}function Hn(t){if(se.Masked&&t instanceof se.Masked)return t;const e=ps(t),n=Hv(e.mask);if(!n)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}se.createMask=Hn;class Lp{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}se.MaskElement=Lp;const gf=90,hE=89;class hu extends Lp{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===gf&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===hE&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===gf&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}se.HTMLMaskElement=hu;class fE extends hu{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}se.HTMLMaskElement=hu;class qv extends hu{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,o=i.getSelection&&i.getSelection();o&&(o.removeAllRanges(),o.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}se.HTMLContenteditableMaskElement=qv;class fu{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>fu.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}fu.MAX_LENGTH=100;class mE{constructor(e,n){this.el=e instanceof Lp?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new qv(e):new fE(e),this.masked=Hn(n),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new fu,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof se.Masked)&&this.masked.constructor===Hv(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof se.Masked?e:Hn({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const n=this.masked.unmaskedValue,r=this.masked.value,i=this.masked.rawInputValue,o=this.displayValue,s=this.unmaskedValue!==n||this.value!==r||this._rawInputValue!==i;this._unmaskedValue=n,this._value=r,this._rawInputValue=i,this.el.value!==o&&(this.el.value=o),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),s&&this._fireChangeEvents(),!this._historyChanging&&(s||this.history.isEmpty)&&this.history.push({unmaskedValue:n,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),o=this.masked.optionsIsChanged(r);i&&(this.mask=n),o&&this.masked.updateOptions(r),(i||o)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Y.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const n=new pE({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,o=r===this.masked.rawInputValue?n.removeDirection:Y.NONE;let s=this.masked.nearestInputPos(n.startChangePos+i,o);o!==Y.NONE&&(s=this.masked.nearestInputPos(s,Y.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}se.InputMask=mE;class de{static normalize(e){return Array.isArray(e)?e:[e,new de]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}se.ChangeDetails=de;class mn{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class it{constructor(e){this._value="",this._update({...it.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new mn(this.extractInput(e,n),e)}appendTail(e){return fr(e)&&(e=new mn(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new de({inserted:e,rawInserted:e})):new de}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let o;if([e,o]=this.doPrepareChar(e,n),e&&(o=o.aggregate(this._appendCharRaw(e,n)),!o.rawInserted&&this.autofix==="pad")){const s=this.state;this.state=i;let a=this.pad(n);const l=this._appendCharRaw(e,n);a=a.aggregate(l),l.rawInserted||a.equals(o)?o=a:this.state=s}if(o.inserted){let s,a=this.doValidate(n)!==!1;if(a&&r!=null){const l=this.state;if(this.overwrite===!0){s=r.state;for(let c=0;c<o.rawInserted.length;++c)r.unshift(this.displayValue.length-o.tailShift)}let u=this.appendTail(r);if(a=u.rawInserted.length===r.toString().length,!(a&&u.inserted)&&this.overwrite==="shift"){this.state=l,s=r.state;for(let c=0;c<o.rawInserted.length;++c)r.shift();u=this.appendTail(r),a=u.rawInserted.length===r.toString().length}a&&u.inserted&&(this.state=l)}a||(o=new de,this.state=i,r&&s&&(r.state=s))}return o}_appendPlaceholder(){return new de}_appendEager(){return new de}append(e,n,r){if(!fr(e))throw new Error("value should be string");const i=fr(r)?new mn(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let o;[e,o]=this.doPrepare(e,n);for(let s=0;s<e.length;++s){const a=this._appendChar(e[s],n,i);if(!a.rawInserted&&!this.doSkipInvalid(e[s],n,i))break;o.aggregate(a)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&o.aggregate(this._appendEager()),i!=null&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new de}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),de.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),de.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,o){r===void 0&&(r=""),i===void 0&&(i=Y.NONE),o===void 0&&(o={input:!0});const s=e+n,a=this.extractTail(s),l=this.eager===!0||this.eager==="remove";let u;l&&(i=dE(i),u=this.extractInput(0,s,{raw:!0}));let c=e;const d=new de;if(i!==Y.NONE&&(c=this.nearestInputPos(e,n>1&&e!==0&&!l?Y.NONE:i),d.tailShift=c-e),d.aggregate(this.remove(c)),l&&i!==Y.NONE&&u===this.rawInputValue)if(i===Y.FORCE_LEFT){let h;for(;u===this.rawInputValue&&(h=this.displayValue.length);)d.aggregate(new de({tailShift:-1})).aggregate(this.remove(h-1))}else i===Y.FORCE_RIGHT&&a.unshift();return d.aggregate(this.append(r,o,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Xa(this,e)}typedValueEquals(e){const n=this.typedValue;return e===n||it.EMPTY_VALUES.includes(e)&&it.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new de}}it.DEFAULTS={skipInvalid:!0};it.EMPTY_VALUES=[void 0,null,""];se.Masked=it;class Hr{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=fr(e)?new mn(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof mn)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof Hr){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof se.MaskedPattern))return new mn(this.toString()).appendTo(e);const n=new de;for(let r=0;r<this.chunks.length;++r){const i=this.chunks[r],o=e._mapPosToBlock(e.displayValue.length),s=i.stop;let a;if(s!=null&&(!o||o.index<=s)&&((i instanceof Hr||e._stops.indexOf(s)>=0)&&n.aggregate(e._appendPlaceholder(s)),a=i instanceof Hr&&e._blocks[s]),a){const l=a.appendTail(i);n.aggregate(l);const u=i.toString().slice(l.rawInserted.length);u&&n.aggregate(e.append(u,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const o="chunks"in i?new Hr:new mn;return o.state=i,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],o=i.unshift(n);if(i.toString()){if(!o)break;++r}else this.chunks.splice(r,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class gE{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Y.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Y.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Y.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Y.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Y.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Y.NONE),!0})}}class Wv{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new de}nearestInputPos(e,n){n===void 0&&(n=Y.NONE);const r=0,i=this._value.length;switch(n){case Y.LEFT:case Y.FORCE_LEFT:return r;case Y.NONE:case Y.RIGHT:case Y.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new de;const r=this.eager===!0||this.eager==="append",i=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail,o=new de({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(n.raw||n.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new de;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new mn("")}appendTail(e){return fr(e)&&(e=new mn(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Za{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a,...l}=e;this.masked=Hn(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new de}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new de;const r=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i=new de,this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new de:(this.isFilled=!0,new de({inserted:this.placeholderChar}))}_appendEager(){return new de}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=Y.NONE);const r=0,i=this.value.length,o=Math.min(Math.max(e,r),i);switch(n){case Y.LEFT:case Y.FORCE_LEFT:return this.isComplete?o:r;case Y.RIGHT:case Y.FORCE_RIGHT:return this.isComplete?o:i;case Y.NONE:default:return o}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||e?._beforeTailState}}pad(e){return new de}}Za.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class vE extends it{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}se.MaskedRegExp=vE;class ot extends it{constructor(e){super({...ot.DEFAULTS,...e,definitions:Object.assign({},Za.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let o=0;o<n.length;++o){if(this.blocks){const u=n.slice(o),c=Object.keys(this.blocks).filter(h=>u.indexOf(h)===0);c.sort((h,p)=>p.length-h.length);const d=c[0];if(d){const{expose:h,repeat:p,...f}=ps(this.blocks[d]),m={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:p,parent:this},g=p!=null?new se.RepeatBlock(m):Hn(m);g&&(this._blocks.push(g),h&&(this.exposeBlock=g),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),o+=d.length-1;continue}}let s=n[o],a=s in e;if(s===ot.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){r=!r;continue}if(s==="["||s==="]"){i=!i;continue}if(s===ot.ESCAPE_CHAR){if(++o,s=n[o],!s)break;a=!1}const l=a?new Za({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ps(e[s]),parent:this}):new Wv({char:s,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:n,...r}=e;this._blocks.forEach((i,o)=>i.state=n[o]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new de;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const o=this._blocks[i]._appendEager();if(!o.inserted)break;n.aggregate(o)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new de;if(!r)return i;for(let s=r.index,a;a=this._blocks[s];++s){var o;const l=a._appendChar(e,{...n,_beforeTailState:(o=n._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]});if(i.aggregate(l),l.consumed)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new Hr;return e===n||this._forEachBlocksInRange(e,n,(i,o,s,a)=>{const l=i.extractTail(s,a);l.stop=this._findStopBefore(o),l.from=this._blockStartPos(o),l instanceof Hr&&(l.blockIndex=o),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(o,s,a,l)=>{i+=o.extractInput(a,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new de;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,o=e??this._blocks.length;return this._blocks.slice(i,o).forEach(s=>{if(!s.lazy||e!=null){var a;n.aggregate(s._appendPlaceholder((a=s._blocks)==null?void 0:a.length))}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],o=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const o=this._mapPosToBlock(n),s=o&&i.index===o.index,a=i.offset,l=o&&s?o.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,a,l),o&&!s){for(let u=i.index+1;u<o.index;++u)r(this._blocks[u],u,0,this._blocks[u].displayValue.length);r(this._blocks[o.index],o.index,0,o.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r.aggregate(i.remove(s,a))}),r}nearestInputPos(e,n){if(n===void 0&&(n=Y.NONE),!this._blocks.length)return 0;const r=new gE(this,e);if(n===Y.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===Y.LEFT||n===Y.FORCE_LEFT){if(n===Y.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===Y.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===Y.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===Y.RIGHT||n===Y.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===Y.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,Y.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r+=i.totalInputPositions(s,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}pad(e){const n=new de;return this._forEachBlocksInRange(0,this.displayValue.length,r=>n.aggregate(r.pad(e))),n}}ot.DEFAULTS={...it.DEFAULTS,lazy:!0,placeholderChar:"_"};ot.STOP_CHAR="`";ot.ESCAPE_CHAR="\\";ot.InputDefinition=Za;ot.FixedDefinition=Wv;se.MaskedPattern=ot;class Ia extends ot{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:o=this.autofix,...s}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=o;const a=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<l.length&&l[u]===a[u];)++u;s.mask=l.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(n="0".repeat(i.length)+o,r="9".repeat(i.length)+o),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,n);const r=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[o,s]=this.boundaries(this.value+e);return Number(s)<this.from?super._appendCharRaw(r[this.value.length],n):Number(o)>this.to?!n.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],n).aggregate(this._appendCharRaw(e,n)):super._appendCharRaw(i[this.value.length],n):super._appendCharRaw(e,n)}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[r,i]=this.boundaries(n);return this.from<=Number(i)&&Number(r)<=this.to&&super.doValidate(e)}pad(e){const n=new de;if(this.value.length===this.maxLength)return n;const r=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let o=0;o<i;++o)n.aggregate(super._appendCharRaw("0",e));r.split("").forEach(o=>this._appendCharRaw(o))}return n}}se.MaskedRange=Ia;const yE="d{.}`m{.}`Y";class Fn extends ot{static extractPatternOptions(e){const{mask:n,pattern:r,...i}=e;return{...i,mask:fr(n)?n:r}}constructor(e){super(Fn.extractPatternOptions({...Fn.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...o}={...Fn.DEFAULTS,...e},s=Object.assign({},Fn.GET_DEFAULT_BLOCKS());e.min&&(s.Y.from=e.min.getFullYear()),e.max&&(s.Y.to=e.max.getFullYear()),e.min&&e.max&&s.Y.from===s.Y.to&&(s.m.from=e.min.getMonth()+1,s.m.to=e.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=e.min.getDate(),s.d.to=e.max.getDate())),Object.assign(s,this.blocks,i),super._update({...o,mask:fr(n)?n:r,blocks:s})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Fn.extractPatternOptions(e))}}Fn.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ia,from:1,to:31,maxLength:2},m:{mask:Ia,from:1,to:12,maxLength:2},Y:{mask:Ia,from:1900,to:9999}});Fn.DEFAULTS={...ot.DEFAULTS,mask:Date,pattern:yE,format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}};se.MaskedDate=Fn;class mu extends it{constructor(e){super({...mu.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=ps(n),o=Hn({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=o),o}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,o=this.rawInputValue,s=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:o,a=o.slice(s.length),l=this.currentMask,u=new de,c=l?.state;return this.currentMask=this.doDispatch(e,{...n},r),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),s&&(this.currentMask.append(s,{raw:!0}),u.tailShift=this.currentMask.value.length-i.length),a&&(u.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),u}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new de;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let o;[r,o]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let o;[r,o]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new de;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...o}=e;n&&this.compiledMasks.forEach((s,a)=>s.state=n[a]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=o}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...o}=e[r];return Xa(n,o)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}mu.DEFAULTS={...it.DEFAULTS,dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,o=e.compiledMasks.map((s,a)=>{const l=e.currentMask===s,u=l?s.displayValue.length:s.nearestInputPos(s.displayValue.length,Y.FORCE_LEFT);return s.rawInputValue!==i?(s.reset(),s.append(i,{raw:!0})):l||s.remove(u),s.append(t,e.currentMaskFlags(n)),s.appendTail(r),{index:a,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,Y.FORCE_LEFT)))}});return o.sort((s,a)=>a.weight-s.weight||a.totalInputPositions-s.totalInputPositions),e.compiledMasks[o[0].index]}};se.MaskedDynamic=mu;class gu extends ot{constructor(e){super({...gu.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(a=>a.length),o=Math.min(...i),s=Math.max(...i)-o;r.mask="*".repeat(o),s&&(r.mask+="["+"*".repeat(s)+"]"),this.enum=n}super._update(r)}_appendCharRaw(e,n){n===void 0&&(n={});const r=Math.min(this.nearestInputPos(0,Y.FORCE_RIGHT),this.value.length),i=this.enum.filter(o=>this.matchValue(o,this.unmaskedValue+e,r));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(s,a)=>{const l=i[0][a];a>=this.value.length||l===s.value||(s.reset(),s._appendChar(l,n))});const o=super._appendCharRaw(i[0][this.value.length],n);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(s=>o.aggregate(super._appendCharRaw(s))),o}return new de({skip:!this.isComplete})}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new mn("",e)}remove(e,n){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),e===n)return new de;const r=Math.min(super.nearestInputPos(0,Y.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(r,i),r)).length>1);--i);const o=super.remove(i,n);return o.tailShift+=i-e,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}gu.DEFAULTS={...ot.DEFAULTS,matchValue:(t,e,n)=>t.indexOf(e,n)===n};se.MaskedEnum=gu;class bE extends it{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}se.MaskedFunction=bE;var Uv;class Ct extends it{constructor(e){super({...Ct.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+Xu(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Xu).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Xu(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){n===void 0&&(n={});const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const o=this._value;this._value+=e;const s=this.number;let a=!isNaN(s),l=!1;if(a){let h;this.min!=null&&this.min<0&&this.number<this.min&&(h=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(h=this.max),h!=null&&(this.autofix?(this._value=this.format(h,this).replace(Ct.UNMASKED_RADIX,this.radix),l||(l=o===this._value&&!n.tail)):a=!1),a&&(a=!!this._value.match(this._numberRegExp))}let u;a?u=new de({inserted:this._value.slice(o.length),rawInserted:l?"":e,skip:l}):(this._value=o,u=new de),this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,d=this._separatorsCountFromSlice(c);return u.tailShift+=(d-i)*this.thousandsSeparator.length,u}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const s=this._separatorsCountFromSlice(r);return new de({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case Y.NONE:case Y.LEFT:case Y.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===Y.FORCE_LEFT)return r}break}case Y.RIGHT:case Y.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,o,s)=>i+s),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Ct.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ct.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Ct.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Ct.EMPTY_VALUES.includes(e)&&Ct.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Uv=Ct;Ct.UNMASKED_RADIX=".";Ct.EMPTY_VALUES=[...it.EMPTY_VALUES,0];Ct.DEFAULTS={...it.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Uv.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};se.MaskedNumber=Ct;const id={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Kv(t,e,n){e===void 0&&(e=id.MASKED),n===void 0&&(n=id.MASKED);const r=Hn(t);return i=>r.runIsolated(o=>(o[e]=i,o[n]))}function kE(t,e,n,r){return Kv(e,n,r)(t)}se.PIPE_TYPE=id;se.createPipe=Kv;se.pipe=kE;class wE extends ot{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var n,r,i;const{repeat:o,...s}=ps(e);this._blockOpts=Object.assign({},this._blockOpts,s);const a=Hn(this._blockOpts);this.repeat=(n=(r=o??a.repeat)!=null?r:this.repeat)!=null?n:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Hn(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,n){n===void 0&&(n={});const r=new de;for(let l=(i=(o=this._mapPosToBlock(this.displayValue.length))==null?void 0:o.index)!=null?i:Math.max(this._blocks.length-1,0),u,c;u=(s=this._blocks[l])!=null?s:c=!c&&this._allocateBlock(l);++l){var i,o,s,a;const d=u._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[l]});if(d.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(d),d.consumed)break}return r}_trimEmptyTail(e,n){var r,i;e===void 0&&(e=0);const o=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let s;n!=null&&(s=(i=this._mapPosToBlock(n))==null?void 0:i.index),s==null&&(s=this._blocks.length-1);let a=0;for(let l=s;o<=l&&!this._blocks[l].unmaskedValue;--l,++a);a&&(this._blocks.splice(s-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._trimEmptyTail(e,n),r}totalInputPositions(e,n){return e===void 0&&(e=0),n==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,n)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}se.RepeatBlock=wE;try{globalThis.IMask=se}catch{}function xE(t,e){let{emit:n,onAccept:r,onComplete:i,defaultValue:o,defaultUnmaskedValue:s,defaultTypedValue:a}=e===void 0?{}:e;const l=Ak(t)?t:H(t),u=H(),c=H(),d=H(""),h=H(""),p=H();let f,m=d.value,g=h.value,b=p.value;function y(){b=p.value=c.value.typedValue,g=h.value=c.value.unmaskedValue,m=d.value=c.value.value}function k(A){y(),n&&(n("accept",d.value,A),n("accept:masked",d.value,A),n("accept:typed",p.value,A),n("accept:unmasked",h.value,A)),r?.(A)}function v(A){n&&(n("complete",c.value.value,A),n("complete:masked",c.value.value,A),n("complete:typed",c.value.typedValue,A),n("complete:unmasked",c.value.unmaskedValue,A)),i?.(A)}const w=()=>{!c.value||h.value===void 0||(g!==h.value&&(c.value.unmaskedValue=h.value,c.value.unmaskedValue!==h.value&&k()),g=void 0)};xe(h,w);const x=()=>{!c.value||d.value===void 0||(m!==d.value&&(c.value.value=d.value,c.value.value!==d.value&&k()),m=void 0)};xe(d,x);const C=()=>{!c.value||p.value===void 0||(b!==p.value&&(c.value.typedValue=p.value,c.value.masked.typedValueEquals(p.value)||k()),b=void 0)};xe(p,C);function M(){f=u.value;const A=l.value;!f||!(A!=null&&A.mask)||(c.value=se(f,A),o!==void 0&&(d.value=o),s!==void 0&&(h.value=s),a!==void 0&&(p.value=a),w(),x(),C(),y(),c.value.on("accept",k).on("complete",v))}function T(){var A;(A=c.value)==null||A.destroy(),c.value=void 0}return Tn(M),Jg(T),xe([u,l],()=>{const A=u.value,_=l.value;(!(_!=null&&_.mask)||A!==f)&&T(),A&&(c.value?c.value.updateOptions(_):M())}),{el:u,mask:Yg(c),masked:d,unmasked:h,typed:p}}const EE={key:0,class:"k-input__prefix"},CE=["id","aria-labelledby","aria-describedby","required","type"],SE={key:1,class:"k-input__suffix"},TE=Q({__name:"Input",props:{invalid:{type:Boolean},id:{},modelValue:{},prefix:{},suffix:{},mask:{},align:{default:"left"},type:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=cp(),r=t,i=e;function o(p){r.mask||i("update:modelValue",p.target.value)}const s=rn("k-input",{variants:{invalid:{true:"k-input--invalid"},align:{left:"k-input--align-left",right:"k-input--align-right"}}}),a=dp(du,I(()=>({id:r.id,invalid:r.invalid,required:!1,events:{onBlur:()=>{},onFocus:()=>{}}}))),l=p=>{var f;(f=a.value.events)==null||f.onFocus(p),n.onFocus&&n.onFocus(p)},u=p=>{var f;(f=a.value.events)==null||f.onBlur(p),n.onBlur&&n.onBlur(p)},{unmasked:c,masked:d,el:h}=xE(r.mask,{defaultValue:String(r.modelValue),onAccept:()=>{var p,f;if((p=r.mask)!=null&&p.pattern)return;const m=((f=r.mask)==null?void 0:f.mask)===Number?parseFloat(c.value):d.value;m!==r.modelValue&&i("update:modelValue",m)}});return Tn(()=>{xe(()=>r.modelValue,p=>{r.mask&&c.value!==String(p)&&(c.value=String(p)),r.mask||(h.value.value=p)},{immediate:!0})}),(p,f)=>(E(),O("div",{class:Se(B(s)({invalid:B(a).invalid,align:p.align}))},[p.$slots.prefix||p.prefix?(E(),O("span",EE,[L(p.$slots,"prefix",{},()=>[Be(oe(p.prefix),1)])])):P("",!0),U("input",re({class:"k-input__input",id:B(a).id,"aria-labelledby":B(a).labelId,"aria-describedby":B(a).helpId,required:B(a).required,onInput:o,onBlur:u,onFocus:l,ref_key:"el",ref:h,type:r.type},{...B(a).events,...p.$attrs}),null,16,CE),p.$slots.suffix||p.suffix?(E(),O("span",SE,[L(p.$slots,"suffix",{},()=>[Be(oe(p.suffix),1)])])):P("",!0)],2))}}),OE=["id","value","aria-labelledby","aria-describedby","required"],bL=Q({__name:"TextArea",props:{invalid:{type:Boolean},id:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=cp(),r=t,i=e;function o(c){i("update:modelValue",c.target.value)}const s=rn("k-textarea",{variants:{invalid:{true:"k-textarea--invalid"}}}),a=dp(du,I(()=>({id:r.id,invalid:r.invalid,required:!1,events:{onBlur:()=>{},onFocus:()=>{}}}))),l=c=>{var d;(d=a.value.events)==null||d.onFocus(c),n.onFocus&&n.onFocus(c)},u=c=>{var d;(d=a.value.events)==null||d.onBlur(c),n.onBlur&&n.onBlur(c)};return(c,d)=>(E(),O("textarea",re({class:B(s)({invalid:B(a).invalid}),id:B(a).id,value:c.modelValue,"aria-labelledby":B(a).labelId,"aria-describedby":B(a).helpId,required:B(a).required,onInput:o,onBlur:u,onFocus:l},c.$attrs),null,16,OE))}});let AE=class{constructor(t,e){Jt(this,"key"),Jt(this,"goto"),this.key=t,this.goto=e,this.set()}get(){return localStorage.getItem(this.key)||""}set(t=this.get()){const e=this.goto(t);this.get()!==e&&localStorage.setItem(this.key,e)}destroy(){}},ME=class{constructor(t,e){Jt(this,"key"),Jt(this,"goto"),Jt(this,"current"),this.key=t,this.goto=e,this.set()}get(){return this.current||""}set(t=this.get()){this.current=this.goto(t)}destroy(){}};class _E{constructor(e,n){Jt(this,"key"),Jt(this,"goto"),this.key=e,this.goto=n,this.set()}get(){return sessionStorage.getItem(this.key)||""}set(e=this.get()){const n=this.goto(e);this.get()!==n&&sessionStorage.setItem(this.key,n)}destroy(){}}const DE=Object.freeze(Object.defineProperty({__proto__:null,localStorage:AE,none:ME,sessionStorage:_E},Symbol.toStringTag,{value:"Module"})),IE=["data-step"],NE={key:0,class:"k-stepper-breadcrumbs-wrapper"},RE={key:0,class:"k-stepper__breadcrumb-arrow"},PE=["disabled","onClick"],FE={class:"k-stepper__breadcrumb-icon"},LE={class:"k-stepper__breadcrumb-label"},BE={class:"k-stepper__component-wrapper"},VE={key:0,class:"k-stepper__navigation"},kL=Q({__name:"Stepper",props:{steps:{},stateHandler:{default:"none"},stateKey:{default:"step"},transitionPreset:{default:"slide"},transitionNext:{},transitionPrev:{},breadcrumbPlacement:{default:"top"},keepAlive:{type:Boolean},hidebreadcrumbs:{type:Boolean,default:!1}},setup(t,{expose:e}){const n=t,r=H(),i=H(),o=H(n.steps[0].id);let s;const a=typeof n.stateHandler=="string"?DE[n.stateHandler]:n.stateHandler;s=new a(n.stateKey,f),pi(()=>s.destroy());const l=I(()=>c(o.value)),u=I(()=>{const k=d(o.value);return{...k?.bind||{},step:k,onNext:h,onPrev:p}});function c(k){const v=d(k),w=n.steps.findIndex(({id:x})=>!v||x===v.id);return{prev:w>0?n.steps[w-1]:null,current:v,next:w<n.steps.length-1?n.steps[w+1]:null}}function d(k){return n.steps.find(v=>v.id===k)}const h=()=>l.value.next&&f(l.value.next.id),p=()=>l.value.prev&&f(l.value.prev.id);function f(k){var v;if(k===o.value)return o.value;const w=n.steps.find(x=>!k||x.id===k);return w!=null&&w.disabled?f((v=c(w.id).prev)==null?void 0:v.id):(o.value=(w||n.steps[0]).id,s&&s.set(o.value),o.value)}const m=fp({next:h,prev:p,goto:f});xe(o,(k,v)=>i.value=v);const g=()=>{if(!i.value)return"next";const{steps:k}=n;return k.findIndex(v=>v.id===i.value)>k.findIndex(v=>v.id===o.value)?"prev":"next"};function b(){const{transitionNext:k,transitionPreset:v,transitionPrev:w,breadcrumbPlacement:x}=n;if(k||w)return g()==="next"?k:w;if(v==="fade")return`k-stepper-${v}`;const C=["top","bottom"].includes(x)?"h":"v";return`k-stepper-${v}-${C}-${g()}`}const y=()=>{var k;const v=(k=r.value)==null?void 0:k.getBoundingClientRect();if(!v)return;const w=v.top-20;w>0||window.scrollTo({top:w+window.scrollY,behavior:"smooth"})};return e({goto:f,next:h,prev:p,meta:l}),(k,v)=>(E(),O("div",{class:Se(`k-stepper k-stepper--breadcrumb-placement-${k.breadcrumbPlacement}`),"data-step":o.value},[k.hidebreadcrumbs?P("",!0):(E(),O("div",NE,[L(k.$slots,"before-breadcrumbs",be(Re({meta:l.value,navigate:m}))),U("div",{class:"k-stepper__breadcrumbs",ref_key:"breadcrumb",ref:r},[(E(!0),O(Oe,null,Mt(k.steps,(w,x)=>(E(),O(Oe,null,[x>0?(E(),O("div",RE)):P("",!0),L(k.$slots,"breadcrumb",{step:w,isActive:w.id===o.value,index:x,select:()=>f(w.id)},()=>[U("button",{type:"button",class:Se(["k-stepper__breadcrumb",{"k-stepper__breadcrumb--default":w.isValid===void 0,"k-stepper__breadcrumb--active":w.id===o.value,"k-stepper__breadcrumb--invalid":w.isValid===!1,"k-stepper__breadcrumb--valid":w.isValid===!0}]),disabled:w.disabled,onClick:C=>f(w.id)},[U("span",FE,[L(k.$slots,"breadcrumb-icon",{step:w},()=>[w.isValid===!0?(E(),z(B(Ze),{key:0,icon:"heroicons-solid:check",width:12})):w.isValid===!1?(E(),z(B(Ze),{key:1,icon:"heroicons:exclamation-triangle",width:17})):(E(),O(Oe,{key:2},[Be(oe(x+1),1)],64))])]),U("span",LE,oe(w.label),1)],10,PE)])],64))),256))],512),L(k.$slots,"after-breadcrumbs",be(Re({meta:l.value,navigate:m})))])),L(k.$slots,"before-content",be(Re({meta:l.value,navigate:m}))),U("div",BE,[he(up,{name:b(),mode:"out-in",onAfterEnter:y},{default:ee(()=>[k.keepAlive?(E(),z(Mk,{key:0},[(E(),z(Qe(u.value.step.component),re({key:o.value},u.value),null,16))],1024)):(E(),z(Qe(u.value.step.component),re({key:o.value},u.value),null,16))]),_:1},8,["name"]),k.$slots.navigation?(E(),O("div",VE,[L(k.$slots,"navigation",be(Re({meta:l.value,navigate:m})))])):P("",!0)]),L(k.$slots,"after-content",be(Re({meta:l.value,navigate:m})))],10,IE))}}),$E=["src","alt"],vu=Q({__name:"Image",props:{src:{},preview:{},alt:{},caption:{},captionVisibility:{default:"hover"},captionTheme:{default:"dark"},size:{default:"cover"},position:{default:"center"},width:{},height:{},aspectRatio:{}},emits:["loaded","error"],setup(t,{emit:e}){const n=t,r=e,i=H(),o=H(!1),s=H(!1),a=H(),l=I(()=>({"--k-image-size":n.size,"--k-image-preview":n.preview||"","--k-image-position":n.position,"--k-image-width":n.width||"initial","--k-image-height":n.height||"initial","--k-image-aspectratio":(n.aspectRatio==="natural"?a.value:n.aspectRatio)||"initial"}));function u(){o.value=!0;const{naturalWidth:d=0,naturalHeight:h=0}=i.value||{};a.value=`${d}/${h}`,r("loaded")}function c(){o.value=!0,s.value=!0,r("error")}return Tn(()=>{var d;return((d=i.value)==null?void 0:d.complete)&&u()}),(d,h)=>(E(),O("figure",{class:Se(["k-image",[`k-image--size-${d.size}`,{"k-image--loaded":o.value,"k-image--loading":!o.value}]]),style:kn(l.value)},[o.value?P("",!0):(E(),z(fv,{key:0,size:"small"})),qa(U("img",{src:d.src,alt:d.alt||d.caption,onLoad:u,onError:c,ref_key:"image",ref:i},null,40,$E),[[Wg,!s.value]]),d.$slots.caption||d.caption?(E(),O("figcaption",{key:1,class:Se(`k-image__caption k-image__caption--visibility-${d.captionVisibility} k-image__caption--theme-${!o.value||s.value?"light":d.captionTheme}`)},[L(d.$slots,"caption",{},()=>[Be(oe(d.caption),1)])],2)):P("",!0)],6))}}),ni=Q({__name:"Flex",props:{is:{default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(t){const e=t,n=I(()=>hv("flex",{justify:Ka(e.justify)||"initial",align:Ka(e.align)||"initial",wrap:e.nowrap?"nowrap":"wrap",gap:bp(e.gap),direction:e.direction}));return(r,i)=>(E(),z(Qe(r.is),{class:"k-flex",style:kn(n.value)},{default:ee(()=>[L(r.$slots,"default")]),_:3},8,["style"]))}}),jE={key:0,class:"k-card__thumbnail"},zE={key:0,class:"k-card__title"},HE={key:1,class:"k-card__subtitle"},qE={key:2,class:"k-card__content"},WE=Q({inheritAttrs:!1,__name:"Card",props:{is:{default:"div"},title:{},subtitle:{},variant:{default:"default"},appearance:{default:"border"},thumbnail:{},thumbnailOptions:{default:()=>({size:"cover",aspectRatio:"16/9",width:"100%"})}},setup(t){const e=t,n=pp(),r=I(()=>e.thumbnail||n.thumbnail),i=I(()=>e.title||e.subtitle||n.header),o=I(()=>n.actions),s=I(()=>n.default);return(a,l)=>(E(),z(Qe(a.is),re({class:["k-card",`k-card--variant-${a.variant}`,`k-card--appearance-${a.appearance}`,{"k-card--has-thumbnail":r.value},{"k-card--has-header":i.value},{"k-card--has-content":s.value},{"k-card--has-actions":o.value}]},a.$attrs),{default:ee(()=>[r.value?(E(),O("div",jE,[L(a.$slots,"thumbnail",{},()=>[a.thumbnail?(E(),z(vu,re({key:0},a.thumbnailOptions,{src:a.thumbnail}),null,16,["src"])):P("",!0)])])):P("",!0),i.value?(E(),z(ni,{key:1,is:"header",direction:"column",gap:"0rem",class:"k-card__header"},{default:ee(()=>[L(a.$slots,"header",{},()=>[a.title?(E(),O("div",zE,oe(a.title),1)):P("",!0),a.subtitle?(E(),O("div",HE,oe(a.subtitle),1)):P("",!0)])]),_:3})):P("",!0),s.value?(E(),O("div",qE,[L(a.$slots,"default")])):P("",!0),o.value?(E(),z(ni,{key:3,justify:"center",align:"center",class:"k-card__actions"},{default:ee(()=>[L(a.$slots,"actions")]),_:3})):P("",!0)]),_:3},16,["class"]))}}),wL=Q({__name:"Skeleton",props:{variant:{default:"shiny"},aspectRatio:{},width:{},height:{},rounding:{}},setup(t){const e=()=>t.rounding?t.rounding==="full"?"9999px":bp(t.rounding,"rounding"):"initial",n=I(()=>({"--aspect-ratio":!t.aspectRatio||t.width&&t.height?"initial":t.aspectRatio,"--width":t.width||"initial","--height":t.height||"initial","--border-radius":e()}));return(r,i)=>(E(),O("span",{class:Se(["k-skeleton",`k-skeleton--variant-${r.variant}`]),style:kn(n.value)},[L(r.$slots,"default")],6))}});var UE=$n("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator"),ln=UE.build(),Gv=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`slider:${t.id}`},Jv=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.thumb)==null?void 0:r.call(n,e))??`slider:${t.id}:thumb:${e}`},od=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.hiddenInput)==null?void 0:r.call(n,e))??`slider:${t.id}:input:${e}`},Yv=t=>{var e;return((e=t.ids)==null?void 0:e.control)??`slider:${t.id}:control`},KE=t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}:track`},GE=t=>{var e;return((e=t.ids)==null?void 0:e.range)??`slider:${t.id}:range`},vf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`slider:${t.id}:label`},JE=t=>{var e;return((e=t.ids)==null?void 0:e.valueText)??`slider:${t.id}:value-text`},YE=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.marker)==null?void 0:r.call(n,e))??`slider:${t.id}:marker:${e}`},XE=t=>t.getById(Gv(t)),ZE=(t,e)=>t.getById(Jv(t,e)),Xv=t=>Op(Qv(t),"[role=slider]"),QE=t=>Xv(t)[0],Zv=(t,e)=>t.getById(od(t,e)),Qv=t=>t.getById(Yv(t)),yf=(t,e)=>{const{prop:n,scope:r}=t,i=Qv(r);if(!i)return;const o=Vx(e,i).getPercentValue({orientation:n("orientation"),dir:n("dir"),inverted:{y:!0}});return Rv(o,n("min"),n("max"),n("step"))},eC=(t,e)=>{e.forEach((n,r)=>{const i=Zv(t,r);i&&Mx(i,{value:n})})},tC=t=>({left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0});function nC(t){const e=t[0],n=t[t.length-1];return[e,n]}function rC(t){const{prop:e,computed:n}=t,r=n("valuePercent"),[i,o]=nC(r);if(r.length===1){if(e("origin")==="center"){const s=r[0]<50,a=s?`${r[0]}%`:"50%",l=s?"50%":`${100-r[0]}%`;return{start:a,end:l}}return e("origin")==="end"?{start:`${o}%`,end:"0%"}:{start:"0%",end:`${100-o}%`}}return{start:`${i}%`,end:`${100-o}%`}}function iC(t){const{computed:e}=t,n=e("isVertical"),r=e("isRtl");return n?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[r?"right":"left"]:"var(--slider-range-start)",[r?"left":"right"]:"var(--slider-range-end)"}}function oC(t,e){const{context:n,prop:r}=t,{height:i=0}=n.get("thumbSize")??{},o=td([r("min"),r("max")],[-i/2,i/2]);return parseFloat(o(e).toFixed(2))}function sC(t,e){const{computed:n,context:r,prop:i}=t,{width:o=0}=r.get("thumbSize")??{};if(n("isRtl")){const a=td([i("max"),i("min")],[-o/2,o/2]);return-1*parseFloat(a(e).toFixed(2))}const s=td([i("min"),i("max")],[-o/2,o/2]);return parseFloat(s(e).toFixed(2))}function aC(t,e,n){const{computed:r,prop:i}=t;if(i("thumbAlignment")==="center")return`${e}%`;const o=r("isVertical")?oC(t,n):sC(t,n);return`calc(${e}% - ${o}px)`}function ey(t,e){const{prop:n}=t,r=Dp(e,n("min"),n("max"))*100;return aC(t,r,e)}function ty(t){const{computed:e,prop:n}=t;let r="visible";return n("thumbAlignment")==="contain"&&!e("hasMeasuredThumbSize")&&(r="hidden"),r}function bf(t,e){const{computed:n}=t,r=n("isVertical")?"bottom":"insetInlineStart";return{visibility:ty(t),position:"absolute",transform:"var(--slider-thumb-transform)",[r]:`var(--slider-thumb-offset-${e})`}}function lC(){return{touchAction:"none",userSelect:"none",WebkitUserSelect:"none",position:"relative"}}function uC(t){const{context:e,computed:n}=t,r=n("isVertical"),i=n("isRtl"),o=rC(t),s=e.get("thumbSize");return{...e.get("value").reduce((a,l,u)=>{const c=ey(t,l);return{...a,[`--slider-thumb-offset-${u}`]:c}},{}),"--slider-thumb-width":af(s?.width),"--slider-thumb-height":af(s?.height),"--slider-thumb-transform":r?"translateY(50%)":i?"translateX(50%)":"translateX(-50%)","--slider-range-start":o.start,"--slider-range-end":o.end}}function cC(t,e){const{computed:n}=t,r=n("isHorizontal"),i=n("isRtl");return{visibility:ty(t),position:"absolute",pointerEvents:"none",[r?"insetInlineStart":"bottom"]:ey(t,e),translate:"var(--tx) var(--ty)","--tx":r?i?"50%":"-50%":"0%","--ty":r?"0%":"50%"}}function dC(){return{userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none",position:"relative"}}function pC(t,e){return e.map((n,r)=>sd(t,n,r))}function mr(t,e){const{context:n,prop:r}=t;return Fv(n.get("value"),r("min"),r("max"),r("minStepsBetweenThumbs"))[e]}function sd(t,e,n){const{prop:r}=t,i=mr(t,n),o=Ip(e,r("min"),r("max"),r("step"));return Ds(o,i.min,i.max)}function hC(t,e,n){const{context:r,prop:i}=t,o=e??r.get("focusedIndex"),s=mr(t,o),a=b1(o,{...s,step:n??i("step"),values:r.get("value")});return a[o]=Ds(a[o],s.min,s.max),a}function fC(t,e,n){const{context:r,prop:i}=t,o=e??r.get("focusedIndex"),s=mr(t,o),a=y1(o,{...s,step:n??i("step"),values:r.get("value")});return a[o]=Ds(a[o],s.min,s.max),a}function mC(t,e){const{context:n}=t;return k1(n.get("value"),e)}function ny(t,e){const{state:n,send:r,context:i,prop:o,computed:s,scope:a}=t,l=o("aria-label"),u=o("aria-labelledby"),c=i.get("value"),d=i.get("focusedIndex"),h=n.matches("focus"),p=n.matches("dragging"),f=s("isDisabled"),m=o("invalid"),g=s("isInteractive"),b=o("orientation")==="horizontal",y=o("orientation")==="vertical";function k(w){return Dp(w,o("min"),o("max"))}function v(w){return Rv(w,o("min"),o("max"),o("step"))}return{value:c,dragging:p,focused:h,setValue(w){r({type:"SET_VALUE",value:w})},getThumbValue(w){return c[w]},setThumbValue(w,x){r({type:"SET_VALUE",index:w,value:x})},getValuePercent:k,getPercentValue:v,getThumbPercent(w){return k(c[w])},setThumbPercent(w,x){const C=v(x);r({type:"SET_VALUE",index:w,value:C})},getThumbMin(w){return mr(t,w).min},getThumbMax(w){return mr(t,w).max},increment(w){r({type:"INCREMENT",index:w})},decrement(w){r({type:"DECREMENT",index:w})},focus(){g&&r({type:"FOCUS",index:0})},getLabelProps(){return e.label({...ln.label.attrs,dir:o("dir"),"data-disabled":J(f),"data-orientation":o("orientation"),"data-invalid":J(m),"data-dragging":J(p),"data-focus":J(h),id:vf(a),htmlFor:od(a,0),onClick(w){var x;g&&(w.preventDefault(),(x=QE(a))==null||x.focus())},style:{userSelect:"none",WebkitUserSelect:"none"}})},getRootProps(){return e.element({...ln.root.attrs,"data-disabled":J(f),"data-orientation":o("orientation"),"data-dragging":J(p),"data-invalid":J(m),"data-focus":J(h),id:Gv(a),dir:o("dir"),style:uC(t)})},getValueTextProps(){return e.element({...ln.valueText.attrs,dir:o("dir"),"data-disabled":J(f),"data-orientation":o("orientation"),"data-invalid":J(m),"data-focus":J(h),id:JE(a)})},getTrackProps(){return e.element({...ln.track.attrs,dir:o("dir"),id:KE(a),"data-disabled":J(f),"data-invalid":J(m),"data-dragging":J(p),"data-orientation":o("orientation"),"data-focus":J(h),style:{position:"relative"}})},getThumbProps(w){var x;const{index:C=0,name:M}=w,T=c[C],A=mr(t,C),_=(x=o("getAriaValueText"))==null?void 0:x({value:T,index:C}),N=Array.isArray(l)?l[C]:l,$=Array.isArray(u)?u[C]:u;return e.element({...ln.thumb.attrs,dir:o("dir"),"data-index":C,"data-name":M,id:Jv(a,C),"data-disabled":J(f),"data-orientation":o("orientation"),"data-focus":J(h&&d===C),"data-dragging":J(p&&d===C),draggable:!1,"aria-disabled":Jw(f),"aria-label":N,"aria-labelledby":$??vf(a),"aria-orientation":o("orientation"),"aria-valuemax":A.max,"aria-valuemin":A.min,"aria-valuenow":c[C],"aria-valuetext":_,role:"slider",tabIndex:f?void 0:0,style:bf(t,C),onPointerDown(j){g&&(r({type:"THUMB_POINTER_DOWN",index:C}),j.stopPropagation())},onBlur(){g&&r({type:"BLUR"})},onFocus(){g&&r({type:"FOCUS",index:C})},onKeyDown(j){if(j.defaultPrevented||!g)return;const q=Ox(j)*o("step"),K={ArrowUp(){b||r({type:"ARROW_INC",step:q,src:"ArrowUp"})},ArrowDown(){b||r({type:"ARROW_DEC",step:q,src:"ArrowDown"})},ArrowLeft(){y||r({type:"ARROW_DEC",step:q,src:"ArrowLeft"})},ArrowRight(){y||r({type:"ARROW_INC",step:q,src:"ArrowRight"})},PageUp(){r({type:"ARROW_INC",step:q,src:"PageUp"})},PageDown(){r({type:"ARROW_DEC",step:q,src:"PageDown"})},Home(){r({type:"HOME"})},End(){r({type:"END"})}},X=vv(j,{dir:o("dir"),orientation:o("orientation")}),fe=K[X];fe&&(fe(j),j.preventDefault(),j.stopPropagation())}})},getHiddenInputProps(w){const{index:x=0,name:C}=w;return e.input({name:C??(o("name")?o("name")+(c.length>1?"[]":""):void 0),form:o("form"),type:"text",hidden:!0,defaultValue:c[x],id:od(a,x)})},getRangeProps(){return e.element({id:GE(a),...ln.range.attrs,dir:o("dir"),"data-dragging":J(p),"data-focus":J(h),"data-invalid":J(m),"data-disabled":J(f),"data-orientation":o("orientation"),style:iC(t)})},getControlProps(){return e.element({...ln.control.attrs,dir:o("dir"),id:Yv(a),"data-dragging":J(p),"data-disabled":J(f),"data-orientation":o("orientation"),"data-invalid":J(m),"data-focus":J(h),style:lC(),onPointerDown(w){if(!g||!kx(w)||xx(w))return;const x=Ep(w);r({type:"POINTER_DOWN",point:x}),w.preventDefault(),w.stopPropagation()}})},getMarkerGroupProps(){return e.element({...ln.markerGroup.attrs,role:"presentation",dir:o("dir"),"aria-hidden":!0,"data-orientation":o("orientation"),style:dC()})},getMarkerProps(w){const x=cC(t,w.value);let C;return w.value<_v(c)?C="under-value":w.value>Dv(c)?C="over-value":C="at-value",e.element({...ln.marker.attrs,id:YE(a,w.value),role:"presentation",dir:o("dir"),"data-orientation":o("orientation"),"data-value":w.value,"data-disabled":J(f),"data-state":C,style:x})},getDraggingIndicatorProps(w){const{index:x=0}=w,C=x===d&&p;return e.element({...ln.draggingIndicator.attrs,role:"presentation",dir:o("dir"),hidden:!C,"data-orientation":o("orientation"),"data-state":C?"open":"closed",style:bf(t,x)})}}}var gC=(t,e)=>t?.width===e?.width&&t?.height===e?.height,kf=(t,e,n,r,i)=>Fv(t,e,n,i*r).map(o=>{const s=Ip(o.value,o.min,o.max,r);return Ds(s,o.min,o.max)}),ry={props({props:t}){const e=t.min??0,n=t.max??100,r=t.step??1,i=t.defaultValue??[e],o=t.minStepsBetweenThumbs??0;return{dir:"ltr",thumbAlignment:"contain",origin:"start",orientation:"horizontal",minStepsBetweenThumbs:o,...t,defaultValue:kf(i,e,n,r,o),value:t.value?kf(t.value,e,n,r,o):void 0,max:n,step:r,min:e}},initialState(){return"idle"},context({prop:t,bindable:e,getContext:n}){return{thumbSize:e(()=>({defaultValue:t("thumbSize")||null})),value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),isEqual:_s,hash(r){return r.join(",")},onChange(r){var i;(i=t("onValueChange"))==null||i({value:r})}})),focusedIndex:e(()=>({defaultValue:-1,onChange(r){var i;const o=n();(i=t("onFocusChange"))==null||i({focusedIndex:r,value:o.get("value")})}})),fieldsetDisabled:e(()=>({defaultValue:!1}))}},computed:{isHorizontal:({prop:t})=>t("orientation")==="horizontal",isVertical:({prop:t})=>t("orientation")==="vertical",isRtl:({prop:t})=>t("orientation")==="horizontal"&&t("dir")==="rtl",isDisabled:({context:t,prop:e})=>!!e("disabled")||t.get("fieldsetDisabled"),isInteractive:({prop:t,computed:e})=>!(t("readOnly")||e("isDisabled")),hasMeasuredThumbSize:({context:t})=>t.get("thumbSize")!=null,valuePercent({context:t,prop:e}){return t.get("value").map(n=>100*Dp(n,e("min"),e("max")))}},watch({track:t,action:e,context:n}){t([()=>n.hash("value")],()=>{e(["syncInputElements","dispatchChangeEvent"])})},effects:["trackFormControlState","trackThumbSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],INCREMENT:{actions:["incrementThumbAtIndex"]},DECREMENT:{actions:["decrementThumbAtIndex"]}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:["setFocusedIndex"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]}}},focus:{entry:["focusActiveThumb"],on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:["clearFocusedIndex"]}}},dragging:{entry:["focusActiveThumb"],effects:["trackPointerMove"],on:{POINTER_UP:{target:"focus",actions:["invokeOnChangeEnd"]},POINTER_MOVE:{actions:["setPointerValue"]}}}},implementations:{guards:{hasIndex:({event:t})=>t.index!=null},effects:{trackFormControlState({context:t,scope:e}){return lu(XE(e),{onFieldsetDisabledChange(n){t.set("fieldsetDisabled",n)},onFormReset(){t.set("value",t.initial("value"))}})},trackPointerMove({scope:t,send:e}){return Hx(t.getDoc(),{onPointerMove(n){e({type:"POINTER_MOVE",point:n.point})},onPointerUp(){e({type:"POINTER_UP"})}})},trackThumbSize({context:t,scope:e,prop:n}){if(!(n("thumbAlignment")!=="contain"||n("thumbSize")))return Tv(Xv(e),{box:"border-box",measure(r){return tC(r)},onEntry({rects:r}){const i=x1(r[0],["width","height"]);gC(t.get("thumbSize"),i)||t.set("thumbSize",i)}})}},actions:{dispatchChangeEvent({context:t,scope:e}){eC(e,t.get("value"))},syncInputElements({context:t,scope:e}){t.get("value").forEach((n,r)=>{const i=Zv(e,r);bv(i,n.toString())})},invokeOnChangeEnd({prop:t,context:e}){var n;(n=t("onValueChangeEnd"))==null||n({value:e.get("value")})},setClosestThumbIndex(t){const{context:e,event:n}=t,r=yf(t,n.point);if(r==null)return;const i=mC(t,r);e.set("focusedIndex",i)},setFocusedIndex({context:t,event:e}){t.set("focusedIndex",e.index)},clearFocusedIndex({context:t}){t.set("focusedIndex",-1)},setPointerValue(t){queueMicrotask(()=>{const{context:e,event:n}=t,r=yf(t,n.point);if(r==null)return;const i=e.get("focusedIndex"),o=sd(t,r,i);e.set("value",s=>Do(s,i,o))})},focusActiveThumb({scope:t,context:e}){Ot(()=>{const n=ZE(t,e.get("focusedIndex"));n?.focus({preventScroll:!0})})},decrementThumbAtIndex(t){const{context:e,event:n}=t,r=hC(t,n.index,n.step);e.set("value",r)},incrementThumbAtIndex(t){const{context:e,event:n}=t,r=fC(t,n.index,n.step);e.set("value",r)},setFocusedThumbToMin(t){const{context:e}=t,n=e.get("focusedIndex"),{min:r}=mr(t,n);e.set("value",i=>Do(i,n,r))},setFocusedThumbToMax(t){const{context:e}=t,n=e.get("focusedIndex"),{max:r}=mr(t,n);e.set("value",i=>Do(i,n,r))},setValueAtIndex(t){const{context:e,event:n}=t,r=sd(t,n.value,n.index);e.set("value",i=>Do(i,n.index,r))},setValue(t){const{context:e,event:n}=t,r=pC(t,n.value);e.set("value",r)}}}};Kn()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);Kn()(["index","name"]);const vC=["data-value"],yC=Q({__name:"RangeSlider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},minStepsBetweenThumbs:{},marker:{},markerFormat:{},format:{type:Function,default:()=>t=>t},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(ry,{id:Qt(),...n,defaultValue:n.modelValue,onValueChangeEnd:({value:l})=>{const[u,c]=[o.value.getThumbMin(0),o.value.getThumbMax(0)],[d,h]=[o.value.getThumbMin(1),o.value.getThumbMax(1)],p=Math.max(u,Math.min(c,l[0])),f=Math.min(h,Math.max(d,l[1]));n.modelValue[0]===p&&n.modelValue[1]===f||r("update:modelValue",[p,f])}}),o=I(()=>ny(i,fi)),s=l=>{const[u,c]=[o.value.getThumbMin(0),o.value.getThumbMax(0)],[d,h]=[o.value.getThumbMin(1),o.value.getThumbMax(1)],[p,f]=[o.value.getThumbValue(0),o.value.getThumbValue(1)],[m,g]=l;if(m===p&&g===f)return;const b=Math.max(u,Math.min(c,m)),y=Math.min(h,Math.max(d,g));return p===b&&f===y?r("update:modelValue",[b,y]):o.value.setValue([b,y])},a=I(()=>{if(!n.marker)return[];const l=Math.floor(n.max/n.marker)+1;return Array(l).fill(void 0).map((u,c)=>{const d=(n.marker||0)*c;return{value:d,label:n.markerFormat?n.markerFormat(d):n.format(d)}})});return xe(()=>n.modelValue,s,{deep:!0}),(l,u)=>(E(),O("div",re(o.value.getRootProps(),{class:"k-rangeslider"}),[U("div",be(Re(o.value.getControlProps())),[U("div",be(Re(o.value.getTrackProps())),[U("div",be(Re(o.value.getRangeProps())),null,16)],16),(E(!0),O(Oe,null,Mt(o.value.value,(c,d)=>(E(),O("div",re({key:d,ref_for:!0},o.value.getThumbProps({index:d})),[U("input",re({ref_for:!0},o.value.getHiddenInputProps({index:d})),null,16)],16))),128))],16),a.value.length?(E(),O("div",be(re({key:0},o.value.getMarkerGroupProps())),[(E(!0),O(Oe,null,Mt(a.value,c=>(E(),O("span",re({ref_for:!0},o.value.getMarkerProps({value:c.value}),{"data-value":c.label}),null,16,vC))),256))],16)):P("",!0)],16))}}),bC=["data-value"],xL=Q({__name:"Slider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},marker:{},format:{type:Function,default:()=>t=>t},markerFormat:{},markerHighlight:{type:Boolean,default:!1},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(ry,{id:Qt(),...n,defaultValue:[n.modelValue],onValueChange:({value:l})=>{r("update:modelValue",l[0])}}),o=I(()=>ny(i,fi)),s=l=>o.value.setValue([Math.max(n.min||l,Math.min(n.max||l,l))]),a=I(()=>{const l=c=>n.markerFormat?n.markerFormat(c):n.format(c);if(!n.marker)return[];if(n.marker instanceof Array)return n.marker.map(c=>({value:c,label:l(c)}));const u=Math.floor((n.max-n.min)/n.marker)+1;return Array(u).fill(void 0).map((c,d)=>{const h=n.min+n.marker*d;return{value:h,label:l(h)}})});return xe(()=>n.modelValue,s,{deep:!0}),(l,u)=>(E(),O("div",re(o.value.getRootProps(),{class:["k-slider",{"k-slider--marker-highlight":l.markerHighlight}]}),[U("div",be(Re(o.value.getControlProps())),[U("div",be(Re(o.value.getTrackProps())),[U("div",be(Re(o.value.getRangeProps())),null,16)],16),U("div",be(Re(o.value.getThumbProps({index:0}))),[U("input",be(Re(o.value.getHiddenInputProps({index:0}))),null,16)],16),U("output",be(Re(o.value.getValueTextProps())),[L(l.$slots,"value",{value:o.value.value},()=>[Be(oe(l.format(o.value.value.at(0))),1)])],16)],16),a.value.length?(E(),O("div",be(re({key:0},o.value.getMarkerGroupProps())),[(E(!0),O(Oe,null,Mt(a.value,c=>(E(),O("span",re({ref_for:!0},o.value.getMarkerProps({value:c.value}),{"data-value":c.label}),null,16,bC))),256))],16)):P("",!0)],16))}}),Zi=Math.min,Kr=Math.max,Qa=Math.round,ia=Math.floor,vn=t=>({x:t,y:t}),kC={left:"right",right:"left",bottom:"top",top:"bottom"},wC={start:"end",end:"start"};function ad(t,e,n){return Kr(t,Zi(e,n))}function Is(t,e){return typeof t=="function"?t(e):t}function ri(t){return t.split("-")[0]}function Ns(t){return t.split("-")[1]}function iy(t){return t==="x"?"y":"x"}function Bp(t){return t==="y"?"height":"width"}function Gr(t){return["top","bottom"].includes(ri(t))?"y":"x"}function Vp(t){return iy(Gr(t))}function xC(t,e,n){n===void 0&&(n=!1);const r=Ns(t),i=Vp(t),o=Bp(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=el(s)),[s,el(s)]}function EC(t){const e=el(t);return[ld(t),e,ld(e)]}function ld(t){return t.replace(/start|end/g,e=>wC[e])}function CC(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function SC(t,e,n,r){const i=Ns(t);let o=CC(ri(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(ld)))),o}function el(t){return t.replace(/left|right|bottom|top/g,e=>kC[e])}function TC(t){return{top:0,right:0,bottom:0,left:0,...t}}function oy(t){return typeof t!="number"?TC(t):{top:t,right:t,bottom:t,left:t}}function tl(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function wf(t,e,n){let{reference:r,floating:i}=t;const o=Gr(e),s=Vp(e),a=Bp(s),l=ri(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ns(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const OC=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=wf(u,r,l),h=r,p={},f=0;for(let m=0;m<a.length;m++){const{name:g,fn:b}=a[m],{x:y,y:k,data:v,reset:w}=await b({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:t,floating:e}});c=y??c,d=k??d,p={...p,[g]:{...p[g],...v}},w&&f<=50&&(f++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:c,y:d}=wf(u,h,l)),m=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:p}};async function sy(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Is(e,t),f=oy(p),m=a[h?d==="floating"?"reference":"floating":d],g=tl(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},v=tl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:y,strategy:l}):b);return{top:(g.top-v.top+f.top)/k.y,bottom:(v.bottom-g.bottom+f.bottom)/k.y,left:(g.left-v.left+f.left)/k.x,right:(v.right-g.right+f.right)/k.x}}const AC=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=Is(t,e)||{};if(u==null)return{};const d=oy(c),h={x:n,y:r},p=Vp(i),f=Bp(p),m=await s.getDimensions(u),g=p==="y",b=g?"top":"left",y=g?"bottom":"right",k=g?"clientHeight":"clientWidth",v=o.reference[f]+o.reference[p]-h[p]-o.floating[f],w=h[p]-o.reference[p],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let C=x?x[k]:0;(!C||!await(s.isElement==null?void 0:s.isElement(x)))&&(C=a.floating[k]||o.floating[f]);const M=v/2-w/2,T=C/2-m[f]/2-1,A=Zi(d[b],T),_=Zi(d[y],T),N=A,$=C-m[f]-_,j=C/2-m[f]/2+M,q=ad(N,j,$),K=!l.arrow&&Ns(i)!=null&&j!==q&&o.reference[f]/2-(j<N?A:_)-m[f]/2<0,X=K?j<N?j-N:j-$:0;return{[p]:h[p]+X,data:{[p]:q,centerOffset:j-q-X,...K&&{alignmentOffset:X}},reset:K}}}),MC=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Is(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=ri(i),y=Gr(a),k=ri(a)===a,v=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=h||(k||!m?[el(a)]:EC(a)),x=f!=="none";!h&&x&&w.push(...SC(a,m,f,v));const C=[a,...w],M=await sy(e,g),T=[];let A=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&T.push(M[b]),d){const q=xC(i,s,v);T.push(M[q[0]],M[q[1]])}if(A=[...A,{placement:i,overflows:T}],!T.every(q=>q<=0)){var _,N;const q=(((_=o.flip)==null?void 0:_.index)||0)+1,K=C[q];if(K){var $;const fe=d==="alignment"?y!==Gr(K):!1,Ee=(($=A[0])==null?void 0:$.overflows[0])>0;if(!fe||Ee)return{data:{index:q,overflows:A},reset:{placement:K}}}let X=(N=A.filter(fe=>fe.overflows[0]<=0).sort((fe,Ee)=>fe.overflows[1]-Ee.overflows[1])[0])==null?void 0:N.placement;if(!X)switch(p){case"bestFit":{var j;const fe=(j=A.filter(Ee=>{if(x){const Ie=Gr(Ee.placement);return Ie===y||Ie==="y"}return!0}).map(Ee=>[Ee.placement,Ee.overflows.filter(Ie=>Ie>0).reduce((Ie,An)=>Ie+An,0)]).sort((Ee,Ie)=>Ee[1]-Ie[1])[0])==null?void 0:j[0];fe&&(X=fe);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};async function _C(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ri(n),a=Ns(n),l=Gr(n)==="y",u=["left","top"].includes(s)?-1:1,c=o&&l?-1:1,d=Is(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof f=="number"&&(p=a==="end"?f*-1:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const DC=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await _C(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},IC=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:b,y}=g;return{x:b,y}}},...l}=Is(t,e),u={x:n,y:r},c=await sy(e,l),d=Gr(ri(i)),h=iy(d);let p=u[h],f=u[d];if(o){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+c[g],k=p-c[b];p=ad(y,p,k)}if(s){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=f+c[g],k=f-c[b];f=ad(y,f,k)}const m=a.fn({...e,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}};function yu(){return typeof window<"u"}function gi(t){return $p(t)?(t.nodeName||"").toLowerCase():"#document"}function _t(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function On(t){var e;return(e=($p(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $p(t){return yu()?t instanceof Node||t instanceof _t(t).Node:!1}function en(t){return yu()?t instanceof Element||t instanceof _t(t).Element:!1}function wn(t){return yu()?t instanceof HTMLElement||t instanceof _t(t).HTMLElement:!1}function xf(t){return!yu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _t(t).ShadowRoot}function Rs(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=tn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function NC(t){return["table","td","th"].includes(gi(t))}function bu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function jp(t){const e=zp(),n=en(t)?tn(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function RC(t){let e=Er(t);for(;wn(e)&&!Qi(e);){if(jp(e))return e;if(bu(e))return null;e=Er(e)}return null}function zp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qi(t){return["html","body","#document"].includes(gi(t))}function tn(t){return _t(t).getComputedStyle(t)}function ku(t){return en(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Er(t){if(gi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xf(t)&&t.host||On(t);return xf(e)?e.host:e}function ay(t){const e=Er(t);return Qi(e)?t.ownerDocument?t.ownerDocument.body:t.body:wn(e)&&Rs(e)?e:ay(e)}function hs(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=ay(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=_t(i);if(o){const a=ud(s);return e.concat(s,s.visualViewport||[],Rs(i)?i:[],a&&n?hs(a):[])}return e.concat(i,hs(i,[],n))}function ud(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ly(t){const e=tn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=wn(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Qa(n)!==o||Qa(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Hp(t){return en(t)?t:t.contextElement}function Wi(t){const e=Hp(t);if(!wn(e))return vn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=ly(e);let s=(o?Qa(n.width):n.width)/r,a=(o?Qa(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const PC=vn(0);function uy(t){const e=_t(t);return!zp()||!e.visualViewport?PC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function FC(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==_t(t)?!1:e}function ii(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Hp(t);let s=vn(1);e&&(r?en(r)&&(s=Wi(r)):s=Wi(t));const a=FC(o,n,r)?uy(o):vn(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=_t(o),p=r&&en(r)?_t(r):r;let f=h,m=ud(f);for(;m&&r&&p!==f;){const g=Wi(m),b=m.getBoundingClientRect(),y=tn(m),k=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,v=b.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,d*=g.y,l+=k,u+=v,f=_t(m),m=ud(f)}}return tl({width:c,height:d,x:l,y:u})}function qp(t,e){const n=ku(t).scrollLeft;return e?e.left+n:ii(On(t)).left+n}function cy(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:qp(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function LC(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=On(r),a=e?bu(e.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=vn(1);const c=vn(0),d=wn(r);if((d||!d&&!o)&&((gi(r)!=="body"||Rs(s))&&(l=ku(r)),wn(r))){const p=ii(r);u=Wi(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=s&&!d&&!o?cy(s,l,!0):vn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function BC(t){return Array.from(t.getClientRects())}function VC(t){const e=On(t),n=ku(t),r=t.ownerDocument.body,i=Kr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Kr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+qp(t);const a=-n.scrollTop;return tn(r).direction==="rtl"&&(s+=Kr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function $C(t,e){const n=_t(t),r=On(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const u=zp();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a,y:l}}function jC(t,e){const n=ii(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=wn(t)?Wi(t):vn(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:s,height:a,x:l,y:u}}function Ef(t,e,n){let r;if(e==="viewport")r=$C(t,n);else if(e==="document")r=VC(On(t));else if(en(e))r=jC(e,n);else{const i=uy(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tl(r)}function dy(t,e){const n=Er(t);return n===e||!en(n)||Qi(n)?!1:tn(n).position==="fixed"||dy(n,e)}function zC(t,e){const n=e.get(t);if(n)return n;let r=hs(t,[],!1).filter(a=>en(a)&&gi(a)!=="body"),i=null;const o=tn(t).position==="fixed";let s=o?Er(t):t;for(;en(s)&&!Qi(s);){const a=tn(s),l=jp(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&i&&["absolute","fixed"].includes(i.position)||Rs(s)&&!l&&dy(t,s))?r=r.filter(u=>u!==s):i=a,s=Er(s)}return e.set(t,r),r}function HC(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?bu(e)?[]:zC(e,this._c):[].concat(n),r],s=o[0],a=o.reduce((l,u)=>{const c=Ef(e,u,i);return l.top=Kr(c.top,l.top),l.right=Zi(c.right,l.right),l.bottom=Zi(c.bottom,l.bottom),l.left=Kr(c.left,l.left),l},Ef(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function qC(t){const{width:e,height:n}=ly(t);return{width:e,height:n}}function WC(t,e,n){const r=wn(e),i=On(e),o=n==="fixed",s=ii(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=vn(0);if(r||!r&&!o)if((gi(e)!=="body"||Rs(i))&&(a=ku(e)),r){const h=ii(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=qp(i));const u=i&&!r&&!o?cy(i,a):vn(0),c=s.left+a.scrollLeft-l.x-u.x,d=s.top+a.scrollTop-l.y-u.y;return{x:c,y:d,width:s.width,height:s.height}}function Zu(t){return tn(t).position==="static"}function Cf(t,e){if(!wn(t)||tn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return On(t)===n&&(n=n.ownerDocument.body),n}function py(t,e){const n=_t(t);if(bu(t))return n;if(!wn(t)){let i=Er(t);for(;i&&!Qi(i);){if(en(i)&&!Zu(i))return i;i=Er(i)}return n}let r=Cf(t,e);for(;r&&NC(r)&&Zu(r);)r=Cf(r,e);return r&&Qi(r)&&Zu(r)&&!jp(r)?n:r||RC(t)||n}const UC=async function(t){const e=this.getOffsetParent||py,n=this.getDimensions,r=await n(t.floating);return{reference:WC(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function KC(t){return tn(t).direction==="rtl"}const cd={convertOffsetParentRelativeRectToViewportRelativeRect:LC,getDocumentElement:On,getClippingRect:HC,getOffsetParent:py,getElementRects:UC,getClientRects:BC,getDimensions:qC,getScale:Wi,isElement:en,isRTL:KC};function hy(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function GC(t,e){let n=null,r;const i=On(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(a||e(),!h||!p)return;const f=ia(d),m=ia(i.clientWidth-(c+h)),g=ia(i.clientHeight-(d+p)),b=ia(c),y={rootMargin:-f+"px "+-m+"px "+-g+"px "+-b+"px",threshold:Kr(0,Zi(1,l))||1};let k=!0;function v(w){const x=w[0].intersectionRatio;if(x!==l){if(!k)return s();x?s(!1,x):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x===1&&!hy(u,t.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),o}function JC(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Hp(t),c=i||o?[...u?hs(u):[],...hs(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&a?GC(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(e)})),n()}),u&&!l&&p.observe(u),p.observe(e));let f,m=l?ii(t):null;l&&g();function g(){const b=ii(t);m&&!hy(m,b)&&n(),m=b,f=requestAnimationFrame(g)}return n(),()=>{var b;c.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const fy=DC,YC=IC,my=MC,XC=AC,gy=(t,e,n)=>{const r=new Map,i={platform:cd,...n},o={...i.platform,_c:r};return OC(t,e,{...i,platform:o})};function ZC(t){return QC(t)}function Qu(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function QC(t){for(let e=t;e;e=Qu(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Qu(t);e;e=Qu(e)){if(!(e instanceof Element))continue;const n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||n.filter!=="none"||e.tagName==="BODY"))return e}return null}const wu=Q({inheritAttrs:!1,__name:"Dropdown",props:{items:{},placement:{default:"bottom-start"},teleport:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},theme:{default:"border"},teleportTo:{default:"body"},offset:{default:8},variant:{},size:{},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{},stateTimeout:{},confirmLabel:{},label:{},icon:{},iconLeft:{},iconRight:{default:"fa-pro-regular:angle-down"}},setup(t,{expose:e}){const n=t,r=I(()=>{const{items:v,placement:w,teleport:x,keepOpen:C,...M}=n;return M}),i=H(!1),o=pu(),s=H(),a=H(),l=H({top:"",left:"",position:""});let u=()=>{};function c(){!s.value||!a.value||(u=JC(s.value.$el,a.value,()=>{!s.value||!a.value||gy(s.value.$el,a.value,{placement:n.placement,middleware:[fy(n.offset),my()],platform:{...cd,getOffsetParent:v=>cd.getOffsetParent(v,ZC)}}).then(({x:v,y:w})=>{l.value={top:`${w}px`,left:`${v}px`,position:"absolute"}})}))}pi(u),lp(()=>{if(i.value)return c();u()});const d=({target:v},w="dom")=>{if(v instanceof Element&&!(!s.value||!a.value)){if(w==="dom")return[s.value.$el,a.value].some(x=>x&&(v===x||x.contains(v)))?void 0:p(!1);if(w==="shadow-dom"){const x=o.value.getRootNode();return v.shadowRoot===x?void 0:p(!1)}}},h=({key:v})=>v==="Escape"&&p(!1),p=(v=!i.value)=>(v?y():k(),i.value=v,!0),f=I(()=>o.value.getRootNode()),m=I(()=>f.value instanceof ShadowRoot);function g(v){d(v,"dom")}function b(v){d(v,"shadow-dom")}function y(){window.addEventListener("keydown",h),m.value?(f.value.addEventListener("click",g),window.addEventListener("click",b)):window.addEventListener("click",g)}function k(){window.removeEventListener("keydown",h),m.value?(f.value.removeEventListener("click",g),window.removeEventListener("click",b)):window.removeEventListener("click",g)}return e({isOpen:i}),(v,w)=>(E(),O(Oe,null,[he(He,re({...r.value,...v.$attrs},{onClick:w[0]||(w[0]=()=>p()),ref_key:"trigger",ref:s,class:["k-dropdown-trigger",{"k-dropdown-trigger--open":!!i.value}]}),Ms({_:2},[v.$slots["icon-left"]?{name:"icon-left",fn:ee(()=>[L(v.$slots,"icon-left")]),key:"0"}:void 0,v.$slots.trigger?{name:"default",fn:ee(()=>[L(v.$slots,"trigger")]),key:"1"}:void 0,v.$slots["icon-right"]?{name:"icon-right",fn:ee(()=>[L(v.$slots,"icon-right")]),key:"2"}:void 0]),1040,["class"]),(E(),z(Kg,{to:v.teleportTo,disabled:!v.teleport},[he(up,{name:"k-dropdown"},{default:ee(()=>[i.value?(E(),O("div",{key:0,class:Se(`k-dropdown k-dropdown--theme-${v.theme}`),style:kn(l.value),ref_key:"content",ref:a,onClick:w[1]||(w[1]=()=>!v.keepOpen&&p(!1))},[L(v.$slots,"default",{close:p.bind(null,!1)},()=>[(E(!0),O(Oe,null,Mt(v.items,({action:x,icon:C,...M})=>(E(),z(He,re({ref_for:!0},M,{variant:"tertiary","icon-right":M.iconRight||C,onClick:()=>x()}),null,16,["icon-right","onClick"]))),256))])],6)):P("",!0)]),_:3})],8,["to","disabled"]))],64))}});function eS(t){return t!=null&&typeof t=="object"&&"$el"in t}function dd(t){if(eS(t)){const e=t.$el;return $p(e)&&gi(e)==="#comment"?null:e}return t}function Ii(t){return typeof t=="function"?t():B(t)}function tS(t){return{name:"arrow",options:t,fn(e){const n=dd(Ii(t.element));return n==null?{}:XC({element:n,padding:t.padding}).fn(e)}}}function vy(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Sf(t,e){const n=vy(t);return Math.round(e*n)/n}function nS(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=I(()=>{var C;return(C=Ii(n.open))!=null?C:!0}),o=I(()=>Ii(n.middleware)),s=I(()=>{var C;return(C=Ii(n.placement))!=null?C:"bottom"}),a=I(()=>{var C;return(C=Ii(n.strategy))!=null?C:"absolute"}),l=I(()=>{var C;return(C=Ii(n.transform))!=null?C:!0}),u=I(()=>dd(t.value)),c=I(()=>dd(e.value)),d=H(0),h=H(0),p=H(a.value),f=H(s.value),m=Zt({}),g=H(!1),b=I(()=>{const C={position:p.value,left:"0",top:"0"};if(!c.value)return C;const M=Sf(c.value,d.value),T=Sf(c.value,h.value);return l.value?{...C,transform:"translate("+M+"px, "+T+"px)",...vy(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:M+"px",top:T+"px"}});let y;function k(){if(u.value==null||c.value==null)return;const C=i.value;gy(u.value,c.value,{middleware:o.value,placement:s.value,strategy:a.value}).then(M=>{d.value=M.x,h.value=M.y,p.value=M.strategy,f.value=M.placement,m.value=M.middlewareData,g.value=C!==!1})}function v(){typeof y=="function"&&(y(),y=void 0)}function w(){if(v(),r===void 0){k();return}if(u.value!=null&&c.value!=null){y=r(u.value,c.value,k);return}}function x(){i.value||(g.value=!1)}return xe([o,s,a,i],k,{flush:"sync"}),xe([u,c],w,{flush:"sync"}),xe(i,x,{flush:"sync"}),Xg()&&Zg(v),{x:Ei(d),y:Ei(h),strategy:Ei(p),placement:Ei(f),middlewareData:Ei(m),isPositioned:Ei(g),floatingStyles:b,update:k}}const rS=["innerHTML"],iS=Q({__name:"ColumnLabel",props:{label:{},tooltip:{}},setup(t){const e=t,n=H(!1),r=H(!1),i=H(!1),o=H(null),s=H(null),a=H(null),{floatingStyles:l,middlewareData:u,placement:c,update:d}=nS(o,s,{placement:"top",middleware:[fy(8),my(),YC({padding:8}),tS({element:a})]}),h=I(()=>{const{x:b,y}=u.value.arrow||{},k={left:b!=null?`${b}px`:"",top:y!=null?`${y}px`:""},v=c.value||"top";return v.startsWith("top")&&(k.bottom="-6px"),v.startsWith("bottom")&&(k.top="-6px"),v.startsWith("left")&&(k.right="-6px"),v.startsWith("right")&&(k.left="-6px"),k});lp(()=>{n.value=i.value||r.value,n.value&&d()});const p=()=>{i.value=!0,r.value=!1},f=()=>{i.value=!1,r.value=!1},m=b=>{r.value=!r.value,b.stopPropagation()},g=()=>{r.value=!1};return Tn(()=>{document.addEventListener("click",g)}),pi(()=>{document.removeEventListener("click",g)}),(b,y)=>(E(),O(Oe,null,[U("span",{ref_key:"labelEl",ref:o,onClick:m,onMouseenter:p,onMouseleave:f,innerHTML:e.label},null,40,rS),n.value&&e.tooltip?(E(),O("div",{key:0,class:"k-datatable-label__tooltip",ref_key:"tooltipEl",ref:s,style:kn(B(l))},[Be(oe(e.tooltip)+" ",1),U("div",{ref_key:"arrowEl",ref:a,style:kn(h.value),class:"k-datatable-label__tooltip-arrow"},null,4)],4)):P("",!0)],64))}}),oS={key:0,class:"k-datatable__row"},sS={key:0,class:"k-datatable__cell k-datatable__cell-select"},aS=["data-col-id","onClick"],lS={key:1,class:"k-datatable__cell k-datatable__cell-actions"},uS={key:0,class:"k-datatable__cell k-datatable__cell-select"},cS={key:1,class:"k-datatable__cell k-datatable__cell-actions"},dS={key:0,class:"k-datatable__footer"},EL=Q({__name:"DataTable",props:{items:{},selected:{},theme:{default:"default"},header:{type:Boolean,default:!0},sticky:{type:[Boolean,String]},sortBy:{},sortableBy:{default:()=>[]},isDisabled:{type:Function,default:()=>!1},columns:{},labels:{default:()=>({selection:"Valgt",resetSelection:"Tilbakestill valg"})},cellWrapper:{type:Function,default:()=>({component:"div"})},rowWrapper:{type:Function,default:()=>({component:"div"})}},emits:["update:selected","update:sortBy"],setup(t,{emit:e}){const n=t,r=pp(),i=e,o=H([-1]),s=I(()=>n.items.filter(f=>!n.isDisabled(f))),a=I(()=>!!n.selected),l=I(()=>!!(Object.keys(n.sortBy||{}).length&&n.sortableBy.length)),u=I(()=>!!r.rowActions),c=I({get:()=>!!(s.value.length&&s.value.every(f=>n.selected&&n.selected.includes(f))),set:f=>i("update:selected",f?[...s.value]:[])}),d=I(()=>[a.value?"2.5rem":!1,...n.columns.filter(({disabled:f})=>!f).map(f=>f.size||"auto"),u.value?"0px":!1].filter(Boolean).join(" "));function h(f){var m;if(!l.value||!n.sortableBy.includes(f))return;let g=((m=n.sortBy)==null?void 0:m[f])||-1;i("update:sortBy",{[f]:g*-1})}function p(f,m){if(!f.isTrusted||!(f.target instanceof HTMLInputElement))return;let g=o.value.slice(-1).pop()||-1,b=[];if(f.shiftKey){let y=g>m,k=g+(y?-1:1);for(;y?k>m:k<m;){let v=n.items[k];!(n.selected||[]).includes(v)&&!n.isDisabled(v)&&b.push(v),y?k--:k++}}f.target.checked?o.value.push(m):g===m&&o.value.pop(),i("update:selected",[...n.selected||[],...b])}return(f,m)=>(E(),O("div",{class:Se([`k-datatable k-datatable--${f.theme}`,{"k-datatable--sticky":!!f.sticky,"k-datatable--no-header":!f.header}]),style:kn(`--k-datatable-layout: ${d.value}; --k-datatable-sticky-top: ${typeof f.sticky=="string"?f.sticky:"0"}`)},[f.header?(E(),O("div",oS,[a.value?(E(),O("div",sS,[he(pf,{class:"k-datatable__checkbox",modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=g=>c.value=g),disabled:!f.items.length},null,8,["modelValue","disabled"])])):P("",!0),(E(!0),O(Oe,null,Mt(f.columns.filter(({disabled:g})=>!g),g=>(E(),O("div",{class:Se(["k-datatable__cell",`k-datatable__cell--text-align-${g.align||"start"}`,{"k-datatable__cell-sort":l.value&&f.sortableBy.includes(g.id),"k-datatable__cell-sort--active":g.id in(f.sortBy||{})}]),key:g.id,"data-col-id":g.id,onClick:b=>h(g.id)},[L(f.$slots,`${g.id}-label`,{item:g},()=>[he(iS,{label:g.label,tooltip:g.tooltip},null,8,["label","tooltip"])]),he(B(Ze),{class:"k-datatable__cell-sort-icon",icon:(f.sortBy||{})[g.id]<0?"fa-pro-solid:caret-up":"fa-pro-solid:caret-down"},null,8,["icon"])],10,aS))),128)),u.value?(E(),O("div",lS)):P("",!0)])):P("",!0),(E(!0),O(Oe,null,Mt(f.items,(g,b)=>(E(),O("div",{class:"k-datatable__row",key:f.sortBy?g?.id||B(Qt)():b},[a.value?(E(),O("div",uS,[he(pf,{class:"k-datatable__checkbox","model-value":f.selected||[],"onUpdate:modelValue":m[1]||(m[1]=y=>i("update:selected",y)),value:g,onMousedown:m[2]||(m[2]=Wa(()=>{},["prevent"])),onClick:y=>p(y,b),disabled:f.isDisabled(g)},null,8,["model-value","value","onClick","disabled"])])):P("",!0),(E(),z(Qe(f.rowWrapper(g).component),re({class:"k-datatable__row-wrapper",ref_for:!0},f.rowWrapper(g).bind,Qg(f.rowWrapper(g).listeners)),{default:ee(()=>[(E(!0),O(Oe,null,Mt(f.columns.filter(({disabled:y})=>!y),(y,k)=>(E(),z(Qe(f.cellWrapper(g,y).component),re({ref_for:!0},f.cellWrapper(g,y).bind,{class:`k-datatable__cell k-datatable__cell--text-align-${y.align||"start"}`,key:`col-${y.id}`,"data-cell-id":y.id}),{default:ee(()=>[L(f.$slots,y.id,{item:g,column:y,rowIndex:b,colIndex:k})]),_:2},1040,["class","data-cell-id"]))),128))]),_:2},1040)),f.$slots["row-actions"]?(E(),O("div",cS,[L(f.$slots,"row-actions",{item:g})])):P("",!0)]))),128)),he(up,{name:"k-datatable-footer"},{default:ee(()=>{var g,b;return[f.$slots.footer||(g=f.selected)!=null&&g.length?(E(),O("div",dS,[(b=f.selected)!=null&&b.length?(E(),z(wu,{key:0,label:`${f.labels.selection} (${f.selected.length})`,teleport:!0},{default:ee(()=>[L(f.$slots,"select-actions"),he(He,{label:f.labels.resetSelection,"icon-right":"fa-pro-light:times-square",variant:"tertiary",onClick:m[3]||(m[3]=y=>i("update:selected",[]))},null,8,["label"])]),_:3},8,["label"])):P("",!0),L(f.$slots,"footer")])):P("",!0)]}),_:3})],6))}});var pS=$n("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Si=pS.build(),nl=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`radio-group:${t.id}`},Tf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`radio-group:${t.id}:label`},yy=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.item)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:${e}`},pd=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.itemHiddenInput)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:input:${e}`},hS=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.itemControl)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:control:${e}`},fS=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.itemLabel)==null?void 0:r.call(n,e))??`radio-group:${t.id}:radio:label:${e}`},by=t=>{var e;return((e=t.ids)==null?void 0:e.indicator)??`radio-group:${t.id}:indicator`},xu=t=>t.getById(nl(t)),mS=(t,e)=>t.getById(pd(t,e)),gS=t=>t.getById(by(t)),vS=t=>{var e;return(e=xu(t))==null?void 0:e.querySelector("input:not(:disabled)")},yS=t=>{var e;return(e=xu(t))==null?void 0:e.querySelector("input:not(:disabled):checked")},Of=t=>{const e=`input[type=radio][data-ownedby='${CSS.escape(nl(t))}']:not([disabled])`;return Op(xu(t),e)},bS=(t,e)=>{if(e)return t.getById(yy(t,e))},kS=t=>({left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0}),wS=t=>({width:`${t.width}px`,height:`${t.height}px`,left:`${t.left}px`,top:`${t.top}px`});function xS(t,e){const{context:n,send:r,computed:i,prop:o,scope:s}=t,a=i("isDisabled"),l=o("readOnly");function u(h){const p=n.get("focusedValue")===h.value,f=p&&ds();return{value:h.value,invalid:!!h.invalid,disabled:!!h.disabled||a,checked:n.get("value")===h.value,focused:p,focusVisible:f,hovered:n.get("hoveredValue")===h.value,active:n.get("activeValue")===h.value}}function c(h){const p=u(h);return{"data-focus":J(p.focused),"data-focus-visible":J(p.focusVisible),"data-disabled":J(p.disabled),"data-readonly":J(l),"data-state":p.checked?"checked":"unchecked","data-hover":J(p.hovered),"data-invalid":J(p.invalid),"data-orientation":o("orientation"),"data-ssr":J(n.get("ssr"))}}const d=()=>{const h=yS(s)??vS(s);h?.focus()};return{focus:d,value:n.get("value"),setValue(h){r({type:"SET_VALUE",value:h,isTrusted:!1})},clearValue(){r({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return e.element({...Si.root.attrs,role:"radiogroup",id:nl(s),"aria-labelledby":Tf(s),"data-orientation":o("orientation"),"data-disabled":J(a),"aria-orientation":o("orientation"),dir:o("dir"),style:{position:"relative"}})},getLabelProps(){return e.element({...Si.label.attrs,dir:o("dir"),"data-orientation":o("orientation"),"data-disabled":J(a),id:Tf(s),onClick:d})},getItemState:u,getItemProps(h){const p=u(h);return e.label({...Si.item.attrs,dir:o("dir"),id:yy(s,h.value),htmlFor:pd(s,h.value),...c(h),onPointerMove(){p.disabled||p.hovered||r({type:"SET_HOVERED",value:h.value,hovered:!0})},onPointerLeave(){p.disabled||r({type:"SET_HOVERED",value:null})},onPointerDown(f){p.disabled||(p.focused&&f.pointerType==="mouse"&&f.preventDefault(),r({type:"SET_ACTIVE",value:h.value,active:!0}))},onPointerUp(){p.disabled||r({type:"SET_ACTIVE",value:null})},onClick(){var f;!p.disabled&&xp()&&((f=mS(s,h.value))==null||f.focus())}})},getItemTextProps(h){return e.element({...Si.itemText.attrs,dir:o("dir"),id:fS(s,h.value),...c(h)})},getItemControlProps(h){const p=u(h);return e.element({...Si.itemControl.attrs,dir:o("dir"),id:hS(s,h.value),"data-active":J(p.active),"aria-hidden":!0,...c(h)})},getItemHiddenInputProps(h){const p=u(h);return e.input({"data-ownedby":nl(s),id:pd(s,h.value),type:"radio",name:o("name")||o("id"),form:o("form"),value:h.value,onClick(f){if(l){f.preventDefault();return}f.currentTarget.checked&&r({type:"SET_VALUE",value:h.value,isTrusted:!0})},onBlur(){r({type:"SET_FOCUSED",value:null,focused:!1})},onFocus(){r({type:"SET_FOCUSED",value:h.value,focused:!0})},onKeyDown(f){f.defaultPrevented||f.key===" "&&r({type:"SET_ACTIVE",value:h.value,active:!0})},onKeyUp(f){f.defaultPrevented||f.key===" "&&r({type:"SET_ACTIVE",value:null})},disabled:p.disabled,defaultChecked:p.checked,style:Ap})},getIndicatorProps(){const h=n.get("indicatorRect");return e.element({id:by(s),...Si.indicator.attrs,dir:o("dir"),hidden:n.get("value")==null,"data-disabled":J(a),"data-orientation":o("orientation"),style:{"--transition-property":"left, top, width, height","--left":h?.left,"--top":h?.top,"--width":h?.width,"--height":h?.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:n.get("canIndicatorTransition")?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[o("orientation")==="horizontal"?"left":"top"]:o("orientation")==="horizontal"?"var(--left)":"var(--top)"}})}}}var{not:ES}=cu(),CS={props({props:t}){return{orientation:"vertical",...t}},initialState(){return"idle"},context({prop:t,bindable:e}){return{value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var r;(r=t("onValueChange"))==null||r({value:n})}})),activeValue:e(()=>({defaultValue:null})),focusedValue:e(()=>({defaultValue:null})),hoveredValue:e(()=>({defaultValue:null})),indicatorRect:e(()=>({defaultValue:{}})),canIndicatorTransition:e(()=>({defaultValue:!1})),fieldsetDisabled:e(()=>({defaultValue:!1})),ssr:e(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null}},computed:{isDisabled:({prop:t,context:e})=>!!t("disabled")||e.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:t,action:e,context:n}){t([()=>n.get("value")],()=>{e(["setIndicatorTransition","syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:ES("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:t})=>!!t.isTrusted},effects:{trackFormControlState({context:t,scope:e}){return lu(xu(e),{onFieldsetDisabledChange(n){t.set("fieldsetDisabled",n)},onFormReset(){t.set("value",t.initial("value"))}})},trackFocusVisible({scope:t}){var e;return Mp({root:(e=t.getRootNode)==null?void 0:e.call(t)})}},actions:{setValue({context:t,event:e}){t.set("value",e.value)},setHovered({context:t,event:e}){t.set("hoveredValue",e.value)},setActive({context:t,event:e}){t.set("activeValue",e.value)},setFocused({context:t,event:e}){t.set("focusedValue",e.value)},syncInputElements({context:t,scope:e}){Of(e).forEach(n=>{n.checked=n.value===t.get("value")})},setIndicatorTransition({context:t}){t.set("canIndicatorTransition",Iv(t.get("value")))},cleanupObserver({refs:t}){var e;(e=t.get("indicatorCleanup"))==null||e()},syncSsr({context:t}){t.set("ssr",!1)},syncIndicatorRect({context:t,scope:e,refs:n}){var r;if((r=n.get("indicatorCleanup"))==null||r(),!gS(e))return;const i=t.get("value"),o=bS(e,i);if(i==null||!o){t.set("canIndicatorTransition",!1),t.set("indicatorRect",{});return}const s=Tv([o],{measure(a){return kS(a)},onEntry({rects:a}){t.set("indicatorRect",wS(a[0]))}});n.set("indicatorCleanup",s)},dispatchChangeEvent({context:t,scope:e}){Of(e).forEach(n=>{const r=n.value===t.get("value");r!==n.checked&&Sp(n,{checked:r})})}}}};Kn()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);Kn()(["value","disabled","invalid"]);const SS=["aria-describedby"],CL=Q({__name:"RadioGroup",props:{label:{},modelValue:{},items:{},variant:{default:"radio"},direction:{default:"vertical"},disabled:{type:Boolean},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=dp(du,I(()=>({label:""}))),r=t,i=e,o=mi(CS,{id:Qt(),name:Qt(),...r,defaultValue:r.modelValue,onValueChange:({value:a})=>i("update:modelValue",a)}),s=I(()=>xS(o,fi));return xe(()=>r.modelValue,a=>s.value.setValue(a)),(a,l)=>(E(),O("div",re({class:["k-radiogroup",`k-radiogroup--variant-${a.variant} k-radiogroup--direction-${a.direction}`]},s.value.getRootProps(),{"aria-describedby":B(n).helpId}),[a.variant==="radio"&&(B(n).label||a.label)?(E(),O("span",be(re({key:0},s.value.getLabelProps())),oe(B(n).label||a.label),17)):P("",!0),a.variant==="segment"?(E(),O("div",be(re({key:1},s.value.getIndicatorProps())),null,16)):P("",!0),(E(!0),O(Oe,null,Mt(a.items,u=>(E(),O("label",re({ref_for:!0},s.value.getItemProps({value:u.id})),[U("span",re({ref_for:!0},s.value.getItemTextProps({value:u.id})),oe(u.label),17),U("input",re({ref_for:!0},s.value.getItemHiddenInputProps({value:u.id})),null,16),U("div",re({ref_for:!0},s.value.getItemControlProps({value:u.id})),null,16)],16))),256))],16,SS))}}),SL=Q({__name:"Grid",props:{is:{default:"div"},columns:{default:1},align:{},rows:{},gap:{default:"default"},areas:{}},setup(t){const e=t,n=(o,s)=>o?typeof o=="number"||typeof o=="string"&&o.match(/^\d+$/)?`repeat(${o}, 1fr)`:o.match(/^(\d+\s?)+$/)?o.split(" ").map(a=>`${a}fr`).join(" "):o:s,r=o=>{if(o)return Array.isArray(o)?o.map(s=>`"${s}"`).join(`
2
2
  `):o.split("|").map(s=>s.trim()).map(s=>`"${s}"`).join(`
3
- `)},i=I(()=>hv("grid",{columns:n(e.columns,"1fr"),align:Ka(e.align)||"initial",rows:n(e.rows,"auto"),gap:bp(e.gap),areas:r(e.areas)||"unset"}));return(o,s)=>(E(),z(Qe(o.is),{class:"k-grid",style:kn(i.value)},{default:ee(()=>[L(o.$slots,"default")]),_:3},8,["style"]))}});function ky(t){return t?t.flatMap(e=>{const{type:n,children:r}=e;return n===Oe?ky(r):[e]}):[]}const TL=Q({props:{area:String,align:String},inheritAttrs:!1,setup({area:t,align:e},{slots:n}){return()=>{if(!n.default)return null;const[r]=ky(n.default());if(!r)return null;const i=re({style:{"--k-grid-item-area":t,"--k-grid-item-align-self":Ka(e)||"initial"}},r.props??{});return Ok(r,i)}}}),TS={key:0,class:"k-scroller__indicator"},OL=Q({__name:"Scroller",props:{is:{default:"div"},appearance:{default:"default"},treshhold:{default:80}},setup(t){const e=pu(),n=Qt({prefix:"k-scroller-"}),r=t,i=H({top:!1,right:!1,left:!1,bottom:!1}),o=I(()=>Object.entries(i.value).filter(([,a])=>a).map(([a])=>a)),s=a=>{const{scrollWidth:l,scrollHeight:u,clientWidth:c,clientHeight:d,scrollTop:h,scrollLeft:p}=a,f=l-c>=r.treshhold,m=u-d>=r.treshhold;i.value={top:m&&h<=r.treshhold,left:f&&p<=r.treshhold,bottom:m&&h>=u-d-r.treshhold,right:f&&p>=l-c-r.treshhold}};return Tn(()=>{const a=e.value;a&&(Pp(a,"scroll",()=>s(a)),nE(a,()=>s(a),{childList:!0,subtree:!0}))}),(a,l)=>(E(),z(Qe(a.is),{id:B(n),class:Se([`k-scroller k-scroller--appearance-${a.appearance}`,...o.value.map(u=>`k-scroller--scrolled-to-${u}`)])},{default:ee(()=>[a.appearance==="indicator"?(E(),O("div",TS,[L(a.$slots,"indicator",{},()=>[he(B(Ze),{icon:"fa-pro-thin:arrow-right"})])])):P("",!0),L(a.$slots,"default")]),_:3},8,["id","class"]))}});var Ti=new WeakMap,oa=new WeakMap,sa={},ec=0,wy=t=>t&&(t.host||wy(t.parentNode)),OS=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=wy(n);return r&&t.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",t,". Doing nothing"),null)}).filter(n=>!!n),AS=t=>t.localName==="next-route-announcer"||t.localName==="script"||t.hasAttribute("aria-live")?!0:t.matches("[data-live-announcer]"),MS=(t,e)=>{const{parentNode:n,markerName:r,controlAttribute:i}=e,o=OS(n,Array.isArray(t)?t:[t]);sa[r]||(sa[r]=new WeakMap);const s=sa[r],a=[],l=new Set,u=new Set(o),c=h=>{!h||l.has(h)||(l.add(h),c(h.parentNode))};o.forEach(c);const d=h=>{!h||u.has(h)||Array.prototype.forEach.call(h.children,p=>{if(l.has(p))d(p);else try{if(AS(p))return;const f=p.getAttribute(i)==="true",m=(Ti.get(p)||0)+1,g=(s.get(p)||0)+1;Ti.set(p,m),s.set(p,g),a.push(p),m===1&&f&&oa.set(p,!0),g===1&&p.setAttribute(r,""),f||p.setAttribute(i,"true")}catch(f){console.error("[zag-js > ariaHidden] cannot operate on ",p,f)}})};return d(n),l.clear(),ec++,()=>{a.forEach(h=>{const p=Ti.get(h)-1,f=s.get(h)-1;Ti.set(h,p),s.set(h,f),p||(oa.has(h)||h.removeAttribute(i),oa.delete(h)),f||h.removeAttribute(r)}),ec--,ec||(Ti=new WeakMap,Ti=new WeakMap,oa=new WeakMap,sa={})}},_S=t=>(Array.isArray(t)?t[0]:t).ownerDocument.body,DS=(t,e=_S(t),n="data-aria-hidden")=>{if(e)return MS(t,{parentNode:e,markerName:n,controlAttribute:"aria-hidden"})},IS=t=>{const e=requestAnimationFrame(()=>t());return()=>cancelAnimationFrame(e)};function NS(t,e={}){const{defer:n=!0}=e,r=n?IS:o=>o(),i=[];return i.push(r(()=>{const o=(typeof t=="function"?t():t).filter(Boolean);o.length!==0&&i.push(DS(o))})),()=>{i.forEach(o=>o?.())}}function RS(t){const e={each(n){var r;for(let i=0;i<((r=t.frames)==null?void 0:r.length);i+=1){const o=t.frames[i];o&&n(o)}},addEventListener(n,r,i){return e.each(o=>{try{o.document.addEventListener(n,r,i)}catch{}}),()=>{try{e.removeEventListener(n,r,i)}catch{}}},removeEventListener(n,r,i){e.each(o=>{try{o.document.removeEventListener(n,r,i)}catch{}})}};return e}function PS(t){const e=t.frameElement!=null?t.parent:null;return{addEventListener:(n,r,i)=>{try{e?.addEventListener(n,r,i)}catch{}return()=>{try{e?.removeEventListener(n,r,i)}catch{}}},removeEventListener:(n,r,i)=>{try{e?.removeEventListener(n,r,i)}catch{}}}}var Af="pointerdown.outside",Mf="focus.outside";function FS(t){for(const e of t)if(st(e)&&hr(e))return!0;return!1}var xy=t=>"clientY"in t;function LS(t,e){if(!xy(e)||!t)return!1;const n=t.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width}function BS(t,e){return t.y<=e.y&&e.y<=t.y+t.height&&t.x<=e.x&&e.x<=t.x+t.width}function _f(t,e){if(!e||!xy(t))return!1;const n=e.scrollHeight>e.clientHeight,r=n&&t.clientX>e.offsetLeft+e.clientWidth,i=e.scrollWidth>e.clientWidth,o=i&&t.clientY>e.offsetTop+e.clientHeight,s={x:e.offsetLeft,y:e.offsetTop,width:e.clientWidth+(n?16:0),height:e.clientHeight+(i?16:0)},a={x:t.clientX,y:t.clientY};return BS(s,a)?r||o:!1}function VS(t,e){const{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:o,defer:s}=e;if(!t)return;const a=Wt(t),l=pt(t),u=RS(l),c=PS(l);function d(y,k){if(!st(k)||!k.isConnected||Xi(t,k)||LS(t,y))return!1;const v=a.querySelector(`[aria-controls="${t.id}"]`);if(v){const x=Yc(v);if(_f(y,x))return!1}const w=Yc(t);return _f(y,w)?!1:!(n!=null&&n(k))}const h=new Set,p=cs(t?.getRootNode());function f(y){function k(v){var w;const x=s&&!tf()?Ot:T=>T(),C=v??y,M=((w=C?.composedPath)==null?void 0:w.call(C))??[C?.target];x(()=>{const T=p?M[0]:dt(y);if(!(!t||!d(y,T))){if(i||o){const A=of(i,o);t.addEventListener(Af,A,{once:!0})}Df(t,Af,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:wx(C),focusable:FS(M),target:T}})}})}y.pointerType==="touch"?(h.forEach(v=>v()),h.add(Ne(a,"click",k,{once:!0})),h.add(c.addEventListener("click",k,{once:!0})),h.add(u.addEventListener("click",k,{once:!0}))):k()}const m=new Set,g=setTimeout(()=>{m.add(Ne(a,"pointerdown",f,!0)),m.add(c.addEventListener("pointerdown",f,!0)),m.add(u.addEventListener("pointerdown",f,!0))},0);function b(y){(s?Ot:k=>k())(()=>{const k=dt(y);if(!(!t||!d(y,k))){if(r||o){const v=of(r,o);t.addEventListener(Mf,v,{once:!0})}Df(t,Mf,{bubbles:!1,cancelable:!0,detail:{originalEvent:y,contextmenu:!1,focusable:hr(k),target:k}})}})}return tf()||(m.add(Ne(a,"focusin",b,!0)),m.add(c.addEventListener("focusin",b,!0)),m.add(u.addEventListener("focusin",b,!0))),()=>{clearTimeout(g),h.forEach(y=>y()),m.forEach(y=>y())}}function $S(t,e){const{defer:n}=e,r=n?Ot:o=>o(),i=[];return i.push(r(()=>{const o=typeof t=="function"?t():t;i.push(VS(o,e))})),()=>{i.forEach(o=>o?.())}}function Df(t,e,n){const r=t.ownerDocument.defaultView||window,i=new r.CustomEvent(e,n);return t.dispatchEvent(i)}function jS(t,e){const n=r=>{r.key==="Escape"&&(r.isComposing||e==null||e(r))};return Ne(Wt(t),"keydown",n,{capture:!0})}var Kt={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(t=>t.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(t){var e;const n=this.indexOf(t),r=this.topMostPointerBlockingLayer()?this.indexOf((e=this.topMostPointerBlockingLayer())==null?void 0:e.node):-1;return n<r},isTopMost(t){const e=this.layers[this.count()-1];return e?.node===t},getNestedLayers(t){return Array.from(this.layers).slice(this.indexOf(t)+1)},isInNestedLayer(t,e){return this.getNestedLayers(t).some(n=>Xi(n.node,e))},isInBranch(t){return Array.from(this.branches).some(e=>Xi(e,t))},add(t){const e=this.layers.push(t);t.node.style.setProperty("--layer-index",`${e}`)},addBranch(t){this.branches.push(t)},remove(t){const e=this.indexOf(t);e<0||(e<this.count()-1&&this.getNestedLayers(t).forEach(n=>n.dismiss()),this.layers.splice(e,1),t.style.removeProperty("--layer-index"))},removeBranch(t){const e=this.branches.indexOf(t);e>=0&&this.branches.splice(e,1)},indexOf(t){return this.layers.findIndex(e=>e.node===t)},dismiss(t){var e;(e=this.layers[this.indexOf(t)])==null||e.dismiss()},clear(){this.remove(this.layers[0].node)}},If;function Nf(){Kt.layers.forEach(({node:t})=>{t.style.pointerEvents=Kt.isBelowPointerBlockingLayer(t)?"none":"auto"})}function zS(t){t.style.pointerEvents=""}function HS(t,e){const n=Wt(t),r=[];if(Kt.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(If=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),e){const i=Yx(e,o=>{r.push(Zc(o,{pointerEvents:"auto"}))});r.push(i)}return()=>{Kt.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=If,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(i=>i()))}}function qS(t,e){const{warnOnMissingNode:n=!0}=e;if(n&&!t){nd("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!t)return;const{onDismiss:r,pointerBlocking:i,exclude:o,debug:s}=e,a={dismiss:r,node:t,pointerBlocking:i};Kt.add(a),Nf();function l(p){var f,m;const g=dt(p.detail.originalEvent);Kt.isBelowPointerBlockingLayer(t)||Kt.isInBranch(g)||((f=e.onPointerDownOutside)==null||f.call(e,p),(m=e.onInteractOutside)==null||m.call(e,p),!p.defaultPrevented&&(s&&console.log("onPointerDownOutside:",p.detail.originalEvent),r?.()))}function u(p){var f,m;const g=dt(p.detail.originalEvent);Kt.isInBranch(g)||((f=e.onFocusOutside)==null||f.call(e,p),(m=e.onInteractOutside)==null||m.call(e,p),!p.defaultPrevented&&(s&&console.log("onFocusOutside:",p.detail.originalEvent),r?.()))}function c(p){var f;Kt.isTopMost(t)&&((f=e.onEscapeKeyDown)==null||f.call(e,p),!p.defaultPrevented&&r&&(p.preventDefault(),r()))}function d(p){var f;if(!t)return!1;const m=typeof o=="function"?o():o,g=Array.isArray(m)?m:[m],b=(f=e.persistentElements)==null?void 0:f.map(y=>y()).filter(st);return b&&g.push(...b),g.some(y=>Xi(y,p))||Kt.isInNestedLayer(t,p)}const h=[i?HS(t,e.persistentElements):void 0,jS(t,c),$S(t,{exclude:d,onFocusOutside:u,onPointerDownOutside:l,defer:e.defer})];return()=>{Kt.remove(t),Nf(),zS(t),h.forEach(p=>p?.())}}function WS(t,e){const{defer:n}=e,r=n?Ot:o=>o(),i=[];return i.push(r(()=>{const o=$i(t)?t():t;i.push(qS(o,e))})),()=>{i.forEach(o=>o?.())}}var US=Object.defineProperty,KS=(t,e,n)=>e in t?US(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>KS(t,typeof e!="symbol"?e+"":e,n),Rf={activateTrap(t,e){if(t.length>0){const r=t[t.length-1];r!==e&&r.pause()}const n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap(t,e){const n=t.indexOf(e);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},GS=[],JS=class{constructor(t,e){Te(this,"trapStack"),Te(this,"config"),Te(this,"doc"),Te(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Te(this,"listenerCleanups",[]),Te(this,"handleFocus",r=>{const i=dt(r),o=this.findContainerIndex(i,r)>=0;if(o||kp(i))o&&(this.state.mostRecentlyFocusedNode=i);else{r.stopImmediatePropagation();let s,a=!0;if(this.state.mostRecentlyFocusedNode)if(Eo(this.state.mostRecentlyFocusedNode)>0){const l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:u}=this.state.containerGroups[l];if(u.length>0){const c=u.findIndex(d=>d===this.state.mostRecentlyFocusedNode);c>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?c+1<u.length&&(s=u[c+1],a=!1):c-1>=0&&(s=u[c-1],a=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(u=>Eo(u)>0))||(a=!1);else a=!1;a&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Te(this,"handlePointerDown",r=>{const i=dt(r);if(!(this.findContainerIndex(i,r)>=0)){if(So(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}So(this.config.allowOutsideClick,r)||r.preventDefault()}}),Te(this,"handleClick",r=>{const i=dt(r);this.findContainerIndex(i,r)>=0||So(this.config.clickOutsideDeactivates,r)||So(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Te(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const i=this.config.isKeyBackward(r),o=this.findNextNavNode({event:r,isBackward:i});if(!o)return;Co(r)&&r.preventDefault(),this.tryFocus(o)}}),Te(this,"handleEscapeKey",r=>{YS(r)&&So(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Te(this,"_mutationObserver"),Te(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(i=>{i.some(o=>Array.from(o.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),Te(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(i=>{var o;(o=this._mutationObserver)==null||o.observe(i,{subtree:!0,childList:!0})})}),Te(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!hr(r))if(this.findContainerIndex(this.doc.activeElement)>=0)r=this.doc.activeElement;else{const i=this.state.tabbableGroups[0];r=i&&i.firstTabbableNode||this.getNodeForOption("fallbackFocus")}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Te(this,"tryFocus",r=>{if(r!==!1&&r!==gv(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,XS(r)&&r.select()}}),Te(this,"deactivate",r=>{if(!this.state.active)return this;const i={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...r};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Rf.deactivateTrap(this.trapStack,this);const o=this.getOption(i,"onDeactivate"),s=this.getOption(i,"onPostDeactivate"),a=this.getOption(i,"checkCanReturnFocus"),l=this.getOption(i,"returnFocus","returnFocusOnDeactivate");o?.();const u=()=>{Pf(()=>{if(l){const c=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(c)}s?.()})};if(l&&a){const c=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return a(c).then(u,u),this}return u(),this}),Te(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onPause"),o=this.getOption(r,"onPostPause");return this.state.paused=!0,i?.(),this.removeListeners(),this.updateObservedNodes(),o?.(),this}),Te(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onUnpause"),o=this.getOption(r,"onPostUnpause");return this.state.paused=!1,i?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.(),this}),Te(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Te(this,"getReturnFocusNode",r=>{const i=this.getNodeForOption("setReturnFocus",{params:[r]});return i||(i===!1?!1:r)}),Te(this,"getOption",(r,i,o)=>r&&r[i]!==void 0?r[i]:this.config[o||i]),Te(this,"getNodeForOption",(r,{hasFallback:i=!1,params:o=[]}={})=>{let s=this.config[r];if(typeof s=="function"&&(s=s(...o)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let a=s;if(typeof s=="string"){try{a=this.doc.querySelector(s)}catch(l){throw new Error(`\`${r}\` appears to be an invalid selector; error="${l.message}"`)}if(!a&&!i)throw new Error(`\`${r}\` as selector refers to no known node`)}return a}),Te(this,"findNextNavNode",r=>{const{event:i,isBackward:o=!1}=r,s=r.target||dt(i);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const l=this.findContainerIndex(s,i),u=l>=0?this.state.containerGroups[l]:void 0;if(l<0)o?a=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:a=this.state.tabbableGroups[0].firstTabbableNode;else if(o){let c=this.state.tabbableGroups.findIndex(({firstTabbableNode:d})=>s===d);if(c<0&&(u?.container===s||hr(s)&&!Br(s)&&!(u!=null&&u.nextTabbableNode(s,!1)))&&(c=l),c>=0){const d=c===0?this.state.tabbableGroups.length-1:c-1,h=this.state.tabbableGroups[d];a=Eo(s)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else Co(i)||(a=u?.nextTabbableNode(s,!1))}else{let c=this.state.tabbableGroups.findIndex(({lastTabbableNode:d})=>s===d);if(c<0&&(u?.container===s||hr(s)&&!Br(s)&&!(u!=null&&u.nextTabbableNode(s)))&&(c=l),c>=0){const d=c===this.state.tabbableGroups.length-1?0:c+1,h=this.state.tabbableGroups[d];a=Eo(s)>=0?h.firstTabbableNode:h.firstDomTabbableNode}else Co(i)||(a=u?.nextTabbableNode(s))}}else a=this.getNodeForOption("fallbackFocus");return a}),this.trapStack=e.trapStack||GS;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(r){return Co(r)&&!r.shiftKey},isKeyBackward(r){return Co(r)&&r.shiftKey},...e};this.doc=n.document||Wt(Array.isArray(t)?t[0]:t),this.config=n,this.updateContainerElements(t),this.setupMutationObserver()}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,e){const n=typeof e?.composedPath=="function"?e.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(t)||n?.includes(r)||i.find(o=>o===t))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const e=xv(t),n=wv(t),r=e.length>0?e[0]:void 0,i=e.length>0?e[e.length-1]:void 0,o=n.find(u=>Br(u)),s=n.slice().reverse().find(u=>Br(u)),a=!!e.find(u=>Eo(u)>0);function l(u,c=!0){const d=e.indexOf(u);return d<0?c?n.slice(n.indexOf(u)+1).find(h=>Br(h)):n.slice(0,n.indexOf(u)).reverse().find(h=>Br(h)):e[d+(c?1:-1)]}return{container:t,tabbableNodes:e,focusableNodes:n,posTabIndexesFound:a,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return Rf.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Pf(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ne(this.doc,"focusin",this.handleFocus,!0),Ne(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ne(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ne(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ne(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ne(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const e=this.getOption(t,"onActivate"),n=this.getOption(t,"onPostActivate"),r=this.getOption(t,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=this.doc.activeElement||null,e?.();const i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Co=t=>t.key==="Tab",So=(t,...e)=>typeof t=="function"?t(...e):t,YS=t=>!t.isComposing&&t.key==="Escape",Pf=t=>setTimeout(t,0),XS=t=>t.localName==="input"&&"select"in t&&typeof t.select=="function";function ZS(t,e={}){let n;const r=Ot(()=>{const i=typeof t=="function"?t():t;if(i){n=new JS(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...e,document:Wt(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),r()}}var tc="data-scroll-lock";function QS(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function eT(t){const e=t??document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(tc))return;i.setAttribute(tc,"");const o=n.innerWidth-r.clientWidth,s=()=>Kx(r,"--scrollbar-width",`${o}px`),a=QS(r),l=()=>Zc(i,{overflow:"hidden",[a]:`${o}px`}),u=()=>{const{scrollX:d,scrollY:h,visualViewport:p}=n,f=p?.offsetLeft??0,m=p?.offsetTop??0,g=Zc(i,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(m))}px`,left:`${-(d-Math.floor(f))}px`,right:"0",[a]:`${o}px`});return()=>{g?.(),n.scrollTo({left:d,top:h,behavior:"instant"})}},c=[s(),su()?u():l()];return()=>{c.forEach(d=>d?.()),i.removeAttribute(tc)}}var tT=$n("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Rr=tT.build(),Ey=t=>{var e;return((e=t.ids)==null?void 0:e.positioner)??`dialog:${t.id}:positioner`},Cy=t=>{var e;return((e=t.ids)==null?void 0:e.backdrop)??`dialog:${t.id}:backdrop`},hd=t=>{var e;return((e=t.ids)==null?void 0:e.content)??`dialog:${t.id}:content`},Sy=t=>{var e;return((e=t.ids)==null?void 0:e.trigger)??`dialog:${t.id}:trigger`},fd=t=>{var e;return((e=t.ids)==null?void 0:e.title)??`dialog:${t.id}:title`},md=t=>{var e;return((e=t.ids)==null?void 0:e.description)??`dialog:${t.id}:description`},Ty=t=>{var e;return((e=t.ids)==null?void 0:e.closeTrigger)??`dialog:${t.id}:close`},aa=t=>t.getById(hd(t)),nT=t=>t.getById(Ey(t)),rT=t=>t.getById(Cy(t)),iT=t=>t.getById(Sy(t)),oT=t=>t.getById(fd(t)),sT=t=>t.getById(md(t)),aT=t=>t.getById(Ty(t));function lT(t,e){const{state:n,send:r,context:i,prop:o,scope:s}=t,a=o("aria-label"),l=n.matches("open");return{open:l,setOpen(u){n.matches("open")!==u&&r({type:u?"OPEN":"CLOSE"})},getTriggerProps(){return e.button({...Rr.trigger.attrs,dir:o("dir"),id:Sy(s),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":hd(s),onClick(u){u.defaultPrevented||r({type:"TOGGLE"})}})},getBackdropProps(){return e.element({...Rr.backdrop.attrs,dir:o("dir"),hidden:!l,id:Cy(s),"data-state":l?"open":"closed"})},getPositionerProps(){return e.element({...Rr.positioner.attrs,dir:o("dir"),id:Ey(s),style:{pointerEvents:l?void 0:"none"}})},getContentProps(){const u=i.get("rendered");return e.element({...Rr.content.attrs,dir:o("dir"),role:o("role"),hidden:!l,id:hd(s),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":a||void 0,"aria-labelledby":a||!u.title?void 0:fd(s),"aria-describedby":u.description?md(s):void 0})},getTitleProps(){return e.element({...Rr.title.attrs,dir:o("dir"),id:fd(s)})},getDescriptionProps(){return e.element({...Rr.description.attrs,dir:o("dir"),id:md(s)})},getCloseTriggerProps(){return e.button({...Rr.closeTrigger.attrs,dir:o("dir"),id:Ty(s),type:"button",onClick(u){u.defaultPrevented||(u.stopPropagation(),r({type:"CLOSE"}))}})}}}var uT={props({props:t,scope:e}){const n=t.role==="alertdialog";return{role:"dialog",modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:n?()=>aT(e):void 0,...t}},initialState({prop:t}){return t("open")||t("defaultOpen")?"open":"closed"},context({bindable:t}){return{rendered:t(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:t,action:e,prop:n}){t([()=>n("open")],()=>{e(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:t})=>t("open")!=null},effects:{trackDismissableElement({scope:t,send:e,prop:n}){return WS(()=>aa(t),{defer:!0,pointerBlocking:n("modal"),exclude:[iT(t)],onInteractOutside(r){var i;(i=n("onInteractOutside"))==null||i(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onEscapeKeyDown(r){var i;(i=n("onEscapeKeyDown"))==null||i(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){e({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:t,prop:e}){if(e("preventScroll"))return eT(t.getDoc())},trapFocus({scope:t,prop:e}){return!e("trapFocus")||!e("modal")?void 0:ZS(()=>aa(t),{preventScroll:!0,returnFocusOnDeactivate:!!e("restoreFocus"),initialFocus:e("initialFocusEl"),setReturnFocus:n=>{var r;return((r=e("finalFocusEl"))==null?void 0:r())??n}})},hideContentBelow({scope:t,prop:e}){return e("modal")?NS(()=>[aa(t)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:t,scope:e}){Ot(()=>{t.set("rendered",{title:!!oT(e),description:!!sT(e)})})},syncZIndex({scope:t}){Ot(()=>{const e=aa(t);if(!e)return;const n=lx(e);[nT(t),rT(t)].forEach(r=>{r?.style.setProperty("--z-index",n.zIndex)})})},invokeOnClose({prop:t}){var e;(e=t("onOpenChange"))==null||e({open:!1})},invokeOnOpen({prop:t}){var e;(e=t("onOpenChange"))==null||e({open:!0})},toggleVisibility({prop:t,send:e,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};Kn()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const cT=["data-id"],dT=["data-id"],pT=["data-id"],hT=Q({__name:"Dialog",props:{title:{},subtitle:{},role:{default:"dialog"},closeOnEsc:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0},alignment:{default:"top"},triggerLabel:{},showCloseTrigger:{type:Boolean,default:!0},dialogId:{},teleport:{type:Boolean,default:!0},disabled:{type:Boolean},variant:{},thumbnail:{},thumbnailOptions:{}},emits:["open","close","clickoutside"],setup(t,{expose:e,emit:n}){const r=t,i=n,o=pu(),s=mi(uT,{id:Qt({prefix:"dialog"}),closeOnEscape:r.closeOnEsc,modal:!0,closeOnInteractOutside:!1,onOpenChange({open:u}){i(u?"open":"close")},onInteractOutside(u){if(!r.closeOnOutsideClick)return u.preventDefault()},onPointerDownOutside(){i("clickoutside"),r.closeOnOutsideClick&&a.value.setOpen(!1)},getRootNode:()=>{var u;return r.teleport?document:(u=o.value)==null?void 0:u.getRootNode()},...r}),a=I(()=>lT(s,fi)),l=u=>r.dialogId?`${r.dialogId}-${u}`:"";return e({open:()=>{a.value.setOpen(!0)},close:()=>{a.value.setOpen(!1)}}),(u,c)=>(E(),O("div",{class:"k-dialog","data-id":u.dialogId},[L(u.$slots,"trigger",{triggerProps:a.value.getTriggerProps()},()=>[u.triggerLabel?(E(),z(He,re({key:0,class:"k-dialog__trigger",variant:"secondary"},a.value.getTriggerProps(),{disabled:u.disabled}),{default:ee(()=>[Be(oe(u.triggerLabel),1)]),_:1},16,["disabled"])):P("",!0)]),(E(),z(Kg,{to:"body",disabled:!u.teleport},[a.value.open?(E(),O(Oe,{key:0},[U("div",re({class:"k-dialog__backdrop"},a.value.getBackdropProps(),{"data-id":l("backdrop")}),null,16,dT),U("div",re({class:`k-dialog__container k-dialog--align-${u.alignment}`},a.value.getPositionerProps(),{"data-id":l("container")}),[he(WE,re({class:"k-dialog__card",variant:u.variant,appearance:"shadow"},a.value.getContentProps(),{"data-id":l("dialog"),thumbnail:u.thumbnail,thumbnailOptions:u.thumbnailOptions}),Ms({_:2},[u.$slots.header||u.$slots.title||u.$slots.subtitle||u.title||u.subtitle||u.showCloseTrigger?{name:"header",fn:ee(()=>[L(u.$slots,"header",{titleProps:a.value.getTitleProps(),descriptionProps:a.value.getDescriptionProps(),closeTriggerProps:a.value.getCloseTriggerProps()},()=>[L(u.$slots,"title",{titleProps:a.value.getTitleProps()},()=>[u.title?(E(),O("div",re({key:0,class:"k-dialog__title k-card__title"},a.value.getTitleProps()),oe(u.title),17)):P("",!0)]),L(u.$slots,"subtitle",{descriptionProps:a.value.getDescriptionProps()},()=>[u.subtitle?(E(),O("div",re({key:0,class:"k-dialog__subtitle k-card__subtitle"},a.value.getDescriptionProps()),oe(u.subtitle),17)):P("",!0)]),u.showCloseTrigger?(E(),z(He,re({key:0,class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},a.value.getCloseTriggerProps()),null,16)):P("",!0)])]),key:"0"}:void 0,u.$slots.default?{name:"default",fn:ee(()=>[L(u.$slots,"default",{descriptionProps:a.value.getDescriptionProps()})]),key:"1"}:void 0,u.$slots.actions?{name:"actions",fn:ee(()=>[L(u.$slots,"actions",{close:()=>a.value.setOpen(!1)})]),key:"2"}:void 0]),1040,["variant","data-id","thumbnail","thumbnailOptions"])],16,pT)],64)):P("",!0)],8,["disabled"]))],8,cT))}});function Eu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Cu(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Cu.prototype.define=function(t,e){for(let n in t){let r=t[n].map(function(i){return i.toLowerCase()});n=n.toLowerCase();for(let i=0;i<r.length;i++){const o=r[i];if(o[0]!=="*"){if(!e&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}}if(e||!this._extensions[n]){const i=r[0];this._extensions[n]=i[0]!=="*"?i:i.substr(1)}}};Cu.prototype.getType=function(t){t=String(t);let e=t.replace(/^.*[/\\]/,"").toLowerCase(),n=e.replace(/^.*\./,"").toLowerCase(),r=e.length<t.length;return(n.length<e.length-1||!r)&&this._types[n]||null};Cu.prototype.getExtension=function(t){return t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1,t&&this._extensions[t.toLowerCase()]||null};var fT=Cu,mT={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let gT=fT;var vT=new gT(mT);const rl=Eu(vT);function Wp(t){let e=["Bytes","KB","MB","GB","TB"];if(t==0)return"0 Byte";let n=Math.floor(Math.log(t)/Math.log(1024));return n>e.length&&(n=e.length),Math.round(t/Math.pow(1024,n))+" "+e[n]}function Ff(t){return JSON.parse(JSON.stringify(t))}function Up(t,e,n={fromDirectory:!1}){var r;const{fromDirectory:i}=n,o=Array.isArray(e)?e:e?.split(","),s=((r=("name"in t?t.name:"").split(".").pop())==null?void 0:r.toLowerCase())||"",a="type"in t?t.type:"";return o!=null&&o.includes("directory")&&(i||!t.type)?!0:!t.type&&!e?!1:e?o.map(l=>l.trim()).some(l=>{if(l.startsWith(".")){const u=l.slice(1),c=rl.getType(u),d=rl.getType(s);return c&&a?c===a:!!(!a&&c&&d&&c===d||!c&&!a&&s===u)}return l.includes("*")?a.startsWith(l.replace("*","")):a===l}):!0}const Lf={counter:0,total:0,progress:0,bytes:0,result:[]};class Oy{constructor(e){Jt(this,"queue"),Jt(this,"upload"),Jt(this,"uploadOptions"),Jt(this,"accept"),this.queue=fp(Ff(Lf)),this.upload=e.upload,this.uploadOptions=e.uploadOptions,this.accept=e.accept,this.reset=this.reset.bind(this),this.run=this.run.bind(this)}reset(){this.queue=Object.assign(this.queue,Ff(Lf))}async run(e){e=Array.from(e).filter(o=>Up(o,this.accept,this.uploadOptions)),this.queue.total=e.length,this.queue.counter=0,this.queue.bytes=e.reduce((o,s)=>o+=s?.size||0,0);let n=e.map(()=>0);const r=await Promise.all(e.map((o,s)=>this.upload(o,a=>{n[s]=a,this.queue.progress=n.reduce((l,u)=>l+=u,0)/n.length},this.uploadOptions).then(a=>(this.queue.counter++,a))));if(!r||!r.length)return;let i=r.flat();return this.reset(),i}}const Bf={"image/*":["jpeg","png","gif"]};function yT(t){return t?(Array.isArray(t)?t:t.split(",")).map(e=>e.trim()).map(e=>e.startsWith(".")?e.substring(1):e in Bf?Bf[e]:rl.getExtension(e)).flat():[]}function gd(t){let e=(n,r)=>{const i=document.createElement("a");i.href=n,i.setAttribute("style","display: none"),r&&(i.target=r),t.name&&(i.download=t.name.includes(".")?t.name:[t.name,rl.getExtension(t.type)].join(".")),document.body.appendChild(i),i.click(),document.body.removeChild(i)};return fetch(t.url,{headers:{"Cache-Control":"no-cache"}}).then(n=>n.blob()).then(n=>{const r=URL.createObjectURL(n);return e(r)}).catch(n=>e(t.url,"_blank"))}const bT={class:"k-media-thumbnail-actions"},Ay=Q({__name:"ThumbnailActions",props:{value:{},disabled:{type:Boolean}},emits:["delete"],setup(t,{emit:e}){const n=t,r=I(()=>n.value.type.startsWith("image/")?{component:"button",bind:{onClick:()=>{gd(n.value)}}}:{component:"a",bind:{href:n.value.url,download:n.value.name,target:"_blank"}});return(i,o)=>(E(),O("div",bT,[i.disabled?P("",!0):(E(),z(He,{key:0,class:"k-media-thumbnail-actions__delete",icon:"fa-pro-solid:trash",variant:"danger",onClick:o[0]||(o[0]=Wa(s=>i.$emit("delete"),["stop"]))})),he(He,re({variant:"primary",is:r.value.component,class:"k-media-thumbnail-actions__download"},r.value.bind,{icon:"fa-pro-solid:arrow-alt-circle-down"}),null,16,["is"])]))}}),kT=Q({__name:"Thumbnail",props:{value:{},size:{default:"4rem"},disabled:{type:Boolean}},setup(t){const e=t,n=dp(),r=I(()=>n["data-draggable"]),i=I(()=>{let s={};for(const a in n){if(a==="data-draggable")return;s[a]=n[a]}return s}),o=I(()=>({width:e.size,height:e.size}));return(s,a)=>(E(),O("div",re({class:"k-media-thumbnail"},r.value,{class:{"k-media-thumbnail--selected":s.value.selected}}),[(E(),z(Qe(s.value.typeConfig.components.Thumbnail),re({class:[{"k-media-thumbnail__item--selected":s.value.selected},"k-media-thumbnail__item"],value:s.value},i.value,{style:o.value}),null,16,["class","value","style"])),he(Ay,{value:s.value,disabled:s.disabled,onDelete:a[0]||(a[0]=l=>s.$emit("delete",s.value))},null,8,["value","disabled"])],16))}}),wT={key:0,class:"k-media-type-selector"},xT={class:"k-media-type-selector__info"},ET=Q({__name:"TypeSelector",props:{value:{},upload:{type:Function},labels:{}},emits:["add","cancel","success","openFileWindow"],setup(t,{emit:e}){const n=t,r=e,i=H(null),o=H(),s=H(!0),a=H(!1),l=H(),u=H();xe(a,g=>{var b,y;return g?(b=l.value)==null?void 0:b.open():(y=l.value)==null?void 0:y.close()},{immediate:!0});const c=I(()=>n.value.length===1&&n.value[0].name==="Image");function d(){s.value&&(o.value=u.value.prepareData().then(g=>{r("add",g)}))}function h(g){if(g.name==="Image")return r("openFileWindow");a.value=!0,i.value=g}function p(){a.value=!1,r("cancel")}function f(){a.value=!1,r("success")}function m(g){const b=n.labels[g];return!b||typeof b=="string"?g:b.createLabel||g}return(g,b)=>c.value?P("",!0):(E(),O("div",wT,[U("span",xT,oe(g.labels.selectMessage),1),he(wu,{teleport:!0,label:g.labels.select,iconRight:"fa6-solid:plus",theme:"shadow",placement:"bottom-end"},{default:ee(()=>[(E(!0),O(Oe,null,Mt(g.value,y=>(E(),z(Qe(y.components.CreateTrigger),{key:y.name,label:m(y.name.toLowerCase()),onClick:k=>h(y)},null,8,["label","onClick"]))),128))]),_:1},8,["label"]),he(hT,{dialogId:"k-media-type-selector",ref_key:"dialog",ref:l,title:"",teleport:!0,"close-on-outside-click":!1,"show-close-trigger":!1,"close-on-esc":!0,onClose:p},{default:ee(()=>[i.value?(E(),z(Qe(i.value.components.Create),re({key:0,isValid:s.value,"onUpdate:isValid":b[0]||(b[0]=y=>s.value=y),upload:g.upload,labels:g.labels,name:i.value.name,ref_key:"creator",ref:u},g.$attrs),null,16,["isValid","upload","labels","name"])):P("",!0)]),footer:ee(()=>[he(He,{label:g.labels.cancel,type:"button",onClick:p},null,8,["label"]),he(He,{variant:"primary",disabled:!s.value,promise:o.value,label:g.labels.save,stateTimeout:1e3,onClick:d,onSuccess:f},null,8,["disabled","promise","label"])]),_:1},512)]))}}),CT=Q({__name:"Description",props:{modelValue:{},placeholder:{}},emits:["update:modelValue"],setup(t,{emit:e}){return(n,r)=>(E(),z(TE,{class:"k-media-description",type:"text",placeholder:n.placeholder,modelValue:n.modelValue||"","onUpdate:modelValue":r[0]||(r[0]=i=>n.$emit("update:modelValue",i))},null,8,["placeholder","modelValue"]))}}),ST={class:"k-media-uploader"},TT={class:"k-media-uploader__bar"},OT={class:"k-media-uploader__meta"},AT={key:0},MT={key:1},_T=Q({__name:"Uploader",props:{value:{},bytes:{},current:{default:1},total:{default:1}},setup(t){const e=t,n=I(()=>e.total>1),r=I(()=>Wp(e.bytes)),i=I(()=>Math.floor(e.value));return(o,s)=>(E(),O("div",ST,[U("div",null,oe(i.value)+" %",1),U("div",TT,[U("div",{class:"k-media-uploader__bar-value",style:kn({width:o.value+"%"})},null,4)]),U("div",OT,[n.value?(E(),O("div",AT,oe(o.current)+" / "+oe(o.total),1)):P("",!0),o.bytes?(E(),O("div",MT,"("+oe(r.value)+")",1)):P("",!0)])]))}}),DT=["innerHTML"],IT=Q({__name:"SlotHandler",props:{value:{}},setup(t){const e=t,n=I(()=>typeof e.value=="string"?e.value:void 0),r=I(()=>typeof e.value=="string"?"div":e.value);return(i,o)=>(E(),z(Qe(r.value),be(Re(i.$attrs)),{default:ee(()=>[n.value?(E(),O("span",{key:0,innerHTML:n.value},null,8,DT)):P("",!0)]),_:1},16))}}),NT={class:"k-media-droparea__instruction"},RT=["type","accept","required","disabled","multiple"],PT=Q({__name:"DropArea",props:{value:{},multiple:{type:Boolean},upload:{},uploadOptions:{},type:{},accept:{},selected:{default:null},dropMessage:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["input","select","remove"],setup(t,{emit:e}){const n=t,r=e,i=H(!1),o=H(!0),s=H(),a=I(()=>!!(!n.required||n.value)),l=I(()=>n.disabled),u=I(()=>!l.value&&!d.total),{run:c,queue:d}=new Oy(n);function h(k){return c(k).then(v=>{!v||!v.length||(r("input",n.multiple?[...n.value||[],...v]:v[0]),(!n.selected||!n.multiple)&&xr(()=>r("select")))})}function p(k){l.value||(h(k.target.files||[]),s.value&&(s.value.value=""))}function f(k){var v;if(l.value||!s.value)return;if(k.preventDefault(),!o.value)return g();g();const w=(v=k.dataTransfer)==null?void 0:v.files;w!=null&&w.length&&(s.value.files=w,s.value.dispatchEvent(new InputEvent("input")),h(w))}function m(k){l.value||k.dataTransfer&&(o.value=Array.from(k.dataTransfer.items).every(v=>Up(v,n.accept))&&n.multiple?!0:k.dataTransfer.items.length===1,i.value=!0,k.preventDefault())}function g(){o.value=!0,i.value=!1}const b=rn("k-media-droparea",{variants:{active:{true:"k-media-droparea--active"},invalid:{true:"k-media-droparea--invalid"},selected:{true:"k-media-droparea--selected"},disabled:{true:"k-media-droparea--disabled"}}}),y=()=>{var k;return(k=s.value)==null?void 0:k.click()};return(k,v)=>(E(),O(Oe,null,[U("div",{class:Se(B(b)({active:i.value,invalid:!o.value,selected:!!k.selected,disabled:l.value})),onDrop:f,onDragover:m,onDragleave:g},[L(k.$slots,"preview"),U("div",NT,[u.value?(E(),O("input",{key:0,type:k.type,accept:Array.isArray(k.accept)?k.accept.join(","):k.accept,required:a.value,ref_key:"input",ref:s,onChange:p,disabled:!u.value,multiple:k.multiple,class:"k-media-droparea__input"},null,40,RT)):P("",!0),o.value?(E(),O(Oe,{key:1},[L(k.$slots,"drop-message",{},()=>[he(IT,{value:k.dropMessage},null,8,["value"])]),L(k.$slots,"default",{openFileWindow:y})],64)):(E(),z(B(Ze),{key:2,icon:"fa-pro-light:ban",style:{"font-size":"2rem"}})),L(k.$slots,"custom-message")]),!k.multiple&&k.selected?(E(),z(Ay,{key:0,value:k.selected,disabled:l.value,onDelete:v[0]||(v[0]=w=>k.$emit("remove",k.selected))},null,8,["value","disabled"])):P("",!0)],34),B(d).total?(E(),z(_T,{key:0,value:B(d).progress,bytes:B(d).bytes,current:B(d).counter,total:B(d).total},null,8,["value","bytes","current","total"])):P("",!0)],64))}}),FT=Q({__name:"CreateTrigger",props:{label:{}},setup(t){return(e,n)=>(E(),z(He,{type:"button",label:e.label,iconRight:"fa6-solid:image",size:"small",variant:"tertiary"},null,8,["label"]))}}),LT=Q({__name:"Thumbnail",props:{value:{}},setup(t){const e=t;return(n,r)=>(E(),z(vu,{class:"k-media-image__thumbnail",src:e.value.url,onClick:r[0]||(r[0]=i=>n.$emit("click"))},null,8,["src"]))}}),BT=Q({__name:"Preview",props:{value:{},size:{}},setup(t){const e=t;return(n,r)=>(E(),z(vu,{src:e.value.url,class:"k-media-image-preview",size:n.size,width:"100%",height:"100%"},null,8,["src","size"]))}}),VT={name:"Image",condition:t=>/^image\/.+/i.test(t.type),components:{CreateTrigger:Ta(FT),Thumbnail:Ta(LT),Preview:Ta(BT)}},$T={Image:VT};/**!
3
+ `)},i=I(()=>hv("grid",{columns:n(e.columns,"1fr"),align:Ka(e.align)||"initial",rows:n(e.rows,"auto"),gap:bp(e.gap),areas:r(e.areas)||"unset"}));return(o,s)=>(E(),z(Qe(o.is),{class:"k-grid",style:kn(i.value)},{default:ee(()=>[L(o.$slots,"default")]),_:3},8,["style"]))}});function ky(t){return t?t.flatMap(e=>{const{type:n,children:r}=e;return n===Oe?ky(r):[e]}):[]}const TL=Q({props:{area:String,align:String},inheritAttrs:!1,setup({area:t,align:e},{slots:n}){return()=>{if(!n.default)return null;const[r]=ky(n.default());if(!r)return null;const i=re({style:{"--k-grid-item-area":t,"--k-grid-item-align-self":Ka(e)||"initial"}},r.props??{});return Ok(r,i)}}}),TS={key:0,class:"k-scroller__indicator"},OL=Q({__name:"Scroller",props:{is:{default:"div"},appearance:{default:"default"},treshhold:{default:80}},setup(t){const e=pu(),n=Qt({prefix:"k-scroller-"}),r=t,i=H({top:!1,right:!1,left:!1,bottom:!1}),o=I(()=>Object.entries(i.value).filter(([,a])=>a).map(([a])=>a)),s=a=>{const{scrollWidth:l,scrollHeight:u,clientWidth:c,clientHeight:d,scrollTop:h,scrollLeft:p}=a,f=l-c>=r.treshhold,m=u-d>=r.treshhold;i.value={top:m&&h<=r.treshhold,left:f&&p<=r.treshhold,bottom:m&&h>=u-d-r.treshhold,right:f&&p>=l-c-r.treshhold}};return Tn(()=>{const a=e.value;a&&(Pp(a,"scroll",()=>s(a)),nE(a,()=>s(a),{childList:!0,subtree:!0}))}),(a,l)=>(E(),z(Qe(a.is),{id:B(n),class:Se([`k-scroller k-scroller--appearance-${a.appearance}`,...o.value.map(u=>`k-scroller--scrolled-to-${u}`)])},{default:ee(()=>[a.appearance==="indicator"?(E(),O("div",TS,[L(a.$slots,"indicator",{},()=>[he(B(Ze),{icon:"fa-pro-thin:arrow-right"})])])):P("",!0),L(a.$slots,"default")]),_:3},8,["id","class"]))}});var Ti=new WeakMap,oa=new WeakMap,sa={},ec=0,wy=t=>t&&(t.host||wy(t.parentNode)),OS=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=wy(n);return r&&t.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",t,". Doing nothing"),null)}).filter(n=>!!n),AS=t=>t.localName==="next-route-announcer"||t.localName==="script"||t.hasAttribute("aria-live")?!0:t.matches("[data-live-announcer]"),MS=(t,e)=>{const{parentNode:n,markerName:r,controlAttribute:i}=e,o=OS(n,Array.isArray(t)?t:[t]);sa[r]||(sa[r]=new WeakMap);const s=sa[r],a=[],l=new Set,u=new Set(o),c=h=>{!h||l.has(h)||(l.add(h),c(h.parentNode))};o.forEach(c);const d=h=>{!h||u.has(h)||Array.prototype.forEach.call(h.children,p=>{if(l.has(p))d(p);else try{if(AS(p))return;const f=p.getAttribute(i)==="true",m=(Ti.get(p)||0)+1,g=(s.get(p)||0)+1;Ti.set(p,m),s.set(p,g),a.push(p),m===1&&f&&oa.set(p,!0),g===1&&p.setAttribute(r,""),f||p.setAttribute(i,"true")}catch(f){console.error("[zag-js > ariaHidden] cannot operate on ",p,f)}})};return d(n),l.clear(),ec++,()=>{a.forEach(h=>{const p=Ti.get(h)-1,f=s.get(h)-1;Ti.set(h,p),s.set(h,f),p||(oa.has(h)||h.removeAttribute(i),oa.delete(h)),f||h.removeAttribute(r)}),ec--,ec||(Ti=new WeakMap,Ti=new WeakMap,oa=new WeakMap,sa={})}},_S=t=>(Array.isArray(t)?t[0]:t).ownerDocument.body,DS=(t,e=_S(t),n="data-aria-hidden")=>{if(e)return MS(t,{parentNode:e,markerName:n,controlAttribute:"aria-hidden"})},IS=t=>{const e=requestAnimationFrame(()=>t());return()=>cancelAnimationFrame(e)};function NS(t,e={}){const{defer:n=!0}=e,r=n?IS:o=>o(),i=[];return i.push(r(()=>{const o=(typeof t=="function"?t():t).filter(Boolean);o.length!==0&&i.push(DS(o))})),()=>{i.forEach(o=>o?.())}}function RS(t){const e={each(n){var r;for(let i=0;i<((r=t.frames)==null?void 0:r.length);i+=1){const o=t.frames[i];o&&n(o)}},addEventListener(n,r,i){return e.each(o=>{try{o.document.addEventListener(n,r,i)}catch{}}),()=>{try{e.removeEventListener(n,r,i)}catch{}}},removeEventListener(n,r,i){e.each(o=>{try{o.document.removeEventListener(n,r,i)}catch{}})}};return e}function PS(t){const e=t.frameElement!=null?t.parent:null;return{addEventListener:(n,r,i)=>{try{e?.addEventListener(n,r,i)}catch{}return()=>{try{e?.removeEventListener(n,r,i)}catch{}}},removeEventListener:(n,r,i)=>{try{e?.removeEventListener(n,r,i)}catch{}}}}var Af="pointerdown.outside",Mf="focus.outside";function FS(t){for(const e of t)if(st(e)&&hr(e))return!0;return!1}var xy=t=>"clientY"in t;function LS(t,e){if(!xy(e)||!t)return!1;const n=t.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width}function BS(t,e){return t.y<=e.y&&e.y<=t.y+t.height&&t.x<=e.x&&e.x<=t.x+t.width}function _f(t,e){if(!e||!xy(t))return!1;const n=e.scrollHeight>e.clientHeight,r=n&&t.clientX>e.offsetLeft+e.clientWidth,i=e.scrollWidth>e.clientWidth,o=i&&t.clientY>e.offsetTop+e.clientHeight,s={x:e.offsetLeft,y:e.offsetTop,width:e.clientWidth+(n?16:0),height:e.clientHeight+(i?16:0)},a={x:t.clientX,y:t.clientY};return BS(s,a)?r||o:!1}function VS(t,e){const{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:o,defer:s}=e;if(!t)return;const a=Wt(t),l=pt(t),u=RS(l),c=PS(l);function d(y,k){if(!st(k)||!k.isConnected||Xi(t,k)||LS(t,y))return!1;const v=a.querySelector(`[aria-controls="${t.id}"]`);if(v){const x=Yc(v);if(_f(y,x))return!1}const w=Yc(t);return _f(y,w)?!1:!(n!=null&&n(k))}const h=new Set,p=cs(t?.getRootNode());function f(y){function k(v){var w;const x=s&&!tf()?Ot:T=>T(),C=v??y,M=((w=C?.composedPath)==null?void 0:w.call(C))??[C?.target];x(()=>{const T=p?M[0]:dt(y);if(!(!t||!d(y,T))){if(i||o){const A=of(i,o);t.addEventListener(Af,A,{once:!0})}Df(t,Af,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:wx(C),focusable:FS(M),target:T}})}})}y.pointerType==="touch"?(h.forEach(v=>v()),h.add(Ne(a,"click",k,{once:!0})),h.add(c.addEventListener("click",k,{once:!0})),h.add(u.addEventListener("click",k,{once:!0}))):k()}const m=new Set,g=setTimeout(()=>{m.add(Ne(a,"pointerdown",f,!0)),m.add(c.addEventListener("pointerdown",f,!0)),m.add(u.addEventListener("pointerdown",f,!0))},0);function b(y){(s?Ot:k=>k())(()=>{const k=dt(y);if(!(!t||!d(y,k))){if(r||o){const v=of(r,o);t.addEventListener(Mf,v,{once:!0})}Df(t,Mf,{bubbles:!1,cancelable:!0,detail:{originalEvent:y,contextmenu:!1,focusable:hr(k),target:k}})}})}return tf()||(m.add(Ne(a,"focusin",b,!0)),m.add(c.addEventListener("focusin",b,!0)),m.add(u.addEventListener("focusin",b,!0))),()=>{clearTimeout(g),h.forEach(y=>y()),m.forEach(y=>y())}}function $S(t,e){const{defer:n}=e,r=n?Ot:o=>o(),i=[];return i.push(r(()=>{const o=typeof t=="function"?t():t;i.push(VS(o,e))})),()=>{i.forEach(o=>o?.())}}function Df(t,e,n){const r=t.ownerDocument.defaultView||window,i=new r.CustomEvent(e,n);return t.dispatchEvent(i)}function jS(t,e){const n=r=>{r.key==="Escape"&&(r.isComposing||e==null||e(r))};return Ne(Wt(t),"keydown",n,{capture:!0})}var Kt={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(t=>t.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(t){var e;const n=this.indexOf(t),r=this.topMostPointerBlockingLayer()?this.indexOf((e=this.topMostPointerBlockingLayer())==null?void 0:e.node):-1;return n<r},isTopMost(t){const e=this.layers[this.count()-1];return e?.node===t},getNestedLayers(t){return Array.from(this.layers).slice(this.indexOf(t)+1)},isInNestedLayer(t,e){return this.getNestedLayers(t).some(n=>Xi(n.node,e))},isInBranch(t){return Array.from(this.branches).some(e=>Xi(e,t))},add(t){const e=this.layers.push(t);t.node.style.setProperty("--layer-index",`${e}`)},addBranch(t){this.branches.push(t)},remove(t){const e=this.indexOf(t);e<0||(e<this.count()-1&&this.getNestedLayers(t).forEach(n=>n.dismiss()),this.layers.splice(e,1),t.style.removeProperty("--layer-index"))},removeBranch(t){const e=this.branches.indexOf(t);e>=0&&this.branches.splice(e,1)},indexOf(t){return this.layers.findIndex(e=>e.node===t)},dismiss(t){var e;(e=this.layers[this.indexOf(t)])==null||e.dismiss()},clear(){this.remove(this.layers[0].node)}},If;function Nf(){Kt.layers.forEach(({node:t})=>{t.style.pointerEvents=Kt.isBelowPointerBlockingLayer(t)?"none":"auto"})}function zS(t){t.style.pointerEvents=""}function HS(t,e){const n=Wt(t),r=[];if(Kt.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(If=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),e){const i=Yx(e,o=>{r.push(Zc(o,{pointerEvents:"auto"}))});r.push(i)}return()=>{Kt.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=If,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(i=>i()))}}function qS(t,e){const{warnOnMissingNode:n=!0}=e;if(n&&!t){nd("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!t)return;const{onDismiss:r,pointerBlocking:i,exclude:o,debug:s}=e,a={dismiss:r,node:t,pointerBlocking:i};Kt.add(a),Nf();function l(p){var f,m;const g=dt(p.detail.originalEvent);Kt.isBelowPointerBlockingLayer(t)||Kt.isInBranch(g)||((f=e.onPointerDownOutside)==null||f.call(e,p),(m=e.onInteractOutside)==null||m.call(e,p),!p.defaultPrevented&&(s&&console.log("onPointerDownOutside:",p.detail.originalEvent),r?.()))}function u(p){var f,m;const g=dt(p.detail.originalEvent);Kt.isInBranch(g)||((f=e.onFocusOutside)==null||f.call(e,p),(m=e.onInteractOutside)==null||m.call(e,p),!p.defaultPrevented&&(s&&console.log("onFocusOutside:",p.detail.originalEvent),r?.()))}function c(p){var f;Kt.isTopMost(t)&&((f=e.onEscapeKeyDown)==null||f.call(e,p),!p.defaultPrevented&&r&&(p.preventDefault(),r()))}function d(p){var f;if(!t)return!1;const m=typeof o=="function"?o():o,g=Array.isArray(m)?m:[m],b=(f=e.persistentElements)==null?void 0:f.map(y=>y()).filter(st);return b&&g.push(...b),g.some(y=>Xi(y,p))||Kt.isInNestedLayer(t,p)}const h=[i?HS(t,e.persistentElements):void 0,jS(t,c),$S(t,{exclude:d,onFocusOutside:u,onPointerDownOutside:l,defer:e.defer})];return()=>{Kt.remove(t),Nf(),zS(t),h.forEach(p=>p?.())}}function WS(t,e){const{defer:n}=e,r=n?Ot:o=>o(),i=[];return i.push(r(()=>{const o=$i(t)?t():t;i.push(qS(o,e))})),()=>{i.forEach(o=>o?.())}}var US=Object.defineProperty,KS=(t,e,n)=>e in t?US(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Te=(t,e,n)=>KS(t,typeof e!="symbol"?e+"":e,n),Rf={activateTrap(t,e){if(t.length>0){const r=t[t.length-1];r!==e&&r.pause()}const n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap(t,e){const n=t.indexOf(e);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},GS=[],JS=class{constructor(t,e){Te(this,"trapStack"),Te(this,"config"),Te(this,"doc"),Te(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Te(this,"listenerCleanups",[]),Te(this,"handleFocus",r=>{const i=dt(r),o=this.findContainerIndex(i,r)>=0;if(o||kp(i))o&&(this.state.mostRecentlyFocusedNode=i);else{r.stopImmediatePropagation();let s,a=!0;if(this.state.mostRecentlyFocusedNode)if(Eo(this.state.mostRecentlyFocusedNode)>0){const l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:u}=this.state.containerGroups[l];if(u.length>0){const c=u.findIndex(d=>d===this.state.mostRecentlyFocusedNode);c>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?c+1<u.length&&(s=u[c+1],a=!1):c-1>=0&&(s=u[c-1],a=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(u=>Eo(u)>0))||(a=!1);else a=!1;a&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Te(this,"handlePointerDown",r=>{const i=dt(r);if(!(this.findContainerIndex(i,r)>=0)){if(So(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}So(this.config.allowOutsideClick,r)||r.preventDefault()}}),Te(this,"handleClick",r=>{const i=dt(r);this.findContainerIndex(i,r)>=0||So(this.config.clickOutsideDeactivates,r)||So(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Te(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const i=this.config.isKeyBackward(r),o=this.findNextNavNode({event:r,isBackward:i});if(!o)return;Co(r)&&r.preventDefault(),this.tryFocus(o)}}),Te(this,"handleEscapeKey",r=>{YS(r)&&So(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Te(this,"_mutationObserver"),Te(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(i=>{i.some(o=>Array.from(o.removedNodes).some(s=>s===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),Te(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(i=>{var o;(o=this._mutationObserver)==null||o.observe(i,{subtree:!0,childList:!0})})}),Te(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!hr(r))if(this.findContainerIndex(this.doc.activeElement)>=0)r=this.doc.activeElement;else{const i=this.state.tabbableGroups[0];r=i&&i.firstTabbableNode||this.getNodeForOption("fallbackFocus")}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Te(this,"tryFocus",r=>{if(r!==!1&&r!==gv(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,XS(r)&&r.select()}}),Te(this,"deactivate",r=>{if(!this.state.active)return this;const i={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...r};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Rf.deactivateTrap(this.trapStack,this);const o=this.getOption(i,"onDeactivate"),s=this.getOption(i,"onPostDeactivate"),a=this.getOption(i,"checkCanReturnFocus"),l=this.getOption(i,"returnFocus","returnFocusOnDeactivate");o?.();const u=()=>{Pf(()=>{if(l){const c=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(c)}s?.()})};if(l&&a){const c=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return a(c).then(u,u),this}return u(),this}),Te(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onPause"),o=this.getOption(r,"onPostPause");return this.state.paused=!0,i?.(),this.removeListeners(),this.updateObservedNodes(),o?.(),this}),Te(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onUnpause"),o=this.getOption(r,"onPostUnpause");return this.state.paused=!1,i?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),o?.(),this}),Te(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Te(this,"getReturnFocusNode",r=>{const i=this.getNodeForOption("setReturnFocus",{params:[r]});return i||(i===!1?!1:r)}),Te(this,"getOption",(r,i,o)=>r&&r[i]!==void 0?r[i]:this.config[o||i]),Te(this,"getNodeForOption",(r,{hasFallback:i=!1,params:o=[]}={})=>{let s=this.config[r];if(typeof s=="function"&&(s=s(...o)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let a=s;if(typeof s=="string"){try{a=this.doc.querySelector(s)}catch(l){throw new Error(`\`${r}\` appears to be an invalid selector; error="${l.message}"`)}if(!a&&!i)throw new Error(`\`${r}\` as selector refers to no known node`)}return a}),Te(this,"findNextNavNode",r=>{const{event:i,isBackward:o=!1}=r,s=r.target||dt(i);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const l=this.findContainerIndex(s,i),u=l>=0?this.state.containerGroups[l]:void 0;if(l<0)o?a=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:a=this.state.tabbableGroups[0].firstTabbableNode;else if(o){let c=this.state.tabbableGroups.findIndex(({firstTabbableNode:d})=>s===d);if(c<0&&(u?.container===s||hr(s)&&!Br(s)&&!(u!=null&&u.nextTabbableNode(s,!1)))&&(c=l),c>=0){const d=c===0?this.state.tabbableGroups.length-1:c-1,h=this.state.tabbableGroups[d];a=Eo(s)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else Co(i)||(a=u?.nextTabbableNode(s,!1))}else{let c=this.state.tabbableGroups.findIndex(({lastTabbableNode:d})=>s===d);if(c<0&&(u?.container===s||hr(s)&&!Br(s)&&!(u!=null&&u.nextTabbableNode(s)))&&(c=l),c>=0){const d=c===this.state.tabbableGroups.length-1?0:c+1,h=this.state.tabbableGroups[d];a=Eo(s)>=0?h.firstTabbableNode:h.firstDomTabbableNode}else Co(i)||(a=u?.nextTabbableNode(s))}}else a=this.getNodeForOption("fallbackFocus");return a}),this.trapStack=e.trapStack||GS;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(r){return Co(r)&&!r.shiftKey},isKeyBackward(r){return Co(r)&&r.shiftKey},...e};this.doc=n.document||Wt(Array.isArray(t)?t[0]:t),this.config=n,this.updateContainerElements(t),this.setupMutationObserver()}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,e){const n=typeof e?.composedPath=="function"?e.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(t)||n?.includes(r)||i.find(o=>o===t))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const e=xv(t),n=wv(t),r=e.length>0?e[0]:void 0,i=e.length>0?e[e.length-1]:void 0,o=n.find(u=>Br(u)),s=n.slice().reverse().find(u=>Br(u)),a=!!e.find(u=>Eo(u)>0);function l(u,c=!0){const d=e.indexOf(u);return d<0?c?n.slice(n.indexOf(u)+1).find(h=>Br(h)):n.slice(0,n.indexOf(u)).reverse().find(h=>Br(h)):e[d+(c?1:-1)]}return{container:t,tabbableNodes:e,focusableNodes:n,posTabIndexesFound:a,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return Rf.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Pf(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ne(this.doc,"focusin",this.handleFocus,!0),Ne(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ne(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ne(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ne(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ne(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const e=this.getOption(t,"onActivate"),n=this.getOption(t,"onPostActivate"),r=this.getOption(t,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=this.doc.activeElement||null,e?.();const i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Co=t=>t.key==="Tab",So=(t,...e)=>typeof t=="function"?t(...e):t,YS=t=>!t.isComposing&&t.key==="Escape",Pf=t=>setTimeout(t,0),XS=t=>t.localName==="input"&&"select"in t&&typeof t.select=="function";function ZS(t,e={}){let n;const r=Ot(()=>{const i=typeof t=="function"?t():t;if(i){n=new JS(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...e,document:Wt(i)});try{n.activate()}catch{}}});return function(){n?.deactivate(),r()}}var tc="data-scroll-lock";function QS(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function eT(t){const e=t??document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(tc))return;i.setAttribute(tc,"");const o=n.innerWidth-r.clientWidth,s=()=>Kx(r,"--scrollbar-width",`${o}px`),a=QS(r),l=()=>Zc(i,{overflow:"hidden",[a]:`${o}px`}),u=()=>{const{scrollX:d,scrollY:h,visualViewport:p}=n,f=p?.offsetLeft??0,m=p?.offsetTop??0,g=Zc(i,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(m))}px`,left:`${-(d-Math.floor(f))}px`,right:"0",[a]:`${o}px`});return()=>{g?.(),n.scrollTo({left:d,top:h,behavior:"instant"})}},c=[s(),su()?u():l()];return()=>{c.forEach(d=>d?.()),i.removeAttribute(tc)}}var tT=$n("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Rr=tT.build(),Ey=t=>{var e;return((e=t.ids)==null?void 0:e.positioner)??`dialog:${t.id}:positioner`},Cy=t=>{var e;return((e=t.ids)==null?void 0:e.backdrop)??`dialog:${t.id}:backdrop`},hd=t=>{var e;return((e=t.ids)==null?void 0:e.content)??`dialog:${t.id}:content`},Sy=t=>{var e;return((e=t.ids)==null?void 0:e.trigger)??`dialog:${t.id}:trigger`},fd=t=>{var e;return((e=t.ids)==null?void 0:e.title)??`dialog:${t.id}:title`},md=t=>{var e;return((e=t.ids)==null?void 0:e.description)??`dialog:${t.id}:description`},Ty=t=>{var e;return((e=t.ids)==null?void 0:e.closeTrigger)??`dialog:${t.id}:close`},aa=t=>t.getById(hd(t)),nT=t=>t.getById(Ey(t)),rT=t=>t.getById(Cy(t)),iT=t=>t.getById(Sy(t)),oT=t=>t.getById(fd(t)),sT=t=>t.getById(md(t)),aT=t=>t.getById(Ty(t));function lT(t,e){const{state:n,send:r,context:i,prop:o,scope:s}=t,a=o("aria-label"),l=n.matches("open");return{open:l,setOpen(u){n.matches("open")!==u&&r({type:u?"OPEN":"CLOSE"})},getTriggerProps(){return e.button({...Rr.trigger.attrs,dir:o("dir"),id:Sy(s),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":hd(s),onClick(u){u.defaultPrevented||r({type:"TOGGLE"})}})},getBackdropProps(){return e.element({...Rr.backdrop.attrs,dir:o("dir"),hidden:!l,id:Cy(s),"data-state":l?"open":"closed"})},getPositionerProps(){return e.element({...Rr.positioner.attrs,dir:o("dir"),id:Ey(s),style:{pointerEvents:l?void 0:"none"}})},getContentProps(){const u=i.get("rendered");return e.element({...Rr.content.attrs,dir:o("dir"),role:o("role"),hidden:!l,id:hd(s),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":a||void 0,"aria-labelledby":a||!u.title?void 0:fd(s),"aria-describedby":u.description?md(s):void 0})},getTitleProps(){return e.element({...Rr.title.attrs,dir:o("dir"),id:fd(s)})},getDescriptionProps(){return e.element({...Rr.description.attrs,dir:o("dir"),id:md(s)})},getCloseTriggerProps(){return e.button({...Rr.closeTrigger.attrs,dir:o("dir"),id:Ty(s),type:"button",onClick(u){u.defaultPrevented||(u.stopPropagation(),r({type:"CLOSE"}))}})}}}var uT={props({props:t,scope:e}){const n=t.role==="alertdialog";return{role:"dialog",modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:n?()=>aT(e):void 0,...t}},initialState({prop:t}){return t("open")||t("defaultOpen")?"open":"closed"},context({bindable:t}){return{rendered:t(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:t,action:e,prop:n}){t([()=>n("open")],()=>{e(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:t})=>t("open")!=null},effects:{trackDismissableElement({scope:t,send:e,prop:n}){return WS(()=>aa(t),{defer:!0,pointerBlocking:n("modal"),exclude:[iT(t)],onInteractOutside(r){var i;(i=n("onInteractOutside"))==null||i(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onEscapeKeyDown(r){var i;(i=n("onEscapeKeyDown"))==null||i(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){e({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:t,prop:e}){if(e("preventScroll"))return eT(t.getDoc())},trapFocus({scope:t,prop:e}){return!e("trapFocus")||!e("modal")?void 0:ZS(()=>aa(t),{preventScroll:!0,returnFocusOnDeactivate:!!e("restoreFocus"),initialFocus:e("initialFocusEl"),setReturnFocus:n=>{var r;return((r=e("finalFocusEl"))==null?void 0:r())??n}})},hideContentBelow({scope:t,prop:e}){return e("modal")?NS(()=>[aa(t)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:t,scope:e}){Ot(()=>{t.set("rendered",{title:!!oT(e),description:!!sT(e)})})},syncZIndex({scope:t}){Ot(()=>{const e=aa(t);if(!e)return;const n=lx(e);[nT(t),rT(t)].forEach(r=>{r?.style.setProperty("--z-index",n.zIndex)})})},invokeOnClose({prop:t}){var e;(e=t("onOpenChange"))==null||e({open:!1})},invokeOnOpen({prop:t}){var e;(e=t("onOpenChange"))==null||e({open:!0})},toggleVisibility({prop:t,send:e,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};Kn()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const cT=["data-id"],dT=["data-id"],pT=["data-id"],hT=Q({__name:"Dialog",props:{title:{},subtitle:{},role:{default:"dialog"},closeOnEsc:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0},alignment:{default:"top"},triggerLabel:{},showCloseTrigger:{type:Boolean,default:!0},dialogId:{},teleport:{type:Boolean,default:!0},disabled:{type:Boolean},variant:{},thumbnail:{},thumbnailOptions:{}},emits:["open","close","clickoutside"],setup(t,{expose:e,emit:n}){const r=t,i=n,o=pu(),s=mi(uT,{id:Qt({prefix:"dialog"}),closeOnEscape:r.closeOnEsc,modal:!0,closeOnInteractOutside:!1,onOpenChange({open:u}){i(u?"open":"close")},onInteractOutside(u){if(!r.closeOnOutsideClick)return u.preventDefault()},onPointerDownOutside(){i("clickoutside"),r.closeOnOutsideClick&&a.value.setOpen(!1)},getRootNode:()=>{var u;return r.teleport?document:(u=o.value)==null?void 0:u.getRootNode()},...r}),a=I(()=>lT(s,fi)),l=u=>r.dialogId?`${r.dialogId}-${u}`:"";return e({open:()=>{a.value.setOpen(!0)},close:()=>{a.value.setOpen(!1)}}),(u,c)=>(E(),O("div",{class:"k-dialog","data-id":u.dialogId},[L(u.$slots,"trigger",{triggerProps:a.value.getTriggerProps()},()=>[u.triggerLabel?(E(),z(He,re({key:0,class:"k-dialog__trigger",variant:"secondary"},a.value.getTriggerProps(),{disabled:u.disabled}),{default:ee(()=>[Be(oe(u.triggerLabel),1)]),_:1},16,["disabled"])):P("",!0)]),(E(),z(Kg,{to:"body",disabled:!u.teleport},[a.value.open?(E(),O(Oe,{key:0},[U("div",re({class:"k-dialog__backdrop"},a.value.getBackdropProps(),{"data-id":l("backdrop")}),null,16,dT),U("div",re({class:`k-dialog__container k-dialog--align-${u.alignment}`},a.value.getPositionerProps(),{"data-id":l("container")}),[he(WE,re({class:"k-dialog__card",variant:u.variant,appearance:"shadow"},a.value.getContentProps(),{"data-id":l("dialog"),thumbnail:u.thumbnail,thumbnailOptions:u.thumbnailOptions}),Ms({_:2},[u.$slots.header||u.$slots.title||u.$slots.subtitle||u.title||u.subtitle||u.showCloseTrigger?{name:"header",fn:ee(()=>[L(u.$slots,"header",{titleProps:a.value.getTitleProps(),descriptionProps:a.value.getDescriptionProps(),closeTriggerProps:a.value.getCloseTriggerProps()},()=>[L(u.$slots,"title",{titleProps:a.value.getTitleProps()},()=>[u.title?(E(),O("div",re({key:0,class:"k-dialog__title k-card__title"},a.value.getTitleProps()),oe(u.title),17)):P("",!0)]),L(u.$slots,"subtitle",{descriptionProps:a.value.getDescriptionProps()},()=>[u.subtitle?(E(),O("div",re({key:0,class:"k-dialog__subtitle k-card__subtitle"},a.value.getDescriptionProps()),oe(u.subtitle),17)):P("",!0)]),u.showCloseTrigger?(E(),z(He,re({key:0,class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},a.value.getCloseTriggerProps()),null,16)):P("",!0)])]),key:"0"}:void 0,u.$slots.default?{name:"default",fn:ee(()=>[L(u.$slots,"default",{descriptionProps:a.value.getDescriptionProps()})]),key:"1"}:void 0,u.$slots.actions?{name:"actions",fn:ee(()=>[L(u.$slots,"actions",{close:()=>a.value.setOpen(!1)})]),key:"2"}:void 0]),1040,["variant","data-id","thumbnail","thumbnailOptions"])],16,pT)],64)):P("",!0)],8,["disabled"]))],8,cT))}});function Eu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Cu(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Cu.prototype.define=function(t,e){for(let n in t){let r=t[n].map(function(i){return i.toLowerCase()});n=n.toLowerCase();for(let i=0;i<r.length;i++){const o=r[i];if(o[0]!=="*"){if(!e&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}}if(e||!this._extensions[n]){const i=r[0];this._extensions[n]=i[0]!=="*"?i:i.substr(1)}}};Cu.prototype.getType=function(t){t=String(t);let e=t.replace(/^.*[/\\]/,"").toLowerCase(),n=e.replace(/^.*\./,"").toLowerCase(),r=e.length<t.length;return(n.length<e.length-1||!r)&&this._types[n]||null};Cu.prototype.getExtension=function(t){return t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1,t&&this._extensions[t.toLowerCase()]||null};var fT=Cu,mT={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let gT=fT;var vT=new gT(mT);const rl=Eu(vT);function Wp(t){let e=["Bytes","KB","MB","GB","TB"];if(t==0)return"0 Byte";let n=Math.floor(Math.log(t)/Math.log(1024));return n>e.length&&(n=e.length),Math.round(t/Math.pow(1024,n))+" "+e[n]}function Ff(t){return JSON.parse(JSON.stringify(t))}function Up(t,e,n={fromDirectory:!1}){var r;const{fromDirectory:i}=n,o=Array.isArray(e)?e:e?.split(","),s=((r=("name"in t?t.name:"").split(".").pop())==null?void 0:r.toLowerCase())||"",a="type"in t?t.type:"";return o!=null&&o.includes("directory")&&(i||!t.type)?!0:!t.type&&!e?!1:e?o.map(l=>l.trim()).some(l=>{if(l.startsWith(".")){const u=l.slice(1),c=rl.getType(u),d=rl.getType(s);return c&&a?c===a:!!(!a&&c&&d&&c===d||!c&&!a&&s===u)}return l.includes("*")?a.startsWith(l.replace("*","")):a===l}):!0}const Lf={counter:0,total:0,progress:0,bytes:0,result:[]};class Oy{constructor(e){Jt(this,"queue"),Jt(this,"upload"),Jt(this,"uploadOptions"),Jt(this,"accept"),this.queue=fp(Ff(Lf)),this.upload=e.upload,this.uploadOptions=e.uploadOptions,this.accept=e.accept,this.reset=this.reset.bind(this),this.run=this.run.bind(this)}reset(){this.queue=Object.assign(this.queue,Ff(Lf))}async run(e){e=Array.from(e).filter(o=>Up(o,this.accept,this.uploadOptions)),this.queue.total=e.length,this.queue.counter=0,this.queue.bytes=e.reduce((o,s)=>o+=s?.size||0,0);let n=e.map(()=>0);const r=await Promise.all(e.map((o,s)=>this.upload(o,a=>{n[s]=a,this.queue.progress=n.reduce((l,u)=>l+=u,0)/n.length},this.uploadOptions).then(a=>(this.queue.counter++,a))));if(!r||!r.length)return;let i=r.flat();return this.reset(),i}}const Bf={"image/*":["jpeg","png","gif"]};function yT(t){return t?(Array.isArray(t)?t:t.split(",")).map(e=>e.trim()).map(e=>e.startsWith(".")?e.substring(1):e in Bf?Bf[e]:rl.getExtension(e)).flat():[]}function gd(t){let e=(n,r)=>{const i=document.createElement("a");i.href=n,i.setAttribute("style","display: none"),r&&(i.target=r),t.name&&(i.download=t.name.includes(".")?t.name:[t.name,rl.getExtension(t.type)].join(".")),document.body.appendChild(i),i.click(),document.body.removeChild(i)};return fetch(t.url,{headers:{"Cache-Control":"no-cache"}}).then(n=>n.blob()).then(n=>{const r=URL.createObjectURL(n);return e(r)}).catch(n=>e(t.url,"_blank"))}const bT={class:"k-media-thumbnail-actions"},Ay=Q({__name:"ThumbnailActions",props:{value:{},disabled:{type:Boolean}},emits:["delete"],setup(t,{emit:e}){const n=t,r=I(()=>n.value.type.startsWith("image/")?{component:"button",bind:{onClick:()=>{gd(n.value)}}}:{component:"a",bind:{href:n.value.url,download:n.value.name,target:"_blank"}});return(i,o)=>(E(),O("div",bT,[i.disabled?P("",!0):(E(),z(He,{key:0,class:"k-media-thumbnail-actions__delete",icon:"fa-pro-solid:trash",variant:"danger",onClick:o[0]||(o[0]=Wa(s=>i.$emit("delete"),["stop"]))})),he(He,re({variant:"primary",is:r.value.component,class:"k-media-thumbnail-actions__download"},r.value.bind,{icon:"fa-pro-solid:arrow-alt-circle-down"}),null,16,["is"])]))}}),kT=Q({__name:"Thumbnail",props:{value:{},size:{default:"4rem"},disabled:{type:Boolean}},setup(t){const e=t,n=cp(),r=I(()=>n["data-draggable"]),i=I(()=>{let s={};for(const a in n){if(a==="data-draggable")return;s[a]=n[a]}return s}),o=I(()=>({width:e.size,height:e.size}));return(s,a)=>(E(),O("div",re({class:"k-media-thumbnail"},r.value,{class:{"k-media-thumbnail--selected":s.value.selected}}),[(E(),z(Qe(s.value.typeConfig.components.Thumbnail),re({class:[{"k-media-thumbnail__item--selected":s.value.selected},"k-media-thumbnail__item"],value:s.value},i.value,{style:o.value}),null,16,["class","value","style"])),he(Ay,{value:s.value,disabled:s.disabled,onDelete:a[0]||(a[0]=l=>s.$emit("delete",s.value))},null,8,["value","disabled"])],16))}}),wT={key:0,class:"k-media-type-selector"},xT={class:"k-media-type-selector__info"},ET=Q({__name:"TypeSelector",props:{value:{},upload:{type:Function},labels:{}},emits:["add","cancel","success","openFileWindow"],setup(t,{emit:e}){const n=t,r=e,i=H(null),o=H(),s=H(!0),a=H(!1),l=H(),u=H();xe(a,g=>{var b,y;return g?(b=l.value)==null?void 0:b.open():(y=l.value)==null?void 0:y.close()},{immediate:!0});const c=I(()=>n.value.length===1&&n.value[0].name==="Image");function d(){s.value&&(o.value=u.value.prepareData().then(g=>{r("add",g)}))}function h(g){if(g.name==="Image")return r("openFileWindow");a.value=!0,i.value=g}function p(){a.value=!1,r("cancel")}function f(){a.value=!1,r("success")}function m(g){const b=n.labels[g];return!b||typeof b=="string"?g:b.createLabel||g}return(g,b)=>c.value?P("",!0):(E(),O("div",wT,[U("span",xT,oe(g.labels.selectMessage),1),he(wu,{teleport:!0,label:g.labels.select,iconRight:"fa6-solid:plus",theme:"shadow",placement:"bottom-end"},{default:ee(()=>[(E(!0),O(Oe,null,Mt(g.value,y=>(E(),z(Qe(y.components.CreateTrigger),{key:y.name,label:m(y.name.toLowerCase()),onClick:k=>h(y)},null,8,["label","onClick"]))),128))]),_:1},8,["label"]),he(hT,{dialogId:"k-media-type-selector",ref_key:"dialog",ref:l,title:"",teleport:!0,"close-on-outside-click":!1,"show-close-trigger":!1,"close-on-esc":!0,onClose:p},{default:ee(()=>[i.value?(E(),z(Qe(i.value.components.Create),re({key:0,isValid:s.value,"onUpdate:isValid":b[0]||(b[0]=y=>s.value=y),upload:g.upload,labels:g.labels,name:i.value.name,ref_key:"creator",ref:u},g.$attrs),null,16,["isValid","upload","labels","name"])):P("",!0)]),footer:ee(()=>[he(He,{label:g.labels.cancel,type:"button",onClick:p},null,8,["label"]),he(He,{variant:"primary",disabled:!s.value,promise:o.value,label:g.labels.save,stateTimeout:1e3,onClick:d,onSuccess:f},null,8,["disabled","promise","label"])]),_:1},512)]))}}),CT=Q({__name:"Description",props:{modelValue:{},placeholder:{}},emits:["update:modelValue"],setup(t,{emit:e}){return(n,r)=>(E(),z(TE,{class:"k-media-description",type:"text",placeholder:n.placeholder,modelValue:n.modelValue||"","onUpdate:modelValue":r[0]||(r[0]=i=>n.$emit("update:modelValue",i))},null,8,["placeholder","modelValue"]))}}),ST={class:"k-media-uploader"},TT={class:"k-media-uploader__bar"},OT={class:"k-media-uploader__meta"},AT={key:0},MT={key:1},_T=Q({__name:"Uploader",props:{value:{},bytes:{},current:{default:1},total:{default:1}},setup(t){const e=t,n=I(()=>e.total>1),r=I(()=>Wp(e.bytes)),i=I(()=>Math.floor(e.value));return(o,s)=>(E(),O("div",ST,[U("div",null,oe(i.value)+" %",1),U("div",TT,[U("div",{class:"k-media-uploader__bar-value",style:kn({width:o.value+"%"})},null,4)]),U("div",OT,[n.value?(E(),O("div",AT,oe(o.current)+" / "+oe(o.total),1)):P("",!0),o.bytes?(E(),O("div",MT,"("+oe(r.value)+")",1)):P("",!0)])]))}}),DT=["innerHTML"],IT=Q({__name:"SlotHandler",props:{value:{}},setup(t){const e=t,n=I(()=>typeof e.value=="string"?e.value:void 0),r=I(()=>typeof e.value=="string"?"div":e.value);return(i,o)=>(E(),z(Qe(r.value),be(Re(i.$attrs)),{default:ee(()=>[n.value?(E(),O("span",{key:0,innerHTML:n.value},null,8,DT)):P("",!0)]),_:1},16))}}),NT={class:"k-media-droparea__instruction"},RT=["type","accept","required","disabled","multiple"],PT=Q({__name:"DropArea",props:{value:{},multiple:{type:Boolean},upload:{},uploadOptions:{},type:{},accept:{},selected:{default:null},dropMessage:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["input","select","remove"],setup(t,{emit:e}){const n=t,r=e,i=H(!1),o=H(!0),s=H(),a=I(()=>!!(!n.required||n.value)),l=I(()=>n.disabled),u=I(()=>!l.value&&!d.total),{run:c,queue:d}=new Oy(n);function h(k){return c(k).then(v=>{!v||!v.length||(r("input",n.multiple?[...n.value||[],...v]:v[0]),(!n.selected||!n.multiple)&&xr(()=>r("select")))})}function p(k){l.value||(h(k.target.files||[]),s.value&&(s.value.value=""))}function f(k){var v;if(l.value||!s.value)return;if(k.preventDefault(),!o.value)return g();g();const w=(v=k.dataTransfer)==null?void 0:v.files;w!=null&&w.length&&(s.value.files=w,s.value.dispatchEvent(new InputEvent("input")),h(w))}function m(k){l.value||k.dataTransfer&&(o.value=Array.from(k.dataTransfer.items).every(v=>Up(v,n.accept))&&n.multiple?!0:k.dataTransfer.items.length===1,i.value=!0,k.preventDefault())}function g(){o.value=!0,i.value=!1}const b=rn("k-media-droparea",{variants:{active:{true:"k-media-droparea--active"},invalid:{true:"k-media-droparea--invalid"},selected:{true:"k-media-droparea--selected"},disabled:{true:"k-media-droparea--disabled"}}}),y=()=>{var k;return(k=s.value)==null?void 0:k.click()};return(k,v)=>(E(),O(Oe,null,[U("div",{class:Se(B(b)({active:i.value,invalid:!o.value,selected:!!k.selected,disabled:l.value})),onDrop:f,onDragover:m,onDragleave:g},[L(k.$slots,"preview"),U("div",NT,[u.value?(E(),O("input",{key:0,type:k.type,accept:Array.isArray(k.accept)?k.accept.join(","):k.accept,required:a.value,ref_key:"input",ref:s,onChange:p,disabled:!u.value,multiple:k.multiple,class:"k-media-droparea__input"},null,40,RT)):P("",!0),o.value?(E(),O(Oe,{key:1},[L(k.$slots,"drop-message",{},()=>[he(IT,{value:k.dropMessage},null,8,["value"])]),L(k.$slots,"default",{openFileWindow:y})],64)):(E(),z(B(Ze),{key:2,icon:"fa-pro-light:ban",style:{"font-size":"2rem"}})),L(k.$slots,"custom-message")]),!k.multiple&&k.selected?(E(),z(Ay,{key:0,value:k.selected,disabled:l.value,onDelete:v[0]||(v[0]=w=>k.$emit("remove",k.selected))},null,8,["value","disabled"])):P("",!0)],34),B(d).total?(E(),z(_T,{key:0,value:B(d).progress,bytes:B(d).bytes,current:B(d).counter,total:B(d).total},null,8,["value","bytes","current","total"])):P("",!0)],64))}}),FT=Q({__name:"CreateTrigger",props:{label:{}},setup(t){return(e,n)=>(E(),z(He,{type:"button",label:e.label,iconRight:"fa6-solid:image",size:"small",variant:"tertiary"},null,8,["label"]))}}),LT=Q({__name:"Thumbnail",props:{value:{}},setup(t){const e=t;return(n,r)=>(E(),z(vu,{class:"k-media-image__thumbnail",src:e.value.url,onClick:r[0]||(r[0]=i=>n.$emit("click"))},null,8,["src"]))}}),BT=Q({__name:"Preview",props:{value:{},size:{}},setup(t){const e=t;return(n,r)=>(E(),z(vu,{src:e.value.url,class:"k-media-image-preview",size:n.size,width:"100%",height:"100%"},null,8,["src","size"]))}}),VT={name:"Image",condition:t=>/^image\/.+/i.test(t.type),components:{CreateTrigger:Ta(FT),Thumbnail:Ta(LT),Preview:Ta(BT)}},$T={Image:VT};/**!
4
4
  * Sortable 1.14.0
5
5
  * @author RubaXa <trash@rubaxa.org>
6
6
  * @author owenm <owen23355@gmail.com>
7
7
  * @license MIT
8
- */function Vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vf(Object(n),!0).forEach(function(r){jT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Na(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Na=function(e){return typeof e}:Na=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Na(t)}function jT(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qn(){return qn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qn.apply(this,arguments)}function zT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function HT(t,e){if(t==null)return{};var n=zT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var qT="1.14.0";function jn(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Gn=jn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ps=jn(/Edge/i),$f=jn(/firefox/i),zo=jn(/safari/i)&&!jn(/chrome/i)&&!jn(/android/i),My=jn(/iP(ad|od|hone)/i),WT=jn(/chrome/i)&&jn(/android/i),_y={capture:!1,passive:!1};function ve(t,e,n){t.addEventListener(e,n,!Gn&&_y)}function ge(t,e,n){t.removeEventListener(e,n,!Gn&&_y)}function il(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function UT(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function hn(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&il(t,e):il(t,e))||r&&t===n)return t;if(t===n)break}while(t=UT(t))}return null}var jf=/\s+/g;function xt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(jf," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(jf," ")}}function te(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function Ui(t,e){var n="";if(typeof t=="string")n=t;else do{var r=te(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Dy(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function yn(){var t=document.scrollingElement;return t||document.documentElement}function je(t,e,n,r,i){if(!(!t.getBoundingClientRect&&t!==window)){var o,s,a,l,u,c,d;if(t!==window&&t.parentNode&&t!==yn()?(o=t.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,u=o.right,c=o.height,d=o.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Gn))do if(i&&i.getBoundingClientRect&&(te(i,"transform")!=="none"||n&&te(i,"position")!=="static")){var h=i.getBoundingClientRect();s-=h.top+parseInt(te(i,"border-top-width")),a-=h.left+parseInt(te(i,"border-left-width")),l=s+o.height,u=a+o.width;break}while(i=i.parentNode);if(r&&t!==window){var p=Ui(i||t),f=p&&p.a,m=p&&p.d;p&&(s/=m,a/=f,d/=f,c/=m,l=s+c,u=a+d)}return{top:s,left:a,bottom:l,right:u,width:d,height:c}}}function zf(t,e,n){for(var r=lr(t,!0),i=je(t)[e];r;){var o=je(r)[n],s=void 0;if(s=i>=o,!s)return r;if(r===yn())break;r=lr(r,!1)}return!1}function eo(t,e,n,r){for(var i=0,o=0,s=t.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==ne.ghost&&(r||s[o]!==ne.dragged)&&hn(s[o],n.draggable,t,!1)){if(i===e)return s[o];i++}o++}return null}function Kp(t,e){for(var n=t.lastElementChild;n&&(n===ne.ghost||te(n,"display")==="none"||e&&!il(n,e));)n=n.previousElementSibling;return n||null}function Ft(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==ne.clone&&(!e||il(t,e))&&n++;return n}function Hf(t){var e=0,n=0,r=yn();if(t)do{var i=Ui(t),o=i.a,s=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*s}while(t!==r&&(t=t.parentNode));return[e,n]}function KT(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function lr(t,e){if(!t||!t.getBoundingClientRect)return yn();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=te(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return yn();if(r||e)return n;r=!0}}while(n=n.parentNode);return yn()}function GT(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function nc(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Ho;function Iy(t,e){return function(){if(!Ho){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),Ho=setTimeout(function(){Ho=void 0},e)}}}function JT(){clearTimeout(Ho),Ho=void 0}function Ny(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Ry(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var St="Sortable"+new Date().getTime();function YT(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(te(r,"display")==="none"||r===ne.ghost)){t.push({target:r,rect:je(r)});var i=xn({},t[t.length-1].rect);if(r.thisAnimationDuration){var o=Ui(r,!0);o&&(i.top-=o.f,i.left-=o.e)}r.fromRect=i}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(KT(t,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var i=!1,o=0;t.forEach(function(s){var a=0,l=s.target,u=l.fromRect,c=je(l),d=l.prevFromRect,h=l.prevToRect,p=s.rect,f=Ui(l,!0);f&&(c.top-=f.f,c.left-=f.e),l.toRect=c,l.thisAnimationDuration&&nc(d,c)&&!nc(u,c)&&(p.top-c.top)/(p.left-c.left)===(u.top-c.top)/(u.left-c.left)&&(a=ZT(p,d,h,r.options)),nc(c,u)||(l.prevFromRect=u,l.prevToRect=c,a||(a=r.options.animation),r.animate(l,p,c,a)),a&&(i=!0,o=Math.max(o,a),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},a),l.thisAnimationDuration=a)}),clearTimeout(e),i?e=setTimeout(function(){typeof n=="function"&&n()},o):typeof n=="function"&&n(),t=[]},animate:function(n,r,i,o){if(o){te(n,"transition",""),te(n,"transform","");var s=Ui(this.el),a=s&&s.a,l=s&&s.d,u=(r.left-i.left)/(a||1),c=(r.top-i.top)/(l||1);n.animatingX=!!u,n.animatingY=!!c,te(n,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=XT(n),te(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),te(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){te(n,"transition",""),te(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},o)}}}}function XT(t){return t.offsetWidth}function ZT(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var Oi=[],rc={initializeByDefault:!0},Fs={mount:function(t){for(var e in rc)rc.hasOwnProperty(e)&&!(e in t)&&(t[e]=rc[e]);Oi.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Oi.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Oi.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](xn({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](xn({sortable:e},n)))})},initializePlugins:function(t,e,n,r){Oi.forEach(function(s){var a=s.pluginName;if(!(!t.options[a]&&!s.initializeByDefault)){var l=new s(t,e,t.options);l.sortable=t,l.options=t.options,t[a]=l,qn(n,l.defaults)}});for(var i in t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);typeof o<"u"&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Oi.forEach(function(r){typeof r.eventProperties=="function"&&qn(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return Oi.forEach(function(i){t[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[e]=="function"&&(r=i.optionListeners[e].call(t[i.pluginName],n))}),r}};function QT(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[St],!!e){var m,g=e.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Gn&&!Ps?m=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(r,!0,!0)),m.to=s||n,m.from=a||n,m.item=i||n,m.clone=o,m.oldIndex=l,m.newIndex=u,m.oldDraggableIndex=c,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=p?p.lastPutMode:void 0;var y=xn(xn({},f),Fs.getEventProperties(r,e));for(var k in y)m[k]=y[k];n&&n.dispatchEvent(m),g[b]&&g[b].call(e,m)}}var eO=["evt"],gt=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=HT(n,eO);Fs.pluginEvent.bind(ne)(t,e,xn({dragEl:F,parentEl:Me,ghostEl:le,rootEl:Ce,nextEl:Vr,lastDownEl:Ra,cloneEl:_e,cloneHidden:or,dragStarted:No,putSortable:Ge,activeSortable:ne.active,originalEvent:r,oldIndex:ji,oldDraggableIndex:qo,newIndex:Et,newDraggableIndex:tr,hideGhostForTarget:By,unhideGhostForTarget:Vy,cloneNowHidden:function(){or=!0},cloneNowShown:function(){or=!1},dispatchSortableEvent:function(o){ct({sortable:e,name:o,originalEvent:r})}},i))};function ct(t){QT(xn({putSortable:Ge,cloneEl:_e,targetEl:F,rootEl:Ce,oldIndex:ji,oldDraggableIndex:qo,newIndex:Et,newDraggableIndex:tr},t))}var F,Me,le,Ce,Vr,Ra,_e,or,ji,Et,qo,tr,la,Ge,Ni=!1,ol=!1,sl=[],Pr,Ut,ic,oc,qf,Wf,No,Ai,Wo,Uo=!1,ua=!1,Pa,tt,sc=[],vd=!1,al=[],Su=typeof document<"u",ca=My,Uf=Ps||Gn?"cssFloat":"float",tO=Su&&!WT&&!My&&"draggable"in document.createElement("div"),Py=function(){if(Su){if(Gn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Fy=function(t,e){var n=te(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=eo(t,0,e),o=eo(t,1,e),s=i&&te(i),a=o&&te(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+je(i).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+je(o).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&s.float!=="none"){var c=s.float==="left"?"left":"right";return o&&(a.clear==="both"||a.clear===c)?"vertical":"horizontal"}return i&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||l>=r&&n[Uf]==="none"||o&&n[Uf]==="none"&&l+u>r)?"vertical":"horizontal"},nO=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return r===s||i===a||r+o/2===s+l/2},rO=function(t,e){var n;return sl.some(function(r){var i=r[St].options.emptyInsertThreshold;if(!(!i||Kp(r))){var o=je(r),s=t>=o.left-i&&t<=o.right+i,a=e>=o.top-i&&e<=o.bottom+i;if(s&&a)return n=r}}),n},Ly=function(t){function e(i,o){return function(s,a,l,u){var c=s.options.group.name&&a.options.group.name&&s.options.group.name===a.options.group.name;if(i==null&&(o||c))return!0;if(i==null||i===!1)return!1;if(o&&i==="clone")return i;if(typeof i=="function")return e(i(s,a,l,u),o)(s,a,l,u);var d=(o?s:a).options.group.name;return i===!0||typeof i=="string"&&i===d||i.join&&i.indexOf(d)>-1}}var n={},r=t.group;(!r||Na(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},By=function(){!Py&&le&&te(le,"display","none")},Vy=function(){!Py&&le&&te(le,"display","")};Su&&document.addEventListener("click",function(t){if(ol)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ol=!1,!1},!0);var Fr=function(t){if(F){t=t.touches?t.touches[0]:t;var e=rO(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[St]._onDragOver(n)}}},iO=function(t){F&&F.parentNode[St]._isOutsideThisEl(t.target)};function ne(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=qn({},e),t[St]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fy(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,s){o.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ne.supportPointer!==!1&&"PointerEvent"in window&&!zo,emptyInsertThreshold:5};Fs.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);Ly(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:tO,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ve(t,"pointerdown",this._onTapStart):(ve(t,"mousedown",this._onTapStart),ve(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ve(t,"dragover",this),ve(t,"dragenter",this)),sl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),qn(this,YT())}ne.prototype={constructor:ne,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ai=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,F):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=r.filter;if(pO(n),!F&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||r.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&zo&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=hn(a,r.draggable,n,!1),!(a&&a.animated)&&Ra!==a)){if(ji=Ft(a),qo=Ft(a,r.draggable),typeof u=="function"){if(u.call(this,t,a,this)){ct({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),gt("filter",e,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=hn(l,c.trim(),n,!1),c)return ct({sortable:e,rootEl:c,name:"filter",targetEl:a,fromEl:n,toEl:n}),gt("filter",e,{evt:t}),!0}),u)){i&&t.cancelable&&t.preventDefault();return}r.handle&&!hn(l,r.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var r=this,i=r.el,o=r.options,s=i.ownerDocument,a;if(n&&!F&&n.parentNode===i){var l=je(n);if(Ce=i,F=n,Me=F.parentNode,Vr=F.nextSibling,Ra=n,la=o.group,ne.dragged=F,Pr={target:F,clientX:(e||t).clientX,clientY:(e||t).clientY},qf=Pr.clientX-l.left,Wf=Pr.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,F.style["will-change"]="all",a=function(){if(gt("delayEnded",r,{evt:t}),ne.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!$f&&r.nativeDraggable&&(F.draggable=!0),r._triggerDragStart(t,e),ct({sortable:r,name:"choose",originalEvent:t}),xt(F,o.chosenClass,!0)},o.ignore.split(",").forEach(function(u){Dy(F,u.trim(),ac)}),ve(s,"dragover",Fr),ve(s,"mousemove",Fr),ve(s,"touchmove",Fr),ve(s,"mouseup",r._onDrop),ve(s,"touchend",r._onDrop),ve(s,"touchcancel",r._onDrop),$f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,F.draggable=!0),gt("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ps||Gn))){if(ne.eventCanceled){this._onDrop();return}ve(s,"mouseup",r._disableDelayedDrag),ve(s,"touchend",r._disableDelayedDrag),ve(s,"touchcancel",r._disableDelayedDrag),ve(s,"mousemove",r._delayedDragTouchMoveHandler),ve(s,"touchmove",r._delayedDragTouchMoveHandler),o.supportPointer&&ve(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(a,o.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){F&&ac(F),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ge(t,"mouseup",this._disableDelayedDrag),ge(t,"touchend",this._disableDelayedDrag),ge(t,"touchcancel",this._disableDelayedDrag),ge(t,"mousemove",this._delayedDragTouchMoveHandler),ge(t,"touchmove",this._delayedDragTouchMoveHandler),ge(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?ve(document,"pointermove",this._onTouchMove):e?ve(document,"touchmove",this._onTouchMove):ve(document,"mousemove",this._onTouchMove):(ve(F,"dragend",this),ve(Ce,"dragstart",this._onDragStart));try{document.selection?Fa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Ni=!1,Ce&&F){gt("dragStarted",this,{evt:e}),this.nativeDraggable&&ve(document,"dragover",iO);var n=this.options;!t&&xt(F,n.dragClass,!1),xt(F,n.ghostClass,!0),ne.active=this,t&&this._appendGhost(),ct({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ut){this._lastX=Ut.clientX,this._lastY=Ut.clientY,By();for(var t=document.elementFromPoint(Ut.clientX,Ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ut.clientX,Ut.clientY),t!==e);)e=t;if(F.parentNode[St]._isOutsideThisEl(t),e)do{if(e[St]){var n=void 0;if(n=e[St]._onDragOver({clientX:Ut.clientX,clientY:Ut.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Vy()}},_onTouchMove:function(t){if(Pr){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=le&&Ui(le,!0),s=le&&o&&o.a,a=le&&o&&o.d,l=ca&&tt&&Hf(tt),u=(i.clientX-Pr.clientX+r.x)/(s||1)+(l?l[0]-sc[0]:0)/(s||1),c=(i.clientY-Pr.clientY+r.y)/(a||1)+(l?l[1]-sc[1]:0)/(a||1);if(!ne.active&&!Ni){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(le){o?(o.e+=u-(ic||0),o.f+=c-(oc||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");te(le,"webkitTransform",d),te(le,"mozTransform",d),te(le,"msTransform",d),te(le,"transform",d),ic=u,oc=c,Ut=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!le){var t=this.options.fallbackOnBody?document.body:Ce,e=je(F,!0,ca,!0,t),n=this.options;if(ca){for(tt=t;te(tt,"position")==="static"&&te(tt,"transform")==="none"&&tt!==document;)tt=tt.parentNode;tt!==document.body&&tt!==document.documentElement?(tt===document&&(tt=yn()),e.top+=tt.scrollTop,e.left+=tt.scrollLeft):tt=yn(),sc=Hf(tt)}le=F.cloneNode(!0),xt(le,n.ghostClass,!1),xt(le,n.fallbackClass,!0),xt(le,n.dragClass,!0),te(le,"transition",""),te(le,"transform",""),te(le,"box-sizing","border-box"),te(le,"margin",0),te(le,"top",e.top),te(le,"left",e.left),te(le,"width",e.width),te(le,"height",e.height),te(le,"opacity","0.8"),te(le,"position",ca?"absolute":"fixed"),te(le,"zIndex","100000"),te(le,"pointerEvents","none"),ne.ghost=le,t.appendChild(le),te(le,"transform-origin",qf/parseInt(le.style.width)*100+"% "+Wf/parseInt(le.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;if(gt("dragStart",this,{evt:t}),ne.eventCanceled){this._onDrop();return}gt("setupClone",this),ne.eventCanceled||(_e=Ry(F),_e.draggable=!1,_e.style["will-change"]="",this._hideClone(),xt(_e,this.options.chosenClass,!1),ne.clone=_e),n.cloneId=Fa(function(){gt("clone",n),!ne.eventCanceled&&(n.options.removeCloneOnHide||Ce.insertBefore(_e,F),n._hideClone(),ct({sortable:n,name:"clone"}))}),!e&&xt(F,i.dragClass,!0),e?(ol=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ge(document,"mouseup",n._onDrop),ge(document,"touchend",n._onDrop),ge(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,F)),ve(document,"drop",n),te(F,"transform","translateZ(0)")),Ni=!0,n._dragStartId=Fa(n._dragStarted.bind(n,e,t)),ve(document,"selectstart",n),No=!0,zo&&te(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,r,i,o,s=this.options,a=s.group,l=ne.active,u=la===a,c=s.sort,d=Ge||l,h,p=this,f=!1;if(vd)return;function m(X,fe){gt(X,p,xn({evt:t,isOwner:u,axis:h?"vertical":"horizontal",revert:o,dragRect:r,targetRect:i,canSort:c,fromSortable:d,target:n,completed:b,onMove:function(Ee,Ie){return da(Ce,e,F,r,Ee,je(Ee),t,Ie)},changed:y},fe))}function g(){m("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function b(X){return m("dragOverCompleted",{insertion:X}),X&&(u?l._hideClone():l._showClone(p),p!==d&&(xt(F,Ge?Ge.options.ghostClass:l.options.ghostClass,!1),xt(F,s.ghostClass,!0)),Ge!==p&&p!==ne.active?Ge=p:p===ne.active&&Ge&&(Ge=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){m("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===F&&!F.animated||n===e&&!n.animated)&&(Ai=null),!s.dragoverBubble&&!t.rootEl&&n!==document&&(F.parentNode[St]._isOutsideThisEl(t.target),!X&&Fr(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function y(){Et=Ft(F),tr=Ft(F,s.draggable),ct({sortable:p,name:"change",toEl:e,newIndex:Et,newDraggableIndex:tr,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=hn(n,s.draggable,e,!0),m("dragOver"),ne.eventCanceled)return f;if(F.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return b(!1);if(ol=!1,l&&!s.disabled&&(u?c||(o=Me!==Ce):Ge===this||(this.lastPutMode=la.checkPull(this,l,F,t))&&a.checkPut(this,l,F,t))){if(h=this._getDirection(t,n)==="vertical",r=je(F),m("dragOverValid"),ne.eventCanceled)return f;if(o)return Me=Ce,g(),this._hideClone(),m("revert"),ne.eventCanceled||(Vr?Ce.insertBefore(F,Vr):Ce.appendChild(F)),b(!0);var k=Kp(e,s.draggable);if(!k||lO(t,h,this)&&!k.animated){if(k===F)return b(!1);if(k&&e===t.target&&(n=k),n&&(i=je(n)),da(Ce,e,F,r,n,i,t,!!n)!==!1)return g(),e.appendChild(F),Me=e,y(),b(!0)}else if(k&&aO(t,h,this)){var v=eo(e,0,s,!0);if(v===F)return b(!1);if(n=v,i=je(n),da(Ce,e,F,r,n,i,t,!1)!==!1)return g(),e.insertBefore(F,v),Me=e,y(),b(!0)}else if(n.parentNode===e){i=je(n);var w=0,x,C=F.parentNode!==e,M=!nO(F.animated&&F.toRect||r,n.animated&&n.toRect||i,h),T=h?"top":"left",A=zf(n,"top","top")||zf(F,"top","top"),_=A?A.scrollTop:void 0;Ai!==n&&(x=i[T],Uo=!1,ua=!M&&s.invertSwap||C),w=uO(t,n,i,h,M?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,ua,Ai===n);var N;if(w!==0){var $=Ft(F);do $-=w,N=Me.children[$];while(N&&(te(N,"display")==="none"||N===le))}if(w===0||N===n)return b(!1);Ai=n,Wo=w;var j=n.nextElementSibling,q=!1;q=w===1;var K=da(Ce,e,F,r,n,i,t,q);if(K!==!1)return(K===1||K===-1)&&(q=K===1),vd=!0,setTimeout(sO,30),g(),q&&!j?e.appendChild(F):n.parentNode.insertBefore(F,q?j:n),A&&Ny(A,0,_-A.scrollTop),Me=F.parentNode,x!==void 0&&!ua&&(Pa=Math.abs(x-je(n)[T])),y(),b(!0)}if(e.contains(F))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ge(document,"mousemove",this._onTouchMove),ge(document,"touchmove",this._onTouchMove),ge(document,"pointermove",this._onTouchMove),ge(document,"dragover",Fr),ge(document,"mousemove",Fr),ge(document,"touchmove",Fr)},_offUpEvents:function(){var t=this.el.ownerDocument;ge(t,"mouseup",this._onDrop),ge(t,"touchend",this._onDrop),ge(t,"pointerup",this._onDrop),ge(t,"touchcancel",this._onDrop),ge(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(Et=Ft(F),tr=Ft(F,n.draggable),gt("drop",this,{evt:t}),Me=F&&F.parentNode,Et=Ft(F),tr=Ft(F,n.draggable),ne.eventCanceled){this._nulling();return}Ni=!1,ua=!1,Uo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yd(this.cloneId),yd(this._dragStartId),this.nativeDraggable&&(ge(document,"drop",this),ge(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),zo&&te(document.body,"user-select",""),te(F,"transform",""),t&&(No&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Ce===Me||Ge&&Ge.lastPutMode!=="clone")&&_e&&_e.parentNode&&_e.parentNode.removeChild(_e),F&&(this.nativeDraggable&&ge(F,"dragend",this),ac(F),F.style["will-change"]="",No&&!Ni&&xt(F,Ge?Ge.options.ghostClass:this.options.ghostClass,!1),xt(F,this.options.chosenClass,!1),ct({sortable:this,name:"unchoose",toEl:Me,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ce!==Me?(Et>=0&&(ct({rootEl:Me,name:"add",toEl:Me,fromEl:Ce,originalEvent:t}),ct({sortable:this,name:"remove",toEl:Me,originalEvent:t}),ct({rootEl:Me,name:"sort",toEl:Me,fromEl:Ce,originalEvent:t}),ct({sortable:this,name:"sort",toEl:Me,originalEvent:t})),Ge&&Ge.save()):Et!==ji&&Et>=0&&(ct({sortable:this,name:"update",toEl:Me,originalEvent:t}),ct({sortable:this,name:"sort",toEl:Me,originalEvent:t})),ne.active&&((Et==null||Et===-1)&&(Et=ji,tr=qo),ct({sortable:this,name:"end",toEl:Me,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){gt("nulling",this),Ce=F=Me=le=Vr=_e=Ra=or=Pr=Ut=No=Et=tr=ji=qo=Ai=Wo=Ge=la=ne.dragged=ne.ghost=ne.clone=ne.active=null,al.forEach(function(t){t.checked=!0}),al.length=ic=oc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":F&&(this._onDragOver(t),oO(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)e=n[r],hn(e,o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||dO(e));return t},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(i,o){var s=r.children[o];hn(s,this.options.draggable,r,!1)&&(n[i]=s)},this),e&&this.captureAnimationState(),t.forEach(function(i){n[i]&&(r.removeChild(n[i]),r.appendChild(n[i]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return hn(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var r=Fs.modifyOption(this,t,e);typeof r<"u"?n[t]=r:n[t]=e,t==="group"&&Ly(n)},destroy:function(){gt("destroy",this);var t=this.el;t[St]=null,ge(t,"mousedown",this._onTapStart),ge(t,"touchstart",this._onTapStart),ge(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ge(t,"dragover",this),ge(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sl.splice(sl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!or){if(gt("hideClone",this),ne.eventCanceled)return;te(_e,"display","none"),this.options.removeCloneOnHide&&_e.parentNode&&_e.parentNode.removeChild(_e),or=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(or){if(gt("showClone",this),ne.eventCanceled)return;F.parentNode==Ce&&!this.options.group.revertClone?Ce.insertBefore(_e,F):Vr?Ce.insertBefore(_e,Vr):Ce.appendChild(_e),this.options.group.revertClone&&this.animate(F,_e),te(_e,"display",""),or=!1}}};function oO(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function da(t,e,n,r,i,o,s,a){var l,u=t[St],c=u.options.onMove,d;return window.CustomEvent&&!Gn&&!Ps?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||je(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),c&&(d=c.call(u,l,s)),d}function ac(t){t.draggable=!1}function sO(){vd=!1}function aO(t,e,n){var r=je(eo(n.el,0,n.options,!0)),i=10;return e?t.clientX<r.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<r.top-i||t.clientY<r.bottom&&t.clientX<r.left}function lO(t,e,n){var r=je(Kp(n.el,n.options.draggable)),i=10;return e?t.clientX>r.right+i||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+i}function uO(t,e,n,r,i,o,s,a){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,d=r?n.bottom:n.right,h=!1;if(!s){if(a&&Pa<u*i){if(!Uo&&(Wo===1?l>c+u*o/2:l<d-u*o/2)&&(Uo=!0),Uo)h=!0;else if(Wo===1?l<c+Pa:l>d-Pa)return-Wo}else if(l>c+u*(1-i)/2&&l<d-u*(1-i)/2)return cO(e)}return h=h||s,h&&(l<c+u*o/2||l>d-u*o/2)?l>c+u/2?1:-1:0}function cO(t){return Ft(F)<Ft(t)?1:-1}function dO(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function pO(t){al.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&al.push(r)}}function Fa(t){return setTimeout(t,0)}function yd(t){return clearTimeout(t)}Su&&ve(document,"touchmove",function(t){(ne.active||Ni)&&t.cancelable&&t.preventDefault()});ne.utils={on:ve,off:ge,css:te,find:Dy,is:function(t,e){return!!hn(t,e,t,!1)},extend:GT,throttle:Iy,closest:hn,toggleClass:xt,clone:Ry,index:Ft,nextTick:Fa,cancelNextTick:yd,detectDirection:Fy,getChild:eo};ne.get=function(t){return t[St]};ne.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ne.utils=xn(xn({},ne.utils),r.utils)),Fs.mount(r)})};ne.create=function(t,e){return new ne(t,e)};ne.version=qT;var Pe=[],Ro,bd,kd=!1,lc,uc,ll,Po;function hO(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?ve(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ve(document,"pointermove",this._handleFallbackAutoScroll):n.touches?ve(document,"touchmove",this._handleFallbackAutoScroll):ve(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ge(document,"dragover",this._handleAutoScroll):(ge(document,"pointermove",this._handleFallbackAutoScroll),ge(document,"touchmove",this._handleFallbackAutoScroll),ge(document,"mousemove",this._handleFallbackAutoScroll)),Kf(),La(),JT()},nulling:function(){ll=bd=Ro=kd=Po=lc=uc=null,Pe.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var r=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,s=document.elementFromPoint(i,o);if(ll=e,n||this.options.forceAutoScrollFallback||Ps||Gn||zo){cc(e,this.options,s,n);var a=lr(s,!0);kd&&(!Po||i!==lc||o!==uc)&&(Po&&Kf(),Po=setInterval(function(){var l=lr(document.elementFromPoint(i,o),!0);l!==a&&(a=l,La()),cc(e,r.options,l,n)},10),lc=i,uc=o)}else{if(!this.options.bubbleScroll||lr(s,!0)===yn()){La();return}cc(e,this.options,lr(s,!1),!1)}}},qn(t,{pluginName:"scroll",initializeByDefault:!0})}function La(){Pe.forEach(function(t){clearInterval(t.pid)}),Pe=[]}function Kf(){clearInterval(Po)}var cc=Iy(function(t,e,n,r){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,a=e.scrollSpeed,l=yn(),u=!1,c;bd!==n&&(bd=n,La(),Ro=e.scroll,c=e.scrollFn,Ro===!0&&(Ro=lr(n,!0)));var d=0,h=Ro;do{var p=h,f=je(p),m=f.top,g=f.bottom,b=f.left,y=f.right,k=f.width,v=f.height,w=void 0,x=void 0,C=p.scrollWidth,M=p.scrollHeight,T=te(p),A=p.scrollLeft,_=p.scrollTop;p===l?(w=k<C&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),x=v<M&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(w=k<C&&(T.overflowX==="auto"||T.overflowX==="scroll"),x=v<M&&(T.overflowY==="auto"||T.overflowY==="scroll"));var N=w&&(Math.abs(y-i)<=s&&A+k<C)-(Math.abs(b-i)<=s&&!!A),$=x&&(Math.abs(g-o)<=s&&_+v<M)-(Math.abs(m-o)<=s&&!!_);if(!Pe[d])for(var j=0;j<=d;j++)Pe[j]||(Pe[j]={});(Pe[d].vx!=N||Pe[d].vy!=$||Pe[d].el!==p)&&(Pe[d].el=p,Pe[d].vx=N,Pe[d].vy=$,clearInterval(Pe[d].pid),(N!=0||$!=0)&&(u=!0,Pe[d].pid=setInterval(function(){r&&this.layer===0&&ne.active._onTouchMove(ll);var q=Pe[this.layer].vy?Pe[this.layer].vy*a:0,K=Pe[this.layer].vx?Pe[this.layer].vx*a:0;typeof c=="function"&&c.call(ne.dragged.parentNode[St],K,q,t,ll,Pe[this.layer].el)!=="continue"||Ny(Pe[this.layer].el,K,q)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==l&&(h=lr(h,!1)));kd=u}},30),$y=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);a(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Gp(){}Gp.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=eo(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:$y};qn(Gp,{pluginName:"revertOnSpill"});function Jp(){}Jp.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:$y};qn(Jp,{pluginName:"removeOnSpill"});ne.mount(new hO);ne.mount(Jp,Gp);function dc(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function Gf(t,e,n){const r=n===0?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}function fO(){return typeof window<"u"?window.console:global.console}const mO=fO();function gO(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const vO=/-(\w)/g,yO=gO(t=>t.replace(vO,(e,n)=>n.toUpperCase())),jy=["Start","Add","Remove","Update","End"],zy=["Choose","Unchoose","Sort","Filter","Clone"],Hy=["Move"],bO=[Hy,jy,zy].flatMap(t=>t).map(t=>`on${t}`),wd={manage:Hy,manageAndEmit:jy,emit:zy};function kO(t){return bO.indexOf(t)!==-1}const wO=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function xO(t){return wO.includes(t)}function EO(t){return["transition-group","TransitionGroup"].includes(t)}function qy(t){return["id","class","role","style"].includes(t)||t.startsWith("data-")||t.startsWith("aria-")||t.startsWith("on")}function Wy(t){return t.reduce((e,[n,r])=>(e[n]=r,e),{})}function CO({$attrs:t,componentData:e={}}){return{...Wy(Object.entries(t).filter(([n,r])=>qy(n))),...e}}function SO({$attrs:t,callBackBuilder:e}){const n=Wy(Uy(t));Object.entries(e).forEach(([i,o])=>{wd[i].forEach(s=>{n[`on${s}`]=o(s)})});const r=`[data-draggable]${n.draggable||""}`;return{...n,draggable:r}}function Uy(t){return Object.entries(t).filter(([e,n])=>!qy(e)).map(([e,n])=>[yO(e),n]).filter(([e,n])=>!kO(e))}const Jf=({el:t})=>t,TO=(t,e)=>t.__draggable_context=e,Yf=t=>t.__draggable_context;class OO{constructor({nodes:{header:e,default:n,footer:r},root:i,realList:o}){this.defaultNodes=n,this.children=[...e,...n,...r],this.externalComponent=i.externalComponent,this.rootTransition=i.transition,this.tag=i.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(e,n){const{tag:r,children:i,_isRootComponent:o}=this;return e(r,n,o?{default:()=>i}:i)}updated(){const{defaultNodes:e,realList:n}=this;e.forEach((r,i)=>{TO(Jf(r),{element:n[i],index:i})})}getUnderlyingVm(e){return Yf(e)}getVmIndexFromDomIndex(e,n){const{defaultNodes:r}=this,{length:i}=r,o=n.children,s=o.item(e);if(s===null)return i;const a=Yf(s);if(a)return a.index;if(i===0)return 0;const l=Jf(r[0]),u=[...o].findIndex(c=>c===l);return e<u?0:i}}function AO(t,e){const n=t[e];return n?n():[]}function MO({$slots:t,realList:e,getKey:n}){const r=e||[],[i,o]=["header","footer"].map(l=>AO(t,l)),{item:s}=t;if(!s)throw new Error("draggable element must have an item slot");const a=r.flatMap((l,u)=>s({element:l,index:u}).map(c=>(c.key=n(l),c.props={...c.props||{},"data-draggable":!0},c)));if(a.length!==r.length)throw new Error("Item slot must have only one child");return{header:i,footer:o,default:a}}function _O(t){const e=EO(t),n=!xO(t)&&!e;return{transition:e,externalComponent:n,tag:n?_k(t):e?Dk:t}}function DO({$slots:t,tag:e,realList:n,getKey:r}){const i=MO({$slots:t,realList:n,getKey:r}),o=_O(e);return new OO({nodes:i,root:o,realList:n})}function Ky(t,e){xr(()=>this.$emit(t.toLowerCase(),e))}function Gy(t){return(e,n)=>{if(this.realList!==null)return this[`onDrag${t}`](e,n)}}function IO(t){const e=Gy.call(this,t);return(n,r)=>{e.call(this,n,r),Ky.call(this,t,n)}}let pc=null;const NO={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},RO=["update:modelValue","change",...[...wd.manageAndEmit,...wd.emit].map(t=>t.toLowerCase())],Jy=Q({name:"draggable",inheritAttrs:!1,props:NO,emits:RO,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:t,$attrs:e,tag:n,componentData:r,realList:i,getKey:o}=this,s=DO({$slots:t,tag:n,realList:i,getKey:o});this.componentStructure=s;const a=CO({$attrs:e,componentData:r});return s.render(ls,a)}catch(t){return this.error=!0,ls("pre",{style:{color:"red"}},t.stack)}},created(){this.list!==null&&this.modelValue!==null&&mO.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:t,$el:e,componentStructure:n}=this;n.updated();const r=SO({$attrs:t,callBackBuilder:{manageAndEmit:o=>IO.call(this,o),emit:o=>Ky.bind(this,o),manage:o=>Gy.call(this,o)}}),i=e.nodeType===1?e:e.parentElement;this._sortable=new ne(i,r),this.targetDomElement=i,i.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:t}=this;return t||this.modelValue},getKey(){const{itemKey:t}=this;return typeof t=="function"?t:e=>e[t]}},watch:{$attrs:{handler(t){const{_sortable:e}=this;e&&Uy(t).forEach(([n,r])=>{e.option(n,r)})},deep:!0}},methods:{getUnderlyingVm(t){return this.componentStructure.getUnderlyingVm(t)||null},getUnderlyingPotencialDraggableComponent(t){return t.__draggable_component__},emitChanges(t){xr(()=>this.$emit("change",t))},alterList(t){if(this.list){t(this.list);return}const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){const t=e=>e.splice(...arguments);this.alterList(t)},updatePosition(t,e){const n=r=>r.splice(e,0,r.splice(t,1)[0]);this.alterList(n)},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const r=n.realList,i={list:r,component:n};return t!==e&&r?{...n.getUnderlyingVm(e)||{},...i}:i},getVmIndexFromDomIndex(t){return this.componentStructure.getVmIndexFromDomIndex(t,this.targetDomElement)},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),pc=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(e===void 0)return;dc(t.item);const n=this.getVmIndexFromDomIndex(t.newIndex);this.spliceList(n,0,e);const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(t){if(Gf(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){dc(t.clone);return}const{index:e,element:n}=this.context;this.spliceList(e,1);const r={element:n,oldIndex:e};this.emitChanges({removed:r})},onDragUpdate(t){dc(t.item),Gf(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndexFromDomIndex(t.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter(o=>o.style.display!=="none"),r=n.indexOf(e.related),i=t.component.getVmIndexFromDomIndex(r);return n.indexOf(pc)!==-1||!e.willInsertAfter?i:i+1},onDragMove(t,e){const{move:n,realList:r}=this;if(!n||!r)return!0;const i=this.getRelatedContextFromMoveEvent(t),o=this.computeFutureIndex(i,t),s={...this.context,futureIndex:o},a={...t,relatedContext:i,draggedContext:s};return n(a,e)},onDragEnd(){pc=null}}}),PO={key:0,class:"k-media__label-wrapper"},FO={key:1,class:"k-media__sublabel"},AL=Q({__name:"Media",props:{modelValue:{},types:{default:()=>["Image"]},label:{},sublabel:{},multiple:{type:Boolean},sortable:{type:Boolean,default:!0},upload:{type:Function,default:()=>(t,e,n)=>(console.warn("[@kvass-ui/media]: You need to setup the upload function before using this component!"),e(50),new Promise((r,i)=>{let o=new FileReader;o.onloadend=function(){r({url:o.result,type:t.type})},o.readAsDataURL(t)}))},size:{default:"cover"},placement:{default:"outside"},uploadOptions:{default:()=>({})},description:{type:Boolean,default:!0},dropMessage:{default:"Drag an image here or <b>browse</b> to upload."},type:{default:"file"},accept:{default:"image/*"},labels:{default:()=>({cancel:"Cancel",save:"Save",selectMessage:"Select a type from the menu",select:"Select",descriptionPlaceholder:"Add caption...",image:{createLabel:"Image"}})},required:{type:Boolean},disabled:{type:Boolean},thumbnailSize:{default:"4rem"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=H(null),o=I(()=>i.value?n.modelValue instanceof Array?n.modelValue.find(p=>{var f;return p.url===((f=i.value)==null?void 0:f.url)}):n.modelValue:null),s=I({get(){return n.modelValue?(n.modelValue instanceof Array?n.modelValue:[n.modelValue]).map(p=>{var f;return{...p,selected:((f=i.value)==null?void 0:f.url)===p.url,typeConfig:a.value.find(m=>m.condition(p))}}):[]},set(p){n.multiple&&r("update:modelValue",p.map(f=>{let{selected:m,typeConfig:g,...b}=f;return b}))}}),a=I(()=>n.types.map(p=>typeof p=="string"?$T[p]:p).filter(Boolean));xe(()=>n.modelValue,(p,f)=>{(!i.value||!s.value.find(m=>{var g;return m.url===((g=i.value)==null?void 0:g.url)}))&&l()},{immediate:!0});function l(p){return!n.modelValue||n.multiple&&!n.modelValue.length?i.value=null:p?i.value=p:i.value=s.value[0]}function u(p){var f;let{selected:m,typeConfig:g,...b}=p;r("update:modelValue",n.multiple?(n.modelValue||[]).filter(y=>y.url!==b.url):null),((f=i?.value)==null?void 0:f.url)===p.url&&xr(()=>{l()})}function c(p){r("update:modelValue",n.multiple?[...n.modelValue||[],p]:p),xr(()=>l(s.value.find(f=>f.url===p.url)))}function d(p){r("update:modelValue",p)}const h=rn("k-media",{variants:{placement:{outside:"k-media--placement-outside",inside:"k-media--placement-inside"}}});return(p,f)=>(E(),O("div",{class:Se(B(h)({placement:p.placement}))},[p.label||p.sublabel||p.$slots.sublabel||p.$slots.label?(E(),O("div",PO,[p.label||p.$slots.label?(E(),O("label",{key:0,class:Se(["k-media__label",{"k-media__label-required":p.required}])},[L(p.$slots,"label",{},()=>[Be(oe(p.label),1)])],2)):P("",!0),p.sublabel||p.$slots.sublabel?(E(),O("span",FO,[L(p.$slots,"sublabel",{},()=>[Be(oe(p.sublabel),1)])])):P("",!0)])):P("",!0),he(PT,{type:p.type,accept:p.accept,ref:"input",value:p.modelValue,multiple:p.multiple,required:p.required,onSelect:l,onRemove:u,onInput:d,selected:i.value,disabled:p.disabled,"upload-options":p.uploadOptions,upload:p.upload,dropMessage:p.dropMessage},Ms({default:ee(({openFileWindow:m})=>[he(ET,{onOpenFileWindow:m,ref:"typeSelector",value:a.value,onAdd:c,labels:p.labels,upload:p.upload},null,8,["onOpenFileWindow","value","labels","upload"])]),"drop-message":ee(()=>[L(p.$slots,"drop-message")]),"custom-message":ee(()=>[L(p.$slots,"custom-message")]),_:2},[i.value?{name:"preview",fn:ee(()=>[p.description&&o.value?(E(),z(CT,{key:0,modelValue:o.value.description,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value.description=m),disabled:p.disabled,placeholder:p.labels.descriptionPlaceholder},null,8,["modelValue","disabled","placeholder"])):P("",!0),(E(),z(Qe(i.value.typeConfig.components.Preview),{value:i.value,size:p.size},null,8,["value","size"]))]),key:"0"}:void 0]),1032,["type","accept","value","multiple","required","selected","disabled","upload-options","upload","dropMessage"]),L(p.$slots,"bottom"),p.multiple?(E(),z(B(Jy),{key:1,modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=m=>s.value=m),sort:p.sortable&&!p.disabled,class:"k-media__thumbnails","item-key":"url",animation:200,onEnd:f[2]||(f[2]=(m,g)=>{i.value=s.value[m.newIndex]})},{item:ee(({element:m,index:g})=>[(E(),z(kT,{onKeydown:mp(b=>i.value=m,["enter"]),tabindex:"0",size:p.thumbnailSize,key:m.url,value:m,disabled:p.disabled,onClick:b=>i.value=m,onDelete:b=>u(m)},null,8,["onKeydown","size","value","disabled","onClick","onDelete"]))]),_:1},8,["modelValue","sort"])):P("",!0)],2))}});var LO=$n("switch").parts("root","label","control","thumb"),pa=LO.build(),Yy=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`switch:${t.id}`},Xf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`switch:${t.id}:label`},BO=t=>{var e;return((e=t.ids)==null?void 0:e.thumb)??`switch:${t.id}:thumb`},VO=t=>{var e;return((e=t.ids)==null?void 0:e.control)??`switch:${t.id}:control`},xd=t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`switch:${t.id}:input`},$O=t=>t.getById(Yy(t)),zi=t=>t.getById(xd(t));function jO(t,e){const{context:n,send:r,prop:i,scope:o}=t,s=i("disabled"),a=i("readOnly"),l=!!n.get("checked"),u=!s&&n.get("focused"),c=!s&&n.get("focusVisible"),d={"data-active":J(n.get("active")),"data-focus":J(u),"data-focus-visible":J(c),"data-readonly":J(a),"data-hover":J(n.get("hovered")),"data-disabled":J(s),"data-state":l?"checked":"unchecked","data-invalid":J(i("invalid"))};return{checked:l,disabled:s,focused:u,setChecked(h){r({type:"CHECKED.SET",checked:h,isTrusted:!1})},toggleChecked(){r({type:"CHECKED.TOGGLE",checked:l,isTrusted:!1})},getRootProps(){return e.label({...pa.root.attrs,...d,dir:i("dir"),id:Yy(o),htmlFor:xd(o),onPointerMove(){s||r({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||r({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(h){var p;s||(dt(h)===zi(o)&&h.stopPropagation(),xp()&&((p=zi(o))==null||p.focus()))}})},getLabelProps(){return e.element({...pa.label.attrs,...d,dir:i("dir"),id:Xf(o)})},getThumbProps(){return e.element({...pa.thumb.attrs,...d,dir:i("dir"),id:BO(o),"aria-hidden":!0})},getControlProps(){return e.element({...pa.control.attrs,...d,dir:i("dir"),id:VO(o),"aria-hidden":!0})},getHiddenInputProps(){return e.input({id:xd(o),type:"checkbox",required:i("required"),defaultChecked:l,disabled:s,"aria-labelledby":Xf(o),"aria-invalid":i("invalid"),name:i("name"),form:i("form"),value:i("value"),style:Ap,onFocus(){const h=ds();r({type:"CONTEXT.SET",context:{focused:!0,focusVisible:h}})},onBlur(){r({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(h){if(a){h.preventDefault();return}const p=h.currentTarget.checked;r({type:"CHECKED.SET",checked:p,isTrusted:!0})}})}}}var{not:Zf}=cu(),zO={props({props:t}){return{defaultChecked:!1,label:"switch",value:"on",...t}},initialState(){return"ready"},context({prop:t,bindable:e}){return{checked:e(()=>({defaultValue:t("defaultChecked"),value:t("checked"),onChange(n){var r;(r=t("onCheckedChange"))==null||r({checked:n})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),focusVisible:e(()=>({defaultValue:!1})),active:e(()=>({defaultValue:!1})),focused:e(()=>({defaultValue:!1})),hovered:e(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:t,prop:e})=>e("disabled")||t.get("fieldsetDisabled")},watch({track:t,prop:e,context:n,action:r}){t([()=>e("disabled")],()=>{r(["removeFocusIfNeeded"])}),t([()=>n.get("checked")],()=>{r(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Zf("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Zf("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:t})=>!!t.isTrusted},effects:{trackPressEvent({computed:t,scope:e,context:n}){if(!t("isDisabled"))return Ev({pointerNode:$O(e),keyboardNode:zi(e),isValidKey:r=>r.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:t,scope:e}){if(!t("isDisabled"))return Mp({root:e.getRootNode()})},trackFormControlState({context:t,send:e,scope:n}){return lu(zi(n),{onFieldsetDisabledChange(r){t.set("fieldsetDisabled",r)},onFormReset(){const r=t.initial("checked");e({type:"CHECKED.SET",checked:!!r,src:"form-reset"})}})}},actions:{setContext({context:t,event:e}){for(const n in e.context)t.set(n,e.context[n])},syncInputElement({context:t,scope:e}){const n=zi(e);n&&Cp(n,!!t.get("checked"))},removeFocusIfNeeded({context:t,prop:e}){e("disabled")&&t.set("focused",!1)},setChecked({context:t,event:e}){t.set("checked",e.checked)},toggleChecked({context:t}){t.set("checked",!t.get("checked"))},dispatchChangeEvent({context:t,scope:e}){const n=zi(e);Sp(n,{checked:t.get("checked")})}}}};Kn()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);const HO={class:"k-switch__label"},ML=Q({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},getRootNode:{type:Function},labels:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(zO,{id:Qt(),...n,defaultChecked:n.modelValue,onCheckedChange:({checked:s})=>r("update:modelValue",s)}),o=I(()=>jO(i,fi));return xe(()=>n.modelValue,()=>{if(o.value.checked!==n.modelValue)return o.value.setChecked(n.modelValue)}),(s,a)=>(E(),O("label",re({class:"k-switch"},o.value.getRootProps()),[U("input",be(Re(o.value.getHiddenInputProps())),null,16),U("span",be(Re(o.value.getControlProps())),[U("span",be(Re(o.value.getThumbProps())),null,16)],16),s.labels||s.$slots.default?(E(),O("span",be(re({key:0},o.value.getLabelProps())),[U("span",HO,[L(s.$slots,"default",{checked:o.value.checked},()=>[Be(oe(o.value.checked?s.labels.on:s.labels.off),1)])])],16)):P("",!0)],16))}}),_L=Q({__name:"LazyLoad",props:{wrapperTag:{default:"div"},threshold:{default:0},observerRoot:{default:null}},emits:["intersect"],setup(t,{emit:e}){const n=t,r=e,i=H(!1);function o(u){const c=u[0];c.isIntersecting&&(i.value=!0,xr(()=>{r("intersect",c),l()}))}const s=H(),a=H();Tn(()=>{s.value=new IntersectionObserver(o,{root:n.observerRoot,threshold:n.threshold}),s.value.observe(a.value)}),pi(()=>{l()});function l(){s.value&&s.value.disconnect()}return(u,c)=>(E(),z(Qe(u.wrapperTag),{ref_key:"rootRef",ref:a,class:"k-lazyload"},{default:ee(()=>[i.value?L(u.$slots,"default",{key:0}):L(u.$slots,"placeholder",{key:1})]),_:3},512))}}),qO={class:"k-file-uploader__bar"},WO={class:"k-file-uploader__meta"},UO={key:0},KO={key:1},GO=Q({__name:"Uploader",props:{value:{},bytes:{},current:{default:1},total:{default:1}},setup(t){const e=t,n=I(()=>e.total>1),r=I(()=>Wp(e.bytes)),i=I(()=>Math.floor(e.value));return(o,s)=>(E(),z(ni,{class:"k-file-uploader",align:"center",justify:"space-between",gap:"0rem"},{default:ee(()=>[U("div",null,oe(i.value)+" %",1),U("div",qO,[U("div",{class:"k-file-uploader__bar-value",style:kn({width:o.value+"%"})},null,4)]),U("div",WO,[n.value?(E(),O("div",UO,oe(o.current)+" / "+oe(o.total),1)):P("",!0),o.bytes?(E(),O("div",KO,"("+oe(r.value)+")",1)):P("",!0)])]),_:1}))}}),JO=["innerHTML"],Qf=Q({__name:"SlotHandler",props:{value:{}},setup(t){const e=t,n=I(()=>typeof e.value=="string"?e.value:void 0),r=I(()=>typeof e.value=="string"?"div":e.value);return(i,o)=>(E(),z(Qe(r.value),be(Re(i.$attrs)),{default:ee(()=>[n.value?(E(),O("span",{key:0,innerHTML:n.value},null,8,JO)):P("",!0)]),_:1},16))}}),YO={class:"k-file-droparea__instruction"},XO=["accept","required","disabled","multiple"],ZO={key:0,class:"k-file-droparea__max-size"},QO=Q({__name:"DropArea",props:{value:{},multiple:{type:Boolean},upload:{},uploadOptions:{},accept:{},dropMessage:{},fileSizeError:{},disabled:{type:Boolean},required:{type:Boolean},rename:{type:Boolean},labels:{}},emits:["input"],setup(t,{emit:e}){const n=t,r=e,i=H(!1),o=H(!0),s=H(),a=H(!1),l=I(()=>!!n.required),u=I(()=>n.disabled),c=I(()=>!u.value&&!p.total),d=I(()=>yT(n.accept)),{run:h,queue:p}=new Oy(n);function f(C){return h(C).then(M=>{!M||!M.length||r("input",n.multiple?[...n.value||[],...M]:M[0])})}function m(C){if(!C)return 0;const M={bytes:1,b:1,kb:1024,mb:1024**2,gb:1024**3,tb:1024**4,pb:1024**5},T=C.trim().toLowerCase().match(/^([\d.]+)\s*(bytes|b|kb|mb|gb|tb|pb)$/);if(!T)throw new Error("Invalid size format");const A=parseFloat(T[1]),_=T[2];return Math.round(A*M[_])}function g(){return o.value=!1,a.value=!0,setTimeout(()=>{w()},1500)}function b(C=0){var M;return m((M=n?.uploadOptions)==null?void 0:M.maxSize)<C}async function y(C){var M;if(u.value)return;let T=C.target.files||[];if(Array.from(T).some(A=>b(A.size))&&(M=n.uploadOptions)!=null&&M.maxSize)return g();n.uploadOptions.preTransform&&(T=await n.uploadOptions.preTransform(C)),f(T),s.value&&(s.value.value="")}async function k(C){var M,T;if(u.value||!s.value)return;C.preventDefault();let A=(M=C.dataTransfer)==null?void 0:M.files;if(A!=null&&A.length){if(Array.from(A).some(_=>b(_.size))&&(T=n.uploadOptions)!=null&&T.maxSize)return g();if(!o.value)return w();w(),n.uploadOptions.preTransform&&(A=await n.uploadOptions.preTransform(C)),A!=null&&A.length&&(s.value.files=C.dataTransfer.files,s.value.dispatchEvent(new InputEvent("input")),f(A))}}function v(C){if(u.value||!C.dataTransfer)return;const M=Array.from(C.dataTransfer.items).every(A=>Up(A,n.accept)),T=n.multiple?!0:C.dataTransfer.items.length===1;o.value=M&&T,i.value=!0,C.preventDefault()}function w(){o.value=!0,i.value=!1,a.value=!1}const x=rn("k-file-droparea",{variants:{active:{true:"k-file-droparea--active"},invalid:{true:"k-file-droparea--invalid"},disabled:{true:"k-file-droparea--disabled"}}});return(C,M)=>{var T,A,_;return E(),O(Oe,null,[U("div",{class:Se(B(x)({active:i.value,invalid:!o.value,disabled:u.value})),onDrop:k,onDragover:v,onDragleave:w},[L(C.$slots,"preview"),U("div",YO,[c.value?(E(),O("input",{key:0,type:"file",accept:Array.isArray(C.accept)?C.accept.join(","):C.accept,required:l.value,ref_key:"input",ref:s,onChange:y,disabled:!c.value,multiple:C.multiple,class:"k-file-droparea__input"},null,40,XO)):P("",!0),o.value?(E(),O(Oe,{key:1},[L(C.$slots,"drop-message",{extensions:d.value},()=>[he(Qf,{value:C.dropMessage,extensions:d.value},null,8,["value","extensions"])]),(T=n.uploadOptions)!=null&&T.maxSize?(E(),O("div",ZO,[U("span",null,oe(`${(A=C.labels)==null?void 0:A.maxSize}: ${(_=n?.uploadOptions)==null?void 0:_.maxSize}`),1)])):P("",!0)],64)):(E(),z(B(Ze),{key:2,icon:"fa-pro-light:ban",style:{"font-size":"2rem"}})),a.value?L(C.$slots,"file-size-error",{key:3,extensions:d.value},()=>[he(Qf,{class:"k-file-droparea__file-size-error",value:C.fileSizeError,extensions:d.value},null,8,["value","extensions"])]):P("",!0),L(C.$slots,"custom-message")])],34),B(p).total?(E(),z(GO,{key:0,value:B(p).progress,bytes:B(p).bytes,current:B(p).counter,total:B(p).total},null,8,["value","bytes","current","total"])):P("",!0)],64)}}}),eA=Q({name:"UseClipboard",props:["source","read","navigator","copiedDuring","legacy"],setup(t,{slots:e}){const n=fp(rE(t));return()=>{var r;return(r=e.default)==null?void 0:r.call(e,n)}}});var tA=$n("toggle-group").parts("root","item"),em=tA.build(),ul=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`toggle-group:${t.id}`},nA=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.item)==null?void 0:r.call(n,e))??`toggle-group:${t.id}:${e}`},Xy=t=>t.getById(ul(t)),Tu=t=>{const e=`[data-ownedby='${CSS.escape(ul(t))}']:not([data-disabled])`;return Op(Xy(t),e)},tm=t=>_v(Tu(t)),rA=t=>Dv(Tu(t)),iA=(t,e,n)=>Wx(Tu(t),e,n),oA=(t,e,n)=>Ux(Tu(t),e,n);function sA(t,e){const{context:n,send:r,prop:i,scope:o}=t,s=n.get("value"),a=i("disabled"),l=!i("multiple"),u=i("rovingFocus"),c=i("orientation")==="horizontal";function d(h){const p=nA(o,h.value);return{id:p,disabled:!!(h.disabled||a),pressed:!!s.includes(h.value),focused:n.get("focusedId")===p}}return{value:s,setValue(h){r({type:"VALUE.SET",value:h})},getRootProps(){return e.element({...em.root.attrs,id:ul(o),dir:i("dir"),role:l?"radiogroup":"group",tabIndex:n.get("isTabbingBackward")?-1:0,"data-disabled":J(a),"data-orientation":i("orientation"),"data-focus":J(n.get("focusedId")!=null),style:{outline:"none"},onMouseDown(){a||r({type:"ROOT.MOUSE_DOWN"})},onFocus(h){a||h.currentTarget===dt(h)&&(n.get("isClickFocus")||n.get("isTabbingBackward")||r({type:"ROOT.FOCUS"}))},onBlur(){a||r({type:"ROOT.BLUR"})}})},getItemState:d,getItemProps(h){const p=d(h),f=p.focused?0:-1;return e.button({...em.item.attrs,id:p.id,type:"button","data-ownedby":ul(o),"data-focus":J(p.focused),disabled:p.disabled,tabIndex:u?f:void 0,role:l?"radio":void 0,"aria-checked":l?p.pressed:void 0,"aria-pressed":l?void 0:p.pressed,"data-disabled":J(p.disabled),"data-orientation":i("orientation"),dir:i("dir"),"data-state":p.pressed?"on":"off",onFocus(){p.disabled||r({type:"TOGGLE.FOCUS",id:p.id})},onClick(m){p.disabled||(r({type:"TOGGLE.CLICK",id:p.id,value:h.value}),xp()&&m.currentTarget.focus({preventScroll:!0}))},onKeyDown(m){if(m.defaultPrevented||!yx(m)||p.disabled)return;const g={Tab(b){const y=b.shiftKey;r({type:"TOGGLE.SHIFT_TAB",isShiftTab:y})},ArrowLeft(){!u||!c||r({type:"TOGGLE.FOCUS_PREV"})},ArrowRight(){!u||!c||r({type:"TOGGLE.FOCUS_NEXT"})},ArrowUp(){!u||c||r({type:"TOGGLE.FOCUS_PREV"})},ArrowDown(){!u||c||r({type:"TOGGLE.FOCUS_NEXT"})},Home(){u&&r({type:"TOGGLE.FOCUS_FIRST"})},End(){u&&r({type:"TOGGLE.FOCUS_LAST"})}}[vv(m)];g&&(g(m),m.key!=="Tab"&&m.preventDefault())}})}}}var{not:nm,and:aA}=cu(),lA={props({props:t}){return{defaultValue:[],orientation:"horizontal",rovingFocus:!0,loopFocus:!0,deselectable:!0,...t}},initialState(){return"idle"},context({prop:t,bindable:e}){return{value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var r;(r=t("onValueChange"))==null||r({value:n})}})),focusedId:e(()=>({defaultValue:null})),isTabbingBackward:e(()=>({defaultValue:!1})),isClickFocus:e(()=>({defaultValue:!1})),isWithinToolbar:e(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:t,prop:e})=>e("loopFocus")&&!t.get("isWithinToolbar")},entry:["checkIfWithinToolbar"],on:{"VALUE.SET":{actions:["setValue"]},"TOGGLE.CLICK":{actions:["setValue"]},"ROOT.MOUSE_DOWN":{actions:["setClickFocus"]}},states:{idle:{on:{"ROOT.FOCUS":{target:"focused",guard:nm(aA("isClickFocus","isTabbingBackward")),actions:["focusFirstToggle","clearClickFocus"]},"TOGGLE.FOCUS":{target:"focused",actions:["setFocusedId"]}}},focused:{on:{"ROOT.BLUR":{target:"idle",actions:["clearIsTabbingBackward","clearFocusedId","clearClickFocus"]},"TOGGLE.FOCUS":{actions:["setFocusedId"]},"TOGGLE.FOCUS_NEXT":{actions:["focusNextToggle"]},"TOGGLE.FOCUS_PREV":{actions:["focusPrevToggle"]},"TOGGLE.FOCUS_FIRST":{actions:["focusFirstToggle"]},"TOGGLE.FOCUS_LAST":{actions:["focusLastToggle"]},"TOGGLE.SHIFT_TAB":[{guard:nm("isFirstToggleFocused"),target:"idle",actions:["setIsTabbingBackward"]},{actions:["setIsTabbingBackward"]}]}}},implementations:{guards:{isClickFocus:({context:t})=>t.get("isClickFocus"),isTabbingBackward:({context:t})=>t.get("isTabbingBackward"),isFirstToggleFocused:({context:t,scope:e})=>{var n;return t.get("focusedId")===((n=tm(e))==null?void 0:n.id)}},actions:{setIsTabbingBackward({context:t}){t.set("isTabbingBackward",!0)},clearIsTabbingBackward({context:t}){t.set("isTabbingBackward",!1)},setClickFocus({context:t}){t.set("isClickFocus",!0)},clearClickFocus({context:t}){t.set("isClickFocus",!1)},checkIfWithinToolbar({context:t,scope:e}){var n;const r=(n=Xy(e))==null?void 0:n.closest("[role=toolbar]");t.set("isWithinToolbar",!!r)},setFocusedId({context:t,event:e}){t.set("focusedId",e.id)},clearFocusedId({context:t}){t.set("focusedId",null)},setValue({context:t,event:e,prop:n}){C1(e,["value"]);let r=t.get("value");u1(e.value)?r=e.value:n("multiple")?r=a1(r,e.value):r=_s(r,[e.value])&&n("deselectable")?[]:[e.value],t.set("value",r)},focusNextToggle({context:t,scope:e,prop:n}){Ot(()=>{var r;const i=t.get("focusedId");i&&((r=iA(e,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusPrevToggle({context:t,scope:e,prop:n}){Ot(()=>{var r;const i=t.get("focusedId");i&&((r=oA(e,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusFirstToggle({scope:t}){Ot(()=>{var e;(e=tm(t))==null||e.focus({preventScroll:!0})})},focusLastToggle({scope:t}){Ot(()=>{var e;(e=rA(t))==null||e.focus({preventScroll:!0})})}}}};Kn()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]);Kn()(["value","disabled"]);const Zy=Q({__name:"ButtonGroup",props:{modelValue:{},items:{},dropdownItems:{},direction:{default:"horizontal"},multiple:{type:Boolean},disabled:{type:Boolean},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(lA,{id:Qt(),...n,orientation:n.direction,defaultValue:n.modelValue,onValueChange:({value:a})=>{r("update:modelValue",a)},rovingFocus:!0,loopFocus:!0}),o=I(()=>sA(i,fi)),s=H();return xe(()=>{var a;return(a=s.value)==null?void 0:a.isOpen},a=>{a||!o.value.value.includes("dropdown")||o.value.setValue(o.value.value.filter(l=>l!=="dropdown"))}),xe(()=>n.modelValue,a=>{a.every(l=>o.value.value.includes(l))&&a.length===o.value.value.length||o.value.setValue([...a])},{deep:!1}),(a,l)=>(E(),O("div",re({class:["k-buttongroup",`k-buttongroup--direction-${a.direction}`]},o.value.getRootProps()),[L(a.$slots,"default",{getItemProps:o.value.getItemProps},()=>[a.items?(E(!0),O(Oe,{key:0},Mt(a.items,({id:u,...c})=>(E(),z(He,re({class:"k-buttongroup__item",variant:"tertiary",ref_for:!0},{...c,...o.value.getItemProps({value:u})}),null,16))),256)):P("",!0)]),a.dropdownItems||a.$slots.dropdown?(E(),z(wu,re({key:0,ref_key:"dropdown",ref:s,keepOpen:!0,items:a.dropdownItems},o.value.getItemProps({value:"dropdown"})),{default:ee(({close:u})=>[L(a.$slots,"dropdown",{close:u,getItemProps:o.value.getItemProps})]),_:3},16,["items"])):P("",!0)],16))}}),uA=["href"],cA={class:"k-file-thumbnail__info"},dA=["value","disabled"],pA={class:"k-file-thumbnail__info-footer"},hA={key:0,class:"k-file-thumbnail__size"},fA=Q({__name:"Thumbnail",props:{value:{},disabled:{type:Boolean},rename:{type:Boolean},sortable:{type:Boolean},disablePreview:{type:Boolean},icons:{},labels:{}},emits:["rename","delete"],setup(t,{emit:e}){const n=[{pattern:/text.*/,icon:"fa-pro-solid:file-alt"},{pattern:/image.*/,icon:"fa-pro-solid:file-image"},{pattern:/pdf/,icon:"fa-pro-solid:file-pdf"},{pattern:/word/,icon:"fa-pro-solid:file-word"},{pattern:/excel/,icon:"fa-pro-solid:file-excel"},{pattern:/powerpoint/,icon:"fa-pro-solid:file-powerpoint"},{pattern:/octet-stream|zip/,icon:"fa-pro-solid:file-archive"}],r=t,i=I(()=>{let p=[...n,...r.icons].find(f=>r.value.type.match(f.pattern));return p?.icon||"fa-pro-solid:file"}),o=I(()=>r.disabled?"a":"div"),s=I(()=>r.disabled?{click:p=>{p.preventDefault(),gd(r.value)}}:{}),a=I(()=>r.disabled?{title:r.disabled?"Download":null}:{});function l(){r.disabled||gd(r.value)}const u=H(),c=H([]),d=H();function h(){var p;(p=u.value)==null||p.blur()}return(p,f)=>(E(),z(Qe(o.value),re({class:["k-file-thumbnail",{"k-file-thumbnail--clickable":p.disabled}]},a.value,Qg(s.value)),{default:ee(()=>[he(ni,{class:"k-file-thumbnail__preview",gap:"0rem",justify:"center",align:"center"},{default:ee(()=>[L(p.$slots,"icon",{},()=>[!r.disablePreview&&p.value.type.includes("image")&&p.value.url?(E(),O("a",{key:0,href:p.value.url,target:"_blank"},[he(vu,{class:"k-file-thumbnail__preview-image",src:p.value.url,alt:p.value.name,size:"contain",aspectRatio:"1/1"},null,8,["src","alt"])],8,uA)):(E(),z(B(Ze),{key:1,icon:i.value,class:"k-file-thumbnail__preview-icon"},null,8,["icon"]))])]),_:3}),U("div",cA,[U("input",{type:"text",ref_key:"input",ref:u,class:"k-file-thumbnail__name",value:p.value.name,onKeypress:mp(h,["enter"]),disabled:p.disabled||!p.rename,onInput:f[0]||(f[0]=m=>p.$emit("rename",m.target.value))},null,40,dA),U("div",pA,[p.value.size?(E(),O("span",hA,oe(B(Wp)(p.value.size)),1)):P("",!0)])]),he(Zy,{modelValue:c.value,"onUpdate:modelValue":f[1]||(f[1]=m=>{c.value=m.filter(g=>g!=="download")}),disabled:p.disabled},{default:ee(({getItemProps:m})=>[p.value.url?(E(),z(He,re({key:0,is:"a",href:p.value.url,class:"k-file-thumbnail__download",onClick:Wa(l,["prevent"]),icon:"fa-pro-light:arrow-down-to-line",variant:"tertiary"},m({value:"download"})),null,16,["href"])):P("",!0)]),dropdown:ee(({close:m})=>[p.value.url?(E(),z(He,{key:0,is:"a",href:p.value.url,class:"k-file-thumbnail__download",onClick:Wa(l,["prevent"]),iconRight:"fa-pro-light:arrow-down-to-line",label:p.labels.download,variant:"tertiary"},null,8,["href","label"])):P("",!0),he(B(eA),null,{default:ee(({copy:g,copied:b})=>[p.value.url?(E(),z(He,{key:0,class:"k-file-thumbnail__copy",iconRight:"fa-pro-light:copy",label:p.labels.copy,variant:"tertiary",promise:d.value,onClick:()=>{d.value=g(p.value.url)}},null,8,["label","promise","onClick"])):P("",!0)]),_:1}),p.disabled?P("",!0):(E(),z(He,{key:1,variant:"danger",label:p.labels.delete,class:"k-file-thumbnail__delete",iconRight:"fa-pro-light:times",onClick:()=>{p.$emit("delete"),m()}},null,8,["label","onClick"]))]),_:1},8,["modelValue","disabled"]),p.sortable?(E(),z(B(Ze),{key:0,icon:"fa-pro-solid:arrows-alt-v",class:"k-file-thumbnail__handle"})):P("",!0)]),_:3},16,["class"]))}}),mA={key:0,class:"k-file__label-wrapper"},gA={key:1,class:"k-file__sublabel"},DL=Q({__name:"File",props:{modelValue:{},label:{},sublabel:{},multiple:{type:Boolean},sortable:{type:Boolean,default:!0},upload:{type:Function,default:()=>(t,e,n)=>(console.warn("[@kvass-ui/file]: You need to setup the upload function before using this component!"),e(50),new Promise((r,i)=>{let o=new FileReader;o.onloadend=function(){r({url:o.result,type:t.type})},o.readAsDataURL(t)}))},uploadOptions:{},dropMessage:{default:"Drag a file here or <b>browse</b> to upload."},fileSizeError:{default:"The file size exceeds the allowed limit."},rename:{type:Boolean,default:!0},accept:{},serialize:{type:Function,default:t=>t},required:{type:Boolean},disabled:{type:Boolean},disablePreview:{type:Boolean},icons:{default:()=>[]},labels:{default:()=>({delete:"Delete",download:"Download",copy:"Copy link",maxSize:"Maximum size"})}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function i(u){r("update:modelValue",u)}function o(u){r("update:modelValue",n.multiple?(n.modelValue||[]).filter(c=>c!==u):null)}const s=I(()=>n.multiple||!n.modelValue),a=I({get(){return n.modelValue?n.modelValue instanceof Array?n.modelValue:[n.modelValue]:[]},set(u){n.multiple&&i(u)}}),l=rn("k-file",{variants:{}});return(u,c)=>(E(),O("div",{class:Se(B(l)({}))},[u.label||u.sublabel||u.$slots.sublabel||u.$slots.label?(E(),O("div",mA,[u.label||u.$slots.label?(E(),O("label",{key:0,class:Se(["k-file__label",{"k-file__label-required":u.required}])},[L(u.$slots,"label",{},()=>[Be(oe(u.label),1)])],2)):P("",!0),u.sublabel||u.$slots.sublabel?(E(),O("span",gA,[L(u.$slots,"sublabel",{},()=>[Be(oe(u.sublabel),1)])])):P("",!0)])):P("",!0),he(ni,{direction:"column"},{default:ee(()=>[a.value.length?(E(),z(B(Jy),{key:0,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),disabled:!u.multiple||!u.sortable,animation:200,class:"k-file__thumbnails","item-key":"url",handle:".k-file-thumbnail__handle"},{item:ee(({element:d,index:h})=>[(E(),z(fA,{key:d.url||h,disabled:u.disabled,sortable:!u.disabled&&u.sortable&&u.multiple&&a.value.length>1,"disable-preview":u.disablePreview,rename:u.rename===!0,value:u.serialize(d),onRename:p=>d.name=p,onDelete:p=>o(d),icons:u.icons,labels:u.labels},Ms({_:2},[Mt(u.$slots,(p,f)=>({name:f,fn:ee(()=>[L(u.$slots,f,{item:d})])}))]),1032,["disabled","sortable","disable-preview","rename","value","onRename","onDelete","icons","labels"]))]),_:3},8,["modelValue","disabled"])):P("",!0),s.value?(E(),z(QO,{key:1,accept:u.accept,ref:"input",value:u.modelValue,multiple:u.multiple,required:u.required,onInput:i,disabled:u.disabled,"upload-options":u.uploadOptions,upload:u.upload,dropMessage:u.dropMessage,fileSizeError:u.fileSizeError,rename:u.rename,labels:u.labels},{"drop-message":ee(({extensions:d})=>[L(u.$slots,"drop-message",{extensions:d})]),"custom-message":ee(()=>[L(u.$slots,"custom-message")]),_:3},8,["accept","value","multiple","required","disabled","upload-options","upload","dropMessage","fileSizeError","rename","labels"])):P("",!0)]),_:3})],2))}}),Qy=new Set,yt=new WeakMap,to=new WeakMap,oi=new WeakMap,Ed=new WeakMap,vA=new WeakMap,no=new WeakMap,cl=new WeakMap,Fo=new WeakSet;let Cr,Yp=0,Xp=0;const Ln="__aa_tgt",fs="__aa_del",dl="__aa_new",yA=t=>{const e=CA(t);e&&e.forEach(n=>SA(n))},bA=t=>{t.forEach(e=>{e.target===Cr&&wA(),yt.has(e.target)&&vi(e.target)})};function kA(t){const e=Ed.get(t);e?.disconnect();let n=yt.get(t),r=0;const i=5;n||(n=ro(t),yt.set(t,n));const{offsetWidth:o,offsetHeight:s}=Cr,a=[n.top-i,o-(n.left+i+n.width),s-(n.top+i+n.height),n.left-i].map(u=>`${-1*Math.floor(u)}px`).join(" "),l=new IntersectionObserver(()=>{++r>1&&vi(t)},{root:Cr,threshold:1,rootMargin:a});l.observe(t),Ed.set(t,l)}function vi(t){clearTimeout(cl.get(t));const e=Ou(t),n=ms(e)?500:e.duration;cl.set(t,setTimeout(async()=>{const r=oi.get(t);try{await r?.finished,yt.set(t,ro(t)),kA(t)}catch{}},n))}function wA(){clearTimeout(cl.get(Cr)),cl.set(Cr,setTimeout(()=>{Qy.forEach(t=>rb(t,e=>eb(()=>vi(e))))},100))}function xA(t){setTimeout(()=>{vA.set(t,setInterval(()=>eb(vi.bind(null,t)),2e3))},Math.round(2e3*Math.random()))}function eb(t){typeof requestIdleCallback=="function"?requestIdleCallback(()=>t()):requestAnimationFrame(()=>t())}let Cd,Ko;const EA=typeof window<"u"&&"ResizeObserver"in window;EA&&(Cr=document.documentElement,Cd=new MutationObserver(yA),Ko=new ResizeObserver(bA),window.addEventListener("scroll",()=>{Xp=window.scrollY,Yp=window.scrollX}),Ko.observe(Cr));function CA(t){return t.reduce((e,n)=>[...e,...Array.from(n.addedNodes),...Array.from(n.removedNodes)],[]).every(e=>e.nodeName==="#comment")?!1:t.reduce((e,n)=>{if(e===!1)return!1;if(n.target instanceof Element){if(hc(n.target),!e.has(n.target)){e.add(n.target);for(let r=0;r<n.target.children.length;r++){const i=n.target.children.item(r);if(i){if(fs in i)return!1;hc(n.target,i),e.add(i)}}}if(n.removedNodes.length)for(let r=0;r<n.removedNodes.length;r++){const i=n.removedNodes[r];if(fs in i)return!1;i instanceof Element&&(e.add(i),hc(n.target,i),to.set(i,[n.previousSibling,n.nextSibling]))}}return e},new Set)}function hc(t,e){!e&&!(Ln in t)?Object.defineProperty(t,Ln,{value:t}):e&&!(Ln in e)&&Object.defineProperty(e,Ln,{value:t})}function SA(t){var e;const n=t.isConnected,r=yt.has(t);n&&to.has(t)&&to.delete(t),oi.has(t)&&((e=oi.get(t))===null||e===void 0||e.cancel()),dl in t?rm(t):r&&n?OA(t):r&&!n?AA(t):rm(t)}function un(t){return Number(t.replace(/[^0-9.\-]/g,""))}function TA(t){let e=t.parentElement;for(;e;){if(e.scrollLeft||e.scrollTop)return{x:e.scrollLeft,y:e.scrollTop};e=e.parentElement}return{x:0,y:0}}function ro(t){const e=t.getBoundingClientRect(),{x:n,y:r}=TA(t);return{top:e.top+r,left:e.left+n,width:e.width,height:e.height}}function tb(t,e,n){let r=e.width,i=e.height,o=n.width,s=n.height;const a=getComputedStyle(t);if(a.getPropertyValue("box-sizing")==="content-box"){const l=un(a.paddingTop)+un(a.paddingBottom)+un(a.borderTopWidth)+un(a.borderBottomWidth),u=un(a.paddingLeft)+un(a.paddingRight)+un(a.borderRightWidth)+un(a.borderLeftWidth);r-=u,o-=u,i-=l,s-=l}return[r,o,i,s].map(Math.round)}function Ou(t){return Ln in t&&no.has(t[Ln])?no.get(t[Ln]):{duration:250,easing:"ease-in-out"}}function nb(t){if(Ln in t)return t[Ln]}function Zp(t){const e=nb(t);return e?Fo.has(e):!1}function rb(t,...e){e.forEach(n=>n(t,no.has(t)));for(let n=0;n<t.children.length;n++){const r=t.children.item(n);r&&e.forEach(i=>i(r,no.has(r)))}}function Qp(t){return Array.isArray(t)?t:[t]}function ms(t){return typeof t=="function"}function OA(t){const e=yt.get(t),n=ro(t);if(!Zp(t))return yt.set(t,n);let r;if(!e)return;const i=Ou(t);if(typeof i!="function"){const o=e.left-n.left,s=e.top-n.top,[a,l,u,c]=tb(t,e,n),d={transform:`translate(${o}px, ${s}px)`},h={transform:"translate(0, 0)"};a!==l&&(d.width=`${a}px`,h.width=`${l}px`),u!==c&&(d.height=`${u}px`,h.height=`${c}px`),r=t.animate([d,h],{duration:i.duration,easing:i.easing})}else{const[o]=Qp(i(t,"remain",e,n));r=new Animation(o),r.play()}oi.set(t,r),yt.set(t,n),r.addEventListener("finish",vi.bind(null,t))}function rm(t){dl in t&&delete t[dl];const e=ro(t);yt.set(t,e);const n=Ou(t);if(!Zp(t))return;let r;if(typeof n!="function")r=t.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"});else{const[i]=Qp(n(t,"add",e));r=new Animation(i),r.play()}oi.set(t,r),r.addEventListener("finish",vi.bind(null,t))}function im(t,e){var n;t.remove(),yt.delete(t),to.delete(t),oi.delete(t),(n=Ed.get(t))===null||n===void 0||n.disconnect(),setTimeout(()=>{if(fs in t&&delete t[fs],Object.defineProperty(t,dl,{value:!0,configurable:!0}),e&&t instanceof HTMLElement)for(const r in e)t.style[r]=""},0)}function AA(t){var e;if(!to.has(t)||!yt.has(t))return;const[n,r]=to.get(t);Object.defineProperty(t,fs,{value:!0,configurable:!0});const i=window.scrollX,o=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(t,r):n&&n.parentNode?n.parentNode.appendChild(t):(e=nb(t))===null||e===void 0||e.appendChild(t),!Zp(t))return im(t);const[s,a,l,u]=_A(t),c=Ou(t),d=yt.get(t);(i!==Yp||o!==Xp)&&MA(t,i,o,c);let h,p={position:"absolute",top:`${s}px`,left:`${a}px`,width:`${l}px`,height:`${u}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!ms(c))Object.assign(t.style,p),h=t.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:c.duration,easing:"ease-out"});else{const[f,m]=Qp(c(t,"remove",d));m?.styleReset!==!1&&(p=m?.styleReset||p,Object.assign(t.style,p)),h=new Animation(f),h.play()}oi.set(t,h),h.addEventListener("finish",im.bind(null,t,p))}function MA(t,e,n,r){const i=Yp-e,o=Xp-n,s=document.documentElement.style.scrollBehavior;if(getComputedStyle(Cr).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+i,window.scrollY+o),!t.parentElement)return;const a=t.parentElement;let l=a.clientHeight,u=a.clientWidth;const c=performance.now();function d(){requestAnimationFrame(()=>{if(!ms(r)){const h=l-a.clientHeight,p=u-a.clientWidth;c+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-h}),l=a.clientHeight,u=a.clientWidth,d()):document.documentElement.style.scrollBehavior=s}})}d()}function _A(t){const e=yt.get(t),[n,,r]=tb(t,e,ro(t));let i=t.parentElement;for(;i&&(getComputedStyle(i).position==="static"||i instanceof HTMLBodyElement);)i=i.parentElement;i||(i=document.body);const o=getComputedStyle(i),s=yt.get(i)||ro(i),a=Math.round(e.top-s.top)-un(o.borderTopWidth),l=Math.round(e.left-s.left)-un(o.borderLeftWidth);return[a,l,n,r]}function DA(t,e={}){return Cd&&Ko&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!ms(e)&&!e.disrespectUserMotionPreference||(Fo.add(t),getComputedStyle(t).position==="static"&&Object.assign(t.style,{position:"relative"}),rb(t,vi,xA,n=>Ko?.observe(n)),ms(e)?no.set(t,e):no.set(t,{duration:250,easing:"ease-in-out",...e}),Cd.observe(t,{childList:!0}),Qy.add(t))),Object.freeze({parent:t,enable:()=>{Fo.add(t)},disable:()=>{Fo.delete(t)},isEnabled:()=>Fo.has(t)})}const om={mounted:(t,e)=>{DA(t,e.value||{})},getSSRProps:()=>({})},IA=["disabled"],NA={key:0,class:"k-expandable__title"},RA={key:1,class:"k-expandable__subtitle"},PA={key:2,class:"k-expandable__actions"},IL=Q({__name:"Expandable",props:{title:{},subtitle:{},disabled:{type:Boolean,default:!1},expandable:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1},variant:{default:"border"},gap:{default:"1rem"}},setup(t){const e=t,n=hp(),r=I(()=>n.actions),i=I(()=>n.footer),o=I(()=>n.default),s=H(e.expanded),a=()=>{!e.expandable||!o.value||(s.value=!s.value)},l=rn("k-expandable",{variants:{disabled:{true:"k-expandable--disabled"},expandable:{true:"k-expandable--expandable"},expanded:{true:"k-expandable--expanded",false:"k-expandable--collapsed"},variant:{shadow:"k-expandable--variant-shadow",flat:"k-expandable--variant-flat",border:"k-expandable--variant-border"}}});return(u,c)=>qa((E(),O("fieldset",{disabled:u.disabled,class:Se(B(l)({disabled:u.disabled,expandable:u.expandable,expanded:s.value,variant:u.variant}))},[he(He,{class:Se(["k-expandable__header",{"k-expandable__header--open":s.value}]),is:"legend",tabindex:"0",onKeydown:mp(a,["enter"]),onClick:a,variant:"tertiary"},Ms({default:ee(()=>[u.$slots.title||u.title?(E(),O("span",NA,[L(u.$slots,"title",{},()=>[Be(oe(u.title),1)])])):P("",!0),u.$slots.subtitle||u.subtitle?(E(),O("span",RA,[L(u.$slots,"subtitle",{},()=>[Be(oe(u.subtitle),1)])])):P("",!0),r.value?(E(),O("span",PA,[L(u.$slots,"actions")])):P("",!0)]),_:2},[u.expandable?{name:"icon-left",fn:ee(()=>[he(B(Ze),{class:"k-expandable__icon",icon:s.value?"fa-pro-regular:angle-up":"fa-pro-regular:angle-down"},null,8,["icon"])]),key:"0"}:void 0]),1032,["class"]),s.value&&o.value?(E(),O(Oe,{key:0},[qa((E(),z(ni,{class:"k-expandable__content",direction:"column",gap:u.gap},{default:ee(()=>[L(u.$slots,"default")]),_:3},8,["gap"])),[[B(om)]]),i.value?(E(),z(ni,{key:0,justify:"center",align:"center",class:"k-expandable__footer"},{default:ee(()=>[L(u.$slots,"footer")]),_:3})):P("",!0)],64)):P("",!0)],10,IA)),[[B(om)]])}});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,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Je(o)},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),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Je(i)},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 ib(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=ib(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function ob(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=ob(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class D{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,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new D(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new D(r,i)}cutByIndex(e,n){return e==n?D.empty:e==0&&n==this.content.length?this:new D(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new D(i,o)}addToStart(e){return new D([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new D(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 i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return ib(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return ob(this,e,n,r)}findIndex(e,n=-1){if(e==0)return ha(0,e);if(e==this.size)return ha(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||n>0?ha(r+1,s):ha(r,i);i=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 D.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new D(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return D.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new D(n||e,r)}static from(e){if(!e)return D.empty;if(e instanceof D)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new D([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}D.empty=new D([],0);const fc={index:0,offset:0};function ha(t,e){return fc.index=t,fc.offset=e,fc}function pl(t,e){if(t===e)return!0;if(!(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(!pl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!pl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let ke=class Sd{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}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&&pl(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 i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}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 Sd.none;if(e instanceof Sd)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};ke.none=[];class hl extends Error{}class V{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=ab(this.content,e+this.openStart,n);return r&&new V(r,this.openStart,this.openEnd)}removeBetween(e,n){return new V(sb(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 V.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new V(D.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new V(e,r,i)}}V.empty=new V(D.empty,0,0);function sb(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(sb(o.content,e-i-1,n-i-1)))}function ab(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=ab(s.content,e-o-1,n);return a&&t.replaceChild(i,s.copy(a))}function FA(t,e,n){if(n.openStart>t.depth)throw new hl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new hl("Inconsistent open depths");return lb(t,e,n,0)}function lb(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=lb(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return Yr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=LA(n,t);return Yr(o,cb(t,s,a,e,r))}else return Yr(o,fl(t,e,r))}function ub(t,e){if(!e.type.compatibleContent(t.type))throw new hl("Cannot join "+e.type.name+" onto "+t.type.name)}function Td(t,e,n){let r=t.node(n);return ub(r,e.node(n)),r}function Jr(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 Go(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(Jr(t.nodeAfter,r),o++));for(let a=o;a<s;a++)Jr(i.child(a),r);e&&e.depth==n&&e.textOffset&&Jr(e.nodeBefore,r)}function Yr(t,e){return t.type.checkContent(e),t.copy(e)}function cb(t,e,n,r,i){let o=t.depth>i&&Td(t,e,i+1),s=r.depth>i&&Td(n,r,i+1),a=[];return Go(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(ub(o,s),Jr(Yr(o,cb(t,e,n,r,i+1)),a)):(o&&Jr(Yr(o,fl(t,e,i+1)),a),Go(e,n,i,a),s&&Jr(Yr(s,fl(n,r,i+1)),a)),Go(r,null,i,a),new D(a)}function fl(t,e,n){let r=[];if(Go(null,t,n,r),t.depth>n){let i=Td(t,e,n+1);Jr(Yr(i,fl(t,e,n+1)),r)}return Go(e,null,n,r),new D(r)}function LA(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)r=e.node(i).copy(D.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}class gs{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],i=e.child(n);return r?e.child(n).cut(r):i}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],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return ke.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 ml(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=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new gs(n,r,o)}static resolveCached(e,n){let r=sm.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else sm.set(e,r=new BA);let i=r.elts[r.i]=gs.resolve(e,n);return r.i=(r.i+1)%VA,i}}class BA{constructor(){this.elts=[],this.i=0}}const VA=12,sm=new WeakMap;class ml{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 $A=Object.create(null);let gr=class Od{constructor(e,n,r,i=ke.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||D.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,i=0){this.content.nodesBetween(e,n,r,i,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,i){return this.content.textBetween(e,n,r,i)}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&&pl(this.attrs,n||e.defaultAttrs||$A)&&ke.sameSet(this.marks,r||ke.none)}copy(e=null){return e==this.content?this:new Od(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Od(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 V.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new V(l,i.depth-s,o.depth-s)}replace(e,n,r){return FA(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+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 i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return gs.resolveCached(this,e)}resolveNoCache(e){return gs.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}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()+")"),db(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=D.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.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=ke.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(!ke.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 i=D.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};gr.prototype.text=void 0;class gl extends gr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):db(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 gl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new gl(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 db(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class si{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new jA(e,n);if(r.next==null)return si.empty;let i=pb(r);r.next&&r.err("Unexpected trailing text");let o=GA(KA(i));return JA(o,r),o}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 i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}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 i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return D.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null}return o(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 i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.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 i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
8
+ */function Vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vf(Object(n),!0).forEach(function(r){jT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Na(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Na=function(e){return typeof e}:Na=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Na(t)}function jT(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qn(){return qn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qn.apply(this,arguments)}function zT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function HT(t,e){if(t==null)return{};var n=zT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var qT="1.14.0";function jn(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Gn=jn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ps=jn(/Edge/i),$f=jn(/firefox/i),zo=jn(/safari/i)&&!jn(/chrome/i)&&!jn(/android/i),My=jn(/iP(ad|od|hone)/i),WT=jn(/chrome/i)&&jn(/android/i),_y={capture:!1,passive:!1};function ve(t,e,n){t.addEventListener(e,n,!Gn&&_y)}function ge(t,e,n){t.removeEventListener(e,n,!Gn&&_y)}function il(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function UT(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function hn(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&il(t,e):il(t,e))||r&&t===n)return t;if(t===n)break}while(t=UT(t))}return null}var jf=/\s+/g;function xt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(jf," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(jf," ")}}function te(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function Ui(t,e){var n="";if(typeof t=="string")n=t;else do{var r=te(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Dy(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function yn(){var t=document.scrollingElement;return t||document.documentElement}function je(t,e,n,r,i){if(!(!t.getBoundingClientRect&&t!==window)){var o,s,a,l,u,c,d;if(t!==window&&t.parentNode&&t!==yn()?(o=t.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,u=o.right,c=o.height,d=o.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Gn))do if(i&&i.getBoundingClientRect&&(te(i,"transform")!=="none"||n&&te(i,"position")!=="static")){var h=i.getBoundingClientRect();s-=h.top+parseInt(te(i,"border-top-width")),a-=h.left+parseInt(te(i,"border-left-width")),l=s+o.height,u=a+o.width;break}while(i=i.parentNode);if(r&&t!==window){var p=Ui(i||t),f=p&&p.a,m=p&&p.d;p&&(s/=m,a/=f,d/=f,c/=m,l=s+c,u=a+d)}return{top:s,left:a,bottom:l,right:u,width:d,height:c}}}function zf(t,e,n){for(var r=lr(t,!0),i=je(t)[e];r;){var o=je(r)[n],s=void 0;if(s=i>=o,!s)return r;if(r===yn())break;r=lr(r,!1)}return!1}function eo(t,e,n,r){for(var i=0,o=0,s=t.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==ne.ghost&&(r||s[o]!==ne.dragged)&&hn(s[o],n.draggable,t,!1)){if(i===e)return s[o];i++}o++}return null}function Kp(t,e){for(var n=t.lastElementChild;n&&(n===ne.ghost||te(n,"display")==="none"||e&&!il(n,e));)n=n.previousElementSibling;return n||null}function Ft(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==ne.clone&&(!e||il(t,e))&&n++;return n}function Hf(t){var e=0,n=0,r=yn();if(t)do{var i=Ui(t),o=i.a,s=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*s}while(t!==r&&(t=t.parentNode));return[e,n]}function KT(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function lr(t,e){if(!t||!t.getBoundingClientRect)return yn();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=te(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return yn();if(r||e)return n;r=!0}}while(n=n.parentNode);return yn()}function GT(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function nc(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Ho;function Iy(t,e){return function(){if(!Ho){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),Ho=setTimeout(function(){Ho=void 0},e)}}}function JT(){clearTimeout(Ho),Ho=void 0}function Ny(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Ry(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var St="Sortable"+new Date().getTime();function YT(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(te(r,"display")==="none"||r===ne.ghost)){t.push({target:r,rect:je(r)});var i=xn({},t[t.length-1].rect);if(r.thisAnimationDuration){var o=Ui(r,!0);o&&(i.top-=o.f,i.left-=o.e)}r.fromRect=i}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(KT(t,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var i=!1,o=0;t.forEach(function(s){var a=0,l=s.target,u=l.fromRect,c=je(l),d=l.prevFromRect,h=l.prevToRect,p=s.rect,f=Ui(l,!0);f&&(c.top-=f.f,c.left-=f.e),l.toRect=c,l.thisAnimationDuration&&nc(d,c)&&!nc(u,c)&&(p.top-c.top)/(p.left-c.left)===(u.top-c.top)/(u.left-c.left)&&(a=ZT(p,d,h,r.options)),nc(c,u)||(l.prevFromRect=u,l.prevToRect=c,a||(a=r.options.animation),r.animate(l,p,c,a)),a&&(i=!0,o=Math.max(o,a),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},a),l.thisAnimationDuration=a)}),clearTimeout(e),i?e=setTimeout(function(){typeof n=="function"&&n()},o):typeof n=="function"&&n(),t=[]},animate:function(n,r,i,o){if(o){te(n,"transition",""),te(n,"transform","");var s=Ui(this.el),a=s&&s.a,l=s&&s.d,u=(r.left-i.left)/(a||1),c=(r.top-i.top)/(l||1);n.animatingX=!!u,n.animatingY=!!c,te(n,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=XT(n),te(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),te(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){te(n,"transition",""),te(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},o)}}}}function XT(t){return t.offsetWidth}function ZT(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var Oi=[],rc={initializeByDefault:!0},Fs={mount:function(t){for(var e in rc)rc.hasOwnProperty(e)&&!(e in t)&&(t[e]=rc[e]);Oi.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Oi.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Oi.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](xn({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](xn({sortable:e},n)))})},initializePlugins:function(t,e,n,r){Oi.forEach(function(s){var a=s.pluginName;if(!(!t.options[a]&&!s.initializeByDefault)){var l=new s(t,e,t.options);l.sortable=t,l.options=t.options,t[a]=l,qn(n,l.defaults)}});for(var i in t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);typeof o<"u"&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Oi.forEach(function(r){typeof r.eventProperties=="function"&&qn(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return Oi.forEach(function(i){t[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[e]=="function"&&(r=i.optionListeners[e].call(t[i.pluginName],n))}),r}};function QT(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[St],!!e){var m,g=e.options,b="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Gn&&!Ps?m=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(r,!0,!0)),m.to=s||n,m.from=a||n,m.item=i||n,m.clone=o,m.oldIndex=l,m.newIndex=u,m.oldDraggableIndex=c,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=p?p.lastPutMode:void 0;var y=xn(xn({},f),Fs.getEventProperties(r,e));for(var k in y)m[k]=y[k];n&&n.dispatchEvent(m),g[b]&&g[b].call(e,m)}}var eO=["evt"],gt=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=HT(n,eO);Fs.pluginEvent.bind(ne)(t,e,xn({dragEl:F,parentEl:Me,ghostEl:le,rootEl:Ce,nextEl:Vr,lastDownEl:Ra,cloneEl:_e,cloneHidden:or,dragStarted:No,putSortable:Ge,activeSortable:ne.active,originalEvent:r,oldIndex:ji,oldDraggableIndex:qo,newIndex:Et,newDraggableIndex:tr,hideGhostForTarget:By,unhideGhostForTarget:Vy,cloneNowHidden:function(){or=!0},cloneNowShown:function(){or=!1},dispatchSortableEvent:function(o){ct({sortable:e,name:o,originalEvent:r})}},i))};function ct(t){QT(xn({putSortable:Ge,cloneEl:_e,targetEl:F,rootEl:Ce,oldIndex:ji,oldDraggableIndex:qo,newIndex:Et,newDraggableIndex:tr},t))}var F,Me,le,Ce,Vr,Ra,_e,or,ji,Et,qo,tr,la,Ge,Ni=!1,ol=!1,sl=[],Pr,Ut,ic,oc,qf,Wf,No,Ai,Wo,Uo=!1,ua=!1,Pa,tt,sc=[],vd=!1,al=[],Su=typeof document<"u",ca=My,Uf=Ps||Gn?"cssFloat":"float",tO=Su&&!WT&&!My&&"draggable"in document.createElement("div"),Py=function(){if(Su){if(Gn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Fy=function(t,e){var n=te(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=eo(t,0,e),o=eo(t,1,e),s=i&&te(i),a=o&&te(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+je(i).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+je(o).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&s.float!=="none"){var c=s.float==="left"?"left":"right";return o&&(a.clear==="both"||a.clear===c)?"vertical":"horizontal"}return i&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||l>=r&&n[Uf]==="none"||o&&n[Uf]==="none"&&l+u>r)?"vertical":"horizontal"},nO=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return r===s||i===a||r+o/2===s+l/2},rO=function(t,e){var n;return sl.some(function(r){var i=r[St].options.emptyInsertThreshold;if(!(!i||Kp(r))){var o=je(r),s=t>=o.left-i&&t<=o.right+i,a=e>=o.top-i&&e<=o.bottom+i;if(s&&a)return n=r}}),n},Ly=function(t){function e(i,o){return function(s,a,l,u){var c=s.options.group.name&&a.options.group.name&&s.options.group.name===a.options.group.name;if(i==null&&(o||c))return!0;if(i==null||i===!1)return!1;if(o&&i==="clone")return i;if(typeof i=="function")return e(i(s,a,l,u),o)(s,a,l,u);var d=(o?s:a).options.group.name;return i===!0||typeof i=="string"&&i===d||i.join&&i.indexOf(d)>-1}}var n={},r=t.group;(!r||Na(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},By=function(){!Py&&le&&te(le,"display","none")},Vy=function(){!Py&&le&&te(le,"display","")};Su&&document.addEventListener("click",function(t){if(ol)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ol=!1,!1},!0);var Fr=function(t){if(F){t=t.touches?t.touches[0]:t;var e=rO(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[St]._onDragOver(n)}}},iO=function(t){F&&F.parentNode[St]._isOutsideThisEl(t.target)};function ne(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=qn({},e),t[St]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fy(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,s){o.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ne.supportPointer!==!1&&"PointerEvent"in window&&!zo,emptyInsertThreshold:5};Fs.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);Ly(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:tO,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ve(t,"pointerdown",this._onTapStart):(ve(t,"mousedown",this._onTapStart),ve(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(ve(t,"dragover",this),ve(t,"dragenter",this)),sl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),qn(this,YT())}ne.prototype={constructor:ne,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ai=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,F):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=r.filter;if(pO(n),!F&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||r.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&zo&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=hn(a,r.draggable,n,!1),!(a&&a.animated)&&Ra!==a)){if(ji=Ft(a),qo=Ft(a,r.draggable),typeof u=="function"){if(u.call(this,t,a,this)){ct({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),gt("filter",e,{evt:t}),i&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=hn(l,c.trim(),n,!1),c)return ct({sortable:e,rootEl:c,name:"filter",targetEl:a,fromEl:n,toEl:n}),gt("filter",e,{evt:t}),!0}),u)){i&&t.cancelable&&t.preventDefault();return}r.handle&&!hn(l,r.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var r=this,i=r.el,o=r.options,s=i.ownerDocument,a;if(n&&!F&&n.parentNode===i){var l=je(n);if(Ce=i,F=n,Me=F.parentNode,Vr=F.nextSibling,Ra=n,la=o.group,ne.dragged=F,Pr={target:F,clientX:(e||t).clientX,clientY:(e||t).clientY},qf=Pr.clientX-l.left,Wf=Pr.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,F.style["will-change"]="all",a=function(){if(gt("delayEnded",r,{evt:t}),ne.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!$f&&r.nativeDraggable&&(F.draggable=!0),r._triggerDragStart(t,e),ct({sortable:r,name:"choose",originalEvent:t}),xt(F,o.chosenClass,!0)},o.ignore.split(",").forEach(function(u){Dy(F,u.trim(),ac)}),ve(s,"dragover",Fr),ve(s,"mousemove",Fr),ve(s,"touchmove",Fr),ve(s,"mouseup",r._onDrop),ve(s,"touchend",r._onDrop),ve(s,"touchcancel",r._onDrop),$f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,F.draggable=!0),gt("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ps||Gn))){if(ne.eventCanceled){this._onDrop();return}ve(s,"mouseup",r._disableDelayedDrag),ve(s,"touchend",r._disableDelayedDrag),ve(s,"touchcancel",r._disableDelayedDrag),ve(s,"mousemove",r._delayedDragTouchMoveHandler),ve(s,"touchmove",r._delayedDragTouchMoveHandler),o.supportPointer&&ve(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(a,o.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){F&&ac(F),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ge(t,"mouseup",this._disableDelayedDrag),ge(t,"touchend",this._disableDelayedDrag),ge(t,"touchcancel",this._disableDelayedDrag),ge(t,"mousemove",this._delayedDragTouchMoveHandler),ge(t,"touchmove",this._delayedDragTouchMoveHandler),ge(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?ve(document,"pointermove",this._onTouchMove):e?ve(document,"touchmove",this._onTouchMove):ve(document,"mousemove",this._onTouchMove):(ve(F,"dragend",this),ve(Ce,"dragstart",this._onDragStart));try{document.selection?Fa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Ni=!1,Ce&&F){gt("dragStarted",this,{evt:e}),this.nativeDraggable&&ve(document,"dragover",iO);var n=this.options;!t&&xt(F,n.dragClass,!1),xt(F,n.ghostClass,!0),ne.active=this,t&&this._appendGhost(),ct({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ut){this._lastX=Ut.clientX,this._lastY=Ut.clientY,By();for(var t=document.elementFromPoint(Ut.clientX,Ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ut.clientX,Ut.clientY),t!==e);)e=t;if(F.parentNode[St]._isOutsideThisEl(t),e)do{if(e[St]){var n=void 0;if(n=e[St]._onDragOver({clientX:Ut.clientX,clientY:Ut.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Vy()}},_onTouchMove:function(t){if(Pr){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=le&&Ui(le,!0),s=le&&o&&o.a,a=le&&o&&o.d,l=ca&&tt&&Hf(tt),u=(i.clientX-Pr.clientX+r.x)/(s||1)+(l?l[0]-sc[0]:0)/(s||1),c=(i.clientY-Pr.clientY+r.y)/(a||1)+(l?l[1]-sc[1]:0)/(a||1);if(!ne.active&&!Ni){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(le){o?(o.e+=u-(ic||0),o.f+=c-(oc||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");te(le,"webkitTransform",d),te(le,"mozTransform",d),te(le,"msTransform",d),te(le,"transform",d),ic=u,oc=c,Ut=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!le){var t=this.options.fallbackOnBody?document.body:Ce,e=je(F,!0,ca,!0,t),n=this.options;if(ca){for(tt=t;te(tt,"position")==="static"&&te(tt,"transform")==="none"&&tt!==document;)tt=tt.parentNode;tt!==document.body&&tt!==document.documentElement?(tt===document&&(tt=yn()),e.top+=tt.scrollTop,e.left+=tt.scrollLeft):tt=yn(),sc=Hf(tt)}le=F.cloneNode(!0),xt(le,n.ghostClass,!1),xt(le,n.fallbackClass,!0),xt(le,n.dragClass,!0),te(le,"transition",""),te(le,"transform",""),te(le,"box-sizing","border-box"),te(le,"margin",0),te(le,"top",e.top),te(le,"left",e.left),te(le,"width",e.width),te(le,"height",e.height),te(le,"opacity","0.8"),te(le,"position",ca?"absolute":"fixed"),te(le,"zIndex","100000"),te(le,"pointerEvents","none"),ne.ghost=le,t.appendChild(le),te(le,"transform-origin",qf/parseInt(le.style.width)*100+"% "+Wf/parseInt(le.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;if(gt("dragStart",this,{evt:t}),ne.eventCanceled){this._onDrop();return}gt("setupClone",this),ne.eventCanceled||(_e=Ry(F),_e.draggable=!1,_e.style["will-change"]="",this._hideClone(),xt(_e,this.options.chosenClass,!1),ne.clone=_e),n.cloneId=Fa(function(){gt("clone",n),!ne.eventCanceled&&(n.options.removeCloneOnHide||Ce.insertBefore(_e,F),n._hideClone(),ct({sortable:n,name:"clone"}))}),!e&&xt(F,i.dragClass,!0),e?(ol=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ge(document,"mouseup",n._onDrop),ge(document,"touchend",n._onDrop),ge(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,F)),ve(document,"drop",n),te(F,"transform","translateZ(0)")),Ni=!0,n._dragStartId=Fa(n._dragStarted.bind(n,e,t)),ve(document,"selectstart",n),No=!0,zo&&te(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,r,i,o,s=this.options,a=s.group,l=ne.active,u=la===a,c=s.sort,d=Ge||l,h,p=this,f=!1;if(vd)return;function m(X,fe){gt(X,p,xn({evt:t,isOwner:u,axis:h?"vertical":"horizontal",revert:o,dragRect:r,targetRect:i,canSort:c,fromSortable:d,target:n,completed:b,onMove:function(Ee,Ie){return da(Ce,e,F,r,Ee,je(Ee),t,Ie)},changed:y},fe))}function g(){m("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function b(X){return m("dragOverCompleted",{insertion:X}),X&&(u?l._hideClone():l._showClone(p),p!==d&&(xt(F,Ge?Ge.options.ghostClass:l.options.ghostClass,!1),xt(F,s.ghostClass,!0)),Ge!==p&&p!==ne.active?Ge=p:p===ne.active&&Ge&&(Ge=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){m("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===F&&!F.animated||n===e&&!n.animated)&&(Ai=null),!s.dragoverBubble&&!t.rootEl&&n!==document&&(F.parentNode[St]._isOutsideThisEl(t.target),!X&&Fr(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function y(){Et=Ft(F),tr=Ft(F,s.draggable),ct({sortable:p,name:"change",toEl:e,newIndex:Et,newDraggableIndex:tr,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=hn(n,s.draggable,e,!0),m("dragOver"),ne.eventCanceled)return f;if(F.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return b(!1);if(ol=!1,l&&!s.disabled&&(u?c||(o=Me!==Ce):Ge===this||(this.lastPutMode=la.checkPull(this,l,F,t))&&a.checkPut(this,l,F,t))){if(h=this._getDirection(t,n)==="vertical",r=je(F),m("dragOverValid"),ne.eventCanceled)return f;if(o)return Me=Ce,g(),this._hideClone(),m("revert"),ne.eventCanceled||(Vr?Ce.insertBefore(F,Vr):Ce.appendChild(F)),b(!0);var k=Kp(e,s.draggable);if(!k||lO(t,h,this)&&!k.animated){if(k===F)return b(!1);if(k&&e===t.target&&(n=k),n&&(i=je(n)),da(Ce,e,F,r,n,i,t,!!n)!==!1)return g(),e.appendChild(F),Me=e,y(),b(!0)}else if(k&&aO(t,h,this)){var v=eo(e,0,s,!0);if(v===F)return b(!1);if(n=v,i=je(n),da(Ce,e,F,r,n,i,t,!1)!==!1)return g(),e.insertBefore(F,v),Me=e,y(),b(!0)}else if(n.parentNode===e){i=je(n);var w=0,x,C=F.parentNode!==e,M=!nO(F.animated&&F.toRect||r,n.animated&&n.toRect||i,h),T=h?"top":"left",A=zf(n,"top","top")||zf(F,"top","top"),_=A?A.scrollTop:void 0;Ai!==n&&(x=i[T],Uo=!1,ua=!M&&s.invertSwap||C),w=uO(t,n,i,h,M?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,ua,Ai===n);var N;if(w!==0){var $=Ft(F);do $-=w,N=Me.children[$];while(N&&(te(N,"display")==="none"||N===le))}if(w===0||N===n)return b(!1);Ai=n,Wo=w;var j=n.nextElementSibling,q=!1;q=w===1;var K=da(Ce,e,F,r,n,i,t,q);if(K!==!1)return(K===1||K===-1)&&(q=K===1),vd=!0,setTimeout(sO,30),g(),q&&!j?e.appendChild(F):n.parentNode.insertBefore(F,q?j:n),A&&Ny(A,0,_-A.scrollTop),Me=F.parentNode,x!==void 0&&!ua&&(Pa=Math.abs(x-je(n)[T])),y(),b(!0)}if(e.contains(F))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ge(document,"mousemove",this._onTouchMove),ge(document,"touchmove",this._onTouchMove),ge(document,"pointermove",this._onTouchMove),ge(document,"dragover",Fr),ge(document,"mousemove",Fr),ge(document,"touchmove",Fr)},_offUpEvents:function(){var t=this.el.ownerDocument;ge(t,"mouseup",this._onDrop),ge(t,"touchend",this._onDrop),ge(t,"pointerup",this._onDrop),ge(t,"touchcancel",this._onDrop),ge(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(Et=Ft(F),tr=Ft(F,n.draggable),gt("drop",this,{evt:t}),Me=F&&F.parentNode,Et=Ft(F),tr=Ft(F,n.draggable),ne.eventCanceled){this._nulling();return}Ni=!1,ua=!1,Uo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),yd(this.cloneId),yd(this._dragStartId),this.nativeDraggable&&(ge(document,"drop",this),ge(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),zo&&te(document.body,"user-select",""),te(F,"transform",""),t&&(No&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Ce===Me||Ge&&Ge.lastPutMode!=="clone")&&_e&&_e.parentNode&&_e.parentNode.removeChild(_e),F&&(this.nativeDraggable&&ge(F,"dragend",this),ac(F),F.style["will-change"]="",No&&!Ni&&xt(F,Ge?Ge.options.ghostClass:this.options.ghostClass,!1),xt(F,this.options.chosenClass,!1),ct({sortable:this,name:"unchoose",toEl:Me,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ce!==Me?(Et>=0&&(ct({rootEl:Me,name:"add",toEl:Me,fromEl:Ce,originalEvent:t}),ct({sortable:this,name:"remove",toEl:Me,originalEvent:t}),ct({rootEl:Me,name:"sort",toEl:Me,fromEl:Ce,originalEvent:t}),ct({sortable:this,name:"sort",toEl:Me,originalEvent:t})),Ge&&Ge.save()):Et!==ji&&Et>=0&&(ct({sortable:this,name:"update",toEl:Me,originalEvent:t}),ct({sortable:this,name:"sort",toEl:Me,originalEvent:t})),ne.active&&((Et==null||Et===-1)&&(Et=ji,tr=qo),ct({sortable:this,name:"end",toEl:Me,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){gt("nulling",this),Ce=F=Me=le=Vr=_e=Ra=or=Pr=Ut=No=Et=tr=ji=qo=Ai=Wo=Ge=la=ne.dragged=ne.ghost=ne.clone=ne.active=null,al.forEach(function(t){t.checked=!0}),al.length=ic=oc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":F&&(this._onDragOver(t),oO(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)e=n[r],hn(e,o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||dO(e));return t},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(i,o){var s=r.children[o];hn(s,this.options.draggable,r,!1)&&(n[i]=s)},this),e&&this.captureAnimationState(),t.forEach(function(i){n[i]&&(r.removeChild(n[i]),r.appendChild(n[i]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return hn(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var r=Fs.modifyOption(this,t,e);typeof r<"u"?n[t]=r:n[t]=e,t==="group"&&Ly(n)},destroy:function(){gt("destroy",this);var t=this.el;t[St]=null,ge(t,"mousedown",this._onTapStart),ge(t,"touchstart",this._onTapStart),ge(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ge(t,"dragover",this),ge(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sl.splice(sl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!or){if(gt("hideClone",this),ne.eventCanceled)return;te(_e,"display","none"),this.options.removeCloneOnHide&&_e.parentNode&&_e.parentNode.removeChild(_e),or=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(or){if(gt("showClone",this),ne.eventCanceled)return;F.parentNode==Ce&&!this.options.group.revertClone?Ce.insertBefore(_e,F):Vr?Ce.insertBefore(_e,Vr):Ce.appendChild(_e),this.options.group.revertClone&&this.animate(F,_e),te(_e,"display",""),or=!1}}};function oO(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function da(t,e,n,r,i,o,s,a){var l,u=t[St],c=u.options.onMove,d;return window.CustomEvent&&!Gn&&!Ps?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||je(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),c&&(d=c.call(u,l,s)),d}function ac(t){t.draggable=!1}function sO(){vd=!1}function aO(t,e,n){var r=je(eo(n.el,0,n.options,!0)),i=10;return e?t.clientX<r.left-i||t.clientY<r.top&&t.clientX<r.right:t.clientY<r.top-i||t.clientY<r.bottom&&t.clientX<r.left}function lO(t,e,n){var r=je(Kp(n.el,n.options.draggable)),i=10;return e?t.clientX>r.right+i||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+i}function uO(t,e,n,r,i,o,s,a){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,d=r?n.bottom:n.right,h=!1;if(!s){if(a&&Pa<u*i){if(!Uo&&(Wo===1?l>c+u*o/2:l<d-u*o/2)&&(Uo=!0),Uo)h=!0;else if(Wo===1?l<c+Pa:l>d-Pa)return-Wo}else if(l>c+u*(1-i)/2&&l<d-u*(1-i)/2)return cO(e)}return h=h||s,h&&(l<c+u*o/2||l>d-u*o/2)?l>c+u/2?1:-1:0}function cO(t){return Ft(F)<Ft(t)?1:-1}function dO(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function pO(t){al.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&al.push(r)}}function Fa(t){return setTimeout(t,0)}function yd(t){return clearTimeout(t)}Su&&ve(document,"touchmove",function(t){(ne.active||Ni)&&t.cancelable&&t.preventDefault()});ne.utils={on:ve,off:ge,css:te,find:Dy,is:function(t,e){return!!hn(t,e,t,!1)},extend:GT,throttle:Iy,closest:hn,toggleClass:xt,clone:Ry,index:Ft,nextTick:Fa,cancelNextTick:yd,detectDirection:Fy,getChild:eo};ne.get=function(t){return t[St]};ne.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ne.utils=xn(xn({},ne.utils),r.utils)),Fs.mount(r)})};ne.create=function(t,e){return new ne(t,e)};ne.version=qT;var Pe=[],Ro,bd,kd=!1,lc,uc,ll,Po;function hO(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?ve(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ve(document,"pointermove",this._handleFallbackAutoScroll):n.touches?ve(document,"touchmove",this._handleFallbackAutoScroll):ve(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?ge(document,"dragover",this._handleAutoScroll):(ge(document,"pointermove",this._handleFallbackAutoScroll),ge(document,"touchmove",this._handleFallbackAutoScroll),ge(document,"mousemove",this._handleFallbackAutoScroll)),Kf(),La(),JT()},nulling:function(){ll=bd=Ro=kd=Po=lc=uc=null,Pe.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var r=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,s=document.elementFromPoint(i,o);if(ll=e,n||this.options.forceAutoScrollFallback||Ps||Gn||zo){cc(e,this.options,s,n);var a=lr(s,!0);kd&&(!Po||i!==lc||o!==uc)&&(Po&&Kf(),Po=setInterval(function(){var l=lr(document.elementFromPoint(i,o),!0);l!==a&&(a=l,La()),cc(e,r.options,l,n)},10),lc=i,uc=o)}else{if(!this.options.bubbleScroll||lr(s,!0)===yn()){La();return}cc(e,this.options,lr(s,!1),!1)}}},qn(t,{pluginName:"scroll",initializeByDefault:!0})}function La(){Pe.forEach(function(t){clearInterval(t.pid)}),Pe=[]}function Kf(){clearInterval(Po)}var cc=Iy(function(t,e,n,r){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,a=e.scrollSpeed,l=yn(),u=!1,c;bd!==n&&(bd=n,La(),Ro=e.scroll,c=e.scrollFn,Ro===!0&&(Ro=lr(n,!0)));var d=0,h=Ro;do{var p=h,f=je(p),m=f.top,g=f.bottom,b=f.left,y=f.right,k=f.width,v=f.height,w=void 0,x=void 0,C=p.scrollWidth,M=p.scrollHeight,T=te(p),A=p.scrollLeft,_=p.scrollTop;p===l?(w=k<C&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),x=v<M&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(w=k<C&&(T.overflowX==="auto"||T.overflowX==="scroll"),x=v<M&&(T.overflowY==="auto"||T.overflowY==="scroll"));var N=w&&(Math.abs(y-i)<=s&&A+k<C)-(Math.abs(b-i)<=s&&!!A),$=x&&(Math.abs(g-o)<=s&&_+v<M)-(Math.abs(m-o)<=s&&!!_);if(!Pe[d])for(var j=0;j<=d;j++)Pe[j]||(Pe[j]={});(Pe[d].vx!=N||Pe[d].vy!=$||Pe[d].el!==p)&&(Pe[d].el=p,Pe[d].vx=N,Pe[d].vy=$,clearInterval(Pe[d].pid),(N!=0||$!=0)&&(u=!0,Pe[d].pid=setInterval(function(){r&&this.layer===0&&ne.active._onTouchMove(ll);var q=Pe[this.layer].vy?Pe[this.layer].vy*a:0,K=Pe[this.layer].vx?Pe[this.layer].vx*a:0;typeof c=="function"&&c.call(ne.dragged.parentNode[St],K,q,t,ll,Pe[this.layer].el)!=="continue"||Ny(Pe[this.layer].el,K,q)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==l&&(h=lr(h,!1)));kd=u}},30),$y=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);a(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Gp(){}Gp.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=eo(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:$y};qn(Gp,{pluginName:"revertOnSpill"});function Jp(){}Jp.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:$y};qn(Jp,{pluginName:"removeOnSpill"});ne.mount(new hO);ne.mount(Jp,Gp);function dc(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function Gf(t,e,n){const r=n===0?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}function fO(){return typeof window<"u"?window.console:global.console}const mO=fO();function gO(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const vO=/-(\w)/g,yO=gO(t=>t.replace(vO,(e,n)=>n.toUpperCase())),jy=["Start","Add","Remove","Update","End"],zy=["Choose","Unchoose","Sort","Filter","Clone"],Hy=["Move"],bO=[Hy,jy,zy].flatMap(t=>t).map(t=>`on${t}`),wd={manage:Hy,manageAndEmit:jy,emit:zy};function kO(t){return bO.indexOf(t)!==-1}const wO=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function xO(t){return wO.includes(t)}function EO(t){return["transition-group","TransitionGroup"].includes(t)}function qy(t){return["id","class","role","style"].includes(t)||t.startsWith("data-")||t.startsWith("aria-")||t.startsWith("on")}function Wy(t){return t.reduce((e,[n,r])=>(e[n]=r,e),{})}function CO({$attrs:t,componentData:e={}}){return{...Wy(Object.entries(t).filter(([n,r])=>qy(n))),...e}}function SO({$attrs:t,callBackBuilder:e}){const n=Wy(Uy(t));Object.entries(e).forEach(([i,o])=>{wd[i].forEach(s=>{n[`on${s}`]=o(s)})});const r=`[data-draggable]${n.draggable||""}`;return{...n,draggable:r}}function Uy(t){return Object.entries(t).filter(([e,n])=>!qy(e)).map(([e,n])=>[yO(e),n]).filter(([e,n])=>!kO(e))}const Jf=({el:t})=>t,TO=(t,e)=>t.__draggable_context=e,Yf=t=>t.__draggable_context;class OO{constructor({nodes:{header:e,default:n,footer:r},root:i,realList:o}){this.defaultNodes=n,this.children=[...e,...n,...r],this.externalComponent=i.externalComponent,this.rootTransition=i.transition,this.tag=i.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(e,n){const{tag:r,children:i,_isRootComponent:o}=this;return e(r,n,o?{default:()=>i}:i)}updated(){const{defaultNodes:e,realList:n}=this;e.forEach((r,i)=>{TO(Jf(r),{element:n[i],index:i})})}getUnderlyingVm(e){return Yf(e)}getVmIndexFromDomIndex(e,n){const{defaultNodes:r}=this,{length:i}=r,o=n.children,s=o.item(e);if(s===null)return i;const a=Yf(s);if(a)return a.index;if(i===0)return 0;const l=Jf(r[0]),u=[...o].findIndex(c=>c===l);return e<u?0:i}}function AO(t,e){const n=t[e];return n?n():[]}function MO({$slots:t,realList:e,getKey:n}){const r=e||[],[i,o]=["header","footer"].map(l=>AO(t,l)),{item:s}=t;if(!s)throw new Error("draggable element must have an item slot");const a=r.flatMap((l,u)=>s({element:l,index:u}).map(c=>(c.key=n(l),c.props={...c.props||{},"data-draggable":!0},c)));if(a.length!==r.length)throw new Error("Item slot must have only one child");return{header:i,footer:o,default:a}}function _O(t){const e=EO(t),n=!xO(t)&&!e;return{transition:e,externalComponent:n,tag:n?Dk(t):e?_k:t}}function DO({$slots:t,tag:e,realList:n,getKey:r}){const i=MO({$slots:t,realList:n,getKey:r}),o=_O(e);return new OO({nodes:i,root:o,realList:n})}function Ky(t,e){xr(()=>this.$emit(t.toLowerCase(),e))}function Gy(t){return(e,n)=>{if(this.realList!==null)return this[`onDrag${t}`](e,n)}}function IO(t){const e=Gy.call(this,t);return(n,r)=>{e.call(this,n,r),Ky.call(this,t,n)}}let pc=null;const NO={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},RO=["update:modelValue","change",...[...wd.manageAndEmit,...wd.emit].map(t=>t.toLowerCase())],Jy=Q({name:"draggable",inheritAttrs:!1,props:NO,emits:RO,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:t,$attrs:e,tag:n,componentData:r,realList:i,getKey:o}=this,s=DO({$slots:t,tag:n,realList:i,getKey:o});this.componentStructure=s;const a=CO({$attrs:e,componentData:r});return s.render(ls,a)}catch(t){return this.error=!0,ls("pre",{style:{color:"red"}},t.stack)}},created(){this.list!==null&&this.modelValue!==null&&mO.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:t,$el:e,componentStructure:n}=this;n.updated();const r=SO({$attrs:t,callBackBuilder:{manageAndEmit:o=>IO.call(this,o),emit:o=>Ky.bind(this,o),manage:o=>Gy.call(this,o)}}),i=e.nodeType===1?e:e.parentElement;this._sortable=new ne(i,r),this.targetDomElement=i,i.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:t}=this;return t||this.modelValue},getKey(){const{itemKey:t}=this;return typeof t=="function"?t:e=>e[t]}},watch:{$attrs:{handler(t){const{_sortable:e}=this;e&&Uy(t).forEach(([n,r])=>{e.option(n,r)})},deep:!0}},methods:{getUnderlyingVm(t){return this.componentStructure.getUnderlyingVm(t)||null},getUnderlyingPotencialDraggableComponent(t){return t.__draggable_component__},emitChanges(t){xr(()=>this.$emit("change",t))},alterList(t){if(this.list){t(this.list);return}const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){const t=e=>e.splice(...arguments);this.alterList(t)},updatePosition(t,e){const n=r=>r.splice(e,0,r.splice(t,1)[0]);this.alterList(n)},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const r=n.realList,i={list:r,component:n};return t!==e&&r?{...n.getUnderlyingVm(e)||{},...i}:i},getVmIndexFromDomIndex(t){return this.componentStructure.getVmIndexFromDomIndex(t,this.targetDomElement)},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),pc=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(e===void 0)return;dc(t.item);const n=this.getVmIndexFromDomIndex(t.newIndex);this.spliceList(n,0,e);const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(t){if(Gf(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){dc(t.clone);return}const{index:e,element:n}=this.context;this.spliceList(e,1);const r={element:n,oldIndex:e};this.emitChanges({removed:r})},onDragUpdate(t){dc(t.item),Gf(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndexFromDomIndex(t.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter(o=>o.style.display!=="none"),r=n.indexOf(e.related),i=t.component.getVmIndexFromDomIndex(r);return n.indexOf(pc)!==-1||!e.willInsertAfter?i:i+1},onDragMove(t,e){const{move:n,realList:r}=this;if(!n||!r)return!0;const i=this.getRelatedContextFromMoveEvent(t),o=this.computeFutureIndex(i,t),s={...this.context,futureIndex:o},a={...t,relatedContext:i,draggedContext:s};return n(a,e)},onDragEnd(){pc=null}}}),PO={key:0,class:"k-media__label-wrapper"},FO={key:1,class:"k-media__sublabel"},AL=Q({__name:"Media",props:{modelValue:{},types:{default:()=>["Image"]},label:{},sublabel:{},multiple:{type:Boolean},sortable:{type:Boolean,default:!0},upload:{type:Function,default:()=>(t,e,n)=>(console.warn("[@kvass-ui/media]: You need to setup the upload function before using this component!"),e(50),new Promise((r,i)=>{let o=new FileReader;o.onloadend=function(){r({url:o.result,type:t.type})},o.readAsDataURL(t)}))},size:{default:"cover"},placement:{default:"outside"},uploadOptions:{default:()=>({})},description:{type:Boolean,default:!0},dropMessage:{default:"Drag an image here or <b>browse</b> to upload."},type:{default:"file"},accept:{default:"image/*"},labels:{default:()=>({cancel:"Cancel",save:"Save",selectMessage:"Select a type from the menu",select:"Select",descriptionPlaceholder:"Add caption...",image:{createLabel:"Image"}})},required:{type:Boolean},disabled:{type:Boolean},thumbnailSize:{default:"4rem"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=H(null),o=I(()=>i.value?n.modelValue instanceof Array?n.modelValue.find(p=>{var f;return p.url===((f=i.value)==null?void 0:f.url)}):n.modelValue:null),s=I({get(){return n.modelValue?(n.modelValue instanceof Array?n.modelValue:[n.modelValue]).map(p=>{var f;return{...p,selected:((f=i.value)==null?void 0:f.url)===p.url,typeConfig:a.value.find(m=>m.condition(p))}}):[]},set(p){n.multiple&&r("update:modelValue",p.map(f=>{let{selected:m,typeConfig:g,...b}=f;return b}))}}),a=I(()=>n.types.map(p=>typeof p=="string"?$T[p]:p).filter(Boolean));xe(()=>n.modelValue,(p,f)=>{(!i.value||!s.value.find(m=>{var g;return m.url===((g=i.value)==null?void 0:g.url)}))&&l()},{immediate:!0});function l(p){return!n.modelValue||n.multiple&&!n.modelValue.length?i.value=null:p?i.value=p:i.value=s.value[0]}function u(p){var f;let{selected:m,typeConfig:g,...b}=p;r("update:modelValue",n.multiple?(n.modelValue||[]).filter(y=>y.url!==b.url):null),((f=i?.value)==null?void 0:f.url)===p.url&&xr(()=>{l()})}function c(p){r("update:modelValue",n.multiple?[...n.modelValue||[],p]:p),xr(()=>l(s.value.find(f=>f.url===p.url)))}function d(p){r("update:modelValue",p)}const h=rn("k-media",{variants:{placement:{outside:"k-media--placement-outside",inside:"k-media--placement-inside"}}});return(p,f)=>(E(),O("div",{class:Se(B(h)({placement:p.placement}))},[p.label||p.sublabel||p.$slots.sublabel||p.$slots.label?(E(),O("div",PO,[p.label||p.$slots.label?(E(),O("label",{key:0,class:Se(["k-media__label",{"k-media__label-required":p.required}])},[L(p.$slots,"label",{},()=>[Be(oe(p.label),1)])],2)):P("",!0),p.sublabel||p.$slots.sublabel?(E(),O("span",FO,[L(p.$slots,"sublabel",{},()=>[Be(oe(p.sublabel),1)])])):P("",!0)])):P("",!0),he(PT,{type:p.type,accept:p.accept,ref:"input",value:p.modelValue,multiple:p.multiple,required:p.required,onSelect:l,onRemove:u,onInput:d,selected:i.value,disabled:p.disabled,"upload-options":p.uploadOptions,upload:p.upload,dropMessage:p.dropMessage},Ms({default:ee(({openFileWindow:m})=>[he(ET,{onOpenFileWindow:m,ref:"typeSelector",value:a.value,onAdd:c,labels:p.labels,upload:p.upload},null,8,["onOpenFileWindow","value","labels","upload"])]),"drop-message":ee(()=>[L(p.$slots,"drop-message")]),"custom-message":ee(()=>[L(p.$slots,"custom-message")]),_:2},[i.value?{name:"preview",fn:ee(()=>[p.description&&o.value?(E(),z(CT,{key:0,modelValue:o.value.description,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value.description=m),disabled:p.disabled,placeholder:p.labels.descriptionPlaceholder},null,8,["modelValue","disabled","placeholder"])):P("",!0),(E(),z(Qe(i.value.typeConfig.components.Preview),{value:i.value,size:p.size},null,8,["value","size"]))]),key:"0"}:void 0]),1032,["type","accept","value","multiple","required","selected","disabled","upload-options","upload","dropMessage"]),L(p.$slots,"bottom"),p.multiple?(E(),z(B(Jy),{key:1,modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=m=>s.value=m),sort:p.sortable&&!p.disabled,class:"k-media__thumbnails","item-key":"url",animation:200,onEnd:f[2]||(f[2]=(m,g)=>{i.value=s.value[m.newIndex]})},{item:ee(({element:m,index:g})=>[(E(),z(kT,{onKeydown:mp(b=>i.value=m,["enter"]),tabindex:"0",size:p.thumbnailSize,key:m.url,value:m,disabled:p.disabled,onClick:b=>i.value=m,onDelete:b=>u(m)},null,8,["onKeydown","size","value","disabled","onClick","onDelete"]))]),_:1},8,["modelValue","sort"])):P("",!0)],2))}});var LO=$n("switch").parts("root","label","control","thumb"),pa=LO.build(),Yy=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`switch:${t.id}`},Xf=t=>{var e;return((e=t.ids)==null?void 0:e.label)??`switch:${t.id}:label`},BO=t=>{var e;return((e=t.ids)==null?void 0:e.thumb)??`switch:${t.id}:thumb`},VO=t=>{var e;return((e=t.ids)==null?void 0:e.control)??`switch:${t.id}:control`},xd=t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`switch:${t.id}:input`},$O=t=>t.getById(Yy(t)),zi=t=>t.getById(xd(t));function jO(t,e){const{context:n,send:r,prop:i,scope:o}=t,s=i("disabled"),a=i("readOnly"),l=!!n.get("checked"),u=!s&&n.get("focused"),c=!s&&n.get("focusVisible"),d={"data-active":J(n.get("active")),"data-focus":J(u),"data-focus-visible":J(c),"data-readonly":J(a),"data-hover":J(n.get("hovered")),"data-disabled":J(s),"data-state":l?"checked":"unchecked","data-invalid":J(i("invalid"))};return{checked:l,disabled:s,focused:u,setChecked(h){r({type:"CHECKED.SET",checked:h,isTrusted:!1})},toggleChecked(){r({type:"CHECKED.TOGGLE",checked:l,isTrusted:!1})},getRootProps(){return e.label({...pa.root.attrs,...d,dir:i("dir"),id:Yy(o),htmlFor:xd(o),onPointerMove(){s||r({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||r({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(h){var p;s||(dt(h)===zi(o)&&h.stopPropagation(),xp()&&((p=zi(o))==null||p.focus()))}})},getLabelProps(){return e.element({...pa.label.attrs,...d,dir:i("dir"),id:Xf(o)})},getThumbProps(){return e.element({...pa.thumb.attrs,...d,dir:i("dir"),id:BO(o),"aria-hidden":!0})},getControlProps(){return e.element({...pa.control.attrs,...d,dir:i("dir"),id:VO(o),"aria-hidden":!0})},getHiddenInputProps(){return e.input({id:xd(o),type:"checkbox",required:i("required"),defaultChecked:l,disabled:s,"aria-labelledby":Xf(o),"aria-invalid":i("invalid"),name:i("name"),form:i("form"),value:i("value"),style:Ap,onFocus(){const h=ds();r({type:"CONTEXT.SET",context:{focused:!0,focusVisible:h}})},onBlur(){r({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(h){if(a){h.preventDefault();return}const p=h.currentTarget.checked;r({type:"CHECKED.SET",checked:p,isTrusted:!0})}})}}}var{not:Zf}=cu(),zO={props({props:t}){return{defaultChecked:!1,label:"switch",value:"on",...t}},initialState(){return"ready"},context({prop:t,bindable:e}){return{checked:e(()=>({defaultValue:t("defaultChecked"),value:t("checked"),onChange(n){var r;(r=t("onCheckedChange"))==null||r({checked:n})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),focusVisible:e(()=>({defaultValue:!1})),active:e(()=>({defaultValue:!1})),focused:e(()=>({defaultValue:!1})),hovered:e(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:t,prop:e})=>e("disabled")||t.get("fieldsetDisabled")},watch({track:t,prop:e,context:n,action:r}){t([()=>e("disabled")],()=>{r(["removeFocusIfNeeded"])}),t([()=>n.get("checked")],()=>{r(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:Zf("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Zf("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:t})=>!!t.isTrusted},effects:{trackPressEvent({computed:t,scope:e,context:n}){if(!t("isDisabled"))return Ev({pointerNode:$O(e),keyboardNode:zi(e),isValidKey:r=>r.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:t,scope:e}){if(!t("isDisabled"))return Mp({root:e.getRootNode()})},trackFormControlState({context:t,send:e,scope:n}){return lu(zi(n),{onFieldsetDisabledChange(r){t.set("fieldsetDisabled",r)},onFormReset(){const r=t.initial("checked");e({type:"CHECKED.SET",checked:!!r,src:"form-reset"})}})}},actions:{setContext({context:t,event:e}){for(const n in e.context)t.set(n,e.context[n])},syncInputElement({context:t,scope:e}){const n=zi(e);n&&Cp(n,!!t.get("checked"))},removeFocusIfNeeded({context:t,prop:e}){e("disabled")&&t.set("focused",!1)},setChecked({context:t,event:e}){t.set("checked",e.checked)},toggleChecked({context:t}){t.set("checked",!t.get("checked"))},dispatchChangeEvent({context:t,scope:e}){const n=zi(e);Sp(n,{checked:t.get("checked")})}}}};Kn()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);const HO={class:"k-switch__label"},ML=Q({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},getRootNode:{type:Function},labels:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(zO,{id:Qt(),...n,defaultChecked:n.modelValue,onCheckedChange:({checked:s})=>r("update:modelValue",s)}),o=I(()=>jO(i,fi));return xe(()=>n.modelValue,()=>{if(o.value.checked!==n.modelValue)return o.value.setChecked(n.modelValue)}),(s,a)=>(E(),O("label",re({class:"k-switch"},o.value.getRootProps()),[U("input",be(Re(o.value.getHiddenInputProps())),null,16),U("span",be(Re(o.value.getControlProps())),[U("span",be(Re(o.value.getThumbProps())),null,16)],16),s.labels||s.$slots.default?(E(),O("span",be(re({key:0},o.value.getLabelProps())),[U("span",HO,[L(s.$slots,"default",{checked:o.value.checked},()=>[Be(oe(o.value.checked?s.labels.on:s.labels.off),1)])])],16)):P("",!0)],16))}}),_L=Q({__name:"LazyLoad",props:{wrapperTag:{default:"div"},threshold:{default:0},observerRoot:{default:null}},emits:["intersect"],setup(t,{emit:e}){const n=t,r=e,i=H(!1);function o(u){const c=u[0];c.isIntersecting&&(i.value=!0,xr(()=>{r("intersect",c),l()}))}const s=H(),a=H();Tn(()=>{s.value=new IntersectionObserver(o,{root:n.observerRoot,threshold:n.threshold}),s.value.observe(a.value)}),pi(()=>{l()});function l(){s.value&&s.value.disconnect()}return(u,c)=>(E(),z(Qe(u.wrapperTag),{ref_key:"rootRef",ref:a,class:"k-lazyload"},{default:ee(()=>[i.value?L(u.$slots,"default",{key:0}):L(u.$slots,"placeholder",{key:1})]),_:3},512))}}),qO={class:"k-file-uploader__bar"},WO={class:"k-file-uploader__meta"},UO={key:0},KO={key:1},GO=Q({__name:"Uploader",props:{value:{},bytes:{},current:{default:1},total:{default:1}},setup(t){const e=t,n=I(()=>e.total>1),r=I(()=>Wp(e.bytes)),i=I(()=>Math.floor(e.value));return(o,s)=>(E(),z(ni,{class:"k-file-uploader",align:"center",justify:"space-between",gap:"0rem"},{default:ee(()=>[U("div",null,oe(i.value)+" %",1),U("div",qO,[U("div",{class:"k-file-uploader__bar-value",style:kn({width:o.value+"%"})},null,4)]),U("div",WO,[n.value?(E(),O("div",UO,oe(o.current)+" / "+oe(o.total),1)):P("",!0),o.bytes?(E(),O("div",KO,"("+oe(r.value)+")",1)):P("",!0)])]),_:1}))}}),JO=["innerHTML"],Qf=Q({__name:"SlotHandler",props:{value:{}},setup(t){const e=t,n=I(()=>typeof e.value=="string"?e.value:void 0),r=I(()=>typeof e.value=="string"?"div":e.value);return(i,o)=>(E(),z(Qe(r.value),be(Re(i.$attrs)),{default:ee(()=>[n.value?(E(),O("span",{key:0,innerHTML:n.value},null,8,JO)):P("",!0)]),_:1},16))}}),YO={class:"k-file-droparea__instruction"},XO=["accept","required","disabled","multiple"],ZO={key:0,class:"k-file-droparea__max-size"},QO=Q({__name:"DropArea",props:{value:{},multiple:{type:Boolean},upload:{},uploadOptions:{},accept:{},dropMessage:{},fileSizeError:{},disabled:{type:Boolean},required:{type:Boolean},rename:{type:Boolean},labels:{}},emits:["input"],setup(t,{emit:e}){const n=t,r=e,i=H(!1),o=H(!0),s=H(),a=H(!1),l=I(()=>!!n.required),u=I(()=>n.disabled),c=I(()=>!u.value&&!p.total),d=I(()=>yT(n.accept)),{run:h,queue:p}=new Oy(n);function f(C){return h(C).then(M=>{!M||!M.length||r("input",n.multiple?[...n.value||[],...M]:M[0])})}function m(C){if(!C)return 0;const M={bytes:1,b:1,kb:1024,mb:1024**2,gb:1024**3,tb:1024**4,pb:1024**5},T=C.trim().toLowerCase().match(/^([\d.]+)\s*(bytes|b|kb|mb|gb|tb|pb)$/);if(!T)throw new Error("Invalid size format");const A=parseFloat(T[1]),_=T[2];return Math.round(A*M[_])}function g(){return o.value=!1,a.value=!0,setTimeout(()=>{w()},1500)}function b(C=0){var M;return m((M=n?.uploadOptions)==null?void 0:M.maxSize)<C}async function y(C){var M;if(u.value)return;let T=C.target.files||[];if(Array.from(T).some(A=>b(A.size))&&(M=n.uploadOptions)!=null&&M.maxSize)return g();n.uploadOptions.preTransform&&(T=await n.uploadOptions.preTransform(C)),f(T),s.value&&(s.value.value="")}async function k(C){var M,T;if(u.value||!s.value)return;C.preventDefault();let A=(M=C.dataTransfer)==null?void 0:M.files;if(A!=null&&A.length){if(Array.from(A).some(_=>b(_.size))&&(T=n.uploadOptions)!=null&&T.maxSize)return g();if(!o.value)return w();w(),n.uploadOptions.preTransform&&(A=await n.uploadOptions.preTransform(C)),A!=null&&A.length&&(s.value.files=C.dataTransfer.files,s.value.dispatchEvent(new InputEvent("input")),f(A))}}function v(C){if(u.value||!C.dataTransfer)return;const M=Array.from(C.dataTransfer.items).every(A=>Up(A,n.accept)),T=n.multiple?!0:C.dataTransfer.items.length===1;o.value=M&&T,i.value=!0,C.preventDefault()}function w(){o.value=!0,i.value=!1,a.value=!1}const x=rn("k-file-droparea",{variants:{active:{true:"k-file-droparea--active"},invalid:{true:"k-file-droparea--invalid"},disabled:{true:"k-file-droparea--disabled"}}});return(C,M)=>{var T,A,_;return E(),O(Oe,null,[U("div",{class:Se(B(x)({active:i.value,invalid:!o.value,disabled:u.value})),onDrop:k,onDragover:v,onDragleave:w},[L(C.$slots,"preview"),U("div",YO,[c.value?(E(),O("input",{key:0,type:"file",accept:Array.isArray(C.accept)?C.accept.join(","):C.accept,required:l.value,ref_key:"input",ref:s,onChange:y,disabled:!c.value,multiple:C.multiple,class:"k-file-droparea__input"},null,40,XO)):P("",!0),o.value?(E(),O(Oe,{key:1},[L(C.$slots,"drop-message",{extensions:d.value},()=>[he(Qf,{value:C.dropMessage,extensions:d.value},null,8,["value","extensions"])]),(T=n.uploadOptions)!=null&&T.maxSize?(E(),O("div",ZO,[U("span",null,oe(`${(A=C.labels)==null?void 0:A.maxSize}: ${(_=n?.uploadOptions)==null?void 0:_.maxSize}`),1)])):P("",!0)],64)):(E(),z(B(Ze),{key:2,icon:"fa-pro-light:ban",style:{"font-size":"2rem"}})),a.value?L(C.$slots,"file-size-error",{key:3,extensions:d.value},()=>[he(Qf,{class:"k-file-droparea__file-size-error",value:C.fileSizeError,extensions:d.value},null,8,["value","extensions"])]):P("",!0),L(C.$slots,"custom-message")])],34),B(p).total?(E(),z(GO,{key:0,value:B(p).progress,bytes:B(p).bytes,current:B(p).counter,total:B(p).total},null,8,["value","bytes","current","total"])):P("",!0)],64)}}}),eA=Q({name:"UseClipboard",props:["source","read","navigator","copiedDuring","legacy"],setup(t,{slots:e}){const n=fp(rE(t));return()=>{var r;return(r=e.default)==null?void 0:r.call(e,n)}}});var tA=$n("toggle-group").parts("root","item"),em=tA.build(),ul=t=>{var e;return((e=t.ids)==null?void 0:e.root)??`toggle-group:${t.id}`},nA=(t,e)=>{var n,r;return((r=(n=t.ids)==null?void 0:n.item)==null?void 0:r.call(n,e))??`toggle-group:${t.id}:${e}`},Xy=t=>t.getById(ul(t)),Tu=t=>{const e=`[data-ownedby='${CSS.escape(ul(t))}']:not([data-disabled])`;return Op(Xy(t),e)},tm=t=>_v(Tu(t)),rA=t=>Dv(Tu(t)),iA=(t,e,n)=>Wx(Tu(t),e,n),oA=(t,e,n)=>Ux(Tu(t),e,n);function sA(t,e){const{context:n,send:r,prop:i,scope:o}=t,s=n.get("value"),a=i("disabled"),l=!i("multiple"),u=i("rovingFocus"),c=i("orientation")==="horizontal";function d(h){const p=nA(o,h.value);return{id:p,disabled:!!(h.disabled||a),pressed:!!s.includes(h.value),focused:n.get("focusedId")===p}}return{value:s,setValue(h){r({type:"VALUE.SET",value:h})},getRootProps(){return e.element({...em.root.attrs,id:ul(o),dir:i("dir"),role:l?"radiogroup":"group",tabIndex:n.get("isTabbingBackward")?-1:0,"data-disabled":J(a),"data-orientation":i("orientation"),"data-focus":J(n.get("focusedId")!=null),style:{outline:"none"},onMouseDown(){a||r({type:"ROOT.MOUSE_DOWN"})},onFocus(h){a||h.currentTarget===dt(h)&&(n.get("isClickFocus")||n.get("isTabbingBackward")||r({type:"ROOT.FOCUS"}))},onBlur(){a||r({type:"ROOT.BLUR"})}})},getItemState:d,getItemProps(h){const p=d(h),f=p.focused?0:-1;return e.button({...em.item.attrs,id:p.id,type:"button","data-ownedby":ul(o),"data-focus":J(p.focused),disabled:p.disabled,tabIndex:u?f:void 0,role:l?"radio":void 0,"aria-checked":l?p.pressed:void 0,"aria-pressed":l?void 0:p.pressed,"data-disabled":J(p.disabled),"data-orientation":i("orientation"),dir:i("dir"),"data-state":p.pressed?"on":"off",onFocus(){p.disabled||r({type:"TOGGLE.FOCUS",id:p.id})},onClick(m){p.disabled||(r({type:"TOGGLE.CLICK",id:p.id,value:h.value}),xp()&&m.currentTarget.focus({preventScroll:!0}))},onKeyDown(m){if(m.defaultPrevented||!yx(m)||p.disabled)return;const g={Tab(b){const y=b.shiftKey;r({type:"TOGGLE.SHIFT_TAB",isShiftTab:y})},ArrowLeft(){!u||!c||r({type:"TOGGLE.FOCUS_PREV"})},ArrowRight(){!u||!c||r({type:"TOGGLE.FOCUS_NEXT"})},ArrowUp(){!u||c||r({type:"TOGGLE.FOCUS_PREV"})},ArrowDown(){!u||c||r({type:"TOGGLE.FOCUS_NEXT"})},Home(){u&&r({type:"TOGGLE.FOCUS_FIRST"})},End(){u&&r({type:"TOGGLE.FOCUS_LAST"})}}[vv(m)];g&&(g(m),m.key!=="Tab"&&m.preventDefault())}})}}}var{not:nm,and:aA}=cu(),lA={props({props:t}){return{defaultValue:[],orientation:"horizontal",rovingFocus:!0,loopFocus:!0,deselectable:!0,...t}},initialState(){return"idle"},context({prop:t,bindable:e}){return{value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(n){var r;(r=t("onValueChange"))==null||r({value:n})}})),focusedId:e(()=>({defaultValue:null})),isTabbingBackward:e(()=>({defaultValue:!1})),isClickFocus:e(()=>({defaultValue:!1})),isWithinToolbar:e(()=>({defaultValue:!1}))}},computed:{currentLoopFocus:({context:t,prop:e})=>e("loopFocus")&&!t.get("isWithinToolbar")},entry:["checkIfWithinToolbar"],on:{"VALUE.SET":{actions:["setValue"]},"TOGGLE.CLICK":{actions:["setValue"]},"ROOT.MOUSE_DOWN":{actions:["setClickFocus"]}},states:{idle:{on:{"ROOT.FOCUS":{target:"focused",guard:nm(aA("isClickFocus","isTabbingBackward")),actions:["focusFirstToggle","clearClickFocus"]},"TOGGLE.FOCUS":{target:"focused",actions:["setFocusedId"]}}},focused:{on:{"ROOT.BLUR":{target:"idle",actions:["clearIsTabbingBackward","clearFocusedId","clearClickFocus"]},"TOGGLE.FOCUS":{actions:["setFocusedId"]},"TOGGLE.FOCUS_NEXT":{actions:["focusNextToggle"]},"TOGGLE.FOCUS_PREV":{actions:["focusPrevToggle"]},"TOGGLE.FOCUS_FIRST":{actions:["focusFirstToggle"]},"TOGGLE.FOCUS_LAST":{actions:["focusLastToggle"]},"TOGGLE.SHIFT_TAB":[{guard:nm("isFirstToggleFocused"),target:"idle",actions:["setIsTabbingBackward"]},{actions:["setIsTabbingBackward"]}]}}},implementations:{guards:{isClickFocus:({context:t})=>t.get("isClickFocus"),isTabbingBackward:({context:t})=>t.get("isTabbingBackward"),isFirstToggleFocused:({context:t,scope:e})=>{var n;return t.get("focusedId")===((n=tm(e))==null?void 0:n.id)}},actions:{setIsTabbingBackward({context:t}){t.set("isTabbingBackward",!0)},clearIsTabbingBackward({context:t}){t.set("isTabbingBackward",!1)},setClickFocus({context:t}){t.set("isClickFocus",!0)},clearClickFocus({context:t}){t.set("isClickFocus",!1)},checkIfWithinToolbar({context:t,scope:e}){var n;const r=(n=Xy(e))==null?void 0:n.closest("[role=toolbar]");t.set("isWithinToolbar",!!r)},setFocusedId({context:t,event:e}){t.set("focusedId",e.id)},clearFocusedId({context:t}){t.set("focusedId",null)},setValue({context:t,event:e,prop:n}){C1(e,["value"]);let r=t.get("value");u1(e.value)?r=e.value:n("multiple")?r=a1(r,e.value):r=_s(r,[e.value])&&n("deselectable")?[]:[e.value],t.set("value",r)},focusNextToggle({context:t,scope:e,prop:n}){Ot(()=>{var r;const i=t.get("focusedId");i&&((r=iA(e,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusPrevToggle({context:t,scope:e,prop:n}){Ot(()=>{var r;const i=t.get("focusedId");i&&((r=oA(e,i,n("loopFocus")))==null||r.focus({preventScroll:!0}))})},focusFirstToggle({scope:t}){Ot(()=>{var e;(e=tm(t))==null||e.focus({preventScroll:!0})})},focusLastToggle({scope:t}){Ot(()=>{var e;(e=rA(t))==null||e.focus({preventScroll:!0})})}}}};Kn()(["dir","disabled","getRootNode","id","ids","loopFocus","multiple","onValueChange","orientation","rovingFocus","value","defaultValue","deselectable"]);Kn()(["value","disabled"]);const Zy=Q({__name:"ButtonGroup",props:{modelValue:{},items:{},dropdownItems:{},direction:{default:"horizontal"},multiple:{type:Boolean},disabled:{type:Boolean},getRootNode:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=mi(lA,{id:Qt(),...n,orientation:n.direction,defaultValue:n.modelValue,onValueChange:({value:a})=>{r("update:modelValue",a)},rovingFocus:!0,loopFocus:!0}),o=I(()=>sA(i,fi)),s=H();return xe(()=>{var a;return(a=s.value)==null?void 0:a.isOpen},a=>{a||!o.value.value.includes("dropdown")||o.value.setValue(o.value.value.filter(l=>l!=="dropdown"))}),xe(()=>n.modelValue,a=>{a.every(l=>o.value.value.includes(l))&&a.length===o.value.value.length||o.value.setValue([...a])},{deep:!1}),(a,l)=>(E(),O("div",re({class:["k-buttongroup",`k-buttongroup--direction-${a.direction}`]},o.value.getRootProps()),[L(a.$slots,"default",{getItemProps:o.value.getItemProps},()=>[a.items?(E(!0),O(Oe,{key:0},Mt(a.items,({id:u,...c})=>(E(),z(He,re({class:"k-buttongroup__item",variant:"tertiary",ref_for:!0},{...c,...o.value.getItemProps({value:u})}),null,16))),256)):P("",!0)]),a.dropdownItems||a.$slots.dropdown?(E(),z(wu,re({key:0,ref_key:"dropdown",ref:s,keepOpen:!0,items:a.dropdownItems},o.value.getItemProps({value:"dropdown"})),{default:ee(({close:u})=>[L(a.$slots,"dropdown",{close:u,getItemProps:o.value.getItemProps})]),_:3},16,["items"])):P("",!0)],16))}}),uA=["href"],cA={class:"k-file-thumbnail__info"},dA=["value","disabled"],pA={class:"k-file-thumbnail__info-footer"},hA={key:0,class:"k-file-thumbnail__size"},fA=Q({__name:"Thumbnail",props:{value:{},disabled:{type:Boolean},rename:{type:Boolean},sortable:{type:Boolean},disablePreview:{type:Boolean},icons:{},labels:{}},emits:["rename","delete"],setup(t,{emit:e}){const n=[{pattern:/text.*/,icon:"fa-pro-solid:file-alt"},{pattern:/image.*/,icon:"fa-pro-solid:file-image"},{pattern:/pdf/,icon:"fa-pro-solid:file-pdf"},{pattern:/word/,icon:"fa-pro-solid:file-word"},{pattern:/excel/,icon:"fa-pro-solid:file-excel"},{pattern:/powerpoint/,icon:"fa-pro-solid:file-powerpoint"},{pattern:/octet-stream|zip/,icon:"fa-pro-solid:file-archive"}],r=t,i=I(()=>{let p=[...n,...r.icons].find(f=>r.value.type.match(f.pattern));return p?.icon||"fa-pro-solid:file"}),o=I(()=>r.disabled?"a":"div"),s=I(()=>r.disabled?{click:p=>{p.preventDefault(),gd(r.value)}}:{}),a=I(()=>r.disabled?{title:r.disabled?"Download":null}:{});function l(){r.disabled||gd(r.value)}const u=H(),c=H([]),d=H();function h(){var p;(p=u.value)==null||p.blur()}return(p,f)=>(E(),z(Qe(o.value),re({class:["k-file-thumbnail",{"k-file-thumbnail--clickable":p.disabled}]},a.value,Qg(s.value)),{default:ee(()=>[he(ni,{class:"k-file-thumbnail__preview",gap:"0rem",justify:"center",align:"center"},{default:ee(()=>[L(p.$slots,"icon",{},()=>[!r.disablePreview&&p.value.type.includes("image")&&p.value.url?(E(),O("a",{key:0,href:p.value.url,target:"_blank"},[he(vu,{class:"k-file-thumbnail__preview-image",src:p.value.url,alt:p.value.name,size:"contain",aspectRatio:"1/1"},null,8,["src","alt"])],8,uA)):(E(),z(B(Ze),{key:1,icon:i.value,class:"k-file-thumbnail__preview-icon"},null,8,["icon"]))])]),_:3}),U("div",cA,[U("input",{type:"text",ref_key:"input",ref:u,class:"k-file-thumbnail__name",value:p.value.name,onKeypress:mp(h,["enter"]),disabled:p.disabled||!p.rename,onInput:f[0]||(f[0]=m=>p.$emit("rename",m.target.value))},null,40,dA),U("div",pA,[p.value.size?(E(),O("span",hA,oe(B(Wp)(p.value.size)),1)):P("",!0)])]),he(Zy,{modelValue:c.value,"onUpdate:modelValue":f[1]||(f[1]=m=>{c.value=m.filter(g=>g!=="download")}),disabled:p.disabled},{default:ee(({getItemProps:m})=>[p.value.url?(E(),z(He,re({key:0,is:"a",href:p.value.url,class:"k-file-thumbnail__download",onClick:Wa(l,["prevent"]),icon:"fa-pro-light:arrow-down-to-line",variant:"tertiary"},m({value:"download"})),null,16,["href"])):P("",!0)]),dropdown:ee(({close:m})=>[p.value.url?(E(),z(He,{key:0,is:"a",href:p.value.url,class:"k-file-thumbnail__download",onClick:Wa(l,["prevent"]),iconRight:"fa-pro-light:arrow-down-to-line",label:p.labels.download,variant:"tertiary"},null,8,["href","label"])):P("",!0),he(B(eA),null,{default:ee(({copy:g,copied:b})=>[p.value.url?(E(),z(He,{key:0,class:"k-file-thumbnail__copy",iconRight:"fa-pro-light:copy",label:p.labels.copy,variant:"tertiary",promise:d.value,onClick:()=>{d.value=g(p.value.url)}},null,8,["label","promise","onClick"])):P("",!0)]),_:1}),p.disabled?P("",!0):(E(),z(He,{key:1,variant:"danger",label:p.labels.delete,class:"k-file-thumbnail__delete",iconRight:"fa-pro-light:times",onClick:()=>{p.$emit("delete"),m()}},null,8,["label","onClick"]))]),_:1},8,["modelValue","disabled"]),p.sortable?(E(),z(B(Ze),{key:0,icon:"fa-pro-solid:arrows-alt-v",class:"k-file-thumbnail__handle"})):P("",!0)]),_:3},16,["class"]))}}),mA={key:0,class:"k-file__label-wrapper"},gA={key:1,class:"k-file__sublabel"},DL=Q({__name:"File",props:{modelValue:{},label:{},sublabel:{},multiple:{type:Boolean},sortable:{type:Boolean,default:!0},upload:{type:Function,default:()=>(t,e,n)=>(console.warn("[@kvass-ui/file]: You need to setup the upload function before using this component!"),e(50),new Promise((r,i)=>{let o=new FileReader;o.onloadend=function(){r({url:o.result,type:t.type})},o.readAsDataURL(t)}))},uploadOptions:{},dropMessage:{default:"Drag a file here or <b>browse</b> to upload."},fileSizeError:{default:"The file size exceeds the allowed limit."},rename:{type:Boolean,default:!0},accept:{},serialize:{type:Function,default:t=>t},required:{type:Boolean},disabled:{type:Boolean},disablePreview:{type:Boolean},icons:{default:()=>[]},labels:{default:()=>({delete:"Delete",download:"Download",copy:"Copy link",maxSize:"Maximum size"})}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function i(u){r("update:modelValue",u)}function o(u){r("update:modelValue",n.multiple?(n.modelValue||[]).filter(c=>c!==u):null)}const s=I(()=>n.multiple||!n.modelValue),a=I({get(){return n.modelValue?n.modelValue instanceof Array?n.modelValue:[n.modelValue]:[]},set(u){n.multiple&&i(u)}}),l=rn("k-file",{variants:{}});return(u,c)=>(E(),O("div",{class:Se(B(l)({}))},[u.label||u.sublabel||u.$slots.sublabel||u.$slots.label?(E(),O("div",mA,[u.label||u.$slots.label?(E(),O("label",{key:0,class:Se(["k-file__label",{"k-file__label-required":u.required}])},[L(u.$slots,"label",{},()=>[Be(oe(u.label),1)])],2)):P("",!0),u.sublabel||u.$slots.sublabel?(E(),O("span",gA,[L(u.$slots,"sublabel",{},()=>[Be(oe(u.sublabel),1)])])):P("",!0)])):P("",!0),he(ni,{direction:"column"},{default:ee(()=>[a.value.length?(E(),z(B(Jy),{key:0,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),disabled:!u.multiple||!u.sortable,animation:200,class:"k-file__thumbnails","item-key":"url",handle:".k-file-thumbnail__handle"},{item:ee(({element:d,index:h})=>[(E(),z(fA,{key:d.url||h,disabled:u.disabled,sortable:!u.disabled&&u.sortable&&u.multiple&&a.value.length>1,"disable-preview":u.disablePreview,rename:u.rename===!0,value:u.serialize(d),onRename:p=>d.name=p,onDelete:p=>o(d),icons:u.icons,labels:u.labels},Ms({_:2},[Mt(u.$slots,(p,f)=>({name:f,fn:ee(()=>[L(u.$slots,f,{item:d})])}))]),1032,["disabled","sortable","disable-preview","rename","value","onRename","onDelete","icons","labels"]))]),_:3},8,["modelValue","disabled"])):P("",!0),s.value?(E(),z(QO,{key:1,accept:u.accept,ref:"input",value:u.modelValue,multiple:u.multiple,required:u.required,onInput:i,disabled:u.disabled,"upload-options":u.uploadOptions,upload:u.upload,dropMessage:u.dropMessage,fileSizeError:u.fileSizeError,rename:u.rename,labels:u.labels},{"drop-message":ee(({extensions:d})=>[L(u.$slots,"drop-message",{extensions:d})]),"custom-message":ee(()=>[L(u.$slots,"custom-message")]),_:3},8,["accept","value","multiple","required","disabled","upload-options","upload","dropMessage","fileSizeError","rename","labels"])):P("",!0)]),_:3})],2))}}),Qy=new Set,yt=new WeakMap,to=new WeakMap,oi=new WeakMap,Ed=new WeakMap,vA=new WeakMap,no=new WeakMap,cl=new WeakMap,Fo=new WeakSet;let Cr,Yp=0,Xp=0;const Ln="__aa_tgt",fs="__aa_del",dl="__aa_new",yA=t=>{const e=CA(t);e&&e.forEach(n=>SA(n))},bA=t=>{t.forEach(e=>{e.target===Cr&&wA(),yt.has(e.target)&&vi(e.target)})};function kA(t){const e=Ed.get(t);e?.disconnect();let n=yt.get(t),r=0;const i=5;n||(n=ro(t),yt.set(t,n));const{offsetWidth:o,offsetHeight:s}=Cr,a=[n.top-i,o-(n.left+i+n.width),s-(n.top+i+n.height),n.left-i].map(u=>`${-1*Math.floor(u)}px`).join(" "),l=new IntersectionObserver(()=>{++r>1&&vi(t)},{root:Cr,threshold:1,rootMargin:a});l.observe(t),Ed.set(t,l)}function vi(t){clearTimeout(cl.get(t));const e=Ou(t),n=ms(e)?500:e.duration;cl.set(t,setTimeout(async()=>{const r=oi.get(t);try{await r?.finished,yt.set(t,ro(t)),kA(t)}catch{}},n))}function wA(){clearTimeout(cl.get(Cr)),cl.set(Cr,setTimeout(()=>{Qy.forEach(t=>rb(t,e=>eb(()=>vi(e))))},100))}function xA(t){setTimeout(()=>{vA.set(t,setInterval(()=>eb(vi.bind(null,t)),2e3))},Math.round(2e3*Math.random()))}function eb(t){typeof requestIdleCallback=="function"?requestIdleCallback(()=>t()):requestAnimationFrame(()=>t())}let Cd,Ko;const EA=typeof window<"u"&&"ResizeObserver"in window;EA&&(Cr=document.documentElement,Cd=new MutationObserver(yA),Ko=new ResizeObserver(bA),window.addEventListener("scroll",()=>{Xp=window.scrollY,Yp=window.scrollX}),Ko.observe(Cr));function CA(t){return t.reduce((e,n)=>[...e,...Array.from(n.addedNodes),...Array.from(n.removedNodes)],[]).every(e=>e.nodeName==="#comment")?!1:t.reduce((e,n)=>{if(e===!1)return!1;if(n.target instanceof Element){if(hc(n.target),!e.has(n.target)){e.add(n.target);for(let r=0;r<n.target.children.length;r++){const i=n.target.children.item(r);if(i){if(fs in i)return!1;hc(n.target,i),e.add(i)}}}if(n.removedNodes.length)for(let r=0;r<n.removedNodes.length;r++){const i=n.removedNodes[r];if(fs in i)return!1;i instanceof Element&&(e.add(i),hc(n.target,i),to.set(i,[n.previousSibling,n.nextSibling]))}}return e},new Set)}function hc(t,e){!e&&!(Ln in t)?Object.defineProperty(t,Ln,{value:t}):e&&!(Ln in e)&&Object.defineProperty(e,Ln,{value:t})}function SA(t){var e;const n=t.isConnected,r=yt.has(t);n&&to.has(t)&&to.delete(t),oi.has(t)&&((e=oi.get(t))===null||e===void 0||e.cancel()),dl in t?rm(t):r&&n?OA(t):r&&!n?AA(t):rm(t)}function un(t){return Number(t.replace(/[^0-9.\-]/g,""))}function TA(t){let e=t.parentElement;for(;e;){if(e.scrollLeft||e.scrollTop)return{x:e.scrollLeft,y:e.scrollTop};e=e.parentElement}return{x:0,y:0}}function ro(t){const e=t.getBoundingClientRect(),{x:n,y:r}=TA(t);return{top:e.top+r,left:e.left+n,width:e.width,height:e.height}}function tb(t,e,n){let r=e.width,i=e.height,o=n.width,s=n.height;const a=getComputedStyle(t);if(a.getPropertyValue("box-sizing")==="content-box"){const l=un(a.paddingTop)+un(a.paddingBottom)+un(a.borderTopWidth)+un(a.borderBottomWidth),u=un(a.paddingLeft)+un(a.paddingRight)+un(a.borderRightWidth)+un(a.borderLeftWidth);r-=u,o-=u,i-=l,s-=l}return[r,o,i,s].map(Math.round)}function Ou(t){return Ln in t&&no.has(t[Ln])?no.get(t[Ln]):{duration:250,easing:"ease-in-out"}}function nb(t){if(Ln in t)return t[Ln]}function Zp(t){const e=nb(t);return e?Fo.has(e):!1}function rb(t,...e){e.forEach(n=>n(t,no.has(t)));for(let n=0;n<t.children.length;n++){const r=t.children.item(n);r&&e.forEach(i=>i(r,no.has(r)))}}function Qp(t){return Array.isArray(t)?t:[t]}function ms(t){return typeof t=="function"}function OA(t){const e=yt.get(t),n=ro(t);if(!Zp(t))return yt.set(t,n);let r;if(!e)return;const i=Ou(t);if(typeof i!="function"){const o=e.left-n.left,s=e.top-n.top,[a,l,u,c]=tb(t,e,n),d={transform:`translate(${o}px, ${s}px)`},h={transform:"translate(0, 0)"};a!==l&&(d.width=`${a}px`,h.width=`${l}px`),u!==c&&(d.height=`${u}px`,h.height=`${c}px`),r=t.animate([d,h],{duration:i.duration,easing:i.easing})}else{const[o]=Qp(i(t,"remain",e,n));r=new Animation(o),r.play()}oi.set(t,r),yt.set(t,n),r.addEventListener("finish",vi.bind(null,t))}function rm(t){dl in t&&delete t[dl];const e=ro(t);yt.set(t,e);const n=Ou(t);if(!Zp(t))return;let r;if(typeof n!="function")r=t.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"});else{const[i]=Qp(n(t,"add",e));r=new Animation(i),r.play()}oi.set(t,r),r.addEventListener("finish",vi.bind(null,t))}function im(t,e){var n;t.remove(),yt.delete(t),to.delete(t),oi.delete(t),(n=Ed.get(t))===null||n===void 0||n.disconnect(),setTimeout(()=>{if(fs in t&&delete t[fs],Object.defineProperty(t,dl,{value:!0,configurable:!0}),e&&t instanceof HTMLElement)for(const r in e)t.style[r]=""},0)}function AA(t){var e;if(!to.has(t)||!yt.has(t))return;const[n,r]=to.get(t);Object.defineProperty(t,fs,{value:!0,configurable:!0});const i=window.scrollX,o=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(t,r):n&&n.parentNode?n.parentNode.appendChild(t):(e=nb(t))===null||e===void 0||e.appendChild(t),!Zp(t))return im(t);const[s,a,l,u]=_A(t),c=Ou(t),d=yt.get(t);(i!==Yp||o!==Xp)&&MA(t,i,o,c);let h,p={position:"absolute",top:`${s}px`,left:`${a}px`,width:`${l}px`,height:`${u}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!ms(c))Object.assign(t.style,p),h=t.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:c.duration,easing:"ease-out"});else{const[f,m]=Qp(c(t,"remove",d));m?.styleReset!==!1&&(p=m?.styleReset||p,Object.assign(t.style,p)),h=new Animation(f),h.play()}oi.set(t,h),h.addEventListener("finish",im.bind(null,t,p))}function MA(t,e,n,r){const i=Yp-e,o=Xp-n,s=document.documentElement.style.scrollBehavior;if(getComputedStyle(Cr).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+i,window.scrollY+o),!t.parentElement)return;const a=t.parentElement;let l=a.clientHeight,u=a.clientWidth;const c=performance.now();function d(){requestAnimationFrame(()=>{if(!ms(r)){const h=l-a.clientHeight,p=u-a.clientWidth;c+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-h}),l=a.clientHeight,u=a.clientWidth,d()):document.documentElement.style.scrollBehavior=s}})}d()}function _A(t){const e=yt.get(t),[n,,r]=tb(t,e,ro(t));let i=t.parentElement;for(;i&&(getComputedStyle(i).position==="static"||i instanceof HTMLBodyElement);)i=i.parentElement;i||(i=document.body);const o=getComputedStyle(i),s=yt.get(i)||ro(i),a=Math.round(e.top-s.top)-un(o.borderTopWidth),l=Math.round(e.left-s.left)-un(o.borderLeftWidth);return[a,l,n,r]}function DA(t,e={}){return Cd&&Ko&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!ms(e)&&!e.disrespectUserMotionPreference||(Fo.add(t),getComputedStyle(t).position==="static"&&Object.assign(t.style,{position:"relative"}),rb(t,vi,xA,n=>Ko?.observe(n)),ms(e)?no.set(t,e):no.set(t,{duration:250,easing:"ease-in-out",...e}),Cd.observe(t,{childList:!0}),Qy.add(t))),Object.freeze({parent:t,enable:()=>{Fo.add(t)},disable:()=>{Fo.delete(t)},isEnabled:()=>Fo.has(t)})}const om={mounted:(t,e)=>{DA(t,e.value||{})},getSSRProps:()=>({})},IA=["disabled"],NA={key:0,class:"k-expandable__title"},RA={key:1,class:"k-expandable__subtitle"},PA={key:2,class:"k-expandable__actions"},IL=Q({__name:"Expandable",props:{title:{},subtitle:{},disabled:{type:Boolean,default:!1},expandable:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1},variant:{default:"border"},gap:{default:"1rem"}},setup(t){const e=t,n=pp(),r=I(()=>n.actions),i=I(()=>n.footer),o=I(()=>n.default),s=H(e.expanded),a=()=>{!e.expandable||!o.value||(s.value=!s.value)},l=rn("k-expandable",{variants:{disabled:{true:"k-expandable--disabled"},expandable:{true:"k-expandable--expandable"},expanded:{true:"k-expandable--expanded",false:"k-expandable--collapsed"},variant:{shadow:"k-expandable--variant-shadow",flat:"k-expandable--variant-flat",border:"k-expandable--variant-border"}}});return(u,c)=>qa((E(),O("fieldset",{disabled:u.disabled,class:Se(B(l)({disabled:u.disabled,expandable:u.expandable,expanded:s.value,variant:u.variant}))},[he(He,{class:Se(["k-expandable__header",{"k-expandable__header--open":s.value}]),is:"legend",tabindex:"0",onKeydown:mp(a,["enter"]),onClick:a,variant:"tertiary"},Ms({default:ee(()=>[u.$slots.title||u.title?(E(),O("span",NA,[L(u.$slots,"title",{},()=>[Be(oe(u.title),1)])])):P("",!0),u.$slots.subtitle||u.subtitle?(E(),O("span",RA,[L(u.$slots,"subtitle",{},()=>[Be(oe(u.subtitle),1)])])):P("",!0),r.value?(E(),O("span",PA,[L(u.$slots,"actions")])):P("",!0)]),_:2},[u.expandable?{name:"icon-left",fn:ee(()=>[he(B(Ze),{class:"k-expandable__icon",icon:s.value?"fa-pro-regular:angle-up":"fa-pro-regular:angle-down"},null,8,["icon"])]),key:"0"}:void 0]),1032,["class"]),s.value&&o.value?(E(),O(Oe,{key:0},[qa((E(),z(ni,{class:"k-expandable__content",direction:"column",gap:u.gap},{default:ee(()=>[L(u.$slots,"default")]),_:3},8,["gap"])),[[B(om)]]),i.value?(E(),z(ni,{key:0,justify:"center",align:"center",class:"k-expandable__footer"},{default:ee(()=>[L(u.$slots,"footer")]),_:3})):P("",!0)],64)):P("",!0)],10,IA)),[[B(om)]])}});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,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Je(o)},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),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Je(i)},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 ib(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=ib(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function ob(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=ob(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class D{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,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new D(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new D(r,i)}cutByIndex(e,n){return e==n?D.empty:e==0&&n==this.content.length?this:new D(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new D(i,o)}addToStart(e){return new D([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new D(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 i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return ib(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return ob(this,e,n,r)}findIndex(e,n=-1){if(e==0)return ha(0,e);if(e==this.size)return ha(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||n>0?ha(r+1,s):ha(r,i);i=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 D.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new D(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return D.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new D(n||e,r)}static from(e){if(!e)return D.empty;if(e instanceof D)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new D([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}D.empty=new D([],0);const fc={index:0,offset:0};function ha(t,e){return fc.index=t,fc.offset=e,fc}function pl(t,e){if(t===e)return!0;if(!(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(!pl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!pl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let ke=class Sd{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}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&&pl(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 i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}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 Sd.none;if(e instanceof Sd)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};ke.none=[];class hl extends Error{}class V{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=ab(this.content,e+this.openStart,n);return r&&new V(r,this.openStart,this.openEnd)}removeBetween(e,n){return new V(sb(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 V.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new V(D.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new V(e,r,i)}}V.empty=new V(D.empty,0,0);function sb(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(sb(o.content,e-i-1,n-i-1)))}function ab(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=ab(s.content,e-o-1,n);return a&&t.replaceChild(i,s.copy(a))}function FA(t,e,n){if(n.openStart>t.depth)throw new hl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new hl("Inconsistent open depths");return lb(t,e,n,0)}function lb(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=lb(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return Yr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=LA(n,t);return Yr(o,cb(t,s,a,e,r))}else return Yr(o,fl(t,e,r))}function ub(t,e){if(!e.type.compatibleContent(t.type))throw new hl("Cannot join "+e.type.name+" onto "+t.type.name)}function Td(t,e,n){let r=t.node(n);return ub(r,e.node(n)),r}function Jr(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 Go(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(Jr(t.nodeAfter,r),o++));for(let a=o;a<s;a++)Jr(i.child(a),r);e&&e.depth==n&&e.textOffset&&Jr(e.nodeBefore,r)}function Yr(t,e){return t.type.checkContent(e),t.copy(e)}function cb(t,e,n,r,i){let o=t.depth>i&&Td(t,e,i+1),s=r.depth>i&&Td(n,r,i+1),a=[];return Go(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(ub(o,s),Jr(Yr(o,cb(t,e,n,r,i+1)),a)):(o&&Jr(Yr(o,fl(t,e,i+1)),a),Go(e,n,i,a),s&&Jr(Yr(s,fl(n,r,i+1)),a)),Go(r,null,i,a),new D(a)}function fl(t,e,n){let r=[];if(Go(null,t,n,r),t.depth>n){let i=Td(t,e,n+1);Jr(Yr(i,fl(t,e,n+1)),r)}return Go(e,null,n,r),new D(r)}function LA(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)r=e.node(i).copy(D.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}class gs{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],i=e.child(n);return r?e.child(n).cut(r):i}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],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return ke.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 ml(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=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new gs(n,r,o)}static resolveCached(e,n){let r=sm.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else sm.set(e,r=new BA);let i=r.elts[r.i]=gs.resolve(e,n);return r.i=(r.i+1)%VA,i}}class BA{constructor(){this.elts=[],this.i=0}}const VA=12,sm=new WeakMap;class ml{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 $A=Object.create(null);let gr=class Od{constructor(e,n,r,i=ke.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||D.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,i=0){this.content.nodesBetween(e,n,r,i,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,i){return this.content.textBetween(e,n,r,i)}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&&pl(this.attrs,n||e.defaultAttrs||$A)&&ke.sameSet(this.marks,r||ke.none)}copy(e=null){return e==this.content?this:new Od(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Od(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 V.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new V(l,i.depth-s,o.depth-s)}replace(e,n,r){return FA(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+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 i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return gs.resolveCached(this,e)}resolveNoCache(e){return gs.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}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()+")"),db(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=D.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.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=ke.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(!ke.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 i=D.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};gr.prototype.text=void 0;class gl extends gr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):db(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 gl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new gl(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 db(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class si{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new jA(e,n);if(r.next==null)return si.empty;let i=pb(r);r.next&&r.err("Unexpected trailing text");let o=GA(KA(i));return JA(o,r),o}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 i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}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 i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return D.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null}return o(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 i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.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 i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
9
9
  `)}}si.empty=new si(!0);class jA{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 pb(t){let e=[];do e.push(zA(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function zA(t){let e=[];do e.push(HA(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function HA(t){let e=UA(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=qA(t,e);else break;return e}function am(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function qA(t,e){let n=am(t),r=n;return t.eat(",")&&(t.next!="}"?r=am(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function WA(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function UA(t){if(t.eat("(")){let e=pb(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=WA(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 KA(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let u={term:l,to:a};return e[s].push(u),u}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;i(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let c=n();i(o(s.expr,l),c),l=c}if(s.max==-1)i(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();r(l,c),i(o(s.expr,l),c),l=c}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function hb(t,e){return e-t}function lm(t,e){let n=[];return r(e),n.sort(hb);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function GA(t){let e=Object.create(null);return n(lm(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<i.length;c++)i[c][0]==a&&(u=i[c][1]);lm(t,l).forEach(c=>{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=e[r.join(",")]=new si(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(hb);o.next.push({type:i[s][0],next:e[a.join(",")]||n(a)})}return o}}function JA(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:u}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(u)==-1&&r.push(u)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function fb(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 mb(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function gb(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function vb(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new XA(t,r,e[r]);return n}let um=class yb{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=vb(e,r.attrs),this.defaultAttrs=fb(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==si.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:mb(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new gr(this,this.computeAttrs(e),D.from(n),ke.setFrom(r))}createChecked(e=null,n,r){return n=D.from(n),this.checkContent(n),new gr(this,this.computeAttrs(e),n,ke.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=D.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(D.empty,!0);return o?new gr(this,e,n.append(o),ke.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){gb(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:ke.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new yb(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function YA(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class XA{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?YA(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Au{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=vb(e,i.attrs),this.excluded=null;let o=fb(this.attrs);this.instance=o?new ke(this,o):null}create(e=null){return!e&&this.instance?this.instance:new ke(this,mb(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Au(o,i++,n,s)),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){gb(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class bb{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Je.from(e.nodes),n.marks=Je.from(e.marks||{}),this.nodes=um.compile(this.spec.nodes,this),this.marks=Au.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=si.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?cm(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:cm(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof um){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,i)}text(e,n){let r=this.nodes.text;return new gl(r,r.defaultAttrs,e,ke.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return gr.fromJSON(this,e)}markFromJSON(e){return ke.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function cm(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function ZA(t){return t.tag!=null}function QA(t){return t.style!=null}class vr{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(ZA(i))this.tags.push(i);else if(QA(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new pm(this,n,!1);return r.addAll(e,ke.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new pm(this,n,!0);return r.addAll(e,ke.none,n.from,n.to),V.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(nM(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=hm(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=hm(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new vr(e,vr.schemaRules(e)))}}const kb={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},eM={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},wb={ol:!0,ul:!0},vs=1,Ad=2,Jo=4;function dm(t,e,n){return e!=null?(e?vs:0)|(e==="full"?Ad:0):t&&t.whitespace=="pre"?vs|Ad:n&~Jo}class fa{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ke.none,this.match=o||(s&Jo?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(D.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&vs)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=D.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(D.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&&!kb.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class pm{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,s=dm(null,n.preserveWhitespace,0)|(r?Jo:0);i?o=new fa(i.type,i.attrs,ke.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new fa(null,null,ke.none,!0,null,s):o=new fa(e.schema.topNodeType,null,ke.none,!0,null,s),this.nodes=[o],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,i=this.top,o=i.options&Ad?"full":this.localPreserveWS||(i.options&vs)>0;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)o!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
10
10
  `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;wb.hasOwnProperty(s)&&this.parser.normalizeLists&&tM(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:eM.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(kb.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
11
11
  `),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 i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,o=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=ke.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):fm(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=dm(e,o,s.options);s.options&Jo&&s.content.length==0&&(a|=Jo);let l=ke.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):fm(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new fa(e,n,l,i,null,a)),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|=vs)}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 i=r.length-1;i>=0;i--)e+=r[i].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 i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].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,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(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 tM(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&wb.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function nM(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function hm(t){let e={};for(let n in t)e[n]=t[n];return e}function fm(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class yi{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=mc(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Ba(mc(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Ba(mc(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Ba(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new yi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=mm(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return mm(e.marks)}}function mm(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function mc(t){return t.document||window.document}const gm=new WeakMap;function rM(t){let e=gm.get(t);return e===void 0&&gm.set(t,e=iM(t)),e}function iM(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 i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Ba(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=rM(r))&&o.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 s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,l=n?t.createElementNS(n,i):t.createElement(i),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 h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:f}=Ba(t,h,n,r);if(l.appendChild(p),f){if(a)throw new RangeError("Multiple content holes");a=f}}}return{dom:l,contentDOM:a}}const xb=65535,Eb=Math.pow(2,16);function oM(t,e){return t+e*Eb}function vm(t){return t&xb}function sM(t){return(t-(t&xb))/Eb}const Cb=1,Sb=2,Va=4,Tb=8;class Md{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Tb)>0}get deletedBefore(){return(this.delInfo&(Cb|Va))>0}get deletedAfter(){return(this.delInfo&(Sb|Va))>0}get deletedAcross(){return(this.delInfo&Va)>0}}class Tt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Tt.empty)return Tt.empty}recover(e){let n=0,r=vm(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+sM(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=u?e==l?-1:e==d?1:n:n,p=l+i+(h<0?0:c);if(r)return p;let f=e==(n<0?l:d)?null:oM(a/3,e-l),m=e==l?Sb:e==d?Cb:Va;return(n<0?e!=l:e!=d)&&(m|=Tb),new Md(p,m,f)}i+=c-u}return r?e+i:new Md(e+i,0,null)}touches(e,n){let r=0,i=vm(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o],c=l+u;if(e<=c&&a==i*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+n],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new Tt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Tt.empty:new Tt(e<0?[0,-e,0]:[0,0,e])}}Tt.empty=new Tt([]);class ys{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ys(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 i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i: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 i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new ys;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 i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Md(e,i,null)}}const gc=Object.create(null);class at{getMap(){return Tt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=gc[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 gc)throw new RangeError("Duplicate use of step JSON ID "+e);return gc[e]=n,n.prototype.jsonID=e,n}}class Le{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Le(e,null)}static fail(e){return new Le(null,e)}static fromReplace(e,n,r,i){try{return Le.ok(e.replace(n,r,i))}catch(o){if(o instanceof hl)return Le.fail(o.message);throw o}}}function eh(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(eh(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return D.fromArray(r)}class ur extends at{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),i=r.node(r.sharedDepth(this.to)),o=new V(eh(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Le.fromReplace(e,this.from,this.to,o)}invert(){return new gn(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 ur(n.pos,r.pos,this.mark)}merge(e){return e instanceof ur&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ur(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 ur(n.from,n.to,e.markFromJSON(n.mark))}}at.jsonID("addMark",ur);class gn extends at{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 V(eh(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Le.fromReplace(e,this.from,this.to,r)}invert(){return new ur(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 gn(n.pos,r.pos,this.mark)}merge(e){return e instanceof gn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new gn(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 gn(n.from,n.to,e.markFromJSON(n.mark))}}at.jsonID("removeMark",gn);class cr extends at{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Le.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Le.fromReplace(e,this.pos,this.pos+1,new V(D.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 i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new cr(this.pos,n.marks[i]);return new cr(this.pos,this.mark)}}return new ai(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new cr(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 cr(n.pos,e.markFromJSON(n.mark))}}at.jsonID("addNodeMark",cr);class ai extends at{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Le.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Le.fromReplace(e,this.pos,this.pos+1,new V(D.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new cr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ai(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 ai(n.pos,e.markFromJSON(n.mark))}}at.jsonID("removeNodeMark",ai);class ze extends at{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&_d(e,this.from,this.to)?Le.fail("Structure replace would overwrite content"):Le.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Tt([this.from,this.to-this.from,this.slice.size])}invert(e){return new ze(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new ze(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof ze)||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?V.empty:new V(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ze(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?V.empty:new V(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ze(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 ze(n.from,n.to,V.fromJSON(e,n.slice),!!n.structure)}}at.jsonID("replace",ze);class qe extends at{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(_d(e,this.from,this.gapFrom)||_d(e,this.gapTo,this.to)))return Le.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Le.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Le.fromReplace(e,this.from,this.to,r):Le.fail("Content does not fit in gap")}getMap(){return new Tt([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 qe(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),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new qe(n.pos,r.pos,i,o,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 qe(n.from,n.to,n.gapFrom,n.gapTo,V.fromJSON(e,n.slice),n.insert,!!n.structure)}}at.jsonID("replaceAround",qe);function _d(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function aM(t,e,n,r){let i=[],o=[],s,a;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let h=Math.max(u,e),p=Math.min(u+l.nodeSize,n),f=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(f)||(s&&s.to==h&&s.mark.eq(d[m])?s.to=p:i.push(s=new gn(h,p,d[m])));a&&a.to==h?a.to=p:o.push(a=new ur(h,p,r))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function lM(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof Au){let u=s.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],h;for(let p=0;p<i.length;p++){let f=i[p];f.step==o-1&&d.eq(i[p].style)&&(h=f)}h?(h.to=u,h.step=o):i.push({style:d,from:Math.max(a,e),to:u,step:o})}}}),i.forEach(s=>t.step(new gn(s.from,s.to,s.style)))}function th(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(!d)s.push(new ze(a,c,V.empty));else{r=d;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||t.step(new gn(a,c,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,f;for(;h=p.exec(u.text);)f||(f=new V(D.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new ze(a+h.index,a+h.index+h[0].length,f))}}a=c}if(!r.validEnd){let l=r.fillBefore(D.empty,!0);t.replace(a,a,new V(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function uM(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function mo(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(n==0||r.type.spec.isolating||!uM(r,i,o))break}return null}function cM(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,u=a,c=D.empty,d=0;for(let f=o,m=!1;f>n;f--)m||r.index(f)>0?(m=!0,c=D.from(r.node(f).copy(c)),d++):l--;let h=D.empty,p=0;for(let f=o,m=!1;f>n;f--)m||i.after(f+1)<i.end(f)?(m=!0,h=D.from(i.node(f).copy(h)),p++):u++;t.step(new qe(l,u,s,a,new V(c.append(h),d,p),c.size-d,!0))}function nh(t,e,n=null,r=t){let i=dM(t,e),o=i&&pM(r,e);return o?i.map(ym).concat({type:e,attrs:n}).concat(o.map(ym)):null}function ym(t){return{type:t,attrs:null}}function dM(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}function pM(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let l=r;a&&l<i;l++)a=a.matchType(n.child(l).type);return!a||!a.validEnd?null:s}function hM(t,e,n){let r=D.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=D.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new qe(i,o,i,o,new V(r,0,0),n.length,!0))}function fM(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&mM(t.doc,t.mapping.slice(o).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",f=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!f?u=!1:!p&&f&&(u=!0)}u===!1&&Ab(t,s,a,o),th(t,t.mapping.slice(o).map(a,1),r,void 0,u===null);let c=t.mapping.slice(o),d=c.map(a,1),h=c.map(a+s.nodeSize,1);return t.step(new qe(d,h,d+1,h-1,new V(D.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&Ob(t,s,a,o),!1}})}function Ob(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Ab(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
@@ -93,7 +93,7 @@ img.ProseMirror-separator {
93
93
  opacity: 0
94
94
  }`;function FN(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}let LN=class extends UD{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:e,slice:n,moved:r})=>this.options.onDrop(e,n,r)),this.on("paste",({event:e,slice:n})=>this.options.onPaste(e,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=FN(PN,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=S0(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;n=n.filter(s=>!s.key.startsWith(o))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[MN,aI.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||e===void 0?void 0:e.blockSeparator}),ON,DN,IN,RN,AN,NN].filter(r=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[r.name]!==!1:!0):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new qi(n,this)}createCommandManager(){this.commandManager=new Fu({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let e;try{e=zd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),e=zd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=A0(e,this.options.autofocus);this.view=new uD(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Hi.create({doc:e,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(o=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(o)});return}const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),i=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return N0(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return sN(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return mh(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
95
95
 
96
- `,textSerializers:n={}}=t||{};return I0(this.state.doc,{blockSeparator:e,textSerializers:{...vh(this.schema),...n}})}get isEmpty(){return ju(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new zr(e,this)}get $doc(){return this.$pos(0)}};function lo(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=pe(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(xh(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(p=>p===t.type&&p!==h.mark.type)).filter(h=>h.to>u).length)return null;c<n.to&&o.delete(c,n.to),u>n.from&&o.delete(n.from+l,u);const d=n.from+l+s.length;o.addMark(n.from+l,d,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function BN(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=pe(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let c=s+u;c>a?c=a:a=c+r[1].length;const d=r[0][r[0].length-1];o.insertText(d,s+r[0].length-1),o.replaceWith(c,a,l)}else if(r[0]){const u=t.type.isInline?s:s-1;o.insert(u,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function qd(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=pe(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function Cs(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=pe(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&nh(a,t.type,o);if(!l)return null;if(s.wrap(a,l),t.keepMarks&&t.editor){const{selection:c,storedMarks:d}=e,{splittableMarks:h}=t.editor.extensionManager,p=d||c.$to.parentOffset&&c.$from.marks();if(p){const f=p.filter(m=>h.includes(m.type.name));s.ensureMarks(f)}}if(t.keepAttributes){const c=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(c,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Tr(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)}})}let on=class Wd{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=pe(W(this,"addOptions",{name:this.name}))),this.storage=pe(W(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Wd(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Vu(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Wd(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=pe(W(n,"addOptions",{name:n.name})),n.storage=pe(W(n,"addStorage",{name:n.name,options:n.options})),n}};function ci(t){return new tI({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=pe(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const c=l.search(/\S/),d=n.from+l.indexOf(a),h=d+a.length;if(xh(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(f=>f===t.type&&f!==p.mark.type)).filter(p=>p.to>d).length)return null;h<n.to&&s.delete(h,n.to),d>n.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}var kt="top",Ht="bottom",qt="right",wt="left",Eh="auto",$s=[kt,Ht,qt,wt],uo="start",Ss="end",VN="clippingParents",F0="viewport",Oo="popper",$N="reference",pg=$s.reduce(function(t,e){return t.concat([e+"-"+uo,e+"-"+Ss])},[]),L0=[].concat($s,[Eh]).reduce(function(t,e){return t.concat([e,e+"-"+uo,e+"-"+Ss])},[]),jN="beforeRead",zN="read",HN="afterRead",qN="beforeMain",WN="main",UN="afterMain",KN="beforeWrite",GN="write",JN="afterWrite",YN=[jN,zN,HN,qN,WN,UN,KN,GN,JN];function Sn(t){return t?(t.nodeName||"").toLowerCase():null}function Dt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function di(t){var e=Dt(t).Element;return t instanceof e||t instanceof Element}function zt(t){var e=Dt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ch(t){if(typeof ShadowRoot>"u")return!1;var e=Dt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function XN(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!zt(o)||!Sn(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function ZN(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!zt(i)||!Sn(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const B0={name:"applyStyles",enabled:!0,phase:"write",fn:XN,effect:ZN,requires:["computeStyles"]};function bn(t){return t.split("-")[0]}var Qr=Math.max,Sl=Math.min,co=Math.round;function Ud(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function V0(){return!/^((?!chrome|android).)*safari/i.test(Ud())}function po(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&zt(t)&&(i=t.offsetWidth>0&&co(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&co(r.height)/t.offsetHeight||1);var s=di(t)?Dt(t):window,a=s.visualViewport,l=!V0()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,h=r.height/o;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Sh(t){var e=po(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function $0(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Ch(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Un(t){return Dt(t).getComputedStyle(t)}function QN(t){return["table","td","th"].indexOf(Sn(t))>=0}function Mr(t){return((di(t)?t.ownerDocument:t.document)||window.document).documentElement}function zu(t){return Sn(t)==="html"?t:t.assignedSlot||t.parentNode||(Ch(t)?t.host:null)||Mr(t)}function hg(t){return!zt(t)||Un(t).position==="fixed"?null:t.offsetParent}function eR(t){var e=/firefox/i.test(Ud()),n=/Trident/i.test(Ud());if(n&&zt(t)){var r=Un(t);if(r.position==="fixed")return null}var i=zu(t);for(Ch(i)&&(i=i.host);zt(i)&&["html","body"].indexOf(Sn(i))<0;){var o=Un(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function js(t){for(var e=Dt(t),n=hg(t);n&&QN(n)&&Un(n).position==="static";)n=hg(n);return n&&(Sn(n)==="html"||Sn(n)==="body"&&Un(n).position==="static")?e:n||eR(t)||e}function Th(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Zo(t,e,n){return Qr(t,Sl(e,n))}function tR(t,e,n){var r=Zo(t,e,n);return r>n?n:r}function j0(){return{top:0,right:0,bottom:0,left:0}}function z0(t){return Object.assign({},j0(),t)}function H0(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var nR=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,z0(typeof t!="number"?t:H0(t,$s))};function rR(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=bn(n.placement),l=Th(a),u=[wt,qt].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!s)){var d=nR(i.padding,n),h=Sh(o),p=l==="y"?kt:wt,f=l==="y"?Ht:qt,m=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],b=js(o),y=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,k=m/2-g/2,v=d[p],w=y-h[c]-d[f],x=y/2-h[c]/2+k,C=Zo(v,x,w),M=l;n.modifiersData[r]=(e={},e[M]=C,e.centerOffset=C-x,e)}}function iR(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||$0(e.elements.popper,i)&&(e.elements.arrow=i))}const oR={name:"arrow",enabled:!0,phase:"main",fn:rR,effect:iR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ho(t){return t.split("-")[1]}var sR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aR(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:co(n*i)/i||0,y:co(r*i)/i||0}}function fg(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=s.x,p=h===void 0?0:h,f=s.y,m=f===void 0?0:f,g=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var b=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),k=wt,v=kt,w=window;if(u){var x=js(n),C="clientHeight",M="clientWidth";if(x===Dt(n)&&(x=Mr(n),Un(x).position!=="static"&&a==="absolute"&&(C="scrollHeight",M="scrollWidth")),x=x,i===kt||(i===wt||i===qt)&&o===Ss){v=Ht;var T=d&&x===w&&w.visualViewport?w.visualViewport.height:x[C];m-=T-r.height,m*=l?1:-1}if(i===wt||(i===kt||i===Ht)&&o===Ss){k=qt;var A=d&&x===w&&w.visualViewport?w.visualViewport.width:x[M];p-=A-r.width,p*=l?1:-1}}var _=Object.assign({position:a},u&&sR),N=c===!0?aR({x:p,y:m},Dt(n)):{x:p,y:m};if(p=N.x,m=N.y,l){var $;return Object.assign({},_,($={},$[v]=y?"0":"",$[k]=b?"0":"",$.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",$))}return Object.assign({},_,(e={},e[v]=y?m+"px":"",e[k]=b?p+"px":"",e.transform="",e))}function lR(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:bn(e.placement),variation:ho(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,fg(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,fg(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const uR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:lR,data:{}};var ka={passive:!0};function cR(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Dt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,ka)}),a&&l.addEventListener("resize",n.update,ka),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,ka)}),a&&l.removeEventListener("resize",n.update,ka)}}const dR={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:cR,data:{}};var pR={left:"right",right:"left",bottom:"top",top:"bottom"};function ja(t){return t.replace(/left|right|bottom|top/g,function(e){return pR[e]})}var hR={start:"end",end:"start"};function mg(t){return t.replace(/start|end/g,function(e){return hR[e]})}function Oh(t){var e=Dt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ah(t){return po(Mr(t)).left+Oh(t).scrollLeft}function fR(t,e){var n=Dt(t),r=Mr(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=V0();(u||!u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Ah(t),y:l}}function mR(t){var e,n=Mr(t),r=Oh(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Qr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Qr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Ah(t),l=-r.scrollTop;return Un(i||n).direction==="rtl"&&(a+=Qr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Mh(t){var e=Un(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function q0(t){return["html","body","#document"].indexOf(Sn(t))>=0?t.ownerDocument.body:zt(t)&&Mh(t)?t:q0(zu(t))}function Qo(t,e){var n;e===void 0&&(e=[]);var r=q0(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Dt(r),s=i?[o].concat(o.visualViewport||[],Mh(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(Qo(zu(s)))}function Kd(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gR(t,e){var n=po(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function gg(t,e,n){return e===F0?Kd(fR(t,n)):di(e)?gR(e,n):Kd(mR(Mr(t)))}function vR(t){var e=Qo(zu(t)),n=["absolute","fixed"].indexOf(Un(t).position)>=0,r=n&&zt(t)?js(t):t;return di(r)?e.filter(function(i){return di(i)&&$0(i,r)&&Sn(i)!=="body"}):[]}function yR(t,e,n,r){var i=e==="clippingParents"?vR(t):[].concat(e),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,u){var c=gg(t,u,r);return l.top=Qr(c.top,l.top),l.right=Sl(c.right,l.right),l.bottom=Sl(c.bottom,l.bottom),l.left=Qr(c.left,l.left),l},gg(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function W0(t){var e=t.reference,n=t.element,r=t.placement,i=r?bn(r):null,o=r?ho(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case kt:l={x:s,y:e.y-n.height};break;case Ht:l={x:s,y:e.y+e.height};break;case qt:l={x:e.x+e.width,y:a};break;case wt:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=i?Th(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case uo:l[u]=l[u]-(e[c]/2-n[c]/2);break;case Ss:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function Ts(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?VN:a,u=n.rootBoundary,c=u===void 0?F0:u,d=n.elementContext,h=d===void 0?Oo:d,p=n.altBoundary,f=p===void 0?!1:p,m=n.padding,g=m===void 0?0:m,b=z0(typeof g!="number"?g:H0(g,$s)),y=h===Oo?$N:Oo,k=t.rects.popper,v=t.elements[f?y:h],w=yR(di(v)?v:v.contextElement||Mr(t.elements.popper),l,c,s),x=po(t.elements.reference),C=W0({reference:x,element:k,placement:i}),M=Kd(Object.assign({},k,C)),T=h===Oo?M:x,A={top:w.top-T.top+b.top,bottom:T.bottom-w.bottom+b.bottom,left:w.left-T.left+b.left,right:T.right-w.right+b.right},_=t.modifiersData.offset;if(h===Oo&&_){var N=_[i];Object.keys(A).forEach(function($){var j=[qt,Ht].indexOf($)>=0?1:-1,q=[kt,Ht].indexOf($)>=0?"y":"x";A[$]+=N[q]*j})}return A}function bR(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?L0:l,c=ho(r),d=c?a?pg:pg.filter(function(f){return ho(f)===c}):$s,h=d.filter(function(f){return u.indexOf(f)>=0});h.length===0&&(h=d);var p=h.reduce(function(f,m){return f[m]=Ts(t,{placement:m,boundary:i,rootBoundary:o,padding:s})[bn(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}function kR(t){if(bn(t)===Eh)return[];var e=ja(t);return[mg(t),e,mg(e)]}function wR(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=p===void 0?!0:p,m=n.allowedAutoPlacements,g=e.options.placement,b=bn(g),y=b===g,k=l||(y||!f?[ja(g)]:kR(g)),v=[g].concat(k).reduce(function(an,It){return an.concat(bn(It)===Eh?bR(e,{placement:It,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):It)},[]),w=e.rects.reference,x=e.rects.popper,C=new Map,M=!0,T=v[0],A=0;A<v.length;A++){var _=v[A],N=bn(_),$=ho(_)===uo,j=[kt,Ht].indexOf(N)>=0,q=j?"width":"height",K=Ts(e,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),X=j?$?qt:wt:$?Ht:kt;w[q]>x[q]&&(X=ja(X));var fe=ja(X),Ee=[];if(o&&Ee.push(K[N]<=0),a&&Ee.push(K[X]<=0,K[fe]<=0),Ee.every(function(an){return an})){T=_,M=!1;break}C.set(_,Ee)}if(M)for(var Ie=f?3:1,An=function(an){var It=v.find(function(Jn){var Dr=C.get(Jn);if(Dr)return Dr.slice(0,an).every(function(Yn){return Yn})});if(It)return T=It,"break"},sn=Ie;sn>0;sn--){var _r=An(sn);if(_r==="break")break}e.placement!==T&&(e.modifiersData[r]._skip=!0,e.placement=T,e.reset=!0)}}const xR={name:"flip",enabled:!0,phase:"main",fn:wR,requiresIfExists:["offset"],data:{_skip:!1}};function vg(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yg(t){return[kt,qt,Ht,wt].some(function(e){return t[e]>=0})}function ER(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Ts(e,{elementContext:"reference"}),a=Ts(e,{altBoundary:!0}),l=vg(s,r),u=vg(a,i,o),c=yg(l),d=yg(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const CR={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ER};function SR(t,e,n){var r=bn(t),i=[wt,kt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[wt,qt].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function TR(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=L0.reduce(function(c,d){return c[d]=SR(d,e.rects,o),c},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const OR={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:TR};function AR(t){var e=t.state,n=t.name;e.modifiersData[n]=W0({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const MR={name:"popperOffsets",enabled:!0,phase:"read",fn:AR,data:{}};function _R(t){return t==="x"?"y":"x"}function DR(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,f=n.tetherOffset,m=f===void 0?0:f,g=Ts(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=bn(e.placement),y=ho(e.placement),k=!y,v=Th(b),w=_R(v),x=e.modifiersData.popperOffsets,C=e.rects.reference,M=e.rects.popper,T=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,A=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(x){if(o){var $,j=v==="y"?kt:wt,q=v==="y"?Ht:qt,K=v==="y"?"height":"width",X=x[v],fe=X+g[j],Ee=X-g[q],Ie=p?-M[K]/2:0,An=y===uo?C[K]:M[K],sn=y===uo?-M[K]:-C[K],_r=e.elements.arrow,an=p&&_r?Sh(_r):{width:0,height:0},It=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:j0(),Jn=It[j],Dr=It[q],Yn=Zo(0,C[K],an[K]),zs=k?C[K]/2-Ie-Yn-Jn-A.mainAxis:An-Yn-Jn-A.mainAxis,Xn=k?-C[K]/2+Ie+Yn+Dr+A.mainAxis:sn+Yn+Dr+A.mainAxis,ki=e.elements.arrow&&js(e.elements.arrow),Hs=ki?v==="y"?ki.clientTop||0:ki.clientLeft||0:0,vo=($=_?.[v])!=null?$:0,qs=X+zs-vo-Hs,Ws=X+Xn-vo,yo=Zo(p?Sl(fe,qs):fe,X,p?Qr(Ee,Ws):Ee);x[v]=yo,N[v]=yo-X}if(a){var bo,Us=v==="x"?kt:wt,Ks=v==="x"?Ht:qt,Mn=x[w],Zn=w==="y"?"height":"width",ko=Mn+g[Us],Ir=Mn-g[Ks],wo=[kt,wt].indexOf(b)!==-1,Gs=(bo=_?.[w])!=null?bo:0,Js=wo?ko:Mn-C[Zn]-M[Zn]-Gs+A.altAxis,Ys=wo?Mn+C[Zn]+M[Zn]-Gs-A.altAxis:Ir,Xs=p&&wo?tR(Js,Mn,Ys):Zo(p?Js:ko,Mn,p?Ys:Ir);x[w]=Xs,N[w]=Xs-Mn}e.modifiersData[r]=N}}const IR={name:"preventOverflow",enabled:!0,phase:"main",fn:DR,requiresIfExists:["offset"]};function NR(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function RR(t){return t===Dt(t)||!zt(t)?Oh(t):NR(t)}function PR(t){var e=t.getBoundingClientRect(),n=co(e.width)/t.offsetWidth||1,r=co(e.height)/t.offsetHeight||1;return n!==1||r!==1}function FR(t,e,n){n===void 0&&(n=!1);var r=zt(e),i=zt(e)&&PR(e),o=Mr(e),s=po(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Sn(e)!=="body"||Mh(o))&&(a=RR(e)),zt(e)?(l=po(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Ah(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function LR(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function BR(t){var e=LR(t);return YN.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function VR(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function $R(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var bg={placement:"bottom",modifiers:[],strategy:"absolute"};function kg(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function jR(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?bg:i;return function(s,a,l){l===void 0&&(l=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},bg,o),modifiersData:{},elements:{reference:s,popper:a},attributes:{},styles:{}},c=[],d=!1,h={state:u,setOptions:function(m){var g=typeof m=="function"?m(u.options):m;f(),u.options=Object.assign({},o,u.options,g),u.scrollParents={reference:di(s)?Qo(s):s.contextElement?Qo(s.contextElement):[],popper:Qo(a)};var b=BR($R([].concat(r,u.options.modifiers)));return u.orderedModifiers=b.filter(function(y){return y.enabled}),p(),h.update()},forceUpdate:function(){if(!d){var m=u.elements,g=m.reference,b=m.popper;if(kg(g,b)){u.rects={reference:FR(g,js(b),u.options.strategy==="fixed"),popper:Sh(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var k=u.orderedModifiers[y],v=k.fn,w=k.options,x=w===void 0?{}:w,C=k.name;typeof v=="function"&&(u=v({state:u,options:x,name:C,instance:h})||u)}}}},update:VR(function(){return new Promise(function(m){h.forceUpdate(),m(u)})}),destroy:function(){f(),d=!0}};if(!kg(s,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var g=m.name,b=m.options,y=b===void 0?{}:b,k=m.effect;if(typeof k=="function"){var v=k({state:u,name:g,instance:h,options:y}),w=function(){};c.push(v||w)}})}function f(){c.forEach(function(m){return m()}),c=[]}return h}}var zR=[dR,MR,uR,B0,OR,xR,IR,oR,CR],HR=jR({defaultModifiers:zR}),qR="tippy-box",U0="tippy-content",WR="tippy-backdrop",K0="tippy-arrow",G0="tippy-svg-arrow",$r={passive:!0,capture:!0},J0=function(){return document.body};function Ic(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function _h(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function Y0(t,e){return typeof t=="function"?t.apply(void 0,e):t}function wg(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function UR(t){return t.split(/\s+/).filter(Boolean)}function Fi(t){return[].concat(t)}function xg(t,e){t.indexOf(e)===-1&&t.push(e)}function KR(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function GR(t){return t.split("-")[0]}function Tl(t){return[].slice.call(t)}function Eg(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function es(){return document.createElement("div")}function Hu(t){return["Element","Fragment"].some(function(e){return _h(t,e)})}function JR(t){return _h(t,"NodeList")}function YR(t){return _h(t,"MouseEvent")}function XR(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function ZR(t){return Hu(t)?[t]:JR(t)?Tl(t):Array.isArray(t)?t:Tl(document.querySelectorAll(t))}function Nc(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Cg(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function QR(t){var e,n=Fi(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function eP(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,l=a.interactiveBorder,u=GR(s.placement),c=s.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,h=u==="top"?c.bottom.y:0,p=u==="right"?c.left.x:0,f=u==="left"?c.right.x:0,m=o.top-r+d>l,g=r-o.bottom-h>l,b=o.left-n+p>l,y=n-o.right-f>l;return m||g||b||y})}function Rc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Sg(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var fn={isTouch:!1},Tg=0;function tP(){fn.isTouch||(fn.isTouch=!0,window.performance&&document.addEventListener("mousemove",X0))}function X0(){var t=performance.now();t-Tg<20&&(fn.isTouch=!1,document.removeEventListener("mousemove",X0)),Tg=t}function nP(){var t=document.activeElement;if(XR(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function rP(){document.addEventListener("touchstart",tP,$r),window.addEventListener("blur",nP)}var iP=typeof window<"u"&&typeof document<"u",oP=iP?!!window.msCrypto:!1,sP={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},aP={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Yt=Object.assign({appendTo:J0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},sP,aP),lP=Object.keys(Yt),uP=function(t){var e=Object.keys(t);e.forEach(function(n){Yt[n]=t[n]})};function Z0(t){var e=t.plugins||[],n=e.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=t[o]!==void 0?t[o]:(a=Yt[o])!=null?a:s}return r},{});return Object.assign({},t,n)}function cP(t,e){var n=e?Object.keys(Z0(Object.assign({},Yt,{plugins:e}))):lP,r=n.reduce(function(i,o){var s=(t.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function Og(t,e){var n=Object.assign({},e,{content:Y0(e.content,[t])},e.ignoreAttributes?{}:cP(t,e.plugins));return n.aria=Object.assign({},Yt.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}var dP=function(){return"innerHTML"};function Gd(t,e){t[dP()]=e}function Ag(t){var e=es();return t===!0?e.className=K0:(e.className=G0,Hu(t)?e.appendChild(t):Gd(e,t)),e}function Mg(t,e){Hu(e.content)?(Gd(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Gd(t,e.content):t.textContent=e.content)}function Jd(t){var e=t.firstElementChild,n=Tl(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(U0)}),arrow:n.find(function(r){return r.classList.contains(K0)||r.classList.contains(G0)}),backdrop:n.find(function(r){return r.classList.contains(WR)})}}function Q0(t){var e=es(),n=es();n.className=qR,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=es();r.className=U0,r.setAttribute("data-state","hidden"),Mg(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props);function i(o,s){var a=Jd(e),l=a.box,u=a.content,c=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&Mg(u,t.props),s.arrow?c?o.arrow!==s.arrow&&(l.removeChild(c),l.appendChild(Ag(s.arrow))):l.appendChild(Ag(s.arrow)):c&&l.removeChild(c)}return{popper:e,onUpdate:i}}Q0.$$tippy=!0;var pP=1,wa=[],Pc=[];function hP(t,e){var n=Og(t,Object.assign({},Yt,Z0(Eg(e)))),r,i,o,s=!1,a=!1,l=!1,u=!1,c,d,h,p=[],f=wg(qs,n.interactiveDebounce),m,g=pP++,b=null,y=KR(n.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:t,popper:es(),popperInstance:b,props:n,state:k,plugins:y,clearDelayTimeouts:Js,setProps:Ys,setContent:Xs,show:kk,hide:wk,hideWithInteractivity:xk,enable:wo,disable:Gs,unmount:Ek,destroy:Ck};if(!n.render)return v;var w=n.render(v),x=w.popper,C=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+v.id,v.popper=x,t._tippy=v,x._tippy=v;var M=y.map(function(S){return S.fn(v)}),T=t.hasAttribute("aria-expanded");return ki(),Ie(),X(),fe("onCreate",[v]),n.showOnCreate&&ko(),x.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&j().addEventListener("mousemove",f)}),v;function A(){var S=v.props.touch;return Array.isArray(S)?S:[S,0]}function _(){return A()[0]==="hold"}function N(){var S;return!!((S=v.props.render)!=null&&S.$$tippy)}function $(){return m||t}function j(){var S=$().parentNode;return S?QR(S):document}function q(){return Jd(x)}function K(S){return v.state.isMounted&&!v.state.isVisible||fn.isTouch||c&&c.type==="focus"?0:Ic(v.props.delay,S?0:1,Yt.delay)}function X(S){S===void 0&&(S=!1),x.style.pointerEvents=v.props.interactive&&!S?"":"none",x.style.zIndex=""+v.props.zIndex}function fe(S,G,ie){if(ie===void 0&&(ie=!0),M.forEach(function(me){me[S]&&me[S].apply(me,G)}),ie){var ye;(ye=v.props)[S].apply(ye,G)}}function Ee(){var S=v.props.aria;if(S.content){var G="aria-"+S.content,ie=x.id,ye=Fi(v.props.triggerTarget||t);ye.forEach(function(me){var ut=me.getAttribute(G);if(v.state.isVisible)me.setAttribute(G,ut?ut+" "+ie:ie);else{var Nt=ut&&ut.replace(ie,"").trim();Nt?me.setAttribute(G,Nt):me.removeAttribute(G)}})}}function Ie(){if(!(T||!v.props.aria.expanded)){var S=Fi(v.props.triggerTarget||t);S.forEach(function(G){v.props.interactive?G.setAttribute("aria-expanded",v.state.isVisible&&G===$()?"true":"false"):G.removeAttribute("aria-expanded")})}}function An(){j().removeEventListener("mousemove",f),wa=wa.filter(function(S){return S!==f})}function sn(S){if(!(fn.isTouch&&(l||S.type==="mousedown"))){var G=S.composedPath&&S.composedPath()[0]||S.target;if(!(v.props.interactive&&Sg(x,G))){if(Fi(v.props.triggerTarget||t).some(function(ie){return Sg(ie,G)})){if(fn.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else fe("onClickOutside",[v,S]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),a=!0,setTimeout(function(){a=!1}),v.state.isMounted||Jn())}}}function _r(){l=!0}function an(){l=!1}function It(){var S=j();S.addEventListener("mousedown",sn,!0),S.addEventListener("touchend",sn,$r),S.addEventListener("touchstart",an,$r),S.addEventListener("touchmove",_r,$r)}function Jn(){var S=j();S.removeEventListener("mousedown",sn,!0),S.removeEventListener("touchend",sn,$r),S.removeEventListener("touchstart",an,$r),S.removeEventListener("touchmove",_r,$r)}function Dr(S,G){zs(S,function(){!v.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&G()})}function Yn(S,G){zs(S,G)}function zs(S,G){var ie=q().box;function ye(me){me.target===ie&&(Rc(ie,"remove",ye),G())}if(S===0)return G();Rc(ie,"remove",d),Rc(ie,"add",ye),d=ye}function Xn(S,G,ie){ie===void 0&&(ie=!1);var ye=Fi(v.props.triggerTarget||t);ye.forEach(function(me){me.addEventListener(S,G,ie),p.push({node:me,eventType:S,handler:G,options:ie})})}function ki(){_()&&(Xn("touchstart",vo,{passive:!0}),Xn("touchend",Ws,{passive:!0})),UR(v.props.trigger).forEach(function(S){if(S!=="manual")switch(Xn(S,vo),S){case"mouseenter":Xn("mouseleave",Ws);break;case"focus":Xn(oP?"focusout":"blur",yo);break;case"focusin":Xn("focusout",yo);break}})}function Hs(){p.forEach(function(S){var G=S.node,ie=S.eventType,ye=S.handler,me=S.options;G.removeEventListener(ie,ye,me)}),p=[]}function vo(S){var G,ie=!1;if(!(!v.state.isEnabled||bo(S)||a)){var ye=((G=c)==null?void 0:G.type)==="focus";c=S,m=S.currentTarget,Ie(),!v.state.isVisible&&YR(S)&&wa.forEach(function(me){return me(S)}),S.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||s)&&v.props.hideOnClick!==!1&&v.state.isVisible?ie=!0:ko(S),S.type==="click"&&(s=!ie),ie&&!ye&&Ir(S)}}function qs(S){var G=S.target,ie=$().contains(G)||x.contains(G);if(!(S.type==="mousemove"&&ie)){var ye=Zn().concat(x).map(function(me){var ut,Nt=me._tippy,wi=(ut=Nt.popperInstance)==null?void 0:ut.state;return wi?{popperRect:me.getBoundingClientRect(),popperState:wi,props:n}:null}).filter(Boolean);eP(ye,S)&&(An(),Ir(S))}}function Ws(S){var G=bo(S)||v.props.trigger.indexOf("click")>=0&&s;if(!G){if(v.props.interactive){v.hideWithInteractivity(S);return}Ir(S)}}function yo(S){v.props.trigger.indexOf("focusin")<0&&S.target!==$()||v.props.interactive&&S.relatedTarget&&x.contains(S.relatedTarget)||Ir(S)}function bo(S){return fn.isTouch?_()!==S.type.indexOf("touch")>=0:!1}function Us(){Ks();var S=v.props,G=S.popperOptions,ie=S.placement,ye=S.offset,me=S.getReferenceClientRect,ut=S.moveTransition,Nt=N()?Jd(x).arrow:null,wi=me?{getBoundingClientRect:me,contextElement:me.contextElement||$()}:t,Zs={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qs){var xi=Qs.state;if(N()){var Sk=q(),Wu=Sk.box;["placement","reference-hidden","escaped"].forEach(function(ea){ea==="placement"?Wu.setAttribute("data-placement",xi.placement):xi.attributes.popper["data-popper-"+ea]?Wu.setAttribute("data-"+ea,""):Wu.removeAttribute("data-"+ea)}),xi.attributes.popper={}}}},Nr=[{name:"offset",options:{offset:ye}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ut}},Zs];N()&&Nt&&Nr.push({name:"arrow",options:{element:Nt,padding:3}}),Nr.push.apply(Nr,G?.modifiers||[]),v.popperInstance=HR(wi,x,Object.assign({},G,{placement:ie,onFirstUpdate:h,modifiers:Nr}))}function Ks(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function Mn(){var S=v.props.appendTo,G,ie=$();v.props.interactive&&S===J0||S==="parent"?G=ie.parentNode:G=Y0(S,[ie]),G.contains(x)||G.appendChild(x),v.state.isMounted=!0,Us()}function Zn(){return Tl(x.querySelectorAll("[data-tippy-root]"))}function ko(S){v.clearDelayTimeouts(),S&&fe("onTrigger",[v,S]),It();var G=K(!0),ie=A(),ye=ie[0],me=ie[1];fn.isTouch&&ye==="hold"&&me&&(G=me),G?r=setTimeout(function(){v.show()},G):v.show()}function Ir(S){if(v.clearDelayTimeouts(),fe("onUntrigger",[v,S]),!v.state.isVisible){Jn();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(S.type)>=0&&s)){var G=K(!1);G?i=setTimeout(function(){v.state.isVisible&&v.hide()},G):o=requestAnimationFrame(function(){v.hide()})}}function wo(){v.state.isEnabled=!0}function Gs(){v.hide(),v.state.isEnabled=!1}function Js(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Ys(S){if(!v.state.isDestroyed){fe("onBeforeUpdate",[v,S]),Hs();var G=v.props,ie=Og(t,Object.assign({},G,Eg(S),{ignoreAttributes:!0}));v.props=ie,ki(),G.interactiveDebounce!==ie.interactiveDebounce&&(An(),f=wg(qs,ie.interactiveDebounce)),G.triggerTarget&&!ie.triggerTarget?Fi(G.triggerTarget).forEach(function(ye){ye.removeAttribute("aria-expanded")}):ie.triggerTarget&&t.removeAttribute("aria-expanded"),Ie(),X(),C&&C(G,ie),v.popperInstance&&(Us(),Zn().forEach(function(ye){requestAnimationFrame(ye._tippy.popperInstance.forceUpdate)})),fe("onAfterUpdate",[v,S])}}function Xs(S){v.setProps({content:S})}function kk(){var S=v.state.isVisible,G=v.state.isDestroyed,ie=!v.state.isEnabled,ye=fn.isTouch&&!v.props.touch,me=Ic(v.props.duration,0,Yt.duration);if(!(S||G||ie||ye)&&!$().hasAttribute("disabled")&&(fe("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,N()&&(x.style.visibility="visible"),X(),It(),v.state.isMounted||(x.style.transition="none"),N()){var ut=q(),Nt=ut.box,wi=ut.content;Nc([Nt,wi],0)}h=function(){var Zs;if(!(!v.state.isVisible||u)){if(u=!0,x.offsetHeight,x.style.transition=v.props.moveTransition,N()&&v.props.animation){var Nr=q(),Qs=Nr.box,xi=Nr.content;Nc([Qs,xi],me),Cg([Qs,xi],"visible")}Ee(),Ie(),xg(Pc,v),(Zs=v.popperInstance)==null||Zs.forceUpdate(),fe("onMount",[v]),v.props.animation&&N()&&Yn(me,function(){v.state.isShown=!0,fe("onShown",[v])})}},Mn()}}function wk(){var S=!v.state.isVisible,G=v.state.isDestroyed,ie=!v.state.isEnabled,ye=Ic(v.props.duration,1,Yt.duration);if(!(S||G||ie)&&(fe("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,u=!1,s=!1,N()&&(x.style.visibility="hidden"),An(),Jn(),X(!0),N()){var me=q(),ut=me.box,Nt=me.content;v.props.animation&&(Nc([ut,Nt],ye),Cg([ut,Nt],"hidden"))}Ee(),Ie(),v.props.animation?N()&&Dr(ye,v.unmount):v.unmount()}}function xk(S){j().addEventListener("mousemove",f),xg(wa,f),f(S)}function Ek(){v.state.isVisible&&v.hide(),v.state.isMounted&&(Ks(),Zn().forEach(function(S){S._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),Pc=Pc.filter(function(S){return S!==v}),v.state.isMounted=!1,fe("onHidden",[v]))}function Ck(){!v.state.isDestroyed&&(v.clearDelayTimeouts(),v.unmount(),Hs(),delete t._tippy,v.state.isDestroyed=!0,fe("onDestroy",[v]))}}function go(t,e){e===void 0&&(e={});var n=Yt.plugins.concat(e.plugins||[]);rP();var r=Object.assign({},e,{plugins:n}),i=ZR(t),o=i.reduce(function(s,a){var l=a&&hP(a,r);return l&&s.push(l),s},[]);return Hu(t)?o[0]:o}go.defaultProps=Yt;go.setDefaultProps=uP;go.currentInput=fn;Object.assign({},B0,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});go.setDefaultProps({render:Q0});class fP{constructor({editor:e,element:n,view:r,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:u,to:c})=>{const{doc:d,selection:h}=l,{empty:p}=h,f=!d.textBetween(u,c).length&&bh(l.selection),m=this.element.contains(document.activeElement);return!(!(a.hasFocus()||m)||p||f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget)||a?.relatedTarget!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const u=!(l!=null&&l.selection.eq(a.state.selection)),c=!(l!=null&&l.doc.eq(a.state.doc));!u&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,u,c,l)},this.updateDelay))},this.updateHandler=(a,l,u,c)=>{var d,h,p;const{state:f,composing:m}=a,{selection:g}=f;if(m||!l&&!u)return;this.createTooltip();const{ranges:b}=g,y=Math.min(...b.map(v=>v.$from.pos)),k=Math.max(...b.map(v=>v.$to.pos));if(!(!((d=this.shouldShow)===null||d===void 0)&&d.call(this,{editor:this.editor,element:this.element,view:a,state:f,oldState:c,from:y,to:k}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(R0(f.selection)){let v=a.nodeDOM(y);if(v){const w=v.dataset.nodeViewWrapper?v:v.querySelector("[data-node-view-wrapper]");if(w&&(v=w.firstChild),v)return v.getBoundingClientRect()}}return P0(a,y,k)})}),this.show()},this.editor=e,this.element=n,this.view=r,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=go(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){const{state:r}=e,i=r.selection.from!==r.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,n);return}const o=!(n!=null&&n.selection.eq(e.state.selection)),s=!(n!=null&&n.doc.eq(e.state.doc));this.updateHandler(e,o,s,n)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const mP=t=>new $e({key:typeof t.pluginKey=="string"?new lt(t.pluginKey):t.pluginKey,view:e=>new fP({view:e,...t})});Ke.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[mP({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class gP{getTextContent(e){return I0(e,{textSerializers:vh(this.editor.schema)})}constructor({editor:e,element:n,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:u,empty:c}=l,d=u.depth===1,h=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&!((a=this.element.parentNode)===null||a===void 0)&&a.contains(s.relatedTarget)||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=n,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=go(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){var r,i,o;const{state:s}=e,{doc:a,selection:l}=s,{from:u,to:c}=l;if(!(n&&n.doc.eq(a)&&n.selection.eq(l))){if(this.createTooltip(),!(!((r=this.shouldShow)===null||r===void 0)&&r.call(this,{editor:this.editor,view:e,state:s,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((o=this.tippyOptions)===null||o===void 0?void 0:o.getReferenceClientRect)||(()=>P0(e,u,c))}),this.show()}}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const vP=t=>new $e({key:typeof t.pluginKey=="string"?new lt(t.pluginKey):t.pluginKey,view:e=>new gP({view:e,...t})});Ke.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[vP({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});function _g(t){return Gg((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class yP extends LN{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=_g(this.view.state),this.reactiveExtensionStorage=_g(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),Ta(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){const r=super.registerPlugin(e,n);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const n=super.unregisterPlugin(e);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const bP=Q({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=H(),n=cp();return lp(()=>{const r=t.editor;r&&r.options.element&&e.value&&xr(()=>{if(!e.value||!r.options.element.firstChild)return;const i=B(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),pi(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return ls("div",{ref:t=>{this.rootEl=t}})}}),kP=(t={})=>{const e=Zt();return Tn(()=>{e.value=new yP(t)}),pi(()=>{var n,r,i;const o=(n=e.value)===null||n===void 0?void 0:n.options.element,s=o?.cloneNode(!0);(r=o?.parentNode)===null||r===void 0||r.replaceChild(s,o),(i=e.value)===null||i===void 0||i.destroy()}),e},wP="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",xP="ελ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",fo=(t,e)=>{for(const n in e)t[n]=e[n];return t},Yd="numeric",Xd="ascii",Zd="alpha",ts="asciinumeric",$o="alphanumeric",Qd="domain",ek="emoji",EP="scheme",CP="slashscheme",Fc="whitespace";function SP(t,e){return t in e||(e[t]=[]),e[t]}function Ur(t,e,n){e[Yd]&&(e[ts]=!0,e[$o]=!0),e[Xd]&&(e[ts]=!0,e[Zd]=!0),e[ts]&&(e[$o]=!0),e[Zd]&&(e[$o]=!0),e[$o]&&(e[Qd]=!0),e[ek]&&(e[Qd]=!0);for(const r in e){const i=SP(r,n);i.indexOf(t)<0&&i.push(t)}}function TP(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function vt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}vt.groups={};vt.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 i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(t))return o}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||vt.groups;let i;return e&&e.j?i=e:(i=new vt(e),n&&r&&Ur(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(t[s]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||vt.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new vt,fo(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new vt,o){if(r)if(s.t&&typeof s.t=="string"){const l=fo(TP(s.t,r),n);Ur(o,l,r)}else n&&Ur(o,n,r);s.t=o}return i.j[t]=s,s}};const ce=(t,e,n,r,i)=>t.ta(e,n,r,i),Ae=(t,e,n,r,i)=>t.tr(e,n,r,i),Dg=(t,e,n,r,i)=>t.ts(e,n,r,i),R=(t,e,n,r,i)=>t.tt(e,n,r,i),Rn="WORD",ep="UWORD",tk="ASCIINUMERICAL",nk="ALPHANUMERICAL",Os="LOCALHOST",tp="TLD",np="UTLD",za="SCHEME",Li="SLASH_SCHEME",Dh="NUM",rp="WS",Ih="NL",ns="OPENBRACE",rs="CLOSEBRACE",Ol="OPENBRACKET",Al="CLOSEBRACKET",Ml="OPENPAREN",_l="CLOSEPAREN",Dl="OPENANGLEBRACKET",Il="CLOSEANGLEBRACKET",Nl="FULLWIDTHLEFTPAREN",Rl="FULLWIDTHRIGHTPAREN",Pl="LEFTCORNERBRACKET",Fl="RIGHTCORNERBRACKET",Ll="LEFTWHITECORNERBRACKET",Bl="RIGHTWHITECORNERBRACKET",Vl="FULLWIDTHLESSTHAN",$l="FULLWIDTHGREATERTHAN",jl="AMPERSAND",zl="APOSTROPHE",Hl="ASTERISK",rr="AT",ql="BACKSLASH",Wl="BACKTICK",Ul="CARET",ar="COLON",Nh="COMMA",Kl="DOLLAR",cn="DOT",Gl="EQUALS",Rh="EXCLAMATION",Pt="HYPHEN",is="PERCENT",Jl="PIPE",Yl="PLUS",Xl="POUND",ss="QUERY",Ph="QUOTE",rk="FULLWIDTHMIDDLEDOT",Fh="SEMI",dn="SLASH",as="TILDE",Zl="UNDERSCORE",ik="EMOJI",Ql="SYM";var ok=Object.freeze({__proto__:null,ALPHANUMERICAL:nk,AMPERSAND:jl,APOSTROPHE:zl,ASCIINUMERICAL:tk,ASTERISK:Hl,AT:rr,BACKSLASH:ql,BACKTICK:Wl,CARET:Ul,CLOSEANGLEBRACKET:Il,CLOSEBRACE:rs,CLOSEBRACKET:Al,CLOSEPAREN:_l,COLON:ar,COMMA:Nh,DOLLAR:Kl,DOT:cn,EMOJI:ik,EQUALS:Gl,EXCLAMATION:Rh,FULLWIDTHGREATERTHAN:$l,FULLWIDTHLEFTPAREN:Nl,FULLWIDTHLESSTHAN:Vl,FULLWIDTHMIDDLEDOT:rk,FULLWIDTHRIGHTPAREN:Rl,HYPHEN:Pt,LEFTCORNERBRACKET:Pl,LEFTWHITECORNERBRACKET:Ll,LOCALHOST:Os,NL:Ih,NUM:Dh,OPENANGLEBRACKET:Dl,OPENBRACE:ns,OPENBRACKET:Ol,OPENPAREN:Ml,PERCENT:is,PIPE:Jl,PLUS:Yl,POUND:Xl,QUERY:ss,QUOTE:Ph,RIGHTCORNERBRACKET:Fl,RIGHTWHITECORNERBRACKET:Bl,SCHEME:za,SEMI:Fh,SLASH:dn,SLASH_SCHEME:Li,SYM:Ql,TILDE:as,TLD:tp,UNDERSCORE:Zl,UTLD:np,UWORD:ep,WORD:Rn,WS:rp});const Dn=/[a-z]/,Ao=/\p{L}/u,Lc=/\p{Emoji}/u,In=/\d/,Bc=/\s/,Ig="\r",Vc=`
96
+ `,textSerializers:n={}}=t||{};return I0(this.state.doc,{blockSeparator:e,textSerializers:{...vh(this.schema),...n}})}get isEmpty(){return ju(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new zr(e,this)}get $doc(){return this.$pos(0)}};function lo(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=pe(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(xh(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(p=>p===t.type&&p!==h.mark.type)).filter(h=>h.to>u).length)return null;c<n.to&&o.delete(c,n.to),u>n.from&&o.delete(n.from+l,u);const d=n.from+l+s.length;o.addMark(n.from+l,d,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function BN(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=pe(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let c=s+u;c>a?c=a:a=c+r[1].length;const d=r[0][r[0].length-1];o.insertText(d,s+r[0].length-1),o.replaceWith(c,a,l)}else if(r[0]){const u=t.type.isInline?s:s-1;o.insert(u,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function qd(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=pe(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function Cs(t){return new Bu({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=pe(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&nh(a,t.type,o);if(!l)return null;if(s.wrap(a,l),t.keepMarks&&t.editor){const{selection:c,storedMarks:d}=e,{splittableMarks:h}=t.editor.extensionManager,p=d||c.$to.parentOffset&&c.$from.marks();if(p){const f=p.filter(m=>h.includes(m.type.name));s.ensureMarks(f)}}if(t.keepAttributes){const c=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(c,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Tr(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)}})}let on=class Wd{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=pe(W(this,"addOptions",{name:this.name}))),this.storage=pe(W(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Wd(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Vu(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Wd(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=pe(W(n,"addOptions",{name:n.name})),n.storage=pe(W(n,"addStorage",{name:n.name,options:n.options})),n}};function ci(t){return new tI({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=pe(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const c=l.search(/\S/),d=n.from+l.indexOf(a),h=d+a.length;if(xh(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(f=>f===t.type&&f!==p.mark.type)).filter(p=>p.to>d).length)return null;h<n.to&&s.delete(h,n.to),d>n.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}var kt="top",Ht="bottom",qt="right",wt="left",Eh="auto",$s=[kt,Ht,qt,wt],uo="start",Ss="end",VN="clippingParents",F0="viewport",Oo="popper",$N="reference",pg=$s.reduce(function(t,e){return t.concat([e+"-"+uo,e+"-"+Ss])},[]),L0=[].concat($s,[Eh]).reduce(function(t,e){return t.concat([e,e+"-"+uo,e+"-"+Ss])},[]),jN="beforeRead",zN="read",HN="afterRead",qN="beforeMain",WN="main",UN="afterMain",KN="beforeWrite",GN="write",JN="afterWrite",YN=[jN,zN,HN,qN,WN,UN,KN,GN,JN];function Sn(t){return t?(t.nodeName||"").toLowerCase():null}function Dt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function di(t){var e=Dt(t).Element;return t instanceof e||t instanceof Element}function zt(t){var e=Dt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ch(t){if(typeof ShadowRoot>"u")return!1;var e=Dt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function XN(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!zt(o)||!Sn(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function ZN(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!zt(i)||!Sn(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const B0={name:"applyStyles",enabled:!0,phase:"write",fn:XN,effect:ZN,requires:["computeStyles"]};function bn(t){return t.split("-")[0]}var Qr=Math.max,Sl=Math.min,co=Math.round;function Ud(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function V0(){return!/^((?!chrome|android).)*safari/i.test(Ud())}function po(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&zt(t)&&(i=t.offsetWidth>0&&co(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&co(r.height)/t.offsetHeight||1);var s=di(t)?Dt(t):window,a=s.visualViewport,l=!V0()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,h=r.height/o;return{width:d,height:h,top:c,right:u+d,bottom:c+h,left:u,x:u,y:c}}function Sh(t){var e=po(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function $0(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Ch(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Un(t){return Dt(t).getComputedStyle(t)}function QN(t){return["table","td","th"].indexOf(Sn(t))>=0}function Mr(t){return((di(t)?t.ownerDocument:t.document)||window.document).documentElement}function zu(t){return Sn(t)==="html"?t:t.assignedSlot||t.parentNode||(Ch(t)?t.host:null)||Mr(t)}function hg(t){return!zt(t)||Un(t).position==="fixed"?null:t.offsetParent}function eR(t){var e=/firefox/i.test(Ud()),n=/Trident/i.test(Ud());if(n&&zt(t)){var r=Un(t);if(r.position==="fixed")return null}var i=zu(t);for(Ch(i)&&(i=i.host);zt(i)&&["html","body"].indexOf(Sn(i))<0;){var o=Un(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function js(t){for(var e=Dt(t),n=hg(t);n&&QN(n)&&Un(n).position==="static";)n=hg(n);return n&&(Sn(n)==="html"||Sn(n)==="body"&&Un(n).position==="static")?e:n||eR(t)||e}function Th(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Zo(t,e,n){return Qr(t,Sl(e,n))}function tR(t,e,n){var r=Zo(t,e,n);return r>n?n:r}function j0(){return{top:0,right:0,bottom:0,left:0}}function z0(t){return Object.assign({},j0(),t)}function H0(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var nR=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,z0(typeof t!="number"?t:H0(t,$s))};function rR(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=bn(n.placement),l=Th(a),u=[wt,qt].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!s)){var d=nR(i.padding,n),h=Sh(o),p=l==="y"?kt:wt,f=l==="y"?Ht:qt,m=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],b=js(o),y=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,k=m/2-g/2,v=d[p],w=y-h[c]-d[f],x=y/2-h[c]/2+k,C=Zo(v,x,w),M=l;n.modifiersData[r]=(e={},e[M]=C,e.centerOffset=C-x,e)}}function iR(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||$0(e.elements.popper,i)&&(e.elements.arrow=i))}const oR={name:"arrow",enabled:!0,phase:"main",fn:rR,effect:iR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ho(t){return t.split("-")[1]}var sR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aR(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:co(n*i)/i||0,y:co(r*i)/i||0}}function fg(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=s.x,p=h===void 0?0:h,f=s.y,m=f===void 0?0:f,g=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var b=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),k=wt,v=kt,w=window;if(u){var x=js(n),C="clientHeight",M="clientWidth";if(x===Dt(n)&&(x=Mr(n),Un(x).position!=="static"&&a==="absolute"&&(C="scrollHeight",M="scrollWidth")),x=x,i===kt||(i===wt||i===qt)&&o===Ss){v=Ht;var T=d&&x===w&&w.visualViewport?w.visualViewport.height:x[C];m-=T-r.height,m*=l?1:-1}if(i===wt||(i===kt||i===Ht)&&o===Ss){k=qt;var A=d&&x===w&&w.visualViewport?w.visualViewport.width:x[M];p-=A-r.width,p*=l?1:-1}}var _=Object.assign({position:a},u&&sR),N=c===!0?aR({x:p,y:m},Dt(n)):{x:p,y:m};if(p=N.x,m=N.y,l){var $;return Object.assign({},_,($={},$[v]=y?"0":"",$[k]=b?"0":"",$.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",$))}return Object.assign({},_,(e={},e[v]=y?m+"px":"",e[k]=b?p+"px":"",e.transform="",e))}function lR(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:bn(e.placement),variation:ho(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,fg(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,fg(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const uR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:lR,data:{}};var ka={passive:!0};function cR(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Dt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,ka)}),a&&l.addEventListener("resize",n.update,ka),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,ka)}),a&&l.removeEventListener("resize",n.update,ka)}}const dR={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:cR,data:{}};var pR={left:"right",right:"left",bottom:"top",top:"bottom"};function ja(t){return t.replace(/left|right|bottom|top/g,function(e){return pR[e]})}var hR={start:"end",end:"start"};function mg(t){return t.replace(/start|end/g,function(e){return hR[e]})}function Oh(t){var e=Dt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ah(t){return po(Mr(t)).left+Oh(t).scrollLeft}function fR(t,e){var n=Dt(t),r=Mr(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=V0();(u||!u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Ah(t),y:l}}function mR(t){var e,n=Mr(t),r=Oh(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Qr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Qr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Ah(t),l=-r.scrollTop;return Un(i||n).direction==="rtl"&&(a+=Qr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Mh(t){var e=Un(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function q0(t){return["html","body","#document"].indexOf(Sn(t))>=0?t.ownerDocument.body:zt(t)&&Mh(t)?t:q0(zu(t))}function Qo(t,e){var n;e===void 0&&(e=[]);var r=q0(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Dt(r),s=i?[o].concat(o.visualViewport||[],Mh(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(Qo(zu(s)))}function Kd(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gR(t,e){var n=po(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function gg(t,e,n){return e===F0?Kd(fR(t,n)):di(e)?gR(e,n):Kd(mR(Mr(t)))}function vR(t){var e=Qo(zu(t)),n=["absolute","fixed"].indexOf(Un(t).position)>=0,r=n&&zt(t)?js(t):t;return di(r)?e.filter(function(i){return di(i)&&$0(i,r)&&Sn(i)!=="body"}):[]}function yR(t,e,n,r){var i=e==="clippingParents"?vR(t):[].concat(e),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,u){var c=gg(t,u,r);return l.top=Qr(c.top,l.top),l.right=Sl(c.right,l.right),l.bottom=Sl(c.bottom,l.bottom),l.left=Qr(c.left,l.left),l},gg(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function W0(t){var e=t.reference,n=t.element,r=t.placement,i=r?bn(r):null,o=r?ho(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case kt:l={x:s,y:e.y-n.height};break;case Ht:l={x:s,y:e.y+e.height};break;case qt:l={x:e.x+e.width,y:a};break;case wt:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=i?Th(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case uo:l[u]=l[u]-(e[c]/2-n[c]/2);break;case Ss:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function Ts(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?VN:a,u=n.rootBoundary,c=u===void 0?F0:u,d=n.elementContext,h=d===void 0?Oo:d,p=n.altBoundary,f=p===void 0?!1:p,m=n.padding,g=m===void 0?0:m,b=z0(typeof g!="number"?g:H0(g,$s)),y=h===Oo?$N:Oo,k=t.rects.popper,v=t.elements[f?y:h],w=yR(di(v)?v:v.contextElement||Mr(t.elements.popper),l,c,s),x=po(t.elements.reference),C=W0({reference:x,element:k,placement:i}),M=Kd(Object.assign({},k,C)),T=h===Oo?M:x,A={top:w.top-T.top+b.top,bottom:T.bottom-w.bottom+b.bottom,left:w.left-T.left+b.left,right:T.right-w.right+b.right},_=t.modifiersData.offset;if(h===Oo&&_){var N=_[i];Object.keys(A).forEach(function($){var j=[qt,Ht].indexOf($)>=0?1:-1,q=[kt,Ht].indexOf($)>=0?"y":"x";A[$]+=N[q]*j})}return A}function bR(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?L0:l,c=ho(r),d=c?a?pg:pg.filter(function(f){return ho(f)===c}):$s,h=d.filter(function(f){return u.indexOf(f)>=0});h.length===0&&(h=d);var p=h.reduce(function(f,m){return f[m]=Ts(t,{placement:m,boundary:i,rootBoundary:o,padding:s})[bn(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}function kR(t){if(bn(t)===Eh)return[];var e=ja(t);return[mg(t),e,mg(e)]}function wR(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=p===void 0?!0:p,m=n.allowedAutoPlacements,g=e.options.placement,b=bn(g),y=b===g,k=l||(y||!f?[ja(g)]:kR(g)),v=[g].concat(k).reduce(function(an,It){return an.concat(bn(It)===Eh?bR(e,{placement:It,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):It)},[]),w=e.rects.reference,x=e.rects.popper,C=new Map,M=!0,T=v[0],A=0;A<v.length;A++){var _=v[A],N=bn(_),$=ho(_)===uo,j=[kt,Ht].indexOf(N)>=0,q=j?"width":"height",K=Ts(e,{placement:_,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),X=j?$?qt:wt:$?Ht:kt;w[q]>x[q]&&(X=ja(X));var fe=ja(X),Ee=[];if(o&&Ee.push(K[N]<=0),a&&Ee.push(K[X]<=0,K[fe]<=0),Ee.every(function(an){return an})){T=_,M=!1;break}C.set(_,Ee)}if(M)for(var Ie=f?3:1,An=function(an){var It=v.find(function(Jn){var Dr=C.get(Jn);if(Dr)return Dr.slice(0,an).every(function(Yn){return Yn})});if(It)return T=It,"break"},sn=Ie;sn>0;sn--){var _r=An(sn);if(_r==="break")break}e.placement!==T&&(e.modifiersData[r]._skip=!0,e.placement=T,e.reset=!0)}}const xR={name:"flip",enabled:!0,phase:"main",fn:wR,requiresIfExists:["offset"],data:{_skip:!1}};function vg(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yg(t){return[kt,qt,Ht,wt].some(function(e){return t[e]>=0})}function ER(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Ts(e,{elementContext:"reference"}),a=Ts(e,{altBoundary:!0}),l=vg(s,r),u=vg(a,i,o),c=yg(l),d=yg(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const CR={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ER};function SR(t,e,n){var r=bn(t),i=[wt,kt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[wt,qt].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function TR(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=L0.reduce(function(c,d){return c[d]=SR(d,e.rects,o),c},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const OR={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:TR};function AR(t){var e=t.state,n=t.name;e.modifiersData[n]=W0({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const MR={name:"popperOffsets",enabled:!0,phase:"read",fn:AR,data:{}};function _R(t){return t==="x"?"y":"x"}function DR(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,f=n.tetherOffset,m=f===void 0?0:f,g=Ts(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=bn(e.placement),y=ho(e.placement),k=!y,v=Th(b),w=_R(v),x=e.modifiersData.popperOffsets,C=e.rects.reference,M=e.rects.popper,T=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,A=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(x){if(o){var $,j=v==="y"?kt:wt,q=v==="y"?Ht:qt,K=v==="y"?"height":"width",X=x[v],fe=X+g[j],Ee=X-g[q],Ie=p?-M[K]/2:0,An=y===uo?C[K]:M[K],sn=y===uo?-M[K]:-C[K],_r=e.elements.arrow,an=p&&_r?Sh(_r):{width:0,height:0},It=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:j0(),Jn=It[j],Dr=It[q],Yn=Zo(0,C[K],an[K]),zs=k?C[K]/2-Ie-Yn-Jn-A.mainAxis:An-Yn-Jn-A.mainAxis,Xn=k?-C[K]/2+Ie+Yn+Dr+A.mainAxis:sn+Yn+Dr+A.mainAxis,ki=e.elements.arrow&&js(e.elements.arrow),Hs=ki?v==="y"?ki.clientTop||0:ki.clientLeft||0:0,vo=($=_?.[v])!=null?$:0,qs=X+zs-vo-Hs,Ws=X+Xn-vo,yo=Zo(p?Sl(fe,qs):fe,X,p?Qr(Ee,Ws):Ee);x[v]=yo,N[v]=yo-X}if(a){var bo,Us=v==="x"?kt:wt,Ks=v==="x"?Ht:qt,Mn=x[w],Zn=w==="y"?"height":"width",ko=Mn+g[Us],Ir=Mn-g[Ks],wo=[kt,wt].indexOf(b)!==-1,Gs=(bo=_?.[w])!=null?bo:0,Js=wo?ko:Mn-C[Zn]-M[Zn]-Gs+A.altAxis,Ys=wo?Mn+C[Zn]+M[Zn]-Gs-A.altAxis:Ir,Xs=p&&wo?tR(Js,Mn,Ys):Zo(p?Js:ko,Mn,p?Ys:Ir);x[w]=Xs,N[w]=Xs-Mn}e.modifiersData[r]=N}}const IR={name:"preventOverflow",enabled:!0,phase:"main",fn:DR,requiresIfExists:["offset"]};function NR(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function RR(t){return t===Dt(t)||!zt(t)?Oh(t):NR(t)}function PR(t){var e=t.getBoundingClientRect(),n=co(e.width)/t.offsetWidth||1,r=co(e.height)/t.offsetHeight||1;return n!==1||r!==1}function FR(t,e,n){n===void 0&&(n=!1);var r=zt(e),i=zt(e)&&PR(e),o=Mr(e),s=po(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Sn(e)!=="body"||Mh(o))&&(a=RR(e)),zt(e)?(l=po(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Ah(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function LR(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function BR(t){var e=LR(t);return YN.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function VR(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function $R(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var bg={placement:"bottom",modifiers:[],strategy:"absolute"};function kg(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function jR(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?bg:i;return function(s,a,l){l===void 0&&(l=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},bg,o),modifiersData:{},elements:{reference:s,popper:a},attributes:{},styles:{}},c=[],d=!1,h={state:u,setOptions:function(m){var g=typeof m=="function"?m(u.options):m;f(),u.options=Object.assign({},o,u.options,g),u.scrollParents={reference:di(s)?Qo(s):s.contextElement?Qo(s.contextElement):[],popper:Qo(a)};var b=BR($R([].concat(r,u.options.modifiers)));return u.orderedModifiers=b.filter(function(y){return y.enabled}),p(),h.update()},forceUpdate:function(){if(!d){var m=u.elements,g=m.reference,b=m.popper;if(kg(g,b)){u.rects={reference:FR(g,js(b),u.options.strategy==="fixed"),popper:Sh(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var k=u.orderedModifiers[y],v=k.fn,w=k.options,x=w===void 0?{}:w,C=k.name;typeof v=="function"&&(u=v({state:u,options:x,name:C,instance:h})||u)}}}},update:VR(function(){return new Promise(function(m){h.forceUpdate(),m(u)})}),destroy:function(){f(),d=!0}};if(!kg(s,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var g=m.name,b=m.options,y=b===void 0?{}:b,k=m.effect;if(typeof k=="function"){var v=k({state:u,name:g,instance:h,options:y}),w=function(){};c.push(v||w)}})}function f(){c.forEach(function(m){return m()}),c=[]}return h}}var zR=[dR,MR,uR,B0,OR,xR,IR,oR,CR],HR=jR({defaultModifiers:zR}),qR="tippy-box",U0="tippy-content",WR="tippy-backdrop",K0="tippy-arrow",G0="tippy-svg-arrow",$r={passive:!0,capture:!0},J0=function(){return document.body};function Ic(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function _h(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function Y0(t,e){return typeof t=="function"?t.apply(void 0,e):t}function wg(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function UR(t){return t.split(/\s+/).filter(Boolean)}function Fi(t){return[].concat(t)}function xg(t,e){t.indexOf(e)===-1&&t.push(e)}function KR(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function GR(t){return t.split("-")[0]}function Tl(t){return[].slice.call(t)}function Eg(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function es(){return document.createElement("div")}function Hu(t){return["Element","Fragment"].some(function(e){return _h(t,e)})}function JR(t){return _h(t,"NodeList")}function YR(t){return _h(t,"MouseEvent")}function XR(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function ZR(t){return Hu(t)?[t]:JR(t)?Tl(t):Array.isArray(t)?t:Tl(document.querySelectorAll(t))}function Nc(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Cg(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function QR(t){var e,n=Fi(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function eP(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,l=a.interactiveBorder,u=GR(s.placement),c=s.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,h=u==="top"?c.bottom.y:0,p=u==="right"?c.left.x:0,f=u==="left"?c.right.x:0,m=o.top-r+d>l,g=r-o.bottom-h>l,b=o.left-n+p>l,y=n-o.right-f>l;return m||g||b||y})}function Rc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Sg(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var fn={isTouch:!1},Tg=0;function tP(){fn.isTouch||(fn.isTouch=!0,window.performance&&document.addEventListener("mousemove",X0))}function X0(){var t=performance.now();t-Tg<20&&(fn.isTouch=!1,document.removeEventListener("mousemove",X0)),Tg=t}function nP(){var t=document.activeElement;if(XR(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function rP(){document.addEventListener("touchstart",tP,$r),window.addEventListener("blur",nP)}var iP=typeof window<"u"&&typeof document<"u",oP=iP?!!window.msCrypto:!1,sP={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},aP={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Yt=Object.assign({appendTo:J0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},sP,aP),lP=Object.keys(Yt),uP=function(t){var e=Object.keys(t);e.forEach(function(n){Yt[n]=t[n]})};function Z0(t){var e=t.plugins||[],n=e.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=t[o]!==void 0?t[o]:(a=Yt[o])!=null?a:s}return r},{});return Object.assign({},t,n)}function cP(t,e){var n=e?Object.keys(Z0(Object.assign({},Yt,{plugins:e}))):lP,r=n.reduce(function(i,o){var s=(t.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function Og(t,e){var n=Object.assign({},e,{content:Y0(e.content,[t])},e.ignoreAttributes?{}:cP(t,e.plugins));return n.aria=Object.assign({},Yt.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}var dP=function(){return"innerHTML"};function Gd(t,e){t[dP()]=e}function Ag(t){var e=es();return t===!0?e.className=K0:(e.className=G0,Hu(t)?e.appendChild(t):Gd(e,t)),e}function Mg(t,e){Hu(e.content)?(Gd(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Gd(t,e.content):t.textContent=e.content)}function Jd(t){var e=t.firstElementChild,n=Tl(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(U0)}),arrow:n.find(function(r){return r.classList.contains(K0)||r.classList.contains(G0)}),backdrop:n.find(function(r){return r.classList.contains(WR)})}}function Q0(t){var e=es(),n=es();n.className=qR,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=es();r.className=U0,r.setAttribute("data-state","hidden"),Mg(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props);function i(o,s){var a=Jd(e),l=a.box,u=a.content,c=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&Mg(u,t.props),s.arrow?c?o.arrow!==s.arrow&&(l.removeChild(c),l.appendChild(Ag(s.arrow))):l.appendChild(Ag(s.arrow)):c&&l.removeChild(c)}return{popper:e,onUpdate:i}}Q0.$$tippy=!0;var pP=1,wa=[],Pc=[];function hP(t,e){var n=Og(t,Object.assign({},Yt,Z0(Eg(e)))),r,i,o,s=!1,a=!1,l=!1,u=!1,c,d,h,p=[],f=wg(qs,n.interactiveDebounce),m,g=pP++,b=null,y=KR(n.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},v={id:g,reference:t,popper:es(),popperInstance:b,props:n,state:k,plugins:y,clearDelayTimeouts:Js,setProps:Ys,setContent:Xs,show:kk,hide:wk,hideWithInteractivity:xk,enable:wo,disable:Gs,unmount:Ek,destroy:Ck};if(!n.render)return v;var w=n.render(v),x=w.popper,C=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+v.id,v.popper=x,t._tippy=v,x._tippy=v;var M=y.map(function(S){return S.fn(v)}),T=t.hasAttribute("aria-expanded");return ki(),Ie(),X(),fe("onCreate",[v]),n.showOnCreate&&ko(),x.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&j().addEventListener("mousemove",f)}),v;function A(){var S=v.props.touch;return Array.isArray(S)?S:[S,0]}function _(){return A()[0]==="hold"}function N(){var S;return!!((S=v.props.render)!=null&&S.$$tippy)}function $(){return m||t}function j(){var S=$().parentNode;return S?QR(S):document}function q(){return Jd(x)}function K(S){return v.state.isMounted&&!v.state.isVisible||fn.isTouch||c&&c.type==="focus"?0:Ic(v.props.delay,S?0:1,Yt.delay)}function X(S){S===void 0&&(S=!1),x.style.pointerEvents=v.props.interactive&&!S?"":"none",x.style.zIndex=""+v.props.zIndex}function fe(S,G,ie){if(ie===void 0&&(ie=!0),M.forEach(function(me){me[S]&&me[S].apply(me,G)}),ie){var ye;(ye=v.props)[S].apply(ye,G)}}function Ee(){var S=v.props.aria;if(S.content){var G="aria-"+S.content,ie=x.id,ye=Fi(v.props.triggerTarget||t);ye.forEach(function(me){var ut=me.getAttribute(G);if(v.state.isVisible)me.setAttribute(G,ut?ut+" "+ie:ie);else{var Nt=ut&&ut.replace(ie,"").trim();Nt?me.setAttribute(G,Nt):me.removeAttribute(G)}})}}function Ie(){if(!(T||!v.props.aria.expanded)){var S=Fi(v.props.triggerTarget||t);S.forEach(function(G){v.props.interactive?G.setAttribute("aria-expanded",v.state.isVisible&&G===$()?"true":"false"):G.removeAttribute("aria-expanded")})}}function An(){j().removeEventListener("mousemove",f),wa=wa.filter(function(S){return S!==f})}function sn(S){if(!(fn.isTouch&&(l||S.type==="mousedown"))){var G=S.composedPath&&S.composedPath()[0]||S.target;if(!(v.props.interactive&&Sg(x,G))){if(Fi(v.props.triggerTarget||t).some(function(ie){return Sg(ie,G)})){if(fn.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else fe("onClickOutside",[v,S]);v.props.hideOnClick===!0&&(v.clearDelayTimeouts(),v.hide(),a=!0,setTimeout(function(){a=!1}),v.state.isMounted||Jn())}}}function _r(){l=!0}function an(){l=!1}function It(){var S=j();S.addEventListener("mousedown",sn,!0),S.addEventListener("touchend",sn,$r),S.addEventListener("touchstart",an,$r),S.addEventListener("touchmove",_r,$r)}function Jn(){var S=j();S.removeEventListener("mousedown",sn,!0),S.removeEventListener("touchend",sn,$r),S.removeEventListener("touchstart",an,$r),S.removeEventListener("touchmove",_r,$r)}function Dr(S,G){zs(S,function(){!v.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&G()})}function Yn(S,G){zs(S,G)}function zs(S,G){var ie=q().box;function ye(me){me.target===ie&&(Rc(ie,"remove",ye),G())}if(S===0)return G();Rc(ie,"remove",d),Rc(ie,"add",ye),d=ye}function Xn(S,G,ie){ie===void 0&&(ie=!1);var ye=Fi(v.props.triggerTarget||t);ye.forEach(function(me){me.addEventListener(S,G,ie),p.push({node:me,eventType:S,handler:G,options:ie})})}function ki(){_()&&(Xn("touchstart",vo,{passive:!0}),Xn("touchend",Ws,{passive:!0})),UR(v.props.trigger).forEach(function(S){if(S!=="manual")switch(Xn(S,vo),S){case"mouseenter":Xn("mouseleave",Ws);break;case"focus":Xn(oP?"focusout":"blur",yo);break;case"focusin":Xn("focusout",yo);break}})}function Hs(){p.forEach(function(S){var G=S.node,ie=S.eventType,ye=S.handler,me=S.options;G.removeEventListener(ie,ye,me)}),p=[]}function vo(S){var G,ie=!1;if(!(!v.state.isEnabled||bo(S)||a)){var ye=((G=c)==null?void 0:G.type)==="focus";c=S,m=S.currentTarget,Ie(),!v.state.isVisible&&YR(S)&&wa.forEach(function(me){return me(S)}),S.type==="click"&&(v.props.trigger.indexOf("mouseenter")<0||s)&&v.props.hideOnClick!==!1&&v.state.isVisible?ie=!0:ko(S),S.type==="click"&&(s=!ie),ie&&!ye&&Ir(S)}}function qs(S){var G=S.target,ie=$().contains(G)||x.contains(G);if(!(S.type==="mousemove"&&ie)){var ye=Zn().concat(x).map(function(me){var ut,Nt=me._tippy,wi=(ut=Nt.popperInstance)==null?void 0:ut.state;return wi?{popperRect:me.getBoundingClientRect(),popperState:wi,props:n}:null}).filter(Boolean);eP(ye,S)&&(An(),Ir(S))}}function Ws(S){var G=bo(S)||v.props.trigger.indexOf("click")>=0&&s;if(!G){if(v.props.interactive){v.hideWithInteractivity(S);return}Ir(S)}}function yo(S){v.props.trigger.indexOf("focusin")<0&&S.target!==$()||v.props.interactive&&S.relatedTarget&&x.contains(S.relatedTarget)||Ir(S)}function bo(S){return fn.isTouch?_()!==S.type.indexOf("touch")>=0:!1}function Us(){Ks();var S=v.props,G=S.popperOptions,ie=S.placement,ye=S.offset,me=S.getReferenceClientRect,ut=S.moveTransition,Nt=N()?Jd(x).arrow:null,wi=me?{getBoundingClientRect:me,contextElement:me.contextElement||$()}:t,Zs={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qs){var xi=Qs.state;if(N()){var Sk=q(),Wu=Sk.box;["placement","reference-hidden","escaped"].forEach(function(ea){ea==="placement"?Wu.setAttribute("data-placement",xi.placement):xi.attributes.popper["data-popper-"+ea]?Wu.setAttribute("data-"+ea,""):Wu.removeAttribute("data-"+ea)}),xi.attributes.popper={}}}},Nr=[{name:"offset",options:{offset:ye}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ut}},Zs];N()&&Nt&&Nr.push({name:"arrow",options:{element:Nt,padding:3}}),Nr.push.apply(Nr,G?.modifiers||[]),v.popperInstance=HR(wi,x,Object.assign({},G,{placement:ie,onFirstUpdate:h,modifiers:Nr}))}function Ks(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function Mn(){var S=v.props.appendTo,G,ie=$();v.props.interactive&&S===J0||S==="parent"?G=ie.parentNode:G=Y0(S,[ie]),G.contains(x)||G.appendChild(x),v.state.isMounted=!0,Us()}function Zn(){return Tl(x.querySelectorAll("[data-tippy-root]"))}function ko(S){v.clearDelayTimeouts(),S&&fe("onTrigger",[v,S]),It();var G=K(!0),ie=A(),ye=ie[0],me=ie[1];fn.isTouch&&ye==="hold"&&me&&(G=me),G?r=setTimeout(function(){v.show()},G):v.show()}function Ir(S){if(v.clearDelayTimeouts(),fe("onUntrigger",[v,S]),!v.state.isVisible){Jn();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(S.type)>=0&&s)){var G=K(!1);G?i=setTimeout(function(){v.state.isVisible&&v.hide()},G):o=requestAnimationFrame(function(){v.hide()})}}function wo(){v.state.isEnabled=!0}function Gs(){v.hide(),v.state.isEnabled=!1}function Js(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Ys(S){if(!v.state.isDestroyed){fe("onBeforeUpdate",[v,S]),Hs();var G=v.props,ie=Og(t,Object.assign({},G,Eg(S),{ignoreAttributes:!0}));v.props=ie,ki(),G.interactiveDebounce!==ie.interactiveDebounce&&(An(),f=wg(qs,ie.interactiveDebounce)),G.triggerTarget&&!ie.triggerTarget?Fi(G.triggerTarget).forEach(function(ye){ye.removeAttribute("aria-expanded")}):ie.triggerTarget&&t.removeAttribute("aria-expanded"),Ie(),X(),C&&C(G,ie),v.popperInstance&&(Us(),Zn().forEach(function(ye){requestAnimationFrame(ye._tippy.popperInstance.forceUpdate)})),fe("onAfterUpdate",[v,S])}}function Xs(S){v.setProps({content:S})}function kk(){var S=v.state.isVisible,G=v.state.isDestroyed,ie=!v.state.isEnabled,ye=fn.isTouch&&!v.props.touch,me=Ic(v.props.duration,0,Yt.duration);if(!(S||G||ie||ye)&&!$().hasAttribute("disabled")&&(fe("onShow",[v],!1),v.props.onShow(v)!==!1)){if(v.state.isVisible=!0,N()&&(x.style.visibility="visible"),X(),It(),v.state.isMounted||(x.style.transition="none"),N()){var ut=q(),Nt=ut.box,wi=ut.content;Nc([Nt,wi],0)}h=function(){var Zs;if(!(!v.state.isVisible||u)){if(u=!0,x.offsetHeight,x.style.transition=v.props.moveTransition,N()&&v.props.animation){var Nr=q(),Qs=Nr.box,xi=Nr.content;Nc([Qs,xi],me),Cg([Qs,xi],"visible")}Ee(),Ie(),xg(Pc,v),(Zs=v.popperInstance)==null||Zs.forceUpdate(),fe("onMount",[v]),v.props.animation&&N()&&Yn(me,function(){v.state.isShown=!0,fe("onShown",[v])})}},Mn()}}function wk(){var S=!v.state.isVisible,G=v.state.isDestroyed,ie=!v.state.isEnabled,ye=Ic(v.props.duration,1,Yt.duration);if(!(S||G||ie)&&(fe("onHide",[v],!1),v.props.onHide(v)!==!1)){if(v.state.isVisible=!1,v.state.isShown=!1,u=!1,s=!1,N()&&(x.style.visibility="hidden"),An(),Jn(),X(!0),N()){var me=q(),ut=me.box,Nt=me.content;v.props.animation&&(Nc([ut,Nt],ye),Cg([ut,Nt],"hidden"))}Ee(),Ie(),v.props.animation?N()&&Dr(ye,v.unmount):v.unmount()}}function xk(S){j().addEventListener("mousemove",f),xg(wa,f),f(S)}function Ek(){v.state.isVisible&&v.hide(),v.state.isMounted&&(Ks(),Zn().forEach(function(S){S._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),Pc=Pc.filter(function(S){return S!==v}),v.state.isMounted=!1,fe("onHidden",[v]))}function Ck(){!v.state.isDestroyed&&(v.clearDelayTimeouts(),v.unmount(),Hs(),delete t._tippy,v.state.isDestroyed=!0,fe("onDestroy",[v]))}}function go(t,e){e===void 0&&(e={});var n=Yt.plugins.concat(e.plugins||[]);rP();var r=Object.assign({},e,{plugins:n}),i=ZR(t),o=i.reduce(function(s,a){var l=a&&hP(a,r);return l&&s.push(l),s},[]);return Hu(t)?o[0]:o}go.defaultProps=Yt;go.setDefaultProps=uP;go.currentInput=fn;Object.assign({},B0,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});go.setDefaultProps({render:Q0});class fP{constructor({editor:e,element:n,view:r,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:u,to:c})=>{const{doc:d,selection:h}=l,{empty:p}=h,f=!d.textBetween(u,c).length&&bh(l.selection),m=this.element.contains(document.activeElement);return!(!(a.hasFocus()||m)||p||f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget)||a?.relatedTarget!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const u=!(l!=null&&l.selection.eq(a.state.selection)),c=!(l!=null&&l.doc.eq(a.state.doc));!u&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,u,c,l)},this.updateDelay))},this.updateHandler=(a,l,u,c)=>{var d,h,p;const{state:f,composing:m}=a,{selection:g}=f;if(m||!l&&!u)return;this.createTooltip();const{ranges:b}=g,y=Math.min(...b.map(v=>v.$from.pos)),k=Math.max(...b.map(v=>v.$to.pos));if(!(!((d=this.shouldShow)===null||d===void 0)&&d.call(this,{editor:this.editor,element:this.element,view:a,state:f,oldState:c,from:y,to:k}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(R0(f.selection)){let v=a.nodeDOM(y);if(v){const w=v.dataset.nodeViewWrapper?v:v.querySelector("[data-node-view-wrapper]");if(w&&(v=w.firstChild),v)return v.getBoundingClientRect()}}return P0(a,y,k)})}),this.show()},this.editor=e,this.element=n,this.view=r,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=go(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){const{state:r}=e,i=r.selection.from!==r.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,n);return}const o=!(n!=null&&n.selection.eq(e.state.selection)),s=!(n!=null&&n.doc.eq(e.state.doc));this.updateHandler(e,o,s,n)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const mP=t=>new $e({key:typeof t.pluginKey=="string"?new lt(t.pluginKey):t.pluginKey,view:e=>new fP({view:e,...t})});Ke.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[mP({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class gP{getTextContent(e){return I0(e,{textSerializers:vh(this.editor.schema)})}constructor({editor:e,element:n,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:u,empty:c}=l,d=u.depth===1,h=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&!((a=this.element.parentNode)===null||a===void 0)&&a.contains(s.relatedTarget)||s?.relatedTarget!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=n,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=go(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){var r,i,o;const{state:s}=e,{doc:a,selection:l}=s,{from:u,to:c}=l;if(!(n&&n.doc.eq(a)&&n.selection.eq(l))){if(this.createTooltip(),!(!((r=this.shouldShow)===null||r===void 0)&&r.call(this,{editor:this.editor,view:e,state:s,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((o=this.tippyOptions)===null||o===void 0?void 0:o.getReferenceClientRect)||(()=>P0(e,u,c))}),this.show()}}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const vP=t=>new $e({key:typeof t.pluginKey=="string"?new lt(t.pluginKey):t.pluginKey,view:e=>new gP({view:e,...t})});Ke.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[vP({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});function _g(t){return Gg((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class yP extends LN{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=_g(this.view.state),this.reactiveExtensionStorage=_g(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),Ta(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){const r=super.registerPlugin(e,n);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const n=super.unregisterPlugin(e);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const bP=Q({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=H(),n=hp();return lp(()=>{const r=t.editor;r&&r.options.element&&e.value&&xr(()=>{if(!e.value||!r.options.element.firstChild)return;const i=B(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),pi(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return ls("div",{ref:t=>{this.rootEl=t}})}}),kP=(t={})=>{const e=Zt();return Tn(()=>{e.value=new yP(t)}),pi(()=>{var n,r,i;const o=(n=e.value)===null||n===void 0?void 0:n.options.element,s=o?.cloneNode(!0);(r=o?.parentNode)===null||r===void 0||r.replaceChild(s,o),(i=e.value)===null||i===void 0||i.destroy()}),e},wP="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",xP="ελ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",fo=(t,e)=>{for(const n in e)t[n]=e[n];return t},Yd="numeric",Xd="ascii",Zd="alpha",ts="asciinumeric",$o="alphanumeric",Qd="domain",ek="emoji",EP="scheme",CP="slashscheme",Fc="whitespace";function SP(t,e){return t in e||(e[t]=[]),e[t]}function Ur(t,e,n){e[Yd]&&(e[ts]=!0,e[$o]=!0),e[Xd]&&(e[ts]=!0,e[Zd]=!0),e[ts]&&(e[$o]=!0),e[Zd]&&(e[$o]=!0),e[$o]&&(e[Qd]=!0),e[ek]&&(e[Qd]=!0);for(const r in e){const i=SP(r,n);i.indexOf(t)<0&&i.push(t)}}function TP(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function vt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}vt.groups={};vt.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 i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(t))return o}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||vt.groups;let i;return e&&e.j?i=e:(i=new vt(e),n&&r&&Ur(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(t[s]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||vt.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let s,a=i.go(t);if(a?(s=new vt,fo(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new vt,o){if(r)if(s.t&&typeof s.t=="string"){const l=fo(TP(s.t,r),n);Ur(o,l,r)}else n&&Ur(o,n,r);s.t=o}return i.j[t]=s,s}};const ce=(t,e,n,r,i)=>t.ta(e,n,r,i),Ae=(t,e,n,r,i)=>t.tr(e,n,r,i),Dg=(t,e,n,r,i)=>t.ts(e,n,r,i),R=(t,e,n,r,i)=>t.tt(e,n,r,i),Rn="WORD",ep="UWORD",tk="ASCIINUMERICAL",nk="ALPHANUMERICAL",Os="LOCALHOST",tp="TLD",np="UTLD",za="SCHEME",Li="SLASH_SCHEME",Dh="NUM",rp="WS",Ih="NL",ns="OPENBRACE",rs="CLOSEBRACE",Ol="OPENBRACKET",Al="CLOSEBRACKET",Ml="OPENPAREN",_l="CLOSEPAREN",Dl="OPENANGLEBRACKET",Il="CLOSEANGLEBRACKET",Nl="FULLWIDTHLEFTPAREN",Rl="FULLWIDTHRIGHTPAREN",Pl="LEFTCORNERBRACKET",Fl="RIGHTCORNERBRACKET",Ll="LEFTWHITECORNERBRACKET",Bl="RIGHTWHITECORNERBRACKET",Vl="FULLWIDTHLESSTHAN",$l="FULLWIDTHGREATERTHAN",jl="AMPERSAND",zl="APOSTROPHE",Hl="ASTERISK",rr="AT",ql="BACKSLASH",Wl="BACKTICK",Ul="CARET",ar="COLON",Nh="COMMA",Kl="DOLLAR",cn="DOT",Gl="EQUALS",Rh="EXCLAMATION",Pt="HYPHEN",is="PERCENT",Jl="PIPE",Yl="PLUS",Xl="POUND",ss="QUERY",Ph="QUOTE",rk="FULLWIDTHMIDDLEDOT",Fh="SEMI",dn="SLASH",as="TILDE",Zl="UNDERSCORE",ik="EMOJI",Ql="SYM";var ok=Object.freeze({__proto__:null,ALPHANUMERICAL:nk,AMPERSAND:jl,APOSTROPHE:zl,ASCIINUMERICAL:tk,ASTERISK:Hl,AT:rr,BACKSLASH:ql,BACKTICK:Wl,CARET:Ul,CLOSEANGLEBRACKET:Il,CLOSEBRACE:rs,CLOSEBRACKET:Al,CLOSEPAREN:_l,COLON:ar,COMMA:Nh,DOLLAR:Kl,DOT:cn,EMOJI:ik,EQUALS:Gl,EXCLAMATION:Rh,FULLWIDTHGREATERTHAN:$l,FULLWIDTHLEFTPAREN:Nl,FULLWIDTHLESSTHAN:Vl,FULLWIDTHMIDDLEDOT:rk,FULLWIDTHRIGHTPAREN:Rl,HYPHEN:Pt,LEFTCORNERBRACKET:Pl,LEFTWHITECORNERBRACKET:Ll,LOCALHOST:Os,NL:Ih,NUM:Dh,OPENANGLEBRACKET:Dl,OPENBRACE:ns,OPENBRACKET:Ol,OPENPAREN:Ml,PERCENT:is,PIPE:Jl,PLUS:Yl,POUND:Xl,QUERY:ss,QUOTE:Ph,RIGHTCORNERBRACKET:Fl,RIGHTWHITECORNERBRACKET:Bl,SCHEME:za,SEMI:Fh,SLASH:dn,SLASH_SCHEME:Li,SYM:Ql,TILDE:as,TLD:tp,UNDERSCORE:Zl,UTLD:np,UWORD:ep,WORD:Rn,WS:rp});const Dn=/[a-z]/,Ao=/\p{L}/u,Lc=/\p{Emoji}/u,In=/\d/,Bc=/\s/,Ig="\r",Vc=`
97
97
  `,OP="️",AP="‍",$c="";let xa=null,Ea=null;function MP(t=[]){const e={};vt.groups=e;const n=new vt;xa==null&&(xa=Ng(wP)),Ea==null&&(Ea=Ng(xP)),R(n,"'",zl),R(n,"{",ns),R(n,"}",rs),R(n,"[",Ol),R(n,"]",Al),R(n,"(",Ml),R(n,")",_l),R(n,"<",Dl),R(n,">",Il),R(n,"(",Nl),R(n,")",Rl),R(n,"「",Pl),R(n,"」",Fl),R(n,"『",Ll),R(n,"』",Bl),R(n,"<",Vl),R(n,">",$l),R(n,"&",jl),R(n,"*",Hl),R(n,"@",rr),R(n,"`",Wl),R(n,"^",Ul),R(n,":",ar),R(n,",",Nh),R(n,"$",Kl),R(n,".",cn),R(n,"=",Gl),R(n,"!",Rh),R(n,"-",Pt),R(n,"%",is),R(n,"|",Jl),R(n,"+",Yl),R(n,"#",Xl),R(n,"?",ss),R(n,'"',Ph),R(n,"/",dn),R(n,";",Fh),R(n,"~",as),R(n,"_",Zl),R(n,"\\",ql),R(n,"・",rk);const r=Ae(n,In,Dh,{[Yd]:!0});Ae(r,In,r);const i=Ae(r,Dn,tk,{[ts]:!0}),o=Ae(r,Ao,nk,{[$o]:!0}),s=Ae(n,Dn,Rn,{[Xd]:!0});Ae(s,In,i),Ae(s,Dn,s),Ae(i,In,i),Ae(i,Dn,i);const a=Ae(n,Ao,ep,{[Zd]:!0});Ae(a,Dn),Ae(a,In,o),Ae(a,Ao,a),Ae(o,In,o),Ae(o,Dn),Ae(o,Ao,o);const l=R(n,Vc,Ih,{[Fc]:!0}),u=R(n,Ig,rp,{[Fc]:!0}),c=Ae(n,Bc,rp,{[Fc]:!0});R(n,$c,c),R(u,Vc,l),R(u,$c,c),Ae(u,Bc,c),R(c,Ig),R(c,Vc),Ae(c,Bc,c),R(c,$c,c);const d=Ae(n,Lc,ik,{[ek]:!0});R(d,"#"),Ae(d,Lc,d),R(d,OP,d);const h=R(d,AP);R(h,"#"),Ae(h,Lc,d);const p=[[Dn,s],[In,i]],f=[[Dn,null],[Ao,a],[In,o]];for(let m=0;m<xa.length;m++)Qn(n,xa[m],tp,Rn,p);for(let m=0;m<Ea.length;m++)Qn(n,Ea[m],np,ep,f);Ur(tp,{tld:!0,ascii:!0},e),Ur(np,{utld:!0,alpha:!0},e),Qn(n,"file",za,Rn,p),Qn(n,"mailto",za,Rn,p),Qn(n,"http",Li,Rn,p),Qn(n,"https",Li,Rn,p),Qn(n,"ftp",Li,Rn,p),Qn(n,"ftps",Li,Rn,p),Ur(za,{scheme:!0,ascii:!0},e),Ur(Li,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){const g=t[m][0],b=t[m][1]?{[EP]:!0}:{[CP]:!0};g.indexOf("-")>=0?b[Qd]=!0:Dn.test(g)?In.test(g)?b[ts]=!0:b[Xd]=!0:b[Yd]=!0,Dg(n,g,g,b)}return Dg(n,"localhost",Os,{ascii:!0}),n.jd=new vt(Ql),{start:n,tokens:fo({groups:e},ok)}}function sk(t,e){const n=_P(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=t,l=null,u=0,c=null,d=-1,h=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(d=0,h=0,c=a):d>=0&&(d+=n[s].length,h++),u+=n[s].length,o+=n[s].length,s++;o-=d,s-=h,u-=d,i.push({t:c.t,v:e.slice(o-u,o),s:o-u,e:o})}return i}function _P(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Qn(t,e,n,r,i){let o;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?o=t.j[l]:(o=new vt(r),o.jr=i.slice(),t.j[l]=o),t=o}return o=new vt(n),o.jr=i.slice(),t.j[e[s-1]]=o,o}function Ng(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let o=0;for(;i.indexOf(t[r+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(t[r]),r++}return e}const As={defaultProtocol:"http",events:null,format:Rg,formatHref:Rg,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Lh(t,e=null){let n=fo({},As);t&&(n=fo(n,t instanceof Lh?t.o:t));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}Lh.prototype={o:As,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:As[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},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 Rg(t){return t}function ak(t,e){this.t="token",this.v=t,this.tk=e}ak.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=As.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),i=t.get("tagName",n,e),o=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),c=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&fo(s,c),{tagName:i,attributes:s,content:o,eventListeners:d}}};function qu(t,e){class n extends ak{constructor(i,o){super(i,o),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Pg=qu("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Fg=qu("text"),DP=qu("nl"),Ca=qu("url",{isLink:!0,toHref(t=As.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Os&&t[1].t===ar}}),Rt=t=>new vt(t);function IP({groups:t}){const e=t.domain.concat([jl,Hl,rr,ql,Wl,Ul,Kl,Gl,Pt,Dh,is,Jl,Yl,Xl,dn,Ql,as,Zl]),n=[zl,ar,Nh,cn,Rh,is,ss,Ph,Fh,Dl,Il,ns,rs,Al,Ol,Ml,_l,Nl,Rl,Pl,Fl,Ll,Bl,Vl,$l],r=[jl,zl,Hl,ql,Wl,Ul,Kl,Gl,Pt,ns,rs,is,Jl,Yl,Xl,ss,dn,Ql,as,Zl],i=Rt(),o=R(i,as);ce(o,r,o),ce(o,t.domain,o);const s=Rt(),a=Rt(),l=Rt();ce(i,t.domain,s),ce(i,t.scheme,a),ce(i,t.slashscheme,l),ce(s,r,o),ce(s,t.domain,s);const u=R(s,rr);R(o,rr,u),R(a,rr,u),R(l,rr,u);const c=R(o,cn);ce(c,r,o),ce(c,t.domain,o);const d=Rt();ce(u,t.domain,d),ce(d,t.domain,d);const h=R(d,cn);ce(h,t.domain,d);const p=Rt(Pg);ce(h,t.tld,p),ce(h,t.utld,p),R(u,Os,p);const f=R(d,Pt);R(f,Pt,f),ce(f,t.domain,d),ce(p,t.domain,d),R(p,cn,h),R(p,Pt,f);const m=R(p,ar);ce(m,t.numeric,Pg);const g=R(s,Pt),b=R(s,cn);R(g,Pt,g),ce(g,t.domain,s),ce(b,r,o),ce(b,t.domain,s);const y=Rt(Ca);ce(b,t.tld,y),ce(b,t.utld,y),ce(y,t.domain,s),ce(y,r,o),R(y,cn,b),R(y,Pt,g),R(y,rr,u);const k=R(y,ar),v=Rt(Ca);ce(k,t.numeric,v);const w=Rt(Ca),x=Rt();ce(w,e,w),ce(w,n,x),ce(x,e,w),ce(x,n,x),R(y,dn,w),R(v,dn,w);const C=R(a,ar),M=R(l,ar),T=R(M,dn),A=R(T,dn);ce(a,t.domain,s),R(a,cn,b),R(a,Pt,g),ce(l,t.domain,s),R(l,cn,b),R(l,Pt,g),ce(C,t.domain,w),R(C,dn,w),R(C,ss,w),ce(A,t.domain,w),ce(A,e,w),R(A,dn,w);const _=[[ns,rs],[Ol,Al],[Ml,_l],[Dl,Il],[Nl,Rl],[Pl,Fl],[Ll,Bl],[Vl,$l]];for(let N=0;N<_.length;N++){const[$,j]=_[N],q=R(w,$);R(x,$,q),R(q,j,w);const K=Rt(Ca);ce(q,e,K);const X=Rt();ce(q,n),ce(K,e,K),ce(K,n,X),ce(X,e,K),ce(X,n,X),R(K,j,w),R(X,j,w)}return R(i,Os,y),R(i,Ih,DP),{start:i,tokens:ok}}function NP(t,e,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=t,l=null,u=null,c=0,d=null,h=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(u=l||a.go(n[i].t));)l=null,a=u,a.accepts()?(h=0,d=a):h>=0&&h++,i++,c++;if(h<0)i-=c,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(jc(Fg,e,s)),s=[]),i-=h,c-=h;const p=d.t,f=n.slice(i-c,i);o.push(jc(p,e,f))}}return s.length>0&&o.push(jc(Fg,e,s)),o}function jc(t,e,n){const r=n[0].s,i=n[n.length-1].e,o=e.slice(r,i);return new t(o,n)}const RP=typeof console<"u"&&console&&console.warn||(()=>{}),PP="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",we={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function FP(){return vt.groups={},we.scanner=null,we.parser=null,we.tokenQueue=[],we.pluginQueue=[],we.customSchemes=[],we.initialized=!1,we}function Lg(t,e=!1){if(we.initialized&&RP(`linkifyjs: already initialized - will not register custom scheme "${t}" ${PP}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
98
98
  1. Must only contain digits, lowercase ASCII letters or "-"
99
99
  2. Cannot start or end with "-"