strapi-plugin-comments 3.0.6 → 3.0.7-beta.1
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/_chunks/en-CgUbWvmQ.js +1 -0
- package/dist/_chunks/{en-DZljqkLz.mjs → en-DCsHR-ue.mjs} +2 -2
- package/dist/_chunks/fr-BXfxIXq1.js +1 -0
- package/dist/_chunks/{fr-oAh2cU0E.mjs → fr-DC9DGoT1.mjs} +2 -2
- package/dist/_chunks/index-BgJ65O-2.js +44 -0
- package/dist/_chunks/index-BpDl_L4E.mjs +5715 -0
- package/dist/_chunks/index-CTrpEEVW.js +2153 -0
- package/dist/_chunks/{index-yhf78avJ.mjs → index-CVaM8WKt.mjs} +15372 -25173
- package/dist/_chunks/index-CYrQYscU.js +1 -0
- package/dist/_chunks/index-D9B514y5.mjs +38397 -0
- package/dist/_chunks/index-DbSxM8lO.js +600 -0
- package/dist/_chunks/index-wsRcN626.mjs +340 -0
- package/dist/_chunks/pl-Bl4yP3sZ.js +1 -0
- package/dist/_chunks/{pl-BUVUFx9r.mjs → pl-DZiVsGIg.mjs} +2 -2
- package/dist/_chunks/{pt-BR-Bchhsf7B.mjs → pt-BR-CW4ugNZj.mjs} +2 -2
- package/dist/_chunks/pt-BR-D9T5g0JT.js +1 -0
- package/dist/_chunks/{ru-BQ54P0xr.mjs → ru-CfKjYq3M.mjs} +2 -2
- package/dist/_chunks/ru-DIZ4pV4l.js +1 -0
- package/dist/_chunks/{tr-CkGcBRUv.mjs → tr-BQR2hK7S.mjs} +2 -2
- package/dist/_chunks/tr-Dl2hdLCx.js +1 -0
- package/dist/_chunks/zh-Hans-BZhnqfei.js +1 -0
- package/dist/_chunks/{zh-Hans-Buh0iPWA.mjs → zh-Hans-lNqOn5JS.mjs} +2 -2
- package/dist/admin/index.js +1 -4
- package/dist/admin/index.mjs +2 -2
- package/dist/server/index.js +92 -14968
- package/dist/server/index.mjs +8841 -11749
- package/dist/style.css +1 -84
- package/package.json +2 -2
- package/dist/_chunks/en-D1Rj1A_i.js +0 -195
- package/dist/_chunks/fr-DbxNAr65.js +0 -146
- package/dist/_chunks/index-BMAhFLKR.js +0 -375
- package/dist/_chunks/index-CK1XCSqz.mjs +0 -373
- package/dist/_chunks/index-DCKroyap.js +0 -51702
- package/dist/_chunks/index-DHhRVslt.js +0 -51324
- package/dist/_chunks/index-DUWJDJLu.mjs +0 -51309
- package/dist/_chunks/index-PCqyAKE7.mjs +0 -8487
- package/dist/_chunks/index-_4jTpBrc.js +0 -8503
- package/dist/_chunks/pl-CuTgrHph.js +0 -195
- package/dist/_chunks/pt-BR-2Z9CtgSm.js +0 -145
- package/dist/_chunks/ru-gtnRlbuP.js +0 -195
- package/dist/_chunks/tr-Ucl3IKMX.js +0 -193
- package/dist/_chunks/zh-Hans-Dhk3gIYb.js +0 -195
|
@@ -0,0 +1,2153 @@
|
|
|
1
|
+
"use strict";const w=require("react"),k=require("styled-components"),m=require("react/jsx-runtime"),ul=require("react-dom");function nv(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const S=nv(w),Eo=nv(ul),D0=(t,e="")=>Object.keys(t).reduce((n,r)=>{const i=e.length?`${e}.`:"";return typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?Object.assign(n,D0(t[r],i+r)):n[i+r]=t[r],n},{}),Ub=(t,e)=>{if(!e)throw new TypeError("pluginId can't be empty");return Object.keys(t).reduce((n,r)=>(n[`${e}.${r}`]=t[r],n),{})};function _d(t,e){return t-e*Math.floor(t/e)}const rv=1721426;function Sc(t,e,n,r){e=pg(t,e);let i=e-1,o=-2;return n<=2?o=0:lu(e)&&(o=-1),rv-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+o+r)}function lu(t){return t%4===0&&(t%100!==0||t%400===0)}function pg(t,e){return t==="BC"?1-e:e}function ZT(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const JT={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class $s{fromJulianDay(e){let n=e,r=n-rv,i=Math.floor(r/146097),o=_d(r,146097),s=Math.floor(o/36524),a=_d(o,36524),c=Math.floor(a/1461),f=_d(a,1461),h=Math.floor(f/365),d=i*400+s*100+c*4+h+(s!==4&&h!==4?1:0),[p,b]=ZT(d),x=n-Sc(p,b,1,1),v=2;n<Sc(p,b,3,1)?v=0:lu(b)&&(v=1);let C=Math.floor(((x+v)*12+373)/367),$=n-Sc(p,b,C,1)+1;return new Na(p,b,C,$)}toJulianDay(e){return Sc(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return JT[lu(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return lu(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const eE={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function iv(t,e){return e=Gn(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function ov(t,e){let n=t.calendar.toJulianDay(t),r=Math.ceil(n+1-sE(e))%7;return r<0&&(r+=7),r}function tE(t){return Xr(Date.now(),t)}function mg(t){return fv(tE(t))}function sv(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function nE(t,e){return qb(t)-qb(e)}function qb(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Ld=null;function Ss(){return Ld==null&&(Ld=new Intl.DateTimeFormat().resolvedOptions().timeZone),Ld}function rE(t){return t.subtract({days:t.day-1})}function iE(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}function av(t,e){let n=ov(t,e);return t.subtract({days:n})}const Kb=new Map;function oE(t){if(Intl.Locale){let n=Kb.get(t);return n||(n=new Intl.Locale(t).maximize().region,n&&Kb.set(t,n)),n}let e=t.split("-")[1];return e==="u"?void 0:e}function sE(t){let e=oE(t);return e&&eE[e]||0}function I0(t,e){return t&&e?t.compare(e)<=0?t:e:t||e}function _0(t,e){return t&&e?t.compare(e)>=0?t:e:t||e}function As(t){t=Gn(t,new $s);let e=pg(t.era,t.year);return lv(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function lv(t,e,n,r,i,o,s){let a=new Date;return a.setUTCHours(r,i,o,s),a.setUTCFullYear(t,e-1,n),a.getTime()}function L0(t,e){if(e==="UTC")return 0;if(t>0&&e===Ss())return new Date(t).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:o,minute:s,second:a}=cv(t,e);return lv(n,r,i,o,s,a,0)-Math.floor(t/1e3)*1e3}const Gb=new Map;function cv(t,e){let n=Gb.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Gb.set(e,n));let r=n.formatToParts(new Date(t)),i={};for(let o of r)o.type!=="literal"&&(i[o.type]=o.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const Yb=864e5;function aE(t,e,n,r){return(n===r?[n]:[n,r]).filter(o=>lE(t,e,o))}function lE(t,e,n){let r=cv(n,e);return t.year===r.year&&t.month===r.month&&t.day===r.day&&t.hour===r.hour&&t.minute===r.minute&&t.second===r.second}function Gr(t,e,n="compatible"){let r=mo(t);if(e==="UTC")return As(r);if(e===Ss()&&n==="compatible"){r=Gn(r,new $s);let c=new Date,f=pg(r.era,r.year);return c.setFullYear(f,r.month-1,r.day),c.setHours(r.hour,r.minute,r.second,r.millisecond),c.getTime()}let i=As(r),o=L0(i-Yb,e),s=L0(i+Yb,e),a=aE(r,e,i-o,i-s);if(a.length===1)return a[0];if(a.length>1)switch(n){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function uv(t,e,n="compatible"){return new Date(Gr(t,e,n))}function Xr(t,e){let n=L0(t,e),r=new Date(t+n),i=r.getUTCFullYear(),o=r.getUTCMonth()+1,s=r.getUTCDate(),a=r.getUTCHours(),c=r.getUTCMinutes(),f=r.getUTCSeconds(),h=r.getUTCMilliseconds();return new Rs(i,o,s,e,n,a,c,f,h)}function fv(t){return new Na(t.calendar,t.era,t.year,t.month,t.day)}function mo(t,e){let n=0,r=0,i=0,o=0;if("timeZone"in t)({hour:n,minute:r,second:i,millisecond:o}=t);else if("hour"in t&&!e)return t;return e&&({hour:n,minute:r,second:i,millisecond:o}=e),new Au(t.calendar,t.era,t.year,t.month,t.day,n,r,i,o)}function Gn(t,e){if(t.calendar.identifier===e.identifier)return t;let n=e.fromJulianDay(t.calendar.toJulianDay(t)),r=t.copy();return r.calendar=e,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,bo(r),r}function cE(t,e,n){if(t instanceof Rs)return t.timeZone===e?t:hv(t,e);let r=Gr(t,e,n);return Xr(r,e)}function uE(t){let e=As(t)-t.offset;return new Date(e)}function hv(t,e){let n=As(t)-t.offset;return Gn(Xr(n,e),t.calendar)}const ma=36e5;function xf(t,e){let n=t.copy(),r="hour"in n?gE(n,e):0;B0(n,e.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,t),n.month+=e.months||0,N0(n),dv(n),n.day+=(e.weeks||0)*7,n.day+=e.days||0,n.day+=r,fE(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var o,s;let c=(o=(s=n.calendar).isInverseEra)===null||o===void 0?void 0:o.call(s,n);n.year=i,n.month=c?1:n.calendar.getMonthsInYear(n),n.day=c?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function B0(t,e){var n,r;!((n=(r=t.calendar).isInverseEra)===null||n===void 0)&&n.call(r,t)&&(e=-e),t.year+=e}function N0(t){for(;t.month<1;)B0(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,B0(t,1)}function fE(t){for(;t.day<1;)t.month--,N0(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,N0(t)}function dv(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function bo(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),dv(t)}function gv(t){let e={};for(let n in t)typeof t[n]=="number"&&(e[n]=-t[n]);return e}function pv(t,e){return xf(t,gv(e))}function bg(t,e){let n=t.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),bo(n),n}function Su(t,e){let n=t.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),dE(n),n}function hE(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Ac(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Ac(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Ac(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Ac(t.hour,24),e}function dE(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Ac(t,e){let n=t%e;return n<0&&(n+=e),n}function gE(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,hE(t)}function wg(t,e,n,r){let i=t.copy();switch(e){case"era":{let a=t.calendar.getEras(),c=a.indexOf(t.era);if(c<0)throw new Error("Invalid era: "+t.era);c=Qr(c,n,0,a.length-1,r?.round),i.era=a[c],bo(i);break}case"year":var o,s;!((o=(s=i.calendar).isInverseEra)===null||o===void 0)&&o.call(s,i)&&(n=-n),i.year=Qr(t.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Qr(t.month,n,1,t.calendar.getMonthsInYear(t),r?.round);break;case"day":i.day=Qr(t.day,n,1,t.calendar.getDaysInMonth(t),r?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),bo(i),i}function mv(t,e,n,r){let i=t.copy();switch(e){case"hour":{let o=t.hour,s=0,a=23;if(r?.hourCycle===12){let c=o>=12;s=c?12:0,a=c?23:11}i.hour=Qr(o,n,s,a,r?.round);break}case"minute":i.minute=Qr(t.minute,n,0,59,r?.round);break;case"second":i.second=Qr(t.second,n,0,59,r?.round);break;case"millisecond":i.millisecond=Qr(t.millisecond,n,0,999,r?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Qr(t,e,n,r,i=!1){if(i){t+=Math.sign(e),t<n&&(t=r);let o=Math.abs(e);e>0?t=Math.ceil(t/o)*o:t=Math.floor(t/o)*o,t>r&&(t=n)}else t+=e,t<n?t=r-(n-t-1):t>r&&(t=n+(t-r-1));return t}function bv(t,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=xf(mo(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=Gr(i,t.timeZone)}else n=As(t)-t.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let r=Xr(n,t.timeZone);return Gn(r,t.calendar)}function pE(t,e){return bv(t,gv(e))}function mE(t,e,n,r){switch(e){case"hour":{let i=0,o=23;if(r?.hourCycle===12){let x=t.hour>=12;i=x?12:0,o=x?23:11}let s=mo(t),a=Gn(Su(s,{hour:i}),new $s),c=[Gr(a,t.timeZone,"earlier"),Gr(a,t.timeZone,"later")].filter(x=>Xr(x,t.timeZone).day===a.day)[0],f=Gn(Su(s,{hour:o}),new $s),h=[Gr(f,t.timeZone,"earlier"),Gr(f,t.timeZone,"later")].filter(x=>Xr(x,t.timeZone).day===f.day).pop(),d=As(t)-t.offset,p=Math.floor(d/ma),b=d%ma;return d=Qr(p,n,Math.floor(c/ma),Math.floor(h/ma),r?.round)*ma+b,Gn(Xr(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return mv(t,e,n,r);case"era":case"year":case"month":case"day":{let i=wg(mo(t),e,n,r),o=Gr(i,t.timeZone);return Gn(Xr(o,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function bE(t,e,n){let r=mo(t),i=Su(bg(r,e),e);if(i.compare(r)===0)return t;let o=Gr(i,t.timeZone,n);return Gn(Xr(o,t.timeZone),t.calendar)}const wE=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function wv(t,e){let n=t.match(wE);if(!n)throw new Error("Invalid ISO 8601 date time string: "+t);let r=new Rs(Wr(n[1],1,9999),Wr(n[2],1,12),1,e,0,n[4]?Wr(n[4],0,23):0,n[5]?Wr(n[5],0,59):0,n[6]?Wr(n[6],0,59):0,n[7]?Wr(n[7],0,1/0)*1e3:0);r.day=Wr(n[3],0,r.calendar.getDaysInMonth(r));var i;return n[8]&&(r.offset=Wr(n[8],-23,23)*36e5+Wr((i=n[9])!==null&&i!==void 0?i:"0",0,59)*6e4),hv(r,e)}function xE(t){return wv(t,Ss())}function Wr(t,e,n){let r=Number(t);if(r<e||r>n)throw new RangeError(`Value out of range: ${e} <= ${r} <= ${n}`);return r}function vE(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function xv(t){let e=Gn(t,new $s);return`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function vv(t){return`${xv(t)}T${vE(t)}`}function yE(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let n=Math.floor(t/36e5),r=t%36e5/6e4;return`${e}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function CE(t){return`${vv(t)}${yE(t.offset)}[${t.timeZone}]`}function $E(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xg(t,e,n){$E(t,e),e.set(t,n)}function vg(t){let e=typeof t[0]=="object"?t.shift():new $s,n;if(typeof t[0]=="string")n=t.shift();else{let s=e.getEras();n=s[s.length-1]}let r=t.shift(),i=t.shift(),o=t.shift();return[e,n,r,i,o]}var SE=new WeakMap;class Na{copy(){return this.era?new Na(this.calendar,this.era,this.year,this.month,this.day):new Na(this.calendar,this.year,this.month,this.day)}add(e){return xf(this,e)}subtract(e){return pv(this,e)}set(e){return bg(this,e)}cycle(e,n,r){return wg(this,e,n,r)}toDate(e){return uv(this,e)}toString(){return xv(this)}compare(e){return sv(this,e)}constructor(...e){xg(this,SE,{writable:!0,value:void 0});let[n,r,i,o,s]=vg(e);this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,bo(this)}}var AE=new WeakMap;class Au{copy(){return this.era?new Au(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Au(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return xf(this,e)}subtract(e){return pv(this,e)}set(e){return bg(Su(this,e),e)}cycle(e,n,r){switch(e){case"era":case"year":case"month":case"day":return wg(this,e,n,r);default:return mv(this,e,n,r)}}toDate(e,n){return uv(this,e,n)}toString(){return vv(this)}compare(e){let n=sv(this,e);return n===0?nE(this,mo(e)):n}constructor(...e){xg(this,AE,{writable:!0,value:void 0});let[n,r,i,o,s]=vg(e);this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bo(this)}}var RE=new WeakMap;class Rs{copy(){return this.era?new Rs(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Rs(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bv(this,e)}subtract(e){return pE(this,e)}set(e,n){return bE(this,e,n)}cycle(e,n,r){return mE(this,e,n,r)}toDate(){return uE(this)}toString(){return CE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-cE(e,this.timeZone).toDate().getTime()}constructor(...e){xg(this,RE,{writable:!0,value:void 0});let[n,r,i,o,s]=vg(e),a=e.shift(),c=e.shift();this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,this.timeZone=a,this.offset=c,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,bo(this)}}let Bd=new Map;class kE{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(n)}`}formatRangeToParts(e,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),i=this.formatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return ME()&&(this.resolvedHourCycle||(this.resolvedHourCycle=OE(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,n={}){this.formatter=yv(e,n),this.options=n}}const TE={true:{ja:"h11"},false:{}};function yv(t,e={}){if(typeof e.hour12=="boolean"&&EE()){e={...e};let i=TE[String(e.hour12)][t.split("-")[0]],o=e.hour12?"h12":"h23";e.hourCycle=i??o,delete e.hour12}let n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Bd.has(n))return Bd.get(n);let r=new Intl.DateTimeFormat(t,e);return Bd.set(n,r),r}let Nd=null;function EE(){return Nd==null&&(Nd=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Nd}let jd=null;function ME(){return jd==null&&(jd=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),jd}function OE(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let n=yv(t,{...e,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},q.apply(null,arguments)}function re(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}function DE(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function vf(...t){return e=>t.forEach(n=>DE(n,e))}function ye(...t){return w.useCallback(vf(...t),t)}function yg(t,e){const n=w.createContext(e);function r(o){const{children:s,...a}=o,c=w.useMemo(()=>a,Object.values(a));return w.createElement(n.Provider,{value:c},s)}function i(o){const s=w.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,i]}function wt(t,e=[]){let n=[];function r(o,s){const a=w.createContext(s),c=n.length;n=[...n,s];function f(d){const{scope:p,children:b,...x}=d,v=p?.[t][c]||a,C=w.useMemo(()=>x,Object.values(x));return w.createElement(v.Provider,{value:C},b)}function h(d,p){const b=p?.[t][c]||a,x=w.useContext(b);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,h]}const i=()=>{const o=n.map(s=>w.createContext(s));return function(a){const c=a?.[t]||o;return w.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[r,IE(i,...e)]}function IE(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:f})=>{const d=c(o)[`__scope${f}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}const $r=w.forwardRef((t,e)=>{const{children:n,...r}=t,i=w.Children.toArray(n),o=i.find(_E);if(o){const s=o.props.children,a=i.map(c=>c===o?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:c);return w.createElement(j0,q({},r,{ref:e}),w.isValidElement(s)?w.cloneElement(s,void 0,a):null)}return w.createElement(j0,q({},r,{ref:e}),n)});$r.displayName="Slot";const j0=w.forwardRef((t,e)=>{const{children:n,...r}=t;return w.isValidElement(n)?w.cloneElement(n,{...LE(r,n.props),ref:e?vf(e,n.ref):n.ref}):w.Children.count(n)>1?w.Children.only(null):null});j0.displayName="SlotClone";const Cg=({children:t})=>w.createElement(w.Fragment,null,t);function _E(t){return w.isValidElement(t)&&t.type===Cg}function LE(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}const BE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],me=BE.reduce((t,e)=>{const n=w.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?$r:e;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(a,q({},s,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Cv(t,e){t&&ul.flushSync(()=>t.dispatchEvent(e))}function Dt(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function NE(t,e=globalThis?.document){const n=Dt(t);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const F0="dismissableLayer.update",jE="dismissableLayer.pointerDownOutside",FE="dismissableLayer.focusOutside";let Xb;const VE=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mo=w.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...f}=t,h=w.useContext(VE),[d,p]=w.useState(null),b=(n=d?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,x]=w.useState({}),v=ye(e,V=>p(V)),C=Array.from(h.layers),[$]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),A=C.indexOf($),T=d?C.indexOf(d):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,O=T>=A,I=HE(V=>{const F=V.target,H=[...h.branches].some(z=>z.contains(F));!O||H||(o?.(V),a?.(V),V.defaultPrevented||c?.())},b),_=PE(V=>{const F=V.target;[...h.branches].some(z=>z.contains(F))||(s?.(V),a?.(V),V.defaultPrevented||c?.())},b);return NE(V=>{T===h.layers.size-1&&(i?.(V),!V.defaultPrevented&&c&&(V.preventDefault(),c()))},b),w.useEffect(()=>{if(d)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Xb=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(d)),h.layers.add(d),Qb(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Xb)}},[d,b,r,h]),w.useEffect(()=>()=>{d&&(h.layers.delete(d),h.layersWithOutsidePointerEventsDisabled.delete(d),Qb())},[d,h]),w.useEffect(()=>{const V=()=>x({});return document.addEventListener(F0,V),()=>document.removeEventListener(F0,V)},[]),w.createElement(me.div,q({},f,{ref:v,style:{pointerEvents:M?O?"auto":"none":void 0,...t.style},onFocusCapture:re(t.onFocusCapture,_.onFocusCapture),onBlurCapture:re(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:re(t.onPointerDownCapture,I.onPointerDownCapture)}))});function HE(t,e=globalThis?.document){const n=Dt(t),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let f=function(){$v(jE,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=f,e.addEventListener("click",i.current,{once:!0})):f()}else e.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function PE(t,e=globalThis?.document){const n=Dt(t),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&$v(FE,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qb(){const t=new CustomEvent(F0);document.dispatchEvent(t)}function $v(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?Cv(i,o):i.dispatchEvent(o)}const WE=Mo,ut=globalThis?.document?w.useLayoutEffect:()=>{},zE=S.useId||(()=>{});let UE=0;function Lt(t){const[e,n]=S.useState(zE());return ut(()=>{n(r=>r??String(UE++))},[t]),e?`radix-${e}`:""}function Ps(t){return t.split("-")[1]}function $g(t){return t==="y"?"height":"width"}function Zr(t){return t.split("-")[0]}function Oo(t){return["top","bottom"].includes(Zr(t))?"x":"y"}function Zb(t,e,n){let{reference:r,floating:i}=t;const o=r.x+r.width/2-i.width/2,s=r.y+r.height/2-i.height/2,a=Oo(e),c=$g(a),f=r[c]/2-i[c]/2,h=a==="x";let d;switch(Zr(e)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-i.width,y:s};break;default:d={x:r.x,y:r.y}}switch(Ps(e)){case"start":d[a]-=f*(n&&h?-1:1);break;case"end":d[a]+=f*(n&&h?-1:1)}return d}const qE=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:h,y:d}=Zb(f,r,c),p=r,b={},x=0;for(let v=0;v<a.length;v++){const{name:C,fn:$}=a[v],{x:A,y:T,data:M,reset:O}=await $({x:h,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:b,rects:f,platform:s,elements:{reference:t,floating:e}});h=A??h,d=T??d,b={...b,[C]:{...b[C],...M}},O&&x<=50&&(x++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(f=O.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:h,y:d}=Zb(f,p,c)),v=-1)}return{x:h,y:d,placement:p,strategy:i,middlewareData:b}};function ri(t,e){return typeof t=="function"?t(e):t}function Sv(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function Ru(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function ja(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=t,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:b=0}=ri(e,t),x=Sv(b),v=a[p?d==="floating"?"reference":"floating":d],C=Ru(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:f,rootBoundary:h,strategy:c})),$=d==="floating"?{...s.floating,x:r,y:i}:s.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),T=await(o.isElement==null?void 0:o.isElement(A))&&await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1},M=Ru(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:$,offsetParent:A,strategy:c}):$);return{top:(C.top-M.top+x.top)/T.y,bottom:(M.bottom-C.bottom+x.bottom)/T.y,left:(C.left-M.left+x.left)/T.x,right:(M.right-C.right+x.right)/T.x}}const Fa=Math.min,io=Math.max;function V0(t,e,n){return io(t,Fa(e,n))}const Jb=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a}=e,{element:c,padding:f=0}=ri(t,e)||{};if(c==null)return{};const h=Sv(f),d={x:n,y:r},p=Oo(i),b=$g(p),x=await s.getDimensions(c),v=p==="y",C=v?"top":"left",$=v?"bottom":"right",A=v?"clientHeight":"clientWidth",T=o.reference[b]+o.reference[p]-d[p]-o.floating[b],M=d[p]-o.reference[p],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let I=O?O[A]:0;I&&await(s.isElement==null?void 0:s.isElement(O))||(I=a.floating[A]||o.floating[b]);const _=T/2-M/2,V=I/2-x[b]/2-1,F=Fa(h[C],V),H=Fa(h[$],V),z=F,W=I-x[b]-H,Y=I/2-x[b]/2+_,K=V0(z,Y,W),te=Ps(i)!=null&&Y!=K&&o.reference[b]/2-(Y<z?F:H)-x[b]/2<0?Y<z?z-Y:W-Y:0;return{[p]:d[p]-te,data:{[p]:K,centerOffset:Y-K+te}}}}),Av=["top","right","bottom","left"];Av.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);const KE={left:"right",right:"left",bottom:"top",top:"bottom"};function ku(t){return t.replace(/left|right|bottom|top/g,e=>KE[e])}function GE(t,e,n){n===void 0&&(n=!1);const r=Ps(t),i=Oo(t),o=$g(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=ku(s)),{main:s,cross:ku(s)}}const YE={start:"end",end:"start"};function Fd(t){return t.replace(/start|end/g,e=>YE[e])}const XE=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:a,elements:c}=e,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...v}=ri(t,e),C=Zr(r),$=Zr(s)===s,A=await(a.isRTL==null?void 0:a.isRTL(c.floating)),T=d||($||!x?[ku(s)]:function(z){const W=ku(z);return[Fd(z),W,Fd(W)]}(s));d||b==="none"||T.push(...function(z,W,Y,K){const te=Ps(z);let ie=function(ne,oe,X){const ce=["left","right"],fe=["right","left"],Me=["top","bottom"],we=["bottom","top"];switch(ne){case"top":case"bottom":return X?oe?fe:ce:oe?ce:fe;case"left":case"right":return oe?Me:we;default:return[]}}(Zr(z),Y==="start",K);return te&&(ie=ie.map(ne=>ne+"-"+te),W&&(ie=ie.concat(ie.map(Fd)))),ie}(s,x,b,A));const M=[s,...T],O=await ja(e,v),I=[];let _=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&I.push(O[C]),h){const{main:z,cross:W}=GE(r,o,A);I.push(O[z],O[W])}if(_=[..._,{placement:r,overflows:I}],!I.every(z=>z<=0)){var V,F;const z=(((V=i.flip)==null?void 0:V.index)||0)+1,W=M[z];if(W)return{data:{index:z,overflows:_},reset:{placement:W}};let Y=(F=_.filter(K=>K.overflows[0]<=0).sort((K,te)=>K.overflows[1]-te.overflows[1])[0])==null?void 0:F.placement;if(!Y)switch(p){case"bestFit":{var H;const K=(H=_.map(te=>[te.placement,te.overflows.filter(ie=>ie>0).reduce((ie,ne)=>ie+ne,0)]).sort((te,ie)=>te[1]-ie[1])[0])==null?void 0:H[0];K&&(Y=K);break}case"initialPlacement":Y=s}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function e5(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function t5(t){return Av.some(e=>t[e]>=0)}const QE=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=ri(t,e);switch(r){case"referenceHidden":{const o=e5(await ja(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:t5(o)}}}case"escaped":{const o=e5(await ja(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:t5(o)}}}default:return{}}}}},ZE=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:r}=e,i=await async function(o,s){const{placement:a,platform:c,elements:f}=o,h=await(c.isRTL==null?void 0:c.isRTL(f.floating)),d=Zr(a),p=Ps(a),b=Oo(a)==="x",x=["left","top"].includes(d)?-1:1,v=h&&b?-1:1,C=ri(s,o);let{mainAxis:$,crossAxis:A,alignmentAxis:T}=typeof C=="number"?{mainAxis:C,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...C};return p&&typeof T=="number"&&(A=p==="end"?-1*T:T),b?{x:A*v,y:$*x}:{x:$*x,y:A*v}}(e,t);return{x:n+i.x,y:r+i.y,data:i}}}};function Rv(t){return t==="x"?"y":"x"}const JE=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:C=>{let{x:$,y:A}=C;return{x:$,y:A}}},...c}=ri(t,e),f={x:n,y:r},h=await ja(e,c),d=Oo(Zr(i)),p=Rv(d);let b=f[d],x=f[p];if(o){const C=d==="y"?"bottom":"right";b=V0(b+h[d==="y"?"top":"left"],b,b-h[C])}if(s){const C=p==="y"?"bottom":"right";x=V0(x+h[p==="y"?"top":"left"],x,x-h[C])}const v=a.fn({...e,[d]:b,[p]:x});return{...v,data:{x:v.x-n,y:v.y-r}}}}},eM=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:c=!0,crossAxis:f=!0}=ri(t,e),h={x:n,y:r},d=Oo(i),p=Rv(d);let b=h[d],x=h[p];const v=ri(a,e),C=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const T=d==="y"?"height":"width",M=o.reference[d]-o.floating[T]+C.mainAxis,O=o.reference[d]+o.reference[T]-C.mainAxis;b<M?b=M:b>O&&(b=O)}if(f){var $,A;const T=d==="y"?"width":"height",M=["top","left"].includes(Zr(i)),O=o.reference[p]-o.floating[T]+(M&&(($=s.offset)==null?void 0:$[p])||0)+(M?0:C.crossAxis),I=o.reference[p]+o.reference[T]+(M?0:((A=s.offset)==null?void 0:A[p])||0)-(M?C.crossAxis:0);x<O?x=O:x>I&&(x=I)}return{[d]:b,[p]:x}}}},tM=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:i,elements:o}=e,{apply:s=()=>{},...a}=ri(t,e),c=await ja(e,a),f=Zr(n),h=Ps(n),d=Oo(n)==="x",{width:p,height:b}=r.floating;let x,v;f==="top"||f==="bottom"?(x=f,v=h===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=f,x=h==="end"?"top":"bottom");const C=b-c[x],$=p-c[v],A=!e.middlewareData.shift;let T=C,M=$;if(d){const I=p-c.left-c.right;M=h||A?Fa($,I):I}else{const I=b-c.top-c.bottom;T=h||A?Fa(C,I):I}if(A&&!h){const I=io(c.left,0),_=io(c.right,0),V=io(c.top,0),F=io(c.bottom,0);d?M=p-2*(I!==0||_!==0?I+_:io(c.left,c.right)):T=b-2*(V!==0||F!==0?V+F:io(c.top,c.bottom))}await s({...e,availableWidth:M,availableHeight:T});const O=await i.getDimensions(o.floating);return p!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}};function An(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Sr(t){return An(t).getComputedStyle(t)}function kv(t){return t instanceof An(t).Node}function Ei(t){return kv(t)?(t.nodeName||"").toLowerCase():"#document"}function Zn(t){return t instanceof An(t).HTMLElement}function n5(t){return typeof ShadowRoot<"u"&&(t instanceof An(t).ShadowRoot||t instanceof ShadowRoot)}function Va(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Sr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function nM(t){return["table","td","th"].includes(Ei(t))}function H0(t){const e=Sg(),n=Sr(t);return n.transform!=="none"||n.perspective!=="none"||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Sg(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yf(t){return["html","body","#document"].includes(Ei(t))}const P0=Math.min,fs=Math.max,Tu=Math.round,Rc=Math.floor,Mi=t=>({x:t,y:t});function Tv(t){const e=Sr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Zn(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Tu(n)!==o||Tu(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Jr(t){return t instanceof An(t).Element}function Ag(t){return Jr(t)?t:t.contextElement}function hs(t){const e=Ag(t);if(!Zn(e))return Mi(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=Tv(e);let s=(o?Tu(n.width):n.width)/r,a=(o?Tu(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const rM=Mi(0);function Ev(t){const e=An(t);return Sg()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:rM}function wo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Ag(t);let s=Mi(1);e&&(r?Jr(r)&&(s=hs(r)):s=hs(t));const a=function(p,b,x){return b===void 0&&(b=!1),!(!x||b&&x!==An(p))&&b}(o,n,r)?Ev(o):Mi(0);let c=(i.left+a.x)/s.x,f=(i.top+a.y)/s.y,h=i.width/s.x,d=i.height/s.y;if(o){const p=An(o),b=r&&Jr(r)?An(r):r;let x=p.frameElement;for(;x&&r&&b!==p;){const v=hs(x),C=x.getBoundingClientRect(),$=getComputedStyle(x),A=C.left+(x.clientLeft+parseFloat($.paddingLeft))*v.x,T=C.top+(x.clientTop+parseFloat($.paddingTop))*v.y;c*=v.x,f*=v.y,h*=v.x,d*=v.y,c+=A,f+=T,x=An(x).frameElement}}return Ru({width:h,height:d,x:c,y:f})}function Cf(t){return Jr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ei(t){return((kv(t)?t.ownerDocument:t.document)||window.document).documentElement}function Mv(t){return wo(ei(t)).left+Cf(t).scrollLeft}function ks(t){if(Ei(t)==="html")return t;const e=t.assignedSlot||t.parentNode||n5(t)&&t.host||ei(t);return n5(e)?e.host:e}function Ov(t){const e=ks(t);return yf(e)?t.ownerDocument?t.ownerDocument.body:t.body:Zn(e)&&Va(e)?e:Ov(e)}function Eu(t,e){var n;e===void 0&&(e=[]);const r=Ov(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=An(r);return i?e.concat(o,o.visualViewport||[],Va(r)?r:[]):e.concat(r,Eu(r))}function r5(t,e,n){let r;if(e==="viewport")r=function(i,o){const s=An(i),a=ei(i),c=s.visualViewport;let f=a.clientWidth,h=a.clientHeight,d=0,p=0;if(c){f=c.width,h=c.height;const b=Sg();(!b||b&&o==="fixed")&&(d=c.offsetLeft,p=c.offsetTop)}return{width:f,height:h,x:d,y:p}}(t,n);else if(e==="document")r=function(i){const o=ei(i),s=Cf(i),a=i.ownerDocument.body,c=fs(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),f=fs(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let h=-s.scrollLeft+Mv(i);const d=-s.scrollTop;return Sr(a).direction==="rtl"&&(h+=fs(o.clientWidth,a.clientWidth)-c),{width:c,height:f,x:h,y:d}}(ei(t));else if(Jr(e))r=function(i,o){const s=wo(i,!0,o==="fixed"),a=s.top+i.clientTop,c=s.left+i.clientLeft,f=Zn(i)?hs(i):Mi(1);return{width:i.clientWidth*f.x,height:i.clientHeight*f.y,x:c*f.x,y:a*f.y}}(e,n);else{const i=Ev(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Ru(r)}function Dv(t,e){const n=ks(t);return!(n===e||!Jr(n)||yf(n))&&(Sr(n).position==="fixed"||Dv(n,e))}function iM(t,e,n){const r=Zn(e),i=ei(e),o=n==="fixed",s=wo(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const c=Mi(0);if(r||!r&&!o)if((Ei(e)!=="body"||Va(i))&&(a=Cf(e)),Zn(e)){const f=wo(e,!0,o,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&(c.x=Mv(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function i5(t,e){return Zn(t)&&Sr(t).position!=="fixed"?e?e(t):t.offsetParent:null}function o5(t,e){const n=An(t);if(!Zn(t))return n;let r=i5(t,e);for(;r&&nM(r)&&Sr(r).position==="static";)r=i5(r,e);return r&&(Ei(r)==="html"||Ei(r)==="body"&&Sr(r).position==="static"&&!H0(r))?n:r||function(i){let o=ks(i);for(;Zn(o)&&!yf(o);){if(H0(o))return o;o=ks(o)}return null}(t)||n}const oM={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:r}=t;const i=Zn(n),o=ei(n);if(n===o)return e;let s={scrollLeft:0,scrollTop:0},a=Mi(1);const c=Mi(0);if((i||!i&&r!=="fixed")&&((Ei(n)!=="body"||Va(o))&&(s=Cf(n)),Zn(n))){const f=wo(n);a=hs(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+c.x,y:e.y*a.y-s.scrollTop*a.y+c.y}},getDocumentElement:ei,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?function(c,f){const h=f.get(c);if(h)return h;let d=Eu(c).filter(v=>Jr(v)&&Ei(v)!=="body"),p=null;const b=Sr(c).position==="fixed";let x=b?ks(c):c;for(;Jr(x)&&!yf(x);){const v=Sr(x),C=H0(x);C||v.position!=="fixed"||(p=null),(b?!C&&!p:!C&&v.position==="static"&&p&&["absolute","fixed"].includes(p.position)||Va(x)&&!C&&Dv(c,x))?d=d.filter($=>$!==x):p=v,x=ks(x)}return f.set(c,d),d}(e,this._c):[].concat(n),r],s=o[0],a=o.reduce((c,f)=>{const h=r5(e,f,i);return c.top=fs(h.top,c.top),c.right=P0(h.right,c.right),c.bottom=P0(h.bottom,c.bottom),c.left=fs(h.left,c.left),c},r5(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:o5,getElementRects:async function(t){let{reference:e,floating:n,strategy:r}=t;const i=this.getOffsetParent||o5,o=this.getDimensions;return{reference:iM(e,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Tv(t)},getScale:hs,isElement:Jr,isRTL:function(t){return getComputedStyle(t).direction==="rtl"}};function sM(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:c=!1}=r,f=Ag(t),h=i||o?[...f?Eu(f):[],...Eu(e)]:[];h.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const d=f&&a?function(C,$){let A,T=null;const M=ei(C);function O(){clearTimeout(A),T&&T.disconnect(),T=null}return function I(_,V){_===void 0&&(_=!1),V===void 0&&(V=1),O();const{left:F,top:H,width:z,height:W}=C.getBoundingClientRect();if(_||$(),!z||!W)return;const Y={rootMargin:-Rc(H)+"px "+-Rc(M.clientWidth-(F+z))+"px "+-Rc(M.clientHeight-(H+W))+"px "+-Rc(F)+"px",threshold:fs(0,P0(1,V))||1};let K=!0;function te(ie){const ne=ie[0].intersectionRatio;if(ne!==V){if(!K)return I();ne?I(!1,ne):A=setTimeout(()=>{I(!1,1e-7)},100)}K=!1}try{T=new IntersectionObserver(te,{...Y,root:M.ownerDocument})}catch{T=new IntersectionObserver(te,Y)}T.observe(C)}(!0),O}(f,n):null;let p,b=-1,x=null;s&&(x=new ResizeObserver(C=>{let[$]=C;$&&$.target===f&&x&&(x.unobserve(e),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{x&&x.observe(e)})),n()}),f&&!c&&x.observe(f),x.observe(e));let v=c?wo(t):null;return c&&function C(){const $=wo(t);!v||$.x===v.x&&$.y===v.y&&$.width===v.width&&$.height===v.height||n(),v=$,p=requestAnimationFrame(C)}(),n(),()=>{h.forEach(C=>{i&&C.removeEventListener("scroll",n),o&&C.removeEventListener("resize",n)}),d&&d(),x&&x.disconnect(),x=null,c&&cancelAnimationFrame(p)}}const aM=(t,e,n)=>{const r=new Map,i={platform:oM,...n},o={...i.platform,_c:r};return qE(t,e,{...i,platform:o})};var cu=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Mu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Mu(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Mu(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Iv(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function s5(t,e){const n=Iv(t);return Math.round(e*n)/n}function Vd(t){const e=S.useRef(t);return cu(()=>{e.current=t}),e}function lM(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:f}=t,[h,d]=S.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,b]=S.useState(r);Mu(p,r)||b(r);const[x,v]=S.useState(null),[C,$]=S.useState(null),A=S.useCallback(oe=>{oe!==I.current&&(I.current=oe,v(oe))},[]),T=S.useCallback(oe=>{oe!==_.current&&(_.current=oe,$(oe))},[]),M=o||x,O=s||C,I=S.useRef(null),_=S.useRef(null),V=S.useRef(h),F=c!=null,H=Vd(c),z=Vd(i),W=Vd(f),Y=S.useCallback(()=>{if(!I.current||!_.current)return;const oe={placement:e,strategy:n,middleware:p};z.current&&(oe.platform=z.current),aM(I.current,_.current,oe).then(X=>{const ce={...X,isPositioned:W.current!==!1};K.current&&!Mu(V.current,ce)&&(V.current=ce,Eo.flushSync(()=>{d(ce)}))})},[p,e,n,z,W]);cu(()=>{f===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,d(oe=>({...oe,isPositioned:!1})))},[f]);const K=S.useRef(!1);cu(()=>(K.current=!0,()=>{K.current=!1}),[]),cu(()=>{if(M&&(I.current=M),O&&(_.current=O),M&&O){if(H.current)return H.current(M,O,Y);Y()}},[M,O,Y,H,F]);const te=S.useMemo(()=>({reference:I,floating:_,setReference:A,setFloating:T}),[A,T]),ie=S.useMemo(()=>({reference:M,floating:O}),[M,O]),ne=S.useMemo(()=>{const oe={position:n,left:0,top:0};if(!ie.floating)return oe;const X=s5(ie.floating,h.x),ce=s5(ie.floating,h.y);return a?{...oe,transform:"translate("+X+"px, "+ce+"px)",...Iv(ie.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:ce}},[n,a,ie.floating,h.x,h.y]);return S.useMemo(()=>({...h,update:Y,refs:te,elements:ie,floatingStyles:ne}),[h,Y,te,ie,ne])}const cM=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Jb({element:r.current,padding:i}).fn(n):{}:r?Jb({element:r,padding:i}).fn(n):{}}}},uM=(t,e)=>({...ZE(t),options:[t,e]}),fM=(t,e)=>({...JE(t),options:[t,e]}),hM=(t,e)=>({...eM(t),options:[t,e]}),dM=(t,e)=>({...XE(t),options:[t,e]}),gM=(t,e)=>({...tM(t),options:[t,e]}),pM=(t,e)=>({...QE(t),options:[t,e]}),mM=(t,e)=>({...cM(t),options:[t,e]}),bM=w.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...o}=t;return w.createElement(me.svg,q({},o,{ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?n:w.createElement("polygon",{points:"0,0 30,0 15,10"}))}),wM=bM;function $f(t){const[e,n]=w.useState(void 0);return ut(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,f=Array.isArray(c)?c[0]:c;s=f.inlineSize,a=f.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}const _v="Popper",[Lv,ji]=wt(_v),[xM,Bv]=Lv(_v),vM=t=>{const{__scopePopper:e,children:n}=t,[r,i]=w.useState(null);return w.createElement(xM,{scope:e,anchor:r,onAnchorChange:i},n)},yM="PopperAnchor",CM=w.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,o=Bv(yM,n),s=w.useRef(null),a=ye(e,s);return w.useEffect(()=>{o.onAnchorChange(r?.current||s.current)}),r?null:w.createElement(me.div,q({},i,{ref:a}))}),Nv="PopperContent",[$M,SM]=Lv(Nv),AM=w.forwardRef((t,e)=>{var n,r,i,o,s,a,c,f;const{__scopePopper:h,side:d="bottom",sideOffset:p=0,align:b="center",alignOffset:x=0,arrowPadding:v=0,avoidCollisions:C=!0,collisionBoundary:$=[],collisionPadding:A=0,sticky:T="partial",hideWhenDetached:M=!1,updatePositionStrategy:O="optimized",onPlaced:I,..._}=t,V=Bv(Nv,h),[F,H]=w.useState(null),z=ye(e,Pe=>H(Pe)),[W,Y]=w.useState(null),K=$f(W),te=(n=K?.width)!==null&&n!==void 0?n:0,ie=(r=K?.height)!==null&&r!==void 0?r:0,ne=d+(b!=="center"?"-"+b:""),oe=typeof A=="number"?A:{top:0,right:0,bottom:0,left:0,...A},X=Array.isArray($)?$:[$],ce=X.length>0,fe={padding:oe,boundary:X.filter(EM),altBoundary:ce},{refs:Me,floatingStyles:we,placement:Ve,isPositioned:Ne,middlewareData:He}=lM({strategy:"fixed",placement:ne,whileElementsMounted:(...Pe)=>sM(...Pe,{animationFrame:O==="always"}),elements:{reference:V.anchor},middleware:[uM({mainAxis:p+ie,alignmentAxis:x}),C&&fM({mainAxis:!0,crossAxis:!1,limiter:T==="partial"?hM():void 0,...fe}),C&&dM({...fe}),gM({...fe,apply:({elements:Pe,rects:Yt,availableWidth:ht,availableHeight:Ui})=>{const{width:Js,height:sr}=Yt.reference,xt=Pe.floating.style;xt.setProperty("--radix-popper-available-width",`${ht}px`),xt.setProperty("--radix-popper-available-height",`${Ui}px`),xt.setProperty("--radix-popper-anchor-width",`${Js}px`),xt.setProperty("--radix-popper-anchor-height",`${sr}px`)}}),W&&mM({element:W,padding:v}),MM({arrowWidth:te,arrowHeight:ie}),M&&pM({strategy:"referenceHidden",...fe})]}),[pe,De]=jv(Ve),ke=Dt(I);ut(()=>{Ne&&ke?.()},[Ne,ke]);const Ae=(i=He.arrow)===null||i===void 0?void 0:i.x,_e=(o=He.arrow)===null||o===void 0?void 0:o.y,ze=((s=He.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Et,Qe]=w.useState();return ut(()=>{F&&Qe(window.getComputedStyle(F).zIndex)},[F]),w.createElement("div",{ref:Me.setFloating,"data-radix-popper-content-wrapper":"",style:{...we,transform:Ne?we.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Et,"--radix-popper-transform-origin":[(a=He.transformOrigin)===null||a===void 0?void 0:a.x,(c=He.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},w.createElement($M,{scope:h,placedSide:pe,onArrowChange:Y,arrowX:Ae,arrowY:_e,shouldHideArrow:ze},w.createElement(me.div,q({"data-side":pe,"data-align":De},_,{ref:z,style:{..._.style,animation:Ne?void 0:"none",opacity:(f=He.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))}),RM="PopperArrow",kM={top:"bottom",right:"left",bottom:"top",left:"right"},TM=w.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,o=SM(RM,r),s=kM[o.placedSide];return w.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},w.createElement(wM,q({},i,{ref:n,style:{...i.style,display:"block"}})))});function EM(t){return t!==null}const MM=t=>({name:"transformOrigin",options:t,fn(e){var n,r,i,o,s;const{placement:a,rects:c,middlewareData:f}=e,d=((n=f.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=d?0:t.arrowWidth,b=d?0:t.arrowHeight,[x,v]=jv(a),C={start:"0%",center:"50%",end:"100%"}[v],$=((r=(i=f.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+p/2,A=((o=(s=f.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+b/2;let T="",M="";return x==="bottom"?(T=d?C:`${$}px`,M=`${-b}px`):x==="top"?(T=d?C:`${$}px`,M=`${c.floating.height+b}px`):x==="right"?(T=`${-b}px`,M=d?C:`${A}px`):x==="left"&&(T=`${c.floating.width+b}px`,M=d?C:`${A}px`),{data:{x:T,y:M}}}});function jv(t){const[e,n="center"]=t.split("-");return[e,n]}const fl=vM,hl=CM,dl=AM,OM=TM,Ws=w.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=t;return r?Eo.default.createPortal(w.createElement(me.div,q({},i,{ref:e})),r):null});function DM(t,e){return w.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const Tt=t=>{const{present:e,children:n}=t,r=IM(e),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=ye(r.ref,i.ref);return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};Tt.displayName="Presence";function IM(t){const[e,n]=w.useState(),r=w.useRef({}),i=w.useRef(t),o=w.useRef("none"),s=t?"mounted":"unmounted",[a,c]=DM(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const f=kc(r.current);o.current=a==="mounted"?f:"none"},[a]),ut(()=>{const f=r.current,h=i.current;if(h!==t){const p=o.current,b=kc(f);t?c("MOUNT"):b==="none"||f?.display==="none"?c("UNMOUNT"):c(h&&p!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),ut(()=>{if(e){const f=d=>{const b=kc(r.current).includes(d.animationName);d.target===e&&b&&ul.flushSync(()=>c("ANIMATION_END"))},h=d=>{d.target===e&&(o.current=kc(r.current))};return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function kc(t){return t?.animationName||"none"}function _t({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=_M({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=Dt(n),c=w.useCallback(f=>{if(o){const d=typeof f=="function"?f(t):f;d!==t&&a(d)}else i(f)},[o,t,i,a]);return[s,c]}function _M({defaultProp:t,onChange:e}){const n=w.useState(t),[r]=n,i=w.useRef(r),o=Dt(e);return w.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Fv=w.forwardRef((t,e)=>w.createElement(me.span,q({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),LM=Fv,[Sf,Dte]=wt("Tooltip",[ji]),Rg=ji(),BM="TooltipProvider",NM=700,W0="tooltip.open",[jM,kg]=Sf(BM),FM=t=>{const{__scopeTooltip:e,delayDuration:n=NM,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=t,[s,a]=w.useState(!0),c=w.useRef(!1),f=w.useRef(0);return w.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),w.createElement(jM,{scope:e,isOpenDelayed:s,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(f.current),a(!1)},[]),onClose:w.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(h=>{c.current=h},[]),disableHoverableContent:i},o)},Tg="Tooltip",[VM,gl]=Sf(Tg),HM=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=t,c=kg(Tg,t.__scopeTooltip),f=Rg(e),[h,d]=w.useState(null),p=Lt(),b=w.useRef(0),x=s??c.disableHoverableContent,v=a??c.delayDuration,C=w.useRef(!1),[$=!1,A]=_t({prop:r,defaultProp:i,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(W0))):c.onClose(),o?.(_)}}),T=w.useMemo(()=>$?C.current?"delayed-open":"instant-open":"closed",[$]),M=w.useCallback(()=>{window.clearTimeout(b.current),C.current=!1,A(!0)},[A]),O=w.useCallback(()=>{window.clearTimeout(b.current),A(!1)},[A]),I=w.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{C.current=!0,A(!0)},v)},[v,A]);return w.useEffect(()=>()=>window.clearTimeout(b.current),[]),w.createElement(fl,f,w.createElement(VM,{scope:e,contentId:p,open:$,stateAttribute:T,trigger:h,onTriggerChange:d,onTriggerEnter:w.useCallback(()=>{c.isOpenDelayed?I():M()},[c.isOpenDelayed,I,M]),onTriggerLeave:w.useCallback(()=>{x?O():window.clearTimeout(b.current)},[O,x]),onOpen:M,onClose:O,disableHoverableContent:x},n))},a5="TooltipTrigger",PM=w.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=gl(a5,n),o=kg(a5,n),s=Rg(n),a=w.useRef(null),c=ye(e,a,i.onTriggerChange),f=w.useRef(!1),h=w.useRef(!1),d=w.useCallback(()=>f.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.createElement(hl,q({asChild:!0},s),w.createElement(me.button,q({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:re(t.onPointerMove,p=>{p.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:re(t.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:re(t.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:re(t.onFocus,()=>{f.current||i.onOpen()}),onBlur:re(t.onBlur,i.onClose),onClick:re(t.onClick,i.onClose)})))}),Vv="TooltipPortal",[WM,zM]=Sf(Vv,{forceMount:void 0}),UM=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:i}=t,o=gl(Vv,e);return w.createElement(WM,{scope:e,forceMount:n},w.createElement(Tt,{present:n||o.open},w.createElement(Ws,{asChild:!0,container:i},r)))},Ha="TooltipContent",qM=w.forwardRef((t,e)=>{const n=zM(Ha,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=t,s=gl(Ha,t.__scopeTooltip);return w.createElement(Tt,{present:r||s.open},s.disableHoverableContent?w.createElement(Hv,q({side:i},o,{ref:e})):w.createElement(KM,q({side:i},o,{ref:e})))}),KM=w.forwardRef((t,e)=>{const n=gl(Ha,t.__scopeTooltip),r=kg(Ha,t.__scopeTooltip),i=w.useRef(null),o=ye(e,i),[s,a]=w.useState(null),{trigger:c,onClose:f}=n,h=i.current,{onPointerInTransitChange:d}=r,p=w.useCallback(()=>{a(null),d(!1)},[d]),b=w.useCallback((x,v)=>{const C=x.currentTarget,$={x:x.clientX,y:x.clientY},A=YM($,C.getBoundingClientRect()),T=XM($,A),M=QM(v.getBoundingClientRect()),O=JM([...T,...M]);a(O),d(!0)},[d]);return w.useEffect(()=>()=>p(),[p]),w.useEffect(()=>{if(c&&h){const x=C=>b(C,h),v=C=>b(C,c);return c.addEventListener("pointerleave",x),h.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",x),h.removeEventListener("pointerleave",v)}}},[c,h,b,p]),w.useEffect(()=>{if(s){const x=v=>{const C=v.target,$={x:v.clientX,y:v.clientY},A=c?.contains(C)||h?.contains(C),T=!ZM($,s);A?p():T&&(p(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,h,s,f,p]),w.createElement(Hv,q({},t,{ref:o}))}),[GM,Ite]=Sf(Tg,{isInside:!1}),Hv=w.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=t,c=gl(Ha,n),f=Rg(n),{onClose:h}=c;return w.useEffect(()=>(document.addEventListener(W0,h),()=>document.removeEventListener(W0,h)),[h]),w.useEffect(()=>{if(c.trigger){const d=p=>{const b=p.target;b!=null&&b.contains(c.trigger)&&h()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,h]),w.createElement(Mo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:h},w.createElement(dl,q({"data-state":c.stateAttribute},f,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),w.createElement(Cg,null,r),w.createElement(GM,{scope:n,isInside:!0},w.createElement(LM,{id:c.contentId,role:"tooltip"},i||r))))});function YM(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),o=Math.abs(e.left-t.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function XM(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function QM(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function ZM(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o].x,c=e[o].y,f=e[s].x,h=e[s].y;c>r!=h>r&&n<(f-a)*(r-c)/(h-c)+a&&(i=!i)}return i}function JM(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),eO(e)}function eO(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const o=e[e.length-1],s=e[e.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}const tO=FM,Pv=HM,Wv=PM,zv=UM,Uv=qM;let Hd=0;function pl(){w.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:l5()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:l5()),Hd++,()=>{Hd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Hd--}},[])}function l5(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const Pd="focusScope.autoFocusOnMount",Wd="focusScope.autoFocusOnUnmount",c5={bubbles:!1,cancelable:!0},zs=w.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=t,[a,c]=w.useState(null),f=Dt(i),h=Dt(o),d=w.useRef(null),p=ye(e,v=>c(v)),b=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let v=function(T){if(b.paused||!a)return;const M=T.target;a.contains(M)?d.current=M:vi(d.current,{select:!0})},C=function(T){if(b.paused||!a)return;const M=T.relatedTarget;M!==null&&(a.contains(M)||vi(d.current,{select:!0}))},$=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&vi(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",C);const A=new MutationObserver($);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",C),A.disconnect()}}},[r,a,b.paused]),w.useEffect(()=>{if(a){f5.add(b);const v=document.activeElement;if(!a.contains(v)){const $=new CustomEvent(Pd,c5);a.addEventListener(Pd,f),a.dispatchEvent($),$.defaultPrevented||(nO(aO(qv(a)),{select:!0}),document.activeElement===v&&vi(a))}return()=>{a.removeEventListener(Pd,f),setTimeout(()=>{const $=new CustomEvent(Wd,c5);a.addEventListener(Wd,h),a.dispatchEvent($),$.defaultPrevented||vi(v??document.body,{select:!0}),a.removeEventListener(Wd,h),f5.remove(b)},0)}}},[a,f,h,b]);const x=w.useCallback(v=>{if(!n&&!r||b.paused)return;const C=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,$=document.activeElement;if(C&&$){const A=v.currentTarget,[T,M]=rO(A);T&&M?!v.shiftKey&&$===M?(v.preventDefault(),n&&vi(T,{select:!0})):v.shiftKey&&$===T&&(v.preventDefault(),n&&vi(M,{select:!0})):$===A&&v.preventDefault()}},[n,r,b.paused]);return w.createElement(me.div,q({tabIndex:-1},s,{ref:p,onKeyDown:x}))});function nO(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(vi(r,{select:e}),document.activeElement!==n)return}function rO(t){const e=qv(t),n=u5(e,t),r=u5(e.reverse(),t);return[n,r]}function qv(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function u5(t,e){for(const n of t)if(!iO(n,{upTo:e}))return n}function iO(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function oO(t){return t instanceof HTMLInputElement&&"select"in t}function vi(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&oO(t)&&e&&t.select()}}const f5=sO();function sO(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=h5(t,e),t.unshift(e)},remove(e){var n;t=h5(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function h5(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function aO(t){return t.filter(e=>e.tagName!=="A")}var lO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Zo=new WeakMap,Tc=new WeakMap,Ec={},zd=0,Kv=function(t){return t&&(t.host||Kv(t.parentNode))},cO=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Kv(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},uO=function(t,e,n,r){var i=cO(e,Array.isArray(t)?t:[t]);Ec[n]||(Ec[n]=new WeakMap);var o=Ec[n],s=[],a=new Set,c=new Set(i),f=function(d){!d||a.has(d)||(a.add(d),f(d.parentNode))};i.forEach(f);var h=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))h(p);else try{var b=p.getAttribute(r),x=b!==null&&b!=="false",v=(Zo.get(p)||0)+1,C=(o.get(p)||0)+1;Zo.set(p,v),o.set(p,C),s.push(p),v===1&&x&&Tc.set(p,!0),C===1&&p.setAttribute(n,"true"),x||p.setAttribute(r,"true")}catch($){console.error("aria-hidden: cannot operate on ",p,$)}})};return h(e),a.clear(),zd++,function(){s.forEach(function(d){var p=Zo.get(d)-1,b=o.get(d)-1;Zo.set(d,p),o.set(d,b),p||(Tc.has(d)||d.removeAttribute(r),Tc.delete(d)),b||d.removeAttribute(n)}),zd--,zd||(Zo=new WeakMap,Zo=new WeakMap,Tc=new WeakMap,Ec={})}},ml=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=lO(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),uO(r,i,n,"aria-hidden")):function(){return null}};exports.__assign=function(){return exports.__assign=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},exports.__assign.apply(this,arguments)};function bl(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Eg(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var ds="right-scroll-bar-position",gs="width-before-scroll-bar",fO="with-scroll-bars-hidden",hO="--removed-body-scroll-bar-size";function Ud(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function dO(t,e){var n=w.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var gO=typeof window<"u"?S.useLayoutEffect:S.useEffect,d5=new WeakMap;function Mg(t,e){var n=dO(null,function(r){return t.forEach(function(i){return Ud(i,r)})});return gO(function(){var r=d5.get(n);if(r){var i=new Set(r),o=new Set(t),s=n.current;i.forEach(function(a){o.has(a)||Ud(a,null)}),o.forEach(function(a){i.has(a)||Ud(a,s)})}d5.set(n,t)},[t]),n}function pO(t){return t}function mO(t,e){e===void 0&&(e=pO);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var s=e(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var h=s;s=[],h.forEach(o)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(h){s.push(h),f()},filter:function(h){return s=s.filter(h),n}}}};return i}function Og(t){t===void 0&&(t={});var e=mO(null);return e.options=exports.__assign({async:!0,ssr:!1},t),e}var Gv=function(t){var e=t.sideCar,n=bl(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,exports.__assign({},n))};Gv.isSideCarExport=!0;function Dg(t,e){return t.useMedium(e),Gv}var Yv=Og(),qd=function(){},Af=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:qd,onWheelCapture:qd,onTouchMoveCapture:qd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,f=t.removeScrollBar,h=t.enabled,d=t.shards,p=t.sideCar,b=t.noIsolation,x=t.inert,v=t.allowPinchZoom,C=t.as,$=C===void 0?"div":C,A=t.gapMode,T=bl(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=p,O=Mg([n,e]),I=exports.__assign(exports.__assign({},T),i);return S.createElement(S.Fragment,null,h&&S.createElement(M,{sideCar:Yv,removeScrollBar:f,shards:d,noIsolation:b,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:A}),s?S.cloneElement(S.Children.only(a),exports.__assign(exports.__assign({},I),{ref:O})):S.createElement($,exports.__assign({},I,{className:c,ref:O}),a))});Af.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Af.classNames={fullWidth:gs,zeroRight:ds};var bO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wO(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=bO();return e&&t.setAttribute("nonce",e),t}function xO(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function vO(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var yO=function(){var t=0,e=null;return{add:function(n){t==0&&(e=wO())&&(xO(e,n),vO(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},CO=function(){var t=yO();return function(e,n){S.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Rf=function(){var t=CO(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},$O={left:0,top:0,right:0,gap:0},Kd=function(t){return parseInt(t||"",10)||0},SO=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Kd(n),Kd(r),Kd(i)]},AO=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return $O;var e=SO(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},RO=Rf(),ps="data-scroll-locked",kO=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(fO,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ps,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(i,`px;
|
|
11
|
+
padding-top: `).concat(o,`px;
|
|
12
|
+
padding-right: `).concat(s,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(ds,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(gs,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(ds," .").concat(ds,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(gs," .").concat(gs,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ps,`] {
|
|
36
|
+
`).concat(hO,": ").concat(a,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},g5=function(){var t=parseInt(document.body.getAttribute(ps)||"0",10);return isFinite(t)?t:0},TO=function(){S.useEffect(function(){return document.body.setAttribute(ps,(g5()+1).toString()),function(){var t=g5()-1;t<=0?document.body.removeAttribute(ps):document.body.setAttribute(ps,t.toString())}},[])},Ig=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;TO();var o=S.useMemo(function(){return AO(i)},[i]);return S.createElement(RO,{styles:kO(o,!e,i,n?"":"!important")})},z0=!1;if(typeof window<"u")try{var Mc=Object.defineProperty({},"passive",{get:function(){return z0=!0,!0}});window.addEventListener("test",Mc,Mc),window.removeEventListener("test",Mc,Mc)}catch{z0=!1}var Jo=z0?{passive:!1}:!1,EO=function(t){return t.tagName==="TEXTAREA"},Xv=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!EO(t)&&n[e]==="visible")},MO=function(t){return Xv(t,"overflowY")},OO=function(t){return Xv(t,"overflowX")},p5=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Qv(t,r);if(i){var o=Zv(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},DO=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},IO=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Qv=function(t,e){return t==="v"?MO(e):OO(e)},Zv=function(t,e){return t==="v"?DO(e):IO(e)},_O=function(t,e){return t==="h"&&e==="rtl"?-1:1},LO=function(t,e,n,r,i){var o=_O(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),f=!1,h=s>0,d=0,p=0;do{var b=Zv(t,a),x=b[0],v=b[1],C=b[2],$=v-C-o*x;(x||$)&&Qv(t,a)&&(d+=$,p+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(f=!0),f},Oc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},m5=function(t){return[t.deltaX,t.deltaY]},b5=function(t){return t&&"current"in t?t.current:t},BO=function(t,e){return t[0]===e[0]&&t[1]===e[1]},NO=function(t){return`
|
|
39
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
41
|
+
`)},jO=0,es=[];function FO(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(jO++)[0],o=S.useState(Rf)[0],s=S.useRef(t);S.useEffect(function(){s.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Eg([t.lockRef.current],(t.shards||[]).map(b5),!0).filter(Boolean);return v.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(v,C){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var $=Oc(v),A=n.current,T="deltaX"in v?v.deltaX:A[0]-$[0],M="deltaY"in v?v.deltaY:A[1]-$[1],O,I=v.target,_=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in v&&_==="h"&&I.type==="range")return!1;var V=p5(_,I);if(!V)return!0;if(V?O=_:(O=_==="v"?"h":"v",V=p5(_,I)),!V)return!1;if(!r.current&&"changedTouches"in v&&(T||M)&&(r.current=O),!O)return!0;var F=r.current||O;return LO(F,C,v,F==="h"?T:M)},[]),c=S.useCallback(function(v){var C=v;if(!(!es.length||es[es.length-1]!==o)){var $="deltaY"in C?m5(C):Oc(C),A=e.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&BO(O.delta,$)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var T=(s.current.shards||[]).map(b5).filter(Boolean).filter(function(O){return O.contains(C.target)}),M=T.length>0?a(C,T[0]):!s.current.noIsolation;M&&C.cancelable&&C.preventDefault()}}},[]),f=S.useCallback(function(v,C,$,A){var T={name:v,delta:C,target:$,should:A,shadowParent:VO($)};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(M){return M!==T})},1)},[]),h=S.useCallback(function(v){n.current=Oc(v),r.current=void 0},[]),d=S.useCallback(function(v){f(v.type,m5(v),v.target,a(v,t.lockRef.current))},[]),p=S.useCallback(function(v){f(v.type,Oc(v),v.target,a(v,t.lockRef.current))},[]);S.useEffect(function(){return es.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Jo),document.addEventListener("touchmove",c,Jo),document.addEventListener("touchstart",h,Jo),function(){es=es.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,Jo),document.removeEventListener("touchmove",c,Jo),document.removeEventListener("touchstart",h,Jo)}},[]);var b=t.removeScrollBar,x=t.inert;return S.createElement(S.Fragment,null,x?S.createElement(o,{styles:NO(i)}):null,b?S.createElement(Ig,{gapMode:t.gapMode}):null)}function VO(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const HO=Dg(Yv,FO);var _g=S.forwardRef(function(t,e){return S.createElement(Af,exports.__assign({},t,{ref:e,sideCar:HO}))});_g.classNames=Af.classNames;function U0(t,[e,n]){return Math.min(n,Math.max(e,t))}function kf(t){const e=t+"CollectionProvider",[n,r]=wt(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=b=>{const{scope:x,children:v}=b,C=S.default.useRef(null),$=S.default.useRef(new Map).current;return S.default.createElement(i,{scope:x,itemMap:$,collectionRef:C},v)},a=t+"CollectionSlot",c=S.default.forwardRef((b,x)=>{const{scope:v,children:C}=b,$=o(a,v),A=ye(x,$.collectionRef);return S.default.createElement($r,{ref:A},C)}),f=t+"CollectionItemSlot",h="data-radix-collection-item",d=S.default.forwardRef((b,x)=>{const{scope:v,children:C,...$}=b,A=S.default.useRef(null),T=ye(x,A),M=o(f,v);return S.default.useEffect(()=>(M.itemMap.set(A,{ref:A,...$}),()=>void M.itemMap.delete(A))),S.default.createElement($r,{[h]:"",ref:T},C)});function p(b){const x=o(t+"CollectionConsumer",b);return S.default.useCallback(()=>{const C=x.collectionRef.current;if(!C)return[];const $=Array.from(C.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((M,O)=>$.indexOf(M.ref.current)-$.indexOf(O.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:d},p,r]}const PO=w.createContext(void 0);function Do(t){const e=w.useContext(PO);return t||e||"ltr"}function Tf(t){const e=w.useRef({value:t,previous:t});return w.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function WO(t){const e=`${t}CollectionProvider`,[n,r]=wt(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map,listeners:new Set}),s=b=>{const{scope:x,children:v}=b,C=S.useRef(null),$=S.useRef(new Map).current,A=S.useRef(new Set).current;return m.jsx(i,{scope:x,itemMap:$,collectionRef:C,listeners:A,children:v})};s.displayName=e;const a=`${t}CollectionSlot`,c=S.forwardRef((b,x)=>{const{scope:v,children:C}=b,$=o(a,v),A=ye(x,$.collectionRef);return m.jsx($r,{ref:A,children:C})});c.displayName=a;const f=`${t}CollectionItemSlot`,h="data-radix-collection-item",d=S.forwardRef((b,x)=>{const{scope:v,children:C,...$}=b,A=S.useRef(null),T=ye(x,A),M=o(f,v);return S.useEffect(()=>{const O=Array.from(M.itemMap.values());return M.itemMap.set(A,{ref:A,...$}),M.listeners.forEach(I=>I(Array.from(M.itemMap.values()),O)),()=>{const I=Array.from(M.itemMap.values());M.itemMap.delete(A),M.listeners.forEach(_=>_(Array.from(M.itemMap.values()),I))}}),m.jsx($r,{[h]:"",ref:T,children:C})});d.displayName=f;function p(b){const x=o(`${t}CollectionConsumer`,b),v=S.useCallback(()=>{const $=x.collectionRef.current;if(!$)return[];const A=Array.from($.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((O,I)=>A.indexOf(O.ref.current)-A.indexOf(I.ref.current))},[x.collectionRef,x.itemMap]),C=S.useCallback($=>(x.listeners.add($),()=>x.listeners.delete($)),[x.listeners]);return{getItems:v,subscribe:C}}return[{Provider:s,Slot:c,ItemSlot:d},p,r]}const Gd=new Map;function zO(t,e){const n=t+Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join();if(Gd.has(n))return Gd.get(n);const r=new Intl.Collator(t,e);return Gd.set(n,r),r}function Lg(t,e){const n=zO(t,{usage:"search",...e});return{startsWith(r,i){return i.length===0?!0:(r=r.normalize("NFC"),i=i.normalize("NFC"),n.compare(r.slice(0,i.length),i)===0)},endsWith(r,i){return i.length===0?!0:(r=r.normalize("NFC"),i=i.normalize("NFC"),n.compare(r.slice(-i.length),i)===0)},contains(r,i){if(i.length===0)return!0;r=r.normalize("NFC"),i=i.normalize("NFC");let o=0;const s=i.length;for(;o+s<=r.length;o++){const a=r.slice(o,o+s);if(n.compare(i,a)===0)return!0}return!1}}}const Jv=t=>{const e=S.useRef();return S.useEffect(()=>{e.current=t}),e.current},UO=[" ","Enter","ArrowUp","ArrowDown"],qO=["Enter"],KO=t=>!!(t.length===1&&t.match(/\S| /)),e3="Combobox",[Ts,wl]=WO(e3),[GO,kr]=yg(e3),YO=({children:t})=>m.jsx(fl,{children:m.jsx(Ts.Provider,{scope:void 0,children:t})}),XO=t=>typeof t=="string"?t==="none"?{type:t,filter:void 0}:{type:t,filter:"startsWith"}:t,QO=t=>{const{allowCustomValue:e=!1,autocomplete:n="none",children:r,open:i,defaultOpen:o,onOpenChange:s,value:a,defaultValue:c,onValueChange:f,disabled:h,required:d=!1,locale:p="en-EN",onTextValueChange:b,textValue:x,defaultTextValue:v,filterValue:C,defaultFilterValue:$,onFilterValueChange:A,isPrintableCharacter:T=KO}=t,[M,O]=S.useState(null),[I,_]=S.useState(null),[V,F]=S.useState(null),[H,z]=S.useState(null),[W=!1,Y]=_t({prop:i,defaultProp:o,onChange:s}),[K,te]=_t({prop:a,defaultProp:c,onChange:f}),[ie,ne]=_t({prop:x,defaultProp:e&&!v?a:v,onChange:b}),[oe,X]=_t({prop:C,defaultProp:$,onChange:A}),ce=Lt(),fe=S.useCallback((we,Ve)=>{const Ne=Ve.map(Ae=>Ae.ref.current),[He,...pe]=Ne,[De]=pe.slice(-1),ke=H??Ve.find(Ae=>Ae.value===K)?.ref.current;for(const Ae of we){if(Ae===ke)return;if(Ae?.scrollIntoView({block:"nearest"}),Ae===He&&I&&(I.scrollTop=0),Ae===De&&I&&(I.scrollTop=I.scrollHeight),z(Ae),n==="both"){const _e=Ve.find(ze=>ze.ref.current===Ae);_e&&ne(_e.textValue)}if(Ae!==ke)return}},[n,ne,I,H,K]),Me=XO(n);return S.useEffect(()=>{n!=="both"&&z(null)},[ie,n]),S.useEffect(()=>{if(V&&M)return ml([V,M])},[V,M]),m.jsx(YO,{children:m.jsx(GO,{allowCustomValue:e,autocomplete:Me,required:d,trigger:M,onTriggerChange:O,contentId:ce,value:K,onValueChange:te,open:W,onOpenChange:Y,disabled:h,locale:p,focusFirst:fe,textValue:ie,onTextValueChange:ne,onViewportChange:_,onContentChange:F,visuallyFocussedItem:H,filterValue:oe,onFilterValueChange:X,onVisuallyFocussedItemChange:z,isPrintableCharacter:T,children:r})})},t3="ComboboxTrigger",n3=S.forwardRef((t,e)=>{const{...n}=t,r=kr(t3),i=()=>{r.disabled||r.onOpenChange(!0)};return m.jsx(hl,{asChild:!0,children:m.jsx(zs,{asChild:!0,trapped:r.open,onMountAutoFocus:o=>{o.preventDefault()},onUnmountAutoFocus:o=>{r.trigger?.focus({preventScroll:!0}),document.getSelection()?.empty(),o.preventDefault()},children:m.jsx("div",{ref:e,"data-disabled":r.disabled?"":void 0,...n,onClick:re(n.onClick,o=>{if(r.disabled){o.preventDefault();return}r.trigger?.focus()}),onPointerDown:re(n.onPointerDown,o=>{if(r.disabled){o.preventDefault();return}const s=o.target;s.hasPointerCapture(o.pointerId)&&s.releasePointerCapture(o.pointerId),(s.closest("button")??s.closest("div"))===o.currentTarget&&o.button===0&&o.ctrlKey===!1&&(i(),r.trigger?.focus())})})})})});n3.displayName=t3;const r3="ComboboxInput",i3=S.forwardRef((t,e)=>{const n=kr(r3),r=S.useRef(null),{getItems:i}=wl(void 0),{startsWith:o}=Lg(n.locale,{sensitivity:"base"}),s=n.disabled,a=ye(r,e,n.onTriggerChange),c=()=>{s||n.onOpenChange(!0)},f=Jv(n.filterValue);return ut(()=>{const h=setTimeout(()=>{if(n.textValue===""||n.textValue===void 0||n.filterValue===""||n.filterValue===void 0)return;const d=i().find(b=>b.type==="option"&&o(b.textValue,n.textValue)),p=hD(f??"",n.filterValue);d&&!n.visuallyFocussedItem&&p===n.filterValue.length&&r.current?.setSelectionRange(n.filterValue.length,n.textValue.length)});return()=>clearTimeout(h)},[n.textValue,n.filterValue,o,n.visuallyFocussedItem,i,f]),m.jsx("input",{type:"text",role:"combobox","aria-controls":n.contentId,"aria-expanded":n.open,"aria-required":n.required,"aria-autocomplete":n.autocomplete.type,"data-state":n.open?"open":"closed","aria-disabled":s,"aria-activedescendant":n.visuallyFocussedItem?.id,disabled:s,"data-disabled":s?"":void 0,"data-placeholder":n.textValue===void 0?"":void 0,value:n.textValue??"",...t,ref:a,onKeyDown:re(t.onKeyDown,h=>{if(["ArrowUp","ArrowDown","Home","End"].includes(h.key))n.open||c(),setTimeout(()=>{let p=i().filter(b=>!b.disabled&&b.isVisible).map(b=>b.ref.current);if(["ArrowUp","End"].includes(h.key)&&(p=p.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const b=n.visuallyFocussedItem??i().find(x=>x.value===n.value)?.ref.current;if(b){let x=p.indexOf(b);x===p.length-1&&(x=-1),p=p.slice(x+1)}}if(["ArrowDown"].includes(h.key)&&n.autocomplete.type==="both"&&p.length>1){const[b,...x]=p,v=i().find(C=>C.ref.current===b).textValue;n.textValue===v&&(p=x)}n.focusFirst(p,i())}),h.preventDefault();else if(["Tab"].includes(h.key)&&n.open)h.preventDefault();else if(["Escape"].includes(h.key))n.open?n.onOpenChange(!1):(n.onValueChange(void 0),n.onTextValueChange("")),h.preventDefault();else if(qO.includes(h.key)){if(n.visuallyFocussedItem){const d=i().find(p=>p.ref.current===n.visuallyFocussedItem);d&&(n.onValueChange(d.value),n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue),d.ref.current?.click())}else{const d=i().find(p=>p.type==="option"&&!p.disabled&&p.textValue===n.textValue);d&&(n.onValueChange(d.value),n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue),d.ref.current?.click())}n.onOpenChange(!1),h.preventDefault()}else n.onVisuallyFocussedItemChange(null)}),onChange:re(t.onChange,h=>{n.onTextValueChange(h.currentTarget.value),n.autocomplete.type==="both"&&n.onFilterValueChange(h.currentTarget.value)}),onKeyUp:re(t.onKeyUp,h=>{if(!n.open&&(n.isPrintableCharacter(h.key)||["Backspace"].includes(h.key))&&c(),setTimeout(()=>{if(n.autocomplete.type==="both"&&n.isPrintableCharacter(h.key)&&n.filterValue!==void 0){const d=n.filterValue,p=i().find(b=>o(b.textValue,d));p&&n.onTextValueChange(p.textValue)}}),n.autocomplete.type==="none"&&n.isPrintableCharacter(h.key)){const d=n.textValue??"",p=i().find(b=>o(b.textValue,d));p&&(n.onVisuallyFocussedItemChange(p.ref.current),p.ref.current?.scrollIntoView())}}),onBlur:re(t.onBlur,()=>{if(n.open)return;n.onVisuallyFocussedItemChange(null);const[h]=i().filter(p=>p.textValue===n.textValue&&p.type==="option");if(h){n.onValueChange(h.value),n.autocomplete.type==="both"&&n.onFilterValueChange(h.textValue);return}if(n.allowCustomValue){n.onValueChange(n.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(n.textValue);return}const[d]=i().filter(p=>p.value===n.value&&p.type==="option");d&&n.textValue!==""?(n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue)):(n.onValueChange(void 0),n.onTextValueChange(""))})})});i3.displayName="ComboboxTextInput";const o3=S.forwardRef((t,e)=>{const{children:n,...r}=t,i=kr(r3),o=i.disabled,s=()=>{o||(i.onOpenChange(!0),i.trigger?.focus())};return m.jsx(me.button,{"aria-hidden":!0,type:"button","aria-disabled":o,"aria-controls":i.contentId,"aria-expanded":i.open,disabled:o,"data-disabled":o?"":void 0,...r,tabIndex:-1,ref:e,onClick:re(r.onClick,()=>{i.trigger?.focus()}),onPointerDown:re(r.onPointerDown,a=>{a.button===0&&a.ctrlKey===!1&&(s(),a.preventDefault())}),onKeyDown:re(r.onKeyDown,a=>{UO.includes(a.key)&&(s(),a.preventDefault())}),children:n||"▼"})});o3.displayName="ComboboxIcon";const ZO="ComboboxPortal",s3=t=>m.jsx(Ws,{asChild:!0,...t});s3.displayName=ZO;const Bg="ComboboxContent",a3=S.forwardRef((t,e)=>{const n=kr(Bg),{getItems:r}=wl(void 0),[i,o]=S.useState();if(ut(()=>{o(new DocumentFragment)},[]),ut(()=>{n.open&&n.autocomplete.type==="none"&&setTimeout(()=>{r().find(a=>a.value===n.value)?.ref.current?.scrollIntoView({block:"nearest"})})},[r,n.autocomplete,n.value,n.open]),!n.open){const s=i;return s?Eo.createPortal(m.jsx(Ts.Slot,{scope:void 0,children:m.jsx("div",{children:t.children})}),s):null}return m.jsx(l3,{...t,ref:e})});a3.displayName=Bg;const JO=10,l3=S.forwardRef((t,e)=>{const{onEscapeKeyDown:n,onPointerDownOutside:r,...i}=t,o=kr(Bg),s=ye(e,c=>o.onContentChange(c)),{onOpenChange:a}=o;return pl(),S.useEffect(()=>{const c=()=>{a(!1)};return window.addEventListener("blur",c),window.addEventListener("resize",c),()=>{window.removeEventListener("blur",c),window.removeEventListener("resize",c)}},[a]),m.jsx(_g,{allowPinchZoom:!0,children:m.jsx(Mo,{asChild:!0,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:c=>{c.preventDefault()},onDismiss:()=>{o.onOpenChange(!1),o.trigger?.focus({preventScroll:!0})},children:m.jsx(c3,{role:"listbox",id:o.contentId,"data-state":o.open?"open":"closed",onContextMenu:c=>c.preventDefault(),...i,ref:s,style:{display:"flex",flexDirection:"column",outline:"none",...i.style}})})})});l3.displayName="ComboboxContentImpl";const c3=S.forwardRef((t,e)=>{const{align:n="start",collisionPadding:r=JO,...i}=t;return m.jsx(dl,{...i,ref:e,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-combobox-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-combobox-content-available-width":"var(--radix-popper-available-width)","--radix-combobox-content-available-height":"var(--radix-popper-available-height)","--radix-combobox-trigger-width":"var(--radix-popper-anchor-width)","--radix-combobox-trigger-height":"var(--radix-popper-anchor-height)"}})});c3.displayName="ComboboxPopperPosition";const u3="ComboboxViewport",f3=S.forwardRef((t,e)=>{const n=kr(u3),r=ye(e,n.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-combobox-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-combobox-viewport]::-webkit-scrollbar{display:none}"}}),m.jsx(Ts.Slot,{scope:void 0,children:m.jsx(me.div,{"data-radix-combobox-viewport":"",role:"presentation",...t,ref:r,style:{position:"relative",flex:1,overflow:"auto",...t.style}})})]})});f3.displayName=u3;const Ef="ComboboxItem",[w5,Ng]=yg(Ef),jg=S.forwardRef((t,e)=>{const{value:n,disabled:r=!1,textValue:i,...o}=t,[s,a]=S.useState();ut(()=>{a(new DocumentFragment)},[]);const{onTextValueChange:c,textValue:f,...h}=kr(Ef),d=Lt(),[p,b]=S.useState(i??""),x=h.value===n,{startsWith:v,contains:C}=Lg(h.locale,{sensitivity:"base"}),$=S.useCallback(A=>{b(T=>T||(A?.textContent??"").trim())},[]);return S.useEffect(()=>{x&&f===void 0&&p!==""&&c(p)},[p,x,f,c]),h.autocomplete.type==="both"&&p&&h.filterValue&&!v(p,h.filterValue)||h.autocomplete.type==="list"&&h.autocomplete.filter==="startsWith"&&p&&f&&!v(p,f)||h.autocomplete.type==="list"&&h.autocomplete.filter==="contains"&&p&&f&&!C(p,f)?s?Eo.createPortal(m.jsx(w5,{textId:d,onTextValueChange:$,isSelected:x,textValue:p,children:m.jsx(Ts.ItemSlot,{scope:void 0,value:n,textValue:p,disabled:r,type:"option",isVisible:!1,children:m.jsx(q0,{ref:e,value:n,disabled:r,...o})})}),s):null:m.jsx(w5,{textId:d,onTextValueChange:$,isSelected:x,textValue:p,children:m.jsx(Ts.ItemSlot,{scope:void 0,value:n,textValue:p,disabled:r,type:"option",isVisible:!0,children:m.jsx(q0,{ref:e,value:n,disabled:r,...o})})})});jg.displayName=Ef;const h3="ComboboxItemImpl",q0=S.forwardRef((t,e)=>{const{value:n,disabled:r=!1,...i}=t,o=S.useRef(null),s=ye(e,o),{getItems:a}=wl(void 0),{onTextValueChange:c,visuallyFocussedItem:f,...h}=kr(Ef),{isSelected:d,textValue:p,textId:b}=Ng(h3),x=()=>{r||(h.onValueChange(n),c(p),h.onOpenChange(!1),h.autocomplete.type==="both"&&h.onFilterValueChange(p),h.trigger?.focus({preventScroll:!0}))},v=S.useMemo(()=>f===a().find($=>$.ref.current===o.current)?.ref.current,[a,f]),C=Lt();return m.jsx(me.div,{role:"option","aria-labelledby":b,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,id:C,ref:s,onPointerUp:re(i.onPointerUp,x)})});q0.displayName=h3;const d3="ComboboxItemText",g3=S.forwardRef((t,e)=>{const{className:n,style:r,...i}=t,o=Ng(d3),s=ye(e,o.onTextValueChange);return m.jsx(me.span,{id:o.textId,...i,ref:s})});g3.displayName=d3;const p3="ComboboxItemIndicator",m3=S.forwardRef((t,e)=>{const{isSelected:n}=Ng(p3);return n?m.jsx(me.span,{"aria-hidden":!0,...t,ref:e}):null});m3.displayName=p3;const Fg="ComboboxNoValueFound",b3=S.forwardRef((t,e)=>{const{textValue:n="",filterValue:r="",locale:i,autocomplete:o}=kr(Fg),[s,a]=S.useState([]),{subscribe:c}=wl(void 0),{startsWith:f,contains:h}=Lg(i,{sensitivity:"base"});return S.useEffect(()=>{const d=c(p=>{a(p)});return()=>{d()}},[c]),o.type==="none"&&s.length>0||o.type==="list"&&o.filter==="startsWith"&&s.some(d=>f(d.textValue,n))||o.type==="both"&&s.some(d=>f(d.textValue,r))||o.type==="list"&&o.filter==="contains"&&s.some(d=>h(d.textValue,n))?null:m.jsx(me.div,{...t,ref:e})});b3.displayName=Fg;const w3=S.forwardRef((t,e)=>{const{disabled:n=!1,...r}=t,i=kr(Fg),{textValue:o,visuallyFocussedItem:s}=i,{getItems:a,subscribe:c}=wl(void 0),f=S.useRef(null),[h,d]=S.useState(!1),p=ye(e,f),b=S.useMemo(()=>s===a().find(C=>C.ref.current===f.current)?.ref.current,[a,s]),x=Lt(),v=()=>{!n&&o&&(i.onValueChange(o),i.onTextValueChange(o),i.onOpenChange(!1),i.autocomplete.type==="both"&&i.onFilterValueChange(o),i.trigger?.focus({preventScroll:!0}))};return ut(()=>{const C=c($=>{d(!$.some(A=>A.textValue===o&&A.type!=="create"))});return a().length===0&&d(!0),()=>{C()}},[o,c,a]),!o||!h?null:m.jsx(Ts.ItemSlot,{scope:void 0,value:o??"",textValue:o??"",disabled:n,isVisible:!0,type:"create",children:m.jsx(me.div,{role:"option",tabIndex:n?void 0:-1,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,"data-highlighted":b?"":void 0,...r,id:x,ref:p,onPointerUp:re(r.onPointerUp,v)})})});w3.displayName="ComboboxCreateItem";const eD=QO,tD=n3,nD=i3,rD=o3,iD=s3,oD=a3,sD=f3,aD=jg,lD=g3,cD=m3,uD=b3,fD=w3;function hD(t,e){const n=Math.min(t.length,e.length);for(let r=0;r<n;r++)if(t[r]!==e[r])return r;return n}const Yn=Object.freeze(Object.defineProperty({__proto__:null,ComboboxItem:jg,Content:oD,CreateItem:fD,Icon:rD,Item:aD,ItemIndicator:cD,ItemText:lD,NoValueFound:uD,Portal:iD,Root:eD,TextInput:nD,Trigger:tD,Viewport:sD},Symbol.toStringTag,{value:"Module"}));function Vg(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...n)=>e.current?.(...n),[])}const dD=[" ","Enter","ArrowUp","ArrowDown"],gD=[" ","Enter"],xl="Select",[Mf,vl,pD]=kf(xl),[Us,mD]=wt(xl,[pD,ji]),Of=ji(),[bD,ai]=Us(xl),[wD,xD]=Us(xl),Hg=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:f,disabled:h,required:d,multi:p=!1}=t,b=Of(e),[x,v]=S.useState(null),[C,$]=S.useState(null),[A,T]=S.useState(!1),M=Do(f),[O=!1,I]=_t({prop:r,defaultProp:i,onChange:o}),[_,V]=_t({prop:s,defaultProp:a,onChange(W){c&&(Array.isArray(W),c(W))}}),F=S.useRef(null),[H,z]=S.useState(new Set);return m.jsx(fl,{...b,children:m.jsx(bD,{required:d,scope:e,trigger:x,onTriggerChange:v,valueNode:C,onValueNodeChange:$,valueNodeHasChildren:A,onValueNodeHasChildrenChange:T,contentId:Lt(),value:_,onValueChange:V,open:O,onOpenChange:I,dir:M,triggerPointerDownPosRef:F,disabled:h,multi:p,children:m.jsx(Mf.Provider,{scope:e,children:m.jsx(wD,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(W=>{z(Y=>new Set(Y).add(W))},[]),onNativeOptionRemove:S.useCallback(W=>{z(Y=>{const K=new Set(Y);return K.delete(W),K})},[]),children:n})})})})};Hg.displayName=xl;const x3="SelectTrigger",Pg=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Of(n),o=ai(x3,n),s=o.disabled,a=ye(e,o.onTriggerChange),c=vl(n),[f,h,d]=T3(b=>{const x=c().filter($=>!$.disabled),v=x.find($=>$.value===o.value),C=E3(x,b,v);if(C!==void 0&&!Array.isArray(C.value)){const $=o.multi?[C.value]:C.value;o.onValueChange($)}}),p=()=>{s||(o.onOpenChange(!0),d())};return m.jsx(hl,{asChild:!0,...i,children:m.jsx(me.div,{role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed","data-disabled":s?"":void 0,"data-placeholder":o.value===void 0?"":void 0,tabIndex:s?void 0:0,...r,ref:a,onClick:re(r.onClick,b=>{b.currentTarget.focus()}),onPointerDown:re(r.onPointerDown,b=>{const x=b.target;x.hasPointerCapture(b.pointerId)&&x.releasePointerCapture(b.pointerId),(x.closest("button")??x.closest("div"))===b.currentTarget&&b.button===0&&b.ctrlKey===!1&&(p(),o.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:re(r.onKeyDown,b=>{const x=f.current!=="",v=b.ctrlKey||b.altKey||b.metaKey,C=b.target;(C.closest("button")??C.closest("div"))===b.currentTarget&&(!v&&b.key.length===1&&h(b.key),!(x&&b.key===" ")&&dD.includes(b.key)&&(p(),b.preventDefault()))})})})});Pg.displayName=x3;const v3="SelectValue",Wg=S.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,placeholder:i,...o}=t,s=ai(v3,n),{onValueNodeHasChildrenChange:a}=s,c=r!==void 0,f=ye(e,s.onValueNodeChange),[h,d]=S.useState([]),p=vl(n);ut(()=>{a(c)},[a,c]),S.useLayoutEffect(()=>{if(Array.isArray(s.value)&&h.length!==s.value.length){const x=setTimeout(()=>{const v=p().filter(C=>Array.isArray(C.value)?!1:s.value?.includes(C.value));d(v)});return()=>{clearTimeout(x)}}},[s.value,p,h]);let b;if((s.value===void 0||s.value.length===0)&&i!==void 0)b=m.jsx("span",{children:i});else if(typeof r=="function")if(Array.isArray(s.value)){const x=s.value.map(v=>{const C=h.find($=>$.value===v);return C?r({value:v,textValue:C?.textValue}):null});b=x.every(v=>v===null)?i:x}else b=r(s.value);else b=r;return m.jsx(me.span,{...o,ref:f,children:b||null})});Wg.displayName=v3;const vD="SelectIcon",zg=S.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return m.jsx(me.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});zg.displayName=vD;const yD="SelectPortal",Ug=t=>m.jsx(Ws,{asChild:!0,...t});Ug.displayName=yD;const xo="SelectContent",qg=S.forwardRef((t,e)=>{const n=ai(xo,t.__scopeSelect),[r,i]=S.useState();if(ut(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Eo.createPortal(m.jsx(y3,{scope:t.__scopeSelect,children:m.jsx(Mf.Slot,{scope:t.__scopeSelect,children:m.jsx("div",{children:t.children})})}),o):null}return m.jsx(C3,{...t,ref:e})});qg.displayName=xo;const Ur=10,[y3,Fi]=Us(xo),CD="SelectContentImpl",C3=S.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:f,alignOffset:h,arrowPadding:d,collisionBoundary:p,collisionPadding:b,sticky:x,hideWhenDetached:v,avoidCollisions:C,...$}=t,A=ai(xo,n),[T,M]=S.useState(null),[O,I]=S.useState(null),_=ye(e,pe=>M(pe)),[V,F]=S.useState(null),[H,z]=S.useState(null),W=vl(n),[Y,K]=S.useState(!1),te=S.useRef(!1);S.useEffect(()=>{if(T)return ml(T)},[T]),pl();const ie=S.useCallback(pe=>{const[De,...ke]=W().map(ze=>ze.ref.current),[Ae]=ke.slice(-1),_e=document.activeElement;for(const ze of pe)if(ze===_e||(ze?.scrollIntoView({block:"nearest"}),ze===De&&O&&(O.scrollTop=0),ze===Ae&&O&&(O.scrollTop=O.scrollHeight),ze?.focus(),document.activeElement!==_e))return},[W,O]),ne=S.useCallback(()=>ie([V,T]),[ie,V,T]);S.useEffect(()=>{Y&&ne()},[Y,ne]);const{onOpenChange:oe,triggerPointerDownPosRef:X}=A;S.useEffect(()=>{if(T){let pe={x:0,y:0};const De=Ae=>{pe={x:Math.abs(Math.round(Ae.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(Ae.pageY)-(X.current?.y??0))}},ke=Ae=>{pe.x<=10&&pe.y<=10?Ae.preventDefault():T.contains(Ae.target)||oe(!1),document.removeEventListener("pointermove",De),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",De),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",De),document.removeEventListener("pointerup",ke,{capture:!0})}}},[T,oe,X]),S.useEffect(()=>{const pe=()=>oe(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[oe]);const[ce,fe]=T3(pe=>{const De=W().filter(_e=>!_e.disabled),ke=De.find(_e=>_e.ref.current===document.activeElement),Ae=E3(De,pe,ke);Ae&&setTimeout(()=>Ae.ref.current.focus())}),Me=S.useCallback((pe,De,ke)=>{const Ae=!te.current&&!ke;(A.value!==void 0&&A.value===De||Ae)&&(F(pe),Ae&&(te.current=!0))},[A.value]),we=S.useCallback(()=>T?.focus(),[T]),Ve=S.useCallback((pe,De,ke)=>{const Ae=!te.current&&!ke;(A.value!==void 0&&(Array.isArray(De)?De.every(ze=>A.value?.includes(ze)):A.value===De)||Ae)&&z(pe)},[A.value]),Ne=r==="popper"?K0:$3,He=Ne===K0?{side:a,sideOffset:c,align:f,alignOffset:h,arrowPadding:d,collisionBoundary:p,collisionPadding:b,sticky:x,hideWhenDetached:v,avoidCollisions:C}:{};return m.jsx(y3,{scope:n,content:T,viewport:O,onViewportChange:I,itemRefCallback:Me,selectedItem:V,onItemLeave:we,itemTextRefCallback:Ve,focusSelectedItem:ne,selectedItemText:H,position:r,isPositioned:Y,searchRef:ce,children:m.jsx(_g,{as:$r,allowPinchZoom:!0,children:m.jsx(zs,{asChild:!0,trapped:A.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:re(i,pe=>{A.trigger?.focus({preventScroll:!0}),document.getSelection()?.empty(),pe.preventDefault()}),children:m.jsx(Mo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:m.jsx(Ne,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed","aria-multiselectable":A.multi?"true":void 0,dir:A.dir,onContextMenu:pe=>pe.preventDefault(),...$,...He,onPlaced:()=>K(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...$.style},onKeyDown:re($.onKeyDown,pe=>{const De=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!De&&pe.key.length===1&&fe(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Ae=W().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const _e=pe.target,ze=Ae.indexOf(_e);Ae=Ae.slice(ze+1)}setTimeout(()=>ie(Ae)),pe.preventDefault()}})})})})})})});C3.displayName=CD;const $D="SelectItemAlignedPosition",$3=S.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,o=ai(xo,n),s=Fi(xo,n),[a,c]=S.useState(null),[f,h]=S.useState(null),d=ye(e,_=>h(_)),p=vl(n),b=S.useRef(!1),x=S.useRef(!0),{viewport:v,selectedItem:C,selectedItemText:$,focusSelectedItem:A}=s,T=S.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&f&&v&&C&&$){const _=o.trigger.getBoundingClientRect(),V=f.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),H=$.getBoundingClientRect();if(o.dir!=="rtl"){const _e=H.left-V.left,ze=F.left-_e,Et=_.left-ze,Qe=_.width+Et,Pe=Math.max(Qe,V.width),Yt=window.innerWidth-Ur,ht=U0(ze,[Ur,Yt-Pe]);a.style.minWidth=`${Qe}px`,a.style.left=`${ht}px`}else{const _e=V.right-H.right,ze=window.innerWidth-F.right-_e,Et=window.innerWidth-_.right-ze,Qe=_.width+Et,Pe=Math.max(Qe,V.width),Yt=window.innerWidth-Ur,ht=U0(ze,[Ur,Yt-Pe]);a.style.minWidth=`${Qe}px`,a.style.right=`${ht}px`}const z=p(),W=window.innerHeight-Ur*2,Y=v.scrollHeight,K=window.getComputedStyle(f),te=parseInt(K.borderTopWidth,10),ie=parseInt(K.paddingTop,10),ne=parseInt(K.borderBottomWidth,10),oe=parseInt(K.paddingBottom,10),X=te+ie+Y+oe+ne,ce=Math.min(C.offsetHeight*5,X),fe=window.getComputedStyle(v),Me=parseInt(fe.paddingTop,10),we=parseInt(fe.paddingBottom,10),Ve=_.top+_.height/2-Ur,Ne=W-Ve,He=C.offsetHeight/2,pe=C.offsetTop+He,De=te+ie+pe,ke=X-De;if(De<=Ve){const _e=C===z[z.length-1].ref.current;a.style.bottom="0px";const ze=f.clientHeight-v.offsetTop-v.offsetHeight,Et=Math.max(Ne,He+(_e?we:0)+ze+ne),Qe=De+Et;a.style.height=`${Qe}px`}else{const _e=C===z[0].ref.current;a.style.top="0px";const Et=Math.max(Ve,te+v.offsetTop+(_e?Me:0)+He)+ke;a.style.height=`${Et}px`,v.scrollTop=De-Ve+v.offsetTop}a.style.margin=`${Ur}px 0`,a.style.minHeight=`${ce}px`,a.style.maxHeight=`${W}px`,r?.(),requestAnimationFrame(()=>b.current=!0)}},[p,o.trigger,o.valueNode,a,f,v,C,$,o.dir,r]);ut(()=>T(),[T]);const[M,O]=S.useState();ut(()=>{f&&O(window.getComputedStyle(f).zIndex)},[f]);const I=S.useCallback(_=>{_&&x.current===!0&&(T(),A?.(),x.current=!1)},[T,A]);return m.jsx(AD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:b,onScrollButtonChange:I,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:m.jsx(me.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});$3.displayName=$D;const SD="SelectPopperPosition",K0=S.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ur,...o}=t,s=Of(n);return m.jsx(dl,{...s,...o,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});K0.displayName=SD;const[AD,Kg]=Us(xo,{}),G0="SelectViewport",Gg=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Fi(G0,n),o=Kg(G0,n),s=ye(e,i.onViewportChange),a=S.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.jsx(Mf.Slot,{scope:n,children:m.jsx(me.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:re(r.onScroll,c=>{const f=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:d}=o;if(d?.current&&h){const p=Math.abs(a.current-f.scrollTop);if(p>0){const b=window.innerHeight-Ur*2,x=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),C=Math.max(x,v);if(C<b){const $=C+p,A=Math.min(b,$),T=$-A;h.style.height=`${A}px`,h.style.bottom==="0px"&&(f.scrollTop=T>0?T:0,h.style.justifyContent="flex-end")}}}a.current=f.scrollTop})})})]})});Gg.displayName=G0;const S3="SelectGroup",[RD,kD]=Us(S3),Yg=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Lt();return m.jsx(RD,{scope:n,id:i,children:m.jsx(me.div,{role:"group","aria-labelledby":i,...r,ref:e})})});Yg.displayName=S3;const A3="SelectLabel",Xg=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=kD(A3,n);return m.jsx(me.div,{id:i.id,...r,ref:e})});Xg.displayName=A3;const Ou="SelectItem",[TD,R3]=Us(Ou),Qg=S.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=t,a=ai(Ou,n),c=Fi(Ou,n),f=typeof r=="string"?Array.isArray(a.value)?a.value.includes(r):a.value===r:r.every(A=>a.value?.includes(A)),h=Array.isArray(a.value)&&Array.isArray(r)&&r.some(A=>a.value?.includes(A)),[d,p]=S.useState(o??""),[b,x]=S.useState(!1),v=ye(e,A=>c.itemRefCallback?.(A,r,i)),C=Lt(),$=()=>{if(!i){let A=a.multi&&typeof r=="string"?[r]:r;h&&!f?a.onValueChange(A):Array.isArray(a.value)&&(A=M3(r,a.value)),a.onValueChange(A),a.multi||a.onOpenChange(!1)}};if(!a.multi&&Array.isArray(r))throw new Error("You can only pass an array of values in multi selects");return m.jsx(TD,{scope:n,value:r,disabled:i,textId:C,isSelected:f,isIntermediate:h,onItemTextChange:S.useCallback(A=>{p(T=>T||(A?.textContent??"").trim())},[]),children:m.jsx(Mf.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:m.jsx(me.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":a.multi?void 0:f&&b,"aria-checked":a.multi?f:void 0,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:v,onFocus:re(s.onFocus,()=>x(!0)),onBlur:re(s.onBlur,()=>x(!1)),onPointerUp:re(s.onPointerUp,$),onPointerMove:re(s.onPointerMove,A=>{i?c.onItemLeave?.():A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:re(s.onPointerLeave,A=>{A.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:re(s.onKeyDown,A=>{c.searchRef?.current!==""&&A.key===" "||(gD.includes(A.key)&&$(),A.key===" "&&A.preventDefault())})})})})});Qg.displayName=Ou;const Aa="SelectItemText",Zg=S.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...o}=t,s=ai(Aa,n),a=Fi(Aa,n),c=R3(Aa,n),f=xD(Aa,n),[h,d]=S.useState(null),p=ye(e,$=>d($),c.onItemTextChange,$=>a.itemTextRefCallback?.($,c.value,c.disabled)),b=h?.textContent,x=S.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:b},Array.isArray(c.value)?c.value.join(";"):c.value),[c.disabled,c.value,b]),{onNativeOptionAdd:v,onNativeOptionRemove:C}=f;return ut(()=>(v(x),()=>C(x)),[v,C,x]),m.jsxs(m.Fragment,{children:[m.jsx(me.span,{id:c.textId,...o,ref:p}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Eo.createPortal(o.children,s.valueNode):null]})});Zg.displayName=Aa;const k3="SelectItemIndicator",Jg=S.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t,o=R3(k3,n);return typeof r=="function"?m.jsx(me.span,{"aria-hidden":!0,...i,ref:e,children:r({isSelected:o.isSelected,isIntermediate:o.isIntermediate})}):o.isSelected?m.jsx(me.span,{"aria-hidden":!0,...i,ref:e,children:r}):null});Jg.displayName=k3;const Y0="SelectScrollUpButton",ep=S.forwardRef((t,e)=>{const n=Fi(Y0,t.__scopeSelect),r=Kg(Y0,t.__scopeSelect),[i,o]=S.useState(!1),s=ye(e,r.onScrollButtonChange);return ut(()=>{if(n.viewport&&n.isPositioned){const a=n.viewport,c=()=>{const f=a.scrollTop>0;o(f)};return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?m.jsx(np,{...t,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop-=c.offsetHeight)}}):null});ep.displayName=Y0;const X0="SelectScrollDownButton",tp=S.forwardRef((t,e)=>{const n=Fi(X0,t.__scopeSelect),r=Kg(X0,t.__scopeSelect),[i,o]=S.useState(!1),s=ye(e,r.onScrollButtonChange);return ut(()=>{if(n.viewport&&n.isPositioned){const a=n.viewport,c=()=>{const f=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<f;o(h)};return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?m.jsx(np,{...t,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop+=c.offsetHeight)}}):null});tp.displayName=X0;const np=S.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,o=Fi("SelectScrollButton",n),s=S.useRef(null),a=vl(n),c=S.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return S.useEffect(()=>()=>c(),[c]),ut(()=>{a().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),m.jsx(me.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerMove:re(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:re(i.onPointerLeave,()=>{c()})})});np.displayName="SelectScrollButtonImpl";const ED="SelectSeparator",rp=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return m.jsx(me.div,{"aria-hidden":!0,...r,ref:e})});rp.displayName=ED;const Q0="SelectArrow",ip=S.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Of(n),o=ai(Q0,n),s=Fi(Q0,n);return o.open&&s.position==="popper"?m.jsx(OM,{...i,...r,ref:e}):null});ip.displayName=Q0;const MD="BubbleSelect",OD=S.forwardRef((t,e)=>{const{value:n,...r}=t,i=S.useRef(null),o=ye(e,i),s=Tf(n),a=ai(MD,void 0);S.useEffect(()=>{const f=i.current,h=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(h,"value").set;if(s!==n&&p){const b=new Event("change",{bubbles:!0});p.call(f,n),f.dispatchEvent(b)}},[s,n]);let c=n;return a.multi&&!Array.isArray(n)&&(c=[]),m.jsx(Fv,{asChild:!0,children:m.jsx("select",{...r,multiple:a.multi?!0:void 0,ref:o,defaultValue:c})})});OD.displayName="BubbleSelect";function T3(t){const e=Vg(t),n=S.useRef(""),r=S.useRef(0),i=S.useCallback(s=>{const a=n.current+s;e(a),function c(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),o=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function E3(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let s=DD(t,Math.max(o,0));i.length===1&&(s=s.filter(f=>f!==n));const c=s.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function DD(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const M3=(t,e=[])=>{if(Array.isArray(t))return t.reduce((r,i)=>M3(i,r),e);const n=e.indexOf(t);return n===-1?[...e,t]:[...e.slice(0,n),...e.slice(n+1)]},ID=Hg,_D=Pg,LD=Wg,BD=zg,ND=Ug,jD=qg,FD=Gg,VD=Yg,HD=Xg,PD=Qg,WD=Zg,zD=Jg,UD=ep,qD=tp,KD=rp,GD=ip,rr=Object.freeze(Object.defineProperty({__proto__:null,Arrow:GD,Content:jD,Group:VD,Icon:BD,Item:PD,ItemIndicator:zD,ItemText:WD,Label:HD,Portal:ND,Root:ID,ScrollDownButton:qD,ScrollUpButton:UD,Select:Hg,SelectArrow:ip,SelectContent:qg,SelectGroup:Yg,SelectIcon:zg,SelectItem:Qg,SelectItemIndicator:Jg,SelectItemText:Zg,SelectLabel:Xg,SelectPortal:Ug,SelectScrollDownButton:tp,SelectScrollUpButton:ep,SelectSeparator:rp,SelectTrigger:Pg,SelectValue:Wg,SelectViewport:Gg,Separator:KD,Trigger:_D,Value:LD,Viewport:FD,createSelectScope:mD},Symbol.toStringTag,{value:"Module"}));function uo(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}const O3="Collapsible",[YD,D3]=wt(O3),[XD,op]=YD(O3),QD=w.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...a}=t,[c=!1,f]=_t({prop:r,defaultProp:i,onChange:s});return w.createElement(XD,{scope:n,disabled:o,contentId:Lt(),open:c,onOpenToggle:w.useCallback(()=>f(h=>!h),[f])},w.createElement(me.div,q({"data-state":sp(c),"data-disabled":o?"":void 0},a,{ref:e})))}),ZD="CollapsibleTrigger",JD=w.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=op(ZD,n);return w.createElement(me.button,q({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":sp(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:e,onClick:re(t.onClick,i.onOpenToggle)}))}),I3="CollapsibleContent",eI=w.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=op(I3,t.__scopeCollapsible);return w.createElement(Tt,{present:n||i.open},({present:o})=>w.createElement(tI,q({},r,{ref:e,present:o})))}),tI=w.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=t,s=op(I3,n),[a,c]=w.useState(r),f=w.useRef(null),h=ye(e,f),d=w.useRef(0),p=d.current,b=w.useRef(0),x=b.current,v=s.open||a,C=w.useRef(v),$=w.useRef();return w.useEffect(()=>{const A=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(A)},[]),ut(()=>{const A=f.current;if(A){$.current=$.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const T=A.getBoundingClientRect();d.current=T.height,b.current=T.width,C.current||(A.style.transitionDuration=$.current.transitionDuration,A.style.animationName=$.current.animationName),c(r)}},[s.open,r]),w.createElement(me.div,q({"data-state":sp(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v},o,{ref:h,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style}}),v&&i)});function sp(t){return t?"open":"closed"}const nI=QD,rI=JD,iI=eI,Vi="Accordion",oI=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ap,sI,aI]=kf(Vi),[Df,_te]=wt(Vi,[aI,D3]),lp=D3(),_3=S.default.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,o=r;return S.default.createElement(ap.Provider,{scope:t.__scopeAccordion},n==="multiple"?S.default.createElement(fI,q({},o,{ref:e})):S.default.createElement(uI,q({},i,{ref:e})))});_3.propTypes={type(t){const e=t.value||t.defaultValue;return t.type&&!["single","multiple"].includes(t.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):t.type==="multiple"&&typeof e=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):t.type==="single"&&Array.isArray(e)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[L3,lI]=Df(Vi),[B3,cI]=Df(Vi,{collapsible:!1}),uI=S.default.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...s}=t,[a,c]=_t({prop:n,defaultProp:r,onChange:i});return S.default.createElement(L3,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:S.default.useCallback(()=>o&&c(""),[o,c])},S.default.createElement(B3,{scope:t.__scopeAccordion,collapsible:o},S.default.createElement(N3,q({},s,{ref:e}))))}),fI=S.default.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=t,[s=[],a]=_t({prop:n,defaultProp:r,onChange:i}),c=S.default.useCallback(h=>a((d=[])=>[...d,h]),[a]),f=S.default.useCallback(h=>a((d=[])=>d.filter(p=>p!==h)),[a]);return S.default.createElement(L3,{scope:t.__scopeAccordion,value:s,onItemOpen:c,onItemClose:f},S.default.createElement(B3,{scope:t.__scopeAccordion,collapsible:!0},S.default.createElement(N3,q({},o,{ref:e}))))}),[hI,If]=Df(Vi),N3=S.default.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...s}=t,a=S.default.useRef(null),c=ye(a,e),f=sI(n),d=Do(i)==="ltr",p=re(t.onKeyDown,b=>{var x;if(!oI.includes(b.key))return;const v=b.target,C=f().filter(F=>{var H;return!((H=F.ref.current)!==null&&H!==void 0&&H.disabled)}),$=C.findIndex(F=>F.ref.current===v),A=C.length;if($===-1)return;b.preventDefault();let T=$;const M=0,O=A-1,I=()=>{T=$+1,T>O&&(T=M)},_=()=>{T=$-1,T<M&&(T=O)};switch(b.key){case"Home":T=M;break;case"End":T=O;break;case"ArrowRight":o==="horizontal"&&(d?I():_());break;case"ArrowDown":o==="vertical"&&I();break;case"ArrowLeft":o==="horizontal"&&(d?_():I());break;case"ArrowUp":o==="vertical"&&_();break}const V=T%A;(x=C[V].ref.current)===null||x===void 0||x.focus()});return S.default.createElement(hI,{scope:n,disabled:r,direction:i,orientation:o},S.default.createElement(ap.Slot,{scope:n},S.default.createElement(me.div,q({},s,{"data-orientation":o,ref:c,onKeyDown:r?void 0:p}))))}),Z0="AccordionItem",[dI,cp]=Df(Z0),gI=S.default.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,o=If(Z0,n),s=lI(Z0,n),a=lp(n),c=Lt(),f=r&&s.value.includes(r)||!1,h=o.disabled||t.disabled;return S.default.createElement(dI,{scope:n,open:f,disabled:h,triggerId:c},S.default.createElement(nI,q({"data-orientation":o.orientation,"data-state":j3(f)},a,i,{ref:e,disabled:h,open:f,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})))}),pI="AccordionHeader",mI=S.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=If(Vi,n),o=cp(pI,n);return S.default.createElement(me.h3,q({"data-orientation":i.orientation,"data-state":j3(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:e}))}),x5="AccordionTrigger",bI=S.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=If(Vi,n),o=cp(x5,n),s=cI(x5,n),a=lp(n);return S.default.createElement(ap.ItemSlot,{scope:n},S.default.createElement(rI,q({"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},a,r,{ref:e})))}),wI="AccordionContent",xI=S.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=If(Vi,n),o=cp(wI,n),s=lp(n);return S.default.createElement(iI,q({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation},s,r,{ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}}))});function j3(t){return t?"open":"closed"}const vI=_3,yI=gI,CI=mI,$I=bI,SI=xI,AI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 2A12.014 12.014 0 0 0 4 14c0 3 1.57 6.883 4.201 10.375C10.85 27.894 13.764 30 16 30s5.151-2.101 7.799-5.625C26.43 20.875 28 17 28 14A12.014 12.014 0 0 0 16 2M8 14.5A1.5 1.5 0 0 1 9.5 13a4.5 4.5 0 0 1 4.5 4.5 1.5 1.5 0 0 1-1.5 1.5A4.5 4.5 0 0 1 8 14.5M18 25h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 0 2m1.5-6a1.5 1.5 0 0 1-1.5-1.5 4.5 4.5 0 0 1 4.5-4.5 1.5 1.5 0 0 1 1.5 1.5 4.5 4.5 0 0 1-4.5 4.5"})})};w.forwardRef(AI);const RI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28 6H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2v11a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V13a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-9 12h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2m9-7H4V8h24z"})})};w.forwardRef(RI);const kI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30.5 7v6a1.5 1.5 0 0 1-1.5 1.5h-6a1.5 1.5 0 0 1 0-3h2.137l-2.375-2.173-.047-.046a9.5 9.5 0 1 0-6.84 16.219H16a9.44 9.44 0 0 0 6.519-2.59 1.5 1.5 0 1 1 2.061 2.181A12.43 12.43 0 0 1 16 28.5h-.171a12.5 12.5 0 1 1 8.985-21.368L27.5 9.59V7a1.5 1.5 0 0 1 3 0"})})},TI=w.forwardRef(kI),EI=TI,MI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m26.061 19.061-9 9a1.503 1.503 0 0 1-2.125 0l-9-9a1.503 1.503 0 1 1 2.125-2.125l6.439 6.439V5a1.5 1.5 0 1 1 3 0v18.375l6.439-6.44a1.502 1.502 0 1 1 2.125 2.125z"})})};w.forwardRef(MI);const OI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H8.625l6.44 6.439a1.502 1.502 0 1 1-2.125 2.125l-9-9a1.5 1.5 0 0 1 0-2.125l9-9a1.503 1.503 0 0 1 2.125 2.125L8.625 14.5H27a1.5 1.5 0 0 1 1.5 1.5"})})};w.forwardRef(OI);const DI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m28.061 17.061-9 9a1.503 1.503 0 1 1-2.125-2.125l6.439-6.436H5a1.5 1.5 0 1 1 0-3h18.375l-6.436-6.44a1.503 1.503 0 0 1 2.125-2.125l9 9a1.5 1.5 0 0 1-.003 2.126"})})};w.forwardRef(DI);const II=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26.061 15.061a1.5 1.5 0 0 1-2.125 0L17.5 8.625V27a1.5 1.5 0 1 1-3 0V8.625l-6.439 6.436a1.503 1.503 0 1 1-2.125-2.125l9-9a1.5 1.5 0 0 1 2.125 0l9 9a1.5 1.5 0 0 1 0 2.125"})})},_I=w.forwardRef(II),LI=_I,BI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M11 13.5H5A1.5 1.5 0 0 1 3.5 12V6a1.5 1.5 0 0 1 3 0v1.733C8.581 5.683 11.786 3.5 16 3.5c5.558 0 8.92 3.299 9.061 3.439a1.5 1.5 0 0 1-2.117 2.125C22.889 9.01 20.25 6.5 16 6.5c-3.625 0-6.367 2.21-8 4h3a1.5 1.5 0 1 1 0 3m16 5h-6a1.5 1.5 0 1 0 0 3h3c-1.625 1.79-4.375 4-8 4-4.25 0-6.889-2.511-6.944-2.565A1.5 1.5 0 0 0 6.94 25.06c.141.141 3.504 3.44 9.061 3.44 4.214 0 7.419-2.183 9.5-4.233V26a1.5 1.5 0 1 0 3 0v-6a1.5 1.5 0 0 0-1.5-1.5"})})};w.forwardRef(BI);const NI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27.725 21.993C27.031 20.798 26 17.416 26 13a10 10 0 0 0-20 0c0 4.418-1.032 7.797-1.726 8.993A2 2 0 0 0 6 25h5.101a5 5 0 0 0 9.798 0H26a2 2 0 0 0 1.725-3.008M16 27a3 3 0 0 1-2.828-2h5.656A3 3 0 0 1 16 27"})})};w.forwardRef(NI);const jI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M22.135 14.308A6.001 6.001 0 0 0 17.5 4.5H9A1.5 1.5 0 0 0 7.5 6v19A1.5 1.5 0 0 0 9 26.5h10a6.5 6.5 0 0 0 3.135-12.192M10.5 7.5h7a3 3 0 0 1 0 6h-7zm8.5 16h-8.5v-7H19a3.5 3.5 0 1 1 0 7"})})},FI=w.forwardRef(jI),VI=FI,HI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 4v20a1 1 0 0 1-1 1H9a2 2 0 0 0-2 2h17a1 1 0 0 1 0 2H6a1 1 0 0 1-1-1V7a4 4 0 0 1 4-4h17a1 1 0 0 1 1 1"})})};w.forwardRef(HI);const PI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M19 14a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1m10-5v16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V6a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v1h5a2 2 0 0 1 2 2M12 7h8V6a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1zm15 7.201V9H5v5.201A23 23 0 0 0 16 17a23 23 0 0 0 11-2.799"})})};w.forwardRef(PI);const WI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M9.5 8A1.5 1.5 0 0 1 11 6.5h16a1.5 1.5 0 0 1 0 3H11A1.5 1.5 0 0 1 9.5 8M27 14.5H11a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3m0 8H11a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3M5.5 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-8a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 16a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})},zI=w.forwardRef(WI),UI=zI,qI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26 4h-3V3a1 1 0 0 0-2 0v1H11V3a1 1 0 0 0-2 0v1H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 6H6V6h3v1a1 1 0 0 0 2 0V6h10v1a1 1 0 0 0 2 0V6h3z"})})},KI=w.forwardRef(qI),GI=KI,YI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30 14h-1.35l-3.472-7.812A2 2 0 0 0 23.35 5H8.65a2 2 0 0 0-1.828 1.188L3.35 14H2a1 1 0 0 0 0 2h1v10a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2v-2h12v2a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V16h1a1 1 0 0 0 0-2m-20 6H8a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2m12 0a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2z"})})};w.forwardRef(YI);const XI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m26.708 12.708-10 10a1 1 0 0 1-1.415 0l-10-10A1 1 0 0 1 6 11h20a1 1 0 0 1 .707 1.707"})})},QI=w.forwardRef(XI),Oi=QI,ZI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26.924 20.383A1 1 0 0 1 26 21H6a1 1 0 0 1-.708-1.707l10-10a1 1 0 0 1 1.415 0l10 10a1 1 0 0 1 .217 1.09"})})};w.forwardRef(ZI);const JI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M7 26a1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1 0-2 3 3 0 0 1 3 3m-3-7a1 1 0 0 0 0 2 5 5 0 0 1 5 5 1 1 0 1 0 2 0 7.01 7.01 0 0 0-7-7m0-4a1 1 0 0 0 0 2 9.01 9.01 0 0 1 9 9 1 1 0 0 0 2 0A11.01 11.01 0 0 0 4 15M27 5H5a2 2 0 0 0-2 2v5a1 1 0 0 0 1 1 13.014 13.014 0 0 1 13 13 1 1 0 0 0 1 1h9a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2"})})};w.forwardRef(JI);const e_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M25 3h-1a2 2 0 0 0-2 2v2h-3.5V5a2 2 0 0 0-2-2h-1a2 2 0 0 0-2 2v2H10V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v5.586A1.98 1.98 0 0 0 5.586 12L7 13.414V27a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V13.414L26.414 12A1.98 1.98 0 0 0 27 10.586V5a2 2 0 0 0-2-2m-6 24h-6v-8a3 3 0 0 1 6 0z"})})};w.forwardRef(e_);const t_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-5-2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3-5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M25 24H7a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v13h17a1 1 0 0 1 0 2"})})};w.forwardRef(t_);const n_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M3.094 14.443a12.8 12.8 0 0 1 2.914-6.72 2 2 0 0 1 2.953-.138l3.459 3.533a1.98 1.98 0 0 1 .211 2.56 3.2 3.2 0 0 0-.462.968.5.5 0 0 1-.478.354h-8.1a.5.5 0 0 1-.497-.557m14.08-11.435A2 2 0 0 0 15 5v5.084a1.98 1.98 0 0 0 1.656 1.97 4 4 0 0 1 .677 7.72.51.51 0 0 0-.333.476v8.154a.5.5 0 0 0 .558.5A13.04 13.04 0 0 0 29 16.185C29.094 9.4 23.899 3.61 17.174 3.008M14.656 19.77a4 4 0 0 1-2.425-2.427.51.51 0 0 0-.475-.343H3.59a.5.5 0 0 0-.5.556A13.01 13.01 0 0 0 14.443 28.91a.5.5 0 0 0 .556-.5V20.25a.51.51 0 0 0-.343-.48"})})};w.forwardRef(n_);const r_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m0 2a11 11 0 0 1 8.984 4.659L16 14.845zm0 22a11 11 0 0 1-8.984-4.659l18.97-10.951A11 11 0 0 1 16 27"})})};w.forwardRef(r_);const i_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m29.061 10.061-16 16a1.5 1.5 0 0 1-2.125 0l-7-7a1.504 1.504 0 0 1 2.125-2.125L12 22.875 26.939 7.939a1.502 1.502 0 1 1 2.125 2.125z"})})},o_=w.forwardRef(i_),s_=o_,a_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m5.708 10.708-7 7a1 1 0 0 1-1.415 0l-3-3a1 1 0 0 1 1.415-1.415L14 18.586l6.293-6.293a1 1 0 0 1 1.415 1.415"})})},l_=w.forwardRef(a_),c_=l_,u_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m27.061 13.061-10 10a1.503 1.503 0 0 1-2.125 0l-10-10a1.503 1.503 0 1 1 2.125-2.125L16 19.875l8.939-8.94a1.502 1.502 0 1 1 2.125 2.125z"})})};w.forwardRef(u_);const f_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M21.061 24.939a1.503 1.503 0 0 1-2.125 2.125l-10-10a1.5 1.5 0 0 1 0-2.125l10-10a1.503 1.503 0 0 1 2.125 2.125L12.125 16z"})})},h_=w.forwardRef(f_),F3=h_,d_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m23.061 17.061-10 10a1.503 1.503 0 0 1-2.125-2.125L19.875 16l-8.936-8.939a1.502 1.502 0 1 1 2.125-2.125l10 10a1.5 1.5 0 0 1-.003 2.125"})})},g_=w.forwardRef(d_),up=g_,p_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27.061 21.061a1.503 1.503 0 0 1-2.125 0L16 12.125l-8.939 8.936a1.503 1.503 0 0 1-2.125-2.125l10-10a1.5 1.5 0 0 1 2.125 0l10 10a1.5 1.5 0 0 1 0 2.125"})})};w.forwardRef(p_);const m_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m7 14h-7a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v6h6a1 1 0 0 1 0 2"})})},b_=w.forwardRef(m_),w_=b_,x_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28 16a12 12 0 0 1-20.236 8.728 1.002 1.002 0 0 1 1.375-1.456 10 10 0 1 0-.21-14.343c-.441.446-.857.885-1.26 1.321l2.039 2.043A1 1 0 0 1 9 14H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1.707-.707L6.25 8.838c.402-.437.817-.875 1.258-1.32A12 12 0 0 1 28 16M16 9a1 1 0 0 0-1 1v6a1 1 0 0 0 .485.858l5 3a.999.999 0 0 0 1.486-1.1 1 1 0 0 0-.456-.616L17 15.434V10a1 1 0 0 0-1-1"})})};w.forwardRef(x_);const v_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M20.008 5a11.01 11.01 0 0 0-9.847 6.084A10.9 10.9 0 0 0 9 15.966 1.023 1.023 0 0 1 8.071 17 1 1 0 0 1 7 16a13 13 0 0 1 .668-4.115.5.5 0 0 0-.594-.647A8.01 8.01 0 0 0 1 19c0 4.399 3.719 8 8.125 8H20a11.01 11.01 0 0 0 10.991-11.435C30.764 9.693 25.884 5 20.008 5"})})};w.forwardRef(v_);const y_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30.991 15.565C30.764 9.693 25.884 5 20.008 5a11.01 11.01 0 0 0-9.847 6.084A10.9 10.9 0 0 0 9 15.966 1.023 1.023 0 0 1 8.071 17 1 1 0 0 1 7 16a13 13 0 0 1 .668-4.115.5.5 0 0 0-.594-.647A8.01 8.01 0 0 0 1 19c0 4.399 3.719 8 8.125 8H20a11.01 11.01 0 0 0 10.991-11.435m-7.283 3.143a1 1 0 0 1-1.415 0L20 16.414V24a1 1 0 0 1-2 0v-7.586l-2.293 2.293a1 1 0 0 1-1.415-1.415l4-4a1 1 0 0 1 1.415 0l4 4a1 1 0 0 1 0 1.415"})})};w.forwardRef(y_);const C_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M8.96 12.153 4.342 16l4.618 3.848a1.5 1.5 0 1 1-1.92 2.305l-6-5a1.5 1.5 0 0 1 0-2.305l6-5a1.5 1.5 0 0 1 1.92 2.304m22 2.694-6-5a1.5 1.5 0 1 0-1.92 2.306L27.658 16l-4.618 3.848a1.5 1.5 0 1 0 1.92 2.305l6-5a1.5 1.5 0 0 0 0-2.305M20.512 3.59a1.5 1.5 0 0 0-1.922.898l-8 22a1.5 1.5 0 0 0 2.82 1.024l8-22a1.5 1.5 0 0 0-.898-1.922"})})},$_=w.forwardRef(C_),S_=$_,A_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M200 40h-32a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v80a16 16 0 0 0 16 16h8v64a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m-93.66 21.66a8 8 0 0 1 11.32-11.32l24 24a8 8 0 0 1 0 11.32l-24 24a8 8 0 0 1-11.32-11.32L124.69 80Zm-64 24a8 8 0 0 1 0-11.32l24-24a8 8 0 0 1 11.32 11.32L59.31 80l18.35 18.34a8 8 0 0 1-11.32 11.32ZM200 200H56v-64h96a16 16 0 0 0 16-16V56h32Z"})})};w.forwardRef(A_);const R_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26 10H4a1 1 0 0 0-1 1v6a12.04 12.04 0 0 0 4.068 9H4a1 1 0 0 0 0 2h22a1 1 0 0 0 0-2h-3.067a12.1 12.1 0 0 0 3.375-5.011A5 5 0 0 0 31 16v-1a5 5 0 0 0-5-5m3 6a3 3 0 0 1-2.15 2.875Q27 17.944 27 17v-4.828A3 3 0 0 1 29 15zM14 7V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0m4 0V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0m-8 0V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0"})})};w.forwardRef(R_);const k_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29.743 13.401a1 1 0 0 0-.487-.675l-3.729-2.125-.015-4.202a1 1 0 0 0-.353-.76 14 14 0 0 0-4.59-2.584 1 1 0 0 0-.808.074L16 5.23l-3.765-2.106a1 1 0 0 0-.809-.075 14 14 0 0 0-4.585 2.594 1 1 0 0 0-.354.758L6.47 10.61 2.74 12.734a1 1 0 0 0-.486.675 13.3 13.3 0 0 0 0 5.195 1 1 0 0 0 .486.675l3.729 2.125.015 4.204a1 1 0 0 0 .353.76 14 14 0 0 0 4.59 2.583 1 1 0 0 0 .808-.073L16 26.768l3.765 2.107a1.013 1.013 0 0 0 .809.073 14 14 0 0 0 4.585-2.592 1 1 0 0 0 .354-.759l.018-4.206 3.729-2.125a1 1 0 0 0 .486-.675c.34-1.713.338-3.477-.003-5.19M16 21a5 5 0 1 1 0-10 5 5 0 0 1 0 10"})})};w.forwardRef(k_);const T_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M18.5 12V6a1.5 1.5 0 1 1 3 0v4.5H26a1.5 1.5 0 1 1 0 3h-6a1.5 1.5 0 0 1-1.5-1.5M12 18.5H6a1.5 1.5 0 1 0 0 3h4.5V26a1.5 1.5 0 1 0 3 0v-6a1.5 1.5 0 0 0-1.5-1.5m14 0h-6a1.5 1.5 0 0 0-1.5 1.5v6a1.5 1.5 0 1 0 3 0v-4.5H26a1.5 1.5 0 1 0 0-3m-14-14A1.5 1.5 0 0 0 10.5 6v4.5H6a1.5 1.5 0 1 0 0 3h6a1.5 1.5 0 0 0 1.5-1.5V6A1.5 1.5 0 0 0 12 4.5"})})},E_=w.forwardRef(T_),M_=E_,O_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M22.5 17.5h-2v-3h2a5 5 0 1 0-5-5v2h-3v-2a5 5 0 1 0-5 5h2v3h-2a5 5 0 1 0 5 5v-2h3v2a5 5 0 1 0 5-5m-2-8a2 2 0 1 1 2 2h-2zm-13 0a2 2 0 0 1 4 0v2h-2a2 2 0 0 1-2-2m4 13a2 2 0 1 1-2-2h2zm3-8h3v3h-3zm8 10a2 2 0 0 1-2-2v-2h2a2 2 0 0 1 0 4"})})};w.forwardRef(O_);const D_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30.5 24a1.5 1.5 0 0 1-1.5 1.5h-3.5V29a1.5 1.5 0 1 1-3 0v-3.5H8A1.5 1.5 0 0 1 6.5 24V9.5H3a1.5 1.5 0 0 1 0-3h3.5V3a1.5 1.5 0 0 1 3 0v19.5H29a1.5 1.5 0 0 1 1.5 1.5M13 9.5h9.5V19a1.5 1.5 0 1 0 3 0V8A1.5 1.5 0 0 0 24 6.5H13a1.5 1.5 0 0 0 0 3"})})};w.forwardRef(D_);const I_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26.061 23.939a1.503 1.503 0 0 1-2.125 2.125L16 18.125l-7.939 7.936a1.503 1.503 0 1 1-2.125-2.125L13.875 16 5.939 8.061a1.503 1.503 0 1 1 2.125-2.125L16 13.875l7.939-7.94a1.502 1.502 0 1 1 2.125 2.125L18.125 16z"})})},__=w.forwardRef(I_),Hi=__,L_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m4.708 16.293a1 1 0 0 1-1.415 1.415L16 17.414l-3.293 3.293a1 1 0 0 1-1.415-1.415L14.587 16l-3.293-3.293a1 1 0 1 1 1.415-1.415L16 14.587l3.293-3.293a1 1 0 0 1 1.415 1.415L17.414 16z"})})};w.forwardRef(L_);const B_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30.48 9.524a1.51 1.51 0 0 0-1.668-.213l-6.276 3.125-5.24-8.704a1.514 1.514 0 0 0-2.592 0l-5.24 8.708L3.19 9.315a1.514 1.514 0 0 0-2.113 1.825l4.625 14.17a1 1 0 0 0 1.46.55C7.194 25.841 10.39 24 16 24s8.806 1.841 8.835 1.859a1 1 0 0 0 1.464-.549l4.625-14.166a1.51 1.51 0 0 0-.444-1.62M21.98 19.6a1 1 0 0 1-1.159.811 28.5 28.5 0 0 0-9.652 0 1 1 0 0 1-.348-1.97 30.6 30.6 0 0 1 10.348 0 1 1 0 0 1 .816 1.159z"})})};w.forwardRef(B_);const N_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27.414 24a2 2 0 0 1 0 2.829l-.585.585a2 2 0 0 1-2.829 0l-6.906-6.905-2.735 6.292A1.98 1.98 0 0 1 12.533 28h-.098a1.98 1.98 0 0 1-1.801-1.375L4.1 6.615A1.994 1.994 0 0 1 6.615 4.1l20.01 6.534a2 2 0 0 1 .176 3.725l-6.292 2.735z"})})};w.forwardRef(N_);const j_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3C9.271 3 4 6.075 4 10v12c0 3.925 5.271 7 12 7s12-3.075 12-7V10c0-3.925-5.271-7-12-7m10 13c0 1.203-.985 2.429-2.701 3.365C21.366 20.419 18.774 21 16 21s-5.366-.581-7.299-1.635C6.985 18.429 6 17.203 6 16v-2.08C8.133 15.795 11.779 17 16 17s7.868-1.21 10-3.08zm-2.701 9.365C21.366 26.419 18.774 27 16 27s-5.366-.581-7.299-1.635C6.985 24.429 6 23.203 6 22v-2.08C8.133 21.795 11.779 23 16 23s7.868-1.21 10-3.08V22c0 1.203-.985 2.429-2.701 3.365"})})};w.forwardRef(j_);const F_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29 12a2 2 0 0 0-2-2h-4V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16a1 1 0 0 0 1.625.777L9 19.25V23a2 2 0 0 0 2 2h11.699l4.676 3.778A1 1 0 0 0 29 28zm-5.319 11.223a1 1 0 0 0-.625-.223H11v-4h10a2 2 0 0 0 2-2v-5h4v13.906z"})})};w.forwardRef(F_);const V_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 19v7a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 26v-7a1.5 1.5 0 0 1 3 0v6.5h19V19a1.5 1.5 0 1 1 3 0m-13.561 1.061a1.5 1.5 0 0 0 2.125 0l5-5a1.502 1.502 0 1 0-2.125-2.125L17.5 15.375V5a1.5 1.5 0 1 0-3 0v10.375l-2.439-2.436a1.502 1.502 0 1 0-2.125 2.125z"})})};w.forwardRef(V_);const H_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M13.5 7.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0m7 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4m-9 4.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-9 8.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})};w.forwardRef(H_);const P_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 4H11a1 1 0 0 0-1 1v5H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-5h5a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1m-1 16h-4v-9a1 1 0 0 0-1-1h-9V6h14z"})})};w.forwardRef(P_);const W_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m11 13c.001 1.411-.27 2.81-.8 4.118l-5.587-3.437a2 2 0 0 0-.78-.279l-2.853-.385a2.01 2.01 0 0 0-2 .983h-1.09l-.475-.983a1.99 1.99 0 0 0-1.375-1.083l-1-.216.978-1.718h2.088c.338 0 .67-.087.966-.25l1.532-.845q.202-.113.375-.268l3.364-3.042a1.99 1.99 0 0 0 .407-2.458l-.045-.08A11.01 11.01 0 0 1 27 16M5 16a10.94 10.94 0 0 1 1.068-4.725l1.417 3.784a2 2 0 0 0 1.453 1.25l2.678.576.476.99a2.01 2.01 0 0 0 1.8 1.125h.186l-.904 2.029a2 2 0 0 0 .357 2.171l.018.018L16 25.742l-.242 1.25A11.014 11.014 0 0 1 5 16"})})};w.forwardRef(W_);const z_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:[m.jsx("path",{d:"M20.689 3.88A13 13 0 0 0 16 3a13 13 0 0 0-8.155 23.124l1.02-1.765A11 11 0 0 1 5 16a10.94 10.94 0 0 1 1.068-4.724l1.417 3.784a2 2 0 0 0 1.453 1.25l2.678.576.476.99q.113.226.275.418l1.169-2.025-.121-.25a1.99 1.99 0 0 0-1.375-1.084l-1-.217.978-1.717h2.088c.338 0 .67-.087.966-.25l.726-.4z"}),m.jsx("path",{fillRule:"evenodd",d:"m24 2.144 1.732 1-1.58 2.736q.54.435 1.036.932A13.01 13.01 0 0 1 29 16a13 13 0 0 1-17.69 12.124l-1.578 2.732-1.732-1zm-.86 5.49-4.936 8.549 1.628.22c.277.037.543.132.78.278l5.588 3.436c.53-1.308.801-2.706.8-4.117a11.01 11.01 0 0 0-3.86-8.367M13.92 23.6l-1.593 2.76a11 11 0 0 0 3.43.631l.242-1.25z",clipRule:"evenodd"})]})};w.forwardRef(z_);const U_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-4.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m10.365 7.5C20.579 21.724 18.441 23 16 23s-4.579-1.275-5.865-3.5a1.001 1.001 0 0 1 1.477-1.31q.157.129.253.31C12.799 20.114 14.266 21 16 21s3.201-.887 4.135-2.5a1 1 0 1 1 1.73 1M20.5 15a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};w.forwardRef(U_);const q_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-4.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m10 10.865a1 1 0 0 1-1.365-.365C19.201 20.886 17.734 20 16 20s-3.201.887-4.135 2.5a1.001 1.001 0 1 1-1.73-1C11.421 19.276 13.559 18 16 18s4.579 1.275 5.865 3.5a1 1 0 0 1-.365 1.365M20.5 15a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};w.forwardRef(q_);const K_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27.5 6v5a1.5 1.5 0 1 1-3 0V7.5H21a1.5 1.5 0 0 1 0-3h5A1.5 1.5 0 0 1 27.5 6M11 24.5H7.5V21a1.5 1.5 0 0 0-3 0v5A1.5 1.5 0 0 0 6 27.5h5a1.5 1.5 0 1 0 0-3m15-5a1.5 1.5 0 0 0-1.5 1.5v3.5H21a1.5 1.5 0 1 0 0 3h5a1.5 1.5 0 0 0 1.5-1.5v-5a1.5 1.5 0 0 0-1.5-1.5m-15-15H6A1.5 1.5 0 0 0 4.5 6v5a1.5 1.5 0 0 0 3 0V7.5H11a1.5 1.5 0 0 0 0-3"})})},G_=w.forwardRef(K_),Y_=G_,X_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 13a1.5 1.5 0 1 1-3 0V8.625l-7.439 7.439a1.503 1.503 0 1 1-2.125-2.125L23.375 6.5H19a1.5 1.5 0 0 1 0-3h8A1.5 1.5 0 0 1 28.5 5zM23 16a1.5 1.5 0 0 0-1.5 1.5v8h-15v-15h8a1.5 1.5 0 1 0 0-3H6A2.5 2.5 0 0 0 3.5 10v16A2.5 2.5 0 0 0 6 28.5h16a2.5 2.5 0 0 0 2.5-2.5v-8.5A1.5 1.5 0 0 0 23 16"})})},Q_=w.forwardRef(X_),Z_=Q_,J_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30.914 15.595c-.044-.099-1.103-2.447-3.457-4.801C24.322 7.657 20.36 6 16 6S7.679 7.657 4.542 10.794C2.19 13.148 1.125 15.5 1.086 15.595a1 1 0 0 0 0 .812c.044.1 1.103 2.447 3.456 4.8C7.68 24.344 11.64 26 16 26s8.321-1.657 11.458-4.792c2.353-2.354 3.412-4.702 3.456-4.8a1 1 0 0 0 0-.813M16 21a5 5 0 1 1 0-10 5 5 0 0 1 0 10"})})},eL=w.forwardRef(J_),tL=eL,nL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M6.74 4.328a1 1 0 1 0-1.48 1.345l2.405 2.646c-4.54 2.786-6.493 7.081-6.579 7.276a1 1 0 0 0 0 .813c.044.098 1.103 2.446 3.456 4.8C7.68 24.343 11.64 26 16 26c2.24.013 4.459-.448 6.509-1.354l2.75 3.027a1 1 0 1 0 1.48-1.345zm11.125 15.21a4 4 0 0 1-5.209-5.73zm13.049-3.13c-.053.117-1.319 2.92-4.17 5.475a1 1 0 0 1-1.408-.072L12.675 7.884a1 1 0 0 1 .575-1.66A17 17 0 0 1 16 6c4.36 0 8.321 1.658 11.458 4.794 2.353 2.354 3.412 4.702 3.456 4.801a1 1 0 0 1 0 .813"})})};w.forwardRef(nL);const rL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M17 15v12a1 1 0 0 1-2 0V15a1 1 0 0 1 2 0m8 9a1 1 0 0 0-1 1v2a1 1 0 0 0 2 0v-2a1 1 0 0 0-1-1m3-6h-2V5a1 1 0 0 0-2 0v13h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1M7 20a1 1 0 0 0-1 1v6a1 1 0 1 0 2 0v-6a1 1 0 0 0-1-1m3-6H8V5a1 1 0 0 0-2 0v9H4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1m9-6h-2V5a1 1 0 0 0-2 0v3h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1"})})};w.forwardRef(rL);const iL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m26.48 16.851-7.474 7.559a1.97 1.97 0 0 1-1.4.585H9.415l-3.707 3.712a1.001 1.001 0 0 1-1.415-1.415l2.823-2.822L15.588 16h10.537a.5.5 0 0 1 .355.851m.607-13.03a8 8 0 0 0-10.737.518l-1.2 1.185a.5.5 0 0 0-.15.351v7.875l6.875-6.875a1 1 0 0 1 1.414 1.414L17.589 14h11.047a.5.5 0 0 0 .445-.27 8.01 8.01 0 0 0-1.994-9.909M7.854 20.904 13 15.758V8.845a.5.5 0 0 0-.851-.355L7.586 13A1.99 1.99 0 0 0 7 14.414v6.136a.5.5 0 0 0 .854.354"})})};w.forwardRef(iL);const oL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m26.708 10.293-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V11a1 1 0 0 0-.293-.707M19 11V5.5l5.5 5.5z"})})};w.forwardRef(oL);const sL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m213.66 82.34-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44ZM48 180c0 11 7.18 20 16 20a14.18 14.18 0 0 0 10.06-4.5 8.21 8.21 0 0 1 10.9-.91 8 8 0 0 1 .82 11.81A30.06 30.06 0 0 1 64 216c-17.64 0-32-16.15-32-36s14.36-36 32-36a30 30 0 0 1 21.39 9.19 8.26 8.26 0 0 1 .73 11.09 8 8 0 0 1-11.9.38A14.17 14.17 0 0 0 64 160c-8.82 0-16 9-16 20m103.81 16.31a20.82 20.82 0 0 1-9.19 15.23C137.43 215 131 216 125.13 216a61.1 61.1 0 0 1-15.13-2 8 8 0 1 1 4.3-15.41c4.38 1.2 14.95 2.7 19.55-.36.88-.59 1.83-1.52 2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56 20.56 0 0 1 9-14.95c11.84-8 30.71-3.31 32.83-2.76a8 8 0 0 1-4.07 15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54 4.54 0 0 0-2 3.67c-.12.9-.14 1.09 1.11 1.9 2.31 1.49 6.45 2.68 10.45 3.84 9.79 2.83 26.35 7.66 24.11 24.97M215.42 155l-19.89 55.68a8 8 0 0 1-15.06 0L160.58 155a8.21 8.21 0 0 1 4.5-10.45 8 8 0 0 1 10.45 4.76l12.47 34.9 12.47-34.9a8 8 0 0 1 10.45-4.76 8.23 8.23 0 0 1 4.5 10.45"})})};w.forwardRef(sL);const aL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m26.708 10.293-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V11a1 1 0 0 0-.293-.707m-7 11a1 1 0 0 1-1.415 1.415L16 20.414l-2.293 2.293a1 1 0 0 1-1.415-1.415L14.587 19l-2.293-2.293a1 1 0 1 1 1.415-1.415L16 17.587l2.293-2.293a1 1 0 0 1 1.415 1.415L17.414 19zM19 11V5.5l5.5 5.5z"})})};w.forwardRef(aL);const lL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M6 15h20a1 1 0 0 0 1-1v-3a1 1 0 0 0-.293-.707l-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v9a1 1 0 0 0 1 1m13-9.5 5.5 5.5H19zM28 19a1 1 0 0 1-1 1h-3v2h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1M8 18H6a1 1 0 0 0-1 1v7a1 1 0 1 0 2 0v-1h1a3.5 3.5 0 1 0 0-7m0 5H7v-3h1a1.5 1.5 0 1 1 0 3m8-5h-2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2a4.5 4.5 0 1 0 0-9m0 7h-1v-5h1a2.5 2.5 0 0 1 0 5"})})};w.forwardRef(lL);const cL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M44 120h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4m108-76 44 44h-44Zm4 164.53a8.18 8.18 0 0 1-8.25 7.47H120a8 8 0 0 1-8-8v-55.73a8.18 8.18 0 0 1 7.47-8.25 8 8 0 0 1 8.53 8v48h20a8 8 0 0 1 8 8.51m-61.49-51.88L77.83 180l16.68 23.35a8 8 0 0 1-13 9.3L68 193.76l-13.49 18.89a8 8 0 1 1-13-9.3L58.17 180l-16.68-23.35a8 8 0 0 1 2.3-11.46 8.19 8.19 0 0 1 10.88 2.38L68 166.24l13.49-18.89a8 8 0 0 1 13 9.3Zm121.28 39.66a20.81 20.81 0 0 1-9.18 15.23c-5.19 3.46-11.67 4.46-17.49 4.46a60.6 60.6 0 0 1-15.19-2 8 8 0 0 1 4.31-15.41c4.38 1.21 14.94 2.71 19.54-.35.89-.6 1.84-1.52 2.15-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58 20.58 0 0 1 8.95-14.94c11.84-8 30.72-3.31 32.83-2.76a8 8 0 0 1-4.07 15.48c-4.48-1.17-15.22-2.56-19.82.56a4.54 4.54 0 0 0-2 3.67c-.11.9-.13 1.08 1.12 1.9 2.31 1.49 6.45 2.68 10.45 3.84 9.87 2.82 26.39 7.65 24.18 24.96"})})};w.forwardRef(cL);const uL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M184 144h-16a8 8 0 0 0-8 8v55.73a8.17 8.17 0 0 0 7.47 8.25 8 8 0 0 0 8.53-8v-8h7.4c15.24 0 28.14-11.92 28.59-27.15A28 28 0 0 0 184 144m-.35 40H176v-24h8a12 12 0 0 1 12 13.16A12.25 12.25 0 0 1 183.65 184M136 152v55.73a8.17 8.17 0 0 1-7.47 8.25 8 8 0 0 1-8.53-8v-55.71a8.17 8.17 0 0 1 7.47-8.25A8 8 0 0 1 136 152m-40 56.53a8.17 8.17 0 0 1-8.27 7.47h-31.5a8.27 8.27 0 0 1-6-2.5 8 8 0 0 1-1.18-9.5l25.16-44H56.27a8.17 8.17 0 0 1-8.27-7.47 8 8 0 0 1 8-8.53h31.77a8.27 8.27 0 0 1 6 2.5A8 8 0 0 1 95 156l-25.21 44H88a8 8 0 0 1 8 8.53M213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44Z"})})};w.forwardRef(uL);const fL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M25.5 16a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 1 1 0-3h16a1.5 1.5 0 0 1 1.5 1.5M29 8.5H3a1.5 1.5 0 0 0 0 3h26a1.5 1.5 0 1 0 0-3m-10 12h-6a1.5 1.5 0 1 0 0 3h6a1.5 1.5 0 1 0 0-3"})})};w.forwardRef(fL);const hL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 9H16.414L13 5.586A1.98 1.98 0 0 0 11.586 5H5a2 2 0 0 0-2 2v18.078A1.926 1.926 0 0 0 4.924 27H27.11A1.89 1.89 0 0 0 29 25.111V11a2 2 0 0 0-2-2M5 7h6.586l2 2H5z"})})};w.forwardRef(hL);const dL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 9h-4.385q.075-.06.146-.125A3.7 3.7 0 0 0 24 6.196 4.08 4.08 0 0 0 19.805 2a3.7 3.7 0 0 0-2.68 1.239A6.9 6.9 0 0 0 16 5.049a6.9 6.9 0 0 0-1.125-1.81A3.7 3.7 0 0 0 12.195 2 4.08 4.08 0 0 0 8 6.196a3.7 3.7 0 0 0 1.239 2.679q.072.06.146.125H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2v8a2 2 0 0 0 2 2h7.5a.5.5 0 0 0 .5-.5V15H5v-4h10v4h2v-4h10v4H17v11.5a.5.5 0 0 0 .5.5H25a2 2 0 0 0 2-2v-8a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M10.564 7.375A1.7 1.7 0 0 1 10 6.125 2.076 2.076 0 0 1 12.074 4h.061a1.71 1.71 0 0 1 1.25.563c1.049 1.185 1.419 3.15 1.549 4.365-1.22-.13-3.184-.5-4.37-1.553m10.875 0c-1.186 1.05-3.155 1.42-4.375 1.55.148-1.314.561-3.237 1.561-4.361A1.7 1.7 0 0 1 19.875 4h.061A2.077 2.077 0 0 1 22 6.135a1.7 1.7 0 0 1-.564 1.24z"})})};w.forwardRef(dL);const gL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m9.796 8h-4.428a17.8 17.8 0 0 0-2.533-5.625A11.05 11.05 0 0 1 25.796 11M16 5.014c1.5 1.625 2.625 3.693 3.296 5.986h-6.592C13.375 8.707 14.5 6.641 16 5.014M12 16c0-1.005.084-2.009.25-3h7.5a18.2 18.2 0 0 1 0 6h-7.5a18 18 0 0 1-.25-3m.704 5h6.592c-.671 2.293-1.796 4.359-3.296 5.986-1.5-1.627-2.625-3.693-3.296-5.986m6.131 5.625A17.8 17.8 0 0 0 21.367 21h4.43a11.05 11.05 0 0 1-6.962 5.625M21.776 19a20.2 20.2 0 0 0 0-6h4.808a11 11 0 0 1 0 6z"})})};w.forwardRef(gL);const pL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M13.29 28.226 6.765 24.46a2.822 2.822 0 1 1-2.708-4.693v-7.532a2.824 2.824 0 1 1 2.708-4.693l6.525-3.767a2.824 2.824 0 1 1 5.42 0l6.524 3.766a2.822 2.822 0 1 1 2.71 4.693v7.533a2.824 2.824 0 1 1-2.71 4.694l-6.524 3.766A2.825 2.825 0 0 1 16 31.84a2.822 2.822 0 0 1-2.71-3.614M16 5.806q.413-.002.791-.113l8.531 14.776a2.8 2.8 0 0 0-.791 1.37H7.467a2.8 2.8 0 0 0-.79-1.369L15.21 5.693q.377.11.791.112M7.468 23.178l-.033.12 6.526 3.767A2.81 2.81 0 0 1 16 26.195c.802 0 1.526.334 2.04.871l6.523-3.766-.032-.121zM5.397 12.233a2.824 2.824 0 0 0 2.038-3.532l6.526-3.767q.043.045.088.088L5.517 19.8l-.12-.032zM26.482 19.8q.06-.018.121-.033v-7.532a2.824 2.824 0 0 1-2.04-3.534L18.04 4.934q-.045.045-.089.088z",clipRule:"evenodd"})})};w.forwardRef(pL);const mL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 7v7.5a.5.5 0 0 1-.5.5H17V5.5a.5.5 0 0 1 .5-.5H25a2 2 0 0 1 2 2M14.5 5H7a2 2 0 0 0-2 2v7.5a.5.5 0 0 0 .5.5H15V5.5a.5.5 0 0 0-.5-.5m12 12H17v9.5a.5.5 0 0 0 .5.5H25a2 2 0 0 0 2-2v-7.5a.5.5 0 0 0-.5-.5M5 17.5V25a2 2 0 0 0 2 2h7.5a.5.5 0 0 0 .5-.5V17H5.5a.5.5 0 0 0-.5.5"})})};w.forwardRef(mL);const bL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M10.5 6.5v5h-7A.5.5 0 0 1 3 11V8a2 2 0 0 1 2-2h5a.5.5 0 0 1 .5.5m2 19a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-5h-7zM3 21v3a2 2 0 0 0 2 2h5a.5.5 0 0 0 .5-.5v-5h-7a.5.5 0 0 0-.5.5m0-7v4a.5.5 0 0 0 .5.5h7v-5h-7a.5.5 0 0 0-.5.5m16-8h-6a.5.5 0 0 0-.5.5v5h7v-5A.5.5 0 0 0 19 6m9.5 7.5h-7v5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5m-16 5h7v-5h-7zM27 6h-5a.5.5 0 0 0-.5.5v5h7a.5.5 0 0 0 .5-.5V8a2 2 0 0 0-2-2m1.5 14.5h-7v5a.5.5 0 0 0 .5.5h5a2 2 0 0 0 2-2v-3a.5.5 0 0 0-.5-.5"})})};w.forwardRef(bL);const wL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.791 17.633a3.04 3.04 0 0 0-2.326-.597C28.813 14.666 30 12.31 30 10c0-3.309-2.661-6-5.933-6A5.95 5.95 0 0 0 19.5 6.094 5.95 5.95 0 0 0 14.932 4C11.663 4 9 6.691 9 10c0 1.375.405 2.711 1.258 4.125a4 4 0 0 0-1.844 1.05L5.586 18H2a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h13q.123 0 .242-.03l8-2a1 1 0 0 0 .15-.05l4.858-2.067.055-.025a3.074 3.074 0 0 0 .491-5.195zm-1.362 3.393-4.75 2.023L14.875 25H7v-5.586l2.829-2.828A1.98 1.98 0 0 1 11.242 16H17.5a1.5 1.5 0 0 1 0 3H14a1 1 0 0 0 0 2h4q.113 0 .224-.025l8.375-1.926.038-.01a1.075 1.075 0 0 1 .788 1.987z"})})};w.forwardRef(wL);const xL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28 10.5h-5.475l.951-5.231a1.5 1.5 0 1 0-2.952-.538L19.475 10.5h-4.95l.951-5.231a1.5 1.5 0 1 0-2.952-.538L11.475 10.5H6a1.5 1.5 0 0 0 0 3h4.93l-.909 5H4a1.5 1.5 0 0 0 0 3h5.475l-.951 5.231a1.5 1.5 0 0 0 1.207 1.75q.134.022.269.019a1.5 1.5 0 0 0 1.475-1.233l1.05-5.767h4.95l-.951 5.231a1.5 1.5 0 1 0 2.952.543l1.049-5.774H26a1.5 1.5 0 1 0 0-3h-4.93l.909-5H28a1.5 1.5 0 1 0 0-3m-9.979 8H13.07l.909-5h4.951z"})})};w.forwardRef(xL);const vL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M31.5 22.5a5 5 0 0 1-5 5 4.94 4.94 0 0 1-3.571-1.45 1.5 1.5 0 0 1 2.142-2.1 1.94 1.94 0 0 0 1.429.55 2 2 0 0 0 0-4 1.94 1.94 0 0 0-1.429.55 1.5 1.5 0 0 1-2.551-1.3l1-6A1.5 1.5 0 0 1 25 12.5h5a1.5 1.5 0 1 1 0 3h-3.729l-.338 2.029q.283-.03.567-.029a5 5 0 0 1 5 5M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};w.forwardRef(vL);const yL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M32 22a1.5 1.5 0 0 1-1.5 1.5V26a1.5 1.5 0 1 1-3 0v-2.5H23a1.5 1.5 0 0 1-1.422-1.974l3-9a1.5 1.5 0 0 1 2.845.948L25.08 20.5H27.5V18a1.5 1.5 0 1 1 3 0v2.5A1.5 1.5 0 0 1 32 22M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};w.forwardRef(yL);const CL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29.5 14v12a1.5 1.5 0 1 1-3 0v-9.198l-.668.448a1.503 1.503 0 0 1-1.665-2.5l3-2A1.5 1.5 0 0 1 29.5 14M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};w.forwardRef(CL);const $L=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m27.133 17.541 1.655-2.772a1.5 1.5 0 1 0-2.576-1.538l-4.03 6.75q-.018.029-.032.059a5 5 0 1 0 4.983-2.5zM26.5 24.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4M19.5 7v15a1.5 1.5 0 1 1-3 0v-6h-10v6a1.5 1.5 0 0 1-3 0V7a1.5 1.5 0 0 1 3 0v6h10V7a1.5 1.5 0 1 1 3 0"})})};w.forwardRef($L);const SL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M31.5 22.5a5 5 0 0 1-8.571 3.5 1.5 1.5 0 1 1 2.142-2.099A2 2 0 1 0 26.5 20.5a1.5 1.5 0 0 1-1.229-2.36l1.854-2.64H24a1.5 1.5 0 1 1 0-3h6a1.5 1.5 0 0 1 1.229 2.36l-2.293 3.275A5 5 0 0 1 31.5 22.5M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};w.forwardRef(SL);const AL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M19.5 7v15a1.5 1.5 0 1 1-3 0v-6h-10v6a1.5 1.5 0 0 1-3 0V7a1.5 1.5 0 0 1 3 0v6h10V7a1.5 1.5 0 1 1 3 0M30 24.5h-3l3.593-4.791a4.499 4.499 0 1 0-7.837-4.209 1.5 1.5 0 1 0 2.829 1q.076-.218.216-.402a1.5 1.5 0 1 1 2.394 1.807L22.8 25.1a1.5 1.5 0 0 0 1.2 2.4h6a1.5 1.5 0 1 0 0-3"})})};w.forwardRef(AL);const RL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29 17v7a3 3 0 0 1-3 3h-2a3 3 0 0 1-3-3v-5a3 3 0 0 1 3-3h2.956A10.964 10.964 0 0 0 16.081 6H16A11 11 0 0 0 5.045 16H8a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-7a13.014 13.014 0 0 1 22.236-9.167A12.93 12.93 0 0 1 29 17"})})};w.forwardRef(RL);const kL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30 11.75c0 8.75-12.974 15.833-13.526 16.125a1 1 0 0 1-.948 0C14.974 27.582 2 20.5 2 11.75A7.76 7.76 0 0 1 9.75 4c2.581 0 4.841 1.11 6.25 2.986C17.409 5.11 19.669 4 22.25 4A7.76 7.76 0 0 1 30 11.75"})})};w.forwardRef(kL);const TL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28 14.444V26a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V14.444a2 2 0 0 1 .646-1.473l10-9.435.014-.013a2 2 0 0 1 2.705.013l10 9.435A2 2 0 0 1 28 14.444"})})};w.forwardRef(TL);const EL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-7.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M5 25v-3.5l6.5-6.5 10 10zm22 0h-2.671l-4.5-4.5 2.5-2.5L27 22.672z"})})};w.forwardRef(EL);const ML=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 5H9a2 2 0 0 0-2 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-2h2a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M23 25H5V11h2v10a2 2 0 0 0 2 2h14zm4-4H9v-4.5l4.5-4.5 6.208 6.208a1 1 0 0 0 1.413 0L24.33 15 27 17.672z"})})};w.forwardRef(ML);const OL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H15a1.5 1.5 0 0 1 0-3h12a1.5 1.5 0 0 1 1.5 1.5M15 9.5h12a1.5 1.5 0 0 0 0-3H15a1.5 1.5 0 0 0 0 3m12 13H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 0 0 0-3m-18-4a1.5 1.5 0 0 0 1.061-2.561L6.125 12l3.936-3.94a1.503 1.503 0 1 0-2.125-2.125l-5 5a1.5 1.5 0 0 0 0 2.125l5 5A1.5 1.5 0 0 0 9 18.5"})})};w.forwardRef(OL);const DL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H15a1.5 1.5 0 0 1 0-3h12a1.5 1.5 0 0 1 1.5 1.5M15 9.5h12a1.5 1.5 0 0 0 0-3H15a1.5 1.5 0 0 0 0 3m12 13H5a1.5 1.5 0 0 0 0 3h22a1.5 1.5 0 1 0 0-3M3.939 18.06a1.5 1.5 0 0 0 2.125 0l5-5a1.5 1.5 0 0 0 0-2.125l-5-5a1.503 1.503 0 0 0-2.125 2.125L7.875 12l-3.936 3.939a1.5 1.5 0 0 0 0 2.122"})})};w.forwardRef(DL);const IL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M17 23a2 2 0 0 1-2-2v-5a1 1 0 0 1 0-2 2 2 0 0 1 2 2v5a1 1 0 0 1 0 2"})})},_L=w.forwardRef(IL),LL=_L,BL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M25.5 7A1.5 1.5 0 0 1 24 8.5h-3.919l-5 15H18a1.5 1.5 0 1 1 0 3H8a1.5 1.5 0 1 1 0-3h3.919l5-15H14a1.5 1.5 0 0 1 0-3h10A1.5 1.5 0 0 1 25.5 7"})})},NL=w.forwardRef(BL),jL=NL,FL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M20 2a10.01 10.01 0 0 0-9.511 13.098l-7.196 7.195A1 1 0 0 0 3 23v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-2h2a1 1 0 0 0 1-1v-2h2a1 1 0 0 0 .707-.293l1.195-1.196A10 10 0 1 0 20 2m2.5 9.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4"})})};w.forwardRef(FL);const VL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M5 7h22v5H5zm22 18H14V14h13z"})})};w.forwardRef(VL);const HL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M22 29a1 1 0 0 1-1 1H11a1 1 0 1 1 0-2h10a1 1 0 0 1 1 1m5-16a10.94 10.94 0 0 1-4.205 8.651A2.03 2.03 0 0 0 22 23.25V24a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-.75a2 2 0 0 0-.779-1.582A10.95 10.95 0 0 1 5 13.06C4.967 7.104 9.782 2.143 15.735 2A11 11 0 0 1 27 13m-4.014-1.168a7.2 7.2 0 0 0-5.82-5.818 1 1 0 1 0-.332 1.972c2.071.349 3.829 2.106 4.18 4.182a1 1 0 0 0 1.972-.335"})})};w.forwardRef(HL);const PL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m21.731 14.683-14 15a1 1 0 0 1-1.711-.875l1.832-9.167L.65 16.936a1 1 0 0 1-.375-1.625l14-15a1 1 0 0 1 1.71.875l-1.837 9.177 7.204 2.7a1 1 0 0 1 .375 1.62z"})})};w.forwardRef(PL);const WL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M17.046 23.441a1.5 1.5 0 0 1 0 2.125l-.742.743a7.502 7.502 0 1 1-10.61-10.61l3.015-3.014A7.5 7.5 0 0 1 19 12.375a1.506 1.506 0 0 1-2 2.25 4.5 4.5 0 0 0-6.171.184l-3.013 3.01a4.5 4.5 0 0 0 6.365 6.365l.743-.743a1.5 1.5 0 0 1 2.122 0m9.26-17.75a7.51 7.51 0 0 0-10.61 0l-.742.743a1.503 1.503 0 1 0 2.125 2.125l.742-.743a4.5 4.5 0 0 1 6.365 6.365l-3.014 3.015a4.5 4.5 0 0 1-6.172.179 1.506 1.506 0 1 0-2 2.25 7.5 7.5 0 0 0 10.288-.304l3.014-3.014a7.51 7.51 0 0 0 .004-10.613z"})})},zL=w.forwardRef(WL),UL=zL,qL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5M5 9.5h22a1.5 1.5 0 0 0 0-3H5a1.5 1.5 0 0 0 0 3m22 13H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 1 0 0-3"})})};w.forwardRef(qL);const KL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M3.5 8A1.5 1.5 0 0 1 5 6.5h22a1.5 1.5 0 0 1 0 3H5A1.5 1.5 0 0 1 3.5 8M5 17.5h22a1.5 1.5 0 1 0 0-3H5a1.5 1.5 0 1 0 0 3m13 5H5a1.5 1.5 0 1 0 0 3h13a1.5 1.5 0 1 0 0-3m11 0h-1.5V21a1.5 1.5 0 1 0-3 0v1.5H23a1.5 1.5 0 1 0 0 3h1.5V27a1.5 1.5 0 1 0 3 0v-1.5H29a1.5 1.5 0 1 0 0-3"})})};w.forwardRef(KL);const GL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M17.5 4v4a1.5 1.5 0 1 1-3 0V4a1.5 1.5 0 1 1 3 0m4.156 7.844a1.5 1.5 0 0 0 1.062-.44l2.828-2.829a1.503 1.503 0 1 0-2.125-2.125l-2.825 2.833a1.5 1.5 0 0 0 1.06 2.56M28 14.5h-4a1.5 1.5 0 1 0 0 3h4a1.5 1.5 0 1 0 0-3m-5.282 6.096a1.501 1.501 0 0 0-2.451 1.638c.075.182.186.348.326.487l2.828 2.829a1.503 1.503 0 0 0 2.125-2.125zM16 22.5a1.5 1.5 0 0 0-1.5 1.5v4a1.5 1.5 0 1 0 3 0v-4a1.5 1.5 0 0 0-1.5-1.5m-6.717-1.904-2.83 2.829A1.503 1.503 0 0 0 8.58 25.55l2.829-2.829a1.503 1.503 0 0 0-2.125-2.125M9.5 16A1.5 1.5 0 0 0 8 14.5H4a1.5 1.5 0 1 0 0 3h4A1.5 1.5 0 0 0 9.5 16m-.925-9.546A1.503 1.503 0 0 0 6.45 8.579l2.833 2.825a1.503 1.503 0 0 0 2.125-2.125z"})})},YL=w.forwardRef(GL),V3=YL,XL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26 10h-4V7a6 6 0 1 0-12 0v3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V12a2 2 0 0 0-2-2M16 20.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M20 10h-8V7a4 4 0 1 1 8 0z"})})};w.forwardRef(XL);const QL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M31 19a1 1 0 0 1-1 1h-2v2a1 1 0 0 1-2 0v-2h-2a1 1 0 0 1 0-2h2v-2a1 1 0 1 1 2 0v2h2a1 1 0 0 1 1 1M7 9h2v2a1 1 0 1 0 2 0V9h2a1 1 0 0 0 0-2h-2V5a1 1 0 0 0-2 0v2H7a1 1 0 0 0 0 2m16 15h-1v-1a1 1 0 0 0-2 0v1h-1a1 1 0 0 0 0 2h1v1a1 1 0 1 0 2 0v-1h1a1 1 0 0 0 0-2m4.414-14L10 27.414a2 2 0 0 1-2.828 0l-2.587-2.585a2 2 0 0 1 0-2.829L22 4.586a2 2 0 0 1 2.829 0l2.585 2.585a2 2 0 0 1 0 2.829M26 8.586 23.414 6l-4 4L22 12.586z"})})};w.forwardRef(QL);const ZL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28 6H4a1 1 0 0 0-1 1v17a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a1 1 0 0 0-1-1M12.339 16 5 22.726V9.274zm1.48 1.356 1.5 1.381a1 1 0 0 0 1.352 0l1.5-1.38L25.421 24H6.571zM19.66 16 27 9.273v13.455z"})})};w.forwardRef(ZL);const JL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M11 7q0 .432-.088.838L16 10.382l5.088-2.544a4 4 0 1 1 .895 1.789L18.236 11.5l3.747 1.873a4 4 0 1 1 0 5.253L18.236 20.5l3.747 1.874a4 4 0 1 1-.895 1.788L16 21.618l-5.088 2.544Q11 24.567 11 25a4 4 0 1 1-.983-2.626l3.747-1.874-3.747-1.873a4 4 0 1 1 0-5.253l3.747-1.874-3.747-1.874A4 4 0 1 1 11 7M9 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0m2.236 8h9.528L16 12.618zM9 25a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-2-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4M27 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-2 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4m2-11a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-11 3.382L20.764 17h-9.528z",clipRule:"evenodd"})})};w.forwardRef(JL);const eB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M14.8 8.254a4 4 0 1 0-1.082 1.682l7.483 4.81a4 4 0 0 0-.075.254H10.874A4.002 4.002 0 0 0 3 16a4 4 0 0 0 7.874 1h10.252q.033.128.075.254l-7.484 4.81a4 4 0 1 0 1.082 1.682l7.484-4.81a4 4 0 1 0 0-5.871zM11 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4M9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0m16 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};w.forwardRef(eB);const tB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M18.842 3.227a1 1 0 1 0-.445 1.95l1.747.399L9.6 12.959a4 4 0 1 0 0 6.081l10.546 7.385-1.748.399a1 1 0 1 0 .445 1.95l3.945-.9a1 1 0 0 0 .77-1.1l-.503-4.014a1 1 0 0 0-1.985.248l.223 1.779-10.545-7.384a4 4 0 0 0 .127-.403h14.712l-1.293 1.293a1 1 0 1 0 1.414 1.414l3-3a1 1 0 0 0 0-1.414l-3-3a1 1 0 0 0-1.414 1.414L25.586 15H10.874a4 4 0 0 0-.127-.403l10.544-7.383-.222 1.778a1 1 0 0 0 1.984.249l.503-4.015a1 1 0 0 0-.77-1.099zM9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0",clipRule:"evenodd"})})};w.forwardRef(tB);const nB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 6H5a2 2 0 0 0-2 2v20a1.98 1.98 0 0 0 1.156 1.813 1.986 1.986 0 0 0 2.141-.299L10.312 26H27a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2M10.5 17.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};w.forwardRef(nB);const rB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M10 16V8a6 6 0 1 1 12 0v8a6 6 0 1 1-12 0m16 0a1 1 0 0 0-2 0 8 8 0 0 1-16 0 1 1 0 1 0-2 0 10.014 10.014 0 0 0 9 9.95V29a1 1 0 0 0 2 0v-3.05A10.014 10.014 0 0 0 26 16"})})};w.forwardRef(rB);const iB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5"})})},oB=w.forwardRef(iB),sB=oB,aB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m5 14H11a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2"})})};w.forwardRef(aB);const lB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26 5H6a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h20a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3M20 27h-8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2"})})};w.forwardRef(lB);const cB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29.443 18.776a13.1 13.1 0 0 1-4.626 6.614A13 13 0 0 1 4 15a12.9 12.9 0 0 1 2.61-7.815 13.1 13.1 0 0 1 6.614-4.625 1 1 0 0 1 1.25 1.25 11.01 11.01 0 0 0 13.725 13.725 1 1 0 0 1 1.25 1.25z"})})};w.forwardRef(cB);const uB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M18 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0M7.5 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m17 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})},fB=w.forwardRef(uB),hB=fB,dB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M10.939 8.061a1.5 1.5 0 0 1 0-2.125l4-4a1.5 1.5 0 0 1 2.125 0l4 4a1.503 1.503 0 1 1-2.125 2.125L17.5 6.625V12a1.5 1.5 0 1 1-3 0V6.625l-1.439 1.436a1.5 1.5 0 0 1-2.122 0m8 15.875L17.5 25.375V20a1.5 1.5 0 1 0-3 0v5.375l-1.439-1.44a1.504 1.504 0 0 0-2.125 2.125l4 4a1.5 1.5 0 0 0 2.125 0l4-4a1.502 1.502 0 1 0-2.125-2.125zm11.125-9-4-4a1.503 1.503 0 0 0-2.125 2.125l1.436 1.439H20a1.5 1.5 0 0 0 0 3h5.375l-1.44 1.439a1.503 1.503 0 0 0 2.125 2.125l4-4a1.5 1.5 0 0 0 .001-2.125zM6.625 17.5H12a1.5 1.5 0 1 0 0-3H6.625l1.44-1.439a1.503 1.503 0 1 0-2.125-2.125l-4 4a1.5 1.5 0 0 0 0 2.125l4 4a1.503 1.503 0 0 0 2.125-2.125z"})})};w.forwardRef(dB);const gB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26.615 3.214a.99.99 0 0 0-.857-.183l-16 4a1 1 0 0 0-.758.97v13.762a4.5 4.5 0 1 0 2 3.737V13.781l14-3.5v7.482a4.5 4.5 0 1 0 2 3.737V4a1 1 0 0 0-.385-.786"})})};w.forwardRef(gB);const pB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H14.5a1.5 1.5 0 1 1 0-3H27a1.5 1.5 0 0 1 1.5 1.5m-14-6.5H27a1.5 1.5 0 0 0 0-3H14.5a1.5 1.5 0 0 0 0 3m12.5 13H14.5a1.5 1.5 0 1 0 0 3H27a1.5 1.5 0 1 0 0-3M5.5 7.414V13a1.5 1.5 0 0 0 3 0V5a1.5 1.5 0 0 0-2.17-1.341l-2 1a1.5 1.5 0 0 0 1.17 2.75zm4.966 12.107a3.46 3.46 0 0 0-1.4-2.329 3.61 3.61 0 0 0-4.954.683 3.5 3.5 0 0 0-.52.942 1.5 1.5 0 0 0 2.818 1.027.5.5 0 0 1 .072-.125.6.6 0 0 1 .813-.103.48.48 0 0 1 .201.325.45.45 0 0 1-.096.347l-.016.02-3.585 4.794A1.5 1.5 0 0 0 5 27.5h4a1.5 1.5 0 1 0 0-3H8l1.785-2.389a3.43 3.43 0 0 0 .681-2.59"})})},mB=w.forwardRef(pB),bB=mB,wB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M17.2 8.254a4 4 0 1 1 1.082 1.682l-7.482 4.81q.04.125.074.254h10.252A4.002 4.002 0 0 1 29 16a4 4 0 0 1-7.874 1H10.874q-.033.128-.075.254l7.484 4.81a4 4 0 1 1-1.082 1.682l-7.484-4.81a4 4 0 1 1 0-5.871zM21 9a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4m2-11a2 2 0 1 0 4 0 2 2 0 0 0-4 0M7 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4",clipRule:"evenodd"})})};w.forwardRef(wB);const xB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M10.874 17A4.002 4.002 0 0 1 3 16a4 4 0 0 1 7.874-1h10.252A4.002 4.002 0 0 1 29 16a4 4 0 0 1-7.874 1zM7 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m18 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};w.forwardRef(xB);const vB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{fillRule:"evenodd",d:"M28.924 16.384c-.05.12-.124.231-.217.324l-4 4a1 1 0 0 1-1.632-.324 1 1 0 0 1 .217-1.09L25.585 17H10.875A4.002 4.002 0 0 1 3 16a4 4 0 0 1 7.874-1h14.712l-2.294-2.293a1 1 0 0 1 1.415-1.415l4 4a1 1 0 0 1 .217 1.09M7 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};w.forwardRef(vB);const yB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29 4a1 1 0 0 0-1-1c-5.51 0-11.164 6.214-14.304 10.329A7.5 7.5 0 0 0 4 20.5c0 3.86-2.443 5.591-2.559 5.671A1 1 0 0 0 2 28h9.5a7.5 7.5 0 0 0 7.171-9.696C22.788 15.164 29 9.51 29 4M15.553 14.194a48 48 0 0 1 1.26-1.569 9.5 9.5 0 0 1 2.562 2.561q-.738.618-1.569 1.262a7.6 7.6 0 0 0-2.254-2.254m5.337-.335a11.6 11.6 0 0 0-2.75-2.75c3.973-4.316 6.969-5.625 8.738-5.989-.357 1.77-1.672 4.766-5.988 8.739"})})};w.forwardRef(yB);const CB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M31 13v6.25a2.01 2.01 0 0 1-1.45 1.922L17 24.75V29a1 1 0 0 1-2 0v-4.25a2.01 2.01 0 0 1 1.45-1.922L29 19.25V13h-2v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3H2a1 1 0 0 1 0-2h2V8a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v3h2a2 2 0 0 1 2 2"})})};w.forwardRef(CB);const $B=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M25.096 6.736A12.9 12.9 0 0 0 16 3h-.134A13 13 0 0 0 3 16c0 5.375 3.323 9.883 8.67 11.771A4 4 0 0 0 17 24a2 2 0 0 1 2-2h5.776a3.976 3.976 0 0 0 3.9-3.11c.224-.984.332-1.99.324-3a12.9 12.9 0 0 0-3.904-9.154M10.5 21a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0-7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5-3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};w.forwardRef($B);const SB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.925 5.543v.018L21.65 29.554A1.985 1.985 0 0 1 19.728 31a1.98 1.98 0 0 1-1.803-1.144l-4.464-9.423a.5.5 0 0 1 .099-.568l7.158-7.159a1 1 0 0 0-1.414-1.413l-7.169 7.157a.5.5 0 0 1-.567.099l-9.376-4.441A2.05 2.05 0 0 1 1 12.17a1.99 1.99 0 0 1 1.446-1.815L26.44 3.08h.018a2 2 0 0 1 2.468 2.463"})})};w.forwardRef(SB);const AB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m26.56 17.061-10.257 10.25a7.501 7.501 0 0 1-10.607-10.61l12.27-12.236a5 5 0 0 1 7.07 7.074l-.021.02L13.04 23.086a1.503 1.503 0 0 1-2.121-.041 1.5 1.5 0 0 1 .041-2.121L22.924 9.409a2 2 0 1 0-2.838-2.82L7.816 18.82a4.5 4.5 0 1 0 6.366 6.364l10.258-10.25a1.503 1.503 0 0 1 2.125 2.125z"})})};w.forwardRef(AB);const RB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M3.5 8A1.5 1.5 0 0 1 5 6.5h22a1.5 1.5 0 0 1 0 3H5A1.5 1.5 0 0 1 3.5 8M5 14.5h16a1.5 1.5 0 1 0 0-3H5a1.5 1.5 0 1 0 0 3m22 2H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 1 0 0-3m-6 5H5a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3"})})};w.forwardRef(RB);const kB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m28.414 9.171-5.585-5.586a2 2 0 0 0-2.829 0L4.586 19A1.98 1.98 0 0 0 4 20.414V26a2 2 0 0 0 2 2h5.586A1.98 1.98 0 0 0 13 27.414L28.414 12a2 2 0 0 0 0-2.829M24 13.585 18.414 8l3-3L27 10.585z"})})},TB=w.forwardRef(kB),EB=TB,MB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.985 21.885A7.03 7.03 0 0 1 22 28c-9.925 0-18-8.075-18-18a7.03 7.03 0 0 1 6.115-6.985 2 2 0 0 1 2.078 1.19l2.64 5.894v.015a2 2 0 0 1-.16 1.886 1 1 0 0 1-.07.096L12 15.181c.936 1.903 2.926 3.875 4.854 4.814l3.042-2.589q.045-.037.094-.07a2 2 0 0 1 1.896-.175l.017.008 5.888 2.639a2 2 0 0 1 1.194 2.077"})})};w.forwardRef(MB);const OB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m29.416 13-6.683 6.706c.57 1.584.806 4.236-1.65 7.5a2 2 0 0 1-1.458.794h-.141a2 2 0 0 1-1.415-.586l-6.033-6.04-5.328 5.333a1 1 0 1 1-1.415-1.415l5.332-5.328-6.037-6.038a2 2 0 0 1 .162-2.972c3.178-2.564 6.219-2.06 7.55-1.643L19 2.587a2 2 0 0 1 2.829 0l7.586 7.585A2 2 0 0 1 29.416 13"})})};w.forwardRef(OB);const DB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 2A11.013 11.013 0 0 0 5 13c0 9.413 10 16.521 10.426 16.819a1 1 0 0 0 1.148 0C17 29.52 27 22.413 27 13A11.01 11.01 0 0 0 16 2m0 7a4 4 0 1 1 0 8 4 4 0 0 1 0-8"})})};w.forwardRef(DB);const IB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30 17v4a1 1 0 0 1-1.196.98L19.5 20.125v2.966l2.207 2.206A1 1 0 0 1 22 26v3a1 1 0 0 1-1.375.929L16 28.078l-4.625 1.85A1 1 0 0 1 10 29v-3a1 1 0 0 1 .293-.707l2.207-2.207v-2.961L3.196 21.98A1 1 0 0 1 2 21v-4a1 1 0 0 1 .553-.895l9.947-4.972V5.5a3.5 3.5 0 1 1 7 0v5.633l9.948 4.972A1 1 0 0 1 30 17"})})};w.forwardRef(IB);const _B=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M25.676 18.884a7.6 7.6 0 0 1-3.978 1.107 9 9 0 0 1-3.42-.707A6.94 6.94 0 0 0 17 23.314V27a1 1 0 0 1-1.066 1A1.023 1.023 0 0 1 15 26.969v-1.555l-4.828-4.828A6.6 6.6 0 0 1 7.93 21a5.73 5.73 0 0 1-2.99-.834C2.216 18.511.75 14.702 1.034 9.974a1 1 0 0 1 .94-.94c4.728-.28 8.537 1.182 10.187 3.906a5.75 5.75 0 0 1 .806 3.56.5.5 0 0 1-.86.304l-2.4-2.513a1 1 0 0 0-1.415 1.414l6.736 6.906q.01-.146.026-.291a8.57 8.57 0 0 1 2.33-4.933l6.323-6.682a1 1 0 0 0-1.413-1.415l-6.125 6.477a.5.5 0 0 1-.848-.217c-.592-2.185-.331-4.36.8-6.228 2.233-3.685 7.428-5.657 13.898-5.277a1 1 0 0 1 .94.94c.375 6.471-1.598 11.666-5.283 13.899"})})};w.forwardRef(_B);const LB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30 16a1.97 1.97 0 0 1-.95 1.689L11.04 28.706a2 2 0 0 1-2.767-.688A2 2 0 0 1 8 27.016V4.984a1.98 1.98 0 0 1 1.015-1.728 2 2 0 0 1 2.025.038L29.05 14.31A1.97 1.97 0 0 1 30 16"})})},BB=w.forwardRef(LB),NB=BB,jB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5h-9.5V27a1.5 1.5 0 1 1-3 0v-9.5H5a1.5 1.5 0 1 1 0-3h9.5V5a1.5 1.5 0 1 1 3 0v9.5H27a1.5 1.5 0 0 1 1.5 1.5"})})},FB=w.forwardRef(jB),VB=FB,HB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.016 13.016 0 0 0 16 3m5 14h-4v4a1 1 0 0 1-2 0v-4h-4a1 1 0 0 1 0-2h4v-4a1 1 0 0 1 2 0v4h4a1 1 0 0 1 0 2"})})};w.forwardRef(HB);const PB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 5H17V3a1 1 0 0 0-2 0v2H5a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h4.92l-2.701 3.375a1 1 0 0 0 1.562 1.25L12.48 24h7.04l3.699 4.625a1 1 0 1 0 1.562-1.25L22.08 24H27a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M13 18a1 1 0 0 1-2 0v-3a1 1 0 0 1 2 0zm4 0a1 1 0 0 1-2 0v-5a1 1 0 0 1 2 0zm4 0a1 1 0 0 1-2 0v-7a1 1 0 0 1 2 0z"})})};w.forwardRef(PB);const WB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M30.414 17 18 4.586A1.98 1.98 0 0 0 16.586 4H5a1 1 0 0 0-1 1v11.586A1.98 1.98 0 0 0 4.586 18L17 30.414a2 2 0 0 0 2.829 0l10.585-10.585a2 2 0 0 0 0-2.829M10.5 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};w.forwardRef(WB);const zB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M20.723 28H26a2 2 0 0 0 2-2v-4.706a1 1 0 0 0-1.383-.919 2.9 2.9 0 0 1-1.117.221c-1.654 0-3-1.387-3-3.091s1.346-3.091 3-3.091c.383 0 .763.075 1.117.221A1 1 0 0 0 28 13.706V9a2 2 0 0 0-2-2h-4.527a4.5 4.5 0 1 0-8.945 0H8a2 2 0 0 0-2 2v4.028a4.5 4.5 0 1 0 0 8.945V26a2 2 0 0 0 2 2h5.278"})})};w.forwardRef(zB);const UB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M18 22.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0M29.5 16A13.5 13.5 0 1 1 16 2.5 13.515 13.515 0 0 1 29.5 16m-3 0A10.5 10.5 0 1 0 16 26.5 10.51 10.51 0 0 0 26.5 16M16 8c-3.033 0-5.5 2.242-5.5 5v.5a1.5 1.5 0 1 0 3 0V13c0-1.102 1.125-2 2.5-2s2.5.898 2.5 2-1.125 2-2.5 2a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 2.966.32C19.79 17.235 21.5 15.296 21.5 13c0-2.758-2.468-5-5.5-5"})})};w.forwardRef(UB);const qB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M14.5 9v11a6.006 6.006 0 0 1-6 6 1 1 0 0 1 0-2 4 4 0 0 0 4-4v-1H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h7.5a2 2 0 0 1 2 2M27 7h-7.5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2H27v1a4 4 0 0 1-4 4 1 1 0 0 0 0 2 6.006 6.006 0 0 0 6-6V9a2 2 0 0 0-2-2"})})},KB=w.forwardRef(qB),GB=KB,YB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 5v23a1 1 0 0 1-2 0v-6h-6a1 1 0 0 1-1-1c.046-2.395.349-4.779.902-7.11 1.223-5.061 3.54-8.454 6.704-9.809a1 1 0 0 1 1.394.92m-12.014-.164a.999.999 0 1 0-1.972.33L13.986 11H11V5a1 1 0 0 0-2 0v6H6.014l.972-5.835a1 1 0 1 0-1.972-.329l-1 6A1 1 0 0 0 4 11a6.01 6.01 0 0 0 5 5.915V28a1 1 0 1 0 2 0V16.915A6.01 6.01 0 0 0 16 11q0-.083-.014-.164z"})})};w.forwardRef(YB);const XB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M19 28a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1m8.953-8.521-1.546 6.954a2 2 0 0 1-3.188 1.138l-3.405-2.57h-7.625L8.78 27.57a2 2 0 0 1-3.189-1.138l-1.545-6.954a2.01 2.01 0 0 1 .415-1.714l3.57-4.282c.12-1.574.482-3.12 1.072-4.584 1.612-4.043 4.5-6.579 5.671-7.481a2 2 0 0 1 2.45 0c1.167.902 4.059 3.438 5.671 7.48.59 1.465.952 3.01 1.072 4.585l3.57 4.282a2.01 2.01 0 0 1 .415 1.714m-17.404 4.25q-2.014-3.666-2.445-7.209L6 19.045 7.545 26l.022-.016zM17.5 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m8.5 6.545-2.104-2.525q-.428 3.535-2.445 7.211l2.982 2.25.022.017z"})})};w.forwardRef(XB);const QB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M19.716 14.141a1 1 0 0 1 .261-1.391l8.458-5.788a1 1 0 0 1 1.125 1.652L21.101 14.4a1 1 0 0 1-1.39-.261zm10.109 10.634a1 1 0 0 1-1.39.261L17 17.211l-5.315 3.636a4.5 4.5 0 1 1-1.125-1.65L15.229 16l-4.673-3.198a4.5 4.5 0 1 1 1.125-1.65l17.875 12.233a1 1 0 0 1 .269 1.39M9 22.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m0-13a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"})})};w.forwardRef(QB);const ZB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29.061 26.939 23.125 21A11.515 11.515 0 1 0 21 23.125l5.941 5.942a1.503 1.503 0 0 0 2.125-2.125zM5.5 14a8.5 8.5 0 1 1 8.5 8.5A8.51 8.51 0 0 1 5.5 14"})})},JB=w.forwardRef(ZB),H3=JB,eN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26 5H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M26 17H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m-3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};w.forwardRef(eN);const tN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28 7v7.346c0 11.202-9.477 14.918-11.375 15.549a1.94 1.94 0 0 1-1.25 0C13.475 29.264 4 25.548 4 14.346V7a2 2 0 0 1 2-2h20a2 2 0 0 1 2 2"})})},nN=w.forwardRef(tN),rN=nN,iN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m30.949 7.653-6.47-3.528A1 1 0 0 0 24 4h-4a1 1 0 0 0-1 1 3 3 0 0 1-6 0 1 1 0 0 0-1-1H8a1 1 0 0 0-.48.125L1.051 7.653a1.97 1.97 0 0 0-.824 2.657l2.41 4.601A2.05 2.05 0 0 0 4.458 16H7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V16h2.543a2.05 2.05 0 0 0 1.822-1.089l2.409-4.601a1.97 1.97 0 0 0-.825-2.658M4.459 14a.08.08 0 0 1-.051-.016L2.01 9.408 7 6.685V14zm23.134-.018a.07.07 0 0 1-.052.018H25V6.685l4.99 2.723z"})})};w.forwardRef(iN);const oN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M12 27a2 2 0 1 1-4 0 2 2 0 0 1 4 0m11-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4m5.805-16.594A1 1 0 0 0 28 8H6.04L5.026 4.45A2.01 2.01 0 0 0 3.103 3H1a1 1 0 0 0 0 2h2.103l4.522 15.824A3.01 3.01 0 0 0 10.509 23h12.014a2.99 2.99 0 0 0 2.867-2.117l3.566-11.59a1 1 0 0 0-.151-.887"})})};w.forwardRef(oN);const sN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M14.5 27a1.5 1.5 0 0 1-1.5 1.5H6A2.5 2.5 0 0 1 3.5 26V6A2.5 2.5 0 0 1 6 3.5h7a1.5 1.5 0 0 1 0 3H6.5v19H13a1.5 1.5 0 0 1 1.5 1.5m13.561-12.061-5-5a1.503 1.503 0 0 0-2.125 2.125l2.439 2.436H13a1.5 1.5 0 1 0 0 3h10.375l-2.44 2.439a1.503 1.503 0 0 0 2.125 2.125l5-5a1.5 1.5 0 0 0 .001-2.125"})})};w.forwardRef(sN);const aN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M4 10a1 1 0 0 1 1-1h4.646a3.5 3.5 0 0 1 6.708 0H27a1 1 0 1 1 0 2H16.354a3.5 3.5 0 0 1-6.708 0H5a1 1 0 0 1-1-1m23 11h-2.646a3.5 3.5 0 0 0-6.708 0H5a1 1 0 0 0 0 2h12.646a3.5 3.5 0 0 0 6.708 0H27a1 1 0 1 0 0-2"})})};w.forwardRef(aN);const lN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M26 18a1.97 1.97 0 0 1-1.302 1.867l-6.457 2.375-2.375 6.452a1.99 1.99 0 0 1-3.735 0L9.75 22.25l-6.452-2.375a1.99 1.99 0 0 1 0-3.735l6.456-2.375 2.375-6.451a1.99 1.99 0 0 1 3.735 0l2.375 6.456 6.451 2.375A1.97 1.97 0 0 1 26 18M19 6h2v2a1 1 0 0 0 2 0V6h2a1 1 0 1 0 0-2h-2V2a1 1 0 1 0-2 0v2h-2a1 1 0 1 0 0 2m11 4h-1V9a1 1 0 1 0-2 0v1h-1a1 1 0 0 0 0 2h1v1a1 1 0 0 0 2 0v-1h1a1 1 0 0 0 0-2"})})};w.forwardRef(lN);const cN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M15 7v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2m10-2h-6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M13 17H7a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m12 0h-6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2"})})};w.forwardRef(cN);const uN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:[m.jsx("path",{d:"M27.5 21.136 16 27.843 4.5 21.136a1 1 0 0 0-1 1.728l12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 1 0-1.008-1.728"}),m.jsx("path",{d:"M27.5 15.136 16 21.843 4.5 15.136a1 1 0 0 0-1 1.728l12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 1 0-1.008-1.728"}),m.jsx("path",{d:"m3.5 10.864 12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 0 0 0-1.728l-12-7a1 1 0 0 0-1.008 0l-12 7a1 1 0 0 0 0 1.728"})]})};w.forwardRef(uN);const fN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m29.313 14.298-5.638 4.92 1.689 7.325a2 2 0 0 1-2.98 2.167l-6.389-3.875L9.62 28.71a2 2 0 0 1-2.98-2.168l1.686-7.317-5.638-4.928a2 2 0 0 1 1.138-3.507l7.433-.644 2.901-6.92a1.994 1.994 0 0 1 3.68 0l2.91 6.92 7.43.644a2 2 0 0 1 1.139 3.508z"})})};w.forwardRef(fN);const hN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29 19a4 4 0 1 0-4.991 3.875A1 1 0 0 0 24 23a4 4 0 0 1-4 4h-3a4 4 0 0 1-4-4v-5.065c3.934-.5 7-3.934 7-8.039V5a2 2 0 0 0-2-2h-2a1 1 0 1 0 0 2h2v4.896c0 3.323-2.656 6.061-5.92 6.104A6 6 0 0 1 6 10V5h2a1 1 0 0 0 0-2H6a2 2 0 0 0-2 2v5a8 8 0 0 0 7 7.936V23a6.006 6.006 0 0 0 6 6h3a6.006 6.006 0 0 0 6-6 1 1 0 0 0-.009-.125A4 4 0 0 0 29 19m-4 1a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})})};w.forwardRef(hN);const dN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29 12a1 1 0 0 0-.038-.275L27.17 5.45A2.01 2.01 0 0 0 25.25 4H6.75a2.01 2.01 0 0 0-1.919 1.45L3.04 11.725A1 1 0 0 0 3 12v2a5 5 0 0 0 2 4v8a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-8a5 5 0 0 0 2-4zm-18 2a3 3 0 0 1-4.39 2.657 1 1 0 0 0-.228-.132A3 3 0 0 1 5 14v-1h6zm8 0a3 3 0 0 1-6 0v-1h6zm8 0a3 3 0 0 1-1.384 2.525q-.12.051-.225.131A3 3 0 0 1 21 14v-1h6z"})})};w.forwardRef(dN);const gN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5h-3.767A5.19 5.19 0 0 1 24.5 21c0 1.806-.976 3.54-2.679 4.756C20.25 26.881 18.18 27.5 16 27.5s-4.25-.619-5.821-1.744C8.476 24.54 7.5 22.806 7.5 21a1.5 1.5 0 0 1 3 0c0 1.898 2.519 3.5 5.5 3.5s5.5-1.602 5.5-3.5c0-1.595-1.163-2.523-4.419-3.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5M9.389 12.5a1.5 1.5 0 0 0 1.5-1.5c0-2 2.197-3.5 5.111-3.5 2.17 0 3.921.831 4.685 2.223a1.5 1.5 0 0 0 2.625-1.446C22.016 5.914 19.281 4.5 16 4.5c-4.625 0-8.111 2.794-8.111 6.5a1.5 1.5 0 0 0 1.5 1.5"})})},pN=w.forwardRef(gN),mN=pN,bN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M15 5V2a1 1 0 0 1 2 0v3a1 1 0 0 1-2 0m1 3a8 8 0 1 0 8 8 8.01 8.01 0 0 0-8-8m-8.707.707a1 1 0 1 0 1.414-1.415l-2-2a1 1 0 1 0-1.414 1.415zm0 14.586-2 2a1 1 0 1 0 1.414 1.415l2-2a1 1 0 1 0-1.415-1.415M24 9a1 1 0 0 0 .707-.293l2-2a1 1 0 0 0-1.415-1.414l-2 2A1 1 0 0 0 24 9m.707 14.293a1 1 0 1 0-1.415 1.415l2 2a1 1 0 0 0 1.415-1.415zM6 16a1 1 0 0 0-1-1H2a1 1 0 0 0 0 2h3a1 1 0 0 0 1-1m10 10a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0v-3a1 1 0 0 0-1-1m14-11h-3a1 1 0 0 0 0 2h3a1 1 0 0 0 0-2"})})};w.forwardRef(bN);const wN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 8h-8.586l4.293-4.292a1 1 0 0 0-1.415-1.415L16 7.586l-5.292-5.293a1 1 0 1 0-1.415 1.415L13.586 8H5a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2m0 17h-7V10h7zm-2-10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0 6a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"})})};w.forwardRef(wN);const xN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m29.978 19.625-1.5-12A3 3 0 0 0 25.5 5H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h5.383l4.722 9.448A1 1 0 0 0 15 30a5 5 0 0 0 5-5v-2h7a3 3 0 0 0 2.977-3.375M9 18H4V7h5z"})})};w.forwardRef(xN);const vN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M29.25 10.015A3 3 0 0 0 27 9h-7V7a5 5 0 0 0-5-5 1 1 0 0 0-.895.553L9.383 12H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h21.5a3 3 0 0 0 2.977-2.625l1.5-12a3 3 0 0 0-.727-2.36M4 14h5v11H4z"})})};w.forwardRef(vN);const yN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M23 3H9a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h1l-1.8 2.4a1 1 0 0 0 1.6 1.2l2.7-3.6h7l2.7 3.6a1 1 0 0 0 1.6-1.2L22 27h1a4 4 0 0 0 4-4V7a4 4 0 0 0-4-4M10.5 23a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m4.5-8H7v-5h8zm6.5 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3.5-8h-8v-5h8z"})})};w.forwardRef(yN);const CN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M27 6h-5V5a3 3 0 0 0-3-3h-6a3 3 0 0 0-3 3v1H5a1 1 0 0 0 0 2h1v18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h1a1 1 0 1 0 0-2M14 21a1 1 0 0 1-2 0v-8a1 1 0 0 1 2 0zm6 0a1 1 0 0 1-2 0v-8a1 1 0 0 1 2 0zm0-15h-8V5a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1z"})})},$N=w.forwardRef(CN),SN=$N,AN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m23.54 2.267-3.711 3.377c1.7.52 3.298 1.397 4.653 2.631 4.684 4.266 4.684 11.184 0 15.45q-5.184 4.72-16.021 6.008l3.71-3.377a12.2 12.2 0 0 1-4.653-2.63c-4.684-4.267-4.712-11.16 0-15.45q5.184-4.721 16.021-6.01m-7.54 8.4c-3.314 0-6 2.388-6 5.333s2.686 5.333 6 5.333 6-2.387 6-5.333c0-2.945-2.686-5.333-6-5.333"})})};w.forwardRef(AN);const RN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M25.5 28a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 1 1 0-3h16a1.5 1.5 0 0 1 1.5 1.5M16 24.5a8.51 8.51 0 0 0 8.5-8.5V7a1.5 1.5 0 1 0-3 0v9a5.5 5.5 0 0 1-11 0V7a1.5 1.5 0 1 0-3 0v9a8.51 8.51 0 0 0 8.5 8.5"})})},kN=w.forwardRef(RN),TN=kN,EN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.5 19v7a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 26v-7a1.5 1.5 0 0 1 3 0v6.5h19V19a1.5 1.5 0 1 1 3 0m-16.439-7.939L14.5 8.625V19a1.5 1.5 0 1 0 3 0V8.625l2.439 2.44a1.503 1.503 0 0 0 2.125-2.125l-5-5a1.5 1.5 0 0 0-2.125 0l-5 5a1.503 1.503 0 1 0 2.125 2.125z"})})};w.forwardRef(EN);const MN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M28.866 27.5A1 1 0 0 1 28 28H4a1 1 0 0 1-.865-1.5c1.904-3.291 4.838-5.651 8.261-6.77a9 9 0 1 1 9.208 0c3.424 1.119 6.357 3.479 8.261 6.77a1 1 0 0 1 .001 1"})})};w.forwardRef(MN);const ON=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M19.44 3.101a1 1 0 0 0-1.054.11L9.656 10H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h5.656l8.73 6.789A1 1 0 0 0 20 28V4a1 1 0 0 0-.56-.899M28.414 16l2.293-2.292a1.001 1.001 0 0 0-1.415-1.415L27 14.586l-2.293-2.293a1 1 0 1 0-1.415 1.415L25.587 16l-2.293 2.293a1 1 0 0 0 1.415 1.415L27 17.414l2.293 2.294a1 1 0 0 0 1.415-1.415z"})})};w.forwardRef(ON);const DN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M19.439 3.101a1 1 0 0 0-1.053.11L9.656 10H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h5.656l8.73 6.789A1.001 1.001 0 0 0 20 28V4a1 1 0 0 0-.561-.899M9 20H4v-8h5zm15.75-7.305a5 5 0 0 1 0 6.61 1 1 0 0 1-1.5-1.322 3 3 0 0 0 0-3.966 1 1 0 0 1 1.5-1.322M31 16a10 10 0 0 1-2.546 6.668 1 1 0 0 1-1.49-1.334 8 8 0 0 0 0-10.666.998.998 0 0 1 .407-1.624 1 1 0 0 1 1.083.29A9.98 9.98 0 0 1 31 16"})})};w.forwardRef(DN);const IN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M15 6a4 4 0 1 1 8 0 4 4 0 0 1-8 0m11 11c-3.58 0-5.226-1.662-6.969-3.421a25 25 0 0 0-1.375-1.323C13.031 8.24 5.63 15.098 5.316 15.391a1 1 0 0 0 1.369 1.458 20.5 20.5 0 0 1 3.815-2.724c1.723-.922 3.174-1.279 4.338-1.072L8.082 28.6a1 1 0 0 0 1.835.798l4.2-9.659L18 22.515V29a1 1 0 1 0 2 0v-7a1 1 0 0 0-.419-.814l-4.65-3.321L16.61 14c.33.305.657.634 1 .98C19.381 16.774 21.586 19 26 19a1 1 0 0 0 0-2"})})};w.forwardRef(IN);const _N=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-1 7a1 1 0 0 1 2 0v7a1 1 0 0 1-2 0zm1 13a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})},LN=w.forwardRef(_N),P3=LN,BN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:m.jsx("path",{d:"m31.316 24.949-3 1a1 1 0 0 1-1.211-.5l-3.724-7.45H13a1 1 0 0 1-1-1v-3.707A7 7 0 0 0 14 27c3.239 0 6.261-2.256 7.031-5.25a1 1 0 1 1 1.938.5C21.96 26.162 18.19 29 14 29a9 9 0 0 1-2-17.774V8.851a3.5 3.5 0 1 1 2 0V11h7a1 1 0 0 1 0 2h-7v3h10a1 1 0 0 1 .894.552l3.612 7.225 2.178-.726a1 1 0 1 1 .632 1.898"})})};w.forwardRef(BN);const W3="Avatar",[NN,Lte]=wt(W3),[jN,z3]=NN(W3),FN=w.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[i,o]=w.useState("idle");return w.createElement(jN,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},w.createElement(me.span,q({},r,{ref:e})))}),VN="AvatarImage",HN=w.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=t,s=z3(VN,n),a=zN(r),c=Dt(f=>{i(f),s.onImageLoadingStatusChange(f)});return ut(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?w.createElement(me.img,q({},o,{ref:e,src:r})):null}),PN="AvatarFallback",WN=w.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...i}=t,o=z3(PN,n),[s,a]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&o.imageLoadingStatus!=="loaded"?w.createElement(me.span,q({},i,{ref:e})):null});function zN(t){const[e,n]=w.useState("idle");return ut(()=>{if(!t){n("error");return}let r=!0;const i=new window.Image,o=s=>()=>{r&&n(s)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=t,()=>{r=!1}},[t]),e}const UN=FN,qN=HN,KN=WN,Yd="rovingFocusGroup.onEntryFocus",GN={bubbles:!1,cancelable:!0},fp="RovingFocusGroup",[J0,U3,YN]=kf(fp),[XN,qs]=wt(fp,[YN]),[QN,ZN]=XN(fp),JN=w.forwardRef((t,e)=>w.createElement(J0.Provider,{scope:t.__scopeRovingFocusGroup},w.createElement(J0.Slot,{scope:t.__scopeRovingFocusGroup},w.createElement(ej,q({},t,{ref:e}))))),ej=w.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:f,...h}=t,d=w.useRef(null),p=ye(e,d),b=Do(o),[x=null,v]=_t({prop:s,defaultProp:a,onChange:c}),[C,$]=w.useState(!1),A=Dt(f),T=U3(n),M=w.useRef(!1),[O,I]=w.useState(0);return w.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(Yd,A),()=>_.removeEventListener(Yd,A)},[A]),w.createElement(QN,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:x,onItemFocus:w.useCallback(_=>v(_),[v]),onItemShiftTab:w.useCallback(()=>$(!0),[]),onFocusableItemAdd:w.useCallback(()=>I(_=>_+1),[]),onFocusableItemRemove:w.useCallback(()=>I(_=>_-1),[])},w.createElement(me.div,q({tabIndex:C||O===0?-1:0,"data-orientation":r},h,{ref:p,style:{outline:"none",...t.style},onMouseDown:re(t.onMouseDown,()=>{M.current=!0}),onFocus:re(t.onFocus,_=>{const V=!M.current;if(_.target===_.currentTarget&&V&&!C){const F=new CustomEvent(Yd,GN);if(_.currentTarget.dispatchEvent(F),!F.defaultPrevented){const H=T().filter(te=>te.focusable),z=H.find(te=>te.active),W=H.find(te=>te.id===x),K=[z,W,...H].filter(Boolean).map(te=>te.ref.current);q3(K)}}M.current=!1}),onBlur:re(t.onBlur,()=>$(!1))})))}),tj="RovingFocusGroupItem",nj=w.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=t,a=Lt(),c=o||a,f=ZN(tj,n),h=f.currentTabStopId===c,d=U3(n),{onFocusableItemAdd:p,onFocusableItemRemove:b}=f;return w.useEffect(()=>{if(r)return p(),()=>b()},[r,p,b]),w.createElement(J0.ItemSlot,{scope:n,id:c,focusable:r,active:i},w.createElement(me.span,q({tabIndex:h?0:-1,"data-orientation":f.orientation},s,{ref:e,onMouseDown:re(t.onMouseDown,x=>{r?f.onItemFocus(c):x.preventDefault()}),onFocus:re(t.onFocus,()=>f.onItemFocus(c)),onKeyDown:re(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=oj(x,f.orientation,f.dir);if(v!==void 0){x.preventDefault();let $=d().filter(A=>A.focusable).map(A=>A.ref.current);if(v==="last")$.reverse();else if(v==="prev"||v==="next"){v==="prev"&&$.reverse();const A=$.indexOf(x.currentTarget);$=f.loop?sj($,A+1):$.slice(A+1)}setTimeout(()=>q3($))}})})))}),rj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ij(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function oj(t,e,n){const r=ij(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rj[r]}function q3(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function sj(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const hp=JN,dp=nj;var K3=Og(),Xd=function(){},_f=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:Xd,onWheelCapture:Xd,onTouchMoveCapture:Xd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,f=t.removeScrollBar,h=t.enabled,d=t.shards,p=t.sideCar,b=t.noIsolation,x=t.inert,v=t.allowPinchZoom,C=t.as,$=C===void 0?"div":C,A=bl(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=p,M=Mg([n,e]),O=exports.__assign(exports.__assign({},A),i);return S.createElement(S.Fragment,null,h&&S.createElement(T,{sideCar:K3,removeScrollBar:f,shards:d,noIsolation:b,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),s?S.cloneElement(S.Children.only(a),exports.__assign(exports.__assign({},O),{ref:M})):S.createElement($,exports.__assign({},O,{className:c,ref:M}),a))});_f.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_f.classNames={fullWidth:gs,zeroRight:ds};var e1=!1;if(typeof window<"u")try{var Dc=Object.defineProperty({},"passive",{get:function(){return e1=!0,!0}});window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,Dc)}catch{e1=!1}var ts=e1?{passive:!1}:!1,aj=function(t){return t.tagName==="TEXTAREA"},G3=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!aj(t)&&n[e]==="visible")},lj=function(t){return G3(t,"overflowY")},cj=function(t){return G3(t,"overflowX")},v5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Y3(t,n);if(r){var i=X3(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},uj=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},fj=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Y3=function(t,e){return t==="v"?lj(e):cj(e)},X3=function(t,e){return t==="v"?uj(e):fj(e)},hj=function(t,e){return t==="h"&&e==="rtl"?-1:1},dj=function(t,e,n,r,i){var o=hj(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),f=!1,h=s>0,d=0,p=0;do{var b=X3(t,a),x=b[0],v=b[1],C=b[2],$=v-C-o*x;(x||$)&&Y3(t,a)&&(d+=$,p+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(h&&d===0||!h&&p===0)&&(f=!0),f},Ic=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},y5=function(t){return[t.deltaX,t.deltaY]},C5=function(t){return t&&"current"in t?t.current:t},gj=function(t,e){return t[0]===e[0]&&t[1]===e[1]},pj=function(t){return`
|
|
42
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
43
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
44
|
+
`)},mj=0,ns=[];function bj(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(mj++)[0],o=S.useState(function(){return Rf()})[0],s=S.useRef(t);S.useEffect(function(){s.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Eg([t.lockRef.current],(t.shards||[]).map(C5),!0).filter(Boolean);return v.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(v,C){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var $=Ic(v),A=n.current,T="deltaX"in v?v.deltaX:A[0]-$[0],M="deltaY"in v?v.deltaY:A[1]-$[1],O,I=v.target,_=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in v&&_==="h"&&I.type==="range")return!1;var V=v5(_,I);if(!V)return!0;if(V?O=_:(O=_==="v"?"h":"v",V=v5(_,I)),!V)return!1;if(!r.current&&"changedTouches"in v&&(T||M)&&(r.current=O),!O)return!0;var F=r.current||O;return dj(F,C,v,F==="h"?T:M)},[]),c=S.useCallback(function(v){var C=v;if(!(!ns.length||ns[ns.length-1]!==o)){var $="deltaY"in C?y5(C):Ic(C),A=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&gj(O.delta,$)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var T=(s.current.shards||[]).map(C5).filter(Boolean).filter(function(O){return O.contains(C.target)}),M=T.length>0?a(C,T[0]):!s.current.noIsolation;M&&C.cancelable&&C.preventDefault()}}},[]),f=S.useCallback(function(v,C,$,A){var T={name:v,delta:C,target:$,should:A};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(M){return M!==T})},1)},[]),h=S.useCallback(function(v){n.current=Ic(v),r.current=void 0},[]),d=S.useCallback(function(v){f(v.type,y5(v),v.target,a(v,t.lockRef.current))},[]),p=S.useCallback(function(v){f(v.type,Ic(v),v.target,a(v,t.lockRef.current))},[]);S.useEffect(function(){return ns.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,ts),document.addEventListener("touchmove",c,ts),document.addEventListener("touchstart",h,ts),function(){ns=ns.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,ts),document.removeEventListener("touchmove",c,ts),document.removeEventListener("touchstart",h,ts)}},[]);var b=t.removeScrollBar,x=t.inert;return S.createElement(S.Fragment,null,x?S.createElement(o,{styles:pj(i)}):null,b?S.createElement(Ig,{gapMode:"margin"}):null)}const wj=Dg(K3,bj);var Lf=S.forwardRef(function(t,e){return S.createElement(_f,exports.__assign({},t,{ref:e,sideCar:wj}))});Lf.classNames=_f.classNames;const t1=["Enter"," "],xj=["ArrowDown","PageUp","Home"],Q3=["ArrowUp","PageDown","End"],vj=[...xj,...Q3],yj={ltr:[...t1,"ArrowRight"],rtl:[...t1,"ArrowLeft"]},Cj={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Bf="Menu",[Pa,$j,Sj]=kf(Bf),[Io,Z3]=wt(Bf,[Sj,ji,qs]),gp=ji(),J3=qs(),[Aj,_o]=Io(Bf),[Rj,yl]=Io(Bf),kj=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=t,a=gp(e),[c,f]=w.useState(null),h=w.useRef(!1),d=Dt(o),p=Do(i);return w.useEffect(()=>{const b=()=>{h.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>h.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),w.createElement(fl,a,w.createElement(Aj,{scope:e,open:n,onOpenChange:d,content:c,onContentChange:f},w.createElement(Rj,{scope:e,onClose:w.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:h,dir:p,modal:s},r)))},ey=w.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=gp(n);return w.createElement(hl,q({},i,r,{ref:e}))}),ty="MenuPortal",[Tj,ny]=Io(ty,{forceMount:void 0}),Ej=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,o=_o(ty,e);return w.createElement(Tj,{scope:e,forceMount:n},w.createElement(Tt,{present:n||o.open},w.createElement(Ws,{asChild:!0,container:i},r)))},Qn="MenuContent",[Mj,pp]=Io(Qn),Oj=w.forwardRef((t,e)=>{const n=ny(Qn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,o=_o(Qn,t.__scopeMenu),s=yl(Qn,t.__scopeMenu);return w.createElement(Pa.Provider,{scope:t.__scopeMenu},w.createElement(Tt,{present:r||o.open},w.createElement(Pa.Slot,{scope:t.__scopeMenu},s.modal?w.createElement(Dj,q({},i,{ref:e})):w.createElement(Ij,q({},i,{ref:e})))))}),Dj=w.forwardRef((t,e)=>{const n=_o(Qn,t.__scopeMenu),r=w.useRef(null),i=ye(e,r);return w.useEffect(()=>{const o=r.current;if(o)return ml(o)},[]),w.createElement(mp,q({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:re(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Ij=w.forwardRef((t,e)=>{const n=_o(Qn,t.__scopeMenu);return w.createElement(mp,q({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),mp=w.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:p,onDismiss:b,disableOutsideScroll:x,...v}=t,C=_o(Qn,n),$=yl(Qn,n),A=gp(n),T=J3(n),M=$j(n),[O,I]=w.useState(null),_=w.useRef(null),V=ye(e,_,C.onContentChange),F=w.useRef(0),H=w.useRef(""),z=w.useRef(0),W=w.useRef(null),Y=w.useRef("right"),K=w.useRef(0),te=x?Lf:w.Fragment,ie=x?{as:$r,allowPinchZoom:!0}:void 0,ne=X=>{var ce,fe;const Me=H.current+X,we=M().filter(ke=>!ke.disabled),Ve=document.activeElement,Ne=(ce=we.find(ke=>ke.ref.current===Ve))===null||ce===void 0?void 0:ce.textValue,He=we.map(ke=>ke.textValue),pe=zj(He,Me,Ne),De=(fe=we.find(ke=>ke.textValue===pe))===null||fe===void 0?void 0:fe.ref.current;(function ke(Ae){H.current=Ae,window.clearTimeout(F.current),Ae!==""&&(F.current=window.setTimeout(()=>ke(""),1e3))})(Me),De&&setTimeout(()=>De.focus())};w.useEffect(()=>()=>window.clearTimeout(F.current),[]),pl();const oe=w.useCallback(X=>{var ce,fe;return Y.current===((ce=W.current)===null||ce===void 0?void 0:ce.side)&&qj(X,(fe=W.current)===null||fe===void 0?void 0:fe.area)},[]);return w.createElement(Mj,{scope:n,searchRef:H,onItemEnter:w.useCallback(X=>{oe(X)&&X.preventDefault()},[oe]),onItemLeave:w.useCallback(X=>{var ce;oe(X)||((ce=_.current)===null||ce===void 0||ce.focus(),I(null))},[oe]),onTriggerLeave:w.useCallback(X=>{oe(X)&&X.preventDefault()},[oe]),pointerGraceTimerRef:z,onPointerGraceIntentChange:w.useCallback(X=>{W.current=X},[])},w.createElement(te,ie,w.createElement(zs,{asChild:!0,trapped:i,onMountAutoFocus:re(o,X=>{var ce;X.preventDefault(),(ce=_.current)===null||ce===void 0||ce.focus()}),onUnmountAutoFocus:s},w.createElement(Mo,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:p,onDismiss:b},w.createElement(hp,q({asChild:!0},T,{dir:$.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:I,onEntryFocus:re(c,X=>{$.isUsingKeyboardRef.current||X.preventDefault()})}),w.createElement(dl,q({role:"menu","aria-orientation":"vertical","data-state":oy(C.open),"data-radix-menu-content":"",dir:$.dir},A,v,{ref:V,style:{outline:"none",...v.style},onKeyDown:re(v.onKeyDown,X=>{const fe=X.target.closest("[data-radix-menu-content]")===X.currentTarget,Me=X.ctrlKey||X.altKey||X.metaKey,we=X.key.length===1;fe&&(X.key==="Tab"&&X.preventDefault(),!Me&&we&&ne(X.key));const Ve=_.current;if(X.target!==Ve||!vj.includes(X.key))return;X.preventDefault();const He=M().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);Q3.includes(X.key)&&He.reverse(),Pj(He)}),onBlur:re(t.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(F.current),H.current="")}),onPointerMove:re(t.onPointerMove,Wa(X=>{const ce=X.target,fe=K.current!==X.clientX;if(X.currentTarget.contains(ce)&&fe){const Me=X.clientX>K.current?"right":"left";Y.current=Me,K.current=X.clientX}}))})))))))}),_j=w.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.createElement(me.div,q({},r,{ref:e}))}),n1="MenuItem",$5="menu.itemSelect",Lj=w.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,o=w.useRef(null),s=yl(n1,t.__scopeMenu),a=pp(n1,t.__scopeMenu),c=ye(e,o),f=w.useRef(!1),h=()=>{const d=o.current;if(!n&&d){const p=new CustomEvent($5,{bubbles:!0,cancelable:!0});d.addEventListener($5,b=>r?.(b),{once:!0}),Cv(d,p),p.defaultPrevented?f.current=!1:s.onClose()}};return w.createElement(ry,q({},i,{ref:c,disabled:n,onClick:re(t.onClick,h),onPointerDown:d=>{var p;(p=t.onPointerDown)===null||p===void 0||p.call(t,d),f.current=!0},onPointerUp:re(t.onPointerUp,d=>{var p;f.current||(p=d.currentTarget)===null||p===void 0||p.click()}),onKeyDown:re(t.onKeyDown,d=>{const p=a.searchRef.current!=="";n||p&&d.key===" "||t1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),ry=w.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=t,s=pp(n1,n),a=J3(n),c=w.useRef(null),f=ye(e,c),[h,d]=w.useState(!1),[p,b]=w.useState("");return w.useEffect(()=>{const x=c.current;if(x){var v;b(((v=x.textContent)!==null&&v!==void 0?v:"").trim())}},[o.children]),w.createElement(Pa.ItemSlot,{scope:n,disabled:r,textValue:i??p},w.createElement(dp,q({asChild:!0},a,{focusable:!r}),w.createElement(me.div,q({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:f,onPointerMove:re(t.onPointerMove,Wa(x=>{r?s.onItemLeave(x):(s.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:re(t.onPointerLeave,Wa(x=>s.onItemLeave(x))),onFocus:re(t.onFocus,()=>d(!0)),onBlur:re(t.onBlur,()=>d(!1))}))))}),Bj="MenuRadioGroup";Io(Bj,{value:void 0,onValueChange:()=>{}});const Nj="MenuItemIndicator";Io(Nj,{checked:!1});const jj="MenuSub",[Bte,iy]=Io(jj),_c="MenuSubTrigger",Fj=w.forwardRef((t,e)=>{const n=_o(_c,t.__scopeMenu),r=yl(_c,t.__scopeMenu),i=iy(_c,t.__scopeMenu),o=pp(_c,t.__scopeMenu),s=w.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,f={__scopeMenu:t.__scopeMenu},h=w.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return w.useEffect(()=>h,[h]),w.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),c(null)}},[a,c]),w.createElement(ey,q({asChild:!0},f),w.createElement(ry,q({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":oy(n.open)},t,{ref:vf(e,i.onTriggerChange),onClick:d=>{var p;(p=t.onClick)===null||p===void 0||p.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:re(t.onPointerMove,Wa(d=>{o.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:re(t.onPointerLeave,Wa(d=>{var p;h();const b=(p=n.content)===null||p===void 0?void 0:p.getBoundingClientRect();if(b){var x;const v=(x=n.content)===null||x===void 0?void 0:x.dataset.side,C=v==="right",$=C?-5:5,A=b[C?"left":"right"],T=b[C?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+$,y:d.clientY},{x:A,y:b.top},{x:T,y:b.top},{x:T,y:b.bottom},{x:A,y:b.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:re(t.onKeyDown,d=>{const p=o.searchRef.current!=="";if(!(t.disabled||p&&d.key===" ")&&yj[r.dir].includes(d.key)){var b;n.onOpenChange(!0),(b=n.content)===null||b===void 0||b.focus(),d.preventDefault()}})})))}),Vj="MenuSubContent",Hj=w.forwardRef((t,e)=>{const n=ny(Qn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,o=_o(Qn,t.__scopeMenu),s=yl(Qn,t.__scopeMenu),a=iy(Vj,t.__scopeMenu),c=w.useRef(null),f=ye(e,c);return w.createElement(Pa.Provider,{scope:t.__scopeMenu},w.createElement(Tt,{present:r||o.open},w.createElement(Pa.Slot,{scope:t.__scopeMenu},w.createElement(mp,q({id:a.contentId,"aria-labelledby":a.triggerId},i,{ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var d;s.isUsingKeyboardRef.current&&((d=c.current)===null||d===void 0||d.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:re(t.onFocusOutside,h=>{h.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:re(t.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:re(t.onKeyDown,h=>{const d=h.currentTarget.contains(h.target),p=Cj[s.dir].includes(h.key);if(d&&p){var b;o.onOpenChange(!1),(b=a.trigger)===null||b===void 0||b.focus(),h.preventDefault()}})})))))});function oy(t){return t?"open":"closed"}function Pj(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function Wj(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function zj(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let s=Wj(t,Math.max(o,0));i.length===1&&(s=s.filter(f=>f!==n));const c=s.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Uj(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o].x,c=e[o].y,f=e[s].x,h=e[s].y;c>r!=h>r&&n<(f-a)*(r-c)/(h-c)+a&&(i=!i)}return i}function qj(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Uj(n,e)}function Wa(t){return e=>e.pointerType==="mouse"?t(e):void 0}const Kj=kj,Gj=ey,Yj=Ej,Xj=Oj,Qj=_j,Zj=Lj,Jj=Fj,eF=Hj,sy="DropdownMenu",[tF,Nte]=wt(sy,[Z3]),Pi=Z3(),[nF,ay]=tF(sy),rF=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=t,c=Pi(e),f=w.useRef(null),[h=!1,d]=_t({prop:i,defaultProp:o,onChange:s});return w.createElement(nF,{scope:e,triggerId:Lt(),triggerRef:f,contentId:Lt(),open:h,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(p=>!p),[d]),modal:a},w.createElement(Kj,q({},c,{open:h,onOpenChange:d,dir:r,modal:a}),n))},iF="DropdownMenuTrigger",oF=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,o=ay(iF,n),s=Pi(n);return w.createElement(Gj,q({asChild:!0},s),w.createElement(me.button,q({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:vf(e,o.triggerRef),onPointerDown:re(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:re(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),sF=t=>{const{__scopeDropdownMenu:e,...n}=t,r=Pi(e);return w.createElement(Yj,q({},r,n))},aF="DropdownMenuContent",lF=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ay(aF,n),o=Pi(n),s=w.useRef(!1);return w.createElement(Xj,q({id:i.contentId,"aria-labelledby":i.triggerId},o,r,{ref:e,onCloseAutoFocus:re(t.onCloseAutoFocus,a=>{var c;s.current||(c=i.triggerRef.current)===null||c===void 0||c.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:re(t.onInteractOutside,a=>{const c=a.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0,h=c.button===2||f;(!i.modal||h)&&(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),cF=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Pi(n);return w.createElement(Qj,q({},i,r,{ref:e}))}),uF=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Pi(n);return w.createElement(Zj,q({},i,r,{ref:e}))}),fF=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Pi(n);return w.createElement(Jj,q({},i,r,{ref:e}))}),hF=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Pi(n);return w.createElement(eF,q({},i,r,{ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),dF=rF,gF=oF,ly=sF,pF=lF,mF=cF,bF=uF,wF=fF,xF=hF,cy="Checkbox",[vF,jte]=wt(cy),[yF,CF]=vF(cy),$F=w.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:f,...h}=t,[d,p]=w.useState(null),b=ye(e,T=>p(T)),x=w.useRef(!1),v=d?!!d.closest("form"):!0,[C=!1,$]=_t({prop:i,defaultProp:o,onChange:f}),A=w.useRef(C);return w.useEffect(()=>{const T=d?.form;if(T){const M=()=>$(A.current);return T.addEventListener("reset",M),()=>T.removeEventListener("reset",M)}},[d,$]),w.createElement(yF,{scope:n,state:C,disabled:a},w.createElement(me.button,q({type:"button",role:"checkbox","aria-checked":fo(C)?"mixed":C,"aria-required":s,"data-state":uy(C),"data-disabled":a?"":void 0,disabled:a,value:c},h,{ref:b,onKeyDown:re(t.onKeyDown,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:re(t.onClick,T=>{$(M=>fo(M)?!0:!M),v&&(x.current=T.isPropagationStopped(),x.current||T.stopPropagation())})})),v&&w.createElement(RF,{control:d,bubbles:!x.current,name:r,value:c,checked:C,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),SF="CheckboxIndicator",AF=w.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...i}=t,o=CF(SF,n);return w.createElement(Tt,{present:r||fo(o.state)||o.state===!0},w.createElement(me.span,q({"data-state":uy(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),RF=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=w.useRef(null),s=Tf(n),a=$f(e);return w.useEffect(()=>{const c=o.current,f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&d){const p=new Event("click",{bubbles:r});c.indeterminate=fo(n),d.call(c,fo(n)?!1:n),c.dispatchEvent(p)}},[s,n,r]),w.createElement("input",q({type:"checkbox","aria-hidden":!0,defaultChecked:fo(n)?!1:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fo(t){return t==="indeterminate"}function uy(t){return fo(t)?"indeterminate":t?"checked":"unchecked"}const kF=$F,TF=AF,fy="Dialog",[hy,dy]=wt(fy),[EF,ir]=hy(fy),MF=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=t,a=w.useRef(null),c=w.useRef(null),[f=!1,h]=_t({prop:r,defaultProp:i,onChange:o});return w.createElement(EF,{scope:e,triggerRef:a,contentRef:c,contentId:Lt(),titleId:Lt(),descriptionId:Lt(),open:f,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(d=>!d),[h]),modal:s},n)},OF="DialogTrigger",DF=w.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=ir(OF,n),o=ye(e,i.triggerRef);return w.createElement(me.button,q({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":bp(i.open)},r,{ref:o,onClick:re(t.onClick,i.onOpenToggle)}))}),gy="DialogPortal",[IF,py]=hy(gy,{forceMount:void 0}),_F=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=ir(gy,e);return w.createElement(IF,{scope:e,forceMount:n},w.Children.map(r,s=>w.createElement(Tt,{present:n||o.open},w.createElement(Ws,{asChild:!0,container:i},s))))},r1="DialogOverlay",LF=w.forwardRef((t,e)=>{const n=py(r1,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=ir(r1,t.__scopeDialog);return o.modal?w.createElement(Tt,{present:r||o.open},w.createElement(BF,q({},i,{ref:e}))):null}),BF=w.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=ir(r1,n);return w.createElement(Lf,{as:$r,allowPinchZoom:!0,shards:[i.contentRef]},w.createElement(me.div,q({"data-state":bp(i.open)},r,{ref:e,style:{pointerEvents:"auto",...r.style}})))}),Es="DialogContent",NF=w.forwardRef((t,e)=>{const n=py(Es,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=ir(Es,t.__scopeDialog);return w.createElement(Tt,{present:r||o.open},o.modal?w.createElement(jF,q({},i,{ref:e})):w.createElement(FF,q({},i,{ref:e})))}),jF=w.forwardRef((t,e)=>{const n=ir(Es,t.__scopeDialog),r=w.useRef(null),i=ye(e,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return ml(o)},[]),w.createElement(my,q({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(t.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:re(t.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:re(t.onFocusOutside,o=>o.preventDefault())}))}),FF=w.forwardRef((t,e)=>{const n=ir(Es,t.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return w.createElement(my,q({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=t.onInteractOutside)===null||s===void 0||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),my=w.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=t,a=ir(Es,n),c=w.useRef(null),f=ye(e,c);return pl(),w.createElement(w.Fragment,null,w.createElement(zs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},w.createElement(Mo,q({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":bp(a.open)},s,{ref:f,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),by="DialogTitle",VF=w.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=ir(by,n);return w.createElement(me.h2,q({id:i.titleId},r,{ref:e}))}),HF="DialogDescription",PF=w.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=ir(HF,n);return w.createElement(me.p,q({id:i.descriptionId},r,{ref:e}))}),WF="DialogClose",zF=w.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=ir(WF,n);return w.createElement(me.button,q({type:"button"},r,{ref:e,onClick:re(t.onClick,()=>i.onOpenChange(!1))}))});function bp(t){return t?"open":"closed"}const UF="DialogTitleWarning",[qF,Fte]=yg(UF,{contentName:Es,titleName:by,docsSlug:"dialog"}),wy=MF,xy=DF,vy=_F,yy=LF,Cy=NF,$y=VF,KF=PF,wp=zF,GF="AlertDialog",[YF,Vte]=wt(GF,[dy]),li=dy(),XF=t=>{const{__scopeAlertDialog:e,...n}=t,r=li(e);return w.createElement(wy,q({},r,n,{modal:!0}))},QF=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=li(n);return w.createElement(xy,q({},i,r,{ref:e}))}),ZF=t=>{const{__scopeAlertDialog:e,...n}=t,r=li(e);return w.createElement(vy,q({},r,n))},JF=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=li(n);return w.createElement(yy,q({},i,r,{ref:e}))}),Sy="AlertDialogContent",[eV,tV]=YF(Sy),nV=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...i}=t,o=li(n),s=w.useRef(null),a=ye(e,s),c=w.useRef(null);return w.createElement(qF,{contentName:Sy,titleName:rV,docsSlug:"alert-dialog"},w.createElement(eV,{scope:n,cancelRef:c},w.createElement(Cy,q({role:"alertdialog"},o,i,{ref:a,onOpenAutoFocus:re(i.onOpenAutoFocus,f=>{var h;f.preventDefault(),(h=c.current)===null||h===void 0||h.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault()}),w.createElement(Cg,null,r),!1)))}),rV="AlertDialogTitle",iV=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=li(n);return w.createElement($y,q({},i,r,{ref:e}))}),oV=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=li(n);return w.createElement(KF,q({},i,r,{ref:e}))}),sV=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=li(n);return w.createElement(wp,q({},i,r,{ref:e}))}),aV="AlertDialogCancel",lV=w.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:i}=tV(aV,n),o=li(n),s=ye(e,i);return w.createElement(wp,q({},o,r,{ref:s}))}),cV=XF,uV=QF,fV=ZF,hV=JF,dV=nV,gV=sV,pV=lV,mV=iV,bV=oV,Du=Math.min,ho=Math.max,Iu=Math.round,Lc=Math.floor,vr=t=>({x:t,y:t}),wV={left:"right",right:"left",bottom:"top",top:"bottom"},xV={start:"end",end:"start"};function S5(t,e,n){return ho(t,Du(e,n))}function Nf(t,e){return typeof t=="function"?t(e):t}function vo(t){return t.split("-")[0]}function jf(t){return t.split("-")[1]}function Ay(t){return t==="x"?"y":"x"}function Ry(t){return t==="y"?"height":"width"}function Ms(t){return["top","bottom"].includes(vo(t))?"y":"x"}function ky(t){return Ay(Ms(t))}function vV(t,e,n){n===void 0&&(n=!1);const r=jf(t),i=ky(t),o=Ry(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=_u(s)),[s,_u(s)]}function yV(t){const e=_u(t);return[i1(t),e,i1(e)]}function i1(t){return t.replace(/start|end/g,e=>xV[e])}function CV(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 $V(t,e,n,r){const i=jf(t);let o=CV(vo(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(i1)))),o}function _u(t){return t.replace(/left|right|bottom|top/g,e=>wV[e])}function SV(t){return{top:0,right:0,bottom:0,left:0,...t}}function AV(t){return typeof t!="number"?SV(t):{top:t,right:t,bottom:t,left:t}}function Lu(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 A5(t,e,n){let{reference:r,floating:i}=t;const o=Ms(e),s=ky(e),a=Ry(s),c=vo(e),f=o==="y",h=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let b;switch(c){case"top":b={x:h,y:r.y-i.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:d};break;case"left":b={x:r.x-i.width,y:d};break;default:b={x:r.x,y:r.y}}switch(jf(e)){case"start":b[s]-=p*(n&&f?-1:1);break;case"end":b[s]+=p*(n&&f?-1:1);break}return b}const RV=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:h,y:d}=A5(f,r,c),p=r,b={},x=0;for(let v=0;v<a.length;v++){const{name:C,fn:$}=a[v],{x:A,y:T,data:M,reset:O}=await $({x:h,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:b,rects:f,platform:s,elements:{reference:t,floating:e}});h=A??h,d=T??d,b={...b,[C]:{...b[C],...M}},O&&x<=50&&(x++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(f=O.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:h,y:d}=A5(f,p,c)),v=-1)}return{x:h,y:d,placement:p,strategy:i,middlewareData:b}};async function Ty(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=t,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:p=!1,padding:b=0}=Nf(e,t),x=AV(b),C=a[p?d==="floating"?"reference":"floating":d],$=Lu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:f,rootBoundary:h,strategy:c})),A=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),M=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},O=Lu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:T,strategy:c}):A);return{top:($.top-O.top+x.top)/M.y,bottom:(O.bottom-$.bottom+x.bottom)/M.y,left:($.left-O.left+x.left)/M.x,right:(O.right-$.right+x.right)/M.x}}const kV=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:c,elements:f}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...C}=Nf(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const $=vo(i),A=Ms(a),T=vo(a)===a,M=await(c.isRTL==null?void 0:c.isRTL(f.floating)),O=p||(T||!v?[_u(a)]:yV(a)),I=x!=="none";!p&&I&&O.push(...$V(a,v,x,M));const _=[a,...O],V=await Ty(e,C),F=[];let H=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&F.push(V[$]),d){const K=vV(i,s,M);F.push(V[K[0]],V[K[1]])}if(H=[...H,{placement:i,overflows:F}],!F.every(K=>K<=0)){var z,W;const K=(((z=o.flip)==null?void 0:z.index)||0)+1,te=_[K];if(te)return{data:{index:K,overflows:H},reset:{placement:te}};let ie=(W=H.filter(ne=>ne.overflows[0]<=0).sort((ne,oe)=>ne.overflows[1]-oe.overflows[1])[0])==null?void 0:W.placement;if(!ie)switch(b){case"bestFit":{var Y;const ne=(Y=H.filter(oe=>{if(I){const X=Ms(oe.placement);return X===A||X==="y"}return!0}).map(oe=>[oe.placement,oe.overflows.filter(X=>X>0).reduce((X,ce)=>X+ce,0)]).sort((oe,X)=>oe[1]-X[1])[0])==null?void 0:Y[0];ne&&(ie=ne);break}case"initialPlacement":ie=a;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}};async function TV(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=vo(n),a=jf(n),c=Ms(n)==="y",f=["left","top"].includes(s)?-1:1,h=o&&c?-1:1,d=Nf(e,t);let{mainAxis:p,crossAxis:b,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof x=="number"&&(b=a==="end"?x*-1:x),c?{x:b*h,y:p*f}:{x:p*f,y:b*h}}const EV=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,c=await TV(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},MV=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:C=>{let{x:$,y:A}=C;return{x:$,y:A}}},...c}=Nf(t,e),f={x:n,y:r},h=await Ty(e,c),d=Ms(vo(i)),p=Ay(d);let b=f[p],x=f[d];if(o){const C=p==="y"?"top":"left",$=p==="y"?"bottom":"right",A=b+h[C],T=b-h[$];b=S5(A,b,T)}if(s){const C=d==="y"?"top":"left",$=d==="y"?"bottom":"right",A=x+h[C],T=x-h[$];x=S5(A,x,T)}const v=a.fn({...e,[p]:b,[d]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[d]:s}}}}}};function Ff(){return typeof window<"u"}function Ks(t){return Ey(t)?(t.nodeName||"").toLowerCase():"#document"}function kn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Tr(t){var e;return(e=(Ey(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ey(t){return Ff()?t instanceof Node||t instanceof kn(t).Node:!1}function Jn(t){return Ff()?t instanceof Element||t instanceof kn(t).Element:!1}function Ar(t){return Ff()?t instanceof HTMLElement||t instanceof kn(t).HTMLElement:!1}function R5(t){return!Ff()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kn(t).ShadowRoot}function Cl(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=er(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function OV(t){return["table","td","th"].includes(Ks(t))}function Vf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function xp(t){const e=vp(),n=Jn(t)?er(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 DV(t){let e=Di(t);for(;Ar(e)&&!Os(e);){if(xp(e))return e;if(Vf(e))return null;e=Di(e)}return null}function vp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Os(t){return["html","body","#document"].includes(Ks(t))}function er(t){return kn(t).getComputedStyle(t)}function Hf(t){return Jn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Di(t){if(Ks(t)==="html")return t;const e=t.assignedSlot||t.parentNode||R5(t)&&t.host||Tr(t);return R5(e)?e.host:e}function My(t){const e=Di(t);return Os(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ar(e)&&Cl(e)?e:My(e)}function za(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=My(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=kn(i);if(o){const a=o1(s);return e.concat(s,s.visualViewport||[],Cl(i)?i:[],a&&n?za(a):[])}return e.concat(i,za(i,[],n))}function o1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Oy(t){const e=er(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ar(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Iu(n)!==o||Iu(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function yp(t){return Jn(t)?t:t.contextElement}function ms(t){const e=yp(t);if(!Ar(e))return vr(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=Oy(e);let s=(o?Iu(n.width):n.width)/r,a=(o?Iu(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const IV=vr(0);function Dy(t){const e=kn(t);return!vp()||!e.visualViewport?IV:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _V(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==kn(t)?!1:e}function yo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=yp(t);let s=vr(1);e&&(r?Jn(r)&&(s=ms(r)):s=ms(t));const a=_V(o,n,r)?Dy(o):vr(0);let c=(i.left+a.x)/s.x,f=(i.top+a.y)/s.y,h=i.width/s.x,d=i.height/s.y;if(o){const p=kn(o),b=r&&Jn(r)?kn(r):r;let x=p,v=o1(x);for(;v&&r&&b!==x;){const C=ms(v),$=v.getBoundingClientRect(),A=er(v),T=$.left+(v.clientLeft+parseFloat(A.paddingLeft))*C.x,M=$.top+(v.clientTop+parseFloat(A.paddingTop))*C.y;c*=C.x,f*=C.y,h*=C.x,d*=C.y,c+=T,f+=M,x=kn(v),v=o1(x)}}return Lu({width:h,height:d,x:c,y:f})}function Cp(t,e){const n=Hf(t).scrollLeft;return e?e.left+n:yo(Tr(t)).left+n}function Iy(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Cp(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function LV(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Tr(r),a=e?Vf(e.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},f=vr(1);const h=vr(0),d=Ar(r);if((d||!d&&!o)&&((Ks(r)!=="body"||Cl(s))&&(c=Hf(r)),Ar(r))){const b=yo(r);f=ms(r),h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}const p=s&&!d&&!o?Iy(s,c,!0):vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+p.x,y:n.y*f.y-c.scrollTop*f.y+h.y+p.y}}function BV(t){return Array.from(t.getClientRects())}function NV(t){const e=Tr(t),n=Hf(t),r=t.ownerDocument.body,i=ho(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=ho(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Cp(t);const a=-n.scrollTop;return er(r).direction==="rtl"&&(s+=ho(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function jV(t,e){const n=kn(t),r=Tr(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const f=vp();(!f||f&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function FV(t,e){const n=yo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=Ar(t)?ms(t):vr(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:s,height:a,x:c,y:f}}function k5(t,e,n){let r;if(e==="viewport")r=jV(t,n);else if(e==="document")r=NV(Tr(t));else if(Jn(e))r=FV(e,n);else{const i=Dy(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Lu(r)}function _y(t,e){const n=Di(t);return n===e||!Jn(n)||Os(n)?!1:er(n).position==="fixed"||_y(n,e)}function VV(t,e){const n=e.get(t);if(n)return n;let r=za(t,[],!1).filter(a=>Jn(a)&&Ks(a)!=="body"),i=null;const o=er(t).position==="fixed";let s=o?Di(t):t;for(;Jn(s)&&!Os(s);){const a=er(s),c=xp(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Cl(s)&&!c&&_y(t,s))?r=r.filter(h=>h!==s):i=a,s=Di(s)}return e.set(t,r),r}function HV(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?Vf(e)?[]:VV(e,this._c):[].concat(n),r],a=s[0],c=s.reduce((f,h)=>{const d=k5(e,h,i);return f.top=ho(d.top,f.top),f.right=Du(d.right,f.right),f.bottom=Du(d.bottom,f.bottom),f.left=ho(d.left,f.left),f},k5(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function PV(t){const{width:e,height:n}=Oy(t);return{width:e,height:n}}function WV(t,e,n){const r=Ar(e),i=Tr(e),o=n==="fixed",s=yo(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const c=vr(0);if(r||!r&&!o)if((Ks(e)!=="body"||Cl(i))&&(a=Hf(e)),r){const p=yo(e,!0,o,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else i&&(c.x=Cp(i));const f=i&&!r&&!o?Iy(i,a):vr(0),h=s.left+a.scrollLeft-c.x-f.x,d=s.top+a.scrollTop-c.y-f.y;return{x:h,y:d,width:s.width,height:s.height}}function Qd(t){return er(t).position==="static"}function T5(t,e){if(!Ar(t)||er(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Tr(t)===n&&(n=n.ownerDocument.body),n}function Ly(t,e){const n=kn(t);if(Vf(t))return n;if(!Ar(t)){let i=Di(t);for(;i&&!Os(i);){if(Jn(i)&&!Qd(i))return i;i=Di(i)}return n}let r=T5(t,e);for(;r&&OV(r)&&Qd(r);)r=T5(r,e);return r&&Os(r)&&Qd(r)&&!xp(r)?n:r||DV(t)||n}const zV=async function(t){const e=this.getOffsetParent||Ly,n=this.getDimensions,r=await n(t.floating);return{reference:WV(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UV(t){return er(t).direction==="rtl"}const qV={convertOffsetParentRelativeRectToViewportRelativeRect:LV,getDocumentElement:Tr,getClippingRect:HV,getOffsetParent:Ly,getElementRects:zV,getClientRects:BV,getDimensions:PV,getScale:ms,isElement:Jn,isRTL:UV};function By(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function KV(t,e){let n=null,r;const i=Tr(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const f=t.getBoundingClientRect(),{left:h,top:d,width:p,height:b}=f;if(a||e(),!p||!b)return;const x=Lc(d),v=Lc(i.clientWidth-(h+p)),C=Lc(i.clientHeight-(d+b)),$=Lc(h),T={rootMargin:-x+"px "+-v+"px "+-C+"px "+-$+"px",threshold:ho(0,Du(1,c))||1};let M=!0;function O(I){const _=I[0].intersectionRatio;if(_!==c){if(!M)return s();_?s(!1,_):r=setTimeout(()=>{s(!1,1e-7)},1e3)}_===1&&!By(f,t.getBoundingClientRect())&&s(),M=!1}try{n=new IntersectionObserver(O,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(t)}return s(!0),o}function GV(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:c=!1}=r,f=yp(t),h=i||o?[...f?za(f):[],...za(e)]:[];h.forEach($=>{i&&$.addEventListener("scroll",n,{passive:!0}),o&&$.addEventListener("resize",n)});const d=f&&a?KV(f,n):null;let p=-1,b=null;s&&(b=new ResizeObserver($=>{let[A]=$;A&&A.target===f&&b&&(b.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(e)})),n()}),f&&!c&&b.observe(f),b.observe(e));let x,v=c?yo(t):null;c&&C();function C(){const $=yo(t);v&&!By(v,$)&&n(),v=$,x=requestAnimationFrame(C)}return n(),()=>{var $;h.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),d?.(),($=b)==null||$.disconnect(),b=null,c&&cancelAnimationFrame(x)}}const YV=EV,XV=MV,QV=kV,ZV=(t,e,n)=>{const r=new Map,i={platform:qV,...n},o={...i.platform,_c:r};return RV(t,e,{...i,platform:o})};var uu=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Bu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Bu(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Bu(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Ny(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function E5(t,e){const n=Ny(t);return Math.round(e*n)/n}function M5(t){const e=S.useRef(t);return uu(()=>{e.current=t}),e}function JV(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:f}=t,[h,d]=S.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,b]=S.useState(r);Bu(p,r)||b(r);const[x,v]=S.useState(null),[C,$]=S.useState(null),A=S.useCallback(ne=>{ne!==I.current&&(I.current=ne,v(ne))},[]),T=S.useCallback(ne=>{ne!==_.current&&(_.current=ne,$(ne))},[]),M=o||x,O=s||C,I=S.useRef(null),_=S.useRef(null),V=S.useRef(h),F=c!=null,H=M5(c),z=M5(i),W=S.useCallback(()=>{if(!I.current||!_.current)return;const ne={placement:e,strategy:n,middleware:p};z.current&&(ne.platform=z.current),ZV(I.current,_.current,ne).then(oe=>{const X={...oe,isPositioned:!0};Y.current&&!Bu(V.current,X)&&(V.current=X,Eo.flushSync(()=>{d(X)}))})},[p,e,n,z]);uu(()=>{f===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,d(ne=>({...ne,isPositioned:!1})))},[f]);const Y=S.useRef(!1);uu(()=>(Y.current=!0,()=>{Y.current=!1}),[]),uu(()=>{if(M&&(I.current=M),O&&(_.current=O),M&&O){if(H.current)return H.current(M,O,W);W()}},[M,O,W,H,F]);const K=S.useMemo(()=>({reference:I,floating:_,setReference:A,setFloating:T}),[A,T]),te=S.useMemo(()=>({reference:M,floating:O}),[M,O]),ie=S.useMemo(()=>{const ne={position:n,left:0,top:0};if(!te.floating)return ne;const oe=E5(te.floating,h.x),X=E5(te.floating,h.y);return a?{...ne,transform:"translate("+oe+"px, "+X+"px)",...Ny(te.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:X}},[n,a,te.floating,h.x,h.y]);return S.useMemo(()=>({...h,update:W,refs:K,elements:te,floatingStyles:ie}),[h,W,K,te,ie])}const eH=(t,e)=>({...YV(t),options:[t,e]}),tH=(t,e)=>({...XV(t),options:[t,e]}),nH=(t,e)=>({...QV(t),options:[t,e]});var jy=Og(),Zd=function(){},Pf=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:Zd,onWheelCapture:Zd,onTouchMoveCapture:Zd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,f=t.removeScrollBar,h=t.enabled,d=t.shards,p=t.sideCar,b=t.noIsolation,x=t.inert,v=t.allowPinchZoom,C=t.as,$=C===void 0?"div":C,A=t.gapMode,T=bl(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=p,O=Mg([n,e]),I=exports.__assign(exports.__assign({},T),i);return S.createElement(S.Fragment,null,h&&S.createElement(M,{sideCar:jy,removeScrollBar:f,shards:d,noIsolation:b,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:A}),s?S.cloneElement(S.Children.only(a),exports.__assign(exports.__assign({},I),{ref:O})):S.createElement($,exports.__assign({},I,{className:c,ref:O}),a))});Pf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pf.classNames={fullWidth:gs,zeroRight:ds};var s1=!1;if(typeof window<"u")try{var Bc=Object.defineProperty({},"passive",{get:function(){return s1=!0,!0}});window.addEventListener("test",Bc,Bc),window.removeEventListener("test",Bc,Bc)}catch{s1=!1}var rs=s1?{passive:!1}:!1,rH=function(t){return t.tagName==="TEXTAREA"},Fy=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!rH(t)&&n[e]==="visible")},iH=function(t){return Fy(t,"overflowY")},oH=function(t){return Fy(t,"overflowX")},O5=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Vy(t,r);if(i){var o=Hy(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sH=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},aH=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Vy=function(t,e){return t==="v"?iH(e):oH(e)},Hy=function(t,e){return t==="v"?sH(e):aH(e)},lH=function(t,e){return t==="h"&&e==="rtl"?-1:1},cH=function(t,e,n,r,i){var o=lH(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),f=!1,h=s>0,d=0,p=0;do{var b=Hy(t,a),x=b[0],v=b[1],C=b[2],$=v-C-o*x;(x||$)&&Vy(t,a)&&(d+=$,p+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(f=!0),f},Nc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},D5=function(t){return[t.deltaX,t.deltaY]},I5=function(t){return t&&"current"in t?t.current:t},uH=function(t,e){return t[0]===e[0]&&t[1]===e[1]},fH=function(t){return`
|
|
45
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
46
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
47
|
+
`)},hH=0,is=[];function dH(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(hH++)[0],o=S.useState(Rf)[0],s=S.useRef(t);S.useEffect(function(){s.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Eg([t.lockRef.current],(t.shards||[]).map(I5),!0).filter(Boolean);return v.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(v,C){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var $=Nc(v),A=n.current,T="deltaX"in v?v.deltaX:A[0]-$[0],M="deltaY"in v?v.deltaY:A[1]-$[1],O,I=v.target,_=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in v&&_==="h"&&I.type==="range")return!1;var V=O5(_,I);if(!V)return!0;if(V?O=_:(O=_==="v"?"h":"v",V=O5(_,I)),!V)return!1;if(!r.current&&"changedTouches"in v&&(T||M)&&(r.current=O),!O)return!0;var F=r.current||O;return cH(F,C,v,F==="h"?T:M)},[]),c=S.useCallback(function(v){var C=v;if(!(!is.length||is[is.length-1]!==o)){var $="deltaY"in C?D5(C):Nc(C),A=e.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&uH(O.delta,$)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var T=(s.current.shards||[]).map(I5).filter(Boolean).filter(function(O){return O.contains(C.target)}),M=T.length>0?a(C,T[0]):!s.current.noIsolation;M&&C.cancelable&&C.preventDefault()}}},[]),f=S.useCallback(function(v,C,$,A){var T={name:v,delta:C,target:$,should:A,shadowParent:gH($)};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(M){return M!==T})},1)},[]),h=S.useCallback(function(v){n.current=Nc(v),r.current=void 0},[]),d=S.useCallback(function(v){f(v.type,D5(v),v.target,a(v,t.lockRef.current))},[]),p=S.useCallback(function(v){f(v.type,Nc(v),v.target,a(v,t.lockRef.current))},[]);S.useEffect(function(){return is.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,rs),document.addEventListener("touchmove",c,rs),document.addEventListener("touchstart",h,rs),function(){is=is.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,rs),document.removeEventListener("touchmove",c,rs),document.removeEventListener("touchstart",h,rs)}},[]);var b=t.removeScrollBar,x=t.inert;return S.createElement(S.Fragment,null,x?S.createElement(o,{styles:fH(i)}):null,b?S.createElement(Ig,{gapMode:t.gapMode}):null)}function gH(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const pH=Dg(jy,dH);var Py=S.forwardRef(function(t,e){return S.createElement(Pf,exports.__assign({},t,{ref:e,sideCar:pH}))});Py.classNames=Pf.classNames;const Wy=1024;let mH=0,Jd=class{constructor(e,n){this.from=e,this.to=n}};class je{constructor(e={}){this.id=mH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=dn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}je.closedBy=new je({deserialize:t=>t.split(" ")});je.openedBy=new je({deserialize:t=>t.split(" ")});je.group=new je({deserialize:t=>t.split(" ")});je.isolate=new je({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});je.contextHash=new je({perNode:!0});je.lookAhead=new je({perNode:!0});je.mounted=new je({perNode:!0});class Nu{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[je.mounted.id]}}const bH=Object.create(null);class dn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):bH,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new dn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(je.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(je.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}dn.none=new dn("",Object.create(null),0,8);class $p{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new dn(r.name,i,r.id,r.flags):r)}return new $p(n)}}const jc=new WeakMap,_5=new WeakMap;var Ot;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Ot||(Ot={}));class Ct{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Nu.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new l1(this.topNode,e)}cursorAt(e,n=0,r=0){let i=jc.get(this)||this.topNode,o=new l1(i);return o.moveTo(e,n),jc.set(this,o._tree),o}get topNode(){return new Fn(this,0,0,null)}resolve(e,n=0){let r=Ua(jc.get(this)||this.topNode,e,n,!1);return jc.set(this,r),r}resolveInner(e,n=0){let r=Ua(_5.get(this)||this.topNode,e,n,!0);return _5.set(this,r),r}resolveStack(e,n=0){return vH(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Ot.IncludeAnonymous)>0;for(let c=this.cursor(s|Ot.IncludeAnonymous);;){let f=!1;if(c.from<=o&&c.to>=i&&(!a&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;f=!0}for(;f&&r&&(a||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;f=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Rp(dn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Ct(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Ct(dn.none,n,r,i)))}static build(e){return yH(e)}}Ct.empty=new Ct(dn.none,[],[],0);class Sp{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Sp(this.buffer,this.index)}}class Ii{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return dn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let c=e;c!=n&&!(zy(o,i,s[c+1],s[c+2])&&(a=c,r>0));c=s[c+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,c=0;a<n;){o[c++]=i[a++],o[c++]=i[a++]-r;let f=o[c++]=i[a++]-r;o[c++]=i[a++]-e,s=Math.max(s,f)}return new Ii(o,s,this.set)}}function zy(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Ua(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Fn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Ot.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Fn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class Uy{cursor(e=0){return new l1(this,e)}getChild(e,n=null,r=null){let i=L5(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return L5(this,e,n,r)}resolve(e,n=0){return Ua(this,e,n,!1)}resolveInner(e,n=0){return Ua(this,e,n,!0)}matchContext(e){return a1(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Fn extends Uy{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:c}=s._tree,f=n>0?a.length:-1;e!=f;e+=n){let h=a[e],d=c[e]+s.from;if(zy(i,r,d,d+h.length)){if(h instanceof Ii){if(o&Ot.ExcludeBuffers)continue;let p=h.findChild(0,h.buffer.length,n,r-d,i);if(p>-1)return new Si(new wH(s,h,e,d),null,p)}else if(o&Ot.IncludeAnonymous||!h.type.isAnonymous||Ap(h)){let p;if(!(o&Ot.IgnoreMounts)&&(p=Nu.get(h))&&!p.overlay)return new Fn(p.tree,d,e,s);let b=new Fn(h,d,e,s);return o&Ot.IncludeAnonymous||!b.type.isAnonymous?b:b.nextChild(n<0?h.children.length-1:0,n,r,i)}}}if(o&Ot.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Ot.IgnoreOverlays)&&(i=Nu.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new Fn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function L5(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function a1(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class wH{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Si extends Uy{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Si(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Ot.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Si(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Si(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Si(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Ct(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function qy(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Fn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new xH(i,n)}class xH{constructor(e,n){this.heads=e,this.node=n}get next(){return qy(this.heads)}}function vH(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Fn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Nu.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Fn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Ua(a,e,n,!1))}}return i?qy(i):r}class l1{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Fn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Fn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Ot.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ot.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ot.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Ot.IncludeAnonymous||a instanceof Ii||!a.type.isAnonymous||Ap(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new Si(this.buffer,n,this.stack[i]);return this.bufferNode=new Si(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return a1(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return a1(this._tree,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function Ap(t){return t.children.some(e=>e instanceof Ii||!e.type.isAnonymous||Ap(e))}function yH(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=Wy,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new Sp(n,n.length):n,c=r.types,f=0,h=0;function d(O,I,_,V,F,H){let{id:z,start:W,end:Y,size:K}=a,te=h,ie=f;for(;K<0;)if(a.next(),K==-1){let fe=o[z];_.push(fe),V.push(W-O);return}else if(K==-3){f=z;return}else if(K==-4){h=z;return}else throw new RangeError(`Unrecognized record size: ${K}`);let ne=c[z],oe,X,ce=W-O;if(Y-W<=i&&(X=C(a.pos-I,F))){let fe=new Uint16Array(X.size-X.skip),Me=a.pos-X.size,we=fe.length;for(;a.pos>Me;)we=$(X.start,fe,we);oe=new Ii(fe,Y-X.start,r),ce=X.start-O}else{let fe=a.pos-K;a.next();let Me=[],we=[],Ve=z>=s?z:-1,Ne=0,He=Y;for(;a.pos>fe;)Ve>=0&&a.id==Ve&&a.size>=0?(a.end<=He-i&&(x(Me,we,W,Ne,a.end,He,Ve,te,ie),Ne=Me.length,He=a.end),a.next()):H>2500?p(W,fe,Me,we):d(W,fe,Me,we,Ve,H+1);if(Ve>=0&&Ne>0&&Ne<Me.length&&x(Me,we,W,Ne,W,He,Ve,te,ie),Me.reverse(),we.reverse(),Ve>-1&&Ne>0){let pe=b(ne,ie);oe=Rp(ne,Me,we,0,Me.length,0,Y-W,pe,pe)}else oe=v(ne,Me,we,Y-W,te-Y,ie)}_.push(oe),V.push(ce)}function p(O,I,_,V){let F=[],H=0,z=-1;for(;a.pos>I;){let{id:W,start:Y,end:K,size:te}=a;if(te>4)a.next();else{if(z>-1&&Y<z)break;z<0&&(z=K-i),F.push(W,Y,K),H++,a.next()}}if(H){let W=new Uint16Array(H*4),Y=F[F.length-2];for(let K=F.length-3,te=0;K>=0;K-=3)W[te++]=F[K],W[te++]=F[K+1]-Y,W[te++]=F[K+2]-Y,W[te++]=te;_.push(new Ii(W,F[2]-Y,r)),V.push(Y-O)}}function b(O,I){return(_,V,F)=>{let H=0,z=_.length-1,W,Y;if(z>=0&&(W=_[z])instanceof Ct){if(!z&&W.type==O&&W.length==F)return W;(Y=W.prop(je.lookAhead))&&(H=V[z]+W.length+Y)}return v(O,_,V,F,H,I)}}function x(O,I,_,V,F,H,z,W,Y){let K=[],te=[];for(;O.length>V;)K.push(O.pop()),te.push(I.pop()+_-F);O.push(v(r.types[z],K,te,H-F,W-H,Y)),I.push(F-_)}function v(O,I,_,V,F,H,z){if(H){let W=[je.contextHash,H];z=z?[W].concat(z):[W]}if(F>25){let W=[je.lookAhead,F];z=z?[W].concat(z):[W]}return new Ct(O,I,_,V,z)}function C(O,I){let _=a.fork(),V=0,F=0,H=0,z=_.end-i,W={size:0,start:0,skip:0};e:for(let Y=_.pos-O;_.pos>Y;){let K=_.size;if(_.id==I&&K>=0){W.size=V,W.start=F,W.skip=H,H+=4,V+=4,_.next();continue}let te=_.pos-K;if(K<0||te<Y||_.start<z)break;let ie=_.id>=s?4:0,ne=_.start;for(_.next();_.pos>te;){if(_.size<0)if(_.size==-3)ie+=4;else break e;else _.id>=s&&(ie+=4);_.next()}F=ne,V+=K,H+=ie}return(I<0||V==O)&&(W.size=V,W.start=F,W.skip=H),W.size>4?W:void 0}function $(O,I,_){let{id:V,start:F,end:H,size:z}=a;if(a.next(),z>=0&&V<s){let W=_;if(z>4){let Y=a.pos-(z-4);for(;a.pos>Y;)_=$(O,I,_)}I[--_]=W,I[--_]=H-O,I[--_]=F-O,I[--_]=V}else z==-3?f=V:z==-4&&(h=V);return _}let A=[],T=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,A,T,-1,0);let M=(e=t.length)!==null&&e!==void 0?e:A.length?T[0]+A[0].length:0;return new Ct(c[t.topID],A.reverse(),T.reverse(),M)}const B5=new WeakMap;function fu(t,e){if(!t.isAnonymous||e instanceof Ii||e.type!=t)return 1;let n=B5.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Ct)){n=1;break}n+=fu(t,r)}B5.set(e,n)}return n}function Rp(t,e,n,r,i,o,s,a,c){let f=0;for(let x=r;x<i;x++)f+=fu(t,e[x]);let h=Math.ceil(f*1.5/8),d=[],p=[];function b(x,v,C,$,A){for(let T=C;T<$;){let M=T,O=v[T],I=fu(t,x[T]);for(T++;T<$;T++){let _=fu(t,x[T]);if(I+_>=h)break;I+=_}if(T==M+1){if(I>h){let _=x[M];b(_.children,_.positions,0,_.children.length,v[M]+A);continue}d.push(x[M])}else{let _=v[T-1]+x[T-1].length-O;d.push(Rp(t,x,v,M,T,O,_,null,c))}p.push(O+A-o)}}return b(e,n,r,i,0),(a||c)(d,p,s)}class go{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new go(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,c=0,f=0;;a++){let h=a<n.length?n[a]:null,d=h?h.fromA:1e9;if(d-c>=r)for(;s&&s.from<d;){let p=s;if(c>=p.from||d<=p.to||f){let b=Math.max(p.from,c)-f,x=Math.min(p.to,d)-f;p=b>=x?null:new go(b,x,p.tree,p.offset+f,a>0,!!h)}if(p&&i.push(p),s.to>d)break;s=o<e.length?e[o++]:null}if(!h)break;c=h.toA,f=h.toA-h.toB}return i}}class Ky{startParse(e,n,r){return typeof e=="string"&&(e=new CH(e)),r=r?r.length?r.map(i=>new Jd(i.from,i.to)):[new Jd(0,0)]:[new Jd(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class CH{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new je({perNode:!0});class ju{constructor(e,n,r,i,o,s,a,c,f,h=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=c,this.curContext=f,this.lookAhead=h,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new ju(e,[],n,r,r,0,[],0,i?new N5(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(e&262144?6:0),f=c?this.stack[c-2]:this.p.ranges[0].from,h=this.reducePos-f;h>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(f==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=f,this.p.lastBigReductionSize=h));let d=c?this.stack[c-1]:0,p=this.bufferBase+this.buffer.length-d;if(i<o.minRepeatTerm||e&131072){let b=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,f,b,p+4,!0)}if(e&262144)this.state=this.stack[c];else{let b=this.stack[c-3];this.state=o.getGoto(b,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,f)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new ju(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new $H(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,c)=>c&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let c=s&65535,f=this.stack.length-a*3;if(f>=0&&e.getGoto(this.stack[f],c,!1)>=0)return a<<19|65536|c}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new N5(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class N5{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class $H{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Fu{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Fu(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Fu(this.stack,this.pos,this.index)}}function Fc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,a=!0),o+=c,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class hu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const j5=new hu;class SH{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=j5,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=j5,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class bs{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;AH(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}bs.prototype.contextual=bs.prototype.fallback=bs.prototype.extend=!1;bs.prototype.fallback=bs.prototype.extend=!1;function AH(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:c}=n.p.parser;e:for(;a&t[s];){let f=t[s+1];for(let b=s+3;b<f;b+=2)if((t[b+1]&a)>0){let x=t[b];if(c.allows(x)&&(e.token.value==-1||e.token.value==x||RH(x,e.token.value,i,o))){e.acceptToken(x);break}}let h=e.next,d=0,p=t[s+2];if(e.next<0&&p>d&&t[f+p*3-3]==65535){s=t[f+p*3-1];continue e}for(;d<p;){let b=d+p>>1,x=f+b+(b<<1),v=t[x],C=t[x+1]||65536;if(h<v)p=b;else if(h>=C)d=b+1;else{s=t[x+2],e.advance();continue e}}break}}function F5(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function RH(t,e,n,r){let i=F5(n,r,e);return i<0||F5(n,r,t)<i}const Cn=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let e0=null;function V5(t,e,n){let r=t.cursor(Ot.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class kH{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?V5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?V5(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Ct){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let c=o.prop(je.lookAhead);if(!c||a+c<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class TH{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new hu)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let f=0;f<o.length;f++){if(!(1<<f&s))continue;let h=o[f],d=this.tokens[f];if(!(r&&!h.fallback)&&((h.contextual||d.start!=e.pos||d.mask!=s||d.context!=a)&&(this.updateCachedToken(d,h,e),d.mask=s,d.context=a),d.lookAhead>d.end+25&&(c=Math.max(d.lookAhead,c)),d.value!=0)){let p=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!h.extend&&(r=d,n>p))break}}for(;this.actions.length>n;)this.actions.pop();return c&&e.setLookAhead(c),!r&&e.pos==this.stream.end&&(r=new hu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new hu,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let c=0;c<2;c++)for(let f=s.stateSlot(o,c?2:1);;f+=3){if(a[f]==65535)if(a[f+1]==1)f=qr(a,f+2);else{i==0&&a[f+1]==2&&(i=this.putAction(qr(a,f+2),n,r,i));break}a[f]==n&&(i=this.putAction(qr(a,f+1),n,r,i))}return i}}class EH{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new SH(n,i),this.tokens=new TH(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[ju.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new kH(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let c=this.tokens.getMainToken(a);o.push(c.value,c.end)}}break}}if(!r.length){let s=i&&OH(i);if(s)return Cn&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Cn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return Cn&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,c)=>c.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let c=s+1;c<r.length;c++){let f=r[c];if(a.sameState(f)||a.buffer.length>500&&f.buffer.length>500)if((a.score-f.score||a.buffer.length-f.buffer.length)>0)r.splice(c--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=Cn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let f=e.curContext&&e.curContext.tracker.strict,h=f?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let p=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(p>-1&&d.length&&(!f||(d.prop(je.contextHash)||0)==h))return e.useNode(d,p),Cn&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Ct)||d.children.length==0||d.positions[0]>0)break;let b=d.children[0];if(b instanceof Ct&&d.positions[0]==0)d=b;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Cn&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let f=0;f<c.length;){let h=c[f++],d=c[f++],p=c[f++],b=f==c.length||!r,x=b?e:e.split(),v=this.tokens.mainToken;if(x.apply(h,d,v?v.start:x.pos,p),Cn&&console.log(s+this.stackID(x)+` (via ${h&65536?`reduce of ${o.getName(h&65535)}`:"shift"} for ${o.getName(d)} @ ${i}${x==e?"":", split"})`),b)return!0;x.pos>i?n.push(x):r.push(x)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return H5(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],c=n[s<<1],f=n[(s<<1)+1],h=Cn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Cn&&console.log(h+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let d=a.split(),p=h;for(let b=0;d.forceReduce()&&b<10&&(Cn&&console.log(p+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));b++)Cn&&(p=this.stackID(d)+" -> ");for(let b of a.recoverByInsert(c))Cn&&console.log(h+this.stackID(b)+" (via recover-insert)"),this.advanceFully(b,r);this.stream.end>a.pos?(f==a.pos&&(f++,c=0),a.recoverByDelete(c,f),Cn&&console.log(h+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),H5(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Ct.build({buffer:Fu.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(e0||(e0=new WeakMap)).get(e);return n||e0.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function H5(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class MH{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class Vu extends Ky{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,c,f){i[a].push([c,c.deserialize(String(f))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=je[c]);for(let f=1;f<a.length;){let h=a[f++];if(h>=0)o(h,c,a[f++]);else{let d=a[f+-h];for(let p=-h;p>0;p--)o(a[f++],c,d);f++}}}this.nodeSet=new $p(n.map((a,c)=>dn.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Wy;let s=Fc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(P5),this.states=Fc(e.states,Uint32Array),this.data=Fc(e.stateData),this.goto=Fc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new bs(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new EH(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,c=i[o++];if(a&&r)return c;for(let f=o+(s>>1);o<f;o++)if(i[o]==e)return c;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=qr(r,o+2)];else{if(r[o+1]==2)return qr(r,o+2);break}if(s==n||s==0)return qr(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=qr(this.data,o+2);else break;i=n(qr(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=qr(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Vu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=P5(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new MH(e,r,i)}static deserialize(e){return new Vu(e)}}function qr(t,e){return t[e]|t[e+1]<<16}function OH(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function P5(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let DH=0,Kr=class c1{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=DH++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof c1&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let i=new c1(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Hu(e);return r=>r.modified.indexOf(n)>-1?r:Hu.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},IH=0;class Hu{constructor(e){this.name=e,this.instances=[],this.id=IH++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&_H(n,a.modified));if(r)return r;let i=[],o=new Kr(e.name,i,e,n);for(let a of n)a.instances.push(o);let s=LH(n);for(let a of e.set)if(!a.modified.length)for(let c of s)i.push(Hu.get(a,c));return o}}function _H(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function LH(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Gy(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let d=0;;){if(a=="..."&&d>0&&d+3==i.length){s=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!p)throw new RangeError("Invalid path: "+i);if(o.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),d+=p[0].length,d==i.length)break;let b=i[d++];if(d==i.length&&b=="!"){s=0;break}if(b!="/")throw new RangeError("Invalid path: "+i);a=i.slice(d)}let c=o.length-1,f=o[c];if(!f)throw new RangeError("Invalid path: "+i);let h=new Pu(r,s,c>0?o.slice(0,c):null);e[f]=h.sort(e[f])}}return Yy.add(e)}const Yy=new je;class Pu{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Pu.empty=new Pu([],2,null);function Xy(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let c of a.set){let f=n[c.id];if(f){s=s?s+" "+f:f;break}}return s},scope:r}}function BH(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function NH(t,e,n,r=0,i=t.length){let o=new jH(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class jH{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:c}=e;if(a>=r||c<=n)return;s.isTop&&(o=this.highlighters.filter(b=>!b.scope||b.scope(s)));let f=i,h=FH(e)||Pu.empty,d=BH(o,h.tags);if(d&&(f&&(f+=" "),f+=d,h.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,a),f),h.opaque)return;let p=e.tree&&e.tree.prop(je.mounted);if(p&&p.overlay){let b=e.node.enter(p.overlay[0].from+a,1),x=this.highlighters.filter(C=>!C.scope||C.scope(p.tree.type)),v=e.firstChild();for(let C=0,$=a;;C++){let A=C<p.overlay.length?p.overlay[C]:null,T=A?A.from+a:c,M=Math.max(n,$),O=Math.min(r,T);if(M<O&&v)for(;e.from<O&&(this.highlightRange(e,M,O,i,o),this.startSpan(Math.min(O,e.to),f),!(e.to>=T||!e.nextSibling())););if(!A||T>r)break;$=A.to+a,$>n&&(this.highlightRange(b.cursor(),Math.max(n,A.from+a),Math.min(r,$),"",x),this.startSpan(Math.min(r,$),f))}v&&e.parent()}else if(e.firstChild()){p&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),f)}while(e.nextSibling());e.parent()}}}function FH(t){let e=t.type.prop(Yy);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const se=Kr.define,Vc=se(),yi=se(),W5=se(yi),z5=se(yi),Ci=se(),Hc=se(Ci),t0=se(Ci),gr=se(),no=se(gr),fr=se(),hr=se(),u1=se(),ba=se(u1),Pc=se(),U={comment:Vc,lineComment:se(Vc),blockComment:se(Vc),docComment:se(Vc),name:yi,variableName:se(yi),typeName:W5,tagName:se(W5),propertyName:z5,attributeName:se(z5),className:se(yi),labelName:se(yi),namespace:se(yi),macroName:se(yi),literal:Ci,string:Hc,docString:se(Hc),character:se(Hc),attributeValue:se(Hc),number:t0,integer:se(t0),float:se(t0),bool:se(Ci),regexp:se(Ci),escape:se(Ci),color:se(Ci),url:se(Ci),keyword:fr,self:se(fr),null:se(fr),atom:se(fr),unit:se(fr),modifier:se(fr),operatorKeyword:se(fr),controlKeyword:se(fr),definitionKeyword:se(fr),moduleKeyword:se(fr),operator:hr,derefOperator:se(hr),arithmeticOperator:se(hr),logicOperator:se(hr),bitwiseOperator:se(hr),compareOperator:se(hr),updateOperator:se(hr),definitionOperator:se(hr),typeOperator:se(hr),controlOperator:se(hr),punctuation:u1,separator:se(u1),bracket:ba,angleBracket:se(ba),squareBracket:se(ba),paren:se(ba),brace:se(ba),content:gr,heading:no,heading1:se(no),heading2:se(no),heading3:se(no),heading4:se(no),heading5:se(no),heading6:se(no),contentSeparator:se(gr),list:se(gr),quote:se(gr),emphasis:se(gr),strong:se(gr),link:se(gr),monospace:se(gr),strikethrough:se(gr),inserted:se(),deleted:se(),changed:se(),invalid:se(),meta:Pc,documentMeta:se(Pc),annotation:se(Pc),processingInstruction:se(Pc),definition:Kr.defineModifier("definition"),constant:Kr.defineModifier("constant"),function:Kr.defineModifier("function"),standard:Kr.defineModifier("standard"),local:Kr.defineModifier("local"),special:Kr.defineModifier("special")};for(let t in U){let e=U[t];e instanceof Kr&&(e.name=t)}Xy([{tag:U.link,class:"tok-link"},{tag:U.heading,class:"tok-heading"},{tag:U.emphasis,class:"tok-emphasis"},{tag:U.strong,class:"tok-strong"},{tag:U.keyword,class:"tok-keyword"},{tag:U.atom,class:"tok-atom"},{tag:U.bool,class:"tok-bool"},{tag:U.url,class:"tok-url"},{tag:U.labelName,class:"tok-labelName"},{tag:U.inserted,class:"tok-inserted"},{tag:U.deleted,class:"tok-deleted"},{tag:U.literal,class:"tok-literal"},{tag:U.string,class:"tok-string"},{tag:U.number,class:"tok-number"},{tag:[U.regexp,U.escape,U.special(U.string)],class:"tok-string2"},{tag:U.variableName,class:"tok-variableName"},{tag:U.local(U.variableName),class:"tok-variableName tok-local"},{tag:U.definition(U.variableName),class:"tok-variableName tok-definition"},{tag:U.special(U.variableName),class:"tok-variableName2"},{tag:U.definition(U.propertyName),class:"tok-propertyName tok-definition"},{tag:U.typeName,class:"tok-typeName"},{tag:U.namespace,class:"tok-namespace"},{tag:U.className,class:"tok-className"},{tag:U.macroName,class:"tok-macroName"},{tag:U.propertyName,class:"tok-propertyName"},{tag:U.operator,class:"tok-operator"},{tag:U.comment,class:"tok-comment"},{tag:U.meta,class:"tok-meta"},{tag:U.invalid,class:"tok-invalid"},{tag:U.punctuation,class:"tok-punctuation"}]);const VH=Gy({String:U.string,Number:U.number,"True False":U.bool,PropertyName:U.propertyName,Null:U.null,", :":U.separator,"[ ]":U.squareBracket,"{ }":U.brace}),HH=Vu.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[VH],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let f1=[],Qy=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?Qy:f1).push(n=n+t[e])})();function PH(t){if(t<768)return!1;for(let e=0,n=f1.length;;){let r=e+n>>1;if(t<f1[r])n=r;else if(t>=Qy[r])e=r+1;else return!0;if(e==n)return!1}}function U5(t){return t>=127462&&t<=127487}const q5=8205;function WH(t,e,n=!0,r=!0){return(n?Zy:zH)(t,e,r)}function Zy(t,e,n){if(e==t.length)return e;e&&Jy(t.charCodeAt(e))&&e6(t.charCodeAt(e-1))&&e--;let r=n0(t,e);for(e+=K5(r);e<t.length;){let i=n0(t,e);if(r==q5||i==q5||n&&PH(i))e+=K5(i),r=i;else if(U5(i)){let o=0,s=e-2;for(;s>=0&&U5(n0(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function zH(t,e,n){for(;e>0;){let r=Zy(t,e-2,n);if(r<e)return r;e--}return 0}function n0(t,e){let n=t.charCodeAt(e);if(!e6(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Jy(r)?(n-55296<<10)+(r-56320)+65536:n}function Jy(t){return t>=56320&&t<57344}function e6(t){return t>=55296&&t<56320}function K5(t){return t<65536?1:2}class Ge{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Ds(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),pr.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Ds(this,e,n);let r=[];return this.decompose(e,n,r,0),pr.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Da(this),o=new Da(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Da(this,e)}iterRange(e,n=this.length){return new t6(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new n6(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ge.empty:e.length<=32?new pt(e):pr.from(pt.split(e,[]))}}class pt extends Ge{constructor(e,n=UH(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new qH(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new pt(G5(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=du(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new pt(a,s.length+o.length));else{let c=a.length>>1;r.push(new pt(a.slice(0,c)),new pt(a.slice(c)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof pt))return super.replace(e,n,r);[e,n]=Ds(this,e,n);let i=du(this.text,du(r.text,G5(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new pt(i,o):pr.from(pt.split(i,[]),o)}sliceString(e,n=this.length,r=`
|
|
48
|
+
`){[e,n]=Ds(this,e,n);let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],c=o+a.length;o>e&&s&&(i+=r),e<c&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=c+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new pt(r,i)),r=[],i=-1);return i>-1&&n.push(new pt(r,i)),n}}class pr extends Ge{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,c=r+s.lines-1;if((n?c:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=c+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],c=s+a.length;if(e<=c&&n>=s){let f=i&((s<=e?1:0)|(c>=n?2:0));s>=e&&c<=n&&!f?r.push(a):a.decompose(e-s,n-s,r,f)}s=c+1}}replace(e,n,r){if([e,n]=Ds(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let c=s.replace(e-o,n-o,r),f=this.lines-s.lines+c.lines;if(c.lines<f>>4&&c.lines>f>>6){let h=this.children.slice();return h[i]=c,new pr(h,this.length-(n-e)+r.length)}return super.replace(o,a,c)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
|
|
49
|
+
`){[e,n]=Ds(this,e,n);let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],c=s+a.length;s>e&&o&&(i+=r),e<c&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=c+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof pr))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let c=this.children[i],f=e.children[o];if(c!=f)return r+c.scanIdentical(f,n);r+=c.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let b of e)r+=b.lines;if(r<32){let b=[];for(let x of e)x.flatten(b);return new pt(b,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],c=0,f=-1,h=[];function d(b){let x;if(b.lines>o&&b instanceof pr)for(let v of b.children)d(v);else b.lines>s&&(c>s||!c)?(p(),a.push(b)):b instanceof pt&&c&&(x=h[h.length-1])instanceof pt&&b.lines+x.lines<=32?(c+=b.lines,f+=b.length+1,h[h.length-1]=new pt(x.text.concat(b.text),x.length+1+b.length)):(c+b.lines>i&&p(),c+=b.lines,f+=b.length+1,h.push(b))}function p(){c!=0&&(a.push(h.length==1?h[0]:pr.from(h,f)),f=-1,c=h.length=0)}for(let b of e)d(b);return p(),a.length==1?a[0]:new pr(a,n)}}Ge.empty=new pt([""],0);function UH(t){let e=-1;for(let n of t)e+=n.length+1;return e}function du(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],c=i+a.length;c>=n&&(c>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=c+1}return e}function G5(t,e,n){return du(t,[""],e,n)}class Da{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof pt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof pt?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
50
|
+
`,this;e--}else if(i instanceof pt){let c=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,c.length>Math.max(0,e))return this.value=e==0?c:n>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=i.children[s+(n<0?-1:0)];e>c.length?(e-=c.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof pt?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class t6{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Da(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class n6{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ge.prototype[Symbol.iterator]=function(){return this.iter()},Da.prototype[Symbol.iterator]=t6.prototype[Symbol.iterator]=n6.prototype[Symbol.iterator]=function(){return this});class qH{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ds(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Ht(t,e,n=!0,r=!0){return WH(t,e,n,r)}function KH(t){return t>=56320&&t<57344}function GH(t){return t>=55296&&t<56320}function ln(t,e){let n=t.charCodeAt(e);if(!GH(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return KH(r)?(n-55296<<10)+(r-56320)+65536:n}function kp(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function mr(t){return t<65536?1:2}const h1=/\r\n?|\n/;var Jt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Jt||(Jt={}));class yr{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){d1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new yr(e)}composeDesc(e){return this.empty?e:e.empty?this:r6(this,e)}mapDesc(e,n=!1){return e.empty?this:g1(this,e,n)}mapPos(e,n=-1,r=Jt.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],c=this.sections[s++],f=i+a;if(c<0){if(f>e)return o+(e-i);o+=a}else{if(r!=Jt.Simple&&f>=e&&(r==Jt.TrackDel&&i<e&&f>e||r==Jt.TrackBefore&&i<e||r==Jt.TrackAfter&&f>e))return null;if(f>e||f==e&&n<0&&!a)return e==i||n<0?o:o+c;o+=c}i=f}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new yr(e)}static create(e){return new yr(e)}}class Rt extends yr{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return d1(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return g1(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(Ge.empty);r.push(s?e.slice(o,o+s):Ge.empty)}o+=s}return new Rt(n,r)}compose(e){return this.empty?e:e.empty?this:r6(this,e,!0)}map(e,n=!1){return e.empty?this:g1(this,e,n,!0)}iterChanges(e,n=!1){d1(this,e,n)}get desc(){return yr.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new qa(this);e:for(let s=0,a=0;;){let c=s==e.length?1e9:e[s++];for(;a<c||a==c&&o.len==0;){if(o.done)break e;let h=Math.min(o.len,c-a);Ut(i,h,-1);let d=o.ins==-1?-1:o.off==0?o.ins:0;Ut(n,h,d),d>0&&Ai(r,n,o.text),o.forward(h),a+=h}let f=e[s++];for(;a<f;){if(o.done)break e;let h=Math.min(o.len,f-a);Ut(n,h,-1),Ut(i,h,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(h),a+=h}}return{changes:new Rt(n,r),filtered:yr.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function c(h=!1){if(!h&&!i.length)return;s<n&&Ut(i,n-s,-1);let d=new Rt(i,o);a=a?a.compose(d.map(a)):d,i=[],o=[],s=0}function f(h){if(Array.isArray(h))for(let d of h)f(d);else if(h instanceof Rt){if(h.length!=n)throw new RangeError(`Mismatched change set length (got ${h.length}, expected ${n})`);c(),a=a?a.compose(h.map(a)):h}else{let{from:d,to:p=d,insert:b}=h;if(d>p||d<0||p>n)throw new RangeError(`Invalid change range ${d} to ${p} (in doc of length ${n})`);let x=b?typeof b=="string"?Ge.of(b.split(r||h1)):b:Ge.empty,v=x.length;if(d==p&&v==0)return;d<s&&c(),d>s&&Ut(i,d-s,-1),Ut(i,p-d,v),Ai(o,i,x),s=p}}return f(e),c(!a),a}static empty(e){return new Rt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Ge.empty);r[i]=Ge.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new Rt(n,r)}static createSet(e,n){return new Rt(e,n)}}function Ut(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ai(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ge.empty);t.push(n)}}function d1(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],c=t.sections[s++];if(c<0)i+=a,o+=a;else{let f=i,h=o,d=Ge.empty;for(;f+=a,h+=c,c&&r&&(d=d.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],c=t.sections[s++];e(i,f,o,h,d),i=f,o=h}}}function g1(t,e,n,r=!1){let i=[],o=r?[]:null,s=new qa(t),a=new qa(e);for(let c=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let f=Math.min(s.len,a.len);Ut(i,f,-1),s.forward(f),a.forward(f)}else if(a.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let f=a.len;for(Ut(i,a.ins,-1);f;){let h=Math.min(s.len,f);s.ins>=0&&c<s.i&&s.len<=h&&(Ut(i,0,s.ins),o&&Ai(o,i,s.text),c=s.i),s.forward(h),f-=h}a.next()}else if(s.ins>=0){let f=0,h=s.len;for(;h;)if(a.ins==-1){let d=Math.min(h,a.len);f+=d,h-=d,a.forward(d)}else if(a.ins==0&&a.len<h)h-=a.len,a.next();else break;Ut(i,f,c<s.i?s.ins:0),o&&c<s.i&&Ai(o,i,s.text),c=s.i,s.forward(s.len-h)}else{if(s.done&&a.done)return o?Rt.createSet(i,o):yr.create(i);throw new Error("Mismatched change set lengths")}}}function r6(t,e,n=!1){let r=[],i=n?[]:null,o=new qa(t),s=new qa(e);for(let a=!1;;){if(o.done&&s.done)return i?Rt.createSet(r,i):yr.create(r);if(o.ins==0)Ut(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)Ut(r,0,s.ins,a),i&&Ai(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(o.len2,s.len),f=r.length;if(o.ins==-1){let h=s.ins==-1?-1:s.off?0:s.ins;Ut(r,c,h,a),i&&h&&Ai(i,r,s.text)}else s.ins==-1?(Ut(r,o.off?0:o.len,c,a),i&&Ai(i,r,o.textBit(c))):(Ut(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&Ai(i,r,s.text));a=(o.ins>c||s.ins>=0&&s.len>c)&&(a||r.length>f),o.forward2(c),s.forward(c)}}}}class qa{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ge.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ge.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class lo{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new lo(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return J.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return J.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return J.range(e.anchor,e.head)}static create(e,n,r){return new lo(e,n,r)}}class J{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:J.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new J([this.main],0)}addRange(e,n=!0){return J.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,J.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new J(e.ranges.map(n=>lo.fromJSON(n)),e.main)}static single(e,n=e){return new J([J.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return J.normalized(e.slice(),n);r=o.to}return new J(e,n)}static cursor(e,n=0,r,i){return lo.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?lo.create(n,e,48|o):lo.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,c=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?J.range(c,a):J.range(a,c))}}return new J(e,n)}}function i6(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Tp=0;class he{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Tp++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:Ep),!!e.static,e.enables)}of(e){return new gu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new gu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new gu(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function Ep(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class gu{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=Tp++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,c=!1,f=!1,h=[];for(let d of this.dependencies)d=="doc"?c=!0:d=="selection"?f=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||h.push(e[d.id]);return{create(d){return d.values[s]=r(d),1},update(d,p){if(c&&p.docChanged||f&&(p.docChanged||p.selection)||p1(d,h)){let b=r(d);if(a?!Y5(b,d.values[s],i):!i(b,d.values[s]))return d.values[s]=b,1}return 0},reconfigure:(d,p)=>{let b,x=p.config.address[o];if(x!=null){let v=zu(p,x);if(this.dependencies.every(C=>C instanceof he?p.facet(C)===d.facet(C):C instanceof Bt?p.field(C,!1)==d.field(C,!1):!0)||(a?Y5(b=r(d),v,i):i(b=r(d),v)))return d.values[s]=v,0}else b=r(d);return d.values[s]=b,1}}}}function Y5(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function p1(t,e){let n=!1;for(let r of e)Ia(t,r)&1&&(n=!0);return n}function YH(t,e,n){let r=n.map(c=>t[c.id]),i=n.map(c=>c.type),o=r.filter(c=>!(c&1)),s=t[e.id]>>1;function a(c){let f=[];for(let h=0;h<r.length;h++){let d=zu(c,r[h]);if(i[h]==2)for(let p of d)f.push(p);else f.push(d)}return e.combine(f)}return{create(c){for(let f of r)Ia(c,f);return c.values[s]=a(c),1},update(c,f){if(!p1(c,o))return 0;let h=a(c);return e.compare(h,c.values[s])?0:(c.values[s]=h,1)},reconfigure(c,f){let h=p1(c,r),d=f.config.facets[e.id],p=f.facet(e);if(d&&!h&&Ep(n,d))return c.values[s]=p,0;let b=a(c);return e.compare(b,p)?(c.values[s]=p,0):(c.values[s]=b,1)}}}const X5=he.define({static:!0});class Bt{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new Bt(Tp++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(X5).find(r=>r.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,X5.of({field:this,create:e})]}get extension(){return this}}const oo={lowest:4,low:3,default:2,high:1,highest:0};function wa(t){return e=>new o6(e,t)}const Lo={highest:wa(oo.highest),high:wa(oo.high),default:wa(oo.default),low:wa(oo.low),lowest:wa(oo.lowest)};class o6{constructor(e,n){this.inner=e,this.prec=n}}class Wf{of(e){return new m1(this,e)}reconfigure(e){return Wf.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class m1{constructor(e,n){this.compartment=e,this.inner=n}}class Wu{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let p of XH(e,n,s))p instanceof Bt?i.push(p):(o[p.facet.id]||(o[p.facet.id]=[])).push(p);let a=Object.create(null),c=[],f=[];for(let p of i)a[p.id]=f.length<<1,f.push(b=>p.slot(b));let h=r?.config.facets;for(let p in o){let b=o[p],x=b[0].facet,v=h&&h[p]||[];if(b.every(C=>C.type==0))if(a[x.id]=c.length<<1|1,Ep(v,b))c.push(r.facet(x));else{let C=x.combine(b.map($=>$.value));c.push(r&&x.compare(C,r.facet(x))?r.facet(x):C)}else{for(let C of b)C.type==0?(a[C.id]=c.length<<1|1,c.push(C.value)):(a[C.id]=f.length<<1,f.push($=>C.dynamicSlot($)));a[x.id]=f.length<<1,f.push(C=>YH(C,x,b))}}let d=f.map(p=>p(a));return new Wu(e,s,d,a,c,o)}}function XH(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let c=i.get(s);if(c!=null){if(c<=a)return;let f=r[c].indexOf(s);f>-1&&r[c].splice(f,1),s instanceof m1&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let f of s)o(f,a);else if(s instanceof m1){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let f=e.get(s.compartment)||s.inner;n.set(s.compartment,f),o(f,a)}else if(s instanceof o6)o(s.inner,s.prec);else if(s instanceof Bt)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof gu)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,oo.default);else{let f=s.extension;if(!f)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(f,a)}}return o(t,oo.default),r.reduce((s,a)=>s.concat(a))}function Ia(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function zu(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const s6=he.define(),b1=he.define({combine:t=>t.some(e=>e),static:!0}),a6=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),l6=he.define(),c6=he.define(),u6=he.define(),f6=he.define({combine:t=>t.length?t[0]:!1});class Er{constructor(e,n){this.type=e,this.value=n}static define(){return new QH}}class QH{of(e){return new Er(this,e)}}class ZH{constructor(e){this.map=e}of(e){return new Ee(this,e)}}class Ee{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ee(this.type,n)}is(e){return this.type==e}static define(e={}){return new ZH(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Ee.reconfigure=Ee.define();Ee.appendConfig=Ee.define();class kt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&i6(r,n.newLength),o.some(a=>a.type==kt.time)||(this.annotations=o.concat(kt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new kt(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(kt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}kt.time=Er.define();kt.userEvent=Er.define();kt.addToHistory=Er.define();kt.remote=Er.define();function JH(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function h6(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=Rt.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ee.mapEffects(t.effects,i).concat(Ee.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function w1(t,e,n){let r=e.selection,i=ws(e.annotations);return e.userEvent&&(i=i.concat(kt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Rt?e.changes:Rt.of(e.changes||[],n,t.facet(a6)),selection:r&&(r instanceof J?r:J.single(r.anchor,r.head)),effects:ws(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function d6(t,e,n){let r=w1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=h6(r,w1(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=kt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return tP(n?eP(i):i)}function eP(t){let e=t.startState,n=!0;for(let i of e.facet(l6)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:JH(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=Rt.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=kt.create(e,i,t.selection&&t.selection.map(o),Ee.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(c6);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof kt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof kt?t=o[0]:t=d6(e,ws(o),!1)}return t}function tP(t){let e=t.startState,n=e.facet(u6),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=h6(r,w1(e,o,t.changes.newLength),!0))}return r==t?t:kt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const nP=[];function ws(t){return t==null?nP:Array.isArray(t)?t:[t]}var lt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(lt||(lt={}));const rP=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let x1;try{x1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function iP(t){if(x1)return x1.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||rP.test(n)))return!0}return!1}function oP(t){return e=>{if(!/\S/.test(e))return lt.Space;if(iP(e))return lt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return lt.Word;return lt.Other}}class qe{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Ia(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Ia(this,r),zu(this,r)}update(...e){return d6(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(Wf.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,f)=>i.set(f,c)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Ee.reconfigure)?(n=null,r=a.value):a.is(Ee.appendConfig)&&(n=null,r=ws(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Wu.resolve(r,i,this),o=new qe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,f)=>f.reconfigure(c,this),null).values);let s=e.startState.facet(b1)?e.newSelection:e.newSelection.asSingle();new qe(n,e.newDoc,s,o,(a,c)=>c.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:J.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=ws(r.effects);for(let a=1;a<n.ranges.length;a++){let c=e(n.ranges[a]),f=this.changes(c.changes),h=f.map(i);for(let p=0;p<a;p++)o[p]=o[p].map(h);let d=i.mapDesc(f,!0);o.push(c.range.map(d)),i=i.compose(h),s=Ee.mapEffects(s,h).concat(Ee.mapEffects(ws(c.effects),d))}return{changes:i,selection:J.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof Rt?e:Rt.of(e,this.doc.length,this.facet(qe.lineSeparator))}toText(e){return Ge.of(e.split(this.facet(qe.lineSeparator)||h1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Ia(this,n),zu(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Bt&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(c=>s.spec.fromJSON(a,c)))}}return qe.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Wu.resolve(e.extensions||[],new Map),r=e.doc instanceof Ge?e.doc:Ge.of((e.doc||"").split(n.staticFacet(qe.lineSeparator)||h1)),i=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return i6(i,r.length),n.staticFacet(b1)||(i=i.asSingle()),new qe(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||`
|
|
51
|
+
`}get readOnly(){return this.facet(f6)}phrase(e,...n){for(let r of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(s6))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return oP(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let c=Ht(n,s,!1);if(o(n.slice(c,s))!=lt.Word)break;s=c}for(;a<i;){let c=Ht(n,a);if(o(n.slice(a,c))!=lt.Word)break;a=c}return s==a?null:J.range(s+r,a+r)}}qe.allowMultipleSelections=b1;qe.tabSize=he.define({combine:t=>t.length?t[0]:4});qe.lineSeparator=a6;qe.readOnly=f6;qe.phrases=he.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});qe.languageData=s6;qe.changeFilter=l6;qe.transactionFilter=c6;qe.transactionExtender=u6;Wf.reconfigure=Ee.define();function Mr(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Co{eq(e){return this==e}range(e,n=e){return Ka.create(e,n,this)}}Co.prototype.startSide=Co.prototype.endSide=0;Co.prototype.point=!1;Co.prototype.mapMode=Jt.TrackDel;class Ka{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new Ka(e,n,r)}}function v1(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Mp{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let c=s+a>>1,f=o[c]-e||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return f>=0?s:a;f>=0?a=c:s=c+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let c=0;c<this.value.length;c++){let f=this.value[c],h=this.from[c]+e,d=this.to[c]+e,p,b;if(h==d){let x=n.mapPos(h,f.startSide,f.mapMode);if(x==null||(p=b=x,f.startSide!=f.endSide&&(b=n.mapPos(h,f.endSide),b<p)))continue}else if(p=n.mapPos(h,f.startSide),b=n.mapPos(d,f.endSide),p>b||p==b&&f.startSide>0&&f.endSide<=0)continue;(b-p||f.endSide-f.startSide)<0||(s<0&&(s=p),f.point&&(a=Math.max(a,b-p)),r.push(f),i.push(p-s),o.push(b-s))}return{mapped:r.length?new Mp(i,o,r,a):null,pos:s}}}class Ke{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ke(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(v1)),this.isEmpty)return n.length?Ke.of(n):this;let a=new g6(this,null,-1).goto(0),c=0,f=[],h=new ii;for(;a.value||c<n.length;)if(c<n.length&&(a.from-n[c].from||a.startSide-n[c].value.startSide)>=0){let d=n[c++];h.addInner(d.from,d.to,d.value)||f.push(d)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(a.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&h.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(h.addInner(a.from,a.to,a.value)||f.push(Ka.create(a.from,a.to,a.value))),a.next());return h.finishInner(this.nextLayer.isEmpty&&!f.length?Ke.empty:this.nextLayer.update({add:f,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],c=this.chunk[s],f=e.touchesRange(a,a+c.length);if(f===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(e.mapPos(a));else if(f===!0){let{mapped:h,pos:d}=c.map(a,e);h&&(i=Math.max(i,h.maxPoint),n.push(h),r.push(d))}}let o=this.nextLayer.map(e);return n.length==0?o:new Ke(r,n,o||Ke.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Ga.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Ga.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),c=Q5(s,a,r),f=new xa(s,c,o),h=new xa(a,c,o);r.iterGaps((d,p,b)=>Z5(f,d,h,p,b,i)),r.empty&&r.length==0&&Z5(f,0,h,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(h=>!h.isEmpty&&n.indexOf(h)<0),s=n.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=Q5(o,s),c=new xa(o,a,0).goto(r),f=new xa(s,a,0).goto(r);for(;;){if(c.to!=f.to||!y1(c.active,f.active)||c.point&&(!f.point||!c.point.eq(f.point)))return!1;if(c.to>i)return!0;c.next(),f.next()}}static spans(e,n,r,i,o=-1){let s=new xa(e,null,o).goto(n),a=n,c=s.openStart;for(;;){let f=Math.min(s.to,r);if(s.point){let h=s.activeForPoint(s.to),d=s.pointFrom<n?h.length+1:s.point.startSide<0?h.length:Math.min(h.length,c);i.point(a,f,s.point,h,d,s.pointRank),c=Math.min(s.openEnd(f),h.length)}else f>a&&(i.span(a,f,s.active,c),c=s.openEnd(f));if(s.to>r)return c+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new ii;for(let i of e instanceof Ka?[e]:n?sP(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ke.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ke.empty;i=i.nextLayer)n=new Ke(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ke.empty=new Ke([],[],null,-1);function sP(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(v1(e,r)>0)return t.slice().sort(v1);e=r}return t}Ke.empty.nextLayer=Ke.empty;class ii{finishChunk(e){this.chunks.push(new Mp(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new ii)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ke.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ke.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Q5(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!n?.touchesRange(a,a+o.chunk[s].length)&&i.add(o.chunk[s])}return i}class g6{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Ga{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new g6(s,n,r,o));return i.length==1?i[0]:new Ga(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)r0(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)r0(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),r0(this.heap,0)}}}function r0(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class xa{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ga.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Wc(this.active,e),Wc(this.activeTo,e),Wc(this.activeRank,e),this.minActive=J5(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;zc(this.active,n,r),zc(this.activeTo,n,i),zc(this.activeRank,n,o),e&&zc(e,n,this.cursor.from),this.minActive=J5(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Wc(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function Z5(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,c=r-e;for(;;){let f=t.to+c-n.to,h=f||t.endSide-n.endSide,d=h<0?t.to+c:n.to,p=Math.min(d,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&y1(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,p,t.point,n.point):p>a&&!y1(t.active,n.active)&&o.compareRange(a,p,t.active,n.active),d>s)break;(f||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),a=d,h<=0&&t.next(),h>=0&&n.next()}}function y1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Wc(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function zc(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function J5(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Gs(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Ht(t,i));return r}function C1(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Ht(t,i)}return r===!0?-1:t.length}const $1="ͼ",ew=typeof Symbol>"u"?"__"+$1:Symbol.for($1),S1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),tw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class _i{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,c,f){let h=[],d=/^@(\w+)\b/.exec(s[0]),p=d&&d[1]=="keyframes";if(d&&a==null)return c.push(s[0]+";");for(let b in a){let x=a[b];if(/&/.test(b))o(b.split(/,\s*/).map(v=>s.map(C=>v.replace(/&/,C))).reduce((v,C)=>v.concat(C)),x,c);else if(x&&typeof x=="object"){if(!d)throw new RangeError("The value of a property ("+b+") should be a primitive value.");o(i(b),x,h,p)}else x!=null&&h.push(b.replace(/_.*/,"").replace(/[A-Z]/g,v=>"-"+v.toLowerCase())+": "+x+";")}(h.length||p)&&c.push((r&&!d&&!f?s.map(r):s).join(", ")+" {"+h.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
|
|
52
|
+
`)}static newName(){let e=tw[ew]||1;return tw[ew]=e+1,$1+e.toString(36)}static mount(e,n,r){let i=e[S1],o=r&&r.nonce;i?o&&i.setNonce(o):i=new aP(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let nw=new Map;class aP{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=nw.get(r);if(o)return e[S1]=o;this.sheet=new i.CSSStyleSheet,nw.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[S1]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],c=this.modules.indexOf(a);if(c<o&&c>-1&&(this.modules.splice(c,1),o--,c=-1),c==-1){if(this.modules.splice(o++,0,a),r)for(let f=0;f<a.rules.length;f++)r.insertRule(a.rules[f],i++)}else{for(;o<c;)i+=this.modules[o++].rules.length;i+=a.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let s="";for(let c=0;c<this.modules.length;c++)s+=this.modules[c].getRules()+`
|
|
53
|
+
`;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Li={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ya={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},lP=typeof navigator<"u"&&/Mac/.test(navigator.platform),cP=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Vt=0;Vt<10;Vt++)Li[48+Vt]=Li[96+Vt]=String(Vt);for(var Vt=1;Vt<=24;Vt++)Li[Vt+111]="F"+Vt;for(var Vt=65;Vt<=90;Vt++)Li[Vt]=String.fromCharCode(Vt+32),Ya[Vt]=String.fromCharCode(Vt);for(var i0 in Li)Ya.hasOwnProperty(i0)||(Ya[i0]=Li[i0]);function uP(t){var e=lP&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||cP&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ya:Li)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Xa(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function A1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function pu(t,e){if(!e.anchorNode)return!1;try{return A1(t,e.anchorNode)}catch{return!1}}function Is(t){return t.nodeType==3?So(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function _a(t,e,n,r){return n?rw(t,e,n,r,-1)||rw(t,e,n,r,1):!1}function $o(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Uu(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function rw(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Rr(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=$o(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Rr(t):0}else return!1}}function Rr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function $l(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function fP(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function p6(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function hP(t,e,n,r,i,o,s,a){let c=t.ownerDocument,f=c.defaultView||window;for(let h=t,d=!1;h&&!d;)if(h.nodeType==1){let p,b=h==c.body,x=1,v=1;if(b)p=fP(f);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(d=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let A=h.getBoundingClientRect();({scaleX:x,scaleY:v}=p6(h,A)),p={left:A.left,right:A.left+h.clientWidth*x,top:A.top,bottom:A.top+h.clientHeight*v}}let C=0,$=0;if(i=="nearest")e.top<p.top?($=-(p.top-e.top+s),n>0&&e.bottom>p.bottom+$&&($=e.bottom-p.bottom+$+s)):e.bottom>p.bottom&&($=e.bottom-p.bottom+s,n<0&&e.top-$<p.top&&($=-(p.top+$-e.top+s)));else{let A=e.bottom-e.top,T=p.bottom-p.top;$=(i=="center"&&A<=T?e.top+A/2-T/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-T+s)-p.top}if(r=="nearest"?e.left<p.left?(C=-(p.left-e.left+o),n>0&&e.right>p.right+C&&(C=e.right-p.right+C+o)):e.right>p.right&&(C=e.right-p.right+o,n<0&&e.left<p.left+C&&(C=-(p.left+C-e.left+o))):C=(r=="center"?e.left+(e.right-e.left)/2-(p.right-p.left)/2:r=="start"==a?e.left-o:e.right-(p.right-p.left)+o)-p.left,C||$)if(b)f.scrollBy(C,$);else{let A=0,T=0;if($){let M=h.scrollTop;h.scrollTop+=$/v,T=(h.scrollTop-M)*v}if(C){let M=h.scrollLeft;h.scrollLeft+=C/x,A=(h.scrollLeft-M)*x}e={left:e.left-A,top:e.top-T,right:e.right-A,bottom:e.bottom-T},A&&Math.abs(A-C)<1&&(r="nearest"),T&&Math.abs(T-$)<1&&(i="nearest")}if(b)break;h=h.assignedSlot||h.parentNode}else if(h.nodeType==11)h=h.host;else break}function dP(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class gP{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Rr(n):0),r,Math.min(e.focusOffset,r?Rr(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let os=null;function m6(t){if(t.setActive)return t.setActive();if(os)return t.focus(os);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(os==null?{get preventScroll(){return os={preventScroll:!0},!0}}:void 0),!os){os=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let iw;function So(t,e,n=e){let r=iw||(iw=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function xs(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function pP(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function b6(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function mP(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Rr(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Rr(n))}else{if(n==t)return!0;r=$o(n),n=n.parentNode}}function w6(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function x6(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Rr(n)}else if(n.parentNode&&!Uu(n))r=$o(n),n=n.parentNode;else return null}}function v6(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Uu(n))r=$o(n)+1,n=n.parentNode;else return null}}class qt{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new qt(e.parentNode,$o(e),n)}static after(e,n){return new qt(e.parentNode,$o(e)+1,n)}}const Op=[];class tt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=tt.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=ow(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=ow(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Rr(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!tt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let c=0,f=r,h=r;c<this.children.length;c++){let d=this.children[c],p=f+d.length;if(f<e&&p>n)return d.domBoundsAround(e,n,f);if(p>=e&&i==-1&&(i=c,o=f),f>n&&d.dom.parentNode==this.dom){s=c,a=h;break}h=p,f=p+d.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=Op){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new y6(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}tt.prototype.breakAfter=0;function ow(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class y6{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function C6(t,e,n,r,i,o,s,a,c){let{children:f}=t,h=f.length?f[e]:null,d=o.length?o[o.length-1]:null,p=d?d.breakAfter:s;if(!(e==r&&h&&!s&&!p&&o.length<2&&h.merge(n,i,o.length?d:null,n==0,a,c))){if(r<f.length){let b=f[r];b&&(i<b.length||b.breakAfter&&d?.breakAfter)?(e==r&&(b=b.split(i),i=0),!p&&d&&b.merge(0,i,d,!0,0,c)?o[o.length-1]=b:((i||b.children.length&&!b.children[0].length)&&b.merge(0,i,null,!1,0,c),o.push(b))):b?.breakAfter&&(d?d.breakAfter=1:s=1),r++}for(h&&(h.breakAfter=s,n>0&&(!s&&o.length&&h.merge(n,h.length,o[0],!1,a,0)?h.breakAfter=o.shift().breakAfter:(n<h.length||h.children.length&&h.children[h.children.length-1].length==0)&&h.merge(n,h.length,null,!1,a,0),e++));e<r&&o.length;)if(f[r-1].become(o[o.length-1]))r--,o.pop(),c=o.length?0:a;else if(f[e].become(o[0]))e++,o.shift(),a=o.length?0:c;else break;!o.length&&e&&r<f.length&&!f[e-1].breakAfter&&f[r].merge(0,0,f[e-1],!1,a,c)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function $6(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:c}=s.findPos(n,1),{i:f,off:h}=s.findPos(e,-1),d=e-n;for(let p of r)d+=p.length;t.length+=d,C6(t,f,h,a,c,r,0,i,o)}let cn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},R1=typeof document<"u"?document:{documentElement:{style:{}}};const k1=/Edge\/(\d+)/.exec(cn.userAgent),S6=/MSIE \d/.test(cn.userAgent),T1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cn.userAgent),zf=!!(S6||T1||k1),sw=!zf&&/gecko\/(\d+)/i.test(cn.userAgent),o0=!zf&&/Chrome\/(\d+)/.exec(cn.userAgent),aw="webkitFontSmoothing"in R1.documentElement.style,A6=!zf&&/Apple Computer/.test(cn.vendor),lw=A6&&(/Mobile\/\w+/.test(cn.userAgent)||cn.maxTouchPoints>2);var ue={mac:lw||/Mac/.test(cn.platform),windows:/Win/.test(cn.platform),linux:/Linux|X11/.test(cn.platform),ie:zf,ie_version:S6?R1.documentMode||6:T1?+T1[1]:k1?+k1[1]:0,gecko:sw,gecko_version:sw?+(/Firefox\/(\d+)/.exec(cn.userAgent)||[0,0])[1]:0,chrome:!!o0,chrome_version:o0?+o0[1]:0,ios:lw,android:/Android\b/.test(cn.userAgent),webkit:aw,safari:A6,webkit_version:aw?+(/\bAppleWebKit\/(\d+)/.exec(cn.userAgent)||[0,0])[1]:0,tabSize:R1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const bP=256;class tr extends tt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof tr)||this.length-(n-e)+r.length>bP||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new tr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new qt(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return wP(this.dom,e,n)}}class oi extends tt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(b6(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof oi&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:($6(this,e,n,r?r.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let c=r+a.length;c>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=c,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new oi(this.mark,n,s)}domAtPos(e){return R6(this,e)}coordsAt(e,n){return T6(this,e,n)}}function wP(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?ue.chrome||ue.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=So(t,i,o).getClientRects();if(!a.length)return null;let c=a[(s?s<0:n>=0)?0:a.length-1];return ue.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(a,f=>f.width)||c),s?$l(c,s<0):c||null}class Ri extends tt{static create(e,n,r){return new Ri(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Ri.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof Ri)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Ri&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ge.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Ge.empty}domAtPos(e){return(this.length?e==0:this.side>0)?qt.before(this.dom):qt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return $l(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class _s extends tt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof _s&&e.side==this.side}split(){return new _s(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?qt.before(this.dom):qt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ge.empty}get isHidden(){return!0}}tr.prototype.children=Ri.prototype.children=_s.prototype.children=Op;function R6(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new qt(n,0)}function k6(t,e,n){let r,{children:i}=t;n>0&&e instanceof oi&&i.length&&(r=i[i.length-1])instanceof oi&&r.mark.eq(e.mark)?k6(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function T6(t,e,n){let r=null,i=-1,o=null,s=-1;function a(f,h){for(let d=0,p=0;d<f.children.length&&p<=h;d++){let b=f.children[d],x=p+b.length;x>=h&&(b.children.length?a(b,h-p):(!o||o.isHidden&&n>0)&&(x>h||p==x&&b.getSide()>0)?(o=b,s=h-p):(p<h||p==x&&b.getSide()<0&&!b.isHidden)&&(r=b,i=h-p)),p=x}}a(t,e);let c=(n<0?r:o)||r||o;return c?c.coordsAt(Math.max(0,c==r?i:s),n):xP(t)}function xP(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Is(e);return n[n.length-1]||null}function E1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const cw=Object.create(null);function qu(t,e,n){if(t==e)return!0;t||(t=cw),e||(e=cw);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function M1(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function vP(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class ci{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var en=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(en||(en={}));class ve extends Co{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Sl(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Bi(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=E6(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Bi(e,r,i,n,e.widget||null,!0)}static line(e){return new Al(e)}static set(e,n=!1){return Ke.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ve.none=Ke.empty;class Sl extends ve{constructor(e){let{start:n,end:r}=E6(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Sl&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&qu(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Sl.prototype.point=!1;class Al extends ve{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Al&&this.spec.class==e.spec.class&&qu(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Al.prototype.mapMode=Jt.TrackBefore;Al.prototype.point=!0;class Bi extends ve{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?Jt.TrackBefore:Jt.TrackAfter:Jt.TrackDel}get type(){return this.startSide!=this.endSide?en.WidgetRange:this.startSide<=0?en.WidgetBefore:en.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Bi&&yP(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Bi.prototype.point=!0;function E6(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function yP(t,e){return t==e||!!(t&&e&&t.compare(e))}function mu(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class yt extends tt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof yt))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),$6(this,e,n,r?r.children.slice():[],o,s),!0}split(e){let n=new yt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){qu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){k6(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=E1(n,this.attrs||{})),r&&(this.attrs=E1({class:r},this.attrs||{}))}domAtPos(e){return R6(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(b6(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(M1(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&tt.get(i)instanceof oi;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=tt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!ue.ios||!this.children.some(o=>o instanceof tr))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof tr)||/[^ -~]/.test(r.text))return null;let i=Is(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=T6(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return e instanceof yt&&this.children.length==0&&e.children.length==0&&qu(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof yt)return o;if(s>n)break}i=s+o.breakAfter}return null}}class ti extends tt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof ti)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?qt.before(this.dom):qt.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new ti(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return Op}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ge.empty}domBoundsAround(){return null}become(e){return e instanceof ti&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof O1?null:$l(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class O1 extends ci{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class La{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ti&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new yt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Uc(new _s(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof ti)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(Uc(new tr(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Bi){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Bi)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ti(r.widget||Ls.block,a,r));else{let c=Ri.create(r.widget||Ls.inline,a,a?0:r.startSide),f=this.atCursorPos&&!c.isEditable&&o<=i.length&&(e<n||r.startSide>0),h=!c.isEditable&&(e<n||o>i.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!f&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),f&&(d.append(Uc(new _s(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(Uc(c,i),o),this.atCursorPos=h,this.pendingBuffer=h?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new La(e,n,r,o);return s.openEnd=Ke.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function Uc(t,e){for(let n of e)t=new oi(n,[t],t.length);return t}class Ls extends ci{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ls.inline=new Ls("span");Ls.block=new Ls("div");var st=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(st||(st={}));const Ao=st.LTR,Dp=st.RTL;function M6(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const CP=M6("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),$P=M6("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),D1=Object.create(null),dr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);D1[e]=n,D1[n]=-e}function O6(t){return t<=247?CP[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?$P[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const SP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ki{get dir(){return this.level%2?Dp:Ao}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function D6(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!D6(r.inner,i.inner))return!1}return!0}const et=[];function AP(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,c=o?256:i;for(let f=s,h=c,d=c;f<a;f++){let p=O6(t.charCodeAt(f));p==512?p=h:p==8&&d==4&&(p=16),et[f]=p==4?2:p,p&7&&(d=p),h=p}for(let f=s,h=c,d=c;f<a;f++){let p=et[f];if(p==128)f<a-1&&h==et[f+1]&&h&24?p=et[f]=h:et[f]=256;else if(p==64){let b=f+1;for(;b<a&&et[b]==64;)b++;let x=f&&h==8||b<n&&et[b]==8?d==1?1:8:256;for(let v=f;v<b;v++)et[v]=x;f=b-1}else p==8&&d==1&&(et[f]=1);h=p,p&7&&(d=p)}}}function RP(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,c=0;s<=r.length;s++){let f=s?r[s-1].to:e,h=s<r.length?r[s].from:n;for(let d=f,p,b,x;d<h;d++)if(b=D1[p=t.charCodeAt(d)])if(b<0){for(let v=a-3;v>=0;v-=3)if(dr[v+1]==-b){let C=dr[v+2],$=C&2?i:C&4?C&1?o:i:0;$&&(et[d]=et[dr[v]]=$),a=v;break}}else{if(dr.length==189)break;dr[a++]=d,dr[a++]=p,dr[a++]=c}else if((x=et[d])==2||x==1){let v=x==i;c=v?0:1;for(let C=a-3;C>=0;C-=3){let $=dr[C+2];if($&2)break;if(v)dr[C+2]|=2;else{if($&4)break;dr[C+2]|=4}}}}}function kP(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let c=s;c<a;){let f=et[c];if(f==256){let h=c+1;for(;;)if(h==a){if(i==n.length)break;h=n[i++].to,a=i<n.length?n[i].from:e}else if(et[h]==256)h++;else break;let d=o==1,p=(h<e?et[h]:r)==1,b=d==p?d?1:2:r;for(let x=h,v=i,C=v?n[v-1].to:t;x>c;)x==C&&(x=n[--v].from,C=v?n[v-1].to:t),et[--x]=b;c=h}else o=f,c++}}}function I1(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let c=e,f=0;c<n;){let h=!0,d=!1;if(f==o.length||c<o[f].from){let v=et[c];v!=a&&(h=!1,d=v==16)}let p=!h&&a==1?[]:null,b=h?r:r+1,x=c;e:for(;;)if(f<o.length&&x==o[f].from){if(d)break e;let v=o[f];if(!h)for(let C=v.to,$=f+1;;){if(C==n)break e;if($<o.length&&o[$].from==C)C=o[$++].to;else{if(et[C]==a)break e;break}}if(f++,p)p.push(v);else{v.from>c&&s.push(new ki(c,v.from,b));let C=v.direction==Ao!=!(b%2);_1(t,C?r+1:r,i,v.inner,v.from,v.to,s),c=v.to}x=v.to}else{if(x==n||(h?et[x]!=a:et[x]==a))break;x++}p?I1(t,c,x,r+1,i,p,s):c<x&&s.push(new ki(c,x,b)),c=x}else for(let c=n,f=o.length;c>e;){let h=!0,d=!1;if(!f||c>o[f-1].to){let v=et[c-1];v!=a&&(h=!1,d=v==16)}let p=!h&&a==1?[]:null,b=h?r:r+1,x=c;e:for(;;)if(f&&x==o[f-1].to){if(d)break e;let v=o[--f];if(!h)for(let C=v.from,$=f;;){if(C==e)break e;if($&&o[$-1].to==C)C=o[--$].from;else{if(et[C-1]==a)break e;break}}if(p)p.push(v);else{v.to<c&&s.push(new ki(v.to,c,b));let C=v.direction==Ao!=!(b%2);_1(t,C?r+1:r,i,v.inner,v.from,v.to,s),c=v.from}x=v.from}else{if(x==e||(h?et[x-1]!=a:et[x-1]==a))break;x--}p?I1(t,x,c,r+1,i,p,s):x<c&&s.push(new ki(x,c,b)),c=x}}function _1(t,e,n,r,i,o,s){let a=e%2?2:1;AP(t,i,o,r,a),RP(t,i,o,r,a),kP(i,o,r,a),I1(t,i,o,e,n,r,s)}function TP(t,e,n){if(!t)return[new ki(0,0,e==Dp?1:0)];if(e==Ao&&!n.length&&!SP.test(t))return I6(t.length);if(n.length)for(;t.length>et.length;)et[et.length]=256;let r=[],i=e==Ao?0:1;return _1(t,i,i,n,0,t.length,r),r}function I6(t){return[new ki(0,t,0)]}let _6="";function EP(t,e,n,r,i){var o;let s=r.head-t.from,a=ki.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),c=e[a],f=c.side(i,n);if(s==f){let p=a+=i?1:-1;if(p<0||p>=e.length)return null;c=e[a=p],s=c.side(!i,n),f=c.side(i,n)}let h=Ht(t.text,s,c.forward(i,n));(h<c.from||h>c.to)&&(h=f),_6=t.text.slice(Math.min(s,h),Math.max(s,h));let d=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return d&&h==f&&d.level+(i?0:1)<c.level?J.cursor(d.side(!i,n)+t.from,d.forward(i,n)?1:-1,d.level):J.cursor(h+t.from,c.forward(i,n)?-1:1,c.level)}function MP(t,e,n){for(let r=e;r<n;r++){let i=O6(t.charCodeAt(r));if(i==1)return Ao;if(i==2||i==4)return Dp}return Ao}const L6=he.define(),B6=he.define(),N6=he.define(),j6=he.define(),L1=he.define(),F6=he.define(),V6=he.define(),Ip=he.define(),_p=he.define(),H6=he.define({combine:t=>t.some(e=>e)}),P6=he.define({combine:t=>t.some(e=>e)}),W6=he.define();class vs{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new vs(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new vs(J.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const qc=Ee.define({map:(t,e)=>t.map(e)}),z6=Ee.define();function fn(t,e,n){let r=t.facet(j6);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Yr=he.define({combine:t=>t.length?t[0]:!0});let OP=0;const Ra=he.define();class bt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new bt(OP++,e,r,i,a=>{let c=[Ra.of(a)];return s&&c.push(Qa.of(f=>{let h=f.plugin(a);return h?s(h):ve.none})),o&&c.push(o(a)),c})}static fromClass(e,n){return bt.define(r=>new e(r),n)}}class s0{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(fn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){fn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){fn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const U6=he.define(),Lp=he.define(),Qa=he.define(),q6=he.define(),Bp=he.define(),K6=he.define();function uw(t,e){let n=t.state.facet(K6);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Ke.spans(r,e.from,e.to,{point(){},span(o,s,a,c){let f=o-e.from,h=s-e.from,d=i;for(let p=a.length-1;p>=0;p--,c--){let b=a[p].spec.bidiIsolate,x;if(b==null&&(b=MP(e.text,f,h)),c>0&&d.length&&(x=d[d.length-1]).to==f&&x.direction==b)x.to=h,d=x.inner;else{let v={from:f,to:h,direction:b,inner:[]};d.push(v),d=v.inner}}}}),i}const G6=he.define();function Np(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(G6)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ka=he.define();class Vn{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Vn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let c=i==e.length?null:e[i],f=s-a,h=c?c.fromB:1e9;for(;o<n.length&&n[o]<h;){let d=n[o],p=n[o+1],b=Math.max(a,d),x=Math.min(h,p);if(b<=x&&new Vn(b+f,x+f,b,x).addToSet(r),p>h)break;o+=2}if(!c)return r;new Vn(c.fromA,c.toA,c.fromB,c.toB).addToSet(r),s=c.toA,a=c.toB}}}class Ku{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Rt.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,c)=>i.push(new Vn(o,s,a,c))),this.changedRanges=i}static create(e,n,r){return new Ku(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class fw extends tt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ve.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new yt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vn(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:f,toA:h})=>h<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!jP(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?IP(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:f,to:h}=this.hasComposition;r=new Vn(f,h,e.changes.mapPos(f,-1),e.changes.mapPos(h,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(ue.ie||ue.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),c=BP(s,a,e.changes);return r=Vn.extendWithRanges(r,c),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=ue.chrome||ue.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof ti&&s.widget instanceof O1&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:c,toA:f,fromB:h,toB:d}=a,p,b,x,v;if(r&&r.range.fromB<d&&r.range.toB>h){let M=La.build(this.view.state.doc,h,r.range.fromB,this.decorations,this.dynamicDecorationMap),O=La.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);b=M.breakAtStart,x=M.openStart,v=O.openEnd;let I=this.compositionView(r);O.breakAtStart?I.breakAfter=1:O.content.length&&I.merge(I.length,I.length,O.content[0],!1,O.openStart,0)&&(I.breakAfter=O.content[0].breakAfter,O.content.shift()),M.content.length&&I.merge(0,0,M.content[M.content.length-1],!0,0,M.openEnd)&&M.content.pop(),p=M.content.concat(I).concat(O.content)}else({content:p,breakAtStart:b,openStart:x,openEnd:v}=La.build(this.view.state.doc,h,d,this.decorations,this.dynamicDecorationMap));let{i:C,off:$}=o.findPos(f,1),{i:A,off:T}=o.findPos(c,-1);C6(this,A,T,C,$,p,b,x,v)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(z6)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new tr(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new oi(i,[n],n.length);let r=new yt;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(s);let a=tt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(Yr)||this.dom.tabIndex>-1)&&pu(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),f=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(ue.gecko&&a.empty&&!this.hasComposition&&DP(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=f=new qt(d,0),s=!0}let h=this.view.observer.selectionRange;(s||!h.focusNode||(!_a(c.node,c.offset,h.anchorNode,h.anchorOffset)||!_a(f.node,f.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,a))&&(this.view.observer.ignore(()=>{ue.android&&ue.chrome&&this.dom.contains(h.focusNode)&&NP(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Xa(this.view.root);if(d)if(a.empty){if(ue.gecko){let p=_P(c.node,c.offset);if(p&&p!=3){let b=(p==1?x6:v6)(c.node,c.offset);b&&(c=new qt(b.node,b.offset))}}d.collapse(c.node,c.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(f.node,f.offset)}catch{}}else{let p=document.createRange();a.anchor>a.head&&([c,f]=[f,c]),p.setEnd(f.node,f.offset),p.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(p)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,f)),this.impreciseAnchor=c.precise?null:new qt(h.anchorNode,h.anchorOffset),this.impreciseHead=f.precise?null:new qt(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&_a(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Xa(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=yt.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let c=this.coordsAt(n.head,-1),f=this.coordsAt(n.head,1);if(!c||!f||c.bottom>f.top)return;let h=this.domAtPos(n.head+n.assoc);r.collapse(h.node,h.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=tt.get(n.childNodes[i]);o instanceof yt&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=tt.get(n.childNodes[i]);o instanceof yt&&(r=o.domAtPos(o.length))}return r?new qt(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=tt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof yt)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],c=o-a.breakAfter,f=c-a.length;if(c<e)break;if(f<=e&&(f<e||a.covers(-1))&&(c>e||a.covers(1))&&(!r||a instanceof yt&&!(r instanceof yt&&n>=0)))r=a,i=f;else if(r&&f==e&&c==e&&a instanceof ti&&Math.abs(n)<2){if(a.deco.startSide<0)break;s&&(r=null)}o=f}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof yt))return null;for(;i.children.length;){let{i:a,off:c}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=c}if(!(i instanceof tr))return null;let o=Ht(i.text,r);if(o==r)return null;let s=So(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let c=s[a];if(a==s.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==st.LTR;for(let f=0,h=0;h<this.children.length;h++){let d=this.children[h],p=f+d.length;if(p>i)break;if(f>=r){let b=d.dom.getBoundingClientRect();if(n.push(b.height),s){let x=d.dom.lastChild,v=x?Is(x):[];if(v.length){let C=v[v.length-1],$=c?C.right-b.left:b.right-C.left;$>a&&(a=$,this.minWidth=o,this.minWidthFrom=f,this.minWidthTo=p)}}}f=p+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?st.RTL:st.LTR}measureTextSize(){for(let o of this.children)if(o instanceof yt){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Is(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new y6(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(ve.replace({widget:new O1(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return ve.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Qa).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(q6).map((o,s)=>{let a=typeof o=="function";return a&&(r=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ke.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(W6))try{if(f(this.view,e.range,e))return!0}catch(h){fn(this.view.state,h,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=Np(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;hP(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==st.LTR)}}function DP(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function Y6(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=x6(n.focusNode,n.focusOffset),i=v6(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let a=tt.get(i.node);if(!a||a instanceof tr&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let c=tt.get(r.node);!c||c instanceof tr&&c.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function IP(t,e,n){let r=Y6(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let c=e.invertedDesc,f=new Vn(c.mapPos(o),c.mapPos(s),o,s),h=[];for(let d=i.parentNode;;d=d.parentNode){let p=tt.get(d);if(p instanceof oi)h.push({node:d,deco:p.mark});else{if(p instanceof yt||d.nodeName=="DIV"&&d.parentNode==t.contentDOM)return{range:f,text:i,marks:h,line:d};if(d!=t.contentDOM)h.push({node:d,deco:new Sl({inclusive:!0,attributes:vP(d),tagName:d.tagName.toLowerCase()})});else return null}}}function _P(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let LP=class{constructor(){this.changes=[]}compareRange(e,n){mu(e,n,this.changes)}comparePoint(e,n){mu(e,n,this.changes)}boundChange(e){mu(e,e,this.changes)}};function BP(t,e,n){let r=new LP;return Ke.compare(t,e,n,r),r.changes}function NP(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function jP(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function FP(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return J.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Ht(i.text,o,!1):a=Ht(i.text,o);let c=r(i.text.slice(s,a));for(;s>0;){let f=Ht(i.text,s,!1);if(r(i.text.slice(f,s))!=c)break;s=f}for(;a<i.length;){let f=Ht(i.text,a);if(r(i.text.slice(a,f))!=c)break;a=f}return J.range(s+i.from,a+i.from)}function VP(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function HP(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function a0(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function hw(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function dw(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function B1(t,e,n){let r,i,o,s,a=!1,c,f,h,d;for(let x=t.firstChild;x;x=x.nextSibling){let v=Is(x);for(let C=0;C<v.length;C++){let $=v[C];i&&a0(i,$)&&($=hw(dw($,i.bottom),i.top));let A=VP(e,$),T=HP(n,$);if(A==0&&T==0)return x.nodeType==3?gw(x,e,n):B1(x,e,n);if(!r||s>T||s==T&&o>A){r=x,i=$,o=A,s=T;let M=T?n<$.top?-1:1:A?e<$.left?-1:1:0;a=!M||(M>0?C<v.length-1:C>0)}A==0?n>$.bottom&&(!h||h.bottom<$.bottom)?(c=x,h=$):n<$.top&&(!d||d.top>$.top)&&(f=x,d=$):h&&a0(h,$)?h=dw(h,$.bottom):d&&a0(d,$)&&(d=hw(d,$.top))}}if(h&&h.bottom>=n?(r=c,i=h):d&&d.top<=n&&(r=f,i=d),!r)return{node:t,offset:0};let p=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return gw(r,p,n);if(a&&r.contentEditable!="false")return B1(r,p,n);let b=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:b}}function gw(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let c=So(t,a,a+1).getClientRects();for(let f=0;f<c.length;f++){let h=c[f];if(h.top==h.bottom)continue;s||(s=e-h.left);let d=(h.top>n?h.top-n:n-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&d<o){let p=e>=(h.left+h.right)/2,b=p;if((ue.chrome||ue.gecko)&&So(t,a).getBoundingClientRect().left==h.right&&(b=!p),d<=0)return{node:t,offset:a+(b?1:0)};i=a+(b?1:0),o=d}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function X6(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,c,{docHeight:f}=t.viewState,{x:h,y:d}=e,p=d-a;if(p<0)return 0;if(p>f)return t.state.doc.length;for(let M=t.viewState.heightOracle.textHeight/2,O=!1;c=t.elementAtHeight(p),c.type!=en.Text;)for(;p=r>0?c.bottom+M:c.top-M,!(p>=0&&p<=f);){if(O)return n?null:0;O=!0,r=-r}d=a+p;let b=c.from;if(b<t.viewport.from)return t.viewport.from==0?0:n?null:pw(t,s,c,h,d);if(b>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:pw(t,s,c,h,d);let x=t.dom.ownerDocument,v=t.root.elementFromPoint?t.root:x,C=v.elementFromPoint(h,d);C&&!t.contentDOM.contains(C)&&(C=null),C||(h=Math.max(s.left+1,Math.min(s.right-1,h)),C=v.elementFromPoint(h,d),C&&!t.contentDOM.contains(C)&&(C=null));let $,A=-1;if(C&&((i=t.docView.nearest(C))===null||i===void 0?void 0:i.isEditable)!=!1){if(x.caretPositionFromPoint){let M=x.caretPositionFromPoint(h,d);M&&({offsetNode:$,offset:A}=M)}else if(x.caretRangeFromPoint){let M=x.caretRangeFromPoint(h,d);M&&({startContainer:$,startOffset:A}=M,(!t.contentDOM.contains($)||ue.safari&&PP($,A,h)||ue.chrome&&WP($,A,h))&&($=void 0))}$&&(A=Math.min(Rr($),A))}if(!$||!t.docView.dom.contains($)){let M=yt.find(t.docView,b);if(!M)return p>c.top+c.height/2?c.to:c.from;({node:$,offset:A}=B1(M.dom,h,d))}let T=t.docView.nearest($);if(!T)return null;if(T.isWidget&&((o=T.dom)===null||o===void 0?void 0:o.nodeType)==1){let M=T.dom.getBoundingClientRect();return e.y<M.top||e.y<=M.bottom&&e.x<=(M.left+M.right)/2?T.posAtStart:T.posAtEnd}else return T.localPosFromDOM($,A)+T.posAtStart}function pw(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);o+=c*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+C1(s,o,t.state.tabSize)}function PP(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return So(t,r-1,r).getBoundingClientRect().left>n}function WP(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():So(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function N1(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==en.Text))return r}return n}function zP(t,e,n,r){let i=N1(t,e.head),o=!r||i.type!=en.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),c=t.posAtCoords({x:n==(a==st.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(c!=null)return J.cursor(c,n?-1:1)}return J.cursor(n?i.to:i.from,n?-1:1)}function mw(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,c=null;;){let f=EP(i,o,s,a,n),h=_6;if(!f){if(i.number==(n?t.state.doc.lines:1))return a;h=`
|
|
54
|
+
`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),f=t.visualLineSide(i,!n)}if(c){if(!c(h))return a}else{if(!r)return f;c=r(h)}a=f}}function UP(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==lt.Space&&(i=s),i==s}}function qP(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return J.cursor(i,e.assoc);let s=e.goalColumn,a,c=t.contentDOM.getBoundingClientRect(),f=t.coordsAtPos(i,e.assoc||-1),h=t.documentTop;if(f)s==null&&(s=f.left-c.left),a=o<0?f.top:f.bottom;else{let b=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,t.defaultCharacterWidth*(i-b.from))),a=(o<0?b.top:b.bottom)+h}let d=c.left+s,p=r??t.viewState.heightOracle.textHeight>>1;for(let b=0;;b+=10){let x=a+(p+b)*o,v=X6(t,{x:d,y:x},!1,o);if(x<c.top||x>c.bottom||(o<0?v<i:v>i)){let C=t.docView.coordsForChar(v),$=!C||x<C.top?-1:1;return J.cursor(v,$,void 0,s)}}}function bu(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let c=r||n||(e-o<s-e?-1:1);e=c<0?o:s,r=c}});if(!r)return e}}function l0(t,e,n){let r=bu(t.state.facet(Bp).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:J.cursor(r,r<n.from?1:-1)}const Ta="";class KP{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(qe.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ta}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=tt.get(i),c=tt.get(s);(a&&c?a.breakAfter:(a?a.breakAfter:Uu(i))||Uu(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=tt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(GP(e,r.node,r.offset)?n:0))}}function GP(t,e,n){for(;;){if(!e||n<Rr(e))return!1;if(e==t)return!0;n=$o(e)+1,e=e.parentNode}}class bw{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class YP{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:ZP(e),c=new KP(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=JP(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!A1(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),f=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!A1(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),h=e.viewport;if((ue.ios||ue.chrome)&&e.state.selection.main.empty&&c!=f&&(h.from>0||h.to<e.state.doc.length)){let d=Math.min(c,f),p=Math.max(c,f),b=h.from-d,x=h.to-p;(b==0||b==1||d==0)&&(x==0||x==-1||p==e.state.doc.length)&&(c=0,f=e.state.doc.length)}this.newSel=J.single(f,c)}}}function Q6(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,c=i.from,f=null;(o===8||ue.android&&e.text.length<a-s)&&(c=i.to,f="end");let h=QP(t.state.doc.sliceString(s,a,Ta),e.text,c-s,f);h&&(ue.chrome&&o==13&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==Ta+Ta&&h.toB--,n={from:s+h.from,to:s+h.toA,insert:Ge.of(e.text.slice(h.from,h.toB).split(Ta))})}else r&&(!t.hasFocus&&t.state.facet(Yr)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(ue.mac||ue.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=J.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Ge.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:ue.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
|
55
|
+
`&&t.lineWrapping&&(r&&(r=J.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ge.of([" "])}),n)return jp(t,n,r,o);if(r&&!r.main.eq(i)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function jp(t,e,n,r=-1){if(ue.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(ue.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&xs(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&xs(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&xs(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,a=()=>s||(s=XP(t,e,n));return t.state.facet(F6).some(c=>c(t,e.from,e.to,o,a))||t.dispatch(a()),!0}function XP(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.from<e.from?i.sliceDoc(o.from,e.from):"",c=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let a=i.changes(e),c=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let f=t.state.sliceDoc(e.from,e.to),h,d=n&&Y6(t,n.main.head);if(d){let x=e.insert.length-(e.to-e.from);h={from:d.from,to:d.to-x}}else h=t.state.doc.lineAt(o.head);let p=o.to-e.to,b=o.to-o.from;r=i.changeByRange(x=>{if(x.from==o.from&&x.to==o.to)return{changes:a,range:c||x.map(a)};let v=x.to-p,C=v-f.length;if(x.to-x.from!=b||t.state.sliceDoc(C,v)!=f||x.to>=h.from&&x.from<=h.to)return{range:x};let $=i.changes({from:C,to:v,insert:e.insert}),A=x.to-o.to;return{changes:$,range:c?J.range(Math.max(0,c.anchor+A),Math.max(0,c.head+A)):x.map($)}})}else r={changes:a,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function QP(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let c=Math.max(0,o-Math.min(s,a));n-=s+c-o}if(s<o&&t.length<e.length){let c=n<=o&&n>=s?o-n:0;o-=c,a=o+(a-s),s=o}else if(a<o){let c=n<=o&&n>=a?o-n:0;o-=c,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function ZP(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new bw(n,r)),(i!=n||o!=r)&&e.push(new bw(i,o))),e}function JP(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?J.single(n+e,r+e):null}class eW{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ue.safari&&e.contentDOM.addEventListener("input",()=>null),ue.gecko&&mW(e.contentDOM.ownerDocument)}handleEvent(e){!lW(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=tW(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&J6.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ue.android&&ue.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return ue.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=Z6.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||nW.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,xs(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:ue.safari&&!ue.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function ww(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){fn(n.state,i)}}}function tW(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let s=i.domEventHandlers[o];s&&n(o).handlers.push(ww(r.value,s))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let s=i.domEventObservers[o];s&&n(o).observers.push(ww(r.value,s))}}for(let r in nr)n(r).handlers.push(nr[r]);for(let r in Hn)n(r).observers.push(Hn[r]);return e}const Z6=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],nW="dthko",J6=[16,17,18,20,91,92,224,225],Kc=6;function Gc(t){return Math.max(0,t)*.7+8}function rW(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class iW{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=dP(e.contentDOM),this.atoms=e.state.facet(Bp).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(qe.allowMultipleSelections)&&oW(e,n),this.dragging=aW(e,n)&&n4(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&rW(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=Np(this.view);e.clientX-c.left<=i+Kc?n=-Gc(i-e.clientX):e.clientX+c.right>=s-Kc&&(n=Gc(e.clientX-s)),e.clientY-c.top<=o+Kc?r=-Gc(o-e.clientY):e.clientY+c.bottom>=a-Kc&&(r=Gc(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=bu(this.atoms,i.from,0);s!=i.from&&(o=J.cursor(s,-1))}else{let s=bu(this.atoms,i.from,-1),a=bu(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=J.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?J.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function oW(t,e){let n=t.state.facet(L6);return n.length?n[0](e):ue.mac?e.metaKey:e.ctrlKey}function sW(t,e){let n=t.state.facet(B6);return n.length?n[0](e):ue.mac?!e.altKey:!e.ctrlKey}function aW(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Xa(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function lW(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=tt.get(n))&&r.ignoreEvent(e))return!1;return!0}const nr=Object.create(null),Hn=Object.create(null),e4=ue.ie&&ue.ie_version<15||ue.ios&&ue.webkit_version<604;function cW(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),t4(t,n.value)},50)}function Uf(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function t4(t,e){e=Uf(t.state,Ip,e);let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(j1!=null&&n.selection.ranges.every(c=>c.empty)&&j1==o.toString()){let c=-1;r=n.changeByRange(f=>{let h=n.doc.lineAt(f.from);if(h.from==c)return{range:f};c=h.from;let d=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:h.from,insert:d},range:J.cursor(f.from+d.length)}})}else s?r=n.changeByRange(c=>{let f=o.line(i++);return{changes:{from:c.from,to:c.to,insert:f.text},range:J.cursor(c.from+f.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Hn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};nr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Hn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Hn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};nr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(N6))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=hW(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new iW(t,e,n,r)),r&&t.observer.ignore(()=>{m6(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function xw(t,e,n,r){if(r==1)return J.cursor(e,n);if(r==2)return FP(t.state,e,n);{let i=yt.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,J.range(s,a)}}let vw=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function uW(t,e,n,r){let i=yt.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&vw(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&vw(n,r,a)?1:s&&s.bottom>=r?-1:1}function yw(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:uW(t,n,e.clientX,e.clientY)}}const fW=ue.ie&&ue.ie_version<=11;let Cw=null,$w=0,Sw=0;function n4(t){if(!fW)return t.detail;let e=Cw,n=Sw;return Cw=t,Sw=Date.now(),$w=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?($w+1)%3:1}function hW(t,e){let n=yw(t,e),r=n4(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let c=yw(t,o),f,h=xw(t,c.pos,c.bias,r);if(n.pos!=c.pos&&!s){let d=xw(t,n.pos,n.bias,r),p=Math.min(d.from,h.from),b=Math.max(d.to,h.to);h=p<h.from?J.range(p,b):J.range(b,p)}return s?i.replaceRange(i.main.extend(h.from,h.to)):a&&r==1&&i.ranges.length>1&&(f=dW(i,c.pos))?f:a?i.addRange(h):J.create([h])}}}function dW(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return J.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}nr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=J.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Uf(t.state,_p,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};nr.dragend=t=>(t.inputState.draggedContent=null,!1);function Aw(t,e,n,r){if(n=Uf(t.state,Ip,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&sW(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},c=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}nr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&Aw(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Aw(t,e,r,!0),!0}return!1};nr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=e4?null:e.clipboardData;return n?(t4(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(cW(t),!1)};function gW(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function pW(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Uf(t,_p,e.join(t.lineBreak)),ranges:n,linewise:r}}let j1=null;nr.copy=nr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=pW(t.state);if(!n&&!i)return!1;j1=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=e4?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(gW(t,n),!1)};const r4=Er.define();function i4(t,e){let n=[];for(let r of t.facet(V6)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:r4.of(!0)}):null}function o4(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=i4(t.state,e);n?t.dispatch(n):t.update([])}},10)}Hn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),o4(t)};Hn.blur=t=>{t.observer.clearSelectionRange(),o4(t)};Hn.compositionstart=Hn.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Hn.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ue.chrome&&ue.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Hn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};nr.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=e.getTargetRanges();if(o&&s.length){let a=s[0],c=t.posAtDOM(a.startContainer,a.startOffset),f=t.posAtDOM(a.endContainer,a.endOffset);return jp(t,{from:c,to:f,insert:t.state.toText(o)},null),!0}}let i;if(ue.chrome&&ue.android&&(i=Z6.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ue.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ue.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Hn.compositionend(t,e),20),!1};const Rw=new Set;function mW(t){Rw.has(t)||(Rw.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const kw=["pre-wrap","normal","pre-line","break-spaces"];let Bs=!1;function Tw(){Bs=!1}class bW{constructor(e){this.lineWrapping=e,this.doc=Ge.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return kw.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=kw.indexOf(e)>-1,c=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,c){this.heightSamples={};for(let f=0;f<s.length;f++){let h=s[f];h<0?f++:this.heightSamples[Math.floor(h*10)]=!0}}return c}}class wW{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class br{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?en.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Bi?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new br(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var ot=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(ot||(ot={}));const wu=.001;class tn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>wu&&(Bs=!0),this.height=e)}replace(e,n,r){return tn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:c,toA:f,fromB:h,toB:d}=i[a],p=o.lineAt(c,ot.ByPosNoHeight,r.setDoc(n),0,0),b=p.to>=f?p:o.lineAt(f,ot.ByPosNoHeight,r,0,0);for(d+=b.to-f,f=b.to;a>0&&p.from<=i[a-1].toA;)c=i[a-1].fromA,h=i[a-1].fromB,a--,c<p.from&&(p=o.lineAt(c,ot.ByPosNoHeight,r,0,0));h+=p.from-c,c=p.from;let x=Fp.build(r.setDoc(s),e,h,d);o=Gu(o,o.replace(c,f,x))}return o.updateHeight(r,0)}static empty(){return new Sn(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new xW(tn.of(e.slice(0,n)),s,tn.of(e.slice(r)))}}function Gu(t,e){return t==e?t:(t.constructor!=e.constructor&&(Bs=!0),e)}tn.prototype.size=1;class s4 extends tn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new br(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Sn extends s4{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new br(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Sn||i instanceof Ft&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ft?i=new Sn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):tn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ft extends tn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*o);s=c/o,this.length>o+1&&(a=(this.height-c)/(this.length-o-1))}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let f=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),h=n.doc.lineAt(f),d=a+h.length*c,p=Math.max(r,e-d/2);return new br(h.from,h.length,p,d,0)}else{let f=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:h,length:d}=n.doc.line(o+f);return new br(h,d,r+a*f,a,0)}}lineAt(e,n,r,i,o){if(n==ot.ByHeight)return this.blockAt(e,r,i,o);if(n==ot.ByPosNoHeight){let{from:b,to:x}=r.doc.lineAt(e);return new br(b,x-b,0,0,0)}let{firstLine:s,perLine:a,perChar:c}=this.heightMetrics(r,o),f=r.doc.lineAt(e),h=a+f.length*c,d=f.number-s,p=i+a*d+c*(f.from-o-d);return new br(f.from,f.length,Math.max(i,Math.min(p,i+this.height-h)),h,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:c,perChar:f}=this.heightMetrics(r,o);for(let h=e,d=i;h<=n;){let p=r.doc.lineAt(h);if(h==e){let x=p.number-a;d+=c*x+f*(e-o-x)}let b=c+f*p.length;s(new br(p.from,p.length,d,b,0)),d+=b,h=p.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Ft?r[r.length-1]=new Ft(o.length+i):r.push(null,new Ft(i-1))}if(e>0){let o=r[0];o instanceof Ft?r[0]=new Ft(e+o.length):r.unshift(new Ft(e-1),null)}return tn.of(r)}decomposeLeft(e,n){n.push(new Ft(e-1),null)}decomposeRight(e,n){n.push(null,new Ft(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new Ft(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let h=e.doc.lineAt(a).length;s.length&&s.push(null);let d=i.heights[i.index++];c==-1?c=d:Math.abs(d-c)>=wu&&(c=-2);let p=new Sn(h,d);p.outdated=!1,s.push(p),a+=h+1}a<=o&&s.push(null,new Ft(o-a).updateHeight(e,a));let f=tn.of(s);return(c<0||Math.abs(f.height-this.height)>=wu||Math.abs(c-this.heightMetrics(e,n).perLine)>=wu)&&(Bs=!0),Gu(this,f)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class xW extends tn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,c=n==ot.ByHeight?e<s:e<a,f=c?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(c?f.to<a:f.from>a))return f;let h=n==ot.ByPosNoHeight?ot.ByPosNoHeight:ot.ByPos;return c?f.join(this.right.lineAt(a,h,r,s,a)):this.left.lineAt(a,h,r,i,o).join(f)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,c=o+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,n,r,i,o,s),n>=c&&this.right.forEachLine(e,n,r,a,c,s);else{let f=this.lineAt(c,ot.ByPos,r,i,o);e<f.from&&this.left.forEachLine(e,f.from-1,r,i,o,s),f.to>=e&&f.from<=n&&s(f),n>f.to&&this.right.forEachLine(f.to+1,n,r,a,c,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&Ew(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),Ew(o,a)}return tn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?tn.of(this.break?[e,null,n]:[e,n]):(this.left=Gu(this.left,e),this.right=Gu(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,c=null;return i&&i.from<=n+o.length&&i.more?c=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?c=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),c?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ew(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Ft&&(r=t[e+1])instanceof Ft&&t.splice(e-1,3,new Ft(n.length+1+r.length))}const vW=5;class Fp{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Sn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Sn(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new s4(s,i,r)):(s||o||i>=vW)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Sn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Ft(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Sn)return e;let n=new Sn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Sn)&&!this.isCovered?this.nodes.push(new Sn(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Sn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new Fp(r,e);return Ke.spans(n,r,i,o,0),o.finish(r)}}function yW(t,e,n){let r=new CW;return Ke.compare(t,e,n,r,0),r.changes}class CW{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&mu(e,n,this.changes,5)}}function $W(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let f=t.parentNode;f&&f!=r.body;)if(f.nodeType==1){let h=f,d=window.getComputedStyle(h);if((h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth)&&d.overflow!="visible"){let p=h.getBoundingClientRect();o=Math.max(o,p.left),s=Math.min(s,p.right),a=Math.max(a,p.top),c=Math.min(f==t.parentNode?i.innerHeight:c,p.bottom)}f=d.position=="absolute"||d.position=="fixed"?h.offsetParent:h.parentNode}else if(f.nodeType==11)f=f.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,c)-(n.top+e)}}function SW(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function AW(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class c0{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return ve.replace({widget:new RW(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class RW extends ci{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Mw{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Ow,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=st.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Lp).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new bW(n),this.stateDeco=e.facet(Qa).filter(r=>typeof r!="function"),this.heightMap=tn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle.setDoc(e.doc),[new Vn(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ve.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new Yc(o,s))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ow:new Vp(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ea(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Qa).filter(h=>typeof h!="function");let i=e.changedRanges,o=Vn.extendWithRanges(i,yW(r,this.stateDeco,e?e.changes:Rt.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Tw(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=s||Bs)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<c.from||n.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,n));let f=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(f||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(P6)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?st.RTL:st.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),c=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let f=0,h=0;if(a.width&&a.height){let{scaleX:M,scaleY:O}=p6(n,a);(M>.005&&Math.abs(this.scaleX-M)>.005||O>.005&&Math.abs(this.scaleY-O)>.005)&&(this.scaleX=M,this.scaleY=O,f|=16,s=c=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,p=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=p)&&(this.paddingTop=d,this.paddingBottom=p,f|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,f|=16);let b=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=b&&(this.scrollAnchorHeight=-1,this.scrollTop=b),this.scrolledToBottom=w6(e.scrollDOM);let x=(this.printing?AW:$W)(n,this.paddingTop),v=x.top-this.pixelViewport.top,C=x.bottom-this.pixelViewport.bottom;this.pixelViewport=x;let $=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if($!=this.inView&&(this.inView=$,$&&(c=!0)),!this.inView&&!this.scrollTarget&&!SW(e.dom))return 0;let A=a.width;if((this.contentDOMWidth!=A||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,f|=16),c){let M=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(M)&&(s=!0),s||i.lineWrapping&&Math.abs(A-this.contentDOMWidth)>i.charWidth){let{lineHeight:O,charWidth:I,textHeight:_}=e.docView.measureTextSize();s=O>0&&i.refresh(o,O,I,_,A/I,M),s&&(e.docView.minWidth=0,f|=16)}v>0&&C>0?h=Math.max(v,C):v<0&&C<0&&(h=Math.min(v,C)),Tw();for(let O of this.viewports){let I=O.from==this.viewport.from?M:e.docView.measureVisibleLineHeights(O);this.heightMap=(s?tn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle,[new Vn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new wW(O.from,I))}Bs&&(f|=2)}let T=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(f&2&&(f|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),f|=this.updateForViewport()),(f&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),f|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),f}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,c=new Yc(i.lineAt(s-r*1e3,ot.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,ot.ByHeight,o,0,0).to);if(n){let{head:f}=n.range;if(f<c.from||f>c.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(f,ot.ByPos,o,0,0),p;n.y=="center"?p=(d.top+d.bottom)/2-h/2:n.y=="start"||n.y=="nearest"&&f<c.from?p=d.top:p=d.bottom-h,c=new Yc(i.lineAt(p-1e3/2,ot.ByHeight,o,0,0).from,i.lineAt(p+h+1e3/2,ot.ByHeight,o,0,0).to)}}return c}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Yc(this.heightMap.lineAt(r,ot.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,ot.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,ot.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,ot.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new c0(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=st.LTR&&!r)return[];let a=[],c=(h,d,p,b)=>{if(d-h<o)return;let x=this.state.selection.main,v=[x.from];x.empty||v.push(x.to);for(let $ of v)if($>h&&$<d){c(h,$-10,p,b),c($+10,d,p,b);return}let C=TW(e,$=>$.from>=p.from&&$.to<=p.to&&Math.abs($.from-h)<o&&Math.abs($.to-d)<o&&!v.some(A=>$.from<A&&$.to>A));if(!C){if(d<p.to&&n&&r&&n.visibleRanges.some(T=>T.from<=d&&T.to>=d)){let T=n.moveToLineBoundary(J.cursor(d),!1,!0).head;T>h&&(d=T)}let $=this.gapSize(p,h,d,b),A=r||$<2e6?$:2e6;C=new c0(h,d,$,A)}a.push(C)},f=h=>{if(h.length<s||h.type!=en.Text)return;let d=kW(h.from,h.to,this.stateDeco);if(d.total<s)return;let p=this.scrollTarget?this.scrollTarget.range.head:null,b,x;if(r){let v=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,$;if(p!=null){let A=Qc(d,p),T=((this.visibleBottom-this.visibleTop)/2+v)/h.height;C=A-T,$=A+T}else C=(this.visibleTop-h.top-v)/h.height,$=(this.visibleBottom-h.top+v)/h.height;b=Xc(d,C),x=Xc(d,$)}else{let v=d.total*this.heightOracle.charWidth,C=i*this.heightOracle.charWidth,$=0;if(v>2e6)for(let I of e)I.from>=h.from&&I.from<h.to&&I.size!=I.displaySize&&I.from*this.heightOracle.charWidth+$<this.pixelViewport.left&&($=I.size-I.displaySize);let A=this.pixelViewport.left+$,T=this.pixelViewport.right+$,M,O;if(p!=null){let I=Qc(d,p),_=((T-A)/2+C)/v;M=I-_,O=I+_}else M=(A-C)/v,O=(T+C)/v;b=Xc(d,M),x=Xc(d,O)}b>h.from&&c(h.from,b,h,d),x<h.to&&c(x,h.to,h,d)};for(let h of this.viewportLines)Array.isArray(h.type)?h.type.forEach(f):f(h);return a}gapSize(e,n,r,i){let o=Qc(i,r)-Qc(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){c0.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ve.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ke.spans(n,this.viewport.from,this.viewport.to,{span(o,s){r.push({from:o,to:s})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o<r.length&&!(i&8);o++){let s=this.visibleRanges[o],a=r[o];(s.from!=a.from||s.to!=a.to)&&(i|=4,e&&e.mapPos(s.from,-1)==a.from&&e.mapPos(s.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ea(this.heightMap.lineAt(e,ot.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Ea(this.heightMap.lineAt(this.scaler.fromDOM(e),ot.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Ea(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}let Yc=class{constructor(e,n){this.from=e,this.to=n}};function kW(t,e,n){let r=[],i=t,o=0;return Ke.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function Xc({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function Qc(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function TW(t,e){for(let n of t)if(e(n))return n}const Ow={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class Vp{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:c})=>{let f=n.lineAt(a,ot.ByPos,e,0,0).top,h=n.lineAt(c,ot.ByPos,e,0,0).bottom;return i+=h-f,{from:a,to:c,top:f,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}eq(e){return e instanceof Vp?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Ea(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new br(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Ea(i,e)):t._content)}const Zc=he.define({combine:t=>t.join(" ")}),F1=he.define({combine:t=>t.indexOf(!0)>-1}),V1=_i.newName(),a4=_i.newName(),l4=_i.newName(),c4={"&light":"."+a4,"&dark":"."+l4};function H1(t,e,n){return new _i(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const EW=H1("."+V1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},c4),MW={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},u0=ue.ie&&ue.ie_version<=11;class OW{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new gP,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(ue.ie&&ue.ie_version<=11||ue.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(ue.chrome&&ue.chrome_version<126)&&(this.editContext=new IW(e),e.state.facet(Yr)&&(e.contentDOM.editContext=this.editContext.editContext)),u0&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Yr)?r.root.activeElement!=this.dom:!pu(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ue.ie&&ue.ie_version<=11||ue.android&&ue.chrome)&&!r.state.selection.main.empty&&i.focusNode&&_a(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Xa(e.root);if(!n)return!1;let r=ue.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&DW(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=pu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&mP(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,MW),u0&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),u0&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&xs(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&pu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new YP(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=Q6(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=Dw(n,e.previousSibling||e.target.previousSibling,-1),i=Dw(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Yr)!=e.state.facet(Yr)&&(e.view.contentDOM.editContext=e.state.facet(Yr)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Dw(t,e,n){for(;e;){let r=tt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function Iw(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return _a(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function DW(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Iw(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?Iw(t,n):null}class IW{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:s}=i,a=this.toEditorPos(r.updateRangeStart),c=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let f={from:a,to:c,insert:Ge.of(r.text.split(`
|
|
56
|
+
`))};if(f.from==this.from&&o<this.from?f.from=o:f.to==this.to&&o>this.to&&(f.to=o),f.from==f.to&&!f.insert.length){let h=J.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));h.main.eq(i)||e.dispatch({selection:h,userEvent:"select"});return}if((ue.mac||ue.android)&&f.from==s-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:c,insert:Ge.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let h=this.to-this.from+(f.to-f.from+f.insert.length);jp(e,f,J.single(this.toEditorPos(r.selectionStart,h),this.toEditorPos(r.selectionEnd,h)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let s=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);s<a;s++){let c=e.coordsForChar(s);o=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||o||new DOMRect,i.push(o)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let o of r.getTextFormats()){let s=o.underlineStyle,a=o.underlineThickness;if(s!="None"&&a!="None"){let c=this.toEditorPos(o.rangeStart),f=this.toEditorPos(o.rangeEnd);if(c<f){let h=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;i.push(ve.mark({attributes:{style:h}}).range(c,f))}}}e.dispatch({effects:z6.of(ve.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Xa(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,s,a,c,f)=>{if(r)return;let h=f.length-(s-o);if(i&&s>=i.to)if(i.from==o&&i.to==s&&i.insert.eq(f)){i=this.pendingContextChange=null,n+=h,this.to+=h;return}else i=null,this.revertPending(e.state);if(o+=n,s+=n,s<=this.from)this.from+=h,this.to+=h;else if(o<this.to){if(o<this.from||s>this.to||this.to-this.from+f.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(s),f.toString()),this.to+=h}n+=h}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class le{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||pP(e.parent)||document,this.viewState=new Mw(e.state||qe.create(e)),e.scrollTo&&e.scrollTo.is(qc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ra).map(i=>new s0(i));for(let i of this.plugins)i.update(this);this.observer=new OW(this),this.inputState=new eW(this),this.inputState.ensureHandlers(this.plugins),this.docView=new fw(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof kt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let p of e){if(p.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=p.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,c=null;e.some(p=>p.annotation(r4))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=i4(o,s),c||(a=1));let f=this.observer.delayedAndroidKey,h=null;if(f?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(h=null)):this.observer.clear(),o.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(o);i=Ku.create(this,o,e),i.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let p of e){if(d&&(d=d.map(p.changes)),p.scrollIntoView){let{main:b}=p.state.selection;d=new vs(b.empty?b:J.cursor(b.head,b.head>b.anchor?-1:1))}for(let b of p.effects)b.is(qc)&&(d=b.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Yu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ka)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Zc)!=i.state.facet(Zc)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let p of this.state.facet(L1))try{p(i)}catch(b){fn(this.state,b,"update listener")}(c||h)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),h&&!Q6(this,h)&&f.force&&xs(this.contentDOM,f.key,f.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Mw(e),this.plugins=e.facet(Ra).map(r=>new s0(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new fw(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ra),r=e.state.facet(Ra);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new s0(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){fn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(w6(r))o=-1,s=this.viewState.heightMap.height;else{let b=this.viewState.scrollAnchorAt(i);o=b.from,s=b.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let h=f.map(b=>{try{return b.read(this)}catch(x){return fn(this.state,x),_w}}),d=Ku.create(this,this.state,[]),p=!1;d.flags|=c,n?n.flags|=c:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),p=this.docView.update(d),p&&this.docViewUpdate());for(let b=0;b<f.length;b++)if(h[b]!=_w)try{let x=f[b];x.write&&x.write(h[b],this)}catch(x){fn(this.state,x)}if(p&&this.docView.updateSelection(!0),!d.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let x=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(x>1||x<-1){i=i+x,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(L1))a(n)}get themeClasses(){return V1+" "+(this.state.facet(F1)?l4:a4)+" "+this.state.facet(Zc)}updateAttrs(){let e=Lw(this,U6,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Yr)?"true":"false",class:"cm-content",style:`${ue.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Lw(this,Lp,n);let r=this.observer.ignore(()=>{let i=M1(this.contentDOM,this.contentAttrs,n),o=M1(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(le.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ka);let e=this.state.facet(le.cspNonce);_i.mount(this.root,this.styleModules.concat(EW).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return l0(this,e,mw(this,e,n,r))}moveByGroup(e,n){return l0(this,e,mw(this,e,n,r=>UP(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return J.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return zP(this,e,n,r)}moveVertically(e,n,r){return l0(this,e,qP(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),X6(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[ki.find(o,e-i.from,-1,n)];return $l(r,s.dir==st.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(H6)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>_W)return I6(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||D6(o.isolates,r=uw(this,e))))return o.order;r||(r=uw(this,e));let i=TP(e.text,n,r);return this.bidiCache.push(new Yu(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ue.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{m6(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return qc.of(new vs(typeof e=="number"?J.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return qc.of(new vs(J.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return bt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return bt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=_i.newName(),i=[Zc.of(r),ka.of(H1(`.${r}`,e))];return n&&n.dark&&i.push(F1.of(!0)),i}static baseTheme(e){return Lo.lowest(ka.of(H1("."+V1,e,c4)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&tt.get(r)||tt.get(e);return((n=i?.rootView)===null||n===void 0?void 0:n.view)||null}}le.styleModule=ka;le.inputHandler=F6;le.clipboardInputFilter=Ip;le.clipboardOutputFilter=_p;le.scrollHandler=W6;le.focusChangeEffect=V6;le.perLineTextDirection=H6;le.exceptionSink=j6;le.updateListener=L1;le.editable=Yr;le.mouseSelectionStyle=N6;le.dragMovesSelection=B6;le.clickAddsSelectionRange=L6;le.decorations=Qa;le.outerDecorations=q6;le.atomicRanges=Bp;le.bidiIsolatedRanges=K6;le.scrollMargins=G6;le.darkTheme=F1;le.cspNonce=he.define({combine:t=>t.length?t[0]:""});le.contentAttributes=Lp;le.editorAttributes=U6;le.lineWrapping=le.contentAttributes.of({class:"cm-lineWrapping"});le.announce=Ee.define();const _W=4096,_w={};class Yu{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:st.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new Yu(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function Lw(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&E1(s,n)}return n}const LW=ue.mac?"mac":ue.windows?"win":ue.linux?"linux":"key";function BW(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,a;for(let c=0;c<n.length-1;++c){const f=n[c];if(/^(cmd|meta|m)$/i.test(f))a=!0;else if(/^a(lt)?$/i.test(f))i=!0;else if(/^(c|ctrl|control)$/i.test(f))o=!0;else if(/^s(hift)?$/i.test(f))s=!0;else if(/^mod$/i.test(f))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+f)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function Jc(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const NW=Lo.default(le.domEventHandlers({keydown(t,e){return f4(u4(e.state),t,e,"editor")}})),qf=he.define({enables:NW}),Bw=new WeakMap;function u4(t){let e=t.facet(qf),n=Bw.get(e);return n||Bw.set(e,n=VW(e.reduce((r,i)=>r.concat(i),[]))),n}function jW(t,e,n){return f4(u4(t.state),e,t,n)}let $i=null;const FW=4e3;function VW(t,e=LW){let n=Object.create(null),r=Object.create(null),i=(s,a)=>{let c=r[s];if(c==null)r[s]=a;else if(c!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,c,f,h)=>{var d,p;let b=n[s]||(n[s]=Object.create(null)),x=a.split(/ (?!$)/).map($=>BW($,e));for(let $=1;$<x.length;$++){let A=x.slice(0,$).join(" ");i(A,!0),b[A]||(b[A]={preventDefault:!0,stopPropagation:!1,run:[T=>{let M=$i={view:T,prefix:A,scope:s};return setTimeout(()=>{$i==M&&($i=null)},FW),!0}]})}let v=x.join(" ");i(v,!1);let C=b[v]||(b[v]={preventDefault:!1,stopPropagation:!1,run:((p=(d=b._any)===null||d===void 0?void 0:d.run)===null||p===void 0?void 0:p.slice())||[]});c&&C.run.push(c),f&&(C.preventDefault=!0),h&&(C.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let f of a){let h=n[f]||(n[f]=Object.create(null));h._any||(h._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=s;for(let p in h)h[p].run.push(b=>d(b,P1))}let c=s[e]||s.key;if(c)for(let f of a)o(f,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(f,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}let P1=null;function f4(t,e,n,r){P1=e;let i=uP(e),o=ln(i,0),s=mr(o)==i.length&&i!=" ",a="",c=!1,f=!1,h=!1;$i&&$i.view==n&&$i.scope==r&&(a=$i.prefix+" ",J6.indexOf(e.keyCode)<0&&(f=!0,$i=null));let d=new Set,p=C=>{if(C){for(let $ of C.run)if(!d.has($)&&(d.add($),$(n)))return C.stopPropagation&&(h=!0),!0;C.preventDefault&&(C.stopPropagation&&(h=!0),f=!0)}return!1},b=t[r],x,v;return b&&(p(b[a+Jc(i,e,!s)])?c=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ue.windows&&e.ctrlKey&&e.altKey)&&(x=Li[e.keyCode])&&x!=i?(p(b[a+Jc(x,e,!0)])||e.shiftKey&&(v=Ya[e.keyCode])!=i&&v!=x&&p(b[a+Jc(v,e,!1)]))&&(c=!0):s&&e.shiftKey&&p(b[a+Jc(i,e,!0)])&&(c=!0),!c&&p(b._any)&&(c=!0)),f&&(c=!0),c&&h&&e.stopPropagation(),P1=null,c}class Rl{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=h4(e);return[new Rl(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return HW(e,n,r)}}function h4(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==st.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Nw(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),s=(i.top+i.bottom)/2,a=t.posAtCoords({x:o.left+1,y:s}),c=t.posAtCoords({x:o.right-1,y:s});return a==null||c==null?r:{from:Math.max(r.from,Math.min(a,c)),to:Math.min(r.to,Math.max(a,c))}}function HW(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==st.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),c=h4(t),f=s.querySelector(".cm-line"),h=f&&window.getComputedStyle(f),d=a.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),p=a.right-(h?parseInt(h.paddingRight):0),b=N1(t,r),x=N1(t,i),v=b.type==en.Text?b:null,C=x.type==en.Text?x:null;if(v&&(t.lineWrapping||b.widgetLineBreaks)&&(v=Nw(t,r,1,v)),C&&(t.lineWrapping||x.widgetLineBreaks)&&(C=Nw(t,i,-1,C)),v&&C&&v.from==C.from&&v.to==C.to)return A(T(n.from,n.to,v));{let O=v?T(n.from,null,v):M(b,!1),I=C?T(null,n.to,C):M(x,!0),_=[];return(v||b).to<(C||x).from-(v&&C?1:0)||b.widgetLineBreaks>1&&O.bottom+t.defaultLineHeight/2<I.top?_.push($(d,O.bottom,p,I.top)):O.bottom<I.top&&t.elementAtHeight((O.bottom+I.top)/2).type==en.Text&&(O.bottom=I.top=(O.bottom+I.top)/2),A(O).concat(_).concat(A(I))}function $(O,I,_,V){return new Rl(e,O-c.left,I-c.top,_-O,V-I)}function A({top:O,bottom:I,horizontal:_}){let V=[];for(let F=0;F<_.length;F+=2)V.push($(_[F],O,_[F+1],I));return V}function T(O,I,_){let V=1e9,F=-1e9,H=[];function z(K,te,ie,ne,oe){let X=t.coordsAtPos(K,K==_.to?-2:2),ce=t.coordsAtPos(ie,ie==_.from?2:-2);!X||!ce||(V=Math.min(X.top,ce.top,V),F=Math.max(X.bottom,ce.bottom,F),oe==st.LTR?H.push(o&&te?d:X.left,o&&ne?p:ce.right):H.push(!o&&ne?d:ce.left,!o&&te?p:X.right))}let W=O??_.from,Y=I??_.to;for(let K of t.visibleRanges)if(K.to>W&&K.from<Y)for(let te=Math.max(K.from,W),ie=Math.min(K.to,Y);;){let ne=t.state.doc.lineAt(te);for(let oe of t.bidiSpans(ne)){let X=oe.from+ne.from,ce=oe.to+ne.from;if(X>=ie)break;ce>te&&z(Math.max(X,te),O==null&&X<=W,Math.min(ce,ie),I==null&&ce>=Y,oe.dir)}if(te=ne.to+1,te>=ie)break}return H.length==0&&z(W,O==null,Y,I==null,t.textDirection),{top:V,bottom:F,horizontal:H}}function M(O,I){let _=a.top+(I?O.top:O.bottom);return{top:_,bottom:_,horizontal:[]}}}function PW(t,e){return t.constructor==e.constructor&&t.eq(e)}class WW{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(xu)!=e.state.facet(xu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(xu);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!PW(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const xu=he.define();function d4(t){return[bt.define(e=>new WW(e,t)),xu.of(t)]}const g4=!(ue.ios&&ue.webkit&&ue.webkit_version<534),Za=he.define({combine(t){return Mr(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function zW(t={}){return[Za.of(t),UW,qW,KW,P6.of(!0)]}function p4(t){return t.startState.facet(Za)!=t.state.facet(Za)}const UW=d4({above:!0,markers(t){let{state:e}=t,n=e.facet(Za),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||g4:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:J.cursor(i.head,i.head>i.anchor?-1:1);for(let c of Rl.forRange(t,s,a))r.push(c)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=p4(t);return n&&jw(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){jw(e.state,t)},class:"cm-cursorLayer"});function jw(t,e){e.style.animationDuration=t.facet(Za).cursorBlinkRate+"ms"}const qW=d4({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Rl.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||p4(t)},class:"cm-selectionLayer"}),W1={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};g4&&(W1[".cm-line"].caretColor=W1[".cm-content"].caretColor="transparent !important");const KW=Lo.highest(le.theme(W1)),m4=Ee.define({map(t,e){return t==null?null:e.mapPos(t)}}),Ma=Bt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(m4)?r.value:n,t)}}),GW=bt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Ma);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Ma)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Ma),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Ma)!=t&&this.view.dispatch({effects:m4.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function YW(){return[Ma,GW]}function Fw(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function XW(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class QW{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,c,f,h)=>i(h,f,f+a[0].length,a,c);else if(typeof r=="function")this.addMatch=(a,c,f,h)=>{let d=r(a,c,f);d&&h(f,f+a[0].length,d)};else if(r)this.addMatch=(a,c,f,h)=>h(f,f+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new ii,r=n.add.bind(n);for(let{from:i,to:o}of XW(e,this.maxLength))Fw(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(c,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),a=Math.min(o.to,i);if(a>s){let c=e.state.doc.lineAt(s),f=c.to<a?e.state.doc.lineAt(a):c,h=Math.max(o.from,c.from),d=Math.min(o.to,f.to);if(this.boundary){for(;s>c.from;s--)if(this.boundary.test(c.text[s-1-c.from])){h=s;break}for(;a<f.to;a++)if(this.boundary.test(f.text[a-f.from])){d=a;break}}let p=[],b,x=(v,C,$)=>p.push($.range(v,C));if(c==f)for(this.regexp.lastIndex=h-c.from;(b=this.regexp.exec(c.text))&&b.index<d-c.from;)this.addMatch(b,e,b.index+c.from,x);else Fw(e.state.doc,this.regexp,h,d,(v,C)=>this.addMatch(C,e,v,x));n=n.update({filterFrom:h,filterTo:d,filter:(v,C)=>v<h||C>d,add:p})}}return n}}const z1=/x/.unicode!=null?"gu":"g",ZW=new RegExp(`[\0-\b
|
|
57
|
+
--\u2028\u2029\uFEFF-]`,z1),JW={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let f0=null;function ez(){var t;if(f0==null&&typeof document<"u"&&document.body){let e=document.body.style;f0=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return f0||!1}const vu=he.define({combine(t){let e=Mr(t,{render:null,specialChars:ZW,addSpecialChars:null});return(e.replaceTabs=!ez())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,z1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,z1)),e}});function tz(t={}){return[vu.of(t),nz()]}let Vw=null;function nz(){return Vw||(Vw=bt.fromClass(class{constructor(t){this.view=t,this.decorations=ve.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(vu)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new QW({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=ln(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,c=Gs(s.text,a,r-s.from);return ve.replace({widget:new sz((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=ve.replace({widget:new oz(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(vu);t.startState.facet(vu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const rz="•";function iz(t){return t>=32?rz:t==10?"":String.fromCharCode(9216+t)}class oz extends ci{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=iz(this.code),r=e.state.phrase("Control character")+" "+(JW[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class sz extends ci{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function az(){return cz}const lz=ve.line({class:"cm-activeLine"}),cz=bt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(lz.range(i.from)),e=i.from)}return ve.set(n)}},{decorations:t=>t.decorations});class uz extends ci{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?n.setAttribute("aria-label","placeholder "+this.content):n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Is(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=$l(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function fz(t){return bt.fromClass(class{constructor(e){this.view=e,this.placeholder=t?ve.set([ve.widget({widget:new uz(t),side:1}).range(0)]):ve.none}get decorations(){return this.view.state.doc.length?ve.none:this.placeholder}},{decorations:e=>e.decorations})}const U1=2e3;function hz(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>U1||n.off>U1||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let c=r;c<=i;c++){let f=t.doc.line(c);f.length<=a&&o.push(J.range(f.from+s,f.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let c=r;c<=i;c++){let f=t.doc.line(c),h=C1(f.text,s,t.tabSize,!0);if(h<0)o.push(J.cursor(f.to));else{let d=C1(f.text,a,t.tabSize);o.push(J.range(f.from+h,f.from+d))}}}return o}function dz(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Hw(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>U1?-1:i==r.length?dz(t,e.clientX):Gs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function gz(t,e){let n=Hw(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=Hw(t,i);if(!a)return r;let c=hz(t.state,n,a);return c.length?s?J.create(c.concat(r.ranges)):J.create(c):r}}:null}function pz(t){let e=n=>n.altKey&&n.button==0;return le.mouseSelectionStyle.of((n,r)=>e(r)?gz(n,r):null)}const mz={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},bz={style:"cursor: crosshair"};function wz(t={}){let[e,n]=mz[t.key||"Alt"],r=bt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,le.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?bz:null})]}const va="-10000px";class b4{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=r(s,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(c=>c);if(i===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let s=[],a=n?[]:null;for(let c=0;c<o.length;c++){let f=o[c],h=-1;if(f){for(let d=0;d<this.tooltips.length;d++){let p=this.tooltips[d];p&&p.create==f.create&&(h=d)}if(h<0)s[c]=this.createTooltipView(f,c?s[c-1]:null),a&&(a[c]=!!f.above);else{let d=s[c]=this.tooltipViews[h];a&&(a[c]=n[h]),d.update&&d.update(e)}}}for(let c of this.tooltipViews)s.indexOf(c)<0&&(this.removeTooltipView(c),(r=c.destroy)===null||r===void 0||r.call(c));return n&&(a.forEach((c,f)=>n[f]=c),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function xz(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const h0=he.define({combine:t=>{var e,n,r;return{position:ue.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||xz}}}),Pw=new WeakMap,Hp=bt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(h0);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new b4(t,Pp,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(h0);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=va,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(ue.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==va&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Np(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(h0).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],f=this.manager.tooltipViews[a],{dom:h}=f,d=t.pos[a],p=t.size[a];if(!d||c.clip!==!1&&(d.bottom<=Math.max(n.top,r.top)||d.top>=Math.min(n.bottom,r.bottom)||d.right<Math.max(n.left,r.left)-.1||d.left>Math.min(n.right,r.right)+.1)){h.style.top=va;continue}let b=c.arrow?f.dom.querySelector(".cm-tooltip-arrow"):null,x=b?7:0,v=p.right-p.left,C=(e=Pw.get(f))!==null&&e!==void 0?e:p.bottom-p.top,$=f.offset||yz,A=this.view.textDirection==st.LTR,T=p.width>r.right-r.left?A?r.left:r.right-p.width:A?Math.max(r.left,Math.min(d.left-(b?14:0)+$.x,r.right-v)):Math.min(Math.max(r.left,d.left-v+(b?14:0)-$.x),r.right-v),M=this.above[a];!c.strictSide&&(M?d.top-C-x-$.y<r.top:d.bottom+C+x+$.y>r.bottom)&&M==r.bottom-d.bottom>d.top-r.top&&(M=this.above[a]=!M);let O=(M?d.top-r.top:r.bottom-d.bottom)-x;if(O<C&&f.resize!==!1){if(O<this.view.defaultLineHeight){h.style.top=va;continue}Pw.set(f,C),h.style.height=(C=O)/o+"px"}else h.style.height&&(h.style.height="");let I=M?d.top-C-x-$.y:d.bottom+x+$.y,_=T+v;if(f.overlap!==!0)for(let V of s)V.left<_&&V.right>T&&V.top<I+C&&V.bottom>I&&(I=M?V.top-C-2-x:V.bottom+x+2);if(this.position=="absolute"?(h.style.top=(I-t.parent.top)/o+"px",Ww(h,(T-t.parent.left)/i)):(h.style.top=I/o+"px",Ww(h,T/i)),b){let V=d.left+(A?$.x:-$.x)-(T+14-7);b.style.left=V/i+"px"}f.overlap!==!0&&s.push({left:T,top:I,right:_,bottom:I+C}),h.classList.toggle("cm-tooltip-above",M),h.classList.toggle("cm-tooltip-below",!M),f.positioned&&f.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=va}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Ww(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const vz=le.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),yz={x:0,y:0},Pp=he.define({enables:[Hp,vz]}),Xu=he.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Kf{static create(e){return new Kf(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new b4(e,Xu,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Cz=Pp.compute([Xu],t=>{let e=t.facet(Xu);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Kf.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class $z{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Ri)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(i)).find(h=>h.from<=i&&h.to>=i),f=c&&c.dir==st.RTL?-1:1;o=n.x<a.left?-f:f}let s=this.source(e,i,o);if(s?.then){let a=this.pending={pos:i};s.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>fn(e.state,c,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(Hp),n=e?e.manager.tooltips.findIndex(r=>r.create==Kf.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!Sz(o.dom,e)||this.pending){let{pos:s}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!Az(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const eu=4;function Sz(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),s;if(s=t.querySelector(".cm-tooltip-arrow")){let a=s.getBoundingClientRect();i=Math.min(a.top,i),o=Math.max(a.bottom,o)}return e.clientX>=n-eu&&e.clientX<=r+eu&&e.clientY>=i-eu&&e.clientY<=o+eu}function Az(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let c=t.posAtCoords({x:r,y:i},!1);return c>=e&&c<=n}function Rz(t,e={}){let n=Ee.define(),r=Bt.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of i){let c=o.changes.mapPos(a.pos,-1,Jt.TrackDel);if(c!=null){let f=Object.assign(Object.create(null),a);f.pos=c,f.end!=null&&(f.end=o.changes.mapPos(f.end)),s.push(f)}}i=s}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(kz)&&(i=[]);return i},provide:i=>Xu.from(i)});return{active:r,extension:[r,bt.define(i=>new $z(i,t,r,n,e.hoverTime||300)),Cz]}}function w4(t,e){let n=t.plugin(Hp);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const kz=Ee.define(),zw=he.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Ja(t,e){let n=t.plugin(x4),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const x4=bt.fromClass(class{constructor(t){this.input=t.state.facet(el),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(zw);this.top=new tu(t,!0,e.topContainer),this.bottom=new tu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(zw);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new tu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new tu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(el);if(n!=this.input){let r=n.filter(c=>c),i=[],o=[],s=[],a=[];for(let c of r){let f=this.specs.indexOf(c),h;f<0?(h=c(t.view),a.push(h)):(h=this.panels[f],h.update&&h.update(t)),i.push(h),(h.top?o:s).push(h)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class tu{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Uw(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Uw(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Uw(t){let e=t.nextSibling;return t.remove(),e}const el=he.define({enables:x4});class si extends Co{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}si.prototype.elementClass="";si.prototype.toDOM=void 0;si.prototype.mapMode=Jt.TrackBefore;si.prototype.startSide=si.prototype.endSide=-1;si.prototype.point=!0;const yu=he.define(),Tz=he.define(),Ez={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ke.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Ba=he.define();function Mz(t){return[v4(),Ba.of(Object.assign(Object.assign({},Ez),t))]}const qw=he.define({combine:t=>t.some(e=>e)});function v4(t){return[Oz]}const Oz=bt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Ba).map(e=>new Gw(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(qw),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(qw)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Ke.iter(this.view.state.facet(yu),this.view.viewport.from),r=[],i=this.gutters.map(o=>new Dz(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==en.Text&&s){q1(n,r,a.from);for(let c of i)c.line(this.view,a,r);s=!1}else if(a.widget)for(let c of i)c.widget(this.view,a)}else if(o.type==en.Text){q1(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Ba),n=t.state.facet(Ba),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ke.eq(t.startState.facet(yu),t.state.facet(yu),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new Gw(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==st.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function Kw(t){return Array.isArray(t)?t:[t]}function q1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Dz{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ke.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new y4(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];q1(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(Tz)){let s=o(e,n.widget,n);s&&(i||(i=[])).push(s)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Gw{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let c=o.getBoundingClientRect();s=(c.top+c.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=Kw(n.markers(e)),n.initialSpacer&&(this.spacer=new y4(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Kw(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ke.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class y4{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),Iz(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,c=o<n.length?n[o++]:null,f=!1;if(c){let h=c.elementClass;h&&(r+=" "+h);for(let d=s;d<this.markers.length;d++)if(this.markers[d].compare(c)){a=d,f=!0;break}}else a=this.markers.length;for(;s<a;){let h=this.markers[s++];if(h.toDOM){h.destroy(i);let d=i.nextSibling;i.remove(),i=d}}if(!c)break;c.toDOM&&(f?i=i.nextSibling:this.dom.insertBefore(c.toDOM(e),i)),f&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function Iz(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const _z=he.define(),Lz=he.define(),ls=he.define({combine(t){return Mr(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,c,f)=>o(a,c,f)||s(a,c,f):s}return r}})}});class d0 extends si{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function g0(t,e){return t.state.facet(ls).formatNumber(e,t.state)}const Bz=Ba.compute([ls],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(_z)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new d0(g0(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(Lz)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(ls)!=e.state.facet(ls),initialSpacer(e){return new d0(g0(e,Yw(e.state.doc.lines)))},updateSpacer(e,n){let r=g0(n.view,Yw(n.view.state.doc.lines));return r==e.number?e:new d0(r)},domEventHandlers:t.facet(ls).domEventHandlers}));function Nz(t={}){return[ls.of(t),v4(),Bz]}function Yw(t){let e=9;for(;e<t;)e=e*10+9;return e}const jz=new class extends si{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Fz=yu.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(jz.range(i)))}return Ke.of(e)});function Vz(){return Fz}var p0;const cs=new je;function Hz(t){return he.define({combine:t?e=>e.concat(t):void 0})}const Pz=new je;class Xn{constructor(e,n,r=[],i=""){this.data=e,this.name=i,qe.prototype.hasOwnProperty("tree")||Object.defineProperty(qe.prototype,"tree",{get(){return Kt(this)}}),this.parser=n,this.extension=[Ni.of(this),qe.languageData.of((o,s,a)=>{let c=Xw(o,s,a),f=c.type.prop(cs);if(!f)return[];let h=o.facet(f),d=c.type.prop(Pz);if(d){let p=c.resolve(s-c.from,a);for(let b of d)if(b.test(p,o)){let x=o.facet(b.facet);return b.type=="replace"?x:x.concat(h)}}return h})].concat(r)}isActiveAt(e,n,r=-1){return Xw(e,n,r).type.prop(cs)==this.data}findRegions(e){let n=e.facet(Ni);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(cs)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(je.mounted);if(a){if(a.tree.prop(cs)==this.data){if(a.overlay)for(let c of a.overlay)r.push({from:c.from+s,to:c.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let c=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>c)return}}for(let c=0;c<o.children.length;c++){let f=o.children[c];f instanceof Ct&&i(f,o.positions[c]+s)}};return i(Kt(e),0),r}get allowsNesting(){return!0}}Xn.setState=Ee.define();function Xw(t,e,n){let r=t.facet(Ni),i=Kt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Ot.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Qu extends Xn{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=Hz(e.languageData);return new Qu(n,e.parser.configure({props:[cs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Qu(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Kt(t){let e=t.field(Xn.state,!1);return e?e.tree:Ct.empty}class Wz{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let ya=null;class Zu{constructor(e,n,r=[],i,o,s,a,c){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Zu(e,n,[],Ct.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Wz(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ct.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(go.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(go.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=ya;ya=this;try{return e()}finally{ya=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Qw(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((f,h,d,p)=>c.push({fromA:f,toA:h,fromB:d,toB:p})),r=go.applyChanges(r,c),i=Ct.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let f of this.skipped){let h=e.mapPos(f.from,1),d=e.mapPos(f.to,-1);h<d&&a.push({from:h,to:d})}}}return new Zu(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=Qw(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Ky{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let c=ya;if(c){for(let f of i)c.tempSkipped.push(f);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=s,new Ct(dn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return ya}}function Qw(t,e,n){return go.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ns{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ns(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Zu.create(e.facet(Ni).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ns(r)}}Xn.state=Bt.define({create:Ns.init,update(t,e){for(let n of e.effects)if(n.is(Xn.setState))return n.value;return e.startState.facet(Ni)!=e.state.facet(Ni)?Ns.init(e.state):t.apply(e)}});let C4=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(C4=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const m0=typeof navigator<"u"&&(!((p0=navigator.scheduling)===null||p0===void 0)&&p0.isInputPending)?()=>navigator.scheduling.isInputPending():null,zz=bt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Xn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Xn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=C4(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Xn.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!m0?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,c=o.context.work(()=>m0&&m0()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Xn.setState.of(new Ns(o.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>fn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ni=he.define({combine(t){return t.length?t[0]:null},enables:t=>[Xn.state,zz,le.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Uz{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const qz=he.define(),Gf=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ju(t){let e=t.facet(Gf);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function tl(t,e){let n="",r=t.tabSize,i=t.facet(Gf)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function Wp(t,e){t instanceof qe&&(t=new Yf(t));for(let r of t.state.facet(qz)){let i=r(t,e);if(i!==void 0)return i}let n=Kt(t.state);return n.length>=e?Kz(t,n,e):null}class Yf{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ju(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Gs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const $4=new je;function Kz(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s&&!(s.from==r.node.from&&s.type==r.node.type);s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return S4(r,t,n)}function S4(t,e,n){for(let r=t;r;r=r.next){let i=Yz(r.node);if(i)return i(zp.create(e,n,r))}return 0}function Gz(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Yz(t){let e=t.type.prop($4);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(je.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>Jz(s,!0,1,void 0,o&&!Gz(s)?i.from:void 0)}return t.parent==null?Xz:null}function Xz(){return 0}class zp extends Yf{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new zp(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(Qz(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return S4(this.context.next,this.base,this.pos)}}function Qz(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Zz(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let c=e.childAfter(a);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let f=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+f}}a=c.to}}function Jz(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=i==t.pos+s,c=Zz(t);return c?a?t.column(c.from):t.column(c.to):t.baseIndent+(a?0:t.unit*n)}function Zw({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const eU=200;function tU(){return qe.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+eU)return t;let o=n.sliceString(i.from,r);if(!e.some(f=>f.test(o)))return t;let{state:s}=t,a=-1,c=[];for(let{head:f}of s.selection.ranges){let h=s.doc.lineAt(f);if(h.from==a)continue;a=h.from;let d=Wp(s,h.from);if(d==null)continue;let p=/^\s*/.exec(h.text)[0],b=tl(s,d);p!=b&&c.push({from:h.from,to:h.from+p.length,insert:b})}return c.length?[t,{changes:c,sequential:!0}]:t})}const nU=he.define(),A4=new je;function rU(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function iU(t,e,n){let r=Kt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let c=a.type.prop(A4);if(c&&(a.to<r.length-50||r.length==t.doc.length||!oU(a))){let f=c(a,t);f&&f.from<=n&&f.from>=e&&f.to>n&&(o=f)}}return o}function oU(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function ef(t,e,n){for(let r of t.facet(nU)){let i=r(t,e,n);if(i)return i}return iU(t,e,n)}function R4(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Xf=Ee.define({map:R4}),kl=Ee.define({map:R4});function k4(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Ro=Bt.define({create(){return ve.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(Xf)&&!sU(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(M4),i=r?ve.replace({widget:new dU(r(e.state,n.value))}):Jw;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(kl)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>le.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(Jw.range(r,i))}return ve.set(e,!0)}});function tf(t,e,n){var r;let i=null;return(r=t.field(Ro,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function sU(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function T4(t,e){return t.field(Ro,!1)?e:e.concat(Ee.appendConfig.of(O4()))}const aU=t=>{for(let e of k4(t)){let n=ef(t.state,e.from,e.to);if(n)return t.dispatch({effects:T4(t.state,[Xf.of(n),E4(t,n)])}),!0}return!1},lU=t=>{if(!t.state.field(Ro,!1))return!1;let e=[];for(let n of k4(t)){let r=tf(t.state,n.from,n.to);r&&e.push(kl.of(r),E4(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function E4(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return le.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const cU=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=ef(e,i.from,i.to);o&&n.push(Xf.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:T4(t.state,n)}),!!n.length},uU=t=>{let e=t.state.field(Ro,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(kl.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},fU=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:aU},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:lU},{key:"Ctrl-Alt-[",run:cU},{key:"Ctrl-Alt-]",run:uU}],hU={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},M4=he.define({combine(t){return Mr(t,hU)}});function O4(t){return[Ro,mU]}function D4(t,e){let{state:n}=t,r=n.facet(M4),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),c=tf(t.state,a.from,a.to);c&&t.dispatch({effects:kl.of(c)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const Jw=ve.replace({widget:new class extends ci{toDOM(t){return D4(t,null)}}});class dU extends ci{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return D4(e,this.value)}}const gU={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class b0 extends si{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function pU(t={}){let e=Object.assign(Object.assign({},gU),t),n=new b0(e,!0),r=new b0(e,!1),i=bt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Ni)!=s.state.facet(Ni)||s.startState.field(Ro,!1)!=s.state.field(Ro,!1)||Kt(s.startState)!=Kt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new ii;for(let c of s.viewportLineBlocks){let f=tf(s.state,c.from,c.to)?r:ef(s.state,c.from,c.to)?n:null;f&&a.add(c.from,c.from,f)}return a.finish()}}),{domEventHandlers:o}=e;return[i,Mz({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||Ke.empty},initialSpacer(){return new b0(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,c)=>{if(o.click&&o.click(s,a,c))return!0;let f=tf(s.state,a.from,a.to);if(f)return s.dispatch({effects:kl.of(f)}),!0;let h=ef(s.state,a.from,a.to);return h?(s.dispatch({effects:Xf.of(h)}),!0):!1}})}),O4()]}const mU=le.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Tl{constructor(e,n){this.specs=e;let r;function i(a){let c=_i.newName();return(r||(r=Object.create(null)))["."+c]=a,c}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Xn?a=>a.prop(cs)==s.data:s?a=>a==s:void 0,this.style=Xy(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new _i(r):null,this.themeType=n.themeType}static define(e,n){return new Tl(e,n||{})}}const K1=he.define(),I4=he.define({combine(t){return t.length?[t[0]]:null}});function w0(t){let e=t.facet(K1);return e.length?e:t.facet(I4)}function _4(t,e){let n=[wU],r;return t instanceof Tl&&(t.module&&n.push(le.styleModule.of(t.module)),r=t.themeType),e?.fallback?n.push(I4.of(t)):r?n.push(K1.computeN([le.darkTheme],i=>i.facet(le.darkTheme)==(r=="dark")?[t]:[])):n.push(K1.of(t)),n}class bU{constructor(e){this.markCache=Object.create(null),this.tree=Kt(e.state),this.decorations=this.buildDeco(e,w0(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Kt(e.state),r=w0(e.state),i=r!=w0(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return ve.none;let r=new ii;for(let{from:i,to:o}of e.visibleRanges)NH(this.tree,n,(s,a,c)=>{r.add(s,a,this.markCache[c]||(this.markCache[c]=ve.mark({class:c})))},i,o);return r.finish()}}const wU=Lo.high(bt.fromClass(bU,{decorations:t=>t.decorations})),xU=Tl.define([{tag:U.meta,color:"#404740"},{tag:U.link,textDecoration:"underline"},{tag:U.heading,textDecoration:"underline",fontWeight:"bold"},{tag:U.emphasis,fontStyle:"italic"},{tag:U.strong,fontWeight:"bold"},{tag:U.strikethrough,textDecoration:"line-through"},{tag:U.keyword,color:"#708"},{tag:[U.atom,U.bool,U.url,U.contentSeparator,U.labelName],color:"#219"},{tag:[U.literal,U.inserted],color:"#164"},{tag:[U.string,U.deleted],color:"#a11"},{tag:[U.regexp,U.escape,U.special(U.string)],color:"#e40"},{tag:U.definition(U.variableName),color:"#00f"},{tag:U.local(U.variableName),color:"#30a"},{tag:[U.typeName,U.namespace],color:"#085"},{tag:U.className,color:"#167"},{tag:[U.special(U.variableName),U.macroName],color:"#256"},{tag:U.definition(U.propertyName),color:"#00c"},{tag:U.comment,color:"#940"},{tag:U.invalid,color:"#f00"}]),vU=le.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),L4=1e4,B4="()[]{}",N4=he.define({combine(t){return Mr(t,{afterCursor:!0,brackets:B4,maxScanDistance:L4,renderMatch:$U})}}),yU=ve.mark({class:"cm-matchingBracket"}),CU=ve.mark({class:"cm-nonmatchingBracket"});function $U(t){let e=[],n=t.matched?yU:CU;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const SU=Bt.define({create(){return ve.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(N4);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=wr(e.state,i.head,-1,r)||i.head>0&&wr(e.state,i.head-1,1,r)||r.afterCursor&&(wr(e.state,i.head,1,r)||i.head<e.state.doc.length&&wr(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return ve.set(n,!0)},provide:t=>le.decorations.from(t)}),AU=[SU,vU];function RU(t={}){return[N4.of(t),AU]}const kU=new je;function G1(t,e,n){let r=t.prop(e<0?je.openedBy:je.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Y1(t){let e=t.type.prop(kU);return e?e(t.node):t}function wr(t,e,n,r={}){let i=r.maxScanDistance||L4,o=r.brackets||B4,s=Kt(t),a=s.resolveInner(e,n);for(let c=a;c;c=c.parent){let f=G1(c.type,n,o);if(f&&c.from<c.to){let h=Y1(c);if(h&&(n>0?e>=h.from&&e<h.to:e>h.from&&e<=h.to))return TU(t,e,n,c,h,f,o)}}return EU(t,e,n,s,a.type,i,o)}function TU(t,e,n,r,i,o,s){let a=r.parent,c={from:i.from,to:i.to},f=0,h=a?.cursor();if(h&&(n<0?h.childBefore(r.from):h.childAfter(r.to)))do if(n<0?h.to<=r.from:h.from>=r.to){if(f==0&&o.indexOf(h.type.name)>-1&&h.from<h.to){let d=Y1(h);return{start:c,end:d?{from:d.from,to:d.to}:void 0,matched:!0}}else if(G1(h.type,n,s))f++;else if(G1(h.type,-n,s)){if(f==0){let d=Y1(h);return{start:c,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}f--}}while(n<0?h.prevSibling():h.nextSibling());return{start:c,matched:!1}}function EU(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),c=s.indexOf(a);if(c<0||c%2==0!=n>0)return null;let f={from:n<0?e-1:e,to:n>0?e+1:e},h=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let p=0;!h.next().done&&p<=o;){let b=h.value;n<0&&(p+=b.length);let x=e+p*n;for(let v=n>0?0:b.length-1,C=n>0?b.length:-1;v!=C;v+=n){let $=s.indexOf(b[v]);if(!($<0||r.resolveInner(x+v,1).type!=i))if($%2==0==n>0)d++;else{if(d==1)return{start:f,end:{from:x+v,to:x+v+1},matched:$>>1==c>>1};d--}}n>0&&(p+=b.length)}return h.done?{start:f,matched:!1}:null}const MU=Object.create(null),ex=[dn.none],tx=[],nx=Object.create(null),OU=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OU[t]=DU(MU,e);function x0(t,e){tx.indexOf(t)>-1||(tx.push(t),console.warn(e))}function DU(t,e){let n=[];for(let a of e.split(" ")){let c=[];for(let f of a.split(".")){let h=t[f]||U[f];h?typeof h=="function"?c.length?c=c.map(h):x0(f,`Modifier ${f} used at start of tag`):c.length?x0(f,`Tag ${f} used as modifier`):c=Array.isArray(h)?h:[h]:x0(f,`Unknown highlighting tag ${f}`)}for(let f of c)n.push(f)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),o=nx[i];if(o)return o.id;let s=nx[i]=dn.define({id:ex.length,name:r,props:[Gy({[r]:n})]});return ex.push(s),s.id}st.RTL,st.LTR;const IU=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=_U(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function _U(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const LU=Qu.define({name:"json",parser:HH.configure({props:[$4.add({Object:Zw({except:/^\s*\}/}),Array:Zw({except:/^\s*\]/})}),A4.add({"Object Array":rU})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function BU(){return new Uz(LU)}function NU(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}const jU=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=qp(t.state,n.from);return r.line?FU(t):r.block?HU(t):!1};function Up(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const FU=Up(zU,0),VU=Up(j4,0),HU=Up((t,e)=>j4(t,e,WU(e)),0);function qp(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Ca=50;function PU(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-Ca,r),s=t.sliceDoc(i,i+Ca),a=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(s)[0].length,f=o.length-a;if(o.slice(f-e.length,f)==e&&s.slice(c,c+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+c,margin:c&&1}};let h,d;i-r<=2*Ca?h=d=t.sliceDoc(r,i):(h=t.sliceDoc(r,r+Ca),d=t.sliceDoc(i-Ca,i));let p=/^\s*/.exec(h)[0].length,b=/\s*$/.exec(d)[0].length,x=d.length-b-n.length;return h.slice(p,p+e.length)==e&&d.slice(x,x+n.length)==n?{open:{pos:r+p+e.length,margin:/\s/.test(h.charAt(p+e.length))?1:0},close:{pos:i-b-n.length,margin:/\s/.test(d.charAt(x-1))?1:0}}:null}function WU(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function j4(t,e,n=e.selection.ranges){let r=n.map(o=>qp(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>PU(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let c=r[s],{open:f,close:h}=a;o.push({from:f.pos-c.open.length,to:f.pos+f.margin},{from:h.pos-h.margin,to:h.pos+c.close.length})}return{changes:o}}return null}function zU(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,c=1e9,f=qp(e,o).line;if(f){for(let h=o;h<=s;){let d=e.doc.lineAt(h);if(d.from>i&&(o==s||s>d.from)){i=d.from;let p=/^\s*/.exec(d.text)[0].length,b=p==d.length,x=d.text.slice(p,p+f.length)==f?p:-1;p<d.text.length&&p<c&&(c=p),r.push({line:d,comment:x,token:f,indent:p,empty:b,single:!1})}h=d.to+1}if(c<1e9)for(let h=a;h<r.length;h++)r[h].indent<r[h].line.text.length&&(r[h].indent=c);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:c,indent:f,empty:h,single:d}of r)(d||!h)&&o.push({from:a.from+f,insert:c+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:c}of r)if(a>=0){let f=s.from+a,h=f+c.length;s.text[h-s.from]==" "&&h++,o.push({from:f,to:h})}return{changes:o}}return null}const X1=Er.define(),UU=Er.define(),qU=he.define(),F4=he.define({combine(t){return Mr(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),V4=Bt.define({create(){return xr.empty},update(t,e){let n=e.state.facet(F4),r=e.annotation(X1);if(r){let c=hn.fromTransaction(e,r.selection),f=r.side,h=f==0?t.undone:t.done;return c?h=nf(h,h.length,n.minDepth,c):h=W4(h,e.startState.selection),new xr(f==0?r.rest:h,f==0?h:r.rest)}let i=e.annotation(UU);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(kt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=hn.fromTransaction(e),s=e.annotation(kt.time),a=e.annotation(kt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new xr(t.done.map(hn.fromJSON),t.undone.map(hn.fromJSON))}});function KU(t={}){return[V4,F4.of(t),le.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?H4:e.inputType=="historyRedo"?Q1:null;return r?(e.preventDefault(),r(n)):!1}})]}function Qf(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(V4,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const H4=Qf(0,!1),Q1=Qf(1,!1),GU=Qf(0,!0),YU=Qf(1,!0);class hn{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new hn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new hn(e.changes&&Rt.fromJSON(e.changes),[],e.mapped&&yr.fromJSON(e.mapped),e.startSelection&&J.fromJSON(e.startSelection),e.selectionsAfter.map(J.fromJSON))}static fromTransaction(e,n){let r=Nn;for(let i of e.startState.facet(qU)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new hn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Nn)}static selection(e){return new hn(void 0,Nn,void 0,void 0,e)}}function nf(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function XU(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let c=0;c<n.length;){let f=n[c++],h=n[c++];a>=f&&s<=h&&(r=!0)}}),r}function QU(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function P4(t,e){return t.length?e.length?t.concat(e):t:e}const Nn=[],ZU=200;function W4(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-ZU));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),nf(t,t.length-1,1e9,n.setSelAfter(r)))}else return[hn.selection([e])]}function JU(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function v0(t,e){if(!t.length)return t;let n=t.length,r=Nn;for(;n;){let i=eq(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[hn.selection(r)]:Nn}function eq(t,e,n){let r=P4(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Nn,n);if(!t.changes)return hn.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new hn(i,Ee.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const tq=/^(input\.type|delete)($|\.)/;class xr{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new xr(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||tq.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,XU(a.changes,e.changes))||r=="input.type.compose")?s=nf(s,s.length-1,i.minDepth,new hn(e.changes.compose(a.changes),P4(Ee.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Nn)):s=nf(s,s.length,i.minDepth,e),new xr(s,Nn,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Nn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&QU(o[o.length-1],e)?this:new xr(W4(this.done,e),this.undone,n,r)}addMapping(e){return new xr(v0(this.done,e),v0(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],s=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:X1.of({side:e,rest:JU(i),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Nn:i.slice(0,i.length-1);return o.mapped&&(a=v0(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:X1.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}xr.empty=new xr(Nn,Nn);const nq=[{key:"Mod-z",run:H4,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Q1,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Q1,preventDefault:!0},{key:"Mod-u",run:GU,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:YU,preventDefault:!0}];function Ys(t,e){return J.create(t.ranges.map(e),t.mainIndex)}function Or(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function or({state:t,dispatch:e},n){let r=Ys(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Or(t,r)),!0)}function Zf(t,e){return J.cursor(e?t.to:t.from)}function z4(t,e){return or(t,n=>n.empty?t.moveByChar(n,e):Zf(n,e))}function Gt(t){return t.textDirectionAt(t.state.selection.main.head)==st.LTR}const U4=t=>z4(t,!Gt(t)),q4=t=>z4(t,Gt(t));function K4(t,e){return or(t,n=>n.empty?t.moveByGroup(n,e):Zf(n,e))}const rq=t=>K4(t,!Gt(t)),iq=t=>K4(t,Gt(t));function oq(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Jf(t,e,n){let r=Kt(t).resolveInner(e.head),i=n?je.closedBy:je.openedBy;for(let c=e.head;;){let f=n?r.childAfter(c):r.childBefore(c);if(!f)break;oq(t,f,i)?r=f:c=n?f.to:f.from}let o=r.type.prop(i),s,a;return o&&(s=n?wr(t,r.from,1):wr(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,J.cursor(a,n?-1:1)}const sq=t=>or(t,e=>Jf(t.state,e,!Gt(t))),aq=t=>or(t,e=>Jf(t.state,e,Gt(t)));function G4(t,e){return or(t,n=>{if(!n.empty)return Zf(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const Y4=t=>G4(t,!1),X4=t=>G4(t,!0);function Q4(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(le.scrollMargins)){let s=o(t);s?.top&&(n=Math.max(s?.top,n)),s?.bottom&&(r=Math.max(s?.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function Z4(t,e){let n=Q4(t),{state:r}=t,i=Ys(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Zf(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),c=a.top+n.marginTop,f=a.bottom-n.marginBottom;s&&s.top>c&&s.bottom<f&&(o=le.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-c}))}return t.dispatch(Or(r,i),{effects:o}),!0}const rx=t=>Z4(t,!1),Z1=t=>Z4(t,!0);function Wi(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=J.cursor(r.from+o))}return i}const lq=t=>or(t,e=>Wi(t,e,!0)),cq=t=>or(t,e=>Wi(t,e,!1)),uq=t=>or(t,e=>Wi(t,e,!Gt(t))),fq=t=>or(t,e=>Wi(t,e,Gt(t))),hq=t=>or(t,e=>J.cursor(t.lineBlockAt(e.head).from,1)),dq=t=>or(t,e=>J.cursor(t.lineBlockAt(e.head).to,-1));function gq(t,e,n){let r=!1,i=Ys(t.selection,o=>{let s=wr(t,o.head,-1)||wr(t,o.head,1)||o.head>0&&wr(t,o.head-1,1)||o.head<t.doc.length&&wr(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return J.cursor(a)});return r?(e(Or(t,i)),!0):!1}const pq=({state:t,dispatch:e})=>gq(t,e);function Pn(t,e){let n=Ys(t.state.selection,r=>{let i=e(r);return J.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Or(t.state,n)),!0)}function J4(t,e){return Pn(t,n=>t.moveByChar(n,e))}const eC=t=>J4(t,!Gt(t)),tC=t=>J4(t,Gt(t));function nC(t,e){return Pn(t,n=>t.moveByGroup(n,e))}const mq=t=>nC(t,!Gt(t)),bq=t=>nC(t,Gt(t)),wq=t=>Pn(t,e=>Jf(t.state,e,!Gt(t))),xq=t=>Pn(t,e=>Jf(t.state,e,Gt(t)));function rC(t,e){return Pn(t,n=>t.moveVertically(n,e))}const iC=t=>rC(t,!1),oC=t=>rC(t,!0);function sC(t,e){return Pn(t,n=>t.moveVertically(n,e,Q4(t).height))}const ix=t=>sC(t,!1),ox=t=>sC(t,!0),vq=t=>Pn(t,e=>Wi(t,e,!0)),yq=t=>Pn(t,e=>Wi(t,e,!1)),Cq=t=>Pn(t,e=>Wi(t,e,!Gt(t))),$q=t=>Pn(t,e=>Wi(t,e,Gt(t))),Sq=t=>Pn(t,e=>J.cursor(t.lineBlockAt(e.head).from)),Aq=t=>Pn(t,e=>J.cursor(t.lineBlockAt(e.head).to)),sx=({state:t,dispatch:e})=>(e(Or(t,{anchor:0})),!0),ax=({state:t,dispatch:e})=>(e(Or(t,{anchor:t.doc.length})),!0),lx=({state:t,dispatch:e})=>(e(Or(t,{anchor:t.selection.main.anchor,head:0})),!0),cx=({state:t,dispatch:e})=>(e(Or(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Rq=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),kq=({state:t,dispatch:e})=>{let n=eh(t).map(({from:r,to:i})=>J.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:J.create(n),userEvent:"select"})),!0},Tq=({state:t,dispatch:e})=>{let n=Ys(t.selection,r=>{let i=Kt(t),o=i.resolveStack(r.from,1);if(r.empty){let s=i.resolveStack(r.from,-1);s.node.from>=o.node.from&&s.node.to<=o.node.to&&(o=s)}for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&s.next)return J.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Or(t,n)),!0)},Eq=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=J.create([n.main]):n.main.empty||(r=J.create([J.cursor(n.main.head)])),r?(e(Or(t,r)),!0):!1};function El(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let c=e(o);c<s?(n="delete.backward",c=nu(t,c,!1)):c>s&&(n="delete.forward",c=nu(t,c,!0)),s=Math.min(s,c),a=Math.max(a,c)}else s=nu(t,s,!1),a=nu(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:J.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?le.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function nu(t,e,n){if(t instanceof le)for(let r of t.state.facet(le.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const aC=(t,e,n)=>El(t,r=>{let i=r.from,{state:o}=t,s=o.doc.lineAt(i),a,c;if(n&&!e&&i>s.from&&i<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,i-s.from))){if(a[a.length-1]==" ")return i-1;let f=Gs(a,o.tabSize),h=f%Ju(o)||Ju(o);for(let d=0;d<h&&a[a.length-1-d]==" ";d++)i--;c=i}else c=Ht(s.text,i-s.from,e,e)+s.from,c==i&&s.number!=(e?o.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(s.text.slice(c-s.from,i-s.from))&&(c=Ht(s.text,c-s.from,!1,!1)+s.from);return c}),J1=t=>aC(t,!1,!0),lC=t=>aC(t,!0,!1),cC=(t,e)=>El(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let c=Ht(o.text,r-o.from,e)+o.from,f=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),h=s(f);if(a!=null&&h!=a)break;(f!=" "||r!=n.head)&&(a=h),r=c}return r}),uC=t=>cC(t,!1),Mq=t=>cC(t,!0),Oq=t=>El(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Dq=t=>El(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Iq=t=>El(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),_q=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ge.of(["",""])},range:J.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Lq=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:Ht(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:Ht(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:J.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function eh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function fC(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of eh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let c of o.ranges)i.push(J.range(Math.min(t.doc.length,c.anchor+a),Math.min(t.doc.length,c.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let c of o.ranges)i.push(J.range(c.anchor-a,c.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:J.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Bq=({state:t,dispatch:e})=>fC(t,e,!1),Nq=({state:t,dispatch:e})=>fC(t,e,!0);function hC(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of eh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jq=({state:t,dispatch:e})=>hC(t,e,!1),Fq=({state:t,dispatch:e})=>hC(t,e,!0),Vq=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(eh(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=Ys(e.selection,i=>{let o;if(t.lineWrapping){let s=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(o=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Hq(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Kt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(je.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const ux=dC(!1),Pq=dC(!0);function dC(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),c=!t&&o==s&&Hq(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let f=new Yf(e,{simulateBreak:o,simulateDoubleBreak:!!c}),h=Wp(f,o);for(h==null&&(h=Gs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;c?{from:o,to:s}=c:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let d=["",tl(e,h)];return c&&d.push(tl(e,f.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:Ge.of(d)},range:J.cursor(o+1+d[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Kp(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:J.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const Wq=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Yf(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=Kp(t,(o,s,a)=>{let c=Wp(r,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let f=/^\s*/.exec(o.text)[0],h=tl(t,c);(f!=h||a.from<o.from+f.length)&&(n[o.from]=c,s.push({from:o.from,to:o.from+f.length,insert:h}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},gC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Kp(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Gf)})}),{userEvent:"input.indent"})),!0),pC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Kp(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Gs(i,t.tabSize),s=0,a=tl(t,Math.max(0,o-Ju(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),zq=t=>(t.setTabFocusMode(),!0),Uq=[{key:"Ctrl-b",run:U4,shift:eC,preventDefault:!0},{key:"Ctrl-f",run:q4,shift:tC},{key:"Ctrl-p",run:Y4,shift:iC},{key:"Ctrl-n",run:X4,shift:oC},{key:"Ctrl-a",run:hq,shift:Sq},{key:"Ctrl-e",run:dq,shift:Aq},{key:"Ctrl-d",run:lC},{key:"Ctrl-h",run:J1},{key:"Ctrl-k",run:Oq},{key:"Ctrl-Alt-h",run:uC},{key:"Ctrl-o",run:_q},{key:"Ctrl-t",run:Lq},{key:"Ctrl-v",run:Z1}],qq=[{key:"ArrowLeft",run:U4,shift:eC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:rq,shift:mq,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:uq,shift:Cq,preventDefault:!0},{key:"ArrowRight",run:q4,shift:tC,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:iq,shift:bq,preventDefault:!0},{mac:"Cmd-ArrowRight",run:fq,shift:$q,preventDefault:!0},{key:"ArrowUp",run:Y4,shift:iC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:sx,shift:lx},{mac:"Ctrl-ArrowUp",run:rx,shift:ix},{key:"ArrowDown",run:X4,shift:oC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ax,shift:cx},{mac:"Ctrl-ArrowDown",run:Z1,shift:ox},{key:"PageUp",run:rx,shift:ix},{key:"PageDown",run:Z1,shift:ox},{key:"Home",run:cq,shift:yq,preventDefault:!0},{key:"Mod-Home",run:sx,shift:lx},{key:"End",run:lq,shift:vq,preventDefault:!0},{key:"Mod-End",run:ax,shift:cx},{key:"Enter",run:ux,shift:ux},{key:"Mod-a",run:Rq},{key:"Backspace",run:J1,shift:J1},{key:"Delete",run:lC},{key:"Mod-Backspace",mac:"Alt-Backspace",run:uC},{key:"Mod-Delete",mac:"Alt-Delete",run:Mq},{mac:"Mod-Backspace",run:Dq},{mac:"Mod-Delete",run:Iq}].concat(Uq.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Kq=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:sq,shift:wq},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:aq,shift:xq},{key:"Alt-ArrowUp",run:Bq},{key:"Shift-Alt-ArrowUp",run:jq},{key:"Alt-ArrowDown",run:Nq},{key:"Shift-Alt-ArrowDown",run:Fq},{key:"Escape",run:Eq},{key:"Mod-Enter",run:Pq},{key:"Alt-l",mac:"Ctrl-l",run:kq},{key:"Mod-i",run:Tq,preventDefault:!0},{key:"Mod-[",run:pC},{key:"Mod-]",run:gC},{key:"Mod-Alt-\\",run:Wq},{key:"Shift-Mod-k",run:Vq},{key:"Shift-Mod-\\",run:pq},{key:"Mod-/",run:jU},{key:"Alt-A",run:VU},{key:"Ctrl-m",mac:"Shift-Alt-m",run:zq}].concat(qq),Gq={key:"Tab",run:gC,shift:pC};function rt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)mC(t,arguments[e]);return t}function mC(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)mC(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const fx=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class js{constructor(e,n,r=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?a=>o(fx(a)):fx,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=kp(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=mr(e);let i=this.normalize(n);if(i.length)for(let o=0,s=r;;o++){let a=i.charCodeAt(o),c=this.match(a,s,this.bufferPos+this.bufferStart);if(o==i.length-1){if(c)return this.value=c,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(js.prototype[Symbol.iterator]=function(){return this});const bC={from:-1,to:-1,match:/.*/.exec("")},Gp="gm"+(/x/.unicode==null?"":"u");class wC{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=bC,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new xC(e,n,r,i,o);this.re=new RegExp(n,Gp+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=rf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=rf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const y0=new WeakMap;class ys{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=y0.get(e);if(!i||i.from>=r||i.to<=n){let a=new ys(n,e.sliceString(n,r));return y0.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),y0.set(e,new ys(s,o)),new ys(n,o.slice(n-s,r-s))}}class xC{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=bC,this.matchPos=rf(e,i),this.re=new RegExp(n,Gp+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=ys.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=rf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ys.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(wC.prototype[Symbol.iterator]=xC.prototype[Symbol.iterator]=function(){return this});function Yq(t){try{return new RegExp(t,Gp),!0}catch{return!1}}function rf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function eg(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=rt("input",{class:"cm-textfield",name:"line",value:e}),r=rt("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:of.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},rt("label",t.state.phrase("Go to line"),": ",n)," ",rt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,c,f,h,d]=o,p=h?+h.slice(1):0,b=f?+f:a.number;if(f&&d){let C=b/100;c&&(C=C*(c=="-"?-1:1)+a.number/s.doc.lines),b=Math.round(s.doc.lines*C)}else f&&c&&(b=b*(c=="-"?-1:1)+a.number);let x=s.doc.line(Math.max(1,Math.min(s.doc.lines,b))),v=J.cursor(x.from+Math.max(0,Math.min(p,x.length)));t.dispatch({effects:[of.of(!1),le.scrollIntoView(v.from,{y:"center"})],selection:v}),t.focus()}return{dom:r}}const of=Ee.define(),hx=Bt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(of)&&(t=n.value);return t},provide:t=>el.from(t,e=>e?eg:null)}),Xq=t=>{let e=Ja(t,eg);if(!e){let n=[of.of(!0)];t.state.field(hx,!1)==null&&n.push(Ee.appendConfig.of([hx,Qq])),t.dispatch({effects:n}),e=Ja(t,eg)}return e&&e.dom.querySelector("input").select(),!0},Qq=le.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Zq={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Jq=he.define({combine(t){return Mr(t,Zq,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function eK(t){return[oK,iK]}const tK=ve.mark({class:"cm-selectionMatch"}),nK=ve.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function dx(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=lt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=lt.Word)}function rK(t,e,n,r){return t(e.sliceDoc(n,n+1))==lt.Word&&t(e.sliceDoc(r-1,r))==lt.Word}const iK=bt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Jq),{state:n}=t,r=n.selection;if(r.ranges.length>1)return ve.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return ve.none;let c=n.wordAt(i.head);if(!c)return ve.none;s=n.charCategorizer(i.head),o=n.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<e.minSelectionLength||c>200)return ve.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(dx(s,n,i.from,i.to)&&rK(s,n,i.from,i.to)))return ve.none}else if(o=n.sliceDoc(i.from,i.to),!o)return ve.none}let a=[];for(let c of t.visibleRanges){let f=new js(n.doc,o,c.from,c.to);for(;!f.next().done;){let{from:h,to:d}=f.value;if((!s||dx(s,n,h,d))&&(i.empty&&h<=i.from&&d>=i.to?a.push(nK.range(h,d)):(h>=i.to||d<=i.from)&&a.push(tK.range(h,d)),a.length>e.maxMatches))return ve.none}}return ve.set(a)}},{decorations:t=>t.decorations}),oK=le.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),sK=({state:t,dispatch:e})=>{let{selection:n}=t,r=J.create(n.ranges.map(i=>t.wordAt(i.head)||J.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function aK(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new js(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new js(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(c=>c.from==a.value.from))continue;if(o){let c=t.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const lK=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return sK({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=aK(t,r);return i?(e(t.update({selection:t.selection.addRange(J.range(i.from,i.to),!1),effects:le.scrollIntoView(i.to)})),!0):!1},Xs=he.define({combine(t){return Mr(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new vK(e),scrollToMatch:e=>le.scrollIntoView(e)})}});class vC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Yq(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
|
|
58
|
+
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new hK(this):new uK(this)}getCursor(e,n=0,r){let i=e.doc?e:qe.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?as(this,i,n,r):ss(this,i,n,r)}}class yC{constructor(e){this.spec=e}}function ss(t,e,n,r){return new js(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?cK(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function cK(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(sf(i,n-o))!=lt.Word||e(af(i,n-o))!=lt.Word)&&(e(af(i,r-o))!=lt.Word||e(sf(i,r-o))!=lt.Word))}class uK extends yC{constructor(e){super(e)}nextMatch(e,n,r){let i=ss(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=ss(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=ss(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=ss(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=ss(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function as(t,e,n,r){return new wC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?fK(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function sf(t,e){return t.slice(Ht(t,e,!1),e)}function af(t,e){return t.slice(e,Ht(t,e))}function fK(t){return(e,n,r)=>!r[0].length||(t(sf(r.input,r.index))!=lt.Word||t(af(r.input,r.index))!=lt.Word)&&(t(af(r.input,r.index+r[0].length))!=lt.Word||t(sf(r.input,r.index+r[0].length))!=lt.Word)}class hK extends yC{nextMatch(e,n,r){let i=as(this.spec,e,r,e.doc.length).next();return i.done&&(i=as(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=as(this.spec,e,o,r),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n)}matchAll(e,n){let r=as(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=as(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const nl=Ee.define(),Yp=Ee.define(),Ti=Bt.define({create(t){return new C0(tg(t).create(),null)},update(t,e){for(let n of e.effects)n.is(nl)?t=new C0(n.value.create(),t.panel):n.is(Yp)&&(t=new C0(t.query,n.value?Xp:null));return t},provide:t=>el.from(t,e=>e.panel)});class C0{constructor(e,n){this.query=e,this.panel=n}}const dK=ve.mark({class:"cm-searchMatch"}),gK=ve.mark({class:"cm-searchMatch cm-searchMatch-selected"}),pK=bt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ti))}update(t){let e=t.state.field(Ti);(e!=t.startState.field(Ti)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ve.none;let{view:n}=this,r=new ii;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:c}=o[i];for(;i<s-1&&c>o[i+1].from-2*250;)c=o[++i].to;t.highlight(n.state,a,c,(f,h)=>{let d=n.state.selection.ranges.some(p=>p.from==f&&p.to==h);r.add(f,h,d?gK:dK)})}return r.finish()}},{decorations:t=>t.decorations});function Ml(t){return e=>{let n=e.state.field(Ti,!1);return n&&n.query.spec.valid?t(e,n):SC(e)}}const lf=Ml((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=J.single(r.from,r.to),o=t.state.facet(Xs);return t.dispatch({selection:i,effects:[Qp(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),$C(t),!0}),cf=Ml((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=J.single(i.from,i.to),s=t.state.facet(Xs);return t.dispatch({selection:o,effects:[Qp(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),$C(t),!0}),mK=Ml((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:J.create(n.map(r=>J.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),bK=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new js(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(J.range(a.value.from,a.value.to))}return e(t.update({selection:J.create(o,s),userEvent:"select.search.matches"})),!0},gx=Ml((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=o,a=[],c,f,h=[];if(s.from==r&&s.to==i&&(f=n.toText(e.getReplacement(s)),a.push({from:s.from,to:s.to,insert:f}),s=e.nextMatch(n,s.from,s.to),h.push(le.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let d=a.length==0||a[0].from>=o.to?0:o.to-o.from-f.length;c=J.single(s.from-d,s.to-d),h.push(Qp(t,s)),h.push(n.facet(Xs).scrollToMatch(c.main,t))}return t.dispatch({changes:a,selection:c,effects:h,userEvent:"input.replace"}),!0}),wK=Ml((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:le.announce.of(r),userEvent:"input.replace.all"}),!0});function Xp(t){return t.state.facet(Xs).createPanel(t)}function tg(t,e){var n,r,i,o,s;let a=t.selection.main,c=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!c)return e;let f=t.facet(Xs);return new vC({search:((n=e?.literal)!==null&&n!==void 0?n:f.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:f.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:f.literal,regexp:(o=e?.regexp)!==null&&o!==void 0?o:f.regexp,wholeWord:(s=e?.wholeWord)!==null&&s!==void 0?s:f.wholeWord})}function CC(t){let e=Ja(t,Xp);return e&&e.dom.querySelector("[main-field]")}function $C(t){let e=CC(t);e&&e==t.root.activeElement&&e.select()}const SC=t=>{let e=t.state.field(Ti,!1);if(e&&e.panel){let n=CC(t);if(n&&n!=t.root.activeElement){let r=tg(t.state,e.query.spec);r.valid&&t.dispatch({effects:nl.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Yp.of(!0),e?nl.of(tg(t.state,e.query.spec)):Ee.appendConfig.of(CK)]});return!0},AC=t=>{let e=t.state.field(Ti,!1);if(!e||!e.panel)return!1;let n=Ja(t,Xp);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Yp.of(!1)}),!0},xK=[{key:"Mod-f",run:SC,scope:"editor search-panel"},{key:"F3",run:lf,shift:cf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:lf,shift:cf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:AC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:bK},{key:"Mod-Alt-g",run:Xq},{key:"Mod-d",run:lK,preventDefault:!0}];class vK{constructor(e){this.view=e;let n=this.query=e.state.field(Ti).query.spec;this.commit=this.commit.bind(this),this.searchField=rt("input",{value:n.search,placeholder:$n(e,"Find"),"aria-label":$n(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=rt("input",{value:n.replace,placeholder:$n(e,"Replace"),"aria-label":$n(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=rt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=rt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=rt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return rt("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=rt("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>lf(e),[$n(e,"next")]),r("prev",()=>cf(e),[$n(e,"previous")]),r("select",()=>mK(e),[$n(e,"all")]),rt("label",null,[this.caseField,$n(e,"match case")]),rt("label",null,[this.reField,$n(e,"regexp")]),rt("label",null,[this.wordField,$n(e,"by word")]),...e.state.readOnly?[]:[rt("br"),this.replaceField,r("replace",()=>gx(e),[$n(e,"replace")]),r("replaceAll",()=>wK(e),[$n(e,"replace all")])],rt("button",{name:"close",onclick:()=>AC(e),"aria-label":$n(e,"close"),type:"button"},["×"])])}commit(){let e=new vC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:nl.of(e)}))}keydown(e){jW(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?cf:lf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),gx(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(nl)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Xs).top}}function $n(t,e){return t.state.phrase(e)}const ru=30,iu=/[\s\.,:;?!]/;function Qp(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-ru),s=Math.min(i,n+ru),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let c=0;c<ru;c++)if(!iu.test(a[c+1])&&iu.test(a[c])){a=a.slice(c);break}}if(s!=i){for(let c=a.length-1;c>a.length-ru;c--)if(!iu.test(a[c-1])&&iu.test(a[c])){a=a.slice(0,c);break}}return le.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const yK=le.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),CK=[Ti,Lo.low(pK),yK];class RC{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Kt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(kC(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function px(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function $K(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=px(e)+px(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function SK(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:$K(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}let mx=class{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}};function po(t){return t.selection.main.from}function kC(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const TC=Er.define();function AK(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r))return{range:a};let c=t.toText(e);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:c},range:J.cursor(a.from+o+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const bx=new WeakMap;function RK(t){if(!Array.isArray(t))return t;let e=bx.get(t);return e||bx.set(t,e=SK(t)),e}const uf=Ee.define(),rl=Ee.define();class kK{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ln(e,n),i=mr(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(ln(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let A=ln(e,0),T=mr(A),M=T==e.length?0:-100;if(A!=n[0])if(A==r[0])M+=-200;else return null;return this.ret(M,[0,T])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=n.length,f=0;if(a<0){for(let A=0,T=Math.min(e.length,200);A<T&&f<c;){let M=ln(e,A);(M==n[f]||M==r[f])&&(i[f++]=A),A+=mr(M)}if(f<c)return null}let h=0,d=0,p=!1,b=0,x=-1,v=-1,C=/[a-z]/.test(e),$=!0;for(let A=0,T=Math.min(e.length,200),M=0;A<T&&d<c;){let O=ln(e,A);a<0&&(h<c&&O==n[h]&&(o[h++]=A),b<c&&(O==n[b]||O==r[b]?(b==0&&(x=A),v=A+1,b++):b=0));let I,_=O<255?O>=48&&O<=57||O>=97&&O<=122?2:O>=65&&O<=90?1:0:(I=kp(O))!=I.toLowerCase()?1:I!=I.toUpperCase()?2:0;(!A||_==1&&C||M==0&&_!=0)&&(n[d]==O||r[d]==O&&(p=!0)?s[d++]=A:s.length&&($=!1)),M=_,A+=mr(O)}return d==c&&s[0]==0&&$?this.result(-100+(p?-200:0),s,e):b==c&&x==0?this.ret(-200-e.length+(v==e.length?0:-100),[0,v]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):b==c?this.ret(-900-e.length,[x,v]):d==c?this.result(-100+(p?-200:0)+-700+($?0:-1100),s,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?mr(ln(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}class TK{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const It=he.define({combine(t){return Mr(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:EK,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>wx(e(r),n(r)),optionClass:(e,n)=>r=>wx(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function wx(t,e){return t?e?t+" "+e:t:e}function EK(t,e,n,r,i,o){let s=t.textDirection==st.RTL,a=s,c=!1,f="top",h,d,p=e.left-i.left,b=i.right-e.right,x=r.right-r.left,v=r.bottom-r.top;if(a&&p<Math.min(x,b)?a=!1:!a&&b<Math.min(x,p)&&(a=!0),x<=(a?p:b))h=Math.max(i.top,Math.min(n.top,i.bottom-v))-e.top,d=Math.min(400,a?p:b);else{c=!0,d=Math.min(400,(s?e.right:i.right-e.left)-30);let A=i.bottom-e.bottom;A>=v||A>e.top?h=n.bottom-e.top:(f="bottom",h=e.bottom-n.top)}let C=(e.bottom-e.top)/o.offsetHeight,$=(e.right-e.left)/o.offsetWidth;return{style:`${f}: ${h/C}px; max-width: ${d/$}px`,class:"cm-completionInfo-"+(c?s?"left-narrow":"right-narrow":a?"left":"right")}}function MK(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,c=0;for(let f=0;f<o.length;){let h=o[f++],d=o[f++];h>c&&s.appendChild(document.createTextNode(a.slice(c,h)));let p=s.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(a.slice(h,d))),p.className="cm-completionMatchedText",c=d}return c<a.length&&s.appendChild(document.createTextNode(a.slice(c))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function $0(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class OK{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(It);this.optionContent=MK(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=$0(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:f}=e.state.field(n).open;for(let h=c.target,d;h&&h!=this.dom;h=h.parentNode)if(h.nodeName=="LI"&&(d=/-(\d+)$/.exec(h.id))&&+d[1]<f.length){this.applyCompletion(e,f[+d[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let f=e.state.field(this.stateField,!1);f&&f.tooltip&&e.state.facet(It).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:rl.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=$0(o.length,s,e.state.facet(It).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=$0(n.options.length,n.selected,this.view.state.facet(It).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>fn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&IK(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(It).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:c}=e[s],{section:f}=a;if(f){let p=typeof f=="string"?f:f.name;if(p!=o&&(s>r.from||r.from==0))if(o=p,typeof f!="string"&&f.header)i.appendChild(f.header(f));else{let b=i.appendChild(document.createElement("completion-section"));b.textContent=p}}const h=i.appendChild(document.createElement("li"));h.id=n+"-"+s,h.setAttribute("role","option");let d=this.optionClass(a);d&&(h.className=d);for(let p of this.optionContent){let b=p(a,this.view.state,this.view,c);b&&h.appendChild(b)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function DK(t,e){return n=>new OK(n,t,e)}function IK(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function xx(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function _K(t,e){let n=[],r=null,i=f=>{n.push(f);let{section:h}=f.completion;if(h){r||(r=[]);let d=typeof h=="string"?h:h.name;r.some(p=>p.name==d)||r.push(typeof h=="string"?{name:d}:h)}},o=e.facet(It);for(let f of t)if(f.hasResult()){let h=f.result.getMatch;if(f.result.filter===!1)for(let d of f.result.options)i(new mx(d,f.source,h?h(d):[],1e9-n.length));else{let d=e.sliceDoc(f.from,f.to),p,b=o.filterStrict?new TK(d):new kK(d);for(let x of f.result.options)if(p=b.match(x.label)){let v=x.displayLabel?h?h(x,p.matched):[]:p.matched;i(new mx(x,f.source,v,p.score+(x.boost||0)))}}}if(r){let f=Object.create(null),h=0,d=(p,b)=>{var x,v;return((x=p.rank)!==null&&x!==void 0?x:1e9)-((v=b.rank)!==null&&v!==void 0?v:1e9)||(p.name<b.name?-1:1)};for(let p of r.sort(d))h-=1e5,f[p.name]=h;for(let p of n){let{section:b}=p.completion;b&&(p.score+=f[typeof b=="string"?b:b.name])}}let s=[],a=null,c=o.compareCompletions;for(let f of n.sort((h,d)=>d.score-h.score||c(h.completion,d.completion))){let h=f.completion;!a||a.label!=h.label||a.detail!=h.detail||a.type!=null&&h.type!=null&&a.type!=h.type||a.apply!=h.apply||a.boost!=h.boost?s.push(f):xx(f.completion)>xx(a)&&(s[s.length-1]=f),a=f.completion}return s}class us{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new us(this.options,vx(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,s){if(i&&!s&&e.some(f=>f.isPending))return i.setDisabled();let a=_K(e,n);if(!a.length)return i&&e.some(f=>f.isPending)?i.setDisabled():null;let c=n.facet(It).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let f=i.options[i.selected].completion;for(let h=0;h<a.length;h++)if(a[h].completion==f){c=h;break}}return new us(a,vx(r,c),{pos:e.reduce((f,h)=>h.hasResult()?Math.min(f,h.from):f,1e8),create:VK,above:o.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(e){return new us(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new us(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class ff{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new ff(jK,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(It),o=(r.override||n.languageDataAt("autocomplete",po(n)).map(RK)).map(c=>(this.active.find(h=>h.source==c)||new jn(c,this.active.some(h=>h.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((c,f)=>c==this.active[f])&&(o=this.active);let s=this.open,a=e.effects.some(c=>c.is(Zp));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!LK(o,this.active)||a?s=us.build(o,n,this.id,s,r,a):s&&s.disabled&&!o.some(c=>c.isPending)&&(s=null),!s&&o.every(c=>!c.isPending)&&o.some(c=>c.hasResult())&&(o=o.map(c=>c.hasResult()?new jn(c.source,0):c));for(let c of e.effects)c.is(MC)&&(s=s&&s.setSelected(c.value,this.id));return o==this.active&&s==this.open?this:new ff(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?BK:NK}}function LK(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const BK={"aria-autocomplete":"list"},NK={};function vx(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const jK=[];function EC(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(TC);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class jn{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=EC(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new jn(i.source,0)),r&4&&i.state==0&&(i=new jn(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(uf))i=new jn(i.source,1,o.value);else if(o.is(rl))i=new jn(i.source,0);else if(o.is(Zp))for(let s of o.value)s.source==i.source&&(i=s);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(po(e.state))}}class Cs extends jn{constructor(e,n,r,i,o,s){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=s}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=po(e.state);if(a>s||!i||n&2&&(po(e.startState)==this.from||a<this.limit))return new jn(this.source,n&4?1:0);let c=e.changes.mapPos(this.limit);return FK(i.validFor,e.state,o,s)?new Cs(this.source,this.explicit,c,i,o,s):i.update&&(i=i.update(i,o,s,new RC(e.state,a,!1)))?new Cs(this.source,this.explicit,c,i,i.from,(r=i.to)!==null&&r!==void 0?r:po(e.state)):new jn(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Cs(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new jn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function FK(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):kC(t,!0).test(i)}const Zp=Ee.define({map(t,e){return t.map(n=>n.map(e))}}),MC=Ee.define(),un=Bt.define({create(){return ff.start()},update(t,e){return t.update(e)},provide:t=>[Pp.from(t,e=>e.tooltip),le.contentAttributes.from(t,e=>e.attrs)]});function Jp(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(un).active.find(i=>i.source==e.source);return r instanceof Cs?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},AK(t.state,n,r.from,r.to)),{annotations:TC.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const VK=DK(un,Jp);function ou(t,e="option"){return n=>{let r=n.state.field(un,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(It).interactionDelay)return!1;let i=1,o;e=="page"&&(o=w4(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:MC.of(a)}),!0}}const HK=t=>{let e=t.state.field(un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(It).interactionDelay?!1:Jp(t,e.open.options[e.open.selected])},yx=t=>t.state.field(un,!1)?(t.dispatch({effects:uf.of(!0)}),!0):!1,PK=t=>{let e=t.state.field(un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:rl.of(null)}),!0)};class WK{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const zK=50,UK=1e3,qK=bt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(un).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(un),n=t.state.facet(It);if(!t.selectionSet&&!t.docChanged&&t.startState.field(un)==e)return;let r=t.transactions.some(o=>{let s=EC(o,n);return s&8||(o.selection||o.docChanged)&&!(s&3)});for(let o=0;o<this.running.length;o++){let s=this.running[o];if(r||s.context.abortOnDocChange&&t.docChanged||s.updates.length+t.transactions.length>zK&&Date.now()-s.time>UK){for(let a of s.context.abortListeners)try{a()}catch(c){fn(this.view.state,c)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(uf)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(un);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(It).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=po(e),r=new RC(e,n,t.explicit,this.view),i=new WK(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:rl.of(null)}),fn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(It).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(It),r=this.view.state.field(un);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let a=po(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(a,o.done.from+(o.active.explicit?0:1)),f=new Cs(o.active.source,o.active.explicit,c,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:a);for(let h of o.updates)f=f.update(h,n);if(f.hasResult()){e.push(f);continue}}let s=r.active.find(a=>a.source==o.active.source);if(s&&s.isPending)if(o.done==null){let a=new jn(o.active.source,0);for(let c of o.updates)a=a.update(c,n);a.isPending||e.push(a)}else this.startQuery(s)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Zp.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(un,!1);if(e&&e.tooltip&&this.view.state.facet(It).closeOnBlur){let n=e.open&&w4(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:rl.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uf.of(!1)}),20),this.composing=0}}}),KK=typeof navigator=="object"&&/Win/.test(navigator.platform),GK=Lo.highest(le.domEventHandlers({keydown(t,e){let n=e.state.field(un,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(KK&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(s=>s.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&Jp(e,r),!1}})),YK=le.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),il={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},co=Ee.define({map(t,e){let n=e.mapPos(t,-1,Jt.TrackAfter);return n??void 0}}),em=new class extends Co{};em.startSide=1;em.endSide=-1;const OC=Bt.define({create(){return Ke.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(co)&&(t=t.update({add:[em.range(n.value,n.value+1)]}));return t}});function XK(){return[ZK,OC]}const S0="()[]{}<>";function DC(t){for(let e=0;e<S0.length;e+=2)if(S0.charCodeAt(e)==t)return S0.charAt(e+1);return kp(t<128?t:t+1)}function IC(t,e){return t.languageDataAt("closeBrackets",e)[0]||il}const QK=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),ZK=le.inputHandler.of((t,e,n,r)=>{if((QK?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&mr(ln(r,0))==1||e!=i.from||n!=i.to)return!1;let o=tG(t.state,r);return o?(t.dispatch(o),!0):!1}),JK=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=IC(t,t.selection.main.head).brackets||il.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=nG(t.doc,s.head);for(let c of r)if(c==a&&th(t.doc,s.head)==DC(ln(c,0)))return{changes:{from:s.head-c.length,to:s.head+c.length},range:J.cursor(s.head-c.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},eG=[{key:"Backspace",run:JK}];function tG(t,e){let n=IC(t,t.selection.main.head),r=n.brackets||il.brackets;for(let i of r){let o=DC(ln(i,0));if(e==i)return o==i?oG(t,i,r.indexOf(i+i+i)>-1,n):rG(t,i,o,n.before||il.before);if(e==o&&_C(t,t.selection.main.from))return iG(t,i,o)}return null}function _C(t,e){let n=!1;return t.field(OC).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function th(t,e){let n=t.sliceString(e,e+2);return n.slice(0,mr(ln(n,0)))}function nG(t,e){let n=t.sliceString(e-2,e);return mr(ln(n,0))==n.length?n:n.slice(1)}function rG(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:co.of(s.to+e.length),range:J.range(s.anchor+e.length,s.head+e.length)};let a=th(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:co.of(s.head+e.length),range:J.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function iG(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&th(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:J.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function oG(t,e,n,r){let i=r.stringPrefixes||il.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:co.of(a.to+e.length),range:J.range(a.anchor+e.length,a.head+e.length)};let c=a.head,f=th(t.doc,c),h;if(f==e){if(Cx(t,c))return{changes:{insert:e+e,from:c},effects:co.of(c+e.length),range:J.cursor(c+e.length)};if(_C(t,c)){let p=n&&t.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+p.length,insert:p},range:J.cursor(c+p.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(h=$x(t,c-2*e.length,i))>-1&&Cx(t,h))return{changes:{insert:e+e+e+e,from:c},effects:co.of(c+e.length),range:J.cursor(c+e.length)};if(t.charCategorizer(c)(f)!=lt.Word&&$x(t,c,i)>-1&&!sG(t,c,e,i))return{changes:{insert:e+e,from:c},effects:co.of(c+e.length),range:J.cursor(c+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Cx(t,e){let n=Kt(t).resolveInner(e+1);return n.parent&&n.from==e}function sG(t,e,n,r){let i=Kt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=a.indexOf(n);if(!c||c>-1&&r.indexOf(a.slice(0,c))>-1){let h=i.firstChild;for(;h&&h.from==i.from&&h.to-h.from>n.length+c;){if(t.sliceDoc(h.to-n.length,h.to)==n)return!1;h=h.firstChild}return!0}let f=i.to==e&&i.parent;if(!f)break;i=f}return!1}function $x(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=lt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=lt.Word)return o}return-1}function aG(t={}){return[GK,un,It.of(t),qK,lG,YK]}const LC=[{key:"Ctrl-Space",run:yx},{mac:"Alt-`",run:yx},{key:"Escape",run:PK},{key:"ArrowDown",run:ou(!0)},{key:"ArrowUp",run:ou(!1)},{key:"PageDown",run:ou(!0,"page")},{key:"PageUp",run:ou(!1,"page")},{key:"Enter",run:HK}],lG=Lo.highest(qf.computeN([It],t=>t.facet(It).defaultKeymap?[LC]:[]));class Sx{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class so{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(ol).markerFilter;o&&(i=o(i,r));let s=e.slice().sort((d,p)=>d.from-p.from||d.to-p.to),a=new ii,c=[],f=0;for(let d=0;;){let p=d==s.length?null:s[d];if(!p&&!c.length)break;let b,x;for(c.length?(b=f,x=c.reduce((C,$)=>Math.min(C,$.to),p&&p.from>b?p.from:1e8)):(b=p.from,x=p.to,c.push(p),d++);d<s.length;){let C=s[d];if(C.from==b&&(C.to>C.from||C.to==b))c.push(C),d++,x=Math.min(C.to,x);else{x=Math.min(C.from,x);break}}let v=yG(c);if(c.some(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from))a.add(b,b,ve.widget({widget:new bG(v),diagnostics:c.slice()}));else{let C=c.reduce(($,A)=>A.markClass?$+" "+A.markClass:$,"");a.add(b,x,ve.mark({class:"cm-lintRange cm-lintRange-"+v+C,diagnostics:c.slice(),inclusiveEnd:c.some($=>$.to>x)}))}f=x;for(let C=0;C<c.length;C++)c[C].to<=f&&c.splice(C--,1)}let h=a.finish();return new so(h,n,Fs(h))}}function Fs(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostics.indexOf(e)<0))if(!r)r=new Sx(i,o,e||s.diagnostics[0]);else{if(s.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new Sx(r.from,o,r.diagnostic)}}),r}function cG(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(ol).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(BC))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function uG(t,e){return t.field(Rn,!1)?e:e.concat(Ee.appendConfig.of(CG))}const BC=Ee.define(),tm=Ee.define(),NC=Ee.define(),Rn=Bt.define({create(){return new so(ve.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Fs(n,t.selected.diagnostic,o)||Fs(n,null,o)}!n.size&&i&&e.state.facet(ol).autoPanel&&(i=null),t=new so(n,i,r)}for(let n of e.effects)if(n.is(BC)){let r=e.state.facet(ol).autoPanel?n.value.length?sl.open:null:t.panel;t=so.init(n.value,r,e.state)}else n.is(tm)?t=new so(t.diagnostics,n.value?sl.open:null,t.selected):n.is(NC)&&(t=new so(t.diagnostics,t.panel,n.value));return t},provide:t=>[el.from(t,e=>e.panel),le.decorations.from(t,e=>e.diagnostics)]}),fG=ve.mark({class:"cm-lintRange cm-lintRange-active"});function hG(t,e,n){let{diagnostics:r}=t.state.field(Rn),i,o=-1,s=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(c,f,{spec:h})=>{if(e>=c&&e<=f&&(c==f||(e>c||n>0)&&(e<f||n<0)))return i=h.diagnostics,o=c,s=f,!1});let a=t.state.facet(ol).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:dG(t,i)}}}:null}function dG(t,e){return rt("ul",{class:"cm-tooltip-lint"},e.map(n=>FC(t,n,!1)))}const gG=t=>{let e=t.state.field(Rn,!1);(!e||!e.panel)&&t.dispatch({effects:uG(t.state,[tm.of(!0)])});let n=Ja(t,sl.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Ax=t=>{let e=t.state.field(Rn,!1);return!e||!e.panel?!1:(t.dispatch({effects:tm.of(!1)}),!0)},pG=t=>{let e=t.state.field(Rn,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},mG=[{key:"Mod-Shift-m",run:gG,preventDefault:!0},{key:"F8",run:pG}],ol=he.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Mr(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function jC(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function FC(t,e,n){var r;let i=n?jC(e.actions):[];return rt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},rt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,c=p=>{if(p.preventDefault(),a)return;a=!0;let b=Fs(t.state.field(Rn).diagnostics,e);b&&o.apply(t,b.from,b.to)},{name:f}=o,h=i[s]?f.indexOf(i[s]):-1,d=h<0?f:[f.slice(0,h),rt("u",f.slice(h,h+1)),f.slice(h+1)];return rt("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${f}${h<0?"":` (access key "${i[s]})"`}.`},d)}),e.source&&rt("div",{class:"cm-diagnosticSource"},e.source))}class bG extends ci{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return rt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Rx{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=FC(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class sl{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)Ax(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=jC(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let c=Fs(this.view.state.field(Rn).diagnostics,o);c&&o.actions[a].apply(e,c.from,c.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=rt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=rt("div",{class:"cm-panel-lint"},this.list,rt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Ax(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Rn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Rn),r=0,i=!1,o=null,s=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:f})=>{for(let h of f.diagnostics){if(s.has(h))continue;s.add(h);let d=-1,p;for(let b=r;b<this.items.length;b++)if(this.items[b].diagnostic==h){d=b;break}d<0?(p=new Rx(this.view,h),this.items.splice(r,0,p),i=!0):(p=this.items[d],d>r&&(this.items.splice(r,d-r),i=!0)),n&&p.diagnostic==n.diagnostic?p.dom.hasAttribute("aria-selected")||(p.dom.setAttribute("aria-selected","true"),o=p):p.dom.hasAttribute("aria-selected")&&p.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new Rx(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let f=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/f:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/f)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Rn),r=Fs(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:NC.of(r)})}static open(e){return new sl(e)}}function wG(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function su(t){return wG(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const xG=le.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:su("#d11")},".cm-lintRange-warning":{backgroundImage:su("orange")},".cm-lintRange-info":{backgroundImage:su("#999")},".cm-lintRange-hint":{backgroundImage:su("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function vG(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function yG(t){let e="hint",n=1;for(let r of t){let i=vG(r.severity);i>n&&(n=i,e=r.severity)}return e}const CG=[Rn,le.decorations.compute([Rn],t=>{let{selected:e,panel:n}=t.field(Rn);return!e||!n||e.from==e.to?ve.none:ve.set([fG.range(e.from,e.to)])}),Rz(hG,{hideOn:cG}),xG];var kx=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(eG)),e.defaultKeymap!==!1&&(r=r.concat(Kq)),e.searchKeymap!==!1&&(r=r.concat(xK)),e.historyKeymap!==!1&&(r=r.concat(nq)),e.foldKeymap!==!1&&(r=r.concat(fU)),e.completionKeymap!==!1&&(r=r.concat(LC)),e.lintKeymap!==!1&&(r=r.concat(mG));var i=[];return e.lineNumbers!==!1&&i.push(Nz()),e.highlightActiveLineGutter!==!1&&i.push(Vz()),e.highlightSpecialChars!==!1&&i.push(tz()),e.history!==!1&&i.push(KU()),e.foldGutter!==!1&&i.push(pU()),e.drawSelection!==!1&&i.push(zW()),e.dropCursor!==!1&&i.push(YW()),e.allowMultipleSelections!==!1&&i.push(qe.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(tU()),e.syntaxHighlighting!==!1&&i.push(_4(xU,{fallback:!0})),e.bracketMatching!==!1&&i.push(RU()),e.closeBrackets!==!1&&i.push(XK()),e.autocompletion!==!1&&i.push(aG()),e.rectangularSelection!==!1&&i.push(pz()),n!==!1&&i.push(wz()),e.highlightActiveLine!==!1&&i.push(az()),e.highlightSelectionMatches!==!1&&i.push(eK()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Gf.of(" ".repeat(e.tabSize))),i.concat([qf.of(r.flat())]).filter(Boolean)};const $G="#e5c07b",Tx="#e06c75",SG="#56b6c2",AG="#ffffff",Cu="#abb2bf",ng="#7d8799",RG="#61afef",kG="#98c379",Ex="#d19a66",TG="#c678dd",EG="#21252b",Mx="#2c313a",Ox="#282c34",A0="#353a42",MG="#3E4451",Dx="#528bff",OG=le.theme({"&":{color:Cu,backgroundColor:Ox},".cm-content":{caretColor:Dx},".cm-cursor, .cm-dropCursor":{borderLeftColor:Dx},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:MG},".cm-panels":{backgroundColor:EG,color:Cu},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Ox,color:ng,border:"none"},".cm-activeLineGutter":{backgroundColor:Mx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:A0},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A0,borderBottomColor:A0},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Mx,color:Cu}}},{dark:!0}),DG=Tl.define([{tag:U.keyword,color:TG},{tag:[U.name,U.deleted,U.character,U.propertyName,U.macroName],color:Tx},{tag:[U.function(U.variableName),U.labelName],color:RG},{tag:[U.color,U.constant(U.name),U.standard(U.name)],color:Ex},{tag:[U.definition(U.name),U.separator],color:Cu},{tag:[U.typeName,U.className,U.number,U.changed,U.annotation,U.modifier,U.self,U.namespace],color:$G},{tag:[U.operator,U.operatorKeyword,U.url,U.escape,U.regexp,U.link,U.special(U.string)],color:SG},{tag:[U.meta,U.comment],color:ng},{tag:U.strong,fontWeight:"bold"},{tag:U.emphasis,fontStyle:"italic"},{tag:U.strikethrough,textDecoration:"line-through"},{tag:U.link,color:ng,textDecoration:"underline"},{tag:U.heading,fontWeight:"bold",color:Tx},{tag:[U.atom,U.bool,U.special(U.variableName)],color:Ex},{tag:[U.processingInstruction,U.string,U.inserted],color:kG},{tag:U.invalid,color:AG}]),IG=[OG,_4(DG)];var _G=le.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),LG=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,c=[];switch(n&&c.unshift(qf.of([Gq])),a&&(typeof a=="boolean"?c.unshift(kx()):c.unshift(kx(a))),s&&c.unshift(fz(s)),o){case"light":c.push(_G);break;case"dark":c.push(IG);break;case"none":break;default:c.push(o);break}return r===!1&&c.push(le.editable.of(!1)),i&&c.push(qe.readOnly.of(!0)),[...c]},BG=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),Ix=Er.define(),NG=[];function VC(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=NG,autoFocus:c,theme:f="light",height:h=null,minHeight:d=null,maxHeight:p=null,width:b=null,minWidth:x=null,maxWidth:v=null,placeholder:C="",editable:$=!0,readOnly:A=!1,indentWithTab:T=!0,basicSetup:M=!0,root:O,initialState:I}=t,[_,V]=w.useState(),[F,H]=w.useState(),[z,W]=w.useState(),Y=le.theme({"&":{height:h,minHeight:d,maxHeight:p,width:b,minWidth:x,maxWidth:v},"& .cm-scroller":{height:"100% !important"}}),K=le.updateListener.of(ne=>{if(ne.docChanged&&typeof r=="function"&&!ne.transactions.some(ce=>ce.annotation(Ix))){var oe=ne.state.doc,X=oe.toString();r(X,ne)}i&&i(BG(ne))}),te=LG({theme:f,editable:$,readOnly:A,placeholder:C,indentWithTab:T,basicSetup:M}),ie=[K,Y,...te];return s&&typeof s=="function"&&ie.push(le.updateListener.of(s)),ie=ie.concat(a),w.useEffect(()=>{if(_&&!z){var ne={doc:e,selection:n,extensions:ie},oe=I?qe.fromJSON(I.json,ne,I.fields):qe.create(ne);if(W(oe),!F){var X=new le({state:oe,parent:_,root:O});H(X),o&&o(X,oe)}}return()=>{F&&(W(void 0),H(void 0))}},[_,z]),w.useEffect(()=>V(t.container),[t.container]),w.useEffect(()=>()=>{F&&(F.destroy(),H(void 0))},[F]),w.useEffect(()=>{c&&F&&F.focus()},[c,F]),w.useEffect(()=>{F&&F.dispatch({effects:Ee.reconfigure.of(ie)})},[f,a,h,d,p,b,x,v,C,$,A,T,M,r,s]),w.useEffect(()=>{if(e!==void 0){var ne=F?F.state.doc.toString():"";F&&e!==ne&&F.dispatch({changes:{from:0,to:ne.length,insert:e||""},annotations:[Ix.of(!0)]})}},[e,F]),{state:z,setState:W,view:F,setView:H,container:_,setContainer:V}}var jG=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],FG=w.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:c,onUpdate:f,autoFocus:h,theme:d="light",height:p,minHeight:b,maxHeight:x,width:v,minWidth:C,maxWidth:$,basicSetup:A,placeholder:T,indentWithTab:M,editable:O,readOnly:I,root:_,initialState:V}=t,F=NU(t,jG),H=w.useRef(null),{state:z,view:W,container:Y}=VC({container:H.current,root:_,value:r,autoFocus:h,theme:d,height:p,minHeight:b,maxHeight:x,width:v,minWidth:C,maxWidth:$,basicSetup:A,placeholder:T,indentWithTab:M,editable:O,readOnly:I,selection:i,onChange:s,onStatistics:a,onCreateEditor:c,onUpdate:f,extensions:o,initialState:V});if(w.useImperativeHandle(e,()=>({editor:H.current,state:z,view:W}),[H,Y,z,W]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var K=typeof d=="string"?"cm-theme-"+d:"cm-theme";return m.jsx("div",q({ref:H,className:""+K+(n?" "+n:"")},F))});FG.displayName="CodeMirror";function VG(t,e){return w.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const HC="ScrollArea",[PC,qte]=wt(HC),[HG,Dr]=PC(HC),PG=w.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=t,[a,c]=w.useState(null),[f,h]=w.useState(null),[d,p]=w.useState(null),[b,x]=w.useState(null),[v,C]=w.useState(null),[$,A]=w.useState(0),[T,M]=w.useState(0),[O,I]=w.useState(!1),[_,V]=w.useState(!1),F=ye(e,z=>c(z)),H=Do(i);return w.createElement(HG,{scope:n,type:r,dir:H,scrollHideDelay:o,scrollArea:a,viewport:f,onViewportChange:h,content:d,onContentChange:p,scrollbarX:b,onScrollbarXChange:x,scrollbarXEnabled:O,onScrollbarXEnabledChange:I,scrollbarY:v,onScrollbarYChange:C,scrollbarYEnabled:_,onScrollbarYEnabledChange:V,onCornerWidthChange:A,onCornerHeightChange:M},w.createElement(me.div,q({dir:H},s,{ref:F,style:{position:"relative","--radix-scroll-area-corner-width":$+"px","--radix-scroll-area-corner-height":T+"px",...t.style}})))}),WG="ScrollAreaViewport",zG=w.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,...i}=t,o=Dr(WG,n),s=w.useRef(null),a=ye(e,s,o.onViewportChange);return w.createElement(w.Fragment,null,w.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),w.createElement(me.div,q({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style}}),w.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),ui="ScrollAreaScrollbar",UG=w.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Dr(ui,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=t.orientation==="horizontal";return w.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?w.createElement(qG,q({},r,{ref:e,forceMount:n})):i.type==="scroll"?w.createElement(KG,q({},r,{ref:e,forceMount:n})):i.type==="auto"?w.createElement(WC,q({},r,{ref:e,forceMount:n})):i.type==="always"?w.createElement(nm,q({},r,{ref:e})):null}),qG=w.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Dr(ui,t.__scopeScrollArea),[o,s]=w.useState(!1);return w.useEffect(()=>{const a=i.scrollArea;let c=0;if(a){const f=()=>{window.clearTimeout(c),s(!0)},h=()=>{c=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",f),a.addEventListener("pointerleave",h),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",f),a.removeEventListener("pointerleave",h)}}},[i.scrollArea,i.scrollHideDelay]),w.createElement(Tt,{present:n||o},w.createElement(WC,q({"data-state":o?"visible":"hidden"},r,{ref:e})))}),KG=w.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Dr(ui,t.__scopeScrollArea),o=t.orientation==="horizontal",s=rh(()=>c("SCROLL_END"),100),[a,c]=VG("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay,c]),w.useEffect(()=>{const f=i.viewport,h=o?"scrollLeft":"scrollTop";if(f){let d=f[h];const p=()=>{const b=f[h];d!==b&&(c("SCROLL"),s()),d=b};return f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[i.viewport,o,c,s]),w.createElement(Tt,{present:n||a!=="hidden"},w.createElement(nm,q({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:e,onPointerEnter:re(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:re(t.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),WC=w.forwardRef((t,e)=>{const n=Dr(ui,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,s]=w.useState(!1),a=t.orientation==="horizontal",c=rh(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?f:h)}},10);return df(n.viewport,c),df(n.content,c),w.createElement(Tt,{present:r||o},w.createElement(nm,q({"data-state":o?"visible":"hidden"},i,{ref:e})))}),nm=w.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,i=Dr(ui,t.__scopeScrollArea),o=w.useRef(null),s=w.useRef(0),[a,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=qC(a.viewport,a.content),h={...r,sizes:a,onSizesChange:c,hasThumb:f>0&&f<1,onThumbChange:p=>o.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function d(p,b){return JG(p,s.current,a,b)}return n==="horizontal"?w.createElement(GG,q({},h,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollLeft,b=_x(p,a,i.dir);o.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=d(p,i.dir))}})):n==="vertical"?w.createElement(YG,q({},h,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollTop,b=_x(p,a);o.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=d(p))}})):null}),GG=w.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=Dr(ui,t.__scopeScrollArea),[s,a]=w.useState(),c=w.useRef(null),f=ye(e,c,o.onScrollbarXChange);return w.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),w.createElement(UC,q({"data-orientation":"horizontal"},i,{ref:f,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":nh(n)+"px",...t.style},onThumbPointerDown:h=>t.onThumbPointerDown(h.x),onDragScroll:h=>t.onDragScroll(h.x),onWheelScroll:(h,d)=>{if(o.viewport){const p=o.viewport.scrollLeft+h.deltaX;t.onWheelScroll(p),GC(p,d)&&h.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:hf(s.paddingLeft),paddingEnd:hf(s.paddingRight)}})}}))}),YG=w.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=Dr(ui,t.__scopeScrollArea),[s,a]=w.useState(),c=w.useRef(null),f=ye(e,c,o.onScrollbarYChange);return w.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),w.createElement(UC,q({"data-orientation":"vertical"},i,{ref:f,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":nh(n)+"px",...t.style},onThumbPointerDown:h=>t.onThumbPointerDown(h.y),onDragScroll:h=>t.onDragScroll(h.y),onWheelScroll:(h,d)=>{if(o.viewport){const p=o.viewport.scrollTop+h.deltaY;t.onWheelScroll(p),GC(p,d)&&h.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:hf(s.paddingTop),paddingEnd:hf(s.paddingBottom)}})}}))}),[XG,zC]=PC(ui),UC=w.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:f,onWheelScroll:h,onResize:d,...p}=t,b=Dr(ui,n),[x,v]=w.useState(null),C=ye(e,F=>v(F)),$=w.useRef(null),A=w.useRef(""),T=b.viewport,M=r.content-r.viewport,O=Dt(h),I=Dt(c),_=rh(d,10);function V(F){if($.current){const H=F.clientX-$.current.left,z=F.clientY-$.current.top;f({x:H,y:z})}}return w.useEffect(()=>{const F=H=>{const z=H.target;x?.contains(z)&&O(H,M)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[T,x,M,O]),w.useEffect(I,[r,I]),df(x,_),df(b.content,_),w.createElement(XG,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:Dt(o),onThumbPointerUp:Dt(s),onThumbPositionChange:I,onThumbPointerDown:Dt(a)},w.createElement(me.div,q({},p,{ref:C,style:{position:"absolute",...p.style},onPointerDown:re(t.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),$.current=x.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),V(F))}),onPointerMove:re(t.onPointerMove,V),onPointerUp:re(t.onPointerUp,F=>{const H=F.target;H.hasPointerCapture(F.pointerId)&&H.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=A.current,b.viewport&&(b.viewport.style.scrollBehavior=""),$.current=null})})))}),rg="ScrollAreaThumb",QG=w.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=zC(rg,t.__scopeScrollArea);return w.createElement(Tt,{present:n||i.hasThumb},w.createElement(ZG,q({ref:e},r)))}),ZG=w.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,o=Dr(rg,n),s=zC(rg,n),{onThumbPositionChange:a}=s,c=ye(e,d=>s.onThumbChange(d)),f=w.useRef(),h=rh(()=>{f.current&&(f.current(),f.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const p=()=>{if(h(),!f.current){const b=eY(d,a);f.current=b,a()}};return a(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,h,a]),w.createElement(me.div,q({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:re(t.onPointerDownCapture,d=>{const b=d.target.getBoundingClientRect(),x=d.clientX-b.left,v=d.clientY-b.top;s.onThumbPointerDown({x,y:v})}),onPointerUp:re(t.onPointerUp,s.onThumbPointerUp)}))});function hf(t){return t?parseInt(t,10):0}function qC(t,e){const n=t/e;return isNaN(n)?0:n}function nh(t){const e=qC(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function JG(t,e,n,r="ltr"){const i=nh(n),o=i/2,s=e||o,a=i-s,c=n.scrollbar.paddingStart+s,f=n.scrollbar.size-n.scrollbar.paddingEnd-a,h=n.content-n.viewport,d=r==="ltr"?[0,h]:[h*-1,0];return KC([c,f],d)(t)}function _x(t,e,n="ltr"){const r=nh(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,a=o-r,c=n==="ltr"?[0,s]:[s*-1,0],f=U0(t,c);return KC([0,s],[0,a])(f)}function KC(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function GC(t,e){return t>0&&t<e}const eY=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&e(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function rh(t,e){const n=Dt(t),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function df(t,e){const n=Dt(e);ut(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const tY=PG,nY=zG,rY=UG,iY=QG;let R0=new Map,ig=!1;try{ig=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let gf=!1;try{gf=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const YC={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class XC{format(e){let n="";if(!ig&&this.options.signDisplay!=null?n=sY(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!gf){var r;let{unit:i,unitDisplay:o="short",locale:s}=this.resolvedOptions();if(!i)return n;let a=(r=YC[i])===null||r===void 0?void 0:r[o];n+=a[s]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!ig&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!gf&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=oY(e,n),this.options=n}}function oY(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!gf){var r;let{unit:s,unitDisplay:a="short"}=e;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=YC[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let i=t+(e?Object.entries(e).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if(R0.has(i))return R0.get(i);let o=new Intl.NumberFormat(t,e);return R0.set(i,o),o}function sY(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=t.format(-n),o=t.format(n),s=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(s,"+").replace("!!!",o)}else return t.format(n)}}const aY=new RegExp("^.*\\(.*\\).*$"),lY=["latn","arab","hanidec"];class QC{parse(e){return k0(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,r){return k0(this.locale,this.options,e).isValidPartialNumber(e,n,r)}getNumberingSystem(e){return k0(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}}const Lx=new Map;function k0(t,e,n){let r=Bx(t,e);if(!t.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of lY)if(i!==r.options.numberingSystem){let o=Bx(t+(t.includes("-u-")?"-nu-":"-u-nu-")+i,e);if(o.isValidPartialNumber(n))return o}}return r}function Bx(t,e){let n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():""),r=Lx.get(n);return r||(r=new cY(t,e),Lx.set(n,r)),r}class cY{parse(e){let n=this.sanitize(e);if(this.symbols.group&&(n=au(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=n.indexOf("-");n=n.replace("-","");let a=n.indexOf(".");a===-1&&(a=n.length),n=n.replace(".",""),a-2===0?n=`0.${n}`:a-2===-1?n=`0.0${n}`:a-2===-2?n="0.00":n=`${n.slice(0,a-2)}.${n.slice(a-2)}`,s>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var i,o;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)+2,20)};return new QC(this.locale,s).parse(new XC(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&aY.test(e)&&(r=-1*r),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=au(e,".",this.symbols.group))),this.options.locale==="fr-FR"&&(e=au(e,"."," ")),e}isValidPartialNumber(e,n=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=au(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,n={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=fY(e,this.formatter,this.options,n);var r,i;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const Nx=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),uY=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function fY(t,e,n,r){var i,o,s,a;let c=new Intl.NumberFormat(t,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),f=c.formatToParts(-10000.111),h=c.formatToParts(10000.111),d=uY.map(H=>c.formatToParts(H));var p;let b=(p=(i=f.find(H=>H.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&p!==void 0?p:"-",x=(o=h.find(H=>H.type==="plusSign"))===null||o===void 0?void 0:o.value;!x&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(x="+");let C=(s=new Intl.NumberFormat(t,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(H=>H.type==="decimal"))===null||s===void 0?void 0:s.value,$=(a=f.find(H=>H.type==="group"))===null||a===void 0?void 0:a.value,A=f.filter(H=>!Nx.has(H.type)).map(H=>jx(H.value)),T=d.flatMap(H=>H.filter(z=>!Nx.has(z.type)).map(z=>jx(z.value))),M=[...new Set([...A,...T])].sort((H,z)=>z.length-H.length),O=M.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${M.join("|")}|[\\p{White_Space}]`,"gu"),I=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(I.map((H,z)=>[H,z])),V=new RegExp(`[${I.join("")}]`,"g");return{minusSign:b,plusSign:x,decimal:C,group:$,literals:O,numeral:V,index:H=>String(_.get(H))}}function au(t,e,n){return t.replaceAll?t.replaceAll(e,n):t.split(e).join(n)}function jx(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const ZC="Popover",[JC,Kte]=wt(ZC,[ji]),rm=ji(),[hY,Qs]=JC(ZC),dY=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=t,a=rm(e),c=w.useRef(null),[f,h]=w.useState(!1),[d=!1,p]=_t({prop:r,defaultProp:i,onChange:o});return w.createElement(fl,a,w.createElement(hY,{scope:e,contentId:Lt(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(b=>!b),[p]),hasCustomAnchor:f,onCustomAnchorAdd:w.useCallback(()=>h(!0),[]),onCustomAnchorRemove:w.useCallback(()=>h(!1),[]),modal:s},n))},gY="PopoverTrigger",pY=w.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Qs(gY,n),o=rm(n),s=ye(e,i.triggerRef),a=w.createElement(me.button,q({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":n$(i.open)},r,{ref:s,onClick:re(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:w.createElement(hl,q({asChild:!0},o),a)}),e$="PopoverPortal",[mY,bY]=JC(e$,{forceMount:void 0}),wY=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,o=Qs(e$,e);return w.createElement(mY,{scope:e,forceMount:n},w.createElement(Tt,{present:n||o.open},w.createElement(Ws,{asChild:!0,container:i},r)))},al="PopoverContent",xY=w.forwardRef((t,e)=>{const n=bY(al,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,o=Qs(al,t.__scopePopover);return w.createElement(Tt,{present:r||o.open},o.modal?w.createElement(vY,q({},i,{ref:e})):w.createElement(yY,q({},i,{ref:e})))}),vY=w.forwardRef((t,e)=>{const n=Qs(al,t.__scopePopover),r=w.useRef(null),i=ye(e,r),o=w.useRef(!1);return w.useEffect(()=>{const s=r.current;if(s)return ml(s)},[]),w.createElement(Lf,{as:$r,allowPinchZoom:!0},w.createElement(t$,q({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(t.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:re(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,f=a.button===2||c;o.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:re(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),yY=w.forwardRef((t,e)=>{const n=Qs(al,t.__scopePopover),r=w.useRef(!1),i=w.useRef(!1);return w.createElement(t$,q({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=t.onInteractOutside)===null||s===void 0||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),t$=w.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,...d}=t,p=Qs(al,n),b=rm(n);return pl(),w.createElement(zs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},w.createElement(Mo,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1)},w.createElement(dl,q({"data-state":n$(p.open),role:"dialog",id:p.contentId},b,d,{ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function n$(t){return t?"open":"closed"}const CY=dY,$Y=pY,SY=wY,AY=xY,r$="Progress",ih=100,[RY,Gte]=wt(r$),[kY,TY]=RY(r$),i$=w.forwardRef((t,e)=>{const{__scopeProgress:n,value:r,max:i,getValueLabel:o=OY,...s}=t,a=og(i)?i:ih,c=s$(r,a)?r:null,f=pf(c)?o(c,a):void 0;return w.createElement(kY,{scope:n,value:c,max:a},w.createElement(me.div,q({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":pf(c)?c:void 0,"aria-valuetext":f,role:"progressbar","data-state":o$(c,a),"data-value":c??void 0,"data-max":a},s,{ref:e})))});i$.propTypes={max(t,e,n){const r=t[e],i=String(r);return r&&!og(r)?new Error(DY(i,n)):null},value(t,e,n){const r=t[e],i=String(r),o=og(t.max)?t.max:ih;return r!=null&&!s$(r,o)?new Error(IY(i,n)):null}};const EY="ProgressIndicator",MY=w.forwardRef((t,e)=>{var n;const{__scopeProgress:r,...i}=t,o=TY(EY,r);return w.createElement(me.div,q({"data-state":o$(o.value,o.max),"data-value":(n=o.value)!==null&&n!==void 0?n:void 0,"data-max":o.max},i,{ref:e}))});function OY(t,e){return`${Math.round(t/e*100)}%`}function o$(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function pf(t){return typeof t=="number"}function og(t){return pf(t)&&!isNaN(t)&&t>0}function s$(t,e){return pf(t)&&!isNaN(t)&&t<=e&&t>=0}function DY(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ih}\`.`}function IY(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
59
|
+
- a positive number
|
|
60
|
+
- less than the value passed to \`max\` (or ${ih} if no \`max\` prop is set)
|
|
61
|
+
- \`null\` if the progress is indeterminate.
|
|
62
|
+
|
|
63
|
+
Defaulting to \`null\`.`}const _Y=i$,LY=MY,a$="Radio",[BY,l$]=wt(a$),[NY,jY]=BY(a$),FY=w.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:c,...f}=t,[h,d]=w.useState(null),p=ye(e,v=>d(v)),b=w.useRef(!1),x=h?!!h.closest("form"):!0;return w.createElement(NY,{scope:n,checked:i,disabled:s},w.createElement(me.button,q({type:"button",role:"radio","aria-checked":i,"data-state":c$(i),"data-disabled":s?"":void 0,disabled:s,value:a},f,{ref:p,onClick:re(t.onClick,v=>{i||c?.(),x&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),x&&w.createElement(PY,{control:h,bubbles:!b.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))}),VY="RadioIndicator",HY=w.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,o=jY(VY,n);return w.createElement(Tt,{present:r||o.checked},w.createElement(me.span,q({"data-state":c$(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:e})))}),PY=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=w.useRef(null),s=Tf(n),a=$f(e);return w.useEffect(()=>{const c=o.current,f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&d){const p=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(p)}},[s,n,r]),w.createElement("input",q({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function c$(t){return t?"checked":"unchecked"}const WY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],u$="RadioGroup",[zY,Yte]=wt(u$,[qs,l$]),f$=qs(),h$=l$(),[UY,qY]=zY(u$),KY=w.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:c,dir:f,loop:h=!0,onValueChange:d,...p}=t,b=f$(n),x=Do(f),[v,C]=_t({prop:o,defaultProp:i,onChange:d});return w.createElement(UY,{scope:n,name:r,required:s,disabled:a,value:v,onValueChange:C},w.createElement(hp,q({asChild:!0},b,{orientation:c,dir:x,loop:h}),w.createElement(me.div,q({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x},p,{ref:e}))))}),GY="RadioGroupItem",YY=w.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,o=qY(GY,n),s=o.disabled||r,a=f$(n),c=h$(n),f=w.useRef(null),h=ye(e,f),d=o.value===i.value,p=w.useRef(!1);return w.useEffect(()=>{const b=v=>{WY.includes(v.key)&&(p.current=!0)},x=()=>p.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",x)}},[]),w.createElement(dp,q({asChild:!0},a,{focusable:!s,active:d}),w.createElement(FY,q({disabled:s,required:o.required,checked:d},c,i,{name:o.name,ref:h,onCheck:()=>o.onValueChange(i.value),onKeyDown:re(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:re(i.onFocus,()=>{var b;p.current&&((b=f.current)===null||b===void 0||b.click())})})))}),XY=w.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=h$(n);return w.createElement(HY,q({},i,r,{ref:e}))}),QY=KY,ZY=YY,JY=XY,d$="Switch",[eX,Xte]=wt(d$),[tX,nX]=eX(d$),rX=w.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:f,...h}=t,[d,p]=w.useState(null),b=ye(e,A=>p(A)),x=w.useRef(!1),v=d?!!d.closest("form"):!0,[C=!1,$]=_t({prop:i,defaultProp:o,onChange:f});return w.createElement(tX,{scope:n,checked:C,disabled:a},w.createElement(me.button,q({type:"button",role:"switch","aria-checked":C,"aria-required":s,"data-state":g$(C),"data-disabled":a?"":void 0,disabled:a,value:c},h,{ref:b,onClick:re(t.onClick,A=>{$(T=>!T),v&&(x.current=A.isPropagationStopped(),x.current||A.stopPropagation())})})),v&&w.createElement(sX,{control:d,bubbles:!x.current,name:r,value:c,checked:C,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),iX="SwitchThumb",oX=w.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,i=nX(iX,n);return w.createElement(me.span,q({"data-state":g$(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:e}))}),sX=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=w.useRef(null),s=Tf(n),a=$f(e);return w.useEffect(()=>{const c=o.current,f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&d){const p=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(p)}},[s,n,r]),w.createElement("input",q({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function g$(t){return t?"checked":"unchecked"}const aX=rX,lX=oX,p$="Tabs",[cX,Qte]=wt(p$,[qs]),m$=qs(),[uX,im]=cX(p$),fX=w.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:c="automatic",...f}=t,h=Do(a),[d,p]=_t({prop:r,onChange:i,defaultProp:o});return w.createElement(uX,{scope:n,baseId:Lt(),value:d,onValueChange:p,orientation:s,dir:h,activationMode:c},w.createElement(me.div,q({dir:h,"data-orientation":s},f,{ref:e})))}),hX="TabsList",dX=w.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,o=im(hX,n),s=m$(n);return w.createElement(hp,q({asChild:!0},s,{orientation:o.orientation,dir:o.dir,loop:r}),w.createElement(me.div,q({role:"tablist","aria-orientation":o.orientation},i,{ref:e})))}),gX="TabsTrigger",pX=w.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=t,s=im(gX,n),a=m$(n),c=b$(s.baseId,r),f=w$(s.baseId,r),h=r===s.value;return w.createElement(dp,q({asChild:!0},a,{focusable:!i,active:h}),w.createElement(me.button,q({type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},o,{ref:e,onMouseDown:re(t.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:re(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:re(t.onFocus,()=>{const d=s.activationMode!=="manual";!h&&!i&&d&&s.onValueChange(r)})})))}),mX="TabsContent",bX=w.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=t,a=im(mX,n),c=b$(a.baseId,r),f=w$(a.baseId,r),h=r===a.value,d=w.useRef(h);return w.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),w.createElement(Tt,{present:i||h},({present:p})=>w.createElement(me.div,q({"data-state":h?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:f,tabIndex:0},s,{ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0}}),p&&o))});function b$(t,e){return`${t}-trigger-${e}`}function w$(t,e){return`${t}-content-${e}`}const wX=fX,xX=dX,vX=pX,yX=bX,Ol=(t,e)=>{const n=S.createContext(e),r=o=>{const{children:s,...a}=o,c=S.useMemo(()=>a,Object.values(a));return m.jsx(n.Provider,{value:c,children:s})};function i(o){const s=S.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return r.displayName=`${t}Provider`,[r,i]};function CX(t,e){return typeof t=="string"?!1:e in t}function $u(t,e,n){return t&&e&&CX(t,e)?t[e]:n}const Fx={padding:["padding-block-start","padding-inline-end","padding-block-end","padding-inline-start"],paddingTop:"padding-block-start",paddingRight:"padding-inline-end",paddingBottom:"padding-block-end",paddingLeft:"padding-inline-start",margin:["margin-block-start","margin-inline-end","margin-block-end","margin-inline-start"],marginLeft:"margin-inline-start",marginRight:"margin-inline-end",marginTop:"margin-block-start",marginBottom:"margin-block-end",borderRadius:"border-radius",borderStyle:"border-style",borderWidth:"border-width",borderColor:"border-color",fontSize:"font-size",fontWeight:"font-weight",lineHeight:"line-height",zIndex:"z-index",boxShadow:"box-shadow",pointerEvents:"pointer-events",textAlign:"text-align",textTransform:"text-transform",textDecoration:"text-decoration",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexBasis:"flex-basis",minWidth:"min-width",maxWidth:"max-width",minHeight:"min-height",maxHeight:"max-height",flexDirection:"flex-direction",flexWrap:"flex-wrap",justifyContent:"justify-content",alignItems:"align-items"},$X=t=>{const[e,n,r,i]=t,o=n??e;return[e,o,r??e,i??o]};function SX(t,e){switch(t){case"gap":case"padding":case"margin":case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":case"marginTop":case"marginLeft":case"marginRight":case"marginBottom":case"left":case"right":case"top":case"bottom":case"width":case"maxWidth":case"minWidth":case"height":case"maxHeight":case"minHeight":case"borderRadius":case"borderWidth":return e.spaces;case"color":case"background":case"borderColor":return e.colors;case"fontSize":return e.fontSizes;case"fontWeight":return e.fontWeights;case"lineHeight":return e.lineHeights;case"zIndex":return e.zIndices;case"boxShadow":return e.shadows;default:return null}}const oh=(t,e)=>{const n=Object.entries(t).reduce((r,i)=>{const[o,s]=i,a=SX(o,e),c=Object.prototype.hasOwnProperty.call(Fx,o)?Fx[o]:o;return c&&(s||s===0)&&(typeof s=="object"&&!Array.isArray(s)?Object.entries(s).forEach(([f,h])=>{r[f]={...r[f],...Vx(c,h,a)}}):r.initial={...r.initial,...Vx(c,s,a)}),r},{initial:{},small:{},medium:{},large:{}});return Object.entries(n).reduce((r,[i,o])=>{if(o&&Object.keys(o).length>0){const s=Object.entries(o).reduce((a,[c,f])=>(a.push(`${c}: ${f};`),a),[]).join(`
|
|
64
|
+
`);i==="initial"?r.push(s):r.push(`${e.breakpoints[i]}{ ${s} }`)}return r},[]).join(`
|
|
65
|
+
`)},Vx=(t,e,n)=>{if(Array.isArray(t)&&Array.isArray(e)){const r=$X(e);return t.reduce((i,o,s)=>(i[o]=$u(n,r[s],r[s]),i),{})}else return Array.isArray(t)&&!Array.isArray(e)?t.reduce((r,i)=>(r[i]=$u(n,e,e),r),{}):!Array.isArray(t)&&!Array.isArray(e)?{[t]:$u(n,e,e)}:(console.warn("You've passed an array of values to a property that does not support it. Please check the property and value you're passing."),{})},nn=S.forwardRef,xe=nn((t,e)=>{const{background:n,basis:r,borderColor:i,color:o,flex:s,fontSize:a,grow:c,hasRadius:f,padding:h,paddingBottom:d,paddingLeft:p,paddingRight:b,paddingTop:x,margin:v,marginLeft:C,marginBottom:$,marginRight:A,marginTop:T,shadow:M,shrink:O,lineHeight:I,fontWeight:_,width:V,minWidth:F,maxWidth:H,height:z,minHeight:W,maxHeight:Y,top:K,left:te,bottom:ie,right:ne,borderRadius:oe,borderStyle:X,borderWidth:ce,tag:fe,pointerEvents:Me,display:we,position:Ve,zIndex:Ne,overflow:He,cursor:pe,transition:De,transform:ke,animation:Ae,textAlign:_e,textTransform:ze,...Et}=t,Qe=fe||"div",Pe={$background:n,$basis:r,$borderColor:i,$color:o,$flex:s,$fontSize:a,$grow:c,$hasRadius:f,$padding:h,$paddingBottom:d,$paddingLeft:p,$paddingRight:b,$paddingTop:x,$margin:v,$marginLeft:C,$marginBottom:$,$marginRight:A,$marginTop:T,$shadow:M,$shrink:O,$lineHeight:I,$fontWeight:_,$width:V,$minWidth:F,$maxWidth:H,$height:z,$minHeight:W,$maxHeight:Y,$top:K,$left:te,$bottom:ie,$right:ne,$borderRadius:oe,$borderStyle:X,$borderWidth:ce,$pointerEvents:Me,$display:we,$position:Ve,$zIndex:Ne,$overflow:He,$cursor:pe,$transition:De,$transform:ke,$animation:Ae,$textAlign:_e,$textTransform:ze};return m.jsx(AX,{as:Qe,ref:e,...Pe,...Et})}),AX=k.styled.div`
|
|
66
|
+
${({theme:t,...e})=>oh({padding:e.$padding,paddingTop:e.$paddingTop,paddingBottom:e.$paddingBottom,paddingLeft:e.$paddingLeft,paddingRight:e.$paddingRight,margin:e.$margin,marginTop:e.$marginTop,marginBottom:e.$marginBottom,marginLeft:e.$marginLeft,marginRight:e.$marginRight,top:e.$top,left:e.$left,bottom:e.$bottom,right:e.$right,width:e.$width,minWidth:e.$minWidth,maxWidth:e.$maxWidth,height:e.$height,minHeight:e.$minHeight,maxHeight:e.$maxHeight,color:e.$color,background:e.$background,fontSize:e.$fontSize,fontWeight:e.$fontWeight,lineHeight:e.$lineHeight,borderRadius:e.$hasRadius?t.borderRadius:e.$borderRadius,borderStyle:e.$borderColor&&!e.$borderStyle?"solid":e.$borderStyle,borderWidth:e.$borderColor&&!e.$borderWidth?"1px":e.$borderWidth,borderColor:e.$borderColor,zIndex:e.$zIndex,boxShadow:e.$shadow,display:e.$display,pointerEvents:e.$pointerEvents,cursor:e.$cursor,textAlign:e.$textAlign,textTransform:e.$textTransform,transition:e.$transition,transform:e.$transform,animation:e.$animation,position:e.$position,overflow:e.$overflow,flex:e.$flex,flexShrink:e.$shrink,flexGrow:e.$grow,flexBasis:e.$basis},t)};
|
|
67
|
+
`,ge=nn((t,e)=>{const{className:n,alignItems:r,direction:i,inline:o,gap:s,justifyContent:a,wrap:c,...f}=t,h={$alignItems:r,$direction:i,$gap:s,$justifyContent:a,$wrap:c,$inline:o};return m.jsx(RX,{className:n,ref:e,...h,...f})}),RX=k.styled(xe)`
|
|
68
|
+
${({theme:t,$display:e="flex",$alignItems:n="center",$direction:r="row",...i})=>oh({gap:i.$gap,alignItems:n,justifyContent:i.$justifyContent,flexWrap:i.$wrap,flexDirection:r,display:i.$inline?"inline-flex":e},t)};
|
|
69
|
+
`,kX="alpha",TX="beta",EX="delta",MX="epsilon",Hx="omega",OX="pi",DX="sigma",x$=k.css`
|
|
70
|
+
display: block;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
`,IX=({$variant:t=Hx,theme:e})=>{switch(t){case kX:return`
|
|
75
|
+
font-weight: ${e.fontWeights.bold};
|
|
76
|
+
font-size: ${e.fontSizes[5]};
|
|
77
|
+
line-height: ${e.lineHeights[2]};
|
|
78
|
+
`;case TX:return`
|
|
79
|
+
font-weight: ${e.fontWeights.bold};
|
|
80
|
+
font-size: ${e.fontSizes[4]};
|
|
81
|
+
line-height: ${e.lineHeights[1]};
|
|
82
|
+
`;case EX:return`
|
|
83
|
+
font-weight: ${e.fontWeights.semiBold};
|
|
84
|
+
font-size: ${e.fontSizes[3]};
|
|
85
|
+
line-height: ${e.lineHeights[2]};
|
|
86
|
+
`;case MX:return`
|
|
87
|
+
font-size: ${e.fontSizes[3]};
|
|
88
|
+
line-height: ${e.lineHeights[6]};
|
|
89
|
+
`;case Hx:return`
|
|
90
|
+
font-size: ${e.fontSizes[2]};
|
|
91
|
+
line-height: ${e.lineHeights[4]};
|
|
92
|
+
`;case OX:return`
|
|
93
|
+
font-size: ${e.fontSizes[1]};
|
|
94
|
+
line-height: ${e.lineHeights[3]};
|
|
95
|
+
`;case DX:return`
|
|
96
|
+
font-weight: ${e.fontWeights.bold};
|
|
97
|
+
font-size: ${e.fontSizes[0]};
|
|
98
|
+
line-height: ${e.lineHeights[5]};
|
|
99
|
+
text-transform: uppercase;
|
|
100
|
+
`;default:return`
|
|
101
|
+
font-size: ${e.fontSizes[2]};
|
|
102
|
+
`}},Re=nn((t,e)=>{const{ellipsis:n,textColor:r="currentcolor",textDecoration:i,textTransform:o,variant:s,lineHeight:a,fontWeight:c,fontSize:f,...h}=t,d={$ellipsis:n,$textColor:r,$textDecoration:i,$textTransform:o,$variant:s,$lineHeight:a,$fontWeight:c,$fontSize:f};return m.jsx(_X,{ref:e,tag:"span",...d,...h})}),_X=k.styled(xe)`
|
|
103
|
+
${IX}
|
|
104
|
+
${({$ellipsis:t})=>t?x$:""}
|
|
105
|
+
|
|
106
|
+
${({theme:t,...e})=>oh({color:e.$textColor,textDecoration:e.$textDecoration,textTransform:e.$textTransform,lineHeight:e.$lineHeight,fontWeight:e.$fontWeight,fontSize:e.$fontSize},t)}
|
|
107
|
+
`,[LX,om]=Ol("Accordion"),BX=S.forwardRef(({children:t,size:e="S",...n},r)=>m.jsx(NX,{ref:r,$size:e,collapsible:!0,...n,type:"single",children:m.jsx(LX,{size:e,children:t})})),NX=k.styled(vI)`
|
|
108
|
+
background-color: ${t=>t.theme.colors.neutral0};
|
|
109
|
+
|
|
110
|
+
${t=>t.$size==="S"?k.css`
|
|
111
|
+
border-radius: ${e=>e.theme.borderRadius};
|
|
112
|
+
border: solid 1px ${e=>e.theme.colors.neutral200};
|
|
113
|
+
`:k.css``}
|
|
114
|
+
`,jX=S.forwardRef((t,e)=>{const{size:n}=om("Item");return m.jsx(FX,{$size:n,"data-size":n,ref:e,...t})}),FX=k.styled(yI)`
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
margin: 1px 0;
|
|
117
|
+
|
|
118
|
+
&:first-child {
|
|
119
|
+
border-top-left-radius: 0.3rem;
|
|
120
|
+
border-top-right-radius: 0.3rem;
|
|
121
|
+
margin-top: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:last-child {
|
|
125
|
+
border-bottom-left-radius: 0.3rem;
|
|
126
|
+
border-bottom-right-radius: 0.3rem;
|
|
127
|
+
margin-bottom: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&[data-size='S'] {
|
|
131
|
+
& + & {
|
|
132
|
+
border-top: solid 1px ${t=>t.theme.colors.neutral200};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&[data-state='open'] {
|
|
137
|
+
box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:not([data-disabled]):hover {
|
|
141
|
+
box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* This applies our desired focus effect correctly. */
|
|
145
|
+
&:focus-within {
|
|
146
|
+
position: relative;
|
|
147
|
+
z-index: 1;
|
|
148
|
+
box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
152
|
+
transition: box-shadow ${t=>t.theme.motion.timings[120]}
|
|
153
|
+
${t=>t.theme.motion.easings.easeOutQuad};
|
|
154
|
+
}
|
|
155
|
+
`,VX=S.forwardRef(({caretPosition:t="left",description:e,icon:n,iconProps:r,children:i,...o},s)=>{const{size:a}=om("Trigger");return m.jsxs(y$,{$caretPosition:t,$size:a,ref:s,...o,children:[t==="left"?m.jsx(mf,{$size:a,children:m.jsx(Oi,{width:a==="S"?"1.2rem":"1.6rem",height:a==="S"?"1.2rem":"1.6rem"})}):null,m.jsxs(ge,{tag:"span",gap:2,children:[n&&a==="S"?m.jsx(v$,{children:m.jsx(n,{...r})}):null,m.jsxs(ge,{alignItems:"flex-start",direction:"column",tag:"span",ref:s,children:[m.jsx(Re,{fontWeight:a==="S"?"bold":void 0,ellipsis:!0,variant:a==="M"?"delta":void 0,textAlign:"left",children:i}),e&&a==="M"?m.jsx(Re,{textAlign:"left",children:e}):null]})]}),t==="right"?m.jsx(mf,{$size:a,children:m.jsx(Oi,{width:a==="S"?"1.2rem":"1.6rem",height:a==="S"?"1.2rem":"1.6rem"})}):null]})}),v$=k.styled(xe)`
|
|
156
|
+
color: ${t=>t.theme.colors.neutral500};
|
|
157
|
+
display: flex;
|
|
158
|
+
|
|
159
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
160
|
+
transition: ${t=>t.theme.transitions.color};
|
|
161
|
+
}
|
|
162
|
+
`,mf=k.styled(ge).attrs(t=>({...t,tag:"span"}))`
|
|
163
|
+
background-color: ${t=>t.theme.colors.neutral200};
|
|
164
|
+
width: ${t=>t.$size==="S"?"2.4rem":"3.2rem"};
|
|
165
|
+
height: ${t=>t.$size==="S"?"2.4rem":"3.2rem"};
|
|
166
|
+
flex: ${t=>t.$size==="S"?"0 0 2.4rem":"0 0 3.2rem"};
|
|
167
|
+
border-radius: 50%;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
|
|
170
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
171
|
+
transition:
|
|
172
|
+
transform ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.authenticMotion},
|
|
173
|
+
${t=>t.theme.transitions.backgroundColor};
|
|
174
|
+
}
|
|
175
|
+
`,y$=k.styled($I)`
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: ${t=>t.$caretPosition==="left"?"flex-start":"space-between"};
|
|
179
|
+
width: 100%;
|
|
180
|
+
gap: ${t=>t.theme.spaces[4]};
|
|
181
|
+
padding-inline: ${t=>t.$size==="S"?t.theme.spaces[4]:t.theme.spaces[6]};
|
|
182
|
+
padding-block: ${t=>t.$size==="S"?t.theme.spaces[3]:t.theme.spaces[6]};
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
color: ${t=>t.theme.colors.neutral800};
|
|
185
|
+
|
|
186
|
+
&[data-disabled] {
|
|
187
|
+
cursor: default;
|
|
188
|
+
color: ${t=>t.theme.colors.neutral600};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&[data-state='open'] > ${mf} {
|
|
192
|
+
transform: rotate(180deg);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* we remove the default focus because the entire item should have the focus style and the default would be hidden. */
|
|
196
|
+
&:focus-visible {
|
|
197
|
+
outline: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
201
|
+
transition: ${t=>t.theme.transitions.color};
|
|
202
|
+
}
|
|
203
|
+
`,HX=S.forwardRef((t,e)=>{const{size:n}=om("Trigger");return m.jsx(C$,{$size:n,...t,ref:e})}),C$=k.styled(ge).attrs(t=>({...t,tag:"span"}))`
|
|
204
|
+
padding-inline: ${t=>t.$size==="S"?t.theme.spaces[2]:t.theme.spaces[6]};
|
|
205
|
+
padding-block: ${t=>t.$size==="S"?t.theme.spaces[2]:t.theme.spaces[6]};
|
|
206
|
+
|
|
207
|
+
// Remove default IconButton styles so there are no backgrounds or borders.
|
|
208
|
+
& > button {
|
|
209
|
+
border: none;
|
|
210
|
+
background: none;
|
|
211
|
+
color: ${t=>t.theme.colors.neutral600};
|
|
212
|
+
|
|
213
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
214
|
+
transition: ${t=>t.theme.transitions.color};
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`,PX=S.forwardRef(({variant:t="primary",...e},n)=>m.jsx(WX,{$variant:t,ref:n,...e})),WX=k.styled(CI)`
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
background-color: ${t=>t.$variant==="primary"?t.theme.colors.neutral0:t.theme.colors.neutral100};
|
|
221
|
+
|
|
222
|
+
&[data-disabled] {
|
|
223
|
+
background-color: ${t=>t.theme.colors.neutral150};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&:not([data-disabled]) {
|
|
227
|
+
&:hover,
|
|
228
|
+
&[data-state='open'] {
|
|
229
|
+
background-color: ${t=>t.theme.colors.primary100};
|
|
230
|
+
|
|
231
|
+
& > ${y$} {
|
|
232
|
+
color: ${t=>t.theme.colors.primary600};
|
|
233
|
+
|
|
234
|
+
& ${v$} {
|
|
235
|
+
color: ${t=>t.theme.colors.primary600};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
& ${mf} {
|
|
239
|
+
background-color: ${t=>t.theme.colors.primary200};
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
& > ${C$} > button {
|
|
244
|
+
color: ${t=>t.theme.colors.primary600};
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
250
|
+
transition: ${t=>t.theme.transitions.backgroundColor};
|
|
251
|
+
}
|
|
252
|
+
`,zX=S.forwardRef((t,e)=>m.jsx(KX,{ref:e,...t})),UX=k.keyframes`
|
|
253
|
+
from {
|
|
254
|
+
height: 0;
|
|
255
|
+
}
|
|
256
|
+
to {
|
|
257
|
+
height: var(--radix-accordion-content-height);
|
|
258
|
+
}
|
|
259
|
+
`,qX=k.keyframes`
|
|
260
|
+
from {
|
|
261
|
+
height: var(--radix-accordion-content-height);
|
|
262
|
+
}
|
|
263
|
+
to {
|
|
264
|
+
height: 0;
|
|
265
|
+
}
|
|
266
|
+
`,KX=k.styled(SI)`
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
|
|
269
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
270
|
+
&[data-state='open'] {
|
|
271
|
+
animation: ${UX} ${t=>t.theme.motion.timings[320]}
|
|
272
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
&[data-state='closed'] {
|
|
276
|
+
animation: ${qX} ${t=>t.theme.motion.timings[320]}
|
|
277
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
`,GX=Object.freeze(Object.defineProperty({__proto__:null,Actions:HX,Content:zX,Header:PX,Item:jX,Root:BX,Trigger:VX},Symbol.toStringTag,{value:"Module"})),sh=k.css`
|
|
281
|
+
position: relative;
|
|
282
|
+
outline: none;
|
|
283
|
+
|
|
284
|
+
&:after {
|
|
285
|
+
transition-property: all;
|
|
286
|
+
transition-duration: 0.2s;
|
|
287
|
+
border-radius: 8px;
|
|
288
|
+
content: '';
|
|
289
|
+
position: absolute;
|
|
290
|
+
top: -4px;
|
|
291
|
+
bottom: -4px;
|
|
292
|
+
left: -4px;
|
|
293
|
+
right: -4px;
|
|
294
|
+
border: 2px solid transparent;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
&:focus-visible {
|
|
298
|
+
outline: none;
|
|
299
|
+
|
|
300
|
+
&:after {
|
|
301
|
+
border-radius: 8px;
|
|
302
|
+
content: '';
|
|
303
|
+
position: absolute;
|
|
304
|
+
top: -5px;
|
|
305
|
+
bottom: -5px;
|
|
306
|
+
left: -5px;
|
|
307
|
+
right: -5px;
|
|
308
|
+
border: 2px solid ${t=>t.theme.colors.primary600};
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
`,Bo=({tag:t,...e})=>{const n=t||"span";return m.jsx(YX,{...e,as:n})},YX=k.styled.span`
|
|
312
|
+
border: 0;
|
|
313
|
+
clip: rect(0 0 0 0);
|
|
314
|
+
height: 1px;
|
|
315
|
+
margin: -1px;
|
|
316
|
+
overflow: hidden;
|
|
317
|
+
padding: 0;
|
|
318
|
+
position: absolute;
|
|
319
|
+
width: 1px;
|
|
320
|
+
`,Vs=({children:t,label:e})=>{const n=S.Children.only(t);return m.jsxs(m.Fragment,{children:[S.cloneElement(n,{"aria-hidden":"true",focusable:"false"}),m.jsx(Bo,{children:e})]})};Vs.displayName="AccessibleIcon";const $$=t=>{switch(t){case"danger":return"danger100";case"success":return"success100";case"warning":return"warning100";default:return"primary100"}},XX=t=>$$(t).replace("100","200"),sg=({theme:t,$variant:e})=>e==="danger"?t.colors.danger700:e==="success"?t.colors.success700:e==="warning"?t.colors.warning700:t.colors.primary700,QX=k.styled(xe)`
|
|
321
|
+
${sh};
|
|
322
|
+
`,ZX=k.styled(ge)`
|
|
323
|
+
svg {
|
|
324
|
+
height: 100%;
|
|
325
|
+
width: 100%;
|
|
326
|
+
|
|
327
|
+
path {
|
|
328
|
+
fill: ${sg};
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
`,JX=({variant:t,...e})=>t==="success"?m.jsx(c_,{...e}):t==="danger"||t==="warning"?m.jsx(P3,{...e}):m.jsx(LL,{...e}),eQ=k.styled(xe)`
|
|
332
|
+
& a > span {
|
|
333
|
+
color: ${sg};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
svg path {
|
|
337
|
+
fill: ${sg};
|
|
338
|
+
}
|
|
339
|
+
`,tQ=({title:t,children:e,variant:n="default",onClose:r,closeLabel:i,titleAs:o="p",action:s,...a})=>m.jsxs(ge,{alignItems:"flex-start",background:$$(n),borderColor:XX(n),shadow:"filterShadow",gap:3,hasRadius:!0,padding:5,paddingRight:6,...a,children:[m.jsx(ZX,{height:"2rem",shrink:0,$variant:n,width:"2rem",children:m.jsx(JX,{"aria-hidden":!0,variant:n})}),m.jsxs(ge,{alignItems:"start",gap:s?2:1,wrap:"wrap",role:n==="danger"?"alert":"status",width:"100%",children:[t&&m.jsx(Re,{fontWeight:"bold",textColor:"neutral800",tag:o,children:t}),m.jsx(Re,{tag:"p",textColor:"neutral800",children:e}),s&&m.jsx(eQ,{$variant:n,children:s})]}),m.jsx(QX,{tag:"button",background:"transparent",borderColor:void 0,height:"1.6rem",width:"1.6rem",marginTop:1,onClick:r,color:"neutral700",children:m.jsx(Vs,{label:i,children:m.jsx(Hi,{})})})]});function S$(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Cr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=A$({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=S$(n),c=S.useCallback(f=>{if(o){const d=typeof f=="function"?f(t):f;d!==t&&a(d)}else i(f)},[o,t,i,a]);return[s,c]}function A$({defaultProp:t,onChange:e}){const n=S.useState(t),[r]=n,i=S.useRef(r),o=S$(e);return S.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const ag={easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",easeInOutFast:"cubic-bezier(1,0,0,1)",authenticMotion:"cubic-bezier(.4,0,.2,1)"},lg={320:"320ms",200:"200ms",120:"120ms"},nQ={color:`color ${lg[120]} ${ag.easeOutQuad}`,backgroundColor:`background-color ${lg[120]} ${ag.easeOutQuad}`},mt={overlayFadeIn:k.keyframes`
|
|
340
|
+
from {
|
|
341
|
+
opacity: 0;
|
|
342
|
+
}
|
|
343
|
+
to {
|
|
344
|
+
opacity: 0.2;
|
|
345
|
+
}
|
|
346
|
+
`,modalPopIn:k.keyframes`
|
|
347
|
+
from {
|
|
348
|
+
transform:translate(-50%, -50%) scale(0.8);
|
|
349
|
+
opacity: 0;
|
|
350
|
+
}
|
|
351
|
+
to {
|
|
352
|
+
transform: translate(-50%, -50%) scale(1);
|
|
353
|
+
opacity: 1;
|
|
354
|
+
}
|
|
355
|
+
`,modalPopOut:k.keyframes`
|
|
356
|
+
from {
|
|
357
|
+
transform: translate(-50%, -50%) scale(1);
|
|
358
|
+
opacity: 1;
|
|
359
|
+
}
|
|
360
|
+
to {
|
|
361
|
+
transform:translate(-50%, -50%) scale(0.8);
|
|
362
|
+
opacity: 0;
|
|
363
|
+
}
|
|
364
|
+
`,popIn:k.keyframes`
|
|
365
|
+
from {
|
|
366
|
+
transform: scale(0.8);
|
|
367
|
+
opacity: 0;
|
|
368
|
+
}
|
|
369
|
+
to {
|
|
370
|
+
transform: scale(1);
|
|
371
|
+
opacity: 1;
|
|
372
|
+
}
|
|
373
|
+
`,popOut:k.keyframes`
|
|
374
|
+
from {
|
|
375
|
+
transform: scale(1);
|
|
376
|
+
opacity: 1;
|
|
377
|
+
}
|
|
378
|
+
to {
|
|
379
|
+
transform: scale(0.8);
|
|
380
|
+
opacity: 0;
|
|
381
|
+
}
|
|
382
|
+
`,slideDownIn:k.keyframes`
|
|
383
|
+
from {
|
|
384
|
+
opacity: 0;
|
|
385
|
+
transform: translateY(-10px);
|
|
386
|
+
}
|
|
387
|
+
to {
|
|
388
|
+
opacity: 1;
|
|
389
|
+
transform: translateY(0);
|
|
390
|
+
}
|
|
391
|
+
`,slideDownOut:k.keyframes`
|
|
392
|
+
from {
|
|
393
|
+
opacity: 1;
|
|
394
|
+
transform: translateY(0);
|
|
395
|
+
}
|
|
396
|
+
to {
|
|
397
|
+
opacity: 0;
|
|
398
|
+
transform: translateY(-10px);
|
|
399
|
+
}
|
|
400
|
+
`,slideUpIn:k.keyframes`
|
|
401
|
+
from {
|
|
402
|
+
opacity: 0;
|
|
403
|
+
transform: translateY(10px);
|
|
404
|
+
}
|
|
405
|
+
to {
|
|
406
|
+
opacity: 1;
|
|
407
|
+
transform: translateY(0);
|
|
408
|
+
}
|
|
409
|
+
`,slideUpOut:k.keyframes`
|
|
410
|
+
from {
|
|
411
|
+
opacity: 1;
|
|
412
|
+
transform: translateY(0);
|
|
413
|
+
}
|
|
414
|
+
to {
|
|
415
|
+
opacity: 0;
|
|
416
|
+
transform: translateY(10px);
|
|
417
|
+
}
|
|
418
|
+
`,fadeIn:k.keyframes`
|
|
419
|
+
from {
|
|
420
|
+
opacity: 0;
|
|
421
|
+
}
|
|
422
|
+
to {
|
|
423
|
+
opacity: 1;
|
|
424
|
+
}
|
|
425
|
+
`,fadeOut:k.keyframes`
|
|
426
|
+
from {
|
|
427
|
+
opacity: 1;
|
|
428
|
+
}
|
|
429
|
+
to {
|
|
430
|
+
opacity: 0;
|
|
431
|
+
}
|
|
432
|
+
`},ll=32,Px=2,rQ=S.forwardRef(({onLoadingStatusChange:t,delayMs:e=600,src:n,alt:r,fallback:i,preview:o=!1,...s},a)=>{const[c,f]=Cr({onChange:t}),[h,d]=S.useState(!1),p=o&&c==="loaded",b=x=>{p&&d(x)};return m.jsxs(Pv,{onOpenChange:b,children:[m.jsx(Wv,{asChild:!0,children:m.jsxs(cg,{ref:a,...s,children:[p?m.jsx(iQ,{width:"100%",height:"100%",position:"absolute",background:"neutral0",zIndex:"overlay",style:{opacity:h?.4:0}}):null,m.jsx(oQ,{src:n,alt:r,onLoadingStatusChange:f}),m.jsx(KN,{delayMs:e,children:m.jsx(Re,{fontWeight:"bold",textTransform:"uppercase",children:i})})]})}),p?m.jsx(zv,{children:m.jsx(sQ,{side:"top",sideOffset:4,children:m.jsx(aQ,{src:n,alt:r})})}):null]})}),R$=k.css`
|
|
433
|
+
display: inline-flex;
|
|
434
|
+
align-items: center;
|
|
435
|
+
justify-content: center;
|
|
436
|
+
vertical-align: middle;
|
|
437
|
+
overflow: hidden;
|
|
438
|
+
user-select: none;
|
|
439
|
+
overflow: hidden;
|
|
440
|
+
border-radius: 50%;
|
|
441
|
+
`,k$=k.css`
|
|
442
|
+
width: 100%;
|
|
443
|
+
height: 100%;
|
|
444
|
+
object-fit: cover;
|
|
445
|
+
border-radius: inherit;
|
|
446
|
+
`,cg=k.styled(UN)`
|
|
447
|
+
position: relative;
|
|
448
|
+
z-index: 0;
|
|
449
|
+
${R$}
|
|
450
|
+
width: ${ll/10}rem;
|
|
451
|
+
height: ${ll/10}rem;
|
|
452
|
+
/* TODO: we should get the user email & hash it to turn it into a hex-value so different emails can consistently get a different background */
|
|
453
|
+
background-color: ${t=>t.theme.colors.primary600};
|
|
454
|
+
color: ${t=>t.theme.colors.neutral0};
|
|
455
|
+
`,iQ=k.styled(xe)`
|
|
456
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
457
|
+
transition: opacity ${t=>t.theme.motion.timings[200]}
|
|
458
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
459
|
+
}
|
|
460
|
+
`,oQ=k.styled(qN)`
|
|
461
|
+
${k$}
|
|
462
|
+
`,sQ=k.styled(Uv)`
|
|
463
|
+
${R$}
|
|
464
|
+
width: ${ll*Px/10}rem;
|
|
465
|
+
height: ${ll*Px/10}rem;
|
|
466
|
+
|
|
467
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
468
|
+
animation: ${mt.fadeIn} ${t=>t.theme.motion.timings[200]}
|
|
469
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
470
|
+
}
|
|
471
|
+
`,aQ=k.styled.img`
|
|
472
|
+
${k$}
|
|
473
|
+
`,lQ=S.forwardRef((t,e)=>m.jsx(cQ,{...t,ref:e,tag:"div"})),cQ=k.styled(ge)`
|
|
474
|
+
& > ${cg} + ${cg} {
|
|
475
|
+
margin-left: -${ll/10/2}rem;
|
|
476
|
+
}
|
|
477
|
+
`,uQ=Object.freeze(Object.defineProperty({__proto__:null,Group:lQ,Item:rQ},Symbol.toStringTag,{value:"Module"})),sm=({active:t=!1,size:e="M",textColor:n="neutral600",backgroundColor:r="neutral150",children:i,minWidth:o=5,...s})=>{const a=e==="S"?1:2;return m.jsx(fQ,{inline:!0,alignItems:"center",justifyContent:"center",minWidth:o,paddingLeft:a,paddingRight:a,background:t?"primary200":r,$size:e,...s,children:m.jsx(Re,{variant:"sigma",textColor:t?"primary600":n,lineHeight:"1rem",children:i})})},fQ=k.styled(ge)`
|
|
478
|
+
border-radius: ${({theme:t,$size:e})=>e==="S"?"2px":t.borderRadius};
|
|
479
|
+
${({$size:t,theme:e})=>t==="S"?k.css`
|
|
480
|
+
padding-block: 0.3rem;
|
|
481
|
+
padding-inline ${e.spaces[1]}
|
|
482
|
+
`:k.css`
|
|
483
|
+
padding-block: 0.7rem;
|
|
484
|
+
padding-inline ${e.spaces[2]}
|
|
485
|
+
`};
|
|
486
|
+
`,Dl=nn(({href:t,disabled:e=!1,isExternal:n=!1,...r},i)=>m.jsx(hQ,{tag:"a",ref:i,target:n?"_blank":void 0,rel:n?"noreferrer noopener":void 0,href:t,tabIndex:e?-1:void 0,"aria-disabled":e,pointerEvents:e?"none":void 0,cursor:e?void 0:"pointer",...r})),hQ=k.styled(xe)`
|
|
487
|
+
text-decoration: none;
|
|
488
|
+
|
|
489
|
+
&:visited {
|
|
490
|
+
color: inherit;
|
|
491
|
+
}
|
|
492
|
+
`,T$=()=>m.jsx(xe,{"aria-hidden":!0,paddingLeft:1,paddingRight:1,children:m.jsx(Re,{variant:"pi",textColor:"neutral500",children:"/"})});T$.displayName="Divider";const dQ=k.styled(ge)`
|
|
493
|
+
// CrumbLinks do have padding-x, because they need to have a
|
|
494
|
+
// interaction effect, which mis-aligns the breadcrumbs on the left.
|
|
495
|
+
// This normalizes the behavior by moving the first item to left by
|
|
496
|
+
// the same amount it has inner padding
|
|
497
|
+
& > *:first-child {
|
|
498
|
+
margin-left: ${({theme:t})=>`calc(-1*${t.spaces[2]})`};
|
|
499
|
+
}
|
|
500
|
+
`,gQ=S.forwardRef(({label:t,children:e,...n},r)=>{const i=S.Children.toArray(e);return m.jsx(xe,{"aria-label":t,tag:"nav",...n,ref:r,children:m.jsx(dQ,{tag:"ol",children:S.Children.map(i,(o,s)=>{const a=i.length>1&&s+1<i.length;return m.jsxs(ge,{inline:!0,tag:"li",children:[o,a&&m.jsx(T$,{})]})})})})});gQ.displayName="Breadcrumbs";const pQ=S.forwardRef(({children:t,isCurrent:e=!1,...n},r)=>m.jsx(xe,{paddingLeft:2,paddingRight:2,paddingTop:1,paddingBottom:1,ref:r,children:m.jsx(Re,{variant:"pi",textColor:"neutral800",fontWeight:e?"bold":"regular","aria-current":e,...n,children:t})}));pQ.displayName="Crumb";const mQ=k.styled(Dl)`
|
|
501
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
502
|
+
color: ${({theme:t})=>t.colors.neutral600};
|
|
503
|
+
font-size: ${({theme:t})=>t.fontSizes[1]};
|
|
504
|
+
line-height: ${({theme:t})=>t.lineHeights[4]};
|
|
505
|
+
padding: ${({theme:t})=>`${t.spaces[1]} ${t.spaces[2]}`};
|
|
506
|
+
text-decoration: none;
|
|
507
|
+
|
|
508
|
+
:hover,
|
|
509
|
+
:focus {
|
|
510
|
+
background-color: ${({theme:t})=>t.colors.neutral200};
|
|
511
|
+
color: ${({theme:t})=>t.colors.neutral700};
|
|
512
|
+
}
|
|
513
|
+
`,bQ=S.forwardRef(({children:t,...e},n)=>m.jsx(mQ,{ref:n,...e,children:t}));bQ.displayName="CrumbLink";const Hs=t=>t.replaceAll(":","");function wQ(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function E$(...t){return e=>t.forEach(n=>wQ(n,e))}function gn(...t){return S.useCallback(E$(...t),t)}const xQ=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ko=xQ()?w.useEffect:w.useLayoutEffect,vQ=S.useId||(()=>{});let yQ=0;const Tn=t=>{const[e,n]=S.useState(vQ());return ko(()=>{t||n(r=>r??String(yQ++))},[t]),t?.toString()??(e||"")},Il=(t,e,{selectorToWatch:n,skipWhen:r=!1})=>{const i=Vg(e);S.useEffect(()=>{if(r||!t.current)return;const o={root:t.current,rootMargin:"0px"},s=f=>{f.forEach(h=>{h.isIntersecting&&t.current&&t.current.scrollHeight>t.current.clientHeight&&i(h)})},a=new IntersectionObserver(s,o),c=t.current.querySelector(n);return c&&a.observe(c),()=>{a.disconnect()}},[r,i,n,t])},am="success-light",lm="danger-light",ah="default",_l="tertiary",Ll="secondary",M$="danger",O$="success",lh="ghost",cm=[am,lm],CQ=[ah,_l,Ll,M$,O$,lh,...cm],$Q=["S","M","L"],Kn=t=>t===am||t===lm?`${t.substring(0,t.lastIndexOf("-"))}`:t===_l?"neutral":t===ah||t===Ll||CQ.every(e=>e!==t)?"primary":`${t}`,D$=({theme:t})=>k.css`
|
|
514
|
+
border: 1px solid ${t.colors.neutral200};
|
|
515
|
+
background: ${t.colors.neutral150};
|
|
516
|
+
color: ${t.colors.neutral600};
|
|
517
|
+
cursor: default;
|
|
518
|
+
`,I$=({theme:t,$variant:e})=>[...cm,Ll].includes(e)?k.css`
|
|
519
|
+
background-color: ${t.colors.neutral0};
|
|
520
|
+
`:e===_l?k.css`
|
|
521
|
+
background-color: ${t.colors.neutral100};
|
|
522
|
+
`:e===lh?k.css`
|
|
523
|
+
background-color: ${t.colors.neutral100};
|
|
524
|
+
`:e===ah?k.css`
|
|
525
|
+
border: 1px solid ${t.colors.buttonPrimary500};
|
|
526
|
+
background: ${t.colors.buttonPrimary500};
|
|
527
|
+
`:k.css`
|
|
528
|
+
border: 1px solid ${t.colors[`${Kn(e)}500`]};
|
|
529
|
+
background: ${t.colors[`${Kn(e)}500`]};
|
|
530
|
+
`,_$=({theme:t,$variant:e})=>[...cm,Ll].includes(e)?k.css`
|
|
531
|
+
background-color: ${t.colors.neutral0};
|
|
532
|
+
border: 1px solid ${t.colors[`${Kn(e)}600`]};
|
|
533
|
+
color: ${t.colors[`${Kn(e)}600`]};
|
|
534
|
+
`:e===_l||e===lh?k.css`
|
|
535
|
+
background-color: ${t.colors.neutral150};
|
|
536
|
+
`:k.css`
|
|
537
|
+
border: 1px solid ${t.colors[`${Kn(e)}600`]};
|
|
538
|
+
background: ${t.colors[`${Kn(e)}600`]};
|
|
539
|
+
`,L$=({theme:t,$variant:e})=>{switch(e){case lm:case am:case Ll:return k.css`
|
|
540
|
+
border: 1px solid ${t.colors[`${Kn(e)}200`]};
|
|
541
|
+
background: ${t.colors[`${Kn(e)}100`]};
|
|
542
|
+
color: ${t.colors[`${Kn(e)}700`]};
|
|
543
|
+
`;case _l:return k.css`
|
|
544
|
+
border: 1px solid ${t.colors.neutral200};
|
|
545
|
+
background: ${t.colors.neutral0};
|
|
546
|
+
color: ${t.colors.neutral800};
|
|
547
|
+
`;case lh:return k.css`
|
|
548
|
+
border: 1px solid transparent;
|
|
549
|
+
background: transparent;
|
|
550
|
+
color: ${t.colors.neutral800};
|
|
551
|
+
|
|
552
|
+
svg {
|
|
553
|
+
fill: ${t.colors.neutral500};
|
|
554
|
+
}
|
|
555
|
+
`;case O$:case M$:return k.css`
|
|
556
|
+
border: 1px solid ${t.colors[`${Kn(e)}600`]};
|
|
557
|
+
background: ${t.colors[`${Kn(e)}600`]};
|
|
558
|
+
color: ${t.colors.neutral0};
|
|
559
|
+
`;default:return k.css`
|
|
560
|
+
border: 1px solid ${t.colors.buttonPrimary600};
|
|
561
|
+
background: ${t.colors.buttonPrimary600};
|
|
562
|
+
color: ${t.colors.buttonNeutral0};
|
|
563
|
+
`}},bf=nn(({variant:t=ah,startIcon:e,endIcon:n,disabled:r=!1,children:i,onClick:o,size:s=$Q[0],loading:a=!1,fullWidth:c=!1,...f},h)=>{const d=r||a,p=b=>{!d&&o&&o(b)};return m.jsxs(RQ,{ref:h,"aria-disabled":d,disabled:d,$size:s,$variant:t,tag:"button",onClick:p,hasRadius:!0,gap:2,inline:!0,alignItems:"center",justifyContent:"center",width:c?"100%":void 0,paddingLeft:4,paddingRight:4,cursor:"pointer",...f,children:[(e||a)&&m.jsx(ge,{tag:"span","aria-hidden":!0,children:a?m.jsx(AQ,{}):e}),m.jsx(Re,{variant:s==="S"?"pi":void 0,fontWeight:"bold",children:i}),n&&m.jsx(ge,{tag:"span","aria-hidden":!0,children:n})]})}),SQ=k.keyframes`
|
|
564
|
+
from {
|
|
565
|
+
transform: rotate(0deg);
|
|
566
|
+
}
|
|
567
|
+
to {
|
|
568
|
+
transform: rotate(359deg);
|
|
569
|
+
}
|
|
570
|
+
`,AQ=k.styled(V3)`
|
|
571
|
+
animation: ${SQ} 2s infinite linear;
|
|
572
|
+
will-change: transform;
|
|
573
|
+
`,RQ=k.styled(ge)`
|
|
574
|
+
height: ${({theme:t,$size:e})=>t.sizes.button[e]};
|
|
575
|
+
text-decoration: none;
|
|
576
|
+
${L$}
|
|
577
|
+
|
|
578
|
+
&:hover {
|
|
579
|
+
${I$}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
&:active {
|
|
583
|
+
${_$}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
&[aria-disabled='true'] {
|
|
587
|
+
${D$}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
591
|
+
transition:
|
|
592
|
+
${t=>t.theme.transitions.backgroundColor},
|
|
593
|
+
${t=>t.theme.transitions.color},
|
|
594
|
+
border-color ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.easeOutQuad};
|
|
595
|
+
}
|
|
596
|
+
`,um=S.forwardRef(({children:t,description:e,label:n,defaultOpen:r,open:i,onOpenChange:o,delayDuration:s=500,disableHoverableContent:a,...c},f)=>m.jsxs(Pv,{defaultOpen:r,open:i,onOpenChange:o,delayDuration:s,disableHoverableContent:a,children:[m.jsx(Wv,{asChild:!0,children:t}),m.jsx(zv,{children:m.jsx(kQ,{ref:f,sideOffset:8,...c,children:m.jsx(Re,{variant:"pi",fontWeight:"bold",children:n||e})})})]})),kQ=k.styled(Uv)`
|
|
597
|
+
background-color: ${t=>t.theme.colors.neutral900};
|
|
598
|
+
color: ${t=>t.theme.colors.neutral0};
|
|
599
|
+
padding-inline: ${t=>t.theme.spaces[2]};
|
|
600
|
+
padding-block: ${t=>t.theme.spaces[2]};
|
|
601
|
+
border-radius: ${t=>t.theme.borderRadius};
|
|
602
|
+
z-index: ${t=>t.theme.zIndices.tooltip};
|
|
603
|
+
will-change: opacity;
|
|
604
|
+
transform-origin: var(--radix-tooltip-content-transform-origin);
|
|
605
|
+
|
|
606
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
607
|
+
animation: ${mt.fadeIn} ${t=>t.theme.motion.timings[200]}
|
|
608
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
609
|
+
}
|
|
610
|
+
`,cl=nn(({label:t,background:e,children:n,disabled:r=!1,onClick:i,size:o="S",variant:s="tertiary",withTooltip:a=!0,...c},f)=>{const h=p=>{!r&&i&&i(p)},d=m.jsx(Oa,{"aria-disabled":r,background:r?"neutral150":e,tag:"button",display:"inline-flex",justifyContent:"center",hasRadius:!0,cursor:"pointer",...c,ref:f,$size:o,onClick:h,$variant:s,children:m.jsx(Vs,{label:t,children:n})});return a?m.jsx(um,{label:t,children:d}):d}),Oa=k.styled(ge)`
|
|
611
|
+
text-decoration: none;
|
|
612
|
+
|
|
613
|
+
${t=>{switch(t.$size){case"S":return k.css`
|
|
614
|
+
padding-block: 0.7rem;
|
|
615
|
+
padding-inline: 0.7rem;
|
|
616
|
+
`;case"M":return k.css`
|
|
617
|
+
padding-block: 0.9rem;
|
|
618
|
+
padding-inline: 0.9rem;
|
|
619
|
+
`;case"L":return k.css`
|
|
620
|
+
padding-block: 1.1rem;
|
|
621
|
+
padding-inline: 1.1rem;
|
|
622
|
+
`}}}
|
|
623
|
+
${L$}
|
|
624
|
+
${t=>t.$variant==="tertiary"?k.css`
|
|
625
|
+
color: ${t.theme.colors.neutral500};
|
|
626
|
+
`:""}
|
|
627
|
+
|
|
628
|
+
&:hover {
|
|
629
|
+
${I$}
|
|
630
|
+
${t=>t.$variant==="tertiary"?k.css`
|
|
631
|
+
color: ${t.theme.colors.neutral600};
|
|
632
|
+
`:""}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
&:active {
|
|
636
|
+
${_$}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
&[aria-disabled='true'] {
|
|
640
|
+
${D$}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
644
|
+
transition:
|
|
645
|
+
${t=>t.theme.transitions.backgroundColor},
|
|
646
|
+
${t=>t.theme.transitions.color},
|
|
647
|
+
border-color ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.easeOutQuad};
|
|
648
|
+
}
|
|
649
|
+
`,TQ=k.styled(ge)`
|
|
650
|
+
& ${Oa}:first-child {
|
|
651
|
+
border-radius: ${({theme:t})=>`${t.borderRadius} 0 0 ${t.borderRadius}`};
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
& ${Oa}:last-child {
|
|
655
|
+
border-radius: ${({theme:t})=>`0 ${t.borderRadius} ${t.borderRadius} 0`};
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
& ${Oa} {
|
|
659
|
+
border-radius: 0;
|
|
660
|
+
|
|
661
|
+
& + ${Oa} {
|
|
662
|
+
border-left: none;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
`,B$=nn(({children:t,href:e,disabled:n=!1,startIcon:r,endIcon:i,isExternal:o=!1,...s},a)=>m.jsxs(EQ,{ref:a,href:e,disabled:n,isExternal:o,...s,children:[r,m.jsx(Re,{textColor:n?"neutral600":"primary600",children:t}),i,e&&!i&&o&&m.jsx(Z_,{})]})),EQ=k.styled(Dl)`
|
|
666
|
+
display: inline-flex;
|
|
667
|
+
align-items: center;
|
|
668
|
+
text-decoration: none;
|
|
669
|
+
gap: ${({theme:t})=>t.spaces[2]};
|
|
670
|
+
pointer-events: ${({disabled:t})=>t?"none":void 0};
|
|
671
|
+
|
|
672
|
+
svg {
|
|
673
|
+
font-size: 1rem;
|
|
674
|
+
|
|
675
|
+
path {
|
|
676
|
+
fill: ${({disabled:t,theme:e})=>t?e.colors.neutral600:e.colors.primary600};
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
&:hover {
|
|
681
|
+
& > span {
|
|
682
|
+
color: ${({theme:t})=>t.colors.primary500};
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
svg path {
|
|
686
|
+
fill: ${({theme:t})=>t.colors.primary500};
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
&:active {
|
|
691
|
+
color: ${({theme:t})=>t.colors.primary700};
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
${sh};
|
|
695
|
+
`,MQ=dF,OQ=S.forwardRef(({label:t,endIcon:e=m.jsx(Oi,{width:"1.2rem",height:"1.2rem","aria-hidden":!0}),tag:n=bf,icon:r,...i},o)=>{const s={...i,ref:o,type:"button"};return m.jsx(gF,{asChild:!0,disabled:s.disabled,children:n===cl?m.jsx(cl,{label:t,variant:"tertiary",...s,children:r}):m.jsx(bf,{endIcon:e,variant:"ghost",...s})})}),DQ=S.forwardRef(({children:t,intersectionId:e,popoverPlacement:n="bottom-start",...r},i)=>{const[o,s]=n.split("-");return m.jsx(ly,{children:m.jsx(IQ,{align:s,side:o,loop:!0,asChild:!0,children:m.jsxs(N$,{ref:i,direction:"column",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,marginTop:1,marginBottom:1,alignItems:"flex-start",position:"relative",overflow:"auto",...r,children:[t,m.jsx(xe,{id:e,width:"100%",height:"1px"})]})})})}),N$=k.styled(ge)`
|
|
696
|
+
scrollbar-width: none;
|
|
697
|
+
-ms-overflow-style: none;
|
|
698
|
+
-webkit-overflow-scrolling: touch;
|
|
699
|
+
|
|
700
|
+
&::-webkit-scrollbar {
|
|
701
|
+
display: none;
|
|
702
|
+
}
|
|
703
|
+
`,IQ=k.styled(pF)`
|
|
704
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
705
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
706
|
+
|
|
707
|
+
&[data-state='open'] {
|
|
708
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
709
|
+
|
|
710
|
+
&[data-side='top'] {
|
|
711
|
+
animation-name: ${mt.slideUpIn};
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
&[data-side='bottom'] {
|
|
715
|
+
animation-name: ${mt.slideDownIn};
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
`,_Q=({onSelect:t,disabled:e=!1,isLink:n,...r})=>m.jsx(bF,{asChild:!0,onSelect:t,disabled:e,children:n||r.isExternal?m.jsx(LQ,{color:"neutral800",...r,isExternal:r.isExternal??!1,children:m.jsx(Re,{children:r.children})}):m.jsx(F$,{cursor:"pointer",color:"neutral800",background:"transparent",borderStyle:"none",...r,children:m.jsx(Re,{children:r.children})})}),j$=({theme:t})=>k.css`
|
|
720
|
+
text-align: left;
|
|
721
|
+
width: 100%;
|
|
722
|
+
border-radius: ${t.borderRadius};
|
|
723
|
+
padding: ${t.spaces[2]} ${t.spaces[4]};
|
|
724
|
+
|
|
725
|
+
&[aria-disabled='true'] {
|
|
726
|
+
cursor: not-allowed;
|
|
727
|
+
color: ${t.colors.neutral500};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
&[data-highlighted] {
|
|
731
|
+
background-color: ${t.colors.primary100};
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
&:focus-visible {
|
|
735
|
+
outline: none;
|
|
736
|
+
|
|
737
|
+
&:after {
|
|
738
|
+
content: none;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
`,F$=k.styled(ge)`
|
|
742
|
+
${j$}
|
|
743
|
+
`,LQ=k.styled(B$)`
|
|
744
|
+
/* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
|
|
745
|
+
color: ${({theme:t,color:e})=>$u(t.colors,e,void 0)};
|
|
746
|
+
text-decoration: none;
|
|
747
|
+
|
|
748
|
+
&:hover {
|
|
749
|
+
color: unset;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/* TODO: do we need this? */
|
|
753
|
+
svg > path,
|
|
754
|
+
&:focus-visible svg > path {
|
|
755
|
+
fill: currentColor;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
${j$}
|
|
759
|
+
`;S.forwardRef((t,e)=>m.jsx(mF,{asChild:!0,children:m.jsx(BQ,{ref:e,variant:"sigma",textColor:"neutral600",...t})}));const BQ=k.styled(Re)`
|
|
760
|
+
padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
|
|
761
|
+
`;S.forwardRef(({disabled:t=!1,...e},n)=>m.jsx(wF,{asChild:!0,disabled:t,children:m.jsxs(NQ,{ref:n,color:"neutral800",tag:"button",type:"button",background:"transparent",borderStyle:"none",gap:5,...e,children:[m.jsx(Re,{children:e.children}),m.jsx(up,{fill:"neutral500",height:"1.2rem",width:"1.2rem"})]})}));const NQ=k.styled(F$)`
|
|
762
|
+
&[data-state='open'] {
|
|
763
|
+
background-color: ${({theme:t})=>t.colors.primary100};
|
|
764
|
+
}
|
|
765
|
+
`;S.forwardRef((t,e)=>m.jsx(ly,{children:m.jsx(xF,{sideOffset:8,asChild:!0,children:m.jsx(N$,{ref:e,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",overflow:"auto",...t})})}));const jQ=MQ,FQ=OQ,VQ=DQ,HQ=_Q,V$=S.forwardRef(({children:t,onOpen:e,onClose:n,popoverPlacement:r,onReachEnd:i,...o},s)=>{const a=S.useRef(null),c=gn(s,a),f=S.useRef(null),[h,d]=S.useState(!1),p=C=>{i&&i(C)},b=C=>{C&&typeof e=="function"?e():!C&&typeof n=="function"&&n(),d(C)},x=Tn(),v=`intersection-${Hs(x)}`;return Il(f,p,{selectorToWatch:`#${v}`,skipWhen:!h}),m.jsxs(jQ,{onOpenChange:b,children:[m.jsx(FQ,{ref:c,...o,children:o.label}),m.jsx(VQ,{ref:f,intersectionId:v,popoverPlacement:r,children:t})]})}),PQ=HQ,WQ=k.styled(V$)`
|
|
766
|
+
padding: ${({theme:t})=>`${t.spaces[1]} ${t.spaces[2]}`};
|
|
767
|
+
height: unset;
|
|
768
|
+
|
|
769
|
+
:hover,
|
|
770
|
+
:focus {
|
|
771
|
+
background-color: ${({theme:t})=>t.colors.neutral200};
|
|
772
|
+
}
|
|
773
|
+
`,zQ=S.forwardRef(({children:t,...e},n)=>m.jsx(WQ,{ref:n,endIcon:null,size:"S",...e,children:t}));zQ.displayName="CrumbSimpleMenu";const H$=S.createContext({id:""}),UQ=()=>S.useContext(H$);S.forwardRef(({id:t,...e},n)=>{const r=Tn(t),i=S.useMemo(()=>({id:r}),[r]);return m.jsx(H$.Provider,{value:i,children:m.jsx(xe,{ref:n,id:t,tabIndex:0,hasRadius:!0,background:"neutral0",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",shadow:"tableShadow",tag:"article","aria-labelledby":`${r}-title`,...e})})});const qQ=S.forwardRef(({position:t,...e},n)=>m.jsx(KQ,{ref:n,$position:t,...e,direction:"row",gap:2})),KQ=k.styled(ge)`
|
|
774
|
+
position: absolute;
|
|
775
|
+
top: ${({theme:t})=>t.spaces[3]};
|
|
776
|
+
right: ${({$position:t,theme:e})=>{if(t==="end")return e.spaces[3]}};
|
|
777
|
+
left: ${({$position:t,theme:e})=>{if(t==="start")return e.spaces[3]}};
|
|
778
|
+
`;k.styled.img`
|
|
779
|
+
// inline flows is based on typography and displays an extra white space below the image
|
|
780
|
+
// switch to block is required in order to make the img stick the bottom of the container
|
|
781
|
+
// addition infos: https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image
|
|
782
|
+
margin: 0;
|
|
783
|
+
padding: 0;
|
|
784
|
+
max-height: 100%;
|
|
785
|
+
max-width: 100%;
|
|
786
|
+
object-fit: contain;
|
|
787
|
+
`;k.styled.div`
|
|
788
|
+
display: flex;
|
|
789
|
+
justify-content: center;
|
|
790
|
+
height: ${({$size:t})=>t==="S"?"8.8rem":"16.4rem"};
|
|
791
|
+
width: 100%;
|
|
792
|
+
background: repeating-conic-gradient(${({theme:t})=>t.colors.neutral100} 0% 25%, transparent 0% 50%) 50% / 20px
|
|
793
|
+
20px;
|
|
794
|
+
border-top-left-radius: ${({theme:t})=>t.borderRadius};
|
|
795
|
+
border-top-right-radius: ${({theme:t})=>t.borderRadius};
|
|
796
|
+
`;k.styled.div`
|
|
797
|
+
margin-left: auto;
|
|
798
|
+
flex-shrink: 0;
|
|
799
|
+
`;k.styled(sm)`
|
|
800
|
+
margin-left: ${({theme:t})=>t.spaces[1]};
|
|
801
|
+
`;const GQ=({fill:t,...e})=>{const{colors:n}=k.useTheme();return m.jsx(xe,{tag:"svg",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:t?n[t]:void 0,...e,children:m.jsx("path",{d:"M29.0613 10.0613L13.0613 26.0613C12.9219 26.2011 12.7563 26.3121 12.574 26.3878C12.3917 26.4635 12.1962 26.5024 11.9988 26.5024C11.8013 26.5024 11.6059 26.4635 11.4235 26.3878C11.2412 26.3121 11.0756 26.2011 10.9363 26.0613L3.93626 19.0613C3.79673 18.9217 3.68605 18.7561 3.61053 18.5738C3.53502 18.3915 3.49615 18.1961 3.49615 17.9988C3.49615 17.8014 3.53502 17.606 3.61053 17.4237C3.68605 17.2414 3.79673 17.0758 3.93626 16.9363C4.07579 16.7967 4.24143 16.686 4.42374 16.6105C4.60604 16.535 4.80143 16.4962 4.99876 16.4962C5.19608 16.4962 5.39147 16.535 5.57378 16.6105C5.75608 16.686 5.92173 16.7967 6.06126 16.9363L12 22.875L26.9388 7.93876C27.2205 7.65697 27.6027 7.49866 28.0013 7.49866C28.3998 7.49866 28.782 7.65697 29.0638 7.93876C29.3455 8.22055 29.5039 8.60274 29.5039 9.00126C29.5039 9.39977 29.3455 9.78197 29.0638 10.0638L29.0613 10.0613Z"})})},Wx=S.forwardRef(({defaultChecked:t,checked:e,onCheckedChange:n,...r},i)=>{const o=S.useRef(null),[s,a]=Cr({defaultProp:t,prop:e,onChange:n}),c=gn(o,i);return m.jsx(YQ,{ref:c,checked:s,onCheckedChange:a,...r,children:m.jsxs(XQ,{style:{display:"inline-flex",pointerEvents:"auto"},forceMount:!0,children:[s===!0?m.jsx(GQ,{width:"1.6rem",fill:"neutral0"}):null,s==="indeterminate"?m.jsx(sB,{fill:"neutral0"}):null]})})}),YQ=k.styled(kF)`
|
|
802
|
+
background: ${t=>t.theme.colors.neutral0};
|
|
803
|
+
width: 2rem;
|
|
804
|
+
height: 2rem;
|
|
805
|
+
border-radius: ${t=>t.theme.borderRadius};
|
|
806
|
+
border: 1px solid ${t=>t.theme.colors.neutral300};
|
|
807
|
+
position: relative;
|
|
808
|
+
z-index: 0;
|
|
809
|
+
display: flex;
|
|
810
|
+
justify-content: center;
|
|
811
|
+
align-items: center;
|
|
812
|
+
// this ensures the checkbox is always a square even in flex-containers.
|
|
813
|
+
flex: 0 0 2rem;
|
|
814
|
+
|
|
815
|
+
&[data-state='checked'],
|
|
816
|
+
&[data-state='indeterminate'] {
|
|
817
|
+
border: 1px solid ${t=>t.theme.colors.primary600};
|
|
818
|
+
background-color: ${t=>t.theme.colors.primary600};
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
&[data-disabled] {
|
|
822
|
+
background-color: ${t=>t.theme.colors.neutral200};
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
|
|
826
|
+
&::before {
|
|
827
|
+
content: '';
|
|
828
|
+
position: absolute;
|
|
829
|
+
top: 50%;
|
|
830
|
+
left: 50%;
|
|
831
|
+
transform: translate(-50%, -50%);
|
|
832
|
+
width: 100%;
|
|
833
|
+
height: 100%;
|
|
834
|
+
z-index: -1;
|
|
835
|
+
min-width: 44px;
|
|
836
|
+
min-height: 44px;
|
|
837
|
+
}
|
|
838
|
+
`,XQ=k.styled(TF)`
|
|
839
|
+
width: 100%;
|
|
840
|
+
height: 100%;
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
`,ch=S.forwardRef(({children:t,...e},n)=>{const r=Tn(e.id);return t?m.jsxs(ge,{gap:2,children:[m.jsx(Wx,{id:r,...e}),m.jsx(Re,{tag:"label",textColor:"neutral800",htmlFor:r,children:t})]}):m.jsx(Wx,{ref:n,...e})});S.forwardRef((t,e)=>{const{id:n}=UQ();return m.jsx(qQ,{position:"start",children:m.jsx(ch,{"aria-labelledby":`${n}-title`,...t,ref:e})})});k.styled(xe)`
|
|
843
|
+
word-break: break-all;
|
|
844
|
+
`;k.styled(ge)`
|
|
845
|
+
border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
846
|
+
`;const At={DOWN:"ArrowDown",UP:"ArrowUp",RIGHT:"ArrowRight",LEFT:"ArrowLeft",ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",END:"End",HOME:"Home",DELETE:"Delete",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",CLEAR:"Clear"},QQ=k.styled(xe)`
|
|
847
|
+
grid-template-columns: auto 1fr auto;
|
|
848
|
+
grid-template-areas: 'startAction slides endAction';
|
|
849
|
+
`,ZQ=k.styled(ge)`
|
|
850
|
+
grid-area: slides;
|
|
851
|
+
`,zx=k.styled(xe)`
|
|
852
|
+
grid-area: ${({$area:t})=>t};
|
|
853
|
+
|
|
854
|
+
&:focus svg path,
|
|
855
|
+
&:hover svg path {
|
|
856
|
+
fill: ${({theme:t})=>t.colors.neutral900};
|
|
857
|
+
}
|
|
858
|
+
`,JQ=S.forwardRef(({actions:t,children:e,label:n,nextLabel:r,onNext:i,onPrevious:o,previousLabel:s,secondaryLabel:a,selectedSlide:c,...f},h)=>{const d=S.useRef(null),p=S.useRef(null),b=S.Children.map(e,(v,C)=>S.cloneElement(v,{selected:C===c})),x=v=>{switch(v.key){case At.RIGHT:{v.preventDefault(),p?.current&&p.current.focus(),i&&i();break}case At.LEFT:{v.preventDefault(),d?.current&&d.current.focus(),o&&o();break}}};return m.jsx(xe,{ref:h,...f,onKeyDown:x,children:m.jsxs(xe,{padding:2,borderColor:"neutral200",hasRadius:!0,background:"neutral100",children:[m.jsxs(QQ,{tag:"section","aria-roledescription":"carousel","aria-label":n,display:"grid",position:"relative",children:[b&&b.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(zx,{tag:"button",onClick:o,$area:"startAction",ref:d,type:"button",children:m.jsx(Vs,{label:s,children:m.jsx(F3,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})}),m.jsx(zx,{tag:"button",onClick:i,$area:"endAction",ref:p,type:"button",children:m.jsx(Vs,{label:r,children:m.jsx(up,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})})]}),m.jsx(ZQ,{"aria-live":"polite",paddingLeft:2,paddingRight:2,width:"100%",overflow:"hidden",children:b}),t]}),a&&m.jsx(xe,{paddingTop:2,paddingLeft:4,paddingRight:4,children:m.jsx(um,{label:a,children:m.jsx(ge,{justifyContent:"center",children:m.jsx(Re,{variant:"pi",textColor:"neutral600",ellipsis:!0,children:a})})})})]})})}),eZ={accordions:{S:"4.8rem",M:"8.8rem"},button:{S:"3.2rem",M:"3.6rem",L:"4rem"}},P$={sizes:eZ,zIndices:{navigation:100,overlay:300,modal:310,dialog:320,popover:500,notification:700,tooltip:1e3},spaces:["0px","4px","8px","12px","16px","20px","24px","32px","40px","48px","56px","64px"],borderRadius:"4px",breakpoints:{initial:"@media(min-width: 0px)",small:"@media(min-width: 520px)",medium:"@media(min-width: 768px)",large:"@media(min-width: 1080px)"},fontSizes:["1.1rem","1.2rem","1.4rem","1.6rem","1.8rem","3.2rem"],lineHeights:[1.14,1.22,1.25,1.33,1.43,1.45,1.5],fontWeights:{regular:400,semiBold:500,bold:600},transitions:nQ,motion:{easings:ag,timings:lg}},tZ={color:{alternative100:"#f6ecfc",alternative200:"#e0c1f4",alternative500:"#ac73e6",alternative600:"#9736e8",alternative700:"#8312d1",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#fcecea",danger200:"#f5c0b8",danger500:"#ee5e52",danger600:"#d02b20",danger700:"#b72b1a",neutral0:"#ffffff",neutral100:"#f6f6f9",neutral1000:"#181826",neutral150:"#eaeaef",neutral200:"#dcdce4",neutral300:"#c0c0cf",neutral400:"#a5a5ba",neutral500:"#8e8ea9",neutral600:"#666687",neutral700:"#4a4a6a",neutral800:"#32324d",neutral900:"#212134",primary100:"#f0f0ff",primary200:"#d9d8ff",primary500:"#7b79ff",primary600:"#4945ff",primary700:"#271fe0",secondary100:"#eaf5ff",secondary200:"#b8e1ff",secondary500:"#66b7f1",secondary600:"#0c75af",secondary700:"#006096",success100:"#eafbe7",success200:"#c6f0c2",success500:"#5cb176",success600:"#328048",success700:"#2f6846",warning100:"#fdf4dc",warning200:"#fae7b9",warning500:"#f29d41",warning600:"#d9822f",warning700:"#be5d01"}},nZ={shadow:{filterShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"0px 2px 15px rgba(33, 33, 52, 0.1)",tableShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)"}},W$={colors:tZ.color,shadows:nZ.shadow,...P$},rZ={color:{alternative100:"#181826",alternative200:"#4a4a6a",alternative500:"#ac73e6",alternative600:"#ac73e6",alternative700:"#e0c1f4",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#181826",danger200:"#4a4a6a",danger500:"#ee5e52",danger600:"#ee5e52",danger700:"#ee5e52",neutral0:"#212134",neutral100:"#181826",neutral1000:"#ffffff",neutral150:"#32324d",neutral200:"#4a4a6a",neutral300:"#666687",neutral400:"#a5a5ba",neutral500:"#c0c0cf",neutral600:"#a5a5ba",neutral700:"#eaeaef",neutral800:"#ffffff",neutral900:"#ffffff",primary100:"#181826",primary200:"#4a4a6a",primary500:"#4945ff",primary600:"#7b79ff",primary700:"#7b79ff",secondary100:"#181826",secondary200:"#4a4a6a",secondary500:"#66b7f1",secondary600:"#66b7f1",secondary700:"#b8e1ff",success100:"#181826",success200:"#4a4a6a",success500:"#5cb176",success600:"#5cb176",success700:"#c6f0c2",warning100:"#181826",warning200:"#4a4a6a",warning500:"#f29d41",warning600:"#f29d41",warning700:"#fae7b9"}},iZ={shadow:{filterShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",tableShadow:"1px 1px 10px rgba(3, 3, 5, 0.2)"}},oZ={colors:rZ.color,shadows:iZ.shadow,...P$};var $a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wf={exports:{}};/**
|
|
859
|
+
* @license
|
|
860
|
+
* Lodash <https://lodash.com/>
|
|
861
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
862
|
+
* Released under MIT license <https://lodash.com/license>
|
|
863
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
864
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
865
|
+
*/wf.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",d=1,p=2,b=4,x=1,v=2,C=1,$=2,A=4,T=8,M=16,O=32,I=64,_=128,V=256,F=512,H=30,z="...",W=800,Y=16,K=1,te=2,ie=3,ne=1/0,oe=9007199254740991,X=17976931348623157e292,ce=NaN,fe=4294967295,Me=fe-1,we=fe>>>1,Ve=[["ary",_],["bind",C],["bindKey",$],["curry",T],["curryRight",M],["flip",F],["partial",O],["partialRight",I],["rearg",V]],Ne="[object Arguments]",He="[object Array]",pe="[object AsyncFunction]",De="[object Boolean]",ke="[object Date]",Ae="[object DOMException]",_e="[object Error]",ze="[object Function]",Et="[object GeneratorFunction]",Qe="[object Map]",Pe="[object Number]",Yt="[object Null]",ht="[object Object]",Ui="[object Promise]",Js="[object Proxy]",sr="[object RegExp]",xt="[object Set]",ar="[object String]",No="[object Symbol]",ea="[object Undefined]",qi="[object WeakMap]",hh="[object WeakSet]",Ir="[object ArrayBuffer]",vt="[object DataView]",dh="[object Float32Array]",gh="[object Float64Array]",ph="[object Int8Array]",mh="[object Int16Array]",bh="[object Int32Array]",wh="[object Uint8Array]",xh="[object Uint8ClampedArray]",vh="[object Uint16Array]",yh="[object Uint32Array]",x8=/\b__p \+= '';/g,v8=/\b(__p \+=) '' \+/g,y8=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mm=/&(?:amp|lt|gt|quot|#39);/g,bm=/[&<>"']/g,C8=RegExp(mm.source),$8=RegExp(bm.source),S8=/<%-([\s\S]+?)%>/g,A8=/<%([\s\S]+?)%>/g,wm=/<%=([\s\S]+?)%>/g,R8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k8=/^\w*$/,T8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ch=/[\\^$.*+?()[\]{}|]/g,E8=RegExp(Ch.source),$h=/^\s+/,M8=/\s/,O8=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,D8=/\{\n\/\* \[wrapped with (.+)\] \*/,I8=/,? & /,_8=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,L8=/[()=,{}\[\]\/\s]/,B8=/\\(\\)?/g,N8=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xm=/\w*$/,j8=/^[-+]0x[0-9a-f]+$/i,F8=/^0b[01]+$/i,V8=/^\[object .+?Constructor\]$/,H8=/^0o[0-7]+$/i,P8=/^(?:0|[1-9]\d*)$/,W8=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bl=/($^)/,z8=/['\n\r\u2028\u2029\\]/g,Nl="\\ud800-\\udfff",U8="\\u0300-\\u036f",q8="\\ufe20-\\ufe2f",K8="\\u20d0-\\u20ff",vm=U8+q8+K8,ym="\\u2700-\\u27bf",Cm="a-z\\xdf-\\xf6\\xf8-\\xff",G8="\\xac\\xb1\\xd7\\xf7",Y8="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",X8="\\u2000-\\u206f",Q8=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$m="A-Z\\xc0-\\xd6\\xd8-\\xde",Sm="\\ufe0e\\ufe0f",Am=G8+Y8+X8+Q8,Sh="['’]",Z8="["+Nl+"]",Rm="["+Am+"]",jl="["+vm+"]",km="\\d+",J8="["+ym+"]",Tm="["+Cm+"]",Em="[^"+Nl+Am+km+ym+Cm+$m+"]",Ah="\\ud83c[\\udffb-\\udfff]",eS="(?:"+jl+"|"+Ah+")",Mm="[^"+Nl+"]",Rh="(?:\\ud83c[\\udde6-\\uddff]){2}",kh="[\\ud800-\\udbff][\\udc00-\\udfff]",jo="["+$m+"]",Om="\\u200d",Dm="(?:"+Tm+"|"+Em+")",tS="(?:"+jo+"|"+Em+")",Im="(?:"+Sh+"(?:d|ll|m|re|s|t|ve))?",_m="(?:"+Sh+"(?:D|LL|M|RE|S|T|VE))?",Lm=eS+"?",Bm="["+Sm+"]?",nS="(?:"+Om+"(?:"+[Mm,Rh,kh].join("|")+")"+Bm+Lm+")*",rS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Nm=Bm+Lm+nS,oS="(?:"+[J8,Rh,kh].join("|")+")"+Nm,sS="(?:"+[Mm+jl+"?",jl,Rh,kh,Z8].join("|")+")",aS=RegExp(Sh,"g"),lS=RegExp(jl,"g"),Th=RegExp(Ah+"(?="+Ah+")|"+sS+Nm,"g"),cS=RegExp([jo+"?"+Tm+"+"+Im+"(?="+[Rm,jo,"$"].join("|")+")",tS+"+"+_m+"(?="+[Rm,jo+Dm,"$"].join("|")+")",jo+"?"+Dm+"+"+Im,jo+"+"+_m,iS,rS,km,oS].join("|"),"g"),uS=RegExp("["+Om+Nl+vm+Sm+"]"),fS=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hS=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],dS=-1,it={};it[dh]=it[gh]=it[ph]=it[mh]=it[bh]=it[wh]=it[xh]=it[vh]=it[yh]=!0,it[Ne]=it[He]=it[Ir]=it[De]=it[vt]=it[ke]=it[_e]=it[ze]=it[Qe]=it[Pe]=it[ht]=it[sr]=it[xt]=it[ar]=it[qi]=!1;var nt={};nt[Ne]=nt[He]=nt[Ir]=nt[vt]=nt[De]=nt[ke]=nt[dh]=nt[gh]=nt[ph]=nt[mh]=nt[bh]=nt[Qe]=nt[Pe]=nt[ht]=nt[sr]=nt[xt]=nt[ar]=nt[No]=nt[wh]=nt[xh]=nt[vh]=nt[yh]=!0,nt[_e]=nt[ze]=nt[qi]=!1;var gS={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},pS={"&":"&","<":"<",">":">",'"':""","'":"'"},mS={"&":"&","<":"<",">":">",""":'"',"'":"'"},bS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wS=parseFloat,xS=parseInt,jm=typeof $a=="object"&&$a&&$a.Object===Object&&$a,vS=typeof self=="object"&&self&&self.Object===Object&&self,Nt=jm||vS||Function("return this")(),Eh=e&&!e.nodeType&&e,Ki=Eh&&!0&&t&&!t.nodeType&&t,Fm=Ki&&Ki.exports===Eh,Mh=Fm&&jm.process,En=function(){try{var N=Ki&&Ki.require&&Ki.require("util").types;return N||Mh&&Mh.binding&&Mh.binding("util")}catch{}}(),Vm=En&&En.isArrayBuffer,Hm=En&&En.isDate,Pm=En&&En.isMap,Wm=En&&En.isRegExp,zm=En&&En.isSet,Um=En&&En.isTypedArray;function mn(N,G,P){switch(P.length){case 0:return N.call(G);case 1:return N.call(G,P[0]);case 2:return N.call(G,P[0],P[1]);case 3:return N.call(G,P[0],P[1],P[2])}return N.apply(G,P)}function yS(N,G,P,de){for(var Te=-1,Ye=N==null?0:N.length;++Te<Ye;){var $t=N[Te];G(de,$t,P($t),N)}return de}function Mn(N,G){for(var P=-1,de=N==null?0:N.length;++P<de&&G(N[P],P,N)!==!1;);return N}function CS(N,G){for(var P=N==null?0:N.length;P--&&G(N[P],P,N)!==!1;);return N}function qm(N,G){for(var P=-1,de=N==null?0:N.length;++P<de;)if(!G(N[P],P,N))return!1;return!0}function fi(N,G){for(var P=-1,de=N==null?0:N.length,Te=0,Ye=[];++P<de;){var $t=N[P];G($t,P,N)&&(Ye[Te++]=$t)}return Ye}function Fl(N,G){var P=N==null?0:N.length;return!!P&&Fo(N,G,0)>-1}function Oh(N,G,P){for(var de=-1,Te=N==null?0:N.length;++de<Te;)if(P(G,N[de]))return!0;return!1}function at(N,G){for(var P=-1,de=N==null?0:N.length,Te=Array(de);++P<de;)Te[P]=G(N[P],P,N);return Te}function hi(N,G){for(var P=-1,de=G.length,Te=N.length;++P<de;)N[Te+P]=G[P];return N}function Dh(N,G,P,de){var Te=-1,Ye=N==null?0:N.length;for(de&&Ye&&(P=N[++Te]);++Te<Ye;)P=G(P,N[Te],Te,N);return P}function $S(N,G,P,de){var Te=N==null?0:N.length;for(de&&Te&&(P=N[--Te]);Te--;)P=G(P,N[Te],Te,N);return P}function Ih(N,G){for(var P=-1,de=N==null?0:N.length;++P<de;)if(G(N[P],P,N))return!0;return!1}var SS=_h("length");function AS(N){return N.split("")}function RS(N){return N.match(_8)||[]}function Km(N,G,P){var de;return P(N,function(Te,Ye,$t){if(G(Te,Ye,$t))return de=Ye,!1}),de}function Vl(N,G,P,de){for(var Te=N.length,Ye=P+(de?1:-1);de?Ye--:++Ye<Te;)if(G(N[Ye],Ye,N))return Ye;return-1}function Fo(N,G,P){return G===G?jS(N,G,P):Vl(N,Gm,P)}function kS(N,G,P,de){for(var Te=P-1,Ye=N.length;++Te<Ye;)if(de(N[Te],G))return Te;return-1}function Gm(N){return N!==N}function Ym(N,G){var P=N==null?0:N.length;return P?Bh(N,G)/P:ce}function _h(N){return function(G){return G==null?n:G[N]}}function Lh(N){return function(G){return N==null?n:N[G]}}function Xm(N,G,P,de,Te){return Te(N,function(Ye,$t,Je){P=de?(de=!1,Ye):G(P,Ye,$t,Je)}),P}function TS(N,G){var P=N.length;for(N.sort(G);P--;)N[P]=N[P].value;return N}function Bh(N,G){for(var P,de=-1,Te=N.length;++de<Te;){var Ye=G(N[de]);Ye!==n&&(P=P===n?Ye:P+Ye)}return P}function Nh(N,G){for(var P=-1,de=Array(N);++P<N;)de[P]=G(P);return de}function ES(N,G){return at(G,function(P){return[P,N[P]]})}function Qm(N){return N&&N.slice(0,t2(N)+1).replace($h,"")}function bn(N){return function(G){return N(G)}}function jh(N,G){return at(G,function(P){return N[P]})}function ta(N,G){return N.has(G)}function Zm(N,G){for(var P=-1,de=N.length;++P<de&&Fo(G,N[P],0)>-1;);return P}function Jm(N,G){for(var P=N.length;P--&&Fo(G,N[P],0)>-1;);return P}function MS(N,G){for(var P=N.length,de=0;P--;)N[P]===G&&++de;return de}var OS=Lh(gS),DS=Lh(pS);function IS(N){return"\\"+bS[N]}function _S(N,G){return N==null?n:N[G]}function Vo(N){return uS.test(N)}function LS(N){return fS.test(N)}function BS(N){for(var G,P=[];!(G=N.next()).done;)P.push(G.value);return P}function Fh(N){var G=-1,P=Array(N.size);return N.forEach(function(de,Te){P[++G]=[Te,de]}),P}function e2(N,G){return function(P){return N(G(P))}}function di(N,G){for(var P=-1,de=N.length,Te=0,Ye=[];++P<de;){var $t=N[P];($t===G||$t===h)&&(N[P]=h,Ye[Te++]=P)}return Ye}function Hl(N){var G=-1,P=Array(N.size);return N.forEach(function(de){P[++G]=de}),P}function NS(N){var G=-1,P=Array(N.size);return N.forEach(function(de){P[++G]=[de,de]}),P}function jS(N,G,P){for(var de=P-1,Te=N.length;++de<Te;)if(N[de]===G)return de;return-1}function FS(N,G,P){for(var de=P+1;de--;)if(N[de]===G)return de;return de}function Ho(N){return Vo(N)?HS(N):SS(N)}function Wn(N){return Vo(N)?PS(N):AS(N)}function t2(N){for(var G=N.length;G--&&M8.test(N.charAt(G)););return G}var VS=Lh(mS);function HS(N){for(var G=Th.lastIndex=0;Th.test(N);)++G;return G}function PS(N){return N.match(Th)||[]}function WS(N){return N.match(cS)||[]}var zS=function N(G){G=G==null?Nt:Po.defaults(Nt.Object(),G,Po.pick(Nt,hS));var P=G.Array,de=G.Date,Te=G.Error,Ye=G.Function,$t=G.Math,Je=G.Object,Vh=G.RegExp,US=G.String,On=G.TypeError,Pl=P.prototype,qS=Ye.prototype,Wo=Je.prototype,Wl=G["__core-js_shared__"],zl=qS.toString,Ze=Wo.hasOwnProperty,KS=0,n2=function(){var l=/[^.]+$/.exec(Wl&&Wl.keys&&Wl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Ul=Wo.toString,GS=zl.call(Je),YS=Nt._,XS=Vh("^"+zl.call(Ze).replace(Ch,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ql=Fm?G.Buffer:n,gi=G.Symbol,Kl=G.Uint8Array,r2=ql?ql.allocUnsafe:n,Gl=e2(Je.getPrototypeOf,Je),i2=Je.create,o2=Wo.propertyIsEnumerable,Yl=Pl.splice,s2=gi?gi.isConcatSpreadable:n,na=gi?gi.iterator:n,Gi=gi?gi.toStringTag:n,Xl=function(){try{var l=Ji(Je,"defineProperty");return l({},"",{}),l}catch{}}(),QS=G.clearTimeout!==Nt.clearTimeout&&G.clearTimeout,ZS=de&&de.now!==Nt.Date.now&&de.now,JS=G.setTimeout!==Nt.setTimeout&&G.setTimeout,Ql=$t.ceil,Zl=$t.floor,Hh=Je.getOwnPropertySymbols,e7=ql?ql.isBuffer:n,a2=G.isFinite,t7=Pl.join,n7=e2(Je.keys,Je),St=$t.max,Pt=$t.min,r7=de.now,i7=G.parseInt,l2=$t.random,o7=Pl.reverse,Ph=Ji(G,"DataView"),ra=Ji(G,"Map"),Wh=Ji(G,"Promise"),zo=Ji(G,"Set"),ia=Ji(G,"WeakMap"),oa=Ji(Je,"create"),Jl=ia&&new ia,Uo={},s7=eo(Ph),a7=eo(ra),l7=eo(Wh),c7=eo(zo),u7=eo(ia),ec=gi?gi.prototype:n,sa=ec?ec.valueOf:n,c2=ec?ec.toString:n;function E(l){if(ft(l)&&!Oe(l)&&!(l instanceof We)){if(l instanceof Dn)return l;if(Ze.call(l,"__wrapped__"))return ub(l)}return new Dn(l)}var qo=function(){function l(){}return function(u){if(!ct(u))return{};if(i2)return i2(u);l.prototype=u;var g=new l;return l.prototype=n,g}}();function tc(){}function Dn(l,u){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=n}E.templateSettings={escape:S8,evaluate:A8,interpolate:wm,variable:"",imports:{_:E}},E.prototype=tc.prototype,E.prototype.constructor=E,Dn.prototype=qo(tc.prototype),Dn.prototype.constructor=Dn;function We(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fe,this.__views__=[]}function f7(){var l=new We(this.__wrapped__);return l.__actions__=rn(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=rn(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=rn(this.__views__),l}function h7(){if(this.__filtered__){var l=new We(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function d7(){var l=this.__wrapped__.value(),u=this.__dir__,g=Oe(l),y=u<0,R=g?l.length:0,D=A9(0,R,this.__views__),L=D.start,B=D.end,j=B-L,Q=y?B:L-1,Z=this.__iteratees__,ee=Z.length,ae=0,be=Pt(j,this.__takeCount__);if(!g||!y&&R==j&&be==j)return I2(l,this.__actions__);var $e=[];e:for(;j--&&ae<be;){Q+=u;for(var Le=-1,Se=l[Q];++Le<ee;){var Fe=Z[Le],Ue=Fe.iteratee,vn=Fe.type,Zt=Ue(Se);if(vn==te)Se=Zt;else if(!Zt){if(vn==K)continue e;break e}}$e[ae++]=Se}return $e}We.prototype=qo(tc.prototype),We.prototype.constructor=We;function Yi(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var y=l[u];this.set(y[0],y[1])}}function g7(){this.__data__=oa?oa(null):{},this.size=0}function p7(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function m7(l){var u=this.__data__;if(oa){var g=u[l];return g===c?n:g}return Ze.call(u,l)?u[l]:n}function b7(l){var u=this.__data__;return oa?u[l]!==n:Ze.call(u,l)}function w7(l,u){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=oa&&u===n?c:u,this}Yi.prototype.clear=g7,Yi.prototype.delete=p7,Yi.prototype.get=m7,Yi.prototype.has=b7,Yi.prototype.set=w7;function _r(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var y=l[u];this.set(y[0],y[1])}}function x7(){this.__data__=[],this.size=0}function v7(l){var u=this.__data__,g=nc(u,l);if(g<0)return!1;var y=u.length-1;return g==y?u.pop():Yl.call(u,g,1),--this.size,!0}function y7(l){var u=this.__data__,g=nc(u,l);return g<0?n:u[g][1]}function C7(l){return nc(this.__data__,l)>-1}function $7(l,u){var g=this.__data__,y=nc(g,l);return y<0?(++this.size,g.push([l,u])):g[y][1]=u,this}_r.prototype.clear=x7,_r.prototype.delete=v7,_r.prototype.get=y7,_r.prototype.has=C7,_r.prototype.set=$7;function Lr(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var y=l[u];this.set(y[0],y[1])}}function S7(){this.size=0,this.__data__={hash:new Yi,map:new(ra||_r),string:new Yi}}function A7(l){var u=gc(this,l).delete(l);return this.size-=u?1:0,u}function R7(l){return gc(this,l).get(l)}function k7(l){return gc(this,l).has(l)}function T7(l,u){var g=gc(this,l),y=g.size;return g.set(l,u),this.size+=g.size==y?0:1,this}Lr.prototype.clear=S7,Lr.prototype.delete=A7,Lr.prototype.get=R7,Lr.prototype.has=k7,Lr.prototype.set=T7;function Xi(l){var u=-1,g=l==null?0:l.length;for(this.__data__=new Lr;++u<g;)this.add(l[u])}function E7(l){return this.__data__.set(l,c),this}function M7(l){return this.__data__.has(l)}Xi.prototype.add=Xi.prototype.push=E7,Xi.prototype.has=M7;function zn(l){var u=this.__data__=new _r(l);this.size=u.size}function O7(){this.__data__=new _r,this.size=0}function D7(l){var u=this.__data__,g=u.delete(l);return this.size=u.size,g}function I7(l){return this.__data__.get(l)}function _7(l){return this.__data__.has(l)}function L7(l,u){var g=this.__data__;if(g instanceof _r){var y=g.__data__;if(!ra||y.length<i-1)return y.push([l,u]),this.size=++g.size,this;g=this.__data__=new Lr(y)}return g.set(l,u),this.size=g.size,this}zn.prototype.clear=O7,zn.prototype.delete=D7,zn.prototype.get=I7,zn.prototype.has=_7,zn.prototype.set=L7;function u2(l,u){var g=Oe(l),y=!g&&to(l),R=!g&&!y&&xi(l),D=!g&&!y&&!R&&Xo(l),L=g||y||R||D,B=L?Nh(l.length,US):[],j=B.length;for(var Q in l)(u||Ze.call(l,Q))&&!(L&&(Q=="length"||R&&(Q=="offset"||Q=="parent")||D&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||Fr(Q,j)))&&B.push(Q);return B}function f2(l){var u=l.length;return u?l[ed(0,u-1)]:n}function B7(l,u){return pc(rn(l),Qi(u,0,l.length))}function N7(l){return pc(rn(l))}function zh(l,u,g){(g!==n&&!Un(l[u],g)||g===n&&!(u in l))&&Br(l,u,g)}function aa(l,u,g){var y=l[u];(!(Ze.call(l,u)&&Un(y,g))||g===n&&!(u in l))&&Br(l,u,g)}function nc(l,u){for(var g=l.length;g--;)if(Un(l[g][0],u))return g;return-1}function j7(l,u,g,y){return pi(l,function(R,D,L){u(y,R,g(R),L)}),y}function h2(l,u){return l&&cr(u,Mt(u),l)}function F7(l,u){return l&&cr(u,sn(u),l)}function Br(l,u,g){u=="__proto__"&&Xl?Xl(l,u,{configurable:!0,enumerable:!0,value:g,writable:!0}):l[u]=g}function Uh(l,u){for(var g=-1,y=u.length,R=P(y),D=l==null;++g<y;)R[g]=D?n:Ad(l,u[g]);return R}function Qi(l,u,g){return l===l&&(g!==n&&(l=l<=g?l:g),u!==n&&(l=l>=u?l:u)),l}function In(l,u,g,y,R,D){var L,B=u&d,j=u&p,Q=u&b;if(g&&(L=R?g(l,y,R,D):g(l)),L!==n)return L;if(!ct(l))return l;var Z=Oe(l);if(Z){if(L=k9(l),!B)return rn(l,L)}else{var ee=Wt(l),ae=ee==ze||ee==Et;if(xi(l))return B2(l,B);if(ee==ht||ee==Ne||ae&&!R){if(L=j||ae?{}:tb(l),!B)return j?m9(l,F7(L,l)):p9(l,h2(L,l))}else{if(!nt[ee])return R?l:{};L=T9(l,ee,B)}}D||(D=new zn);var be=D.get(l);if(be)return be;D.set(l,L),Mb(l)?l.forEach(function(Se){L.add(In(Se,u,g,Se,l,D))}):Tb(l)&&l.forEach(function(Se,Fe){L.set(Fe,In(Se,u,g,Fe,l,D))});var $e=Q?j?fd:ud:j?sn:Mt,Le=Z?n:$e(l);return Mn(Le||l,function(Se,Fe){Le&&(Fe=Se,Se=l[Fe]),aa(L,Fe,In(Se,u,g,Fe,l,D))}),L}function V7(l){var u=Mt(l);return function(g){return d2(g,l,u)}}function d2(l,u,g){var y=g.length;if(l==null)return!y;for(l=Je(l);y--;){var R=g[y],D=u[R],L=l[R];if(L===n&&!(R in l)||!D(L))return!1}return!0}function g2(l,u,g){if(typeof l!="function")throw new On(s);return ga(function(){l.apply(n,g)},u)}function la(l,u,g,y){var R=-1,D=Fl,L=!0,B=l.length,j=[],Q=u.length;if(!B)return j;g&&(u=at(u,bn(g))),y?(D=Oh,L=!1):u.length>=i&&(D=ta,L=!1,u=new Xi(u));e:for(;++R<B;){var Z=l[R],ee=g==null?Z:g(Z);if(Z=y||Z!==0?Z:0,L&&ee===ee){for(var ae=Q;ae--;)if(u[ae]===ee)continue e;j.push(Z)}else D(u,ee,y)||j.push(Z)}return j}var pi=H2(lr),p2=H2(Kh,!0);function H7(l,u){var g=!0;return pi(l,function(y,R,D){return g=!!u(y,R,D),g}),g}function rc(l,u,g){for(var y=-1,R=l.length;++y<R;){var D=l[y],L=u(D);if(L!=null&&(B===n?L===L&&!xn(L):g(L,B)))var B=L,j=D}return j}function P7(l,u,g,y){var R=l.length;for(g=Ie(g),g<0&&(g=-g>R?0:R+g),y=y===n||y>R?R:Ie(y),y<0&&(y+=R),y=g>y?0:Db(y);g<y;)l[g++]=u;return l}function m2(l,u){var g=[];return pi(l,function(y,R,D){u(y,R,D)&&g.push(y)}),g}function jt(l,u,g,y,R){var D=-1,L=l.length;for(g||(g=M9),R||(R=[]);++D<L;){var B=l[D];u>0&&g(B)?u>1?jt(B,u-1,g,y,R):hi(R,B):y||(R[R.length]=B)}return R}var qh=P2(),b2=P2(!0);function lr(l,u){return l&&qh(l,u,Mt)}function Kh(l,u){return l&&b2(l,u,Mt)}function ic(l,u){return fi(u,function(g){return Vr(l[g])})}function Zi(l,u){u=bi(u,l);for(var g=0,y=u.length;l!=null&&g<y;)l=l[ur(u[g++])];return g&&g==y?l:n}function w2(l,u,g){var y=u(l);return Oe(l)?y:hi(y,g(l))}function Xt(l){return l==null?l===n?ea:Yt:Gi&&Gi in Je(l)?S9(l):N9(l)}function Gh(l,u){return l>u}function W7(l,u){return l!=null&&Ze.call(l,u)}function z7(l,u){return l!=null&&u in Je(l)}function U7(l,u,g){return l>=Pt(u,g)&&l<St(u,g)}function Yh(l,u,g){for(var y=g?Oh:Fl,R=l[0].length,D=l.length,L=D,B=P(D),j=1/0,Q=[];L--;){var Z=l[L];L&&u&&(Z=at(Z,bn(u))),j=Pt(Z.length,j),B[L]=!g&&(u||R>=120&&Z.length>=120)?new Xi(L&&Z):n}Z=l[0];var ee=-1,ae=B[0];e:for(;++ee<R&&Q.length<j;){var be=Z[ee],$e=u?u(be):be;if(be=g||be!==0?be:0,!(ae?ta(ae,$e):y(Q,$e,g))){for(L=D;--L;){var Le=B[L];if(!(Le?ta(Le,$e):y(l[L],$e,g)))continue e}ae&&ae.push($e),Q.push(be)}}return Q}function q7(l,u,g,y){return lr(l,function(R,D,L){u(y,g(R),D,L)}),y}function ca(l,u,g){u=bi(u,l),l=ob(l,u);var y=l==null?l:l[ur(Ln(u))];return y==null?n:mn(y,l,g)}function x2(l){return ft(l)&&Xt(l)==Ne}function K7(l){return ft(l)&&Xt(l)==Ir}function G7(l){return ft(l)&&Xt(l)==ke}function ua(l,u,g,y,R){return l===u?!0:l==null||u==null||!ft(l)&&!ft(u)?l!==l&&u!==u:Y7(l,u,g,y,ua,R)}function Y7(l,u,g,y,R,D){var L=Oe(l),B=Oe(u),j=L?He:Wt(l),Q=B?He:Wt(u);j=j==Ne?ht:j,Q=Q==Ne?ht:Q;var Z=j==ht,ee=Q==ht,ae=j==Q;if(ae&&xi(l)){if(!xi(u))return!1;L=!0,Z=!1}if(ae&&!Z)return D||(D=new zn),L||Xo(l)?Z2(l,u,g,y,R,D):C9(l,u,j,g,y,R,D);if(!(g&x)){var be=Z&&Ze.call(l,"__wrapped__"),$e=ee&&Ze.call(u,"__wrapped__");if(be||$e){var Le=be?l.value():l,Se=$e?u.value():u;return D||(D=new zn),R(Le,Se,g,y,D)}}return ae?(D||(D=new zn),$9(l,u,g,y,R,D)):!1}function X7(l){return ft(l)&&Wt(l)==Qe}function Xh(l,u,g,y){var R=g.length,D=R,L=!y;if(l==null)return!D;for(l=Je(l);R--;){var B=g[R];if(L&&B[2]?B[1]!==l[B[0]]:!(B[0]in l))return!1}for(;++R<D;){B=g[R];var j=B[0],Q=l[j],Z=B[1];if(L&&B[2]){if(Q===n&&!(j in l))return!1}else{var ee=new zn;if(y)var ae=y(Q,Z,j,l,u,ee);if(!(ae===n?ua(Z,Q,x|v,y,ee):ae))return!1}}return!0}function v2(l){if(!ct(l)||D9(l))return!1;var u=Vr(l)?XS:V8;return u.test(eo(l))}function Q7(l){return ft(l)&&Xt(l)==sr}function Z7(l){return ft(l)&&Wt(l)==xt}function J7(l){return ft(l)&&yc(l.length)&&!!it[Xt(l)]}function y2(l){return typeof l=="function"?l:l==null?an:typeof l=="object"?Oe(l)?S2(l[0],l[1]):$2(l):Wb(l)}function Qh(l){if(!da(l))return n7(l);var u=[];for(var g in Je(l))Ze.call(l,g)&&g!="constructor"&&u.push(g);return u}function e9(l){if(!ct(l))return B9(l);var u=da(l),g=[];for(var y in l)y=="constructor"&&(u||!Ze.call(l,y))||g.push(y);return g}function Zh(l,u){return l<u}function C2(l,u){var g=-1,y=on(l)?P(l.length):[];return pi(l,function(R,D,L){y[++g]=u(R,D,L)}),y}function $2(l){var u=dd(l);return u.length==1&&u[0][2]?rb(u[0][0],u[0][1]):function(g){return g===l||Xh(g,l,u)}}function S2(l,u){return pd(l)&&nb(u)?rb(ur(l),u):function(g){var y=Ad(g,l);return y===n&&y===u?Rd(g,l):ua(u,y,x|v)}}function oc(l,u,g,y,R){l!==u&&qh(u,function(D,L){if(R||(R=new zn),ct(D))t9(l,u,L,g,oc,y,R);else{var B=y?y(bd(l,L),D,L+"",l,u,R):n;B===n&&(B=D),zh(l,L,B)}},sn)}function t9(l,u,g,y,R,D,L){var B=bd(l,g),j=bd(u,g),Q=L.get(j);if(Q){zh(l,g,Q);return}var Z=D?D(B,j,g+"",l,u,L):n,ee=Z===n;if(ee){var ae=Oe(j),be=!ae&&xi(j),$e=!ae&&!be&&Xo(j);Z=j,ae||be||$e?Oe(B)?Z=B:dt(B)?Z=rn(B):be?(ee=!1,Z=B2(j,!0)):$e?(ee=!1,Z=N2(j,!0)):Z=[]:pa(j)||to(j)?(Z=B,to(B)?Z=Ib(B):(!ct(B)||Vr(B))&&(Z=tb(j))):ee=!1}ee&&(L.set(j,Z),R(Z,j,y,D,L),L.delete(j)),zh(l,g,Z)}function A2(l,u){var g=l.length;if(g)return u+=u<0?g:0,Fr(u,g)?l[u]:n}function R2(l,u,g){u.length?u=at(u,function(D){return Oe(D)?function(L){return Zi(L,D.length===1?D[0]:D)}:D}):u=[an];var y=-1;u=at(u,bn(Ce()));var R=C2(l,function(D,L,B){var j=at(u,function(Q){return Q(D)});return{criteria:j,index:++y,value:D}});return TS(R,function(D,L){return g9(D,L,g)})}function n9(l,u){return k2(l,u,function(g,y){return Rd(l,y)})}function k2(l,u,g){for(var y=-1,R=u.length,D={};++y<R;){var L=u[y],B=Zi(l,L);g(B,L)&&fa(D,bi(L,l),B)}return D}function r9(l){return function(u){return Zi(u,l)}}function Jh(l,u,g,y){var R=y?kS:Fo,D=-1,L=u.length,B=l;for(l===u&&(u=rn(u)),g&&(B=at(l,bn(g)));++D<L;)for(var j=0,Q=u[D],Z=g?g(Q):Q;(j=R(B,Z,j,y))>-1;)B!==l&&Yl.call(B,j,1),Yl.call(l,j,1);return l}function T2(l,u){for(var g=l?u.length:0,y=g-1;g--;){var R=u[g];if(g==y||R!==D){var D=R;Fr(R)?Yl.call(l,R,1):rd(l,R)}}return l}function ed(l,u){return l+Zl(l2()*(u-l+1))}function i9(l,u,g,y){for(var R=-1,D=St(Ql((u-l)/(g||1)),0),L=P(D);D--;)L[y?D:++R]=l,l+=g;return L}function td(l,u){var g="";if(!l||u<1||u>oe)return g;do u%2&&(g+=l),u=Zl(u/2),u&&(l+=l);while(u);return g}function Be(l,u){return wd(ib(l,u,an),l+"")}function o9(l){return f2(Qo(l))}function s9(l,u){var g=Qo(l);return pc(g,Qi(u,0,g.length))}function fa(l,u,g,y){if(!ct(l))return l;u=bi(u,l);for(var R=-1,D=u.length,L=D-1,B=l;B!=null&&++R<D;){var j=ur(u[R]),Q=g;if(j==="__proto__"||j==="constructor"||j==="prototype")return l;if(R!=L){var Z=B[j];Q=y?y(Z,j,B):n,Q===n&&(Q=ct(Z)?Z:Fr(u[R+1])?[]:{})}aa(B,j,Q),B=B[j]}return l}var E2=Jl?function(l,u){return Jl.set(l,u),l}:an,a9=Xl?function(l,u){return Xl(l,"toString",{configurable:!0,enumerable:!1,value:Td(u),writable:!0})}:an;function l9(l){return pc(Qo(l))}function _n(l,u,g){var y=-1,R=l.length;u<0&&(u=-u>R?0:R+u),g=g>R?R:g,g<0&&(g+=R),R=u>g?0:g-u>>>0,u>>>=0;for(var D=P(R);++y<R;)D[y]=l[y+u];return D}function c9(l,u){var g;return pi(l,function(y,R,D){return g=u(y,R,D),!g}),!!g}function sc(l,u,g){var y=0,R=l==null?y:l.length;if(typeof u=="number"&&u===u&&R<=we){for(;y<R;){var D=y+R>>>1,L=l[D];L!==null&&!xn(L)&&(g?L<=u:L<u)?y=D+1:R=D}return R}return nd(l,u,an,g)}function nd(l,u,g,y){var R=0,D=l==null?0:l.length;if(D===0)return 0;u=g(u);for(var L=u!==u,B=u===null,j=xn(u),Q=u===n;R<D;){var Z=Zl((R+D)/2),ee=g(l[Z]),ae=ee!==n,be=ee===null,$e=ee===ee,Le=xn(ee);if(L)var Se=y||$e;else Q?Se=$e&&(y||ae):B?Se=$e&&ae&&(y||!be):j?Se=$e&&ae&&!be&&(y||!Le):be||Le?Se=!1:Se=y?ee<=u:ee<u;Se?R=Z+1:D=Z}return Pt(D,Me)}function M2(l,u){for(var g=-1,y=l.length,R=0,D=[];++g<y;){var L=l[g],B=u?u(L):L;if(!g||!Un(B,j)){var j=B;D[R++]=L===0?0:L}}return D}function O2(l){return typeof l=="number"?l:xn(l)?ce:+l}function wn(l){if(typeof l=="string")return l;if(Oe(l))return at(l,wn)+"";if(xn(l))return c2?c2.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}function mi(l,u,g){var y=-1,R=Fl,D=l.length,L=!0,B=[],j=B;if(g)L=!1,R=Oh;else if(D>=i){var Q=u?null:v9(l);if(Q)return Hl(Q);L=!1,R=ta,j=new Xi}else j=u?[]:B;e:for(;++y<D;){var Z=l[y],ee=u?u(Z):Z;if(Z=g||Z!==0?Z:0,L&&ee===ee){for(var ae=j.length;ae--;)if(j[ae]===ee)continue e;u&&j.push(ee),B.push(Z)}else R(j,ee,g)||(j!==B&&j.push(ee),B.push(Z))}return B}function rd(l,u){return u=bi(u,l),l=ob(l,u),l==null||delete l[ur(Ln(u))]}function D2(l,u,g,y){return fa(l,u,g(Zi(l,u)),y)}function ac(l,u,g,y){for(var R=l.length,D=y?R:-1;(y?D--:++D<R)&&u(l[D],D,l););return g?_n(l,y?0:D,y?D+1:R):_n(l,y?D+1:0,y?R:D)}function I2(l,u){var g=l;return g instanceof We&&(g=g.value()),Dh(u,function(y,R){return R.func.apply(R.thisArg,hi([y],R.args))},g)}function id(l,u,g){var y=l.length;if(y<2)return y?mi(l[0]):[];for(var R=-1,D=P(y);++R<y;)for(var L=l[R],B=-1;++B<y;)B!=R&&(D[R]=la(D[R]||L,l[B],u,g));return mi(jt(D,1),u,g)}function _2(l,u,g){for(var y=-1,R=l.length,D=u.length,L={};++y<R;){var B=y<D?u[y]:n;g(L,l[y],B)}return L}function od(l){return dt(l)?l:[]}function sd(l){return typeof l=="function"?l:an}function bi(l,u){return Oe(l)?l:pd(l,u)?[l]:cb(Xe(l))}var u9=Be;function wi(l,u,g){var y=l.length;return g=g===n?y:g,!u&&g>=y?l:_n(l,u,g)}var L2=QS||function(l){return Nt.clearTimeout(l)};function B2(l,u){if(u)return l.slice();var g=l.length,y=r2?r2(g):new l.constructor(g);return l.copy(y),y}function ad(l){var u=new l.constructor(l.byteLength);return new Kl(u).set(new Kl(l)),u}function f9(l,u){var g=u?ad(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function h9(l){var u=new l.constructor(l.source,xm.exec(l));return u.lastIndex=l.lastIndex,u}function d9(l){return sa?Je(sa.call(l)):{}}function N2(l,u){var g=u?ad(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function j2(l,u){if(l!==u){var g=l!==n,y=l===null,R=l===l,D=xn(l),L=u!==n,B=u===null,j=u===u,Q=xn(u);if(!B&&!Q&&!D&&l>u||D&&L&&j&&!B&&!Q||y&&L&&j||!g&&j||!R)return 1;if(!y&&!D&&!Q&&l<u||Q&&g&&R&&!y&&!D||B&&g&&R||!L&&R||!j)return-1}return 0}function g9(l,u,g){for(var y=-1,R=l.criteria,D=u.criteria,L=R.length,B=g.length;++y<L;){var j=j2(R[y],D[y]);if(j){if(y>=B)return j;var Q=g[y];return j*(Q=="desc"?-1:1)}}return l.index-u.index}function F2(l,u,g,y){for(var R=-1,D=l.length,L=g.length,B=-1,j=u.length,Q=St(D-L,0),Z=P(j+Q),ee=!y;++B<j;)Z[B]=u[B];for(;++R<L;)(ee||R<D)&&(Z[g[R]]=l[R]);for(;Q--;)Z[B++]=l[R++];return Z}function V2(l,u,g,y){for(var R=-1,D=l.length,L=-1,B=g.length,j=-1,Q=u.length,Z=St(D-B,0),ee=P(Z+Q),ae=!y;++R<Z;)ee[R]=l[R];for(var be=R;++j<Q;)ee[be+j]=u[j];for(;++L<B;)(ae||R<D)&&(ee[be+g[L]]=l[R++]);return ee}function rn(l,u){var g=-1,y=l.length;for(u||(u=P(y));++g<y;)u[g]=l[g];return u}function cr(l,u,g,y){var R=!g;g||(g={});for(var D=-1,L=u.length;++D<L;){var B=u[D],j=y?y(g[B],l[B],B,g,l):n;j===n&&(j=l[B]),R?Br(g,B,j):aa(g,B,j)}return g}function p9(l,u){return cr(l,gd(l),u)}function m9(l,u){return cr(l,J2(l),u)}function lc(l,u){return function(g,y){var R=Oe(g)?yS:j7,D=u?u():{};return R(g,l,Ce(y,2),D)}}function Ko(l){return Be(function(u,g){var y=-1,R=g.length,D=R>1?g[R-1]:n,L=R>2?g[2]:n;for(D=l.length>3&&typeof D=="function"?(R--,D):n,L&&Qt(g[0],g[1],L)&&(D=R<3?n:D,R=1),u=Je(u);++y<R;){var B=g[y];B&&l(u,B,y,D)}return u})}function H2(l,u){return function(g,y){if(g==null)return g;if(!on(g))return l(g,y);for(var R=g.length,D=u?R:-1,L=Je(g);(u?D--:++D<R)&&y(L[D],D,L)!==!1;);return g}}function P2(l){return function(u,g,y){for(var R=-1,D=Je(u),L=y(u),B=L.length;B--;){var j=L[l?B:++R];if(g(D[j],j,D)===!1)break}return u}}function b9(l,u,g){var y=u&C,R=ha(l);function D(){var L=this&&this!==Nt&&this instanceof D?R:l;return L.apply(y?g:this,arguments)}return D}function W2(l){return function(u){u=Xe(u);var g=Vo(u)?Wn(u):n,y=g?g[0]:u.charAt(0),R=g?wi(g,1).join(""):u.slice(1);return y[l]()+R}}function Go(l){return function(u){return Dh(Hb(Vb(u).replace(aS,"")),l,"")}}function ha(l){return function(){var u=arguments;switch(u.length){case 0:return new l;case 1:return new l(u[0]);case 2:return new l(u[0],u[1]);case 3:return new l(u[0],u[1],u[2]);case 4:return new l(u[0],u[1],u[2],u[3]);case 5:return new l(u[0],u[1],u[2],u[3],u[4]);case 6:return new l(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new l(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var g=qo(l.prototype),y=l.apply(g,u);return ct(y)?y:g}}function w9(l,u,g){var y=ha(l);function R(){for(var D=arguments.length,L=P(D),B=D,j=Yo(R);B--;)L[B]=arguments[B];var Q=D<3&&L[0]!==j&&L[D-1]!==j?[]:di(L,j);if(D-=Q.length,D<g)return G2(l,u,cc,R.placeholder,n,L,Q,n,n,g-D);var Z=this&&this!==Nt&&this instanceof R?y:l;return mn(Z,this,L)}return R}function z2(l){return function(u,g,y){var R=Je(u);if(!on(u)){var D=Ce(g,3);u=Mt(u),g=function(B){return D(R[B],B,R)}}var L=l(u,g,y);return L>-1?R[D?u[L]:L]:n}}function U2(l){return jr(function(u){var g=u.length,y=g,R=Dn.prototype.thru;for(l&&u.reverse();y--;){var D=u[y];if(typeof D!="function")throw new On(s);if(R&&!L&&dc(D)=="wrapper")var L=new Dn([],!0)}for(y=L?y:g;++y<g;){D=u[y];var B=dc(D),j=B=="wrapper"?hd(D):n;j&&md(j[0])&&j[1]==(_|T|O|V)&&!j[4].length&&j[9]==1?L=L[dc(j[0])].apply(L,j[3]):L=D.length==1&&md(D)?L[B]():L.thru(D)}return function(){var Q=arguments,Z=Q[0];if(L&&Q.length==1&&Oe(Z))return L.plant(Z).value();for(var ee=0,ae=g?u[ee].apply(this,Q):Z;++ee<g;)ae=u[ee].call(this,ae);return ae}})}function cc(l,u,g,y,R,D,L,B,j,Q){var Z=u&_,ee=u&C,ae=u&$,be=u&(T|M),$e=u&F,Le=ae?n:ha(l);function Se(){for(var Fe=arguments.length,Ue=P(Fe),vn=Fe;vn--;)Ue[vn]=arguments[vn];if(be)var Zt=Yo(Se),yn=MS(Ue,Zt);if(y&&(Ue=F2(Ue,y,R,be)),D&&(Ue=V2(Ue,D,L,be)),Fe-=yn,be&&Fe<Q){var gt=di(Ue,Zt);return G2(l,u,cc,Se.placeholder,g,Ue,gt,B,j,Q-Fe)}var qn=ee?g:this,Pr=ae?qn[l]:l;return Fe=Ue.length,B?Ue=j9(Ue,B):$e&&Fe>1&&Ue.reverse(),Z&&j<Fe&&(Ue.length=j),this&&this!==Nt&&this instanceof Se&&(Pr=Le||ha(Pr)),Pr.apply(qn,Ue)}return Se}function q2(l,u){return function(g,y){return q7(g,l,u(y),{})}}function uc(l,u){return function(g,y){var R;if(g===n&&y===n)return u;if(g!==n&&(R=g),y!==n){if(R===n)return y;typeof g=="string"||typeof y=="string"?(g=wn(g),y=wn(y)):(g=O2(g),y=O2(y)),R=l(g,y)}return R}}function ld(l){return jr(function(u){return u=at(u,bn(Ce())),Be(function(g){var y=this;return l(u,function(R){return mn(R,y,g)})})})}function fc(l,u){u=u===n?" ":wn(u);var g=u.length;if(g<2)return g?td(u,l):u;var y=td(u,Ql(l/Ho(u)));return Vo(u)?wi(Wn(y),0,l).join(""):y.slice(0,l)}function x9(l,u,g,y){var R=u&C,D=ha(l);function L(){for(var B=-1,j=arguments.length,Q=-1,Z=y.length,ee=P(Z+j),ae=this&&this!==Nt&&this instanceof L?D:l;++Q<Z;)ee[Q]=y[Q];for(;j--;)ee[Q++]=arguments[++B];return mn(ae,R?g:this,ee)}return L}function K2(l){return function(u,g,y){return y&&typeof y!="number"&&Qt(u,g,y)&&(g=y=n),u=Hr(u),g===n?(g=u,u=0):g=Hr(g),y=y===n?u<g?1:-1:Hr(y),i9(u,g,y,l)}}function hc(l){return function(u,g){return typeof u=="string"&&typeof g=="string"||(u=Bn(u),g=Bn(g)),l(u,g)}}function G2(l,u,g,y,R,D,L,B,j,Q){var Z=u&T,ee=Z?L:n,ae=Z?n:L,be=Z?D:n,$e=Z?n:D;u|=Z?O:I,u&=~(Z?I:O),u&A||(u&=-4);var Le=[l,u,R,be,ee,$e,ae,B,j,Q],Se=g.apply(n,Le);return md(l)&&sb(Se,Le),Se.placeholder=y,ab(Se,l,u)}function cd(l){var u=$t[l];return function(g,y){if(g=Bn(g),y=y==null?0:Pt(Ie(y),292),y&&a2(g)){var R=(Xe(g)+"e").split("e"),D=u(R[0]+"e"+(+R[1]+y));return R=(Xe(D)+"e").split("e"),+(R[0]+"e"+(+R[1]-y))}return u(g)}}var v9=zo&&1/Hl(new zo([,-0]))[1]==ne?function(l){return new zo(l)}:Od;function Y2(l){return function(u){var g=Wt(u);return g==Qe?Fh(u):g==xt?NS(u):ES(u,l(u))}}function Nr(l,u,g,y,R,D,L,B){var j=u&$;if(!j&&typeof l!="function")throw new On(s);var Q=y?y.length:0;if(Q||(u&=-97,y=R=n),L=L===n?L:St(Ie(L),0),B=B===n?B:Ie(B),Q-=R?R.length:0,u&I){var Z=y,ee=R;y=R=n}var ae=j?n:hd(l),be=[l,u,g,y,R,Z,ee,D,L,B];if(ae&&L9(be,ae),l=be[0],u=be[1],g=be[2],y=be[3],R=be[4],B=be[9]=be[9]===n?j?0:l.length:St(be[9]-Q,0),!B&&u&(T|M)&&(u&=-25),!u||u==C)var $e=b9(l,u,g);else u==T||u==M?$e=w9(l,u,B):(u==O||u==(C|O))&&!R.length?$e=x9(l,u,g,y):$e=cc.apply(n,be);var Le=ae?E2:sb;return ab(Le($e,be),l,u)}function X2(l,u,g,y){return l===n||Un(l,Wo[g])&&!Ze.call(y,g)?u:l}function Q2(l,u,g,y,R,D){return ct(l)&&ct(u)&&(D.set(u,l),oc(l,u,n,Q2,D),D.delete(u)),l}function y9(l){return pa(l)?n:l}function Z2(l,u,g,y,R,D){var L=g&x,B=l.length,j=u.length;if(B!=j&&!(L&&j>B))return!1;var Q=D.get(l),Z=D.get(u);if(Q&&Z)return Q==u&&Z==l;var ee=-1,ae=!0,be=g&v?new Xi:n;for(D.set(l,u),D.set(u,l);++ee<B;){var $e=l[ee],Le=u[ee];if(y)var Se=L?y(Le,$e,ee,u,l,D):y($e,Le,ee,l,u,D);if(Se!==n){if(Se)continue;ae=!1;break}if(be){if(!Ih(u,function(Fe,Ue){if(!ta(be,Ue)&&($e===Fe||R($e,Fe,g,y,D)))return be.push(Ue)})){ae=!1;break}}else if(!($e===Le||R($e,Le,g,y,D))){ae=!1;break}}return D.delete(l),D.delete(u),ae}function C9(l,u,g,y,R,D,L){switch(g){case vt:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case Ir:return!(l.byteLength!=u.byteLength||!D(new Kl(l),new Kl(u)));case De:case ke:case Pe:return Un(+l,+u);case _e:return l.name==u.name&&l.message==u.message;case sr:case ar:return l==u+"";case Qe:var B=Fh;case xt:var j=y&x;if(B||(B=Hl),l.size!=u.size&&!j)return!1;var Q=L.get(l);if(Q)return Q==u;y|=v,L.set(l,u);var Z=Z2(B(l),B(u),y,R,D,L);return L.delete(l),Z;case No:if(sa)return sa.call(l)==sa.call(u)}return!1}function $9(l,u,g,y,R,D){var L=g&x,B=ud(l),j=B.length,Q=ud(u),Z=Q.length;if(j!=Z&&!L)return!1;for(var ee=j;ee--;){var ae=B[ee];if(!(L?ae in u:Ze.call(u,ae)))return!1}var be=D.get(l),$e=D.get(u);if(be&&$e)return be==u&&$e==l;var Le=!0;D.set(l,u),D.set(u,l);for(var Se=L;++ee<j;){ae=B[ee];var Fe=l[ae],Ue=u[ae];if(y)var vn=L?y(Ue,Fe,ae,u,l,D):y(Fe,Ue,ae,l,u,D);if(!(vn===n?Fe===Ue||R(Fe,Ue,g,y,D):vn)){Le=!1;break}Se||(Se=ae=="constructor")}if(Le&&!Se){var Zt=l.constructor,yn=u.constructor;Zt!=yn&&"constructor"in l&&"constructor"in u&&!(typeof Zt=="function"&&Zt instanceof Zt&&typeof yn=="function"&&yn instanceof yn)&&(Le=!1)}return D.delete(l),D.delete(u),Le}function jr(l){return wd(ib(l,n,db),l+"")}function ud(l){return w2(l,Mt,gd)}function fd(l){return w2(l,sn,J2)}var hd=Jl?function(l){return Jl.get(l)}:Od;function dc(l){for(var u=l.name+"",g=Uo[u],y=Ze.call(Uo,u)?g.length:0;y--;){var R=g[y],D=R.func;if(D==null||D==l)return R.name}return u}function Yo(l){var u=Ze.call(E,"placeholder")?E:l;return u.placeholder}function Ce(){var l=E.iteratee||Ed;return l=l===Ed?y2:l,arguments.length?l(arguments[0],arguments[1]):l}function gc(l,u){var g=l.__data__;return O9(u)?g[typeof u=="string"?"string":"hash"]:g.map}function dd(l){for(var u=Mt(l),g=u.length;g--;){var y=u[g],R=l[y];u[g]=[y,R,nb(R)]}return u}function Ji(l,u){var g=_S(l,u);return v2(g)?g:n}function S9(l){var u=Ze.call(l,Gi),g=l[Gi];try{l[Gi]=n;var y=!0}catch{}var R=Ul.call(l);return y&&(u?l[Gi]=g:delete l[Gi]),R}var gd=Hh?function(l){return l==null?[]:(l=Je(l),fi(Hh(l),function(u){return o2.call(l,u)}))}:Dd,J2=Hh?function(l){for(var u=[];l;)hi(u,gd(l)),l=Gl(l);return u}:Dd,Wt=Xt;(Ph&&Wt(new Ph(new ArrayBuffer(1)))!=vt||ra&&Wt(new ra)!=Qe||Wh&&Wt(Wh.resolve())!=Ui||zo&&Wt(new zo)!=xt||ia&&Wt(new ia)!=qi)&&(Wt=function(l){var u=Xt(l),g=u==ht?l.constructor:n,y=g?eo(g):"";if(y)switch(y){case s7:return vt;case a7:return Qe;case l7:return Ui;case c7:return xt;case u7:return qi}return u});function A9(l,u,g){for(var y=-1,R=g.length;++y<R;){var D=g[y],L=D.size;switch(D.type){case"drop":l+=L;break;case"dropRight":u-=L;break;case"take":u=Pt(u,l+L);break;case"takeRight":l=St(l,u-L);break}}return{start:l,end:u}}function R9(l){var u=l.match(D8);return u?u[1].split(I8):[]}function eb(l,u,g){u=bi(u,l);for(var y=-1,R=u.length,D=!1;++y<R;){var L=ur(u[y]);if(!(D=l!=null&&g(l,L)))break;l=l[L]}return D||++y!=R?D:(R=l==null?0:l.length,!!R&&yc(R)&&Fr(L,R)&&(Oe(l)||to(l)))}function k9(l){var u=l.length,g=new l.constructor(u);return u&&typeof l[0]=="string"&&Ze.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function tb(l){return typeof l.constructor=="function"&&!da(l)?qo(Gl(l)):{}}function T9(l,u,g){var y=l.constructor;switch(u){case Ir:return ad(l);case De:case ke:return new y(+l);case vt:return f9(l,g);case dh:case gh:case ph:case mh:case bh:case wh:case xh:case vh:case yh:return N2(l,g);case Qe:return new y;case Pe:case ar:return new y(l);case sr:return h9(l);case xt:return new y;case No:return d9(l)}}function E9(l,u){var g=u.length;if(!g)return l;var y=g-1;return u[y]=(g>1?"& ":"")+u[y],u=u.join(g>2?", ":" "),l.replace(O8,`{
|
|
866
|
+
/* [wrapped with `+u+`] */
|
|
867
|
+
`)}function M9(l){return Oe(l)||to(l)||!!(s2&&l&&l[s2])}function Fr(l,u){var g=typeof l;return u=u??oe,!!u&&(g=="number"||g!="symbol"&&P8.test(l))&&l>-1&&l%1==0&&l<u}function Qt(l,u,g){if(!ct(g))return!1;var y=typeof u;return(y=="number"?on(g)&&Fr(u,g.length):y=="string"&&u in g)?Un(g[u],l):!1}function pd(l,u){if(Oe(l))return!1;var g=typeof l;return g=="number"||g=="symbol"||g=="boolean"||l==null||xn(l)?!0:k8.test(l)||!R8.test(l)||u!=null&&l in Je(u)}function O9(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function md(l){var u=dc(l),g=E[u];if(typeof g!="function"||!(u in We.prototype))return!1;if(l===g)return!0;var y=hd(g);return!!y&&l===y[0]}function D9(l){return!!n2&&n2 in l}var I9=Wl?Vr:Id;function da(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||Wo;return l===g}function nb(l){return l===l&&!ct(l)}function rb(l,u){return function(g){return g==null?!1:g[l]===u&&(u!==n||l in Je(g))}}function _9(l){var u=xc(l,function(y){return g.size===f&&g.clear(),y}),g=u.cache;return u}function L9(l,u){var g=l[1],y=u[1],R=g|y,D=R<(C|$|_),L=y==_&&g==T||y==_&&g==V&&l[7].length<=u[8]||y==(_|V)&&u[7].length<=u[8]&&g==T;if(!(D||L))return l;y&C&&(l[2]=u[2],R|=g&C?0:A);var B=u[3];if(B){var j=l[3];l[3]=j?F2(j,B,u[4]):B,l[4]=j?di(l[3],h):u[4]}return B=u[5],B&&(j=l[5],l[5]=j?V2(j,B,u[6]):B,l[6]=j?di(l[5],h):u[6]),B=u[7],B&&(l[7]=B),y&_&&(l[8]=l[8]==null?u[8]:Pt(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=R,l}function B9(l){var u=[];if(l!=null)for(var g in Je(l))u.push(g);return u}function N9(l){return Ul.call(l)}function ib(l,u,g){return u=St(u===n?l.length-1:u,0),function(){for(var y=arguments,R=-1,D=St(y.length-u,0),L=P(D);++R<D;)L[R]=y[u+R];R=-1;for(var B=P(u+1);++R<u;)B[R]=y[R];return B[u]=g(L),mn(l,this,B)}}function ob(l,u){return u.length<2?l:Zi(l,_n(u,0,-1))}function j9(l,u){for(var g=l.length,y=Pt(u.length,g),R=rn(l);y--;){var D=u[y];l[y]=Fr(D,g)?R[D]:n}return l}function bd(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var sb=lb(E2),ga=JS||function(l,u){return Nt.setTimeout(l,u)},wd=lb(a9);function ab(l,u,g){var y=u+"";return wd(l,E9(y,F9(R9(y),g)))}function lb(l){var u=0,g=0;return function(){var y=r7(),R=Y-(y-g);if(g=y,R>0){if(++u>=W)return arguments[0]}else u=0;return l.apply(n,arguments)}}function pc(l,u){var g=-1,y=l.length,R=y-1;for(u=u===n?y:u;++g<u;){var D=ed(g,R),L=l[D];l[D]=l[g],l[g]=L}return l.length=u,l}var cb=_9(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(T8,function(g,y,R,D){u.push(R?D.replace(B8,"$1"):y||g)}),u});function ur(l){if(typeof l=="string"||xn(l))return l;var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}function eo(l){if(l!=null){try{return zl.call(l)}catch{}try{return l+""}catch{}}return""}function F9(l,u){return Mn(Ve,function(g){var y="_."+g[0];u&g[1]&&!Fl(l,y)&&l.push(y)}),l.sort()}function ub(l){if(l instanceof We)return l.clone();var u=new Dn(l.__wrapped__,l.__chain__);return u.__actions__=rn(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function V9(l,u,g){(g?Qt(l,u,g):u===n)?u=1:u=St(Ie(u),0);var y=l==null?0:l.length;if(!y||u<1)return[];for(var R=0,D=0,L=P(Ql(y/u));R<y;)L[D++]=_n(l,R,R+=u);return L}function H9(l){for(var u=-1,g=l==null?0:l.length,y=0,R=[];++u<g;){var D=l[u];D&&(R[y++]=D)}return R}function P9(){var l=arguments.length;if(!l)return[];for(var u=P(l-1),g=arguments[0],y=l;y--;)u[y-1]=arguments[y];return hi(Oe(g)?rn(g):[g],jt(u,1))}var W9=Be(function(l,u){return dt(l)?la(l,jt(u,1,dt,!0)):[]}),z9=Be(function(l,u){var g=Ln(u);return dt(g)&&(g=n),dt(l)?la(l,jt(u,1,dt,!0),Ce(g,2)):[]}),U9=Be(function(l,u){var g=Ln(u);return dt(g)&&(g=n),dt(l)?la(l,jt(u,1,dt,!0),n,g):[]});function q9(l,u,g){var y=l==null?0:l.length;return y?(u=g||u===n?1:Ie(u),_n(l,u<0?0:u,y)):[]}function K9(l,u,g){var y=l==null?0:l.length;return y?(u=g||u===n?1:Ie(u),u=y-u,_n(l,0,u<0?0:u)):[]}function G9(l,u){return l&&l.length?ac(l,Ce(u,3),!0,!0):[]}function Y9(l,u){return l&&l.length?ac(l,Ce(u,3),!0):[]}function X9(l,u,g,y){var R=l==null?0:l.length;return R?(g&&typeof g!="number"&&Qt(l,u,g)&&(g=0,y=R),P7(l,u,g,y)):[]}function fb(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var R=g==null?0:Ie(g);return R<0&&(R=St(y+R,0)),Vl(l,Ce(u,3),R)}function hb(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var R=y-1;return g!==n&&(R=Ie(g),R=g<0?St(y+R,0):Pt(R,y-1)),Vl(l,Ce(u,3),R,!0)}function db(l){var u=l==null?0:l.length;return u?jt(l,1):[]}function Q9(l){var u=l==null?0:l.length;return u?jt(l,ne):[]}function Z9(l,u){var g=l==null?0:l.length;return g?(u=u===n?1:Ie(u),jt(l,u)):[]}function J9(l){for(var u=-1,g=l==null?0:l.length,y={};++u<g;){var R=l[u];y[R[0]]=R[1]}return y}function gb(l){return l&&l.length?l[0]:n}function eA(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var R=g==null?0:Ie(g);return R<0&&(R=St(y+R,0)),Fo(l,u,R)}function tA(l){var u=l==null?0:l.length;return u?_n(l,0,-1):[]}var nA=Be(function(l){var u=at(l,od);return u.length&&u[0]===l[0]?Yh(u):[]}),rA=Be(function(l){var u=Ln(l),g=at(l,od);return u===Ln(g)?u=n:g.pop(),g.length&&g[0]===l[0]?Yh(g,Ce(u,2)):[]}),iA=Be(function(l){var u=Ln(l),g=at(l,od);return u=typeof u=="function"?u:n,u&&g.pop(),g.length&&g[0]===l[0]?Yh(g,n,u):[]});function oA(l,u){return l==null?"":t7.call(l,u)}function Ln(l){var u=l==null?0:l.length;return u?l[u-1]:n}function sA(l,u,g){var y=l==null?0:l.length;if(!y)return-1;var R=y;return g!==n&&(R=Ie(g),R=R<0?St(y+R,0):Pt(R,y-1)),u===u?FS(l,u,R):Vl(l,Gm,R,!0)}function aA(l,u){return l&&l.length?A2(l,Ie(u)):n}var lA=Be(pb);function pb(l,u){return l&&l.length&&u&&u.length?Jh(l,u):l}function cA(l,u,g){return l&&l.length&&u&&u.length?Jh(l,u,Ce(g,2)):l}function uA(l,u,g){return l&&l.length&&u&&u.length?Jh(l,u,n,g):l}var fA=jr(function(l,u){var g=l==null?0:l.length,y=Uh(l,u);return T2(l,at(u,function(R){return Fr(R,g)?+R:R}).sort(j2)),y});function hA(l,u){var g=[];if(!(l&&l.length))return g;var y=-1,R=[],D=l.length;for(u=Ce(u,3);++y<D;){var L=l[y];u(L,y,l)&&(g.push(L),R.push(y))}return T2(l,R),g}function xd(l){return l==null?l:o7.call(l)}function dA(l,u,g){var y=l==null?0:l.length;return y?(g&&typeof g!="number"&&Qt(l,u,g)?(u=0,g=y):(u=u==null?0:Ie(u),g=g===n?y:Ie(g)),_n(l,u,g)):[]}function gA(l,u){return sc(l,u)}function pA(l,u,g){return nd(l,u,Ce(g,2))}function mA(l,u){var g=l==null?0:l.length;if(g){var y=sc(l,u);if(y<g&&Un(l[y],u))return y}return-1}function bA(l,u){return sc(l,u,!0)}function wA(l,u,g){return nd(l,u,Ce(g,2),!0)}function xA(l,u){var g=l==null?0:l.length;if(g){var y=sc(l,u,!0)-1;if(Un(l[y],u))return y}return-1}function vA(l){return l&&l.length?M2(l):[]}function yA(l,u){return l&&l.length?M2(l,Ce(u,2)):[]}function CA(l){var u=l==null?0:l.length;return u?_n(l,1,u):[]}function $A(l,u,g){return l&&l.length?(u=g||u===n?1:Ie(u),_n(l,0,u<0?0:u)):[]}function SA(l,u,g){var y=l==null?0:l.length;return y?(u=g||u===n?1:Ie(u),u=y-u,_n(l,u<0?0:u,y)):[]}function AA(l,u){return l&&l.length?ac(l,Ce(u,3),!1,!0):[]}function RA(l,u){return l&&l.length?ac(l,Ce(u,3)):[]}var kA=Be(function(l){return mi(jt(l,1,dt,!0))}),TA=Be(function(l){var u=Ln(l);return dt(u)&&(u=n),mi(jt(l,1,dt,!0),Ce(u,2))}),EA=Be(function(l){var u=Ln(l);return u=typeof u=="function"?u:n,mi(jt(l,1,dt,!0),n,u)});function MA(l){return l&&l.length?mi(l):[]}function OA(l,u){return l&&l.length?mi(l,Ce(u,2)):[]}function DA(l,u){return u=typeof u=="function"?u:n,l&&l.length?mi(l,n,u):[]}function vd(l){if(!(l&&l.length))return[];var u=0;return l=fi(l,function(g){if(dt(g))return u=St(g.length,u),!0}),Nh(u,function(g){return at(l,_h(g))})}function mb(l,u){if(!(l&&l.length))return[];var g=vd(l);return u==null?g:at(g,function(y){return mn(u,n,y)})}var IA=Be(function(l,u){return dt(l)?la(l,u):[]}),_A=Be(function(l){return id(fi(l,dt))}),LA=Be(function(l){var u=Ln(l);return dt(u)&&(u=n),id(fi(l,dt),Ce(u,2))}),BA=Be(function(l){var u=Ln(l);return u=typeof u=="function"?u:n,id(fi(l,dt),n,u)}),NA=Be(vd);function jA(l,u){return _2(l||[],u||[],aa)}function FA(l,u){return _2(l||[],u||[],fa)}var VA=Be(function(l){var u=l.length,g=u>1?l[u-1]:n;return g=typeof g=="function"?(l.pop(),g):n,mb(l,g)});function bb(l){var u=E(l);return u.__chain__=!0,u}function HA(l,u){return u(l),l}function mc(l,u){return u(l)}var PA=jr(function(l){var u=l.length,g=u?l[0]:0,y=this.__wrapped__,R=function(D){return Uh(D,l)};return u>1||this.__actions__.length||!(y instanceof We)||!Fr(g)?this.thru(R):(y=y.slice(g,+g+(u?1:0)),y.__actions__.push({func:mc,args:[R],thisArg:n}),new Dn(y,this.__chain__).thru(function(D){return u&&!D.length&&D.push(n),D}))});function WA(){return bb(this)}function zA(){return new Dn(this.value(),this.__chain__)}function UA(){this.__values__===n&&(this.__values__=Ob(this.value()));var l=this.__index__>=this.__values__.length,u=l?n:this.__values__[this.__index__++];return{done:l,value:u}}function qA(){return this}function KA(l){for(var u,g=this;g instanceof tc;){var y=ub(g);y.__index__=0,y.__values__=n,u?R.__wrapped__=y:u=y;var R=y;g=g.__wrapped__}return R.__wrapped__=l,u}function GA(){var l=this.__wrapped__;if(l instanceof We){var u=l;return this.__actions__.length&&(u=new We(this)),u=u.reverse(),u.__actions__.push({func:mc,args:[xd],thisArg:n}),new Dn(u,this.__chain__)}return this.thru(xd)}function YA(){return I2(this.__wrapped__,this.__actions__)}var XA=lc(function(l,u,g){Ze.call(l,g)?++l[g]:Br(l,g,1)});function QA(l,u,g){var y=Oe(l)?qm:H7;return g&&Qt(l,u,g)&&(u=n),y(l,Ce(u,3))}function ZA(l,u){var g=Oe(l)?fi:m2;return g(l,Ce(u,3))}var JA=z2(fb),eR=z2(hb);function tR(l,u){return jt(bc(l,u),1)}function nR(l,u){return jt(bc(l,u),ne)}function rR(l,u,g){return g=g===n?1:Ie(g),jt(bc(l,u),g)}function wb(l,u){var g=Oe(l)?Mn:pi;return g(l,Ce(u,3))}function xb(l,u){var g=Oe(l)?CS:p2;return g(l,Ce(u,3))}var iR=lc(function(l,u,g){Ze.call(l,g)?l[g].push(u):Br(l,g,[u])});function oR(l,u,g,y){l=on(l)?l:Qo(l),g=g&&!y?Ie(g):0;var R=l.length;return g<0&&(g=St(R+g,0)),Cc(l)?g<=R&&l.indexOf(u,g)>-1:!!R&&Fo(l,u,g)>-1}var sR=Be(function(l,u,g){var y=-1,R=typeof u=="function",D=on(l)?P(l.length):[];return pi(l,function(L){D[++y]=R?mn(u,L,g):ca(L,u,g)}),D}),aR=lc(function(l,u,g){Br(l,g,u)});function bc(l,u){var g=Oe(l)?at:C2;return g(l,Ce(u,3))}function lR(l,u,g,y){return l==null?[]:(Oe(u)||(u=u==null?[]:[u]),g=y?n:g,Oe(g)||(g=g==null?[]:[g]),R2(l,u,g))}var cR=lc(function(l,u,g){l[g?0:1].push(u)},function(){return[[],[]]});function uR(l,u,g){var y=Oe(l)?Dh:Xm,R=arguments.length<3;return y(l,Ce(u,4),g,R,pi)}function fR(l,u,g){var y=Oe(l)?$S:Xm,R=arguments.length<3;return y(l,Ce(u,4),g,R,p2)}function hR(l,u){var g=Oe(l)?fi:m2;return g(l,vc(Ce(u,3)))}function dR(l){var u=Oe(l)?f2:o9;return u(l)}function gR(l,u,g){(g?Qt(l,u,g):u===n)?u=1:u=Ie(u);var y=Oe(l)?B7:s9;return y(l,u)}function pR(l){var u=Oe(l)?N7:l9;return u(l)}function mR(l){if(l==null)return 0;if(on(l))return Cc(l)?Ho(l):l.length;var u=Wt(l);return u==Qe||u==xt?l.size:Qh(l).length}function bR(l,u,g){var y=Oe(l)?Ih:c9;return g&&Qt(l,u,g)&&(u=n),y(l,Ce(u,3))}var wR=Be(function(l,u){if(l==null)return[];var g=u.length;return g>1&&Qt(l,u[0],u[1])?u=[]:g>2&&Qt(u[0],u[1],u[2])&&(u=[u[0]]),R2(l,jt(u,1),[])}),wc=ZS||function(){return Nt.Date.now()};function xR(l,u){if(typeof u!="function")throw new On(s);return l=Ie(l),function(){if(--l<1)return u.apply(this,arguments)}}function vb(l,u,g){return u=g?n:u,u=l&&u==null?l.length:u,Nr(l,_,n,n,n,n,u)}function yb(l,u){var g;if(typeof u!="function")throw new On(s);return l=Ie(l),function(){return--l>0&&(g=u.apply(this,arguments)),l<=1&&(u=n),g}}var yd=Be(function(l,u,g){var y=C;if(g.length){var R=di(g,Yo(yd));y|=O}return Nr(l,y,u,g,R)}),Cb=Be(function(l,u,g){var y=C|$;if(g.length){var R=di(g,Yo(Cb));y|=O}return Nr(u,y,l,g,R)});function $b(l,u,g){u=g?n:u;var y=Nr(l,T,n,n,n,n,n,u);return y.placeholder=$b.placeholder,y}function Sb(l,u,g){u=g?n:u;var y=Nr(l,M,n,n,n,n,n,u);return y.placeholder=Sb.placeholder,y}function Ab(l,u,g){var y,R,D,L,B,j,Q=0,Z=!1,ee=!1,ae=!0;if(typeof l!="function")throw new On(s);u=Bn(u)||0,ct(g)&&(Z=!!g.leading,ee="maxWait"in g,D=ee?St(Bn(g.maxWait)||0,u):D,ae="trailing"in g?!!g.trailing:ae);function be(gt){var qn=y,Pr=R;return y=R=n,Q=gt,L=l.apply(Pr,qn),L}function $e(gt){return Q=gt,B=ga(Fe,u),Z?be(gt):L}function Le(gt){var qn=gt-j,Pr=gt-Q,zb=u-qn;return ee?Pt(zb,D-Pr):zb}function Se(gt){var qn=gt-j,Pr=gt-Q;return j===n||qn>=u||qn<0||ee&&Pr>=D}function Fe(){var gt=wc();if(Se(gt))return Ue(gt);B=ga(Fe,Le(gt))}function Ue(gt){return B=n,ae&&y?be(gt):(y=R=n,L)}function vn(){B!==n&&L2(B),Q=0,y=j=R=B=n}function Zt(){return B===n?L:Ue(wc())}function yn(){var gt=wc(),qn=Se(gt);if(y=arguments,R=this,j=gt,qn){if(B===n)return $e(j);if(ee)return L2(B),B=ga(Fe,u),be(j)}return B===n&&(B=ga(Fe,u)),L}return yn.cancel=vn,yn.flush=Zt,yn}var vR=Be(function(l,u){return g2(l,1,u)}),yR=Be(function(l,u,g){return g2(l,Bn(u)||0,g)});function CR(l){return Nr(l,F)}function xc(l,u){if(typeof l!="function"||u!=null&&typeof u!="function")throw new On(s);var g=function(){var y=arguments,R=u?u.apply(this,y):y[0],D=g.cache;if(D.has(R))return D.get(R);var L=l.apply(this,y);return g.cache=D.set(R,L)||D,L};return g.cache=new(xc.Cache||Lr),g}xc.Cache=Lr;function vc(l){if(typeof l!="function")throw new On(s);return function(){var u=arguments;switch(u.length){case 0:return!l.call(this);case 1:return!l.call(this,u[0]);case 2:return!l.call(this,u[0],u[1]);case 3:return!l.call(this,u[0],u[1],u[2])}return!l.apply(this,u)}}function $R(l){return yb(2,l)}var SR=u9(function(l,u){u=u.length==1&&Oe(u[0])?at(u[0],bn(Ce())):at(jt(u,1),bn(Ce()));var g=u.length;return Be(function(y){for(var R=-1,D=Pt(y.length,g);++R<D;)y[R]=u[R].call(this,y[R]);return mn(l,this,y)})}),Cd=Be(function(l,u){var g=di(u,Yo(Cd));return Nr(l,O,n,u,g)}),Rb=Be(function(l,u){var g=di(u,Yo(Rb));return Nr(l,I,n,u,g)}),AR=jr(function(l,u){return Nr(l,V,n,n,n,u)});function RR(l,u){if(typeof l!="function")throw new On(s);return u=u===n?u:Ie(u),Be(l,u)}function kR(l,u){if(typeof l!="function")throw new On(s);return u=u==null?0:St(Ie(u),0),Be(function(g){var y=g[u],R=wi(g,0,u);return y&&hi(R,y),mn(l,this,R)})}function TR(l,u,g){var y=!0,R=!0;if(typeof l!="function")throw new On(s);return ct(g)&&(y="leading"in g?!!g.leading:y,R="trailing"in g?!!g.trailing:R),Ab(l,u,{leading:y,maxWait:u,trailing:R})}function ER(l){return vb(l,1)}function MR(l,u){return Cd(sd(u),l)}function OR(){if(!arguments.length)return[];var l=arguments[0];return Oe(l)?l:[l]}function DR(l){return In(l,b)}function IR(l,u){return u=typeof u=="function"?u:n,In(l,b,u)}function _R(l){return In(l,d|b)}function LR(l,u){return u=typeof u=="function"?u:n,In(l,d|b,u)}function BR(l,u){return u==null||d2(l,u,Mt(u))}function Un(l,u){return l===u||l!==l&&u!==u}var NR=hc(Gh),jR=hc(function(l,u){return l>=u}),to=x2(function(){return arguments}())?x2:function(l){return ft(l)&&Ze.call(l,"callee")&&!o2.call(l,"callee")},Oe=P.isArray,FR=Vm?bn(Vm):K7;function on(l){return l!=null&&yc(l.length)&&!Vr(l)}function dt(l){return ft(l)&&on(l)}function VR(l){return l===!0||l===!1||ft(l)&&Xt(l)==De}var xi=e7||Id,HR=Hm?bn(Hm):G7;function PR(l){return ft(l)&&l.nodeType===1&&!pa(l)}function WR(l){if(l==null)return!0;if(on(l)&&(Oe(l)||typeof l=="string"||typeof l.splice=="function"||xi(l)||Xo(l)||to(l)))return!l.length;var u=Wt(l);if(u==Qe||u==xt)return!l.size;if(da(l))return!Qh(l).length;for(var g in l)if(Ze.call(l,g))return!1;return!0}function zR(l,u){return ua(l,u)}function UR(l,u,g){g=typeof g=="function"?g:n;var y=g?g(l,u):n;return y===n?ua(l,u,n,g):!!y}function $d(l){if(!ft(l))return!1;var u=Xt(l);return u==_e||u==Ae||typeof l.message=="string"&&typeof l.name=="string"&&!pa(l)}function qR(l){return typeof l=="number"&&a2(l)}function Vr(l){if(!ct(l))return!1;var u=Xt(l);return u==ze||u==Et||u==pe||u==Js}function kb(l){return typeof l=="number"&&l==Ie(l)}function yc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=oe}function ct(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function ft(l){return l!=null&&typeof l=="object"}var Tb=Pm?bn(Pm):X7;function KR(l,u){return l===u||Xh(l,u,dd(u))}function GR(l,u,g){return g=typeof g=="function"?g:n,Xh(l,u,dd(u),g)}function YR(l){return Eb(l)&&l!=+l}function XR(l){if(I9(l))throw new Te(o);return v2(l)}function QR(l){return l===null}function ZR(l){return l==null}function Eb(l){return typeof l=="number"||ft(l)&&Xt(l)==Pe}function pa(l){if(!ft(l)||Xt(l)!=ht)return!1;var u=Gl(l);if(u===null)return!0;var g=Ze.call(u,"constructor")&&u.constructor;return typeof g=="function"&&g instanceof g&&zl.call(g)==GS}var Sd=Wm?bn(Wm):Q7;function JR(l){return kb(l)&&l>=-9007199254740991&&l<=oe}var Mb=zm?bn(zm):Z7;function Cc(l){return typeof l=="string"||!Oe(l)&&ft(l)&&Xt(l)==ar}function xn(l){return typeof l=="symbol"||ft(l)&&Xt(l)==No}var Xo=Um?bn(Um):J7;function ek(l){return l===n}function tk(l){return ft(l)&&Wt(l)==qi}function nk(l){return ft(l)&&Xt(l)==hh}var rk=hc(Zh),ik=hc(function(l,u){return l<=u});function Ob(l){if(!l)return[];if(on(l))return Cc(l)?Wn(l):rn(l);if(na&&l[na])return BS(l[na]());var u=Wt(l),g=u==Qe?Fh:u==xt?Hl:Qo;return g(l)}function Hr(l){if(!l)return l===0?l:0;if(l=Bn(l),l===ne||l===-1/0){var u=l<0?-1:1;return u*X}return l===l?l:0}function Ie(l){var u=Hr(l),g=u%1;return u===u?g?u-g:u:0}function Db(l){return l?Qi(Ie(l),0,fe):0}function Bn(l){if(typeof l=="number")return l;if(xn(l))return ce;if(ct(l)){var u=typeof l.valueOf=="function"?l.valueOf():l;l=ct(u)?u+"":u}if(typeof l!="string")return l===0?l:+l;l=Qm(l);var g=F8.test(l);return g||H8.test(l)?xS(l.slice(2),g?2:8):j8.test(l)?ce:+l}function Ib(l){return cr(l,sn(l))}function ok(l){return l?Qi(Ie(l),-9007199254740991,oe):l===0?l:0}function Xe(l){return l==null?"":wn(l)}var sk=Ko(function(l,u){if(da(u)||on(u)){cr(u,Mt(u),l);return}for(var g in u)Ze.call(u,g)&&aa(l,g,u[g])}),_b=Ko(function(l,u){cr(u,sn(u),l)}),$c=Ko(function(l,u,g,y){cr(u,sn(u),l,y)}),ak=Ko(function(l,u,g,y){cr(u,Mt(u),l,y)}),lk=jr(Uh);function ck(l,u){var g=qo(l);return u==null?g:h2(g,u)}var uk=Be(function(l,u){l=Je(l);var g=-1,y=u.length,R=y>2?u[2]:n;for(R&&Qt(u[0],u[1],R)&&(y=1);++g<y;)for(var D=u[g],L=sn(D),B=-1,j=L.length;++B<j;){var Q=L[B],Z=l[Q];(Z===n||Un(Z,Wo[Q])&&!Ze.call(l,Q))&&(l[Q]=D[Q])}return l}),fk=Be(function(l){return l.push(n,Q2),mn(Lb,n,l)});function hk(l,u){return Km(l,Ce(u,3),lr)}function dk(l,u){return Km(l,Ce(u,3),Kh)}function gk(l,u){return l==null?l:qh(l,Ce(u,3),sn)}function pk(l,u){return l==null?l:b2(l,Ce(u,3),sn)}function mk(l,u){return l&&lr(l,Ce(u,3))}function bk(l,u){return l&&Kh(l,Ce(u,3))}function wk(l){return l==null?[]:ic(l,Mt(l))}function xk(l){return l==null?[]:ic(l,sn(l))}function Ad(l,u,g){var y=l==null?n:Zi(l,u);return y===n?g:y}function vk(l,u){return l!=null&&eb(l,u,W7)}function Rd(l,u){return l!=null&&eb(l,u,z7)}var yk=q2(function(l,u,g){u!=null&&typeof u.toString!="function"&&(u=Ul.call(u)),l[u]=g},Td(an)),Ck=q2(function(l,u,g){u!=null&&typeof u.toString!="function"&&(u=Ul.call(u)),Ze.call(l,u)?l[u].push(g):l[u]=[g]},Ce),$k=Be(ca);function Mt(l){return on(l)?u2(l):Qh(l)}function sn(l){return on(l)?u2(l,!0):e9(l)}function Sk(l,u){var g={};return u=Ce(u,3),lr(l,function(y,R,D){Br(g,u(y,R,D),y)}),g}function Ak(l,u){var g={};return u=Ce(u,3),lr(l,function(y,R,D){Br(g,R,u(y,R,D))}),g}var Rk=Ko(function(l,u,g){oc(l,u,g)}),Lb=Ko(function(l,u,g,y){oc(l,u,g,y)}),kk=jr(function(l,u){var g={};if(l==null)return g;var y=!1;u=at(u,function(D){return D=bi(D,l),y||(y=D.length>1),D}),cr(l,fd(l),g),y&&(g=In(g,d|p|b,y9));for(var R=u.length;R--;)rd(g,u[R]);return g});function Tk(l,u){return Bb(l,vc(Ce(u)))}var Ek=jr(function(l,u){return l==null?{}:n9(l,u)});function Bb(l,u){if(l==null)return{};var g=at(fd(l),function(y){return[y]});return u=Ce(u),k2(l,g,function(y,R){return u(y,R[0])})}function Mk(l,u,g){u=bi(u,l);var y=-1,R=u.length;for(R||(R=1,l=n);++y<R;){var D=l==null?n:l[ur(u[y])];D===n&&(y=R,D=g),l=Vr(D)?D.call(l):D}return l}function Ok(l,u,g){return l==null?l:fa(l,u,g)}function Dk(l,u,g,y){return y=typeof y=="function"?y:n,l==null?l:fa(l,u,g,y)}var Nb=Y2(Mt),jb=Y2(sn);function Ik(l,u,g){var y=Oe(l),R=y||xi(l)||Xo(l);if(u=Ce(u,4),g==null){var D=l&&l.constructor;R?g=y?new D:[]:ct(l)?g=Vr(D)?qo(Gl(l)):{}:g={}}return(R?Mn:lr)(l,function(L,B,j){return u(g,L,B,j)}),g}function _k(l,u){return l==null?!0:rd(l,u)}function Lk(l,u,g){return l==null?l:D2(l,u,sd(g))}function Bk(l,u,g,y){return y=typeof y=="function"?y:n,l==null?l:D2(l,u,sd(g),y)}function Qo(l){return l==null?[]:jh(l,Mt(l))}function Nk(l){return l==null?[]:jh(l,sn(l))}function jk(l,u,g){return g===n&&(g=u,u=n),g!==n&&(g=Bn(g),g=g===g?g:0),u!==n&&(u=Bn(u),u=u===u?u:0),Qi(Bn(l),u,g)}function Fk(l,u,g){return u=Hr(u),g===n?(g=u,u=0):g=Hr(g),l=Bn(l),U7(l,u,g)}function Vk(l,u,g){if(g&&typeof g!="boolean"&&Qt(l,u,g)&&(u=g=n),g===n&&(typeof u=="boolean"?(g=u,u=n):typeof l=="boolean"&&(g=l,l=n)),l===n&&u===n?(l=0,u=1):(l=Hr(l),u===n?(u=l,l=0):u=Hr(u)),l>u){var y=l;l=u,u=y}if(g||l%1||u%1){var R=l2();return Pt(l+R*(u-l+wS("1e-"+((R+"").length-1))),u)}return ed(l,u)}var Hk=Go(function(l,u,g){return u=u.toLowerCase(),l+(g?Fb(u):u)});function Fb(l){return kd(Xe(l).toLowerCase())}function Vb(l){return l=Xe(l),l&&l.replace(W8,OS).replace(lS,"")}function Pk(l,u,g){l=Xe(l),u=wn(u);var y=l.length;g=g===n?y:Qi(Ie(g),0,y);var R=g;return g-=u.length,g>=0&&l.slice(g,R)==u}function Wk(l){return l=Xe(l),l&&$8.test(l)?l.replace(bm,DS):l}function zk(l){return l=Xe(l),l&&E8.test(l)?l.replace(Ch,"\\$&"):l}var Uk=Go(function(l,u,g){return l+(g?"-":"")+u.toLowerCase()}),qk=Go(function(l,u,g){return l+(g?" ":"")+u.toLowerCase()}),Kk=W2("toLowerCase");function Gk(l,u,g){l=Xe(l),u=Ie(u);var y=u?Ho(l):0;if(!u||y>=u)return l;var R=(u-y)/2;return fc(Zl(R),g)+l+fc(Ql(R),g)}function Yk(l,u,g){l=Xe(l),u=Ie(u);var y=u?Ho(l):0;return u&&y<u?l+fc(u-y,g):l}function Xk(l,u,g){l=Xe(l),u=Ie(u);var y=u?Ho(l):0;return u&&y<u?fc(u-y,g)+l:l}function Qk(l,u,g){return g||u==null?u=0:u&&(u=+u),i7(Xe(l).replace($h,""),u||0)}function Zk(l,u,g){return(g?Qt(l,u,g):u===n)?u=1:u=Ie(u),td(Xe(l),u)}function Jk(){var l=arguments,u=Xe(l[0]);return l.length<3?u:u.replace(l[1],l[2])}var eT=Go(function(l,u,g){return l+(g?"_":"")+u.toLowerCase()});function tT(l,u,g){return g&&typeof g!="number"&&Qt(l,u,g)&&(u=g=n),g=g===n?fe:g>>>0,g?(l=Xe(l),l&&(typeof u=="string"||u!=null&&!Sd(u))&&(u=wn(u),!u&&Vo(l))?wi(Wn(l),0,g):l.split(u,g)):[]}var nT=Go(function(l,u,g){return l+(g?" ":"")+kd(u)});function rT(l,u,g){return l=Xe(l),g=g==null?0:Qi(Ie(g),0,l.length),u=wn(u),l.slice(g,g+u.length)==u}function iT(l,u,g){var y=E.templateSettings;g&&Qt(l,u,g)&&(u=n),l=Xe(l),u=$c({},u,y,X2);var R=$c({},u.imports,y.imports,X2),D=Mt(R),L=jh(R,D),B,j,Q=0,Z=u.interpolate||Bl,ee="__p += '",ae=Vh((u.escape||Bl).source+"|"+Z.source+"|"+(Z===wm?N8:Bl).source+"|"+(u.evaluate||Bl).source+"|$","g"),be="//# sourceURL="+(Ze.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++dS+"]")+`
|
|
868
|
+
`;l.replace(ae,function(Se,Fe,Ue,vn,Zt,yn){return Ue||(Ue=vn),ee+=l.slice(Q,yn).replace(z8,IS),Fe&&(B=!0,ee+=`' +
|
|
869
|
+
__e(`+Fe+`) +
|
|
870
|
+
'`),Zt&&(j=!0,ee+=`';
|
|
871
|
+
`+Zt+`;
|
|
872
|
+
__p += '`),Ue&&(ee+=`' +
|
|
873
|
+
((__t = (`+Ue+`)) == null ? '' : __t) +
|
|
874
|
+
'`),Q=yn+Se.length,Se}),ee+=`';
|
|
875
|
+
`;var $e=Ze.call(u,"variable")&&u.variable;if(!$e)ee=`with (obj) {
|
|
876
|
+
`+ee+`
|
|
877
|
+
}
|
|
878
|
+
`;else if(L8.test($e))throw new Te(a);ee=(j?ee.replace(x8,""):ee).replace(v8,"$1").replace(y8,"$1;"),ee="function("+($e||"obj")+`) {
|
|
879
|
+
`+($e?"":`obj || (obj = {});
|
|
880
|
+
`)+"var __t, __p = ''"+(B?", __e = _.escape":"")+(j?`, __j = Array.prototype.join;
|
|
881
|
+
function print() { __p += __j.call(arguments, '') }
|
|
882
|
+
`:`;
|
|
883
|
+
`)+ee+`return __p
|
|
884
|
+
}`;var Le=Pb(function(){return Ye(D,be+"return "+ee).apply(n,L)});if(Le.source=ee,$d(Le))throw Le;return Le}function oT(l){return Xe(l).toLowerCase()}function sT(l){return Xe(l).toUpperCase()}function aT(l,u,g){if(l=Xe(l),l&&(g||u===n))return Qm(l);if(!l||!(u=wn(u)))return l;var y=Wn(l),R=Wn(u),D=Zm(y,R),L=Jm(y,R)+1;return wi(y,D,L).join("")}function lT(l,u,g){if(l=Xe(l),l&&(g||u===n))return l.slice(0,t2(l)+1);if(!l||!(u=wn(u)))return l;var y=Wn(l),R=Jm(y,Wn(u))+1;return wi(y,0,R).join("")}function cT(l,u,g){if(l=Xe(l),l&&(g||u===n))return l.replace($h,"");if(!l||!(u=wn(u)))return l;var y=Wn(l),R=Zm(y,Wn(u));return wi(y,R).join("")}function uT(l,u){var g=H,y=z;if(ct(u)){var R="separator"in u?u.separator:R;g="length"in u?Ie(u.length):g,y="omission"in u?wn(u.omission):y}l=Xe(l);var D=l.length;if(Vo(l)){var L=Wn(l);D=L.length}if(g>=D)return l;var B=g-Ho(y);if(B<1)return y;var j=L?wi(L,0,B).join(""):l.slice(0,B);if(R===n)return j+y;if(L&&(B+=j.length-B),Sd(R)){if(l.slice(B).search(R)){var Q,Z=j;for(R.global||(R=Vh(R.source,Xe(xm.exec(R))+"g")),R.lastIndex=0;Q=R.exec(Z);)var ee=Q.index;j=j.slice(0,ee===n?B:ee)}}else if(l.indexOf(wn(R),B)!=B){var ae=j.lastIndexOf(R);ae>-1&&(j=j.slice(0,ae))}return j+y}function fT(l){return l=Xe(l),l&&C8.test(l)?l.replace(mm,VS):l}var hT=Go(function(l,u,g){return l+(g?" ":"")+u.toUpperCase()}),kd=W2("toUpperCase");function Hb(l,u,g){return l=Xe(l),u=g?n:u,u===n?LS(l)?WS(l):RS(l):l.match(u)||[]}var Pb=Be(function(l,u){try{return mn(l,n,u)}catch(g){return $d(g)?g:new Te(g)}}),dT=jr(function(l,u){return Mn(u,function(g){g=ur(g),Br(l,g,yd(l[g],l))}),l});function gT(l){var u=l==null?0:l.length,g=Ce();return l=u?at(l,function(y){if(typeof y[1]!="function")throw new On(s);return[g(y[0]),y[1]]}):[],Be(function(y){for(var R=-1;++R<u;){var D=l[R];if(mn(D[0],this,y))return mn(D[1],this,y)}})}function pT(l){return V7(In(l,d))}function Td(l){return function(){return l}}function mT(l,u){return l==null||l!==l?u:l}var bT=U2(),wT=U2(!0);function an(l){return l}function Ed(l){return y2(typeof l=="function"?l:In(l,d))}function xT(l){return $2(In(l,d))}function vT(l,u){return S2(l,In(u,d))}var yT=Be(function(l,u){return function(g){return ca(g,l,u)}}),CT=Be(function(l,u){return function(g){return ca(l,g,u)}});function Md(l,u,g){var y=Mt(u),R=ic(u,y);g==null&&!(ct(u)&&(R.length||!y.length))&&(g=u,u=l,l=this,R=ic(u,Mt(u)));var D=!(ct(g)&&"chain"in g)||!!g.chain,L=Vr(l);return Mn(R,function(B){var j=u[B];l[B]=j,L&&(l.prototype[B]=function(){var Q=this.__chain__;if(D||Q){var Z=l(this.__wrapped__),ee=Z.__actions__=rn(this.__actions__);return ee.push({func:j,args:arguments,thisArg:l}),Z.__chain__=Q,Z}return j.apply(l,hi([this.value()],arguments))})}),l}function $T(){return Nt._===this&&(Nt._=YS),this}function Od(){}function ST(l){return l=Ie(l),Be(function(u){return A2(u,l)})}var AT=ld(at),RT=ld(qm),kT=ld(Ih);function Wb(l){return pd(l)?_h(ur(l)):r9(l)}function TT(l){return function(u){return l==null?n:Zi(l,u)}}var ET=K2(),MT=K2(!0);function Dd(){return[]}function Id(){return!1}function OT(){return{}}function DT(){return""}function IT(){return!0}function _T(l,u){if(l=Ie(l),l<1||l>oe)return[];var g=fe,y=Pt(l,fe);u=Ce(u),l-=fe;for(var R=Nh(y,u);++g<l;)u(g);return R}function LT(l){return Oe(l)?at(l,ur):xn(l)?[l]:rn(cb(Xe(l)))}function BT(l){var u=++KS;return Xe(l)+u}var NT=uc(function(l,u){return l+u},0),jT=cd("ceil"),FT=uc(function(l,u){return l/u},1),VT=cd("floor");function HT(l){return l&&l.length?rc(l,an,Gh):n}function PT(l,u){return l&&l.length?rc(l,Ce(u,2),Gh):n}function WT(l){return Ym(l,an)}function zT(l,u){return Ym(l,Ce(u,2))}function UT(l){return l&&l.length?rc(l,an,Zh):n}function qT(l,u){return l&&l.length?rc(l,Ce(u,2),Zh):n}var KT=uc(function(l,u){return l*u},1),GT=cd("round"),YT=uc(function(l,u){return l-u},0);function XT(l){return l&&l.length?Bh(l,an):0}function QT(l,u){return l&&l.length?Bh(l,Ce(u,2)):0}return E.after=xR,E.ary=vb,E.assign=sk,E.assignIn=_b,E.assignInWith=$c,E.assignWith=ak,E.at=lk,E.before=yb,E.bind=yd,E.bindAll=dT,E.bindKey=Cb,E.castArray=OR,E.chain=bb,E.chunk=V9,E.compact=H9,E.concat=P9,E.cond=gT,E.conforms=pT,E.constant=Td,E.countBy=XA,E.create=ck,E.curry=$b,E.curryRight=Sb,E.debounce=Ab,E.defaults=uk,E.defaultsDeep=fk,E.defer=vR,E.delay=yR,E.difference=W9,E.differenceBy=z9,E.differenceWith=U9,E.drop=q9,E.dropRight=K9,E.dropRightWhile=G9,E.dropWhile=Y9,E.fill=X9,E.filter=ZA,E.flatMap=tR,E.flatMapDeep=nR,E.flatMapDepth=rR,E.flatten=db,E.flattenDeep=Q9,E.flattenDepth=Z9,E.flip=CR,E.flow=bT,E.flowRight=wT,E.fromPairs=J9,E.functions=wk,E.functionsIn=xk,E.groupBy=iR,E.initial=tA,E.intersection=nA,E.intersectionBy=rA,E.intersectionWith=iA,E.invert=yk,E.invertBy=Ck,E.invokeMap=sR,E.iteratee=Ed,E.keyBy=aR,E.keys=Mt,E.keysIn=sn,E.map=bc,E.mapKeys=Sk,E.mapValues=Ak,E.matches=xT,E.matchesProperty=vT,E.memoize=xc,E.merge=Rk,E.mergeWith=Lb,E.method=yT,E.methodOf=CT,E.mixin=Md,E.negate=vc,E.nthArg=ST,E.omit=kk,E.omitBy=Tk,E.once=$R,E.orderBy=lR,E.over=AT,E.overArgs=SR,E.overEvery=RT,E.overSome=kT,E.partial=Cd,E.partialRight=Rb,E.partition=cR,E.pick=Ek,E.pickBy=Bb,E.property=Wb,E.propertyOf=TT,E.pull=lA,E.pullAll=pb,E.pullAllBy=cA,E.pullAllWith=uA,E.pullAt=fA,E.range=ET,E.rangeRight=MT,E.rearg=AR,E.reject=hR,E.remove=hA,E.rest=RR,E.reverse=xd,E.sampleSize=gR,E.set=Ok,E.setWith=Dk,E.shuffle=pR,E.slice=dA,E.sortBy=wR,E.sortedUniq=vA,E.sortedUniqBy=yA,E.split=tT,E.spread=kR,E.tail=CA,E.take=$A,E.takeRight=SA,E.takeRightWhile=AA,E.takeWhile=RA,E.tap=HA,E.throttle=TR,E.thru=mc,E.toArray=Ob,E.toPairs=Nb,E.toPairsIn=jb,E.toPath=LT,E.toPlainObject=Ib,E.transform=Ik,E.unary=ER,E.union=kA,E.unionBy=TA,E.unionWith=EA,E.uniq=MA,E.uniqBy=OA,E.uniqWith=DA,E.unset=_k,E.unzip=vd,E.unzipWith=mb,E.update=Lk,E.updateWith=Bk,E.values=Qo,E.valuesIn=Nk,E.without=IA,E.words=Hb,E.wrap=MR,E.xor=_A,E.xorBy=LA,E.xorWith=BA,E.zip=NA,E.zipObject=jA,E.zipObjectDeep=FA,E.zipWith=VA,E.entries=Nb,E.entriesIn=jb,E.extend=_b,E.extendWith=$c,Md(E,E),E.add=NT,E.attempt=Pb,E.camelCase=Hk,E.capitalize=Fb,E.ceil=jT,E.clamp=jk,E.clone=DR,E.cloneDeep=_R,E.cloneDeepWith=LR,E.cloneWith=IR,E.conformsTo=BR,E.deburr=Vb,E.defaultTo=mT,E.divide=FT,E.endsWith=Pk,E.eq=Un,E.escape=Wk,E.escapeRegExp=zk,E.every=QA,E.find=JA,E.findIndex=fb,E.findKey=hk,E.findLast=eR,E.findLastIndex=hb,E.findLastKey=dk,E.floor=VT,E.forEach=wb,E.forEachRight=xb,E.forIn=gk,E.forInRight=pk,E.forOwn=mk,E.forOwnRight=bk,E.get=Ad,E.gt=NR,E.gte=jR,E.has=vk,E.hasIn=Rd,E.head=gb,E.identity=an,E.includes=oR,E.indexOf=eA,E.inRange=Fk,E.invoke=$k,E.isArguments=to,E.isArray=Oe,E.isArrayBuffer=FR,E.isArrayLike=on,E.isArrayLikeObject=dt,E.isBoolean=VR,E.isBuffer=xi,E.isDate=HR,E.isElement=PR,E.isEmpty=WR,E.isEqual=zR,E.isEqualWith=UR,E.isError=$d,E.isFinite=qR,E.isFunction=Vr,E.isInteger=kb,E.isLength=yc,E.isMap=Tb,E.isMatch=KR,E.isMatchWith=GR,E.isNaN=YR,E.isNative=XR,E.isNil=ZR,E.isNull=QR,E.isNumber=Eb,E.isObject=ct,E.isObjectLike=ft,E.isPlainObject=pa,E.isRegExp=Sd,E.isSafeInteger=JR,E.isSet=Mb,E.isString=Cc,E.isSymbol=xn,E.isTypedArray=Xo,E.isUndefined=ek,E.isWeakMap=tk,E.isWeakSet=nk,E.join=oA,E.kebabCase=Uk,E.last=Ln,E.lastIndexOf=sA,E.lowerCase=qk,E.lowerFirst=Kk,E.lt=rk,E.lte=ik,E.max=HT,E.maxBy=PT,E.mean=WT,E.meanBy=zT,E.min=UT,E.minBy=qT,E.stubArray=Dd,E.stubFalse=Id,E.stubObject=OT,E.stubString=DT,E.stubTrue=IT,E.multiply=KT,E.nth=aA,E.noConflict=$T,E.noop=Od,E.now=wc,E.pad=Gk,E.padEnd=Yk,E.padStart=Xk,E.parseInt=Qk,E.random=Vk,E.reduce=uR,E.reduceRight=fR,E.repeat=Zk,E.replace=Jk,E.result=Mk,E.round=GT,E.runInContext=N,E.sample=dR,E.size=mR,E.snakeCase=eT,E.some=bR,E.sortedIndex=gA,E.sortedIndexBy=pA,E.sortedIndexOf=mA,E.sortedLastIndex=bA,E.sortedLastIndexBy=wA,E.sortedLastIndexOf=xA,E.startCase=nT,E.startsWith=rT,E.subtract=YT,E.sum=XT,E.sumBy=QT,E.template=iT,E.times=_T,E.toFinite=Hr,E.toInteger=Ie,E.toLength=Db,E.toLower=oT,E.toNumber=Bn,E.toSafeInteger=ok,E.toString=Xe,E.toUpper=sT,E.trim=aT,E.trimEnd=lT,E.trimStart=cT,E.truncate=uT,E.unescape=fT,E.uniqueId=BT,E.upperCase=hT,E.upperFirst=kd,E.each=wb,E.eachRight=xb,E.first=gb,Md(E,function(){var l={};return lr(E,function(u,g){Ze.call(E.prototype,g)||(l[g]=u)}),l}(),{chain:!1}),E.VERSION=r,Mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){E[l].placeholder=E}),Mn(["drop","take"],function(l,u){We.prototype[l]=function(g){g=g===n?1:St(Ie(g),0);var y=this.__filtered__&&!u?new We(this):this.clone();return y.__filtered__?y.__takeCount__=Pt(g,y.__takeCount__):y.__views__.push({size:Pt(g,fe),type:l+(y.__dir__<0?"Right":"")}),y},We.prototype[l+"Right"]=function(g){return this.reverse()[l](g).reverse()}}),Mn(["filter","map","takeWhile"],function(l,u){var g=u+1,y=g==K||g==ie;We.prototype[l]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:Ce(R,3),type:g}),D.__filtered__=D.__filtered__||y,D}}),Mn(["head","last"],function(l,u){var g="take"+(u?"Right":"");We.prototype[l]=function(){return this[g](1).value()[0]}}),Mn(["initial","tail"],function(l,u){var g="drop"+(u?"":"Right");We.prototype[l]=function(){return this.__filtered__?new We(this):this[g](1)}}),We.prototype.compact=function(){return this.filter(an)},We.prototype.find=function(l){return this.filter(l).head()},We.prototype.findLast=function(l){return this.reverse().find(l)},We.prototype.invokeMap=Be(function(l,u){return typeof l=="function"?new We(this):this.map(function(g){return ca(g,l,u)})}),We.prototype.reject=function(l){return this.filter(vc(Ce(l)))},We.prototype.slice=function(l,u){l=Ie(l);var g=this;return g.__filtered__&&(l>0||u<0)?new We(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),u!==n&&(u=Ie(u),g=u<0?g.dropRight(-u):g.take(u-l)),g)},We.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},We.prototype.toArray=function(){return this.take(fe)},lr(We.prototype,function(l,u){var g=/^(?:filter|find|map|reject)|While$/.test(u),y=/^(?:head|last)$/.test(u),R=E[y?"take"+(u=="last"?"Right":""):u],D=y||/^find/.test(u);R&&(E.prototype[u]=function(){var L=this.__wrapped__,B=y?[1]:arguments,j=L instanceof We,Q=B[0],Z=j||Oe(L),ee=function(Fe){var Ue=R.apply(E,hi([Fe],B));return y&&ae?Ue[0]:Ue};Z&&g&&typeof Q=="function"&&Q.length!=1&&(j=Z=!1);var ae=this.__chain__,be=!!this.__actions__.length,$e=D&&!ae,Le=j&&!be;if(!D&&Z){L=Le?L:new We(this);var Se=l.apply(L,B);return Se.__actions__.push({func:mc,args:[ee],thisArg:n}),new Dn(Se,ae)}return $e&&Le?l.apply(this,B):(Se=this.thru(ee),$e?y?Se.value()[0]:Se.value():Se)})}),Mn(["pop","push","shift","sort","splice","unshift"],function(l){var u=Pl[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",y=/^(?:pop|shift)$/.test(l);E.prototype[l]=function(){var R=arguments;if(y&&!this.__chain__){var D=this.value();return u.apply(Oe(D)?D:[],R)}return this[g](function(L){return u.apply(Oe(L)?L:[],R)})}}),lr(We.prototype,function(l,u){var g=E[u];if(g){var y=g.name+"";Ze.call(Uo,y)||(Uo[y]=[]),Uo[y].push({name:u,func:g})}}),Uo[cc(n,$).name]=[{name:"wrapper",func:n}],We.prototype.clone=f7,We.prototype.reverse=h7,We.prototype.value=d7,E.prototype.at=PA,E.prototype.chain=WA,E.prototype.commit=zA,E.prototype.next=UA,E.prototype.plant=KA,E.prototype.reverse=GA,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=YA,E.prototype.first=E.prototype.head,na&&(E.prototype[na]=qA),E},Po=zS();Ki?((Ki.exports=Po)._=Po,Eh._=Po):Nt._=Po}).call($a)})(wf,wf.exports);wf.exports;const zi=(t="&")=>({theme:e,$hasError:n=!1})=>k.css`
|
|
885
|
+
outline: none;
|
|
886
|
+
box-shadow: none;
|
|
887
|
+
transition-property: border-color, box-shadow, fill;
|
|
888
|
+
transition-duration: 0.2s;
|
|
889
|
+
|
|
890
|
+
${t}:focus-within {
|
|
891
|
+
border: 1px solid ${n?e.colors.danger600:e.colors.primary600};
|
|
892
|
+
box-shadow: ${n?e.colors.danger600:e.colors.primary600} 0px 0px 0px 2px;
|
|
893
|
+
}
|
|
894
|
+
`,[sZ,pn]=Ol("Field",{}),To=S.forwardRef(({children:t,name:e,error:n=!1,hint:r,id:i,required:o=!1,...s},a)=>{const c=Tn(i),[f,h]=S.useState();return m.jsx(sZ,{name:e,id:c,error:n,hint:r,required:o,labelNode:f,setLabelNode:h,children:m.jsx(ge,{direction:"column",alignItems:"stretch",gap:1,ref:a,...s,children:t})})}),fm=S.forwardRef(({children:t,action:e,...n},r)=>{const{id:i,required:o,setLabelNode:s}=pn("Label"),a=gn(r,s);return t?m.jsxs(aZ,{ref:a,variant:"pi",textColor:"neutral800",fontWeight:"bold",...n,id:`${i}-label`,htmlFor:i,tag:"label",ellipsis:!0,children:[t,o&&m.jsx(Re,{"aria-hidden":!0,lineHeight:"1em",textColor:"danger600",children:"*"}),e&&m.jsx(lZ,{marginLeft:1,children:e})]}):null}),aZ=k.styled(Re)`
|
|
895
|
+
display: flex;
|
|
896
|
+
`,lZ=k.styled(ge)`
|
|
897
|
+
line-height: 0;
|
|
898
|
+
color: ${({theme:t})=>t.colors.neutral500};
|
|
899
|
+
`,uh=S.forwardRef(({endAction:t,startAction:e,disabled:n=!1,onChange:r,hasError:i,required:o,className:s,size:a="M",...c},f)=>{const{id:h,error:d,hint:p,name:b,required:x}=pn("Input");let v;d?v=`${h}-error`:p&&(v=`${h}-hint`);const C=!!d,$=S.useRef(null),A=S.useRef(null),T=gn(A,f),M=O=>{!n&&r&&r(O)};return S.useLayoutEffect(()=>{if($.current&&A.current){const O=$.current.offsetWidth,I=A.current;if(I){const _=O+8+16;I.style.paddingRight=`${_}px`}}},[t]),m.jsxs(fZ,{gap:2,justifyContent:"space-between",$hasError:C||i,$disabled:n,$size:a,$hasLeftAction:!!e,$hasRightAction:!!t,className:s,children:[e,m.jsx(cZ,{id:h,name:b,ref:T,$size:a,"aria-describedby":v,"aria-invalid":C||i,"aria-disabled":n,disabled:n,"data-disabled":n?"":void 0,onChange:M,"aria-required":x||o,$hasLeftAction:!!e,$hasRightAction:!!t,...c}),t&&m.jsx(uZ,{ref:$,children:t})]})}),cZ=k.styled.input`
|
|
900
|
+
border: none;
|
|
901
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
902
|
+
cursor: ${t=>t["aria-disabled"]?"not-allowed":void 0};
|
|
903
|
+
|
|
904
|
+
color: ${({theme:t})=>t.colors.neutral800};
|
|
905
|
+
font-weight: 400;
|
|
906
|
+
font-size: ${t=>t.theme.fontSizes[2]};
|
|
907
|
+
line-height: 2.2rem;
|
|
908
|
+
display: block;
|
|
909
|
+
width: 100%;
|
|
910
|
+
background: inherit;
|
|
911
|
+
|
|
912
|
+
::placeholder {
|
|
913
|
+
color: ${({theme:t})=>t.colors.neutral500};
|
|
914
|
+
opacity: 1;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
&[aria-disabled='true'] {
|
|
918
|
+
color: inherit;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
//focus managed by InputWrapper
|
|
922
|
+
&:focus {
|
|
923
|
+
outline: none;
|
|
924
|
+
box-shadow: none;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
${t=>{switch(t.$size){case"S":return k.css`
|
|
928
|
+
padding-inline-start: ${t.$hasLeftAction?0:t.theme.spaces[4]};
|
|
929
|
+
padding-inline-end: ${t.$hasRightAction?0:t.theme.spaces[4]};
|
|
930
|
+
padding-block: ${t.theme.spaces[1]};
|
|
931
|
+
`;default:return k.css`
|
|
932
|
+
padding-inline-start: ${t.$hasLeftAction?0:t.theme.spaces[4]};
|
|
933
|
+
padding-inline-end: ${t.$hasRightAction?0:t.theme.spaces[4]};
|
|
934
|
+
padding-block: ${t.theme.spaces[2]};
|
|
935
|
+
`}}}
|
|
936
|
+
`,uZ=k.styled(ge)`
|
|
937
|
+
position: absolute;
|
|
938
|
+
right: ${({theme:t})=>t.spaces[4]};
|
|
939
|
+
top: 50%;
|
|
940
|
+
transform: translateY(-50%);
|
|
941
|
+
`,fZ=k.styled(ge)`
|
|
942
|
+
border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
|
|
943
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
944
|
+
background: ${({theme:t})=>t.colors.neutral0};
|
|
945
|
+
padding-inline-start: ${({$hasLeftAction:t,theme:e})=>t?e.spaces[4]:0};
|
|
946
|
+
position: relative;
|
|
947
|
+
|
|
948
|
+
${zi()}
|
|
949
|
+
${({theme:t,$disabled:e})=>e?k.css`
|
|
950
|
+
color: ${t.colors.neutral600};
|
|
951
|
+
background: ${t.colors.neutral150};
|
|
952
|
+
`:void 0};
|
|
953
|
+
`,z$=()=>{const{id:t,hint:e,error:n}=pn("Hint");return!e||n?null:m.jsx(Re,{variant:"pi",tag:"p",id:`${t}-hint`,textColor:"neutral600",children:e})},U$=()=>{const{id:t,error:e}=pn("Error");return!e||typeof e!="string"?null:m.jsx(Re,{variant:"pi",tag:"p",id:`${t}-error`,textColor:"danger600","data-strapi-field-error":!0,children:e})},q$=S.forwardRef(({label:t,children:e,...n},r)=>m.jsx(hZ,{justifyContent:"unset",background:"transparent",borderStyle:"none",...n,type:"button",tag:"button",ref:r,children:m.jsx(Vs,{label:t,children:e})})),hZ=k.styled(ge)`
|
|
954
|
+
font-size: 1.6rem;
|
|
955
|
+
padding: 0;
|
|
956
|
+
`,dZ=Object.freeze(Object.defineProperty({__proto__:null,Action:q$,Error:U$,Hint:z$,Input:uh,Label:fm,Root:To,useField:pn},Symbol.toStringTag,{value:"Module"}));S.forwardRef(({actions:t,children:e,error:n,hint:r,label:i,labelAction:o,nextLabel:s,onNext:a,onPrevious:c,previousLabel:f,required:h,secondaryLabel:d,selectedSlide:p,id:b,...x},v)=>{const C=Tn(b);return m.jsx(To,{hint:r,error:n,id:C,required:h,children:m.jsxs(ge,{direction:"column",alignItems:"stretch",gap:1,children:[i&&m.jsx(fm,{action:o,children:i}),m.jsx(JQ,{ref:v,actions:t,label:i,nextLabel:s,onNext:a,onPrevious:c,previousLabel:f,secondaryLabel:d,selectedSlide:p,id:C,...x,children:e}),m.jsx(z$,{}),m.jsx(U$,{})]})})});k.styled(xe)`
|
|
957
|
+
${x$}
|
|
958
|
+
`;const gZ="data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e",K$=S.forwardRef(({children:t,small:e=!1,...n},r)=>m.jsxs("div",{role:"alert","aria-live":"assertive",ref:r,...n,children:[m.jsx(Bo,{children:t}),m.jsx(mZ,{src:gZ,"aria-hidden":!0,$small:e})]})),pZ=k.keyframes`
|
|
959
|
+
from {
|
|
960
|
+
transform: rotate(0deg);
|
|
961
|
+
}
|
|
962
|
+
to {
|
|
963
|
+
transform: rotate(359deg);
|
|
964
|
+
}
|
|
965
|
+
`,mZ=k.styled.img`
|
|
966
|
+
animation: ${pZ} 1s infinite linear;
|
|
967
|
+
will-change: transform;
|
|
968
|
+
${({$small:t,theme:e})=>t&&`width: ${e.spaces[6]}; height: ${e.spaces[6]};`}
|
|
969
|
+
`,bZ=S.forwardRef(({allowCustomValue:t,autocomplete:e,children:n,className:r,clearLabel:i="clear",creatable:o=!1,createMessage:s=fe=>`Create "${fe}"`,defaultFilterValue:a,defaultTextValue:c,defaultOpen:f=!1,open:h,onOpenChange:d,disabled:p=!1,hasError:b,id:x,filterValue:v,hasMoreItems:C=!1,isPrintableCharacter:$,loading:A=!1,loadingMessage:T="Loading content...",name:M,noOptionsMessage:O=()=>"No results found",onChange:I,onClear:_,onCreateOption:V,onFilterValueChange:F,onInputChange:H,onTextValueChange:z,onLoadMore:W,placeholder:Y="Select or enter a value",required:K=!1,size:te="M",startIcon:ie,textValue:ne,value:oe,...X},ce)=>{const[fe,Me]=Cr({prop:h,defaultProp:f,onChange:d}),[we,Ve]=Cr({prop:ne,defaultProp:t&&!c?oe:c,onChange:z}),[Ne,He]=Cr({prop:v,defaultProp:a,onChange:F}),pe=S.useRef(null),De=S.useRef(null),ke=gn(De,ce),Ae=S.useRef(null),_e=vt=>{_&&!p&&(Ve(""),He(""),_(vt),De.current.focus())},ze=vt=>{Me(vt)},Et=vt=>{Ve(vt)},Qe=vt=>{He(vt)},Pe=vt=>{H&&H(vt)},Yt=vt=>{I&&I(vt)},ht=vt=>{W&&C&&!A&&W(vt)},Ui=()=>{V&&we&&V(we)},Js=Tn(),sr=`intersection-${Hs(Js)}`;Il(pe,ht,{selectorToWatch:`#${sr}`,skipWhen:!fe});const{error:xt,...ar}=pn("Combobox"),No=!!xt||b,ea=ar.id??x,qi=ar.name??M,hh=ar.required||K;let Ir;return xt?Ir=`${ea}-error`:ar.hint&&(Ir=`${ea}-hint`),m.jsxs(Yn.Root,{autocomplete:e||(o?"list":"both"),onOpenChange:ze,open:fe,onTextValueChange:Et,textValue:we,allowCustomValue:o||t,disabled:p,required:hh,value:oe,onValueChange:Yt,filterValue:Ne,onFilterValueChange:Qe,isPrintableCharacter:$,children:[m.jsxs(xZ,{$hasError:No,$size:te,className:r,children:[m.jsxs(ge,{flex:"1",tag:"span",gap:3,children:[ie?m.jsx(ge,{flex:"0 0 1.6rem",tag:"span","aria-hidden":!0,children:ie}):null,m.jsx(vZ,{placeholder:Y,id:ea,"aria-invalid":!!xt,onChange:Pe,ref:ke,name:qi,"aria-describedby":Ir,...X})]}),m.jsxs(ge,{tag:"span",gap:3,children:[we&&_?m.jsx(wZ,{tag:"button",hasRadius:!0,background:"transparent",type:"button",padding:0,color:"neutral600",borderStyle:"none",onClick:_e,"aria-disabled":p,"aria-label":i,title:i,ref:Ae,children:m.jsx(Hi,{})}):null,m.jsx(yZ,{children:m.jsx(Oi,{fill:"neutral500"})})]})]}),m.jsx(Yn.Portal,{children:m.jsx(CZ,{sideOffset:4,children:m.jsxs($Z,{ref:pe,children:[n,o?m.jsx(Yn.CreateItem,{onPointerUp:Ui,onClick:Ui,asChild:!0,children:m.jsx(ug,{children:m.jsx(Re,{children:s(we??"")})})}):null,!o&&!A?m.jsx(Yn.NoValueFound,{asChild:!0,children:m.jsx(ug,{$hasHover:!1,children:m.jsx(Re,{children:O(we??"")})})}):null,A?m.jsx(ge,{justifyContent:"center",alignItems:"center",paddingTop:2,paddingBottom:2,children:m.jsx(K$,{small:!0,children:T})}):null,m.jsx(xe,{id:sr,width:"100%",height:"1px"})]})})})]})}),wZ=k.styled(xe)`
|
|
970
|
+
padding: 0;
|
|
971
|
+
`,xZ=k.styled(Yn.Trigger)`
|
|
972
|
+
position: relative;
|
|
973
|
+
border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
|
|
974
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
975
|
+
background: ${({theme:t})=>t.colors.neutral0};
|
|
976
|
+
overflow: hidden;
|
|
977
|
+
display: flex;
|
|
978
|
+
align-items: center;
|
|
979
|
+
justify-content: space-between;
|
|
980
|
+
gap: ${({theme:t})=>t.spaces[4]};
|
|
981
|
+
|
|
982
|
+
${t=>{switch(t.$size){case"S":return k.css`
|
|
983
|
+
padding-inline-start: ${({theme:e})=>e.spaces[4]};
|
|
984
|
+
padding-inline-end: ${({theme:e})=>e.spaces[3]};
|
|
985
|
+
padding-block: ${({theme:e})=>e.spaces[1]};
|
|
986
|
+
`;default:return k.css`
|
|
987
|
+
padding-inline-start: ${({theme:e})=>e.spaces[4]};
|
|
988
|
+
padding-inline-end: ${({theme:e})=>e.spaces[3]};
|
|
989
|
+
padding-block: ${({theme:e})=>e.spaces[2]};
|
|
990
|
+
`}}}
|
|
991
|
+
|
|
992
|
+
&[data-disabled] {
|
|
993
|
+
color: ${({theme:t})=>t.colors.neutral600};
|
|
994
|
+
background: ${({theme:t})=>t.colors.neutral150};
|
|
995
|
+
cursor: not-allowed;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/* Required to ensure the below inputFocusStyles are adhered too */
|
|
999
|
+
&:focus-visible {
|
|
1000
|
+
outline: none;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
${({theme:t,$hasError:e})=>zi()({theme:t,$hasError:e})};
|
|
1004
|
+
`,vZ=k.styled(Yn.TextInput)`
|
|
1005
|
+
width: 100%;
|
|
1006
|
+
font-size: 1.4rem;
|
|
1007
|
+
line-height: 2.2rem;
|
|
1008
|
+
color: ${({theme:t})=>t.colors.neutral800};
|
|
1009
|
+
padding: 0;
|
|
1010
|
+
border: none;
|
|
1011
|
+
background-color: transparent;
|
|
1012
|
+
|
|
1013
|
+
&:focus-visible {
|
|
1014
|
+
outline: none;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
&[aria-disabled='true'] {
|
|
1018
|
+
cursor: inherit;
|
|
1019
|
+
}
|
|
1020
|
+
`,yZ=k.styled(Yn.Icon)`
|
|
1021
|
+
border: none;
|
|
1022
|
+
background: transparent;
|
|
1023
|
+
padding: 0;
|
|
1024
|
+
color: ${({theme:t})=>t.colors.neutral600};
|
|
1025
|
+
display: flex;
|
|
1026
|
+
|
|
1027
|
+
&[aria-disabled='true'] {
|
|
1028
|
+
cursor: inherit;
|
|
1029
|
+
}
|
|
1030
|
+
`,CZ=k.styled(Yn.Content)`
|
|
1031
|
+
background: ${({theme:t})=>t.colors.neutral0};
|
|
1032
|
+
box-shadow: ${({theme:t})=>t.shadows.filterShadow};
|
|
1033
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
1034
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1035
|
+
width: var(--radix-combobox-trigger-width);
|
|
1036
|
+
/* This is from the design-system figma file. */
|
|
1037
|
+
max-height: 15rem;
|
|
1038
|
+
z-index: ${({theme:t})=>t.zIndices.popover};
|
|
1039
|
+
|
|
1040
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1041
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
1042
|
+
|
|
1043
|
+
/* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */
|
|
1044
|
+
&[data-state='open'] {
|
|
1045
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
1046
|
+
|
|
1047
|
+
&[data-side='top'] {
|
|
1048
|
+
animation-name: ${mt.slideUpIn};
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
&[data-side='bottom'] {
|
|
1052
|
+
animation-name: ${mt.slideDownIn};
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
`,$Z=k.styled(Yn.Viewport)`
|
|
1057
|
+
padding: ${({theme:t})=>t.spaces[1]};
|
|
1058
|
+
`,SZ=S.forwardRef(({children:t,value:e,disabled:n,textValue:r,...i},o)=>m.jsx(Yn.ComboboxItem,{asChild:!0,value:e,disabled:n,textValue:r,children:m.jsx(ug,{ref:o,...i,children:m.jsx(Yn.ItemText,{asChild:!0,children:m.jsx(Re,{children:t})})})})),ug=k.styled.div`
|
|
1059
|
+
width: 100%;
|
|
1060
|
+
border: none;
|
|
1061
|
+
text-align: left;
|
|
1062
|
+
outline-offset: -3px;
|
|
1063
|
+
padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
|
|
1064
|
+
background-color: ${({theme:t})=>t.colors.neutral0};
|
|
1065
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1066
|
+
user-select: none;
|
|
1067
|
+
|
|
1068
|
+
&[data-state='checked'] {
|
|
1069
|
+
background-color: ${({theme:t})=>t.colors.primary100};
|
|
1070
|
+
color: ${({theme:t})=>t.colors.primary600};
|
|
1071
|
+
font-weight: bold;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
&:hover,
|
|
1075
|
+
&[data-highlighted] {
|
|
1076
|
+
outline: none;
|
|
1077
|
+
background-color: ${({theme:t,$hasHover:e=!0})=>e?t.colors.primary100:t.colors.neutral0};
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
&[data-highlighted] {
|
|
1081
|
+
color: ${({theme:t})=>t.colors.primary600};
|
|
1082
|
+
font-weight: bold;
|
|
1083
|
+
}
|
|
1084
|
+
`,AZ=cV,RZ=S.forwardRef((t,e)=>m.jsx(uV,{...t,asChild:!0,ref:e})),kZ=S.forwardRef((t,e)=>m.jsxs(fV,{children:[m.jsx(TZ,{}),m.jsx(EZ,{ref:e,...t})]})),TZ=k.styled(hV)`
|
|
1085
|
+
background-color: ${t=>t.theme.colors.neutral800};
|
|
1086
|
+
position: fixed;
|
|
1087
|
+
inset: 0;
|
|
1088
|
+
z-index: ${t=>t.theme.zIndices.overlay};
|
|
1089
|
+
opacity: 0.2;
|
|
1090
|
+
|
|
1091
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1092
|
+
animation: ${mt.overlayFadeIn} ${t=>t.theme.motion.timings[200]}
|
|
1093
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
1094
|
+
}
|
|
1095
|
+
`,EZ=k.styled(dV)`
|
|
1096
|
+
max-width: 42rem;
|
|
1097
|
+
height: min-content;
|
|
1098
|
+
width: 100%;
|
|
1099
|
+
overflow: hidden;
|
|
1100
|
+
margin: 0 auto;
|
|
1101
|
+
display: flex;
|
|
1102
|
+
flex-direction: column;
|
|
1103
|
+
|
|
1104
|
+
position: fixed;
|
|
1105
|
+
top: 50%;
|
|
1106
|
+
left: 50%;
|
|
1107
|
+
transform: translate(-50%, -50%);
|
|
1108
|
+
|
|
1109
|
+
border-radius: ${t=>t.theme.borderRadius};
|
|
1110
|
+
background-color: ${t=>t.theme.colors.neutral0};
|
|
1111
|
+
box-shadow: ${t=>t.theme.shadows.popupShadow};
|
|
1112
|
+
z-index: ${t=>t.theme.zIndices.modal};
|
|
1113
|
+
|
|
1114
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1115
|
+
&[data-state='open'] {
|
|
1116
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
1117
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
1118
|
+
animation-name: ${mt.modalPopIn};
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
&[data-state='closed'] {
|
|
1122
|
+
animation-duration: ${t=>t.theme.motion.timings[120]};
|
|
1123
|
+
animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
|
|
1124
|
+
animation-name: ${mt.modalPopOut};
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
`,MZ=S.forwardRef(({children:t,...e},n)=>m.jsx(mV,{asChild:!0,children:m.jsx(OZ,{tag:"h2",variant:"beta",ref:n,padding:6,fontWeight:"bold",...e,children:t})})),OZ=k.styled(Re)`
|
|
1128
|
+
display: flex;
|
|
1129
|
+
justify-content: center;
|
|
1130
|
+
border-bottom: solid 1px ${t=>t.theme.colors.neutral150};
|
|
1131
|
+
`,DZ=S.forwardRef(({children:t,icon:e,...n},r)=>m.jsx(ge,{ref:r,gap:2,direction:"column",paddingTop:8,paddingBottom:8,paddingLeft:6,paddingRight:6,...n,children:typeof t=="string"?m.jsxs(m.Fragment,{children:[e?S.cloneElement(e,{width:24,height:24}):null,m.jsx(G$,{children:t})]}):t})),G$=S.forwardRef((t,e)=>m.jsx(bV,{asChild:!0,children:m.jsx(Re,{ref:e,variant:"omega",...t,tag:"p"})})),IZ=S.forwardRef((t,e)=>m.jsx(_Z,{ref:e,gap:2,padding:4,justifyContent:"space-between",...t,tag:"footer"})),_Z=k.styled(ge)`
|
|
1132
|
+
border-top: solid 1px ${t=>t.theme.colors.neutral150};
|
|
1133
|
+
flex: 1;
|
|
1134
|
+
`,LZ=S.forwardRef((t,e)=>m.jsx(pV,{...t,asChild:!0,ref:e})),BZ=S.forwardRef((t,e)=>m.jsx(gV,{...t,asChild:!0,ref:e})),NZ=Object.freeze(Object.defineProperty({__proto__:null,Action:BZ,Body:DZ,Cancel:LZ,Content:kZ,Description:G$,Footer:IZ,Header:MZ,Root:AZ,Trigger:RZ},Symbol.toStringTag,{value:"Module"}));let T0=0;function jZ(){w.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:Ux()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:Ux()),T0++,()=>{T0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),T0--}},[])}function Ux(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}function ni(t,e){const n=S.useRef(null);return e&&n.current&&FZ(e,n.current)&&(e=n.current),n.current=e??null,S.useMemo(()=>new kE(t,e),[t,e])}function FZ(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}const E0={Log:"live-region-log",Status:"live-region-status",Alert:"live-region-alert"},VZ=()=>m.jsxs(Bo,{children:[m.jsx("p",{role:"log","aria-live":"polite",id:E0.Log,"aria-relevant":"all"}),m.jsx("p",{role:"status","aria-live":"polite",id:E0.Status,"aria-relevant":"all"}),m.jsx("p",{role:"alert","aria-live":"assertive",id:E0.Alert,"aria-relevant":"all"})]}),HZ=k.createGlobalStyle`
|
|
1135
|
+
${k.css`
|
|
1136
|
+
*,
|
|
1137
|
+
*::before,
|
|
1138
|
+
*::after {
|
|
1139
|
+
box-sizing: border-box;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
* {
|
|
1143
|
+
margin: 0;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
html {
|
|
1147
|
+
/* Sets 1rem === 10px */
|
|
1148
|
+
font-size: 62.5%;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
body {
|
|
1152
|
+
height: 100%;
|
|
1153
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
1154
|
+
'Helvetica Neue', sans-serif;
|
|
1155
|
+
color: ${({theme:t})=>t.colors.neutral800};
|
|
1156
|
+
line-height: 1.5;
|
|
1157
|
+
-webkit-font-smoothing: antialiased;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
img,
|
|
1161
|
+
picture,
|
|
1162
|
+
video,
|
|
1163
|
+
canvas {
|
|
1164
|
+
display: block;
|
|
1165
|
+
max-width: 100%;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
input,
|
|
1169
|
+
button,
|
|
1170
|
+
textarea,
|
|
1171
|
+
select {
|
|
1172
|
+
padding: 0;
|
|
1173
|
+
font: inherit;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
button {
|
|
1177
|
+
border: unset;
|
|
1178
|
+
background: unset;
|
|
1179
|
+
padding: unset;
|
|
1180
|
+
margin: unset;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
p,
|
|
1184
|
+
h1,
|
|
1185
|
+
h2,
|
|
1186
|
+
h3,
|
|
1187
|
+
h4,
|
|
1188
|
+
h5,
|
|
1189
|
+
h6 {
|
|
1190
|
+
overflow-wrap: break-word;
|
|
1191
|
+
font: unset;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
#root {
|
|
1195
|
+
isolation: isolate;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
ol,
|
|
1199
|
+
ul {
|
|
1200
|
+
list-style: none;
|
|
1201
|
+
padding: unset;
|
|
1202
|
+
margin: unset;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
table {
|
|
1206
|
+
border-collapse: collapse;
|
|
1207
|
+
border-spacing: 0;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
*:focus-visible {
|
|
1211
|
+
outline: 2px solid ${({theme:t})=>t.colors.primary600};
|
|
1212
|
+
outline-offset: 2px;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/* Focusing the button with a mouse, touch, or stylus will show a subtle drop shadow. */
|
|
1216
|
+
*:focus:not(:focus-visible) {
|
|
1217
|
+
outline: none;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
.lock-body-scroll {
|
|
1221
|
+
height: 100vh;
|
|
1222
|
+
overflow-y: hidden;
|
|
1223
|
+
}
|
|
1224
|
+
`}
|
|
1225
|
+
`,qx="en-EN",Y$=()=>typeof navigator>"u"?qx:navigator.language?navigator.language:qx,[PZ,fh]=Ol("StrapiDesignSystem",{locale:Y$()}),WZ=({children:t,locale:e=Y$(),theme:n=W$,tooltipConfig:r})=>(ko(()=>{const i=document.createElement("style");i.type="text/css",i.appendChild(document.createTextNode(`
|
|
1226
|
+
* {
|
|
1227
|
+
-webkit-transition: none !important;
|
|
1228
|
+
-moz-transition: none !important;
|
|
1229
|
+
-o-transition: none !important;
|
|
1230
|
+
-ms-transition: none !important;
|
|
1231
|
+
transition: none !important;
|
|
1232
|
+
animation: none !important;
|
|
1233
|
+
}
|
|
1234
|
+
`)),document.head.appendChild(i),window.getComputedStyle(i).opacity,document.head.removeChild(i)},[n]),m.jsx(PZ,{locale:e,children:m.jsxs(k.ThemeProvider,{theme:n,children:[m.jsx(tO,{...r,children:t}),m.jsx(VZ,{}),m.jsx(HZ,{})]})})),zZ=WE,hm=S.forwardRef(({container:t=globalThis?.document?.body,...e},n)=>t?ul.createPortal(m.jsx(xe,{ref:n,...e}),t):null);hm.displayName="Portal";const UZ=S.forwardRef(({onClear:t,clearLabel:e="Clear",startIcon:n,disabled:r,hasError:i,children:o,id:s,size:a="M",withTags:c,...f},h)=>{const d=S.useRef(null),p=v=>{t&&!r&&(t(v),d.current.focus())},{labelNode:b}=pn("SelectTrigger"),x=gn(d,h);return m.jsx(rr.Trigger,{asChild:!0,children:m.jsxs(KZ,{"aria-disabled":r,$hasError:i,ref:x,alignItems:"center",justifyContent:"space-between",position:"relative",overflow:"hidden",hasRadius:!0,background:r?"neutral150":"neutral0",gap:4,cursor:"default","aria-labelledby":b?`${s}-label`:void 0,$size:a,$withTags:c,...f,children:[m.jsxs(ge,{flex:"1",tag:"span",gap:3,children:[n&&m.jsx(ge,{tag:"span","aria-hidden":!0,children:n}),o]}),m.jsxs(ge,{tag:"span",gap:3,children:[t?m.jsx(qZ,{tag:"button",hasRadius:!0,background:"transparent",role:"button",tabIndex:0,onClick:p,"aria-disabled":r,"aria-label":e,title:e,cursor:"pointer",children:m.jsx(Hi,{})}):null,m.jsx(GZ,{children:m.jsx(Oi,{})})]})]})})}),qZ=k.styled(xe)`
|
|
1235
|
+
border: none;
|
|
1236
|
+
display: flex;
|
|
1237
|
+
|
|
1238
|
+
svg {
|
|
1239
|
+
height: 1.1rem;
|
|
1240
|
+
width: 1.1rem;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
svg path {
|
|
1244
|
+
fill: ${({theme:t})=>t.colors.neutral500};
|
|
1245
|
+
}
|
|
1246
|
+
`,KZ=k.styled(ge)`
|
|
1247
|
+
border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
|
|
1248
|
+
${t=>{switch(t.$size){case"S":return k.css`
|
|
1249
|
+
padding-block: ${t.theme.spaces[1]};
|
|
1250
|
+
padding-inline-start: ${t.$withTags?t.theme.spaces[1]:t.theme.spaces[4]};
|
|
1251
|
+
padding-inline-end: ${t.theme.spaces[3]};
|
|
1252
|
+
`;default:return k.css`
|
|
1253
|
+
padding-block: ${t.$withTags?"0.3rem":t.theme.spaces[2]};
|
|
1254
|
+
padding-inline-start: ${t.$withTags?t.theme.spaces[1]:t.theme.spaces[4]};
|
|
1255
|
+
padding-inline-end: ${t.theme.spaces[3]};
|
|
1256
|
+
`}}}
|
|
1257
|
+
cursor: pointer;
|
|
1258
|
+
|
|
1259
|
+
&[aria-disabled='true'] {
|
|
1260
|
+
color: ${t=>t.theme.colors.neutral500};
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
/* Required to ensure the below inputFocusStyles are adhered too */
|
|
1264
|
+
&:focus-visible {
|
|
1265
|
+
outline: none;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
${({theme:t,$hasError:e})=>zi()({theme:t,$hasError:e})};
|
|
1269
|
+
`,GZ=k.styled(rr.Icon)`
|
|
1270
|
+
display: flex;
|
|
1271
|
+
& > svg {
|
|
1272
|
+
fill: ${({theme:t})=>t.colors.neutral500};
|
|
1273
|
+
}
|
|
1274
|
+
`,YZ=S.forwardRef(({children:t,placeholder:e,...n},r)=>m.jsx(XZ,{ref:r,ellipsis:!0,...n,children:m.jsx(QZ,{placeholder:e,children:t})})),XZ=k.styled(Re)`
|
|
1275
|
+
flex: 1;
|
|
1276
|
+
font-size: 1.4rem;
|
|
1277
|
+
line-height: 2.2rem;
|
|
1278
|
+
`,QZ=k.styled(rr.Value)`
|
|
1279
|
+
display: flex;
|
|
1280
|
+
gap: ${({theme:t})=>t.spaces[1]};
|
|
1281
|
+
flex-wrap: wrap;
|
|
1282
|
+
`,ZZ=k.styled(rr.Content)`
|
|
1283
|
+
background: ${({theme:t})=>t.colors.neutral0};
|
|
1284
|
+
box-shadow: ${({theme:t})=>t.shadows.filterShadow};
|
|
1285
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
1286
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1287
|
+
min-width: var(--radix-select-trigger-width);
|
|
1288
|
+
max-height: 15.6rem;
|
|
1289
|
+
z-index: ${({theme:t})=>t.zIndices.popover};
|
|
1290
|
+
|
|
1291
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1292
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
1293
|
+
|
|
1294
|
+
/* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */
|
|
1295
|
+
&[data-state='open'] {
|
|
1296
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
1297
|
+
|
|
1298
|
+
&[data-side='top'] {
|
|
1299
|
+
animation-name: ${mt.slideUpIn};
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
&[data-side='bottom'] {
|
|
1303
|
+
animation-name: ${mt.slideDownIn};
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
`,JZ=k.styled(rr.Viewport)`
|
|
1308
|
+
padding: ${({theme:t})=>t.spaces[1]};
|
|
1309
|
+
`,eJ=S.forwardRef((t,e)=>m.jsx(nJ,{ref:e,...t})),tJ=k.css`
|
|
1310
|
+
width: 100%;
|
|
1311
|
+
border: none;
|
|
1312
|
+
text-align: left;
|
|
1313
|
+
outline-offset: -3px;
|
|
1314
|
+
border-radius: ${t=>t.theme.borderRadius};
|
|
1315
|
+
padding: ${t=>`${t.theme.spaces[2]} ${t.theme.spaces[4]}`};
|
|
1316
|
+
padding-left: ${({theme:t})=>t.spaces[4]};
|
|
1317
|
+
background-color: ${({theme:t})=>t.colors.neutral0};
|
|
1318
|
+
display: flex;
|
|
1319
|
+
align-items: center;
|
|
1320
|
+
gap: ${({theme:t})=>t.spaces[2]};
|
|
1321
|
+
white-space: nowrap;
|
|
1322
|
+
user-select: none;
|
|
1323
|
+
color: ${({theme:t})=>t.colors.neutral800};
|
|
1324
|
+
|
|
1325
|
+
&:focus-visible {
|
|
1326
|
+
outline: none;
|
|
1327
|
+
background-color: ${({theme:t})=>t.colors.primary100};
|
|
1328
|
+
cursor: pointer;
|
|
1329
|
+
}
|
|
1330
|
+
`,nJ=k.styled(rr.Item)`
|
|
1331
|
+
${tJ}
|
|
1332
|
+
|
|
1333
|
+
&:hover {
|
|
1334
|
+
background-color: ${({theme:t})=>t.colors.primary100};
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
&[data-state='checked'] {
|
|
1338
|
+
font-weight: bold;
|
|
1339
|
+
background-color: ${({theme:t})=>t.colors.primary100};
|
|
1340
|
+
color: ${({theme:t})=>t.colors.primary600};
|
|
1341
|
+
font-weight: bold;
|
|
1342
|
+
}
|
|
1343
|
+
`,X$=rr.Root,Q$=UZ,Z$=YZ,J$=rr.Portal,e8=ZZ,t8=JZ,dm=eJ,n8=rr.ItemIndicator,r8=rr.ItemText,rJ=rr.Group,fg=S.forwardRef(({children:t,clearLabel:e="Clear",customizeContent:n,disabled:r,hasError:i,id:o,name:s,onChange:a,onClear:c,onCloseAutoFocus:f,onReachEnd:h,placeholder:d,required:p,size:b,startIcon:x,value:v,...C},$)=>{const[A,T]=S.useState(),[M,O]=S.useState(!1),I=fe=>{O(fe)},_=fe=>{c&&c(fe),a||T("")},V=fe=>{a?a(typeof v=="number"?Number(fe):fe):T(fe)},F=S.useRef(null),H=Tn(),z=`intersection-${Hs(H)}`;Il(F,fe=>{h&&h(fe)},{selectorToWatch:`#${z}`,skipWhen:!M});const{error:Y,required:K,...te}=pn("SingleSelect"),ie=!!Y||i,ne=te.id??o,oe=te.name??s;let X;Y?X=`${ne}-error`:te.hint&&(X=`${ne}-hint`);const ce=(typeof v<"u"&&v!==null?v.toString():A)??"";return m.jsxs(X$,{onOpenChange:I,disabled:r,required:K??p,onValueChange:V,value:ce,...C,children:[m.jsx(Q$,{ref:$,id:ne,name:oe,startIcon:x,hasError:ie,disabled:r,clearLabel:e,onClear:ce&&c?_:void 0,"aria-label":C["aria-label"],"aria-describedby":X??C["aria-describedby"],size:b,children:m.jsx(Z$,{placeholder:d,textColor:ce?"neutral800":"neutral600",children:ce&&n?n(ce):void 0})}),m.jsx(J$,{children:m.jsx(e8,{position:"popper",sideOffset:4,onCloseAutoFocus:f,children:m.jsxs(t8,{ref:F,children:[t,m.jsx(xe,{id:z,width:"100%",height:"1px"})]})})})]})}),hg=S.forwardRef(({value:t,startIcon:e,children:n,...r},i)=>m.jsxs(dm,{ref:i,value:t.toString(),...r,children:[e&&m.jsx(ge,{tag:"span","aria-hidden":!0,children:e}),m.jsx(Re,{lineHeight:"20px",width:"100%",children:m.jsx(r8,{children:n})})]})),iJ=200,Kx=15,[oJ,Zs]=Ol("DatePicker"),sJ=S.forwardRef(({calendarLabel:t,className:e,initialDate:n,locale:r,maxDate:i,minDate:o,monthSelectLabel:s="Month",onChange:a,value:c,yearSelectLabel:f="Year",hasError:h,id:d,name:p,disabled:b=!1,required:x=!1,onClear:v,clearLabel:C="Clear",size:$="M",...A},T)=>{const M=Ss(),O=fh("DatePicker"),I=r??O.locale,_=ni(I,{day:"2-digit",month:"2-digit",year:"numeric"}),[V,F]=S.useState(!1),[H,z]=S.useState(null),[W,Y]=S.useState(null),[K,te]=S.useState(null),[ie,ne]=S.useState(),[oe,X]=Cr({defaultProp:n?ro(n):void 0,prop:c?ro(c):void 0,onChange(Pe){a&&a(Pe?.toDate(M))}}),[ce,fe]=S.useMemo(()=>{const Pe=n?ro(n):mg("UTC"),Yt=o?ro(o):Pe.set({day:1,month:1,year:Pe.year-iJ});let ht=i?ro(i):Pe.set({day:31,month:12,year:Pe.year+Kx});return ht.compare(Yt)<0&&(ht=Yt.set({day:31,month:12,year:Yt.year+Kx})),[Yt,ht]},[o,i,n]),[Me,we]=S.useState(aJ({currentValue:oe,minDate:ce,maxDate:fe})),Ve=Tn(),Ne=S.useRef(null),He=Pe=>{v&&!b&&(ne(""),X(void 0),v(Pe),W?.focus())},pe=S.useCallback(Pe=>{Pe&&oe&&we(oe),F(Pe)},[oe]);ko(()=>{if(c){const Pe=ro(c);ne(_.format(Pe.toDate(M))),we(Pe)}else ne("")},[c,_,M]),ko(()=>{if(n&&ie===void 0){const Pe=ro(n);ne(_.format(Pe.toDate(M)))}},[n,ie,_,M]);const{error:De,...ke}=pn("Combobox"),Ae=!!De||h,_e=ke.id??d,ze=ke.name??p,Et=ke.required||x;let Qe;return De?Qe=`${_e}-error`:ke.hint&&(Qe=`${_e}-hint`),m.jsxs(oJ,{calendarDate:Me,content:K,contentId:Ve,disabled:b,locale:I,minDate:ce,maxDate:fe,open:V,onCalendarDateChange:we,onContentChange:te,onOpenChange:pe,onTextInputChange:Y,onTextValueChange:ne,onTriggerChange:z,onValueChange:X,required:Et,textInput:W,textValue:ie,timeZone:M,trigger:H,value:oe,children:[m.jsxs(cJ,{className:e,hasError:Ae,size:$,children:[m.jsx(GI,{fill:"neutral500","aria-hidden":!0}),m.jsx(dJ,{ref:T,"aria-describedby":Qe,id:_e,name:ze,...A}),ie&&v?m.jsx(fJ,{tag:"button",hasRadius:!0,background:"transparent",type:"button",onClick:He,"aria-disabled":b,"aria-label":C,title:C,ref:Ne,children:m.jsx(Hi,{})}):null]}),m.jsx(hm,{children:m.jsx(bJ,{label:t,children:m.jsx(CJ,{monthSelectLabel:s,yearSelectLabel:f})})})]})}),Gx=t=>!!t.match(/^[^a-zA-Z]*$/),aJ=({currentValue:t,minDate:e,maxDate:n})=>{const r=mg("UTC");return t||(I0(e,r)===e&&_0(n,r)===n?r:I0(e,r)===r?e:_0(n,r)===r?n:r)},lJ="DatePickerTrigger",cJ=S.forwardRef(({hasError:t,size:e,...n},r)=>{const i=Zs(lJ),o=gn(r,a=>i.onTriggerChange(a)),s=()=>{i.disabled||i.onOpenChange(!0)};return m.jsx(zs,{asChild:!0,trapped:i.open,onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{document.getSelection()?.empty(),a.preventDefault()},children:m.jsx(uJ,{ref:o,$hasError:t,$size:e,...n,hasRadius:!0,gap:3,overflow:"hidden",background:i.disabled?"neutral150":"neutral0",onClick:uo(n.onClick,()=>{i.textInput?.focus()}),onPointerDown:uo(n.onPointerDown,a=>{const c=a.target;c.hasPointerCapture(a.pointerId)&&c.releasePointerCapture(a.pointerId),(c.closest("button")??c.closest("div"))===a.currentTarget&&a.button===0&&a.ctrlKey===!1&&(s(),i.textInput?.focus())})})})}),uJ=k.styled(ge)`
|
|
1344
|
+
border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
|
|
1345
|
+
${t=>{switch(t.$size){case"S":return k.css`
|
|
1346
|
+
padding-block: ${t.theme.spaces[1]};
|
|
1347
|
+
padding-inline: ${t.theme.spaces[3]};
|
|
1348
|
+
`;default:return k.css`
|
|
1349
|
+
padding-block: ${t.theme.spaces[2]};
|
|
1350
|
+
padding-inline: ${t.theme.spaces[3]};
|
|
1351
|
+
`}}}
|
|
1352
|
+
|
|
1353
|
+
& > svg {
|
|
1354
|
+
flex: 1 0 auto;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
&[data-disabled] {
|
|
1358
|
+
color: ${({theme:t})=>t.colors.neutral600};
|
|
1359
|
+
background: ${({theme:t})=>t.colors.neutral150};
|
|
1360
|
+
cursor: not-allowed;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/* Required to ensure the below inputFocusStyles are adhered too */
|
|
1364
|
+
&:focus-visible {
|
|
1365
|
+
outline: none;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
${({theme:t,$hasError:e})=>zi()({theme:t,$hasError:e})};
|
|
1369
|
+
`,fJ=k.styled(xe)`
|
|
1370
|
+
border: none;
|
|
1371
|
+
color: ${({theme:t})=>t.colors.neutral600};
|
|
1372
|
+
padding: 0;
|
|
1373
|
+
cursor: pointer;
|
|
1374
|
+
`,hJ="DatePickerTextInput",dJ=S.forwardRef(({placeholder:t,...e},n)=>{const r=Zs(hJ),{onTextValueChange:i,textValue:o,onTextInputChange:s,onOpenChange:a,disabled:c,locale:f}=r,h=gn(n,$=>s($)),d=()=>{c||a(!0)},p=ni(f,{year:"numeric",month:"2-digit",day:"2-digit"}),[b,x,v]=S.useMemo(()=>{const $=p.formatToParts(new Date),A=$.filter(O=>O.type==="year"||O.type==="month"||O.type==="day"),T=A.map(O=>{switch(O.type){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return""}}),M=$.find(O=>O.type==="literal")?.value??"";return[T,M,A]},[p]),C=b.map($=>`\\d{${$.length}}`).join(`\\${x}`);return m.jsx(pJ,{role:"combobox",type:"text",inputMode:"numeric",ref:h,"aria-autocomplete":"none","aria-controls":r.contentId,"aria-disabled":r.disabled,"aria-expanded":r.open,"aria-required":r.required,"aria-haspopup":"dialog","data-state":r.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,pattern:C,placeholder:t??b.join(x),...e,value:o??"",onBlur:uo(e.onBlur,()=>{if(!r.textValue){r.onValueChange(void 0);return}r.onTextValueChange(p.format(r.calendarDate.toDate(r.timeZone))),r.onValueChange(r.calendarDate)}),onChange:uo(e.onChange,$=>{if(Gx($.target.value)){const A=$.target.value.split(x),[T,M,O]=v.map((Y,K)=>{const te=A[K];return{...Y,value:te}}).sort((Y,K)=>Y.type==="year"?1:K.type==="year"?-1:Y.type==="month"?1:K.type==="month"?-1:0).map(Y=>Y.value),I=r.calendarDate.year;let _=r.calendarDate.year;if(O){const Y=O.length===1?`0${O}`:O;_=O.length<3?Number(`${I}`.slice(0,4-Y.length)+Y):Number(Y)}O&&O.length<3&&_>r.maxDate.year&&(_-=100);const V=r.calendarDate.set({year:_}),F=V.calendar.getMonthsInYear(V),H=V.set({month:M&&Number(M)<=F?Number(M):void 0}),z=H.calendar.getDaysInMonth(H),W=H.set({day:T&&Number(T)<=z?Number(T):void 0});r.onCalendarDateChange(gJ(W,r.minDate,r.maxDate)),r.onTextValueChange($.target.value)}}),onKeyDown:uo(e.onKeyDown,$=>{if(!r.open&&(Gx($.key)||["ArrowDown","Backspace"].includes($.key)))d();else if(["Tab"].includes($.key)&&r.open)$.preventDefault();else if(["Escape"].includes($.key))r.open?r.onOpenChange(!1):(r.onValueChange(void 0),r.onTextValueChange("")),$.preventDefault();else if(r.open&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes($.key))switch($.preventDefault(),$.key){case"ArrowDown":{const A=r.calendarDate.add({weeks:1});if(r.maxDate&&A.compare(r.maxDate)>0)return;r.onCalendarDateChange(A);return}case"ArrowRight":{const A=r.calendarDate.add({days:1});if(r.maxDate&&A.compare(r.maxDate)>0)return;r.onCalendarDateChange(A);return}case"ArrowUp":{const A=r.calendarDate.subtract({weeks:1});if(r.minDate&&A.compare(r.minDate)<0)return;r.onCalendarDateChange(A);return}case"ArrowLeft":{const A=r.calendarDate.subtract({days:1});if(r.minDate&&A.compare(r.minDate)<0)return;r.onCalendarDateChange(A)}}else r.open&&["Enter"].includes($.key)&&($.preventDefault(),i(p.format(r.calendarDate.toDate(r.timeZone))),r.onValueChange(r.calendarDate),r.onOpenChange(!1))})})});function gJ(t,e,n){return e&&(t=_0(t,e)),n&&(t=I0(t,n)),t}const pJ=k.styled.input`
|
|
1375
|
+
width: 100%;
|
|
1376
|
+
font-size: 1.4rem;
|
|
1377
|
+
line-height: 2.2rem;
|
|
1378
|
+
color: ${({theme:t})=>t.colors.neutral800};
|
|
1379
|
+
border: none;
|
|
1380
|
+
background-color: transparent;
|
|
1381
|
+
|
|
1382
|
+
&:focus-visible {
|
|
1383
|
+
outline: none;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
&[aria-disabled='true'] {
|
|
1387
|
+
cursor: inherit;
|
|
1388
|
+
}
|
|
1389
|
+
`,mJ="DatePickerContent",bJ=S.forwardRef((t,e)=>{const[n,r]=S.useState(),i=Zs(mJ);if(ko(()=>{r(new DocumentFragment)},[]),!i.open){const o=n;return o?ul.createPortal(m.jsx("div",{children:t.children}),o):null}return m.jsx(xJ,{...t,ref:e})}),wJ="DatePickerContent",xJ=S.forwardRef((t,e)=>{const{label:n="Choose date",...r}=t,{onOpenChange:i,...o}=Zs(wJ),{x:s,y:a,refs:c,strategy:f,placement:h}=JV({strategy:"fixed",placement:"bottom-start",middleware:[eH({mainAxis:4}),tH(),nH()],elements:{reference:o.trigger},whileElementsMounted:GV});S.useEffect(()=>{const p=()=>{i(!1)};return window.addEventListener("blur",p),window.addEventListener("resize",p),()=>{window.removeEventListener("blur",p),window.removeEventListener("resize",p)}},[i]);const d=gn(e,p=>o.onContentChange(p),c.setFloating);return jZ(),m.jsx(Py,{allowPinchZoom:!0,children:m.jsx(zZ,{asChild:!0,onFocusOutside:p=>{p.preventDefault()},onDismiss:()=>{i(!1)},children:m.jsx(vJ,{ref:d,"data-state":o.open?"open":"closed","data-side":h.includes("top")?"top":"bottom",onContextMenu:p=>p.preventDefault(),id:o.contentId,role:"dialog","aria-modal":"true","aria-label":n,style:{left:s,top:a,position:f},hasRadius:!0,background:"neutral0",padding:1,...r})})})}),vJ=k.styled(xe)`
|
|
1390
|
+
box-shadow: ${({theme:t})=>t.shadows.filterShadow};
|
|
1391
|
+
z-index: ${({theme:t})=>t.zIndices.popover};
|
|
1392
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
1393
|
+
|
|
1394
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1395
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
1396
|
+
|
|
1397
|
+
&[data-state='open'] {
|
|
1398
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
1399
|
+
|
|
1400
|
+
&[data-side='top'] {
|
|
1401
|
+
animation-name: ${mt.slideUpIn};
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
&[data-side='bottom'] {
|
|
1405
|
+
animation-name: ${mt.slideDownIn};
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
`,yJ="DatePickerCalendar",CJ=S.forwardRef(({monthSelectLabel:t,yearSelectLabel:e,...n},r)=>{const{locale:i,timeZone:o,minDate:s,maxDate:a,calendarDate:c,onCalendarDateChange:f}=Zs(yJ),h=rE(c),d=S.useMemo(()=>{const T=s.year,M=a.year;return[...Array(M-T+1).keys()].map(O=>(T+O).toString())},[s,a]),p=ni(i,{month:"long"}),b=S.useMemo(()=>[...Array(c.calendar.getMonthsInYear(c)).keys()].map(T=>p.format(c.set({month:T+1}).toDate(o))),[c,p,o]),x=ni(i,{weekday:"short"}),v=S.useMemo(()=>{const T=av(mg(o),i);return[...new Array(7).keys()].map(M=>{const I=T.add({days:M}).toDate(o);return x.format(I)})},[o,i,x]),C=T=>{if(typeof T=="number")return;const M=c.set({month:b.indexOf(T)+1});f(M)},$=T=>{if(typeof T=="number")return;const M=c.set({year:parseInt(T,10)});f(M)},A=$J(h,i);return m.jsxs(ge,{ref:r,direction:"column",alignItems:"stretch",padding:4,...n,children:[m.jsxs(SJ,{justifyContent:"flex-start",paddingBottom:4,paddingLeft:2,paddingRight:2,gap:2,children:[m.jsx(To,{children:m.jsx(fg,{"aria-label":t,value:b[c.month-1],onChange:C,children:b.map(T=>m.jsx(hg,{value:T,children:T},T))})}),m.jsx(To,{children:m.jsx(fg,{value:c.year.toString(),"aria-label":e,onChange:$,children:d.map(T=>m.jsx(hg,{value:T,children:T},T))})})]}),m.jsxs("table",{role:"grid",children:[m.jsx("thead",{"aria-hidden":!0,children:m.jsx("tr",{"aria-rowindex":0,children:v.map((T,M)=>m.jsx(AJ,{"aria-colindex":M,children:T},T))})}),m.jsx("tbody",{children:[...new Array(6).keys()].map(T=>m.jsx("tr",{"aria-rowindex":T+2,children:A(T).map((M,O)=>M?m.jsx(TJ,{"aria-colindex":O+1,date:M,startDate:h,disabled:s.compare(M)>0||M.compare(a)>0},M.toString()):m.jsx(i8,{"aria-colindex":O+1},O+1))},T))})]})]})}),$J=(t,e)=>n=>{let r=t.add({weeks:n});const i=[];r=av(r,e);const o=ov(r,e);for(let s=0;s<o;s++)i.push(null);for(;i.length<7;){i.push(r);const s=r.add({days:1});if(iv(r,s))break;r=s}for(;i.length<7;)i.push(null);return i},SJ=k.styled(ge)`
|
|
1410
|
+
div[role='combobox'] {
|
|
1411
|
+
border: 1px solid transparent;
|
|
1412
|
+
background: transparent;
|
|
1413
|
+
font-weight: ${t=>t.theme.fontWeights.bold};
|
|
1414
|
+
|
|
1415
|
+
svg {
|
|
1416
|
+
fill: ${({theme:t})=>t.colors.neutral500};
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
&:hover {
|
|
1420
|
+
background-color: ${({theme:t})=>t.colors.neutral100};
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
`,AJ=S.forwardRef(({children:t,...e},n)=>m.jsx(RJ,{tag:"th",role:"gridcell",ref:n,...e,height:"2.4rem",width:"3.2rem",children:m.jsx(Re,{variant:"pi",fontWeight:"bold",color:"neutral800",children:t.slice(0,2)})})),RJ=k.styled(xe)`
|
|
1424
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1425
|
+
text-transform: capitalize;
|
|
1426
|
+
`,kJ="DatePickerCalendarCell",TJ=S.forwardRef(({date:t,startDate:e,disabled:n,...r},i)=>{const{timeZone:o,locale:s,calendarDate:a,onValueChange:c,onOpenChange:f,onTextValueChange:h,onCalendarDateChange:d}=Zs(kJ),p=iv(a,t),b=ni(s,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),x=S.useMemo(()=>b.format(t.toDate(o)),[b,t,o]),v=ni(s,{day:"numeric",calendar:t.calendar.identifier}),C=S.useMemo(()=>v.formatToParts(t.toDate(o)).find(O=>O.type==="day").value,[v,t,o]),$=ni(s,{day:"2-digit",month:"2-digit",year:"numeric"}),A=iE(e),T=t.compare(e)<0||t.compare(A)>0;let M="neutral900";return p?M="primary600":T&&(M="neutral600"),m.jsx(i8,{tag:"td",role:"gridcell",ref:i,"aria-selected":p,...r,hasRadius:!0,"aria-label":x,tabIndex:p?0:-1,background:p?"primary100":"neutral0",cursor:"pointer",onPointerDown:uo(r.onPointerDown,O=>{O.preventDefault(),d(t),c(t),h($.format(t.toDate(o))),f(!1)}),"aria-disabled":n,children:m.jsx(Re,{variant:"pi",textColor:M,children:C})})}),i8=k.styled(xe)`
|
|
1427
|
+
text-align: center;
|
|
1428
|
+
padding: 0.7rem;
|
|
1429
|
+
// Trick to prevent the outline from overflowing because of the general outline-offset
|
|
1430
|
+
outline-offset: -2px !important;
|
|
1431
|
+
&[aria-disabled='true'] {
|
|
1432
|
+
pointer-events: none;
|
|
1433
|
+
opacity: 0.5;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
&[aria-disabled='false'] {
|
|
1437
|
+
&:hover {
|
|
1438
|
+
background: ${({theme:t})=>t.colors.primary100};
|
|
1439
|
+
color: ${({theme:t})=>t.colors.primary600};
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
`,ro=t=>{const e=t.toISOString(),n=wv(e,"UTC");return fv(n)},M0=t=>!!t.match(/^[^a-zA-Z]*$/),EJ=S.forwardRef(({step:t=15,value:e,defaultValue:n,onChange:r,...i},o)=>{const s=fh("TimePicker"),[a,c]=S.useState(""),[f,h]=Cr({prop:e,defaultProp:n,onChange:r}),d=ni(s.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),p=S.useMemo(()=>{const A=d.formatToParts(new Date),{value:T}=A.find(M=>M.type==="literal");return T},[d]),b=S.useMemo(()=>{const A=60/t;return[...Array(24).keys()].flatMap(T=>[...Array(A).keys()].map(M=>d.format(new Date(0,0,0,T,M*t))))},[t,d]),x=A=>{(!A||M0(A))&&c(A)},v=A=>{const[T,M]=A.split(p);if(!T&&!M)return;const O=Number(T??"0"),I=Number(M??"0");if(!(O>23||I>59))return d.format(new Date(0,0,0,O,I))},C=A=>{const T=v(A.target.value);T?(c(T),h(T)):c(f)},$=A=>{if(typeof A<"u"){const T=v(A);h(T)}else h(A)};return S.useEffect(()=>{const A=typeof e>"u"?"":e;M0(A)&&c(A)},[e,c]),m.jsx(bZ,{...i,ref:o,value:f,onChange:$,isPrintableCharacter:M0,allowCustomValue:!0,placeholder:`--${p}--`,autocomplete:"none",startIcon:m.jsx(w_,{fill:"neutral500"}),inputMode:"numeric",pattern:`\\d{2}\\${p}\\d{2}`,textValue:a,onTextValueChange:x,onBlur:C,children:b.map(A=>m.jsx(SZ,{value:A,children:A},A))})}),MJ=k.styled(sJ)`
|
|
1443
|
+
flex: 1 1 70%;
|
|
1444
|
+
min-width: 120px;
|
|
1445
|
+
`,OJ=k.styled(EJ)`
|
|
1446
|
+
flex: 1 1 30%;
|
|
1447
|
+
min-width: 140px;
|
|
1448
|
+
`;S.forwardRef(({clearLabel:t="clear",dateLabel:e="Choose date",timeLabel:n="Choose time",disabled:r=!1,hasError:i,onChange:o,onClear:s,required:a=!1,step:c,value:f,initialDate:h,size:d,...p},b)=>{const x=S.useRef(null),[v,C]=Cr({defaultProp:h?Sa(h,!1):void 0,prop:f?Sa(f,!1):f??void 0,onChange(Y){o&&o(Y?.toDate(Ss()))}}),$=fh("DateTimePicker"),A=ni($.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),T=v?A.format(v.toDate(Ss())):"",M=Y=>{let K=Y?Sa(Y):void 0;if(!(K&&v&&K.compare(v)===0)){if(T&&K){const[te,ie]=T.split(":");K=K.set({hour:parseInt(te,10),minute:parseInt(ie,10)})}C(K)}},O=Y=>{if(!Y)return;const[K,te]=Y.split(":"),ie=v?v.set({hour:parseInt(K,10),minute:parseInt(te,10)}):Sa(new Date).set({hour:parseInt(K,10),minute:parseInt(te,10)});C(ie)},I=Y=>{C(void 0),s&&s(Y)},_=()=>{const Y=v?v.set({hour:0,minute:0}):Sa(new Date);C(Y)},V=gn(x,b),{error:F,id:H,labelNode:z}=pn("DateTimePicker"),W=!!F||i;return m.jsxs(ge,{"aria-labelledby":z?`${H}-label`:void 0,role:"group",flex:"1",gap:1,children:[m.jsx(To,{children:m.jsx(MJ,{...p,size:d,value:v?.toDate("UTC"),onChange:M,required:a,onClear:s?I:void 0,clearLabel:`${t} date`,disabled:r,ref:V,"aria-label":e})}),m.jsx(To,{children:m.jsx(OJ,{size:d,hasError:W,value:T,onChange:O,onClear:s&&T!==void 0&&T!=="00:00"?_:void 0,clearLabel:`${t} time`,required:a,disabled:r,step:c,"aria-label":n})})]})});const Sa=(t,e=!0)=>{const n=t.toISOString();let r=xE(n);return e&&(r=r.set({hour:0,minute:0})),mo(r)},o8=S.forwardRef((t,e)=>m.jsx(DJ,{ref:e,background:"neutral150",...t,"data-orientation":"horizontal",role:"separator",tag:"div"})),DJ=k.styled(xe)`
|
|
1449
|
+
height: 1px;
|
|
1450
|
+
border: none;
|
|
1451
|
+
/* If contained in a Flex parent we want to prevent the Divider to shink */
|
|
1452
|
+
flex-shrink: 0;
|
|
1453
|
+
`,IJ=k.styled(xe)`
|
|
1454
|
+
svg {
|
|
1455
|
+
height: 8.8rem;
|
|
1456
|
+
}
|
|
1457
|
+
`;S.forwardRef(({icon:t,content:e,action:n,hasRadius:r=!0,shadow:i="tableShadow"},o)=>m.jsxs(ge,{ref:o,alignItems:"center",direction:"column",padding:11,background:"neutral0",hasRadius:r,shadow:i,children:[t?m.jsx(IJ,{paddingBottom:6,"aria-hidden":!0,children:t}):null,m.jsx(xe,{paddingBottom:4,children:m.jsx(Re,{variant:"delta",tag:"p",textAlign:"center",textColor:"neutral600",children:e})}),n]}));const s8=Ee.define(),a8=Ee.define(),_J=ve.mark({attributes:{style:"background-color: yellow; color: black"}}),LJ=Bt.define({create(){return ve.none},update(t,e){return t=t.map(e.changes),e.effects.forEach(n=>{n.is(s8)?t=t.update({add:n.value,sort:!0}):n.is(a8)&&(t=t.update({filter:n.value}))}),t},provide:t=>le.decorations.from(t)});S.forwardRef(({hasError:t,required:e,id:n,value:r="",disabled:i=!1,onChange:o=()=>null,...s},a)=>{const c=S.useRef(),f=S.useRef(),h=S.useRef(),{error:d,...p}=pn("JsonInput"),b=!!d||t,x=p.id??n,v=p.required||e;let C;d?C=`${x}-error`:p.hint&&(C=`${x}-hint`);const $=F=>{const H=f.current?.doc;if(H){const{text:z,to:W}=H.line(F),Y=W-z.trimStart().length;W>Y&&h.current?.dispatch({effects:s8.of([_J.range(Y,W)])})}},A=()=>{const F=f.current?.doc;if(F){const H=F.length||0;h.current?.dispatch({effects:a8.of((z,W)=>W<=0||z>=H)})}},T=({state:F,view:H})=>{h.current=H,f.current=F,A();const W=IU()(H);W.length&&$(F.doc.lineAt(W[0].from).number)},M=(F,H)=>{T(H),o(F)},O=(F,H)=>{h.current=F,f.current=H,T({view:F,state:H})},{setContainer:I,view:_}=VC({value:r,onCreateEditor:O,container:c.current,editable:!i,extensions:[BU(),LJ],onChange:M,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),V=gn(c,I);return S.useImperativeHandle(a,()=>({..._?.dom,focus(){_&&_.focus()},scrollIntoView(F){_&&_.dom.scrollIntoView(F)}}),[_]),m.jsx(BJ,{ref:V,$hasError:b,alignItems:"stretch",fontSize:2,hasRadius:!0,"aria-required":v,id:x,"aria-describedby":C,...s})});const BJ=k.styled(ge)`
|
|
1458
|
+
line-height: ${({theme:t})=>t.lineHeights[2]};
|
|
1459
|
+
|
|
1460
|
+
.cm-editor {
|
|
1461
|
+
/**
|
|
1462
|
+
* Hard coded since the color is the same between themes,
|
|
1463
|
+
* theme.colors.neutral800 changes between themes
|
|
1464
|
+
*/
|
|
1465
|
+
background-color: #32324d;
|
|
1466
|
+
width: 100%;
|
|
1467
|
+
outline: none;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
.cm-scroller {
|
|
1471
|
+
border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
|
|
1472
|
+
/* inputFocusStyle will receive hasError prop */
|
|
1473
|
+
${zi()}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
.cm-editor,
|
|
1477
|
+
.cm-scroller {
|
|
1478
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
.cm-gutters,
|
|
1482
|
+
.cm-activeLineGutter {
|
|
1483
|
+
/**
|
|
1484
|
+
* Hard coded since the color is the same between themes,
|
|
1485
|
+
* theme.colors.neutral700 changes between themes
|
|
1486
|
+
*/
|
|
1487
|
+
background-color: #4a4a6a;
|
|
1488
|
+
}
|
|
1489
|
+
`;nn(({disabled:t,...e},n)=>m.jsx(bf,{ref:n,tag:Dl,tabIndex:t?-1:void 0,disabled:t,...e}));k.styled(xe)`
|
|
1490
|
+
// To prevent global outline on focus visible to force an outline when Main is focused
|
|
1491
|
+
&:focus-visible {
|
|
1492
|
+
outline: none;
|
|
1493
|
+
}
|
|
1494
|
+
`;k.styled(xe)`
|
|
1495
|
+
text-decoration: none;
|
|
1496
|
+
|
|
1497
|
+
&:focus {
|
|
1498
|
+
left: ${({theme:t})=>t.spaces[3]};
|
|
1499
|
+
top: ${({theme:t})=>t.spaces[3]};
|
|
1500
|
+
}
|
|
1501
|
+
`;const NJ=(t,e)=>`${t}${Math.floor(e*255).toString(16).padStart(2,"0")}`,l8=S.forwardRef(({children:t,viewportRef:e,...n},r)=>m.jsxs(jJ,{ref:r,...n,children:[m.jsx(FJ,{ref:e,children:t}),m.jsx(Yx,{orientation:"vertical",children:m.jsx(Xx,{})}),m.jsx(Yx,{orientation:"horizontal",children:m.jsx(Xx,{})})]})),jJ=k.styled(tY)`
|
|
1502
|
+
width: 100%;
|
|
1503
|
+
height: 100%;
|
|
1504
|
+
overflow: hidden;
|
|
1505
|
+
display: flex;
|
|
1506
|
+
`,FJ=k.styled(nY)`
|
|
1507
|
+
min-width: 100%;
|
|
1508
|
+
padding-inline: 4px;
|
|
1509
|
+
`,Yx=k.styled(rY)`
|
|
1510
|
+
display: flex;
|
|
1511
|
+
/* ensures no selection */
|
|
1512
|
+
user-select: none;
|
|
1513
|
+
/* disable browser handling of all panning and zooming gestures on touch devices */
|
|
1514
|
+
touch-action: none;
|
|
1515
|
+
|
|
1516
|
+
&[data-orientation='vertical'] {
|
|
1517
|
+
width: 0.4rem;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
&[data-orientation='horizontal'] {
|
|
1521
|
+
flex-direction: column;
|
|
1522
|
+
height: 0.4rem;
|
|
1523
|
+
}
|
|
1524
|
+
`,Xx=k.styled(iY)`
|
|
1525
|
+
position: relative;
|
|
1526
|
+
flex: 1;
|
|
1527
|
+
background-color: ${t=>t.theme.colors.neutral150};
|
|
1528
|
+
border-radius: var(--scrollbar-size);
|
|
1529
|
+
|
|
1530
|
+
/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
|
|
1531
|
+
&::before {
|
|
1532
|
+
content: '';
|
|
1533
|
+
position: absolute;
|
|
1534
|
+
top: 50%;
|
|
1535
|
+
left: 50%;
|
|
1536
|
+
transform: translate(-50%, -50%);
|
|
1537
|
+
width: 100%;
|
|
1538
|
+
height: 100%;
|
|
1539
|
+
min-width: 44px;
|
|
1540
|
+
min-height: 44px;
|
|
1541
|
+
}
|
|
1542
|
+
`,VJ=wy,HJ=S.forwardRef((t,e)=>m.jsx(xy,{...t,asChild:!0,ref:e})),PJ=S.forwardRef((t,e)=>m.jsx(vy,{children:m.jsx(WJ,{children:m.jsx(zJ,{ref:e,...t})})})),WJ=k.styled(yy)`
|
|
1543
|
+
background: ${t=>NJ(t.theme.colors.neutral800,.2)};
|
|
1544
|
+
position: fixed;
|
|
1545
|
+
inset: 0;
|
|
1546
|
+
z-index: ${t=>t.theme.zIndices.overlay};
|
|
1547
|
+
|
|
1548
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1549
|
+
animation: ${mt.overlayFadeIn} ${t=>t.theme.motion.timings[200]}
|
|
1550
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
1551
|
+
}
|
|
1552
|
+
`,zJ=k.styled(Cy)`
|
|
1553
|
+
max-width: 83rem;
|
|
1554
|
+
max-height: 90vh;
|
|
1555
|
+
height: auto;
|
|
1556
|
+
width: 60%;
|
|
1557
|
+
overflow: hidden;
|
|
1558
|
+
margin: 0 auto;
|
|
1559
|
+
display: flex;
|
|
1560
|
+
flex-direction: column;
|
|
1561
|
+
|
|
1562
|
+
position: fixed;
|
|
1563
|
+
top: 50%;
|
|
1564
|
+
left: 50%;
|
|
1565
|
+
transform: translate(-50%, -50%);
|
|
1566
|
+
|
|
1567
|
+
border-radius: ${t=>t.theme.borderRadius};
|
|
1568
|
+
background-color: ${t=>t.theme.colors.neutral0};
|
|
1569
|
+
box-shadow: ${t=>t.theme.shadows.popupShadow};
|
|
1570
|
+
z-index: ${t=>t.theme.zIndices.modal};
|
|
1571
|
+
|
|
1572
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1573
|
+
&[data-state='open'] {
|
|
1574
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
1575
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
1576
|
+
animation-name: ${mt.modalPopIn};
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
&[data-state='closed'] {
|
|
1580
|
+
animation-duration: ${t=>t.theme.motion.timings[120]};
|
|
1581
|
+
animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
|
|
1582
|
+
animation-name: ${mt.modalPopOut};
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
`,c8=S.forwardRef((t,e)=>m.jsx(wp,{...t,asChild:!0,ref:e})),UJ=S.forwardRef(({children:t,closeLabel:e="Close modal",...n},r)=>m.jsxs(qJ,{ref:r,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...n,tag:"header",children:[t,m.jsx(c8,{children:m.jsx(cl,{withTooltip:!1,label:e,children:m.jsx(Hi,{})})})]})),qJ=k.styled(ge)`
|
|
1586
|
+
border-bottom: solid 1px ${t=>t.theme.colors.neutral150};
|
|
1587
|
+
`,KJ=S.forwardRef((t,e)=>m.jsx($y,{asChild:!0,children:m.jsx(Re,{tag:"h2",variant:"omega",fontWeight:"bold",ref:e,...t})})),GJ=S.forwardRef(({children:t,...e},n)=>m.jsx(YJ,{ref:n,...e,children:t})),YJ=k.styled(l8)`
|
|
1588
|
+
padding-inline: ${t=>t.theme.spaces[8]};
|
|
1589
|
+
|
|
1590
|
+
& > div {
|
|
1591
|
+
padding-block: ${t=>t.theme.spaces[8]};
|
|
1592
|
+
|
|
1593
|
+
& > div {
|
|
1594
|
+
// the scroll area component applies a display: table to the child, which we don't want.
|
|
1595
|
+
display: block !important;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
`,XJ=S.forwardRef((t,e)=>m.jsx(QJ,{ref:e,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...t,tag:"footer"})),QJ=k.styled(ge)`
|
|
1599
|
+
border-top: solid 1px ${t=>t.theme.colors.neutral150};
|
|
1600
|
+
flex: 1;
|
|
1601
|
+
`,ZJ=Object.freeze(Object.defineProperty({__proto__:null,Body:GJ,Close:c8,Content:PJ,Footer:XJ,Header:UJ,Root:VJ,Title:KJ,Trigger:HJ},Symbol.toStringTag,{value:"Module"})),JJ="";S.forwardRef(({startAction:t,locale:e,onValueChange:n,value:r,step:i=1,disabled:o=!1,...s},a)=>{const c=fh("NumberInput"),f=e||c.locale,h=S.useRef(new QC(f,{style:"decimal"})),d=S.useRef(new XC(f,{maximumFractionDigits:20})),[p,b]=eee({prop(I){const _=String(r);return isNaN(Number(_))||_!==I&&I!==""?I:d.current.format(Number(r))},defaultProp:JJ,onChange(I){const _=h.current.parse(I??"");n(isNaN(_)?void 0:_)}}),x=I=>{b(String(I))},v=({target:{value:I}})=>{h.current.isValidPartialNumber(I)&&x(I)},$=(I=>{const _=I.toString();return _.includes(".")?_.split(".")[1].length:0})(i),A=()=>{if(!p){x(i);return}const I=h.current.parse(p),_=isNaN(I)?i:I+i,V=parseFloat(_.toFixed($));x(d.current.format(V))},T=()=>{if(!p){x(-i);return}const I=h.current.parse(p),_=isNaN(I)?-i:I-i,V=parseFloat(_.toFixed($));x(d.current.format(V))},M=I=>{if(!o)switch(I.key){case At.DOWN:{I.preventDefault(),T();break}case At.UP:{I.preventDefault(),A();break}}},O=()=>{if(p){const I=h.current.parse(p),_=isNaN(I)?"":d.current.format(I);x(_)}};return m.jsx(uh,{ref:a,startAction:t,disabled:o,type:"text",inputMode:"decimal",onChange:v,onKeyDown:M,onBlur:O,value:p,endAction:m.jsxs(ge,{direction:"column",children:[m.jsx(Qx,{disabled:o,"aria-hidden":!0,$reverse:!0,onClick:A,tabIndex:-1,type:"button","data-testid":"ArrowUp",children:m.jsx(Oi,{fill:"neutral500"})}),m.jsx(Qx,{disabled:o,"aria-hidden":!0,onClick:T,tabIndex:-1,type:"button","data-testid":"ArrowDown",children:m.jsx(Oi,{fill:"neutral500"})})]}),...s})});const Qx=k.styled.button`
|
|
1602
|
+
display: flex;
|
|
1603
|
+
justify-content: center;
|
|
1604
|
+
align-items: center;
|
|
1605
|
+
transform: translateY(${({$reverse:t})=>t?"-2px":"2px"});
|
|
1606
|
+
cursor: ${({disabled:t})=>t?"not-allowed":void 0};
|
|
1607
|
+
height: 1.1rem;
|
|
1608
|
+
|
|
1609
|
+
svg {
|
|
1610
|
+
width: 1.2rem;
|
|
1611
|
+
transform: ${({$reverse:t})=>t?"rotateX(180deg)":void 0};
|
|
1612
|
+
}
|
|
1613
|
+
`;function eee({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=A$({defaultProp:e,onChange:n}),o=t!==void 0,s=t instanceof Function?t(r):t,a=o?s:r,c=Vg(n),f=S.useCallback(h=>{if(o){const p=typeof h=="function"?h(s):h;p!==s&&(c(p),i(h))}else i(h)},[o,s,i,c]);return[a,f]}const tee=S.createContext({activePage:1,pageCount:1}),gm=()=>S.useContext(tee);nn(({children:t,...e},n)=>{const{activePage:r}=gm(),i=r===1;return m.jsxs(f8,{ref:n,"aria-disabled":i,tabIndex:i?-1:void 0,...e,children:[m.jsx(Bo,{children:t}),m.jsx(F3,{"aria-hidden":!0})]})});nn(({children:t,...e},n)=>{const{activePage:r,pageCount:i}=gm(),o=r===i;return m.jsxs(f8,{ref:n,"aria-disabled":o,tabIndex:o?-1:void 0,...e,children:[m.jsx(Bo,{children:t}),m.jsx(up,{"aria-hidden":!0})]})});const u8=k.styled(Dl)`
|
|
1614
|
+
padding: ${({theme:t})=>t.spaces[3]};
|
|
1615
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1616
|
+
box-shadow: ${({$active:t,theme:e})=>t?e.shadows.filterShadow:void 0};
|
|
1617
|
+
text-decoration: none;
|
|
1618
|
+
display: flex;
|
|
1619
|
+
|
|
1620
|
+
${sh}
|
|
1621
|
+
`,f8=k.styled(u8)`
|
|
1622
|
+
font-size: 1.1rem;
|
|
1623
|
+
|
|
1624
|
+
svg path {
|
|
1625
|
+
fill: ${t=>t["aria-disabled"]?t.theme.colors.neutral300:t.theme.colors.neutral600};
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
&:focus,
|
|
1629
|
+
&:hover {
|
|
1630
|
+
svg path {
|
|
1631
|
+
fill: ${t=>t["aria-disabled"]?t.theme.colors.neutral300:t.theme.colors.neutral700};
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
${t=>t["aria-disabled"]?`
|
|
1636
|
+
pointer-events: none;
|
|
1637
|
+
`:void 0}
|
|
1638
|
+
`;nn(({number:t,children:e,...n},r)=>{const{activePage:i}=gm(),o=i===t;return m.jsxs(nee,{ref:r,...n,"aria-current":o,$active:o,children:[m.jsx(Bo,{children:e}),m.jsx(Re,{"aria-hidden":!0,fontWeight:o?"bold":void 0,lineHeight:"revert",variant:"pi",children:t})]})});const nee=k.styled(u8)`
|
|
1639
|
+
color: ${({theme:t,$active:e})=>e?t.colors.primary700:t.colors.neutral800};
|
|
1640
|
+
background: ${({theme:t,$active:e})=>e?t.colors.neutral0:void 0};
|
|
1641
|
+
|
|
1642
|
+
&:hover {
|
|
1643
|
+
box-shadow: ${({theme:t})=>t.shadows.filterShadow};
|
|
1644
|
+
}
|
|
1645
|
+
`,ree=CY,iee=S.forwardRef((t,e)=>m.jsx($Y,{...t,asChild:!0,ref:e})),oee=S.forwardRef((t,e)=>m.jsx(SY,{children:m.jsx(see,{sideOffset:4,side:"bottom",align:"start",...t,ref:e})})),see=k.styled(AY)`
|
|
1646
|
+
box-shadow: ${({theme:t})=>t.shadows.filterShadow};
|
|
1647
|
+
z-index: ${({theme:t})=>t.zIndices.popover};
|
|
1648
|
+
background-color: ${t=>t.theme.colors.neutral0};
|
|
1649
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
1650
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1651
|
+
|
|
1652
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1653
|
+
animation-duration: ${t=>t.theme.motion.timings[200]};
|
|
1654
|
+
|
|
1655
|
+
&[data-state='open'] {
|
|
1656
|
+
animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
|
|
1657
|
+
|
|
1658
|
+
&[data-side='top'] {
|
|
1659
|
+
animation-name: ${mt.slideUpIn};
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
&[data-side='bottom'] {
|
|
1663
|
+
animation-name: ${mt.slideDownIn};
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
&[data-state='closed'] {
|
|
1668
|
+
animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
|
|
1669
|
+
|
|
1670
|
+
&[data-side='top'] {
|
|
1671
|
+
animation-name: ${mt.slideUpOut};
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
&[data-side='bottom'] {
|
|
1675
|
+
animation-name: ${mt.slideDownOut};
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
`,aee=S.forwardRef(({children:t,intersectionId:e,onReachEnd:n,...r},i)=>{const o=S.useRef(null),s=gn(o,i),a=Tn();return Il(o,n??(()=>{}),{selectorToWatch:`#${Hs(a)}`,skipWhen:!e||!n}),m.jsxs(lee,{ref:s,...r,children:[t,e&&n&&m.jsx(xe,{id:Hs(a),width:"100%",height:"1px"})]})}),lee=k.styled(l8)`
|
|
1680
|
+
height: 20rem;
|
|
1681
|
+
`,cee=Object.freeze(Object.defineProperty({__proto__:null,Content:oee,Root:ree,ScrollArea:aee,Trigger:iee},Symbol.toStringTag,{value:"Module"}));S.forwardRef(({size:t="M",value:e,...n},r)=>m.jsx(uee,{ref:r,$size:t,...n,children:m.jsx(fee,{style:{transform:`translate3D(-${100-(e??0)}%, 0, 0)`}})}));const uee=k.styled(_Y)`
|
|
1682
|
+
position: relative;
|
|
1683
|
+
overflow: hidden;
|
|
1684
|
+
width: ${t=>t.$size==="S"?"7.8rem":"10.2rem"};
|
|
1685
|
+
height: ${t=>t.$size==="S"?"0.4rem":"0.8rem"};
|
|
1686
|
+
background-color: ${t=>t.theme.colors.neutral600};
|
|
1687
|
+
border-radius: ${t=>t.theme.borderRadius};
|
|
1688
|
+
|
|
1689
|
+
/* Fix overflow clipping in Safari */
|
|
1690
|
+
/* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
|
|
1691
|
+
transform: translateZ(0);
|
|
1692
|
+
`,fee=k.styled(LY)`
|
|
1693
|
+
background-color: ${({theme:t})=>t.colors.neutral0};
|
|
1694
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1695
|
+
width: 100%;
|
|
1696
|
+
height: 100%;
|
|
1697
|
+
|
|
1698
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1699
|
+
transition: transform ${t=>t.theme.motion.timings[320]}
|
|
1700
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
1701
|
+
}
|
|
1702
|
+
`;S.forwardRef((t,e)=>m.jsx(hee,{ref:e,...t}));const hee=k.styled(QY)`
|
|
1703
|
+
display: flex;
|
|
1704
|
+
flex-direction: column;
|
|
1705
|
+
gap: ${t=>t.theme.spaces[3]};
|
|
1706
|
+
`;S.forwardRef(({children:t,id:e,...n},r)=>{const i=Tn(e);return m.jsxs(ge,{gap:2,children:[m.jsx(dee,{id:i,ref:r,...n,children:m.jsx(gee,{})}),m.jsx(Re,{tag:"label",htmlFor:i,children:t})]})});const dee=k.styled(ZY)`
|
|
1707
|
+
background: ${t=>t.theme.colors.neutral0};
|
|
1708
|
+
width: 2rem;
|
|
1709
|
+
height: 2rem;
|
|
1710
|
+
flex: 0 0 2rem;
|
|
1711
|
+
border-radius: 50%;
|
|
1712
|
+
border: 1px solid ${t=>t.theme.colors.neutral300};
|
|
1713
|
+
position: relative;
|
|
1714
|
+
z-index: 0;
|
|
1715
|
+
|
|
1716
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1717
|
+
transition: border-color ${t=>t.theme.motion.timings[120]}
|
|
1718
|
+
${t=>t.theme.motion.easings.easeOutQuad};
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
&[data-state='checked'] {
|
|
1722
|
+
border: 1px solid ${t=>t.theme.colors.primary600};
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
&[data-disabled] {
|
|
1726
|
+
background-color: ${t=>t.theme.colors.neutral200};
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
|
|
1730
|
+
&::before {
|
|
1731
|
+
content: '';
|
|
1732
|
+
position: absolute;
|
|
1733
|
+
top: 50%;
|
|
1734
|
+
left: 50%;
|
|
1735
|
+
transform: translate(-50%, -50%);
|
|
1736
|
+
width: 100%;
|
|
1737
|
+
height: 100%;
|
|
1738
|
+
min-width: 44px;
|
|
1739
|
+
min-height: 44px;
|
|
1740
|
+
}
|
|
1741
|
+
`,gee=k.styled(JY)`
|
|
1742
|
+
display: flex;
|
|
1743
|
+
align-items: center;
|
|
1744
|
+
justify-content: center;
|
|
1745
|
+
width: 100%;
|
|
1746
|
+
height: 100%;
|
|
1747
|
+
position: relative;
|
|
1748
|
+
|
|
1749
|
+
&[data-state='checked'] {
|
|
1750
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1751
|
+
animation: ${mt.popIn} ${t=>t.theme.motion.timings[200]};
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
&::after {
|
|
1756
|
+
content: '';
|
|
1757
|
+
display: block;
|
|
1758
|
+
width: 1rem;
|
|
1759
|
+
height: 1rem;
|
|
1760
|
+
border-radius: 50%;
|
|
1761
|
+
background: ${t=>t.theme.colors.primary600};
|
|
1762
|
+
}
|
|
1763
|
+
`,pee=t=>{const e=t.querySelector('[tabindex="0"]');e&&e.focus()},h8=S.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),mee=()=>S.useContext(h8),bee=S.forwardRef(({colCount:t,rowCount:e,jumpStep:n=3,initialCol:r=0,initialRow:i=0,...o},s)=>{const a=S.useRef(null),c=S.useRef(!1),f=gn(a,s),[h,d]=S.useState(i),[p,b]=S.useState(r),x=S.useCallback(({colIndex:$,rowIndex:A})=>{b($),d(A)},[]);S.useEffect(()=>{c.current&&pee(a.current),c.current||(c.current=!0)},[p,h]);const v=$=>{switch($.key){case At.RIGHT:{$.preventDefault(),b(A=>A<t-1?A+1:A);break}case At.LEFT:{$.preventDefault(),b(A=>A>0?A-1:A);break}case At.UP:{$.preventDefault(),d(A=>A>0?A-1:A);break}case At.DOWN:{$.preventDefault(),d(A=>A<e-1?A+1:A);break}case At.HOME:{$.preventDefault(),$.ctrlKey&&d(0),b(0);break}case At.END:{$.preventDefault(),$.ctrlKey&&d(e-1),b(t-1);break}case At.PAGE_DOWN:{$.preventDefault(),d(A=>A+n<e?A+n:e-1);break}case At.PAGE_UP:{$.preventDefault(),d(A=>A-n>0?A-n:0);break}}},C=S.useMemo(()=>({rowIndex:h,colIndex:p,setTableValues:x}),[p,h,x]);return m.jsx(h8.Provider,{value:C,children:m.jsx("table",{role:"grid",ref:f,"aria-rowcount":e,"aria-colcount":t,onKeyDown:v,...o})})}),ao=(t,e)=>[...t.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(i=>i.hasAttribute("disabled")?!1:e?!0:i.getAttribute("tabindex")!=="-1"),O0=t=>t.filter(e=>e.tagName==="INPUT"?e.type!=="checkbox"&&e.type!=="radio":!1),d8=S.forwardRef(({coords:t={col:0,row:0},tag:e="td",...n},r)=>{const i=S.useRef(null),o=gn(r,i),{rowIndex:s,colIndex:a,setTableValues:c}=mee(),[f,h]=S.useState(!1),d=x=>{const v=ao(i.current,!0);if(v.length===0||v.length===1&&O0(v).length===0)return;if(v.length>1&&!v.find($=>$.tagName!=="BUTTON")){x.preventDefault();const $=v.findIndex(A=>A===document.activeElement);if(x.key===At.RIGHT){const A=v[$+1];A&&(x.stopPropagation(),A.focus())}else if(x.key===At.LEFT){const A=v[$-1];A&&(x.stopPropagation(),A.focus())}return}const C=x.key===At.ENTER;if(C&&!f)h(!0);else if((x.key===At.ESCAPE||C)&&f){if(C&&document.activeElement?.tagName==="A")return;h(!1),i.current.focus()}else f&&x.stopPropagation()},p=s===t.row-1&&a===t.col-1;ko(()=>{const x=ao(i.current,!0);x.length===0||x.length===1&&O0(x).length!==0||x.length>1&&x.find(v=>v.tagName!=="BUTTON")?(i.current.setAttribute("tabIndex",!f&&p?"0":"-1"),x.forEach((v,C)=>{v.setAttribute("tabIndex",f?"0":"-1"),f&&C===0&&v.focus()})):x.forEach(v=>{v.setAttribute("tabIndex",p?"0":"-1")})},[f,p]);const b=S.useCallback(()=>{const x=ao(i.current,!0);x.length>=1&&(O0(x).length!==0||!x.find(v=>v.tagName!=="BUTTON"))&&h(!0),c({rowIndex:t.row-1,colIndex:t.col-1})},[t,c]);return ko(()=>{const x=i.current;return ao(x,!0).forEach(C=>{C.addEventListener("focus",b)}),()=>{ao(x,!0).forEach($=>{$.removeEventListener("focus",b)})}},[b]),m.jsx(xe,{role:"gridcell",tag:e,ref:o,onKeyDown:d,...n})}),wee=t=>m.jsx(d8,{...t,tag:"th"}),xee=({children:t,...e})=>{const n=S.Children.toArray(t).map(r=>S.isValidElement(r)?S.cloneElement(r,{"aria-rowindex":1}):r);return m.jsx("thead",{...e,children:n})},vee=({children:t,...e})=>{const n=S.Children.toArray(t).map((r,i)=>S.isValidElement(r)?S.cloneElement(r,{"aria-rowindex":i+2}):r);return m.jsx("tbody",{...e,children:n})},yee=({children:t,...e})=>{const n=S.Children.toArray(t).map((r,i)=>S.isValidElement(r)?S.cloneElement(r,{"aria-colindex":i+1,coords:{col:i+1,row:e["aria-rowindex"]}}):r);return m.jsx(xe,{tag:"tr",...e,children:n})},Cee=k.styled(Hi)`
|
|
1764
|
+
font-size: 0.5rem;
|
|
1765
|
+
path {
|
|
1766
|
+
fill: ${({theme:t})=>t.colors.neutral400};
|
|
1767
|
+
}
|
|
1768
|
+
`,g8=k.styled(H3)`
|
|
1769
|
+
font-size: 0.8rem;
|
|
1770
|
+
path {
|
|
1771
|
+
fill: ${({theme:t})=>t.colors.neutral800};
|
|
1772
|
+
}
|
|
1773
|
+
`,$ee=k.styled.div`
|
|
1774
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
1775
|
+
box-shadow: ${({theme:t})=>t.shadows.filterShadow};
|
|
1776
|
+
|
|
1777
|
+
&:focus-within {
|
|
1778
|
+
${g8} {
|
|
1779
|
+
fill: ${({theme:t})=>t.colors.primary600};
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
`,See=k.styled(uh)`
|
|
1783
|
+
border: 1px solid transparent;
|
|
1784
|
+
|
|
1785
|
+
&:hover {
|
|
1786
|
+
button {
|
|
1787
|
+
cursor: pointer;
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
${zi()}
|
|
1792
|
+
`,Aee=S.forwardRef(({name:t,children:e,value:n="",onClear:r,clearLabel:i,...o},s)=>{const a=S.useRef(null),c=n.length>0,f=d=>{r(d),a.current.focus()},h=E$(s,a);return m.jsx($ee,{children:m.jsxs(To,{name:t,children:[m.jsx(Bo,{children:m.jsx(fm,{children:e})}),m.jsx(See,{ref:h,value:n,startAction:m.jsx(g8,{"aria-hidden":!0}),endAction:c?m.jsx(q$,{label:i,onClick:f,onMouseDown:d=>{d.preventDefault()},children:m.jsx(Cee,{})}):void 0,...o})]})})}),Ree=t=>m.jsx("form",{...t,role:"search"}),kee=k.styled(xe)`
|
|
1793
|
+
display: inline-flex;
|
|
1794
|
+
border: none;
|
|
1795
|
+
|
|
1796
|
+
& > svg {
|
|
1797
|
+
height: 1.2rem;
|
|
1798
|
+
width: 1.2rem;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
& > svg path {
|
|
1802
|
+
fill: ${({theme:t,...e})=>e["aria-disabled"]?t.colors.neutral600:t.colors.primary600};
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
&:hover {
|
|
1806
|
+
cursor: ${({$iconAction:t})=>t?"pointer":"initial"};
|
|
1807
|
+
}
|
|
1808
|
+
`,Tee=({children:t,icon:e,label:n,disabled:r=!1,onClick:i,...o})=>{const s=a=>{r||!i||i(a)};return m.jsxs(ge,{inline:!0,background:r?"neutral200":"primary100",color:r?"neutral700":"primary600",paddingLeft:3,paddingRight:1,borderColor:r?"neutral300":"primary200",hasRadius:!0,height:"3.2rem",...o,children:[m.jsx(Eee,{$disabled:r,variant:"pi",fontWeight:"bold",children:t}),m.jsx(kee,{tag:"button",disabled:r,"aria-disabled":r,"aria-label":n,padding:2,onClick:s,$iconAction:!!i,children:e})]})},Eee=k.styled(Re)`
|
|
1809
|
+
color: inherit;
|
|
1810
|
+
border-right: 1px solid ${({theme:t,$disabled:e})=>e?t.colors.neutral300:t.colors.primary200};
|
|
1811
|
+
padding-right: ${({theme:t})=>t.spaces[2]};
|
|
1812
|
+
`,Mee=S.forwardRef(({children:t,clearLabel:e="Clear",customizeContent:n,disabled:r,hasError:i,id:o,name:s,onChange:a,onClear:c,onCloseAutoFocus:f,onReachEnd:h,placeholder:d,required:p,size:b,startIcon:x,value:v,withTags:C,...$},A)=>{const T=S.useRef(null),[M,O]=S.useState(),[I,_]=S.useState(!1),V=we=>{a?a(we):O(we)},F=we=>()=>{const Ve=Array.isArray(v)?v.filter(Ne=>Ne!==we):(M??[]).filter(Ne=>Ne!==we);a?a(Ve):O(Ve)},H=we=>{_(we)},z=Tn(),W=`intersection-${Hs(z)}`;Il(T,we=>{h&&h(we)},{selectorToWatch:`#${W}`,skipWhen:!I});const K=typeof v<"u"&&v!==null?v:M,te=we=>we&&typeof we=="object"&&we.value?m.jsx(Tee,{tabIndex:-1,disabled:r,icon:m.jsx(Hi,{width:`${14/16}rem`,height:`${14/16}rem`}),onClick:F(we.value),children:we.textValue},we.value):null,{error:ie,...ne}=pn("MultiSelect"),oe=!!ie||i,X=ne.id??o,ce=ne.name??s,fe=ne.required??p;let Me;return ie?Me=`${X}-error`:ne.hint&&(Me=`${X}-hint`),m.jsxs(X$,{onOpenChange:H,disabled:r,required:fe,onValueChange:V,value:K,...$,multi:!0,children:[m.jsx(Q$,{ref:A,id:X,name:ce,"aria-label":$["aria-label"],"aria-describedby":Me??$["aria-describedby"],startIcon:x,hasError:oe,disabled:r,clearLabel:e,onClear:K?.length?c:void 0,withTags:!!(C&&(K?.length??!1)),size:b,children:m.jsx(Z$,{placeholder:d,textColor:K?.length?"neutral800":"neutral600",children:K?.length?C?te:n?n(K):void 0:void 0})}),m.jsx(J$,{children:m.jsx(e8,{position:"popper",sideOffset:4,onCloseAutoFocus:f,children:m.jsxs(t8,{ref:T,children:[t,m.jsx(xe,{id:W,width:"100%",height:"1px"})]})})})]})}),p8=S.forwardRef(({value:t,children:e,startIcon:n,...r},i)=>m.jsxs(dm,{ref:i,value:t.toString(),...r,children:[n&&m.jsx(xe,{tag:"span","aria-hidden":!0,children:n}),m.jsx(n8,{children:({isSelected:o,isIntermediate:s})=>m.jsx(ch,{checked:s?"indeterminate":o})}),m.jsx(Re,{children:m.jsx(r8,{children:e})})]}));S.forwardRef(({children:t,label:e,startIcon:n,values:r=[],...i},o)=>m.jsxs(rJ,{ref:o,children:[m.jsxs(dm,{value:r,...i,children:[n&&m.jsx(xe,{tag:"span","aria-hidden":!0,children:n}),m.jsx(n8,{children:({isSelected:s,isIntermediate:a})=>m.jsx(ch,{checked:a?"indeterminate":s})}),m.jsx(Re,{children:e})]}),t]}));k.styled(p8)`
|
|
1813
|
+
padding-left: ${({theme:t})=>t.spaces[7]};
|
|
1814
|
+
`;const Oee="23.2rem",Dee=S.forwardRef(({...t},e)=>m.jsx(Iee,{ref:e,...t,tag:"nav"})),Iee=k.styled(xe)`
|
|
1815
|
+
width: ${Oee};
|
|
1816
|
+
background: ${({theme:t})=>t.colors.neutral100};
|
|
1817
|
+
position: sticky;
|
|
1818
|
+
top: 0;
|
|
1819
|
+
height: 100vh;
|
|
1820
|
+
overflow-y: auto;
|
|
1821
|
+
border-right: 1px solid ${({theme:t})=>t.colors.neutral200};
|
|
1822
|
+
z-index: 1;
|
|
1823
|
+
`,Zx=k.styled(o8)`
|
|
1824
|
+
width: 2.4rem;
|
|
1825
|
+
background-color: ${({theme:t})=>t.colors.neutral200};
|
|
1826
|
+
`,_ee=({tag:t="h2",label:e,searchLabel:n="",searchable:r=!1,onChange:i=()=>{},value:o="",onClear:s=()=>{},onSubmit:a=()=>{},id:c,placeholder:f})=>{const[h,d]=S.useState(!1),p=Jv(h),b=Tn(c),x=S.useRef(void 0),v=S.useRef(void 0);S.useEffect(()=>{h&&x.current&&x.current.focus(),p&&!h&&v.current&&v.current.focus()},[h,p]);const C=()=>{d(M=>!M)},$=M=>{s(M),x.current.focus()},A=M=>{M.relatedTarget?.id!==b&&d(!1)},T=M=>{M.key===At.ESCAPE&&d(!1)};return h?m.jsxs(xe,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[m.jsx(Ree,{children:m.jsx(Aee,{name:"searchbar",value:o,onChange:i,placeholder:f,onKeyDown:T,ref:x,onBlur:A,onClear:$,onSubmit:a,clearLabel:"Clear",children:n})}),m.jsx(xe,{paddingLeft:2,paddingTop:4,children:m.jsx(Zx,{})})]}):m.jsxs(ge,{direction:"column",alignItems:"flex-start",paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[m.jsxs(ge,{justifyContent:"space-between",alignItems:"flex-start",width:"100%",gap:2,children:[m.jsx(Re,{variant:"beta",tag:t,children:e}),r&&m.jsx(cl,{ref:v,onClick:C,label:n,children:m.jsx(H3,{})})]}),m.jsx(xe,{paddingTop:4,children:m.jsx(Zx,{})})]})},Lee=nn(({active:t,children:e,icon:n=null,withBullet:r=!1,isSubSectionChild:i=!1,...o},s)=>m.jsxs(Bee,{background:"neutral100",paddingLeft:i?9:7,paddingBottom:2,paddingTop:2,ref:s,...o,children:[m.jsxs(ge,{children:[n?m.jsx(Nee,{children:n}):m.jsx(dg,{$active:t}),m.jsx(Re,{paddingLeft:2,children:e})]}),r&&m.jsx(ge,{paddingRight:4,children:m.jsx(dg,{$active:!0})})]})),dg=k.styled.span`
|
|
1827
|
+
width: 0.4rem;
|
|
1828
|
+
height: 0.4rem;
|
|
1829
|
+
background-color: ${({theme:t,$active:e})=>e?t.colors.primary600:t.colors.neutral600};
|
|
1830
|
+
border-radius: 50%;
|
|
1831
|
+
`,Bee=k.styled(Dl)`
|
|
1832
|
+
display: flex;
|
|
1833
|
+
align-items: center;
|
|
1834
|
+
justify-content: space-between;
|
|
1835
|
+
text-decoration: none;
|
|
1836
|
+
color: ${({theme:t})=>t.colors.neutral800};
|
|
1837
|
+
svg > * {
|
|
1838
|
+
fill: ${({theme:t})=>t.colors.neutral600};
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
&.active {
|
|
1842
|
+
${({theme:t})=>k.css`
|
|
1843
|
+
background-color: ${t.colors.primary100};
|
|
1844
|
+
border-right: 2px solid ${t.colors.primary600};
|
|
1845
|
+
color: ${t.colors.primary700};
|
|
1846
|
+
font-weight: 500;
|
|
1847
|
+
`}
|
|
1848
|
+
|
|
1849
|
+
${dg} {
|
|
1850
|
+
background-color: ${({theme:t})=>t.colors.primary600};
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
&:focus-visible {
|
|
1855
|
+
outline-offset: -2px;
|
|
1856
|
+
}
|
|
1857
|
+
`,Nee=k.styled.div`
|
|
1858
|
+
svg {
|
|
1859
|
+
height: 1.6rem;
|
|
1860
|
+
width: 1.6rem;
|
|
1861
|
+
}
|
|
1862
|
+
`;k.styled.button`
|
|
1863
|
+
border: none;
|
|
1864
|
+
padding: 0;
|
|
1865
|
+
background: transparent;
|
|
1866
|
+
display: flex;
|
|
1867
|
+
align-items: center;
|
|
1868
|
+
`;const jee=({collapsable:t=!1,label:e,onClick:n=()=>{},ariaExpanded:r,ariaControls:i})=>t?m.jsxs(ge,{tag:"button",onClick:n,"aria-expanded":r,"aria-controls":i,textAlign:"left",alignItems:"center",children:[m.jsx(xe,{paddingRight:1,children:m.jsx(Re,{variant:"sigma",textColor:"neutral600",children:e})}),t&&m.jsx(Oi,{width:"1.2rem","aria-hidden":!0,fill:"neutral500",style:{transform:r?"rotateX(0deg)":"rotateX(180deg)"}})]}):m.jsx(ge,{children:m.jsx(xe,{paddingRight:1,children:m.jsx(Re,{variant:"sigma",textColor:"neutral600",children:e})})}),Fee=k.styled(xe)`
|
|
1869
|
+
& > svg {
|
|
1870
|
+
height: 0.4rem;
|
|
1871
|
+
fill: ${({theme:t})=>t.colors.neutral500};
|
|
1872
|
+
}
|
|
1873
|
+
`,Vee=({collapsable:t=!1,label:e,badgeLabel:n,children:r,id:i})=>{const[o,s]=S.useState(!0),a=Tn(i),c=()=>{s(f=>!f)};return m.jsxs(ge,{direction:"column",alignItems:"stretch",gap:1,children:[m.jsx(Fee,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:m.jsxs(xe,{position:"relative",paddingRight:n?6:0,children:[m.jsx(jee,{onClick:c,ariaExpanded:o,ariaControls:a,collapsable:t,label:e}),n&&m.jsx(sm,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:n})]})}),(!t||o)&&m.jsx("ol",{id:a,children:S.Children.map(r,(f,h)=>m.jsx("li",{children:f},h))})]})},Hee=({children:t,spacing:e=2,horizontal:n=!1,...r})=>m.jsx(xe,{paddingTop:2,paddingBottom:4,children:m.jsx(ge,{tag:"ol",gap:e,direction:n?"row":"column",alignItems:n?"center":"stretch",...r,children:S.Children.map(t,(i,o)=>m.jsx("li",{children:i},o))})}),Pee=S.forwardRef(({visibleLabels:t,onLabel:e="On",offLabel:n="Off",onCheckedChange:r,checked:i,defaultChecked:o,disabled:s,...a},c)=>{const[f,h]=Cr({prop:i,defaultProp:o}),d=p=>{h(p)};return m.jsxs(ge,{gap:3,children:[m.jsx(Wee,{ref:c,onCheckedChange:uo(r,d),checked:f,disabled:s,...a,children:m.jsx(zee,{})}),t?m.jsx(Uee,{"aria-hidden":!0,"data-disabled":s,"data-state":f?"checked":"unchecked",children:f?e:n}):null]})}),Wee=k.styled(aX)`
|
|
1874
|
+
width: 4rem;
|
|
1875
|
+
height: 2.4rem;
|
|
1876
|
+
border-radius: 1.2rem;
|
|
1877
|
+
background-color: ${({theme:t})=>t.colors.danger500};
|
|
1878
|
+
|
|
1879
|
+
&[data-state='checked'] {
|
|
1880
|
+
background-color: ${({theme:t})=>t.colors.success500};
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
&[data-disabled] {
|
|
1884
|
+
background-color: ${({theme:t})=>t.colors.neutral300};
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1888
|
+
transition: ${t=>t.theme.transitions.backgroundColor};
|
|
1889
|
+
}
|
|
1890
|
+
`,zee=k.styled(lX)`
|
|
1891
|
+
display: block;
|
|
1892
|
+
height: 1.6rem;
|
|
1893
|
+
width: 1.6rem;
|
|
1894
|
+
border-radius: 50%;
|
|
1895
|
+
background-color: ${({theme:t})=>t.colors.neutral0};
|
|
1896
|
+
transform: translateX(4px);
|
|
1897
|
+
|
|
1898
|
+
&[data-state='checked'] {
|
|
1899
|
+
transform: translateX(20px);
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1903
|
+
transition: transform ${t=>t.theme.motion.timings[120]}
|
|
1904
|
+
${t=>t.theme.motion.easings.authenticMotion};
|
|
1905
|
+
}
|
|
1906
|
+
`,Uee=k.styled(Re)`
|
|
1907
|
+
color: ${t=>t.theme.colors.danger600};
|
|
1908
|
+
|
|
1909
|
+
&[data-state='checked'] {
|
|
1910
|
+
color: ${t=>t.theme.colors.success600};
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
&[data-disabled='true'] {
|
|
1914
|
+
color: ${({theme:t})=>t.colors.neutral500};
|
|
1915
|
+
}
|
|
1916
|
+
`,[qee,pm]=Ol("Tabs");S.forwardRef(({disabled:t=!1,variant:e="regular",hasError:n,...r},i)=>m.jsx(qee,{disabled:t,hasError:n,variant:e,children:m.jsx(Kee,{ref:i,...r})}));const Kee=k.styled(wX)`
|
|
1917
|
+
width: 100%;
|
|
1918
|
+
position: relative;
|
|
1919
|
+
`;S.forwardRef((t,e)=>{const{variant:n}=pm("List");return m.jsx(Gee,{ref:e,...t,$variant:n})});const Gee=k.styled(xX)`
|
|
1920
|
+
display: flex;
|
|
1921
|
+
align-items: ${t=>t.$variant==="regular"?"flex-end":"unset"};
|
|
1922
|
+
position: relative;
|
|
1923
|
+
z-index: 0;
|
|
1924
|
+
`;S.forwardRef(({children:t,disabled:e,...n},r)=>{const{disabled:i,variant:o,hasError:s}=pm("Trigger"),a=i===!0||i===n.value||e,c=s===n.value;return m.jsxs(Yee,{ref:r,...n,$hasError:c,$variant:o,disabled:a,children:[m.jsx(b8,{fontWeight:"bold",variant:o==="simple"?"sigma":void 0,children:t}),o==="simple"?m.jsx(m8,{}):null]})});const m8=k.styled.span`
|
|
1925
|
+
display: block;
|
|
1926
|
+
width: 100%;
|
|
1927
|
+
background-color: currentColor;
|
|
1928
|
+
position: absolute;
|
|
1929
|
+
bottom: 0;
|
|
1930
|
+
left: 0;
|
|
1931
|
+
opacity: 0;
|
|
1932
|
+
height: 0.2rem;
|
|
1933
|
+
`,b8=k.styled(Re)``,Yee=k.styled(vX)`
|
|
1934
|
+
position: relative;
|
|
1935
|
+
color: ${t=>t.$hasError?t.theme.colors.danger600:t.theme.colors.neutral600};
|
|
1936
|
+
cursor: pointer;
|
|
1937
|
+
z-index: 0;
|
|
1938
|
+
|
|
1939
|
+
${t=>t.$variant==="simple"?k.css`
|
|
1940
|
+
padding-block: ${e=>e.theme.spaces[4]};
|
|
1941
|
+
padding-inline: ${e=>e.theme.spaces[4]};
|
|
1942
|
+
|
|
1943
|
+
& > ${b8} {
|
|
1944
|
+
line-height: 1.2rem;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
&[data-state='active'] {
|
|
1948
|
+
color: ${t.$hasError?t.theme.colors.danger600:t.theme.colors.primary700};
|
|
1949
|
+
|
|
1950
|
+
& > ${m8} {
|
|
1951
|
+
opacity: 1;
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
`:k.css`
|
|
1955
|
+
padding-block: ${e=>e.theme.spaces[3]};
|
|
1956
|
+
padding-inline: ${e=>e.theme.spaces[3]};
|
|
1957
|
+
flex: 1;
|
|
1958
|
+
background-color: ${e=>e.theme.colors.neutral100};
|
|
1959
|
+
border-bottom: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1960
|
+
|
|
1961
|
+
&:not([data-state='active']) + &:not([data-state='active']) {
|
|
1962
|
+
border-left: solid 1px ${e=>e.theme.colors.neutral150};
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
&[data-state='active'] {
|
|
1966
|
+
padding-block: ${e=>e.theme.spaces[4]};
|
|
1967
|
+
padding-inline: ${e=>e.theme.spaces[4]};
|
|
1968
|
+
color: ${t.$hasError?t.theme.colors.danger600:t.theme.colors.primary700};
|
|
1969
|
+
border-top-right-radius: ${e=>e.theme.borderRadius};
|
|
1970
|
+
border-top-left-radius: ${e=>e.theme.borderRadius};
|
|
1971
|
+
background-color: ${e=>e.theme.colors.neutral0};
|
|
1972
|
+
border-bottom: solid 1px ${e=>e.theme.colors.neutral0};
|
|
1973
|
+
box-shadow: ${t.theme.shadows.tableShadow};
|
|
1974
|
+
z-index: 1;
|
|
1975
|
+
}
|
|
1976
|
+
`}
|
|
1977
|
+
|
|
1978
|
+
&[data-disabled] {
|
|
1979
|
+
cursor: not-allowed;
|
|
1980
|
+
color: ${t=>t.theme.colors.neutral400};
|
|
1981
|
+
}
|
|
1982
|
+
`;S.forwardRef((t,e)=>{const{variant:n}=pm("Content");return m.jsx(Xee,{$variant:n,ref:e,...t})});const Xee=k.styled(yX)`
|
|
1983
|
+
${t=>t.$variant==="simple"?k.css``:k.css`
|
|
1984
|
+
position: relative;
|
|
1985
|
+
z-index: 1;
|
|
1986
|
+
background-color: ${e=>e.theme.colors.neutral0};
|
|
1987
|
+
`}
|
|
1988
|
+
`,Qee=k.styled(xe)`
|
|
1989
|
+
overflow: hidden;
|
|
1990
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
1991
|
+
`,Zee=k.styled(bee)`
|
|
1992
|
+
width: 100%;
|
|
1993
|
+
white-space: nowrap;
|
|
1994
|
+
`,Jee=k.styled(xe)`
|
|
1995
|
+
&:before {
|
|
1996
|
+
// TODO: make sure to add a token for this weird stuff
|
|
1997
|
+
background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
|
|
1998
|
+
opacity: 0.2;
|
|
1999
|
+
position: absolute;
|
|
2000
|
+
height: 100%;
|
|
2001
|
+
content: ${({$overflowing:t})=>t==="both"||t==="left"?"''":void 0};
|
|
2002
|
+
box-shadow: ${({theme:t})=>t.shadows.tableShadow};
|
|
2003
|
+
width: ${({theme:t})=>t.spaces[2]};
|
|
2004
|
+
left: 0;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
&:after {
|
|
2008
|
+
// TODO: make sure to add a token for this weird stuff
|
|
2009
|
+
background: linear-gradient(270deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
|
|
2010
|
+
opacity: 0.2;
|
|
2011
|
+
position: absolute;
|
|
2012
|
+
height: 100%;
|
|
2013
|
+
content: ${({$overflowing:t})=>t==="both"||t==="right"?"''":void 0};
|
|
2014
|
+
box-shadow: ${({theme:t})=>t.shadows.tableShadow};
|
|
2015
|
+
width: ${({theme:t})=>t.spaces[2]};
|
|
2016
|
+
right: 0;
|
|
2017
|
+
top: 0;
|
|
2018
|
+
}
|
|
2019
|
+
`,ete=k.styled(xe)`
|
|
2020
|
+
overflow-x: auto;
|
|
2021
|
+
`,tte=S.forwardRef(({footer:t,...e},n)=>{const r=S.useRef(null),[i,o]=S.useState(),s=a=>{const c=a.target.scrollWidth-a.target.clientWidth;if(a.target.scrollLeft===0){o("right");return}if(a.target.scrollLeft===c){o("left");return}a.target.scrollLeft>0&&o("both")};return S.useEffect(()=>{r.current.scrollWidth>r.current.clientWidth&&o("right")},[]),m.jsxs(Qee,{shadow:"tableShadow",hasRadius:!0,background:"neutral0",children:[m.jsx(Jee,{$overflowing:i,position:"relative",children:m.jsx(ete,{ref:r,onScroll:s,paddingLeft:6,paddingRight:6,children:m.jsx(Zee,{ref:n,...e})})}),t]})}),nte=k.styled(vee)`
|
|
2022
|
+
& tr:last-of-type {
|
|
2023
|
+
border-bottom: none;
|
|
2024
|
+
}
|
|
2025
|
+
`,rte=({children:t,...e})=>m.jsx(nte,{...e,children:t}),ite=k.styled(xee)`
|
|
2026
|
+
border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
2027
|
+
`,ote=({children:t,...e})=>m.jsx(ite,{...e,children:t}),ste=k.styled(yee)`
|
|
2028
|
+
border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
2029
|
+
|
|
2030
|
+
& td,
|
|
2031
|
+
& th {
|
|
2032
|
+
padding: ${({theme:t})=>t.spaces[4]};
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
& td:first-of-type,
|
|
2036
|
+
& th:first-of-type {
|
|
2037
|
+
padding: 0 ${({theme:t})=>t.spaces[1]};
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
// Resetting padding values and fixing a height
|
|
2041
|
+
th {
|
|
2042
|
+
padding-top: 0;
|
|
2043
|
+
padding-bottom: 0;
|
|
2044
|
+
height: 5.6rem;
|
|
2045
|
+
}
|
|
2046
|
+
`,ate=t=>m.jsx(ste,{...t}),w8=k.styled(d8)`
|
|
2047
|
+
vertical-align: middle;
|
|
2048
|
+
text-align: left;
|
|
2049
|
+
outline-offset: -4px;
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Hack to make sure the checkbox looks aligned
|
|
2053
|
+
*/
|
|
2054
|
+
input {
|
|
2055
|
+
vertical-align: sub;
|
|
2056
|
+
}
|
|
2057
|
+
`,lte=S.forwardRef(({children:t,action:e,...n},r)=>m.jsx(w8,{color:"neutral600",as:wee,ref:r,...n,children:m.jsxs(ge,{children:[t,e]})})),cte=S.forwardRef(({children:t,...e},n)=>m.jsx(w8,{color:"neutral800",ref:n,...e,children:t}));k.styled(xe)`
|
|
2058
|
+
height: 2.4rem;
|
|
2059
|
+
width: 2.4rem;
|
|
2060
|
+
border-radius: 50%;
|
|
2061
|
+
display: flex;
|
|
2062
|
+
justify-content: center;
|
|
2063
|
+
align-items: center;
|
|
2064
|
+
|
|
2065
|
+
svg {
|
|
2066
|
+
height: 1rem;
|
|
2067
|
+
width: 1rem;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
svg path {
|
|
2071
|
+
fill: ${({theme:t})=>t.colors.primary600};
|
|
2072
|
+
}
|
|
2073
|
+
`;k.styled(xe)`
|
|
2074
|
+
border-radius: 0 0 ${({theme:t})=>t.borderRadius} ${({theme:t})=>t.borderRadius};
|
|
2075
|
+
display: block;
|
|
2076
|
+
width: 100%;
|
|
2077
|
+
border: none;
|
|
2078
|
+
`;nn(({children:t,startIcon:e,endIcon:n,disabled:r=!1,loading:i=!1,...o},s)=>{const a=r||i;return m.jsxs(hte,{ref:s,disabled:a,"aria-disabled":a,tag:"button",type:"button",gap:2,...o,children:[i?m.jsx(fte,{"aria-hidden":!0,children:m.jsx(V3,{})}):e,m.jsx(Re,{variant:"pi",children:t}),n]})});const ute=k.keyframes`
|
|
2079
|
+
from {
|
|
2080
|
+
transform: rotate(0deg);
|
|
2081
|
+
}
|
|
2082
|
+
to {
|
|
2083
|
+
transform: rotate(359deg);
|
|
2084
|
+
}
|
|
2085
|
+
`,fte=k.styled.span`
|
|
2086
|
+
display: flex;
|
|
2087
|
+
animation: ${ute} 2s infinite linear;
|
|
2088
|
+
will-change: transform;
|
|
2089
|
+
`,hte=k.styled(ge)`
|
|
2090
|
+
border: none;
|
|
2091
|
+
background-color: transparent;
|
|
2092
|
+
color: ${t=>t.theme.colors.primary600};
|
|
2093
|
+
cursor: pointer;
|
|
2094
|
+
|
|
2095
|
+
&[aria-disabled='true'] {
|
|
2096
|
+
pointer-events: none;
|
|
2097
|
+
color: ${t=>t.theme.colors.neutral600};
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
${sh}
|
|
2101
|
+
`,dte=S.forwardRef((t,e)=>m.jsx(uh,{ref:e,...t}));dte.displayName="TextInput";S.forwardRef(({disabled:t,hasError:e,id:n,name:r,required:i,...o},s)=>{const{error:a,...c}=pn("Textarea"),f=!!a||e,h=c.id??n,d=c.name??r,p=c.required||i;let b;return a?b=`${h}-error`:c.hint&&(b=`${h}-hint`),m.jsx(gte,{borderColor:f?"danger600":"neutral200",$hasError:f,hasRadius:!0,children:m.jsx(pte,{"aria-invalid":f,"aria-required":p,tag:"textarea",background:t?"neutral150":"neutral0",color:t?"neutral600":"neutral800",disabled:t,fontSize:2,hasRadius:!0,ref:s,lineHeight:4,padding:4,width:"100%",height:"100%",id:h,name:d,"aria-describedby":b,...o})})});const gte=k.styled(xe)`
|
|
2102
|
+
height: 10.5rem;
|
|
2103
|
+
${zi()}
|
|
2104
|
+
`,pte=k.styled(xe)`
|
|
2105
|
+
border: none;
|
|
2106
|
+
resize: none;
|
|
2107
|
+
|
|
2108
|
+
::placeholder {
|
|
2109
|
+
color: ${({theme:t})=>t.colors.neutral500};
|
|
2110
|
+
font-size: ${({theme:t})=>t.fontSizes[2]};
|
|
2111
|
+
color: ${({theme:t})=>t.colors.neutral500};
|
|
2112
|
+
opacity: 1;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
&:focus-within {
|
|
2116
|
+
outline: none;
|
|
2117
|
+
}
|
|
2118
|
+
`,mte=S.forwardRef(({offLabel:t,onLabel:e,disabled:n,hasError:r,required:i,id:o,name:s,checked:a,onChange:c,...f},h)=>{const[d=!1,p]=Cr({prop:a}),b=d!==null&&!d,{error:x,...v}=pn("Toggle"),C=!!x||r,$=v.id??o,A=v.name??s,T=v.required||i;let M;return x?M=`${$}-error`:v.hint&&(M=`${$}-hint`),m.jsxs(bte,{position:"relative",hasRadius:!0,padding:1,background:n?"neutral150":"neutral100",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral200",wrap:"wrap",cursor:n?"not-allowed":"pointer",$hasError:C,children:[m.jsx(Jx,{hasRadius:!0,flex:"1 1 50%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&b?"neutral200":b?"neutral0":"transparent",borderColor:n&&b?"neutral300":b?"neutral200":n?"neutral150":"neutral100",children:m.jsx(Re,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":b?"danger700":"neutral600",children:t})}),m.jsx(Jx,{hasRadius:!0,flex:"1 1 50%",paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&d?"neutral200":d?"neutral0":"transparent",borderColor:n&&d?"neutral300":d?"neutral200":n?"neutral150":"neutral100",children:m.jsx(Re,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":d?"primary600":"neutral600",children:e})}),m.jsx(wte,{...f,id:$,name:A,ref:h,onChange:O=>{p(O.currentTarget.checked),c?.(O)},type:"checkbox","aria-required":T,disabled:n,"aria-disabled":n,checked:!!d,"aria-describedby":M})]})}),bte=k.styled(ge)`
|
|
2119
|
+
${zi()}
|
|
2120
|
+
`,Jx=k.styled(ge)`
|
|
2121
|
+
padding-block: 0.6rem;
|
|
2122
|
+
`,wte=k.styled.input`
|
|
2123
|
+
height: 100%;
|
|
2124
|
+
left: 0;
|
|
2125
|
+
opacity: 0;
|
|
2126
|
+
position: absolute;
|
|
2127
|
+
top: 0;
|
|
2128
|
+
z-index: 0;
|
|
2129
|
+
width: 100%;
|
|
2130
|
+
`,xte=nn((t,e)=>{const{gap:n=0,gridCols:r=12,...i}=t;return m.jsx(vte,{ref:e,$gap:n,$gridCols:r,...i})}),vte=k.styled(xe)`
|
|
2131
|
+
display: grid;
|
|
2132
|
+
grid-template-columns: repeat(${({$gridCols:t})=>t}, 1fr);
|
|
2133
|
+
${({theme:t,$gap:e})=>oh({gap:e},t)}
|
|
2134
|
+
`,yte=nn(({col:t,s:e,xs:n,m:r,...i},o)=>m.jsx(Cte,{ref:o,$col:t,$s:e,$xs:n,$m:r,...i})),Cte=k.styled(ge)`
|
|
2135
|
+
grid-column: span ${({$xs:t})=>t??12};
|
|
2136
|
+
max-width: 100%;
|
|
2137
|
+
|
|
2138
|
+
${({theme:t})=>t.breakpoints.small} {
|
|
2139
|
+
grid-column: span ${({$s:t,$xs:e})=>t??e??12};
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
${({theme:t})=>t.breakpoints.medium} {
|
|
2143
|
+
grid-column: span ${({$m:t,$s:e,$xs:n})=>t??e??n??12};
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
${({theme:t})=>t.breakpoints.large} {
|
|
2147
|
+
grid-column: span ${({$col:t,$m:e,$s:n,$xs:r})=>t??e??n??r??12};
|
|
2148
|
+
}
|
|
2149
|
+
`,$te=Object.freeze(Object.defineProperty({__proto__:null,Item:yte,Root:xte},Symbol.toStringTag,{value:"Module"})),Ste=({onEscape:t,restoreFocus:e=!0,skipAutoFocus:n=!1,...r})=>{const i=S.useRef(null);S.useEffect(()=>{let s=null;return e&&(s=document.activeElement),()=>{s&&s.focus()}},[e]),S.useEffect(()=>{if(!i.current||n)return;const s=ao(i.current);s.length>0?s[0].focus():console.warn("[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.")},[n]);const o=s=>{if(s.key===At.ESCAPE&&t){t();return}if(s.key!==At.TAB)return;const a=ao(i.current);if(a.length>0){const c=a[0],f=a[a.length-1];s.shiftKey?c===document.activeElement&&(s.preventDefault(),f.focus()):f===document.activeElement&&(s.preventDefault(),c.focus())}};return m.jsx("div",{ref:i,onKeyDown:o,...r})};k.styled(ge)`
|
|
2150
|
+
&>* {
|
|
2151
|
+
width: 100%;
|
|
2152
|
+
}
|
|
2153
|
+
`;const Ate="strapi-plugin-comments",Rte={name:"comments",displayName:"Comments",description:"Powerful Strapi based comments moderation tool for you and your users",kind:"plugin"},kte=576,Tte=({width:t=24,height:e=24})=>m.jsx("svg",{viewBox:`0 0 ${t} ${e}`,xmlns:"http://www.w3.org/2000/svg",height:`${e}px`,children:m.jsx("g",{style:{transform:`scale(${t/kte})`},fill:"currentColor",children:m.jsx("path",{d:"M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z"})})}),Ete=m.jsx(Tte,{}),Mte=()=>Ete,zt={render:t=>`plugin::comments.${t}`,comments:{read:"comments-read",moderate:"comments-moderate"},reports:{read:"reports-read",review:"reports-review"},settings:{read:"settings-read",change:"settings-change"}},gg={access:[{action:zt.render(zt.comments.read),subject:null},{action:zt.render(zt.reports.read),subject:null},{action:zt.render(zt.settings.read),subject:null}],moderate:[{action:zt.render(zt.comments.moderate),subject:null}],reports:[{action:zt.render(zt.reports.read),subject:null}],reportsReview:[{action:zt.render(zt.reports.review),subject:null}],settings:[{action:zt.render(zt.settings.read),subject:null}],settingsChange:[{action:zt.render(zt.settings.change),subject:null}]},zr=Ate.replace(/^strapi-plugin-/i,""),ev={en:()=>Promise.resolve().then(()=>require("./en-CgUbWvmQ.js")),fr:()=>Promise.resolve().then(()=>require("./fr-BXfxIXq1.js")),"pt-BR":()=>Promise.resolve().then(()=>require("./pt-BR-D9T5g0JT.js")),tr:()=>Promise.resolve().then(()=>require("./tr-Dl2hdLCx.js")),ru:()=>Promise.resolve().then(()=>require("./ru-DIZ4pV4l.js")),"zh-Hans":()=>Promise.resolve().then(()=>require("./zh-Hans-BZhnqfei.js")),pl:()=>Promise.resolve().then(()=>require("./pl-Bl4yP3sZ.js"))},{name:Zte,displayName:tv}=Rte,Ote={register(t){t.addMenuLink({to:`/plugins/${zr}`,badgeContent:1,icon:Mte,intlLabel:{id:`${zr}.plugin.name`,defaultMessage:tv},Component:()=>Promise.resolve().then(()=>require("./index-DbSxM8lO.js")),permissions:gg.access}),t.createSettingSection({id:zr,intlLabel:{id:`${zr}.plugin.section`,defaultMessage:`${tv} plugin`}},[{intlLabel:{id:`${zr}.plugin.section.item`,defaultMessage:"Configuration"},id:"comments",to:`/settings/${zr}`,Component:()=>Promise.resolve().then(()=>require("./index-CYrQYscU.js")),permissions:gg.settings}])},registerTrads:async function({locales:t=[]}){return Promise.all(t.map(async e=>e in ev?ev[e]().then(({default:r})=>({data:Ub(D0(r),zr),locale:e})):{data:Ub(D0({}),zr),locale:e}))}};exports.Accordion=GX;exports.Alert=tQ;exports.Avatar=uQ;exports.Badge=sm;exports.Box=xe;exports.Button=bf;exports.CheckboxImpl=ch;exports.DesignSystemProvider=WZ;exports.Dialog=NZ;exports.Divider=o8;exports.Field=dZ;exports.Flex=ge;exports.FocusTrap=Ste;exports.ForwardRef$11=GB;exports.ForwardRef$1L=bB;exports.ForwardRef$1R=hB;exports.ForwardRef$1d=VB;exports.ForwardRef$1f=NB;exports.ForwardRef$1r=EB;exports.ForwardRef$2l=UL;exports.ForwardRef$2v=jL;exports.ForwardRef$3=P3;exports.ForwardRef$3$=Hi;exports.ForwardRef$3B=Y_;exports.ForwardRef$3x=tL;exports.ForwardRef$45=M_;exports.ForwardRef$4R=UI;exports.ForwardRef$4X=VI;exports.ForwardRef$4d=S_;exports.ForwardRef$4x=s_;exports.ForwardRef$51=LI;exports.ForwardRef$59=EI;exports.ForwardRef$R=rN;exports.ForwardRef$f=TN;exports.ForwardRef$j=SN;exports.ForwardRef$v=mN;exports.Grid=$te;exports.IconButton=cl;exports.IconButtonGroup=TQ;exports.Link=B$;exports.Loader=K$;exports.MenuItem=PQ;exports.Modal=ZJ;exports.MultiSelect=Mee;exports.MultiSelectOption=p8;exports.Popover=cee;exports.Portal$1=hm;exports.SimpleMenu=V$;exports.SingleSelect=fg;exports.SingleSelectOption=hg;exports.SubNav=Dee;exports.SubNavHeader=_ee;exports.SubNavLink=Lee;exports.SubNavSection=Vee;exports.SubNavSections=Hee;exports.SwitchImpl=Pee;exports.Table=tte;exports.Tbody=rte;exports.Td=cte;exports.Th=lte;exports.Thead=ote;exports.Toggle=mte;exports.TooltipImpl=um;exports.Tr=ate;exports.Typography=Re;exports.__rest=bl;exports.darkTheme=oZ;exports.index=Ote;exports.lightTheme=W$;exports.pluginId=zr;exports.pluginPermissions=gg;
|