@isardsat/editorial-admin 6.21.0 → 6.22.0

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.
Files changed (23) hide show
  1. package/build/client/assets/clear-button-C666rKTW.js +1 -0
  2. package/build/client/assets/{dashboard-CXsgx-dc.js → dashboard-Crt5fSJe.js} +1 -1
  3. package/build/client/assets/{dashboard._collection._document-BiIWfKiL.js → dashboard._collection._document-D3XXkcBD.js} +1 -1
  4. package/build/client/assets/{dashboard._collection.new-PercY47A.js → dashboard._collection.new-rMBf1ZGC.js} +1 -1
  5. package/build/client/assets/{dashboard._layout-BLI8ZXFq.js → dashboard._layout-DOj1cBNu.js} +1 -1
  6. package/build/client/assets/date-picker-CqVT8lwM.js +1 -0
  7. package/build/client/assets/datetime-picker-DemhHfWW.js +1 -0
  8. package/build/client/assets/{index-DutSppa2.js → index-CW4Lhoah.js} +1 -1
  9. package/build/client/assets/{index-CU6_POhE.js → index-DRumOFGs.js} +1 -1
  10. package/build/client/assets/itemForm-DcKqLtr7.js +8 -0
  11. package/build/client/assets/{manifest-9cecc256.js → manifest-63bbd580.js} +1 -1
  12. package/build/client/assets/{markdownEditor-CZVz5-rL.js → markdownEditor-D3QMBKBF.js} +4 -4
  13. package/build/client/assets/root-CvQSRYkS.css +1 -0
  14. package/build/client/assets/{schemas-D-U8dKAF.js → schemas-BabmyWH6.js} +1 -1
  15. package/build/client/index.html +2 -2
  16. package/package.json +2 -2
  17. package/build/client/assets/clear-button-DehdxgmB.js +0 -1
  18. package/build/client/assets/date-picker-6Pg8PIj8.js +0 -1
  19. package/build/client/assets/datetime-picker-XkOBOVOZ.js +0 -1
  20. package/build/client/assets/index-nnJosT4e.js +0 -1
  21. package/build/client/assets/itemForm-BLyILW73.js +0 -8
  22. package/build/client/assets/root-DZYAU5bq.css +0 -1
  23. /package/build/client/assets/{root-dzmn7V-J.js → root-CqtjpfTE.js} +0 -0
@@ -0,0 +1 @@
1
+ import{R as f,a as _,p as V}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{b as Qe,B as sn}from"./button-BEFuP7Ru.js";import{b as S}from"./utils-B48p8Qal.js";import{c as cn}from"./createLucideIcon-BvSqmaUO.js";import{C as un}from"./chevron-right-BFlMu-RJ.js";import{C as dn}from"./chevron-down-qxzqwz13.js";import{X as ln}from"./x-D6gZWaAR.js";const fn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],hn=cn("chevron-left",fn),mn={},me={};function ye(e,t){try{const r=(mn[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in me?me[r]:Xe(r,r.split(":"))}catch{if(e in me)return me[e];const n=e?.match(yn);return n?Xe(e,n.slice(1)):NaN}}const yn=/([+-]\d\d):?(\d\d)?/;function Xe(e,t){const n=+t[0],r=+(t[1]||0);return me[e]=n>0?n*60+r:n*60-r}class K extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ye(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),it(this),He(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new K(...n,t):new K(Date.now(),t)}withTimeZone(t){return new K(+this,t)}getTimezoneOffset(){return-ye(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),He(this),+this}[Symbol.for("constructDateFrom")](t){return new K(+new Date(t),this.timeZone)}}const Ve=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ve.test(e))return;const t=e.replace(Ve,"$1UTC");K.prototype[t]&&(e.startsWith("get")?K.prototype[e]=function(){return this.internal[t]()}:(K.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),gn(this),+this},K.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),He(this),+this}))});function He(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function gn(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),it(e)}function it(e){const t=ye(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=ye(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-c,u=c!==t,h=l-s;if(u&&h){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+h);const g=ye(e.timeZone,e),p=c-g;p&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+p),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p))}}class q extends K{static tz(t,...n){return n.length?new q(...n,t):new q(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${pn(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new q(+this,t)}[Symbol.for("constructDateFrom")](t){return new q(+new Date(t),this.timeZone)}}function pn(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var m;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(m||(m={}));var F;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(F||(F={}));var L;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(L||(L={}));var z;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(z||(z={}));const ct=6048e5,wn=864e5,Ke=Symbol.for("constructDateFrom");function B(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ke in e?e[Ke](t):e instanceof Date?new e.constructor(t):new Date(t)}function Y(e,t){return B(t||e,e)}function ut(e,t,n){const r=Y(e,n?.in);return isNaN(t)?B(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dt(e,t,n){const r=Y(e,n?.in);if(isNaN(t))return B(e,NaN);if(!t)return r;const o=r.getDate(),a=B(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let bn={};function we(){return bn}function de(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Y(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ge(e,t){return de(e,{...t,weekStartsOn:1})}function lt(e,t){const n=Y(e,t?.in),r=n.getFullYear(),o=B(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=ge(o),i=B(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=ge(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ue(e){const t=Y(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function le(e,...t){const n=B.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function pe(e,t){const n=Y(e,t?.in);return n.setHours(0,0,0,0),n}function ft(e,t,n){const[r,o]=le(n?.in,e,t),a=pe(r),i=pe(o),s=+a-Ue(a),c=+i-Ue(i);return Math.round((s-c)/wn)}function kn(e,t){const n=lt(e,t),r=B(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ge(r)}function Mn(e,t,n){return ut(e,t*7,n)}function Dn(e,t,n){return dt(e,t*12,n)}function vn(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=B.bind(null,o));const a=Y(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),B(r,n||NaN)}function On(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=B.bind(null,o));const a=Y(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),B(r,n||NaN)}function Wn(e,t,n){const[r,o]=le(n?.in,e,t);return+pe(r)==+pe(o)}function ht(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Cn(e){return!(!ht(e)&&typeof e!="number"||isNaN(+Y(e)))}function Sn(e,t,n){const[r,o]=le(n?.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function xn(e,t){const n=Y(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Nn(e,t){const[n,r]=le(e,t.start,t.end);return{start:n,end:r}}function _n(e,t){const{start:n,end:r}=Nn(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(B(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Yn(e,t){const n=Y(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function En(e,t){const n=Y(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function mt(e,t){const n=Y(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function yt(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Y(e,t?.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Tn(e,t){return yt(e,{...t,weekStartsOn:1})}const Pn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fn=(e,t,n)=>{let r;const o=Pn[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Pe(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Bn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},In={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Hn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qn={date:Pe({formats:Bn,defaultWidth:"full"}),time:Pe({formats:In,defaultWidth:"full"}),dateTime:Pe({formats:Hn,defaultWidth:"full"})},An={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jn=(e,t,n,r)=>An[e];function fe(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const zn={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$n={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Gn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ln={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qn=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Xn={ordinalNumber:Qn,era:fe({values:zn,defaultWidth:"wide"}),quarter:fe({values:Rn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:$n,defaultWidth:"wide"}),day:fe({values:Gn,defaultWidth:"wide"}),dayPeriod:fe({values:Zn,defaultWidth:"wide",formattingValues:Ln,defaultFormattingWidth:"wide"})};function he(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Kn(s,u=>u.test(i)):Vn(s,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const l=t.slice(i.length);return{value:d,rest:l}}}function Vn(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Kn(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Un(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const Jn=/^(\d+)(th|st|nd|rd)?/i,er=/\d+/i,tr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nr={any:[/^b/i,/^(a|c)/i]},rr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},or={any:[/1/i,/2/i,/3/i,/4/i]},ar={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ir={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ur={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lr={ordinalNumber:Un({matchPattern:Jn,parsePattern:er,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:tr,defaultMatchWidth:"wide",parsePatterns:nr,defaultParseWidth:"any"}),quarter:he({matchPatterns:rr,defaultMatchWidth:"wide",parsePatterns:or,defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:ar,defaultMatchWidth:"wide",parsePatterns:sr,defaultParseWidth:"any"}),day:he({matchPatterns:ir,defaultMatchWidth:"wide",parsePatterns:cr,defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:ur,defaultMatchWidth:"any",parsePatterns:dr,defaultParseWidth:"any"})},qe={code:"en-US",formatDistance:Fn,formatLong:qn,formatRelative:jn,localize:Xn,match:lr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function fr(e,t){const n=Y(e,t?.in);return ft(n,mt(n))+1}function gt(e,t){const n=Y(e,t?.in),r=+ge(n)-+kn(n);return Math.round(r/ct)+1}function pt(e,t){const n=Y(e,t?.in),r=n.getFullYear(),o=we(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=B(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=de(i,t),c=B(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=de(c,t);return+n>=+s?r+1:+n>=+d?r:r-1}function hr(e,t){const n=we(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=pt(e,t),a=B(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),de(a,t)}function wt(e,t){const n=Y(e,t?.in),r=+de(n,t)-+hr(n,t);return Math.round(r/ct)+1}function N(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const oe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return N(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):N(n+1,2)},d(e,t){return N(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return N(e.getHours()%12||12,t.length)},H(e,t){return N(e.getHours(),t.length)},m(e,t){return N(e.getMinutes(),t.length)},s(e,t){return N(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return N(o,t.length)}},ue={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Je={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return oe.y(e,t)},Y:function(e,t,n,r){const o=pt(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return N(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):N(a,t.length)},R:function(e,t){const n=lt(e);return N(n,t.length)},u:function(e,t){const n=e.getFullYear();return N(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return N(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return N(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return oe.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return N(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=wt(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):N(o,t.length)},I:function(e,t,n){const r=gt(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):N(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):oe.d(e,t)},D:function(e,t,n){const r=fr(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):N(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return N(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return N(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return N(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=ue.noon:r===0?o=ue.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=ue.evening:r>=12?o=ue.afternoon:r>=4?o=ue.morning:o=ue.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return oe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):oe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oe.s(e,t)},S:function(e,t){return oe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tt(r);case"XXXX":case"XX":return ae(r);default:return ae(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tt(r);case"xxxx":case"xx":return ae(r);default:return ae(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+et(r,":");default:return"GMT"+ae(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+et(r,":");default:return"GMT"+ae(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return N(r,t.length)},T:function(e,t,n){return N(+e,t.length)}};function et(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+N(a,2)}function tt(e,t){return e%60===0?(e>0?"-":"+")+N(Math.abs(e)/60,2):ae(e,t)}function ae(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=N(Math.trunc(r/60),2),a=N(r%60,2);return n+o+t+a}const nt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},bt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},mr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return nt(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",nt(r,t)).replace("{{time}}",bt(o,t))},yr={p:bt,P:mr},gr=/^D+$/,pr=/^Y+$/,wr=["D","DD","YY","YYYY"];function br(e){return gr.test(e)}function kr(e){return pr.test(e)}function Mr(e,t,n){const r=Dr(e,t,n);if(console.warn(r),wr.includes(e))throw new RangeError(r)}function Dr(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Or=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wr=/^'([^]*?)'?$/,Cr=/''/g,Sr=/[a-zA-Z]/;function xr(e,t,n){const r=we(),o=n?.locale??r.locale??qe,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Y(e,n?.in);if(!Cn(s))throw new RangeError("Invalid time value");let c=t.match(Or).map(l=>{const u=l[0];if(u==="p"||u==="P"){const h=yr[u];return h(l,o.formatLong)}return l}).join("").match(vr).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const u=l[0];if(u==="'")return{isToken:!1,value:Nr(l)};if(Je[u])return{isToken:!0,value:l};if(u.match(Sr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const u=l.value;(!n?.useAdditionalWeekYearTokens&&kr(u)||!n?.useAdditionalDayOfYearTokens&&br(u))&&Mr(u,t,String(e));const h=Je[u[0]];return h(s,u,o.localize,d)}).join("")}function Nr(e){const t=e.match(Wr);return t?t[1].replace(Cr,"'"):e}function _r(e,t){const n=Y(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=B(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Yr(e,t){return Y(e,t?.in).getMonth()}function Er(e,t){return Y(e,t?.in).getFullYear()}function Tr(e,t){return+Y(e)>+Y(t)}function Pr(e,t){return+Y(e)<+Y(t)}function Fr(e,t,n){const[r,o]=le(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Br(e,t,n){const[r,o]=le(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Ir(e,t,n){const r=Y(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=B(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=_r(i);return r.setMonth(t,Math.min(a,s)),r}function Hr(e,t,n){const r=Y(e,n?.in);return isNaN(+r)?B(e,NaN):(r.setFullYear(t),r)}const rt=5,qr=4;function Ar(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,rt*7-1);return t.getMonth(e)===t.getMonth(a)?rt:qr}function kt(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function jr(e,t){const n=kt(e,t),r=Ar(e,t);return t.addDays(n,r*7-1)}class ne{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?q.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,a)=>this.overrides?.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new q(r,o,a,this.options.timeZone):new Date(r,o,a),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):ut(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):dt(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):Mn(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Dn(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ft(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Sn(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):_n(r),this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):jr(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):Tn(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):xn(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):yt(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):En(r),this.format=(r,o,a)=>{const i=this.overrides?.format?this.overrides.format(r,o,this.options):xr(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):gt(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Yr(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):Er(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):wt(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Tr(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):Pr(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):ht(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):Wn(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):Fr(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):Br(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):vn(r),this.min=r=>this.overrides?.min?this.overrides.min(r):On(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Ir(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):Hr(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):kt(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):pe(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):ge(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Yn(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):de(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):mt(r),this.options={locale:qe,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const U=new ne;class Mt{constructor(t,n,r=U){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class zr{constructor(t,n){this.date=t,this.weeks=n}}class Rr{constructor(t,n){this.days=n,this.weekNumber=t}}function ee(e,t,n=!1,r=U){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function Dt(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ae(e){return!!(e&&typeof e=="object"&&"from"in e)}function vt(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ot(e){return!!(e&&typeof e=="object"&&"before"in e)}function Wt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ct(e,t){return Array.isArray(e)&&e.every(t.isDate)}function te(e,t,n=U){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Ct(s,n))return s.includes(e);if(Ae(s))return ee(s,e,!1,n);if(Wt(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(Dt(s)){const c=a(s.before,e),d=a(s.after,e),l=c>0,u=d<0;return i(s.before,s.after)?u&&l:l||u}return vt(s)?a(e,s.after)>0:Ot(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function $r(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:c,broadcastCalendar:d,today:l}=t,{isSameDay:u,isSameMonth:h,startOfMonth:g,isBefore:p,endOfMonth:O,isAfter:M}=o,v=n&&g(n),E=r&&O(r),k={[F.focused]:[],[F.outside]:[],[F.disabled]:[],[F.hidden]:[],[F.today]:[]},P={};for(const y of e){const{date:b,displayMonth:w}=y,W=!!(w&&!h(b,w)),I=!!(v&&p(b,v)),A=!!(E&&M(b,E)),j=!!(a&&te(b,a,o)),R=!!(i&&te(b,i,o))||I||A||!d&&!c&&W||d&&c===!1&&W,se=u(b,l??o.today());W&&k.outside.push(y),j&&k.disabled.push(y),R&&k.hidden.push(y),se&&k.today.push(y),s&&Object.keys(s).forEach(ie=>{const ce=s?.[ie];ce&&te(b,ce,o)&&(P[ie]?P[ie].push(y):P[ie]=[y])})}return y=>{const b={[F.focused]:!1,[F.disabled]:!1,[F.hidden]:!1,[F.outside]:!1,[F.today]:!1},w={};for(const W in k){const I=k[W];b[W]=I.some(A=>A===y)}for(const W in P)w[W]=P[W].some(I=>I===y);return{...b,...w}}}function Gr(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[F[a]]?o.push(t[F[a]]):t[L[a]]&&o.push(t[L[a]]),o),[t[m.Day]])}function Zr(e){return f.createElement("button",{...e})}function Lr(e){return f.createElement("span",{...e})}function Qr(e){const{size:t=24,orientation:n="left",className:r}=e;return f.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&f.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&f.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&f.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&f.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Xr(e){const{day:t,modifiers:n,...r}=e;return f.createElement("td",{...r})}function Vr(e){const{day:t,modifiers:n,...r}=e,o=f.useRef(null);return f.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),f.createElement("button",{ref:o,...r})}function Kr(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[m.Dropdown],n].join(" "),s=t?.find(({value:c})=>c===a.value);return f.createElement("span",{"data-disabled":a.disabled,className:o[m.DropdownRoot]},f.createElement(r.Select,{className:i,...a},t?.map(({value:c,label:d,disabled:l})=>f.createElement(r.Option,{key:c,value:c,disabled:l},d))),f.createElement("span",{className:o[m.CaptionLabel],"aria-hidden":!0},s?.label,f.createElement(r.Chevron,{orientation:"down",size:18,className:o[m.Chevron]})))}function Ur(e){return f.createElement("div",{...e})}function Jr(e){return f.createElement("div",{...e})}function eo(e){const{calendarMonth:t,displayIndex:n,...r}=e;return f.createElement("div",{...r},e.children)}function to(e){const{calendarMonth:t,displayIndex:n,...r}=e;return f.createElement("div",{...r})}function no(e){return f.createElement("table",{...e})}function ro(e){return f.createElement("div",{...e})}const St=_.createContext(void 0);function be(){const e=_.useContext(St);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function oo(e){const{components:t}=be();return f.createElement(t.Dropdown,{...e})}function ao(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=be(),l=_.useCallback(h=>{o&&n?.(h)},[o,n]),u=_.useCallback(h=>{r&&t?.(h)},[r,t]);return f.createElement("nav",{...a},f.createElement(i.PreviousMonthButton,{type:"button",className:s[m.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:u},f.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[m.Chevron],orientation:"left"})),f.createElement(i.NextMonthButton,{type:"button",className:s[m.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:l},f.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[m.Chevron]})))}function so(e){const{components:t}=be();return f.createElement(t.Button,{...e})}function io(e){return f.createElement("option",{...e})}function co(e){const{components:t}=be();return f.createElement(t.Button,{...e})}function uo(e){const{rootRef:t,...n}=e;return f.createElement("div",{...n,ref:t})}function lo(e){return f.createElement("select",{...e})}function fo(e){const{week:t,...n}=e;return f.createElement("tr",{...n})}function ho(e){return f.createElement("th",{...e})}function mo(e){return f.createElement("thead",{"aria-hidden":!0},f.createElement("tr",{...e}))}function yo(e){const{week:t,...n}=e;return f.createElement("th",{...n})}function go(e){return f.createElement("th",{...e})}function po(e){return f.createElement("tbody",{...e})}function wo(e){const{components:t}=be();return f.createElement(t.Dropdown,{...e})}const bo=Object.freeze(Object.defineProperty({__proto__:null,Button:Zr,CaptionLabel:Lr,Chevron:Qr,Day:Xr,DayButton:Vr,Dropdown:Kr,DropdownNav:Ur,Footer:Jr,Month:eo,MonthCaption:to,MonthGrid:no,Months:ro,MonthsDropdown:oo,Nav:ao,NextMonthButton:so,Option:io,PreviousMonthButton:co,Root:uo,Select:lo,Week:fo,WeekNumber:yo,WeekNumberHeader:go,Weekday:ho,Weekdays:mo,Weeks:po,YearsDropdown:wo},Symbol.toStringTag,{value:"Module"}));function ko(e){return{...bo,...e}}function Mo(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function je(){const e={};for(const t in m)e[m[t]]=`rdp-${m[t]}`;for(const t in F)e[F[t]]=`rdp-${F[t]}`;for(const t in L)e[L[t]]=`rdp-${L[t]}`;for(const t in z)e[z[t]]=`rdp-${z[t]}`;return e}function xt(e,t,n){return(n??new ne(t)).format(e,"LLLL y")}const Do=xt;function vo(e,t,n){return(n??new ne(t)).format(e,"d")}function Oo(e,t=U){return t.format(e,"LLLL")}function Wo(e,t=U){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Co(){return""}function So(e,t,n){return(n??new ne(t)).format(e,"cccccc")}function Nt(e,t=U){return t.format(e,"yyyy")}const xo=Nt,No=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:xt,formatDay:vo,formatMonthCaption:Do,formatMonthDropdown:Oo,formatWeekNumber:Wo,formatWeekNumberHeader:Co,formatWeekdayName:So,formatYearCaption:xo,formatYearDropdown:Nt},Symbol.toStringTag,{value:"Module"}));function _o(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...No,...e}}function Yo(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:d}=o;return c({start:i(e),end:s(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),p=d(h),O=t&&h<a(t)||n&&h>a(n)||!1;return{value:p,label:g,disabled:O}})}function Eo(e,t={},n={}){let r={...t?.[m.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function To(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function Po(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:d}=r,l=o(e),u=a(t),h=[];let g=l;for(;c(g,u)||d(g,u);)h.push(g),g=i(g,1);return h.map(p=>{const O=n.formatYearDropdown(p,r);return{value:s(p),label:O,disabled:!1}})}function _t(e,t,n){return(n??new ne(t)).format(e,"LLLL y")}const Fo=_t;function Bo(e,t,n,r){let o=(r??new ne(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Yt(e,t,n,r){let o=(r??new ne(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Io=Yt;function Ho(){return""}function qo(e){return"Choose the Month"}function Ao(e){return"Go to the Next Month"}function jo(e){return"Go to the Previous Month"}function zo(e,t,n){return(n??new ne(t)).format(e,"cccc")}function Ro(e,t){return`Week ${e}`}function $o(e){return"Week Number"}function Go(e){return"Choose the Year"}const Zo=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Fo,labelDay:Io,labelDayButton:Yt,labelGrid:_t,labelGridcell:Bo,labelMonthDropdown:qo,labelNav:Ho,labelNext:Ao,labelPrevious:jo,labelWeekNumber:Ro,labelWeekNumberHeader:$o,labelWeekday:zo,labelYearDropdown:Go},Symbol.toStringTag,{value:"Module"})),ke=e=>e instanceof HTMLElement?e:null,Fe=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Lo=e=>ke(e.querySelector("[data-animated-month]")),Be=e=>ke(e.querySelector("[data-animated-caption]")),Ie=e=>ke(e.querySelector("[data-animated-weeks]")),Qo=e=>ke(e.querySelector("[data-animated-nav]")),Xo=e=>ke(e.querySelector("[data-animated-weekdays]"));function Vo(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=_.useRef(null),s=_.useRef(r),c=_.useRef(!1);_.useLayoutEffect(()=>{const d=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const l=a.isSameMonth(r[0].date,d[0].date),u=a.isAfter(r[0].date,d[0].date),h=u?n[z.caption_after_enter]:n[z.caption_before_enter],g=u?n[z.weeks_after_enter]:n[z.weeks_before_enter],p=i.current,O=e.current.cloneNode(!0);if(O instanceof HTMLElement?(Fe(O).forEach(k=>{if(!(k instanceof HTMLElement))return;const P=Lo(k);P&&k.contains(P)&&k.removeChild(P);const y=Be(k);y&&y.classList.remove(h);const b=Ie(k);b&&b.classList.remove(g)}),i.current=O):i.current=null,c.current||l||o)return;const M=p instanceof HTMLElement?Fe(p):[],v=Fe(e.current);if(v&&v.every(E=>E instanceof HTMLElement)&&M&&M.every(E=>E instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const E=Qo(e.current);E&&(E.style.zIndex="1"),v.forEach((k,P)=>{const y=M[P];if(!y)return;k.style.position="relative",k.style.overflow="hidden";const b=Be(k);b&&b.classList.add(h);const w=Ie(k);w&&w.classList.add(g);const W=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),E&&(E.style.zIndex=""),b&&b.classList.remove(h),w&&w.classList.remove(g),k.style.position="",k.style.overflow="",k.contains(y)&&k.removeChild(y)};y.style.pointerEvents="none",y.style.position="absolute",y.style.overflow="hidden",y.setAttribute("aria-hidden","true");const I=Xo(y);I&&(I.style.opacity="0");const A=Be(y);A&&(A.classList.add(u?n[z.caption_before_exit]:n[z.caption_after_exit]),A.addEventListener("animationend",W));const j=Ie(y);j&&j.classList.add(u?n[z.weeks_before_exit]:n[z.weeks_after_exit]),k.insertBefore(y,k.firstChild)})}})}function Ko(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:d,differenceInCalendarDays:l,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:p,endOfWeek:O,isAfter:M,startOfBroadcastWeek:v,startOfISOWeek:E,startOfWeek:k}=r,P=c?v(o,r):i?E(o):k(o),y=c?h(a):i?g(p(a)):O(p(a)),b=l(y,P),w=u(a,o)+1,W=[];for(let j=0;j<=b;j++){const R=d(P,j);if(t&&M(R,t))break;W.push(R)}const A=(c?35:42)*w;if(s&&W.length<A){const j=A-W.length;for(let R=0;R<j;R++){const se=d(W[W.length-1],1);W.push(se)}}return W}function Uo(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function Jo(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function ot(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let c=o||a||i;const{differenceInCalendarMonths:d,addMonths:l,startOfMonth:u}=r;if(n&&d(n,c)<s-1){const h=-1*(s-1);c=l(n,h)}return t&&d(c,t)<0&&(c=t),u(c)}function ea(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:d,getWeek:l,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:g}=r,p=e.reduce((O,M)=>{const v=n.broadcastCalendar?u(M,r):n.ISOWeek?h(M):g(M),E=n.broadcastCalendar?a(M):n.ISOWeek?i(s(M)):c(s(M)),k=t.filter(w=>w>=v&&w<=E),P=n.broadcastCalendar?35:42;if(n.fixedWeeks&&k.length<P){const w=t.filter(W=>{const I=P-k.length;return W>E&&W<=o(E,I)});k.push(...w)}const y=k.reduce((w,W)=>{const I=n.ISOWeek?d(W):l(W),A=w.find(R=>R.weekNumber===I),j=new Mt(W,M,r);return A?A.days.push(j):w.push(new Rr(I,[j])),w},[]),b=new zr(M,y);return O.push(b),O},[]);return n.reverseMonths?p.reverse():p}function ta(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:d,newDate:l,today:u}=t,{fromYear:h,toYear:g,fromMonth:p,toMonth:O}=e;!n&&p&&(n=p),!n&&h&&(n=t.newDate(h,0,1)),!r&&O&&(r=O),!r&&g&&(r=l(g,11,31));const M=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):h?n=l(h,0,1):!n&&M&&(n=o(c(e.today??u(),-100))),r?r=s(r):g?r=l(g,11,31):!r&&M&&(r=d(e.today??u())),[n&&a(n),r&&a(r)]}function na(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,d=o?a:1,l=i(e);if(!t)return s(l,d);if(!(c(t,e)<a))return s(l,d)}function ra(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,d=o?a??1:1,l=i(e);if(!t)return s(l,-d);if(!(c(l,t)<=0))return s(l,-d)}function oa(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function We(e,t){const[n,r]=_.useState(e);return[t===void 0?n:t,r]}function aa(e,t){const[n,r]=ta(e,t),{startOfMonth:o,endOfMonth:a}=t,i=ot(e,n,r,t),[s,c]=We(i,e.month?i:void 0);_.useEffect(()=>{const b=ot(e,n,r,t);c(b)},[e.timeZone]);const d=Jo(s,r,e,t),l=Ko(d,e.endMonth?a(e.endMonth):void 0,e,t),u=ea(d,l,e,t),h=oa(u),g=Uo(u),p=ra(s,n,e,t),O=na(s,r,e,t),{disableNavigation:M,onMonthChange:v}=e,E=b=>h.some(w=>w.days.some(W=>W.isEqualTo(b))),k=b=>{if(M)return;let w=o(b);n&&w<o(n)&&(w=o(n)),r&&w>o(r)&&(w=o(r)),c(w),v?.(w)};return{months:u,weeks:h,days:g,navStart:n,navEnd:r,previousMonth:p,nextMonth:O,goToMonth:k,goToDay:b=>{E(b)||k(b.date)}}}var X;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(X||(X={}));function at(e){return!e[F.disabled]&&!e[F.hidden]&&!e[F.outside]}function sa(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);at(s)&&(s[F.focused]&&a<X.FocusedModifier?(o=i,a=X.FocusedModifier):r?.isEqualTo(i)&&a<X.LastFocused?(o=i,a=X.LastFocused):n(i.date)&&a<X.Selected?(o=i,a=X.Selected):s[F.today]&&a<X.Today&&(o=i,a=X.Today))}return o||(o=e.find(i=>at(t(i)))),o}function ia(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:d,addMonths:l,addWeeks:u,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:p,endOfWeek:O,max:M,min:v,startOfBroadcastWeek:E,startOfISOWeek:k,startOfWeek:P}=i;let b={day:d,week:u,month:l,year:h,startOfWeek:w=>c?E(w,i):s?k(w):P(w),endOfWeek:w=>c?g(w):s?p(w):O(w)}[e](n,t==="after"?1:-1);return t==="before"&&r?b=M([r,b]):t==="after"&&o&&(b=v([o,b])),b}function Et(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=ia(e,t,n.date,r,o,a,i),d=!!(a.disabled&&te(c,a.disabled,i)),l=!!(a.hidden&&te(c,a.hidden,i)),u=c,h=new Mt(c,u,i);return!d&&!l?h:Et(e,t,h,r,o,a,i,s+1)}function ca(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=_.useState(),c=sa(t.days,n,r||(()=>!1),i),[d,l]=_.useState(a?c:void 0);return{isFocusTarget:O=>!!c?.isEqualTo(O),setFocused:l,focused:d,blur:()=>{s(d),l(void 0)},moveFocus:(O,M)=>{if(!d)return;const v=Et(O,M,d,t.navStart,t.navEnd,e,o);v&&(t.goToDay(v),l(v))}}}function ua(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=We(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,d=g=>s?.some(p=>c(p,g))??!1,{min:l,max:u}=e;return{selected:s,select:(g,p,O)=>{let M=[...s??[]];if(d(g)){if(s?.length===l||r&&s?.length===1)return;M=s?.filter(v=>!c(v,g))}else s?.length===u?M=[g]:M=[...M,g];return o||i(M),o?.(M,g,p,O),M},isSelected:d}}function da(e,t,n=0,r=0,o=!1,a=U){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:d,isBefore:l}=a;let u;if(!i&&!s)u={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?u={from:i,to:void 0}:u=void 0:l(e,i)?u={from:e,to:i}:u={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?u={from:i,to:s}:u=void 0;else if(c(i,e))u={from:i,to:n>0?void 0:e};else if(c(s,e))u={from:e,to:n>0?void 0:e};else if(l(e,i))u={from:e,to:s};else if(d(e,i))u={from:i,to:e};else if(d(e,s))u={from:i,to:e};else throw new Error("Invalid range");if(u?.from&&u?.to){const h=a.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function la(e,t,n=U){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function st(e,t,n=U){return ee(e,t.from,!1,n)||ee(e,t.to,!1,n)||ee(t,e.from,!1,n)||ee(t,e.to,!1,n)}function fa(e,t,n=U){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?ee(e,s,!1,n):Ct(s,n)?s.some(c=>ee(e,c,!1,n)):Ae(s)?s.from&&s.to?st(e,{from:s.from,to:s.to},n):!1:Wt(s)?la(e,s.dayOfWeek,n):Dt(s)?n.isAfter(s.before,s.after)?st(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):te(e.from,s,n)||te(e.to,s,n):vt(s)||Ot(s)?te(e.from,s,n)||te(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=c;d++){if(i.some(l=>l(s)))return!0;s=n.addDays(s,1)}}return!1}function ha(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=We(o,i?o:void 0),d=i?o:s;return{selected:d,select:(h,g,p)=>{const{min:O,max:M}=e,v=h?da(h,d,O,M,a,t):void 0;return r&&n&&v?.from&&v.to&&fa({from:v.from,to:v.to},n,t)&&(v.from=h,v.to=void 0),i||c(v),i?.(v,h,g,p),v},isSelected:h=>d&&ee(d,h,!1,t)}}function ma(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=We(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(u,h,g)=>{let p=u;return!r&&s&&s&&c(u,s)&&(p=void 0),o||i(p),o?.(p,u,h,g),p},isSelected:u=>s?c(s,u):!1}}function ya(e,t){const n=ma(e,t),r=ua(e,t),o=ha(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function ga(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new q(t.today,t.timeZone)),t.month&&(t.month=new q(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new q(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new q(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new q(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new q(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(D=>new q(D,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new q(t.selected.from,t.timeZone):void 0,to:t.selected.to?new q(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=_.useMemo(()=>{const D={...qe,...t.locale};return{dateLib:new ne({locale:D,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:ko(t.components),formatters:_o(t.formatters),labels:{...Zo,...t.labels},locale:D,classNames:{...je(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:d,navLayout:l,numberOfMonths:u=1,onDayBlur:h,onDayClick:g,onDayFocus:p,onDayKeyDown:O,onDayMouseEnter:M,onDayMouseLeave:v,onNextClick:E,onPrevClick:k,showWeekNumber:P,styles:y}=t,{formatCaption:b,formatDay:w,formatMonthDropdown:W,formatWeekNumber:I,formatWeekNumberHeader:A,formatWeekdayName:j,formatYearDropdown:R}=r,se=aa(t,a),{days:ie,months:ce,navStart:Me,navEnd:Ce,previousMonth:$,nextMonth:G,goToMonth:J}=se,Se=$r(ie,t,Me,Ce,a),{isSelected:xe,select:Ne,selected:De}=ya(t,a)??{},{blur:ze,focused:Re,isFocusTarget:Tt,moveFocus:$e,setFocused:ve}=ca(t,se,Se,xe??(()=>!1),a),{labelDayButton:Pt,labelGridcell:Ft,labelGrid:Bt,labelMonthDropdown:It,labelNav:Ge,labelPrevious:Ht,labelNext:qt,labelWeekday:At,labelWeekNumber:jt,labelWeekNumberHeader:zt,labelYearDropdown:Rt}=o,$t=_.useMemo(()=>To(a,t.ISOWeek),[a,t.ISOWeek]),Ze=d!==void 0||g!==void 0,_e=_.useCallback(()=>{$&&(J($),k?.($))},[$,J,k]),Ye=_.useCallback(()=>{G&&(J(G),E?.(G))},[J,G,E]),Gt=_.useCallback((D,T)=>C=>{C.preventDefault(),C.stopPropagation(),ve(D),Ne?.(D.date,T,C),g?.(D.date,T,C)},[Ne,g,ve]),Zt=_.useCallback((D,T)=>C=>{ve(D),p?.(D.date,T,C)},[p,ve]),Lt=_.useCallback((D,T)=>C=>{ze(),h?.(D.date,T,C)},[ze,h]),Qt=_.useCallback((D,T)=>C=>{const re={ArrowLeft:[C.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[C.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[C.shiftKey?"year":"week","after"],ArrowUp:[C.shiftKey?"year":"week","before"],PageUp:[C.shiftKey?"year":"month","before"],PageDown:[C.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(re[C.key]){C.preventDefault(),C.stopPropagation();const[Z,Oe]=re[C.key];$e(Z,Oe)}O?.(D.date,T,C)},[$e,O,t.dir]),Xt=_.useCallback((D,T)=>C=>{M?.(D.date,T,C)},[M]),Vt=_.useCallback((D,T)=>C=>{v?.(D.date,T,C)},[v]),Kt=_.useCallback(D=>T=>{const C=Number(T.target.value),re=a.setMonth(a.startOfMonth(D),C);J(re)},[a,J]),Ut=_.useCallback(D=>T=>{const C=Number(T.target.value),re=a.setYear(a.startOfMonth(D),C);J(re)},[a,J]),{className:Jt,style:en}=_.useMemo(()=>({className:[s[m.Root],t.className].filter(Boolean).join(" "),style:{...y?.[m.Root],...t.style}}),[s,t.className,t.style,y]),tn=Mo(t),Le=_.useRef(null);Vo(Le,!!t.animate,{classNames:s,months:ce,focused:Re,dateLib:a});const nn={dayPickerProps:t,selected:De,select:Ne,isSelected:xe,months:ce,nextMonth:G,previousMonth:$,goToMonth:J,getModifiers:Se,components:n,classNames:s,styles:y,labels:o,formatters:r};return f.createElement(St.Provider,{value:nn},f.createElement(n.Root,{rootRef:t.animate?Le:void 0,className:Jt,style:en,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...tn},f.createElement(n.Months,{className:s[m.Months],style:y?.[m.Months]},!t.hideNavigation&&!l&&f.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[m.Nav],style:y?.[m.Nav],"aria-label":Ge(),onPreviousClick:_e,onNextClick:Ye,previousMonth:$,nextMonth:G}),ce.map((D,T)=>{const C=Yo(D.date,Me,Ce,r,a),re=Po(Me,Ce,r,a);return f.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[m.Month],style:y?.[m.Month],key:T,displayIndex:T,calendarMonth:D},l==="around"&&!t.hideNavigation&&T===0&&f.createElement(n.PreviousMonthButton,{type:"button",className:s[m.PreviousMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":Ht($),onClick:_e,"data-animated-button":t.animate?"true":void 0},f.createElement(n.Chevron,{disabled:$?void 0:!0,className:s[m.Chevron],orientation:t.dir==="rtl"?"right":"left"})),f.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[m.MonthCaption],style:y?.[m.MonthCaption],calendarMonth:D,displayIndex:T},c?.startsWith("dropdown")?f.createElement(n.DropdownNav,{className:s[m.Dropdowns],style:y?.[m.Dropdowns]},c==="dropdown"||c==="dropdown-months"?f.createElement(n.MonthsDropdown,{className:s[m.MonthsDropdown],"aria-label":It(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Kt(D.date),options:C,style:y?.[m.Dropdown],value:a.getMonth(D.date)}):f.createElement("span",null,W(D.date,a)),c==="dropdown"||c==="dropdown-years"?f.createElement(n.YearsDropdown,{className:s[m.YearsDropdown],"aria-label":Rt(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Ut(D.date),options:re,style:y?.[m.Dropdown],value:a.getYear(D.date)}):f.createElement("span",null,R(D.date,a)),f.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},b(D.date,a.options,a))):f.createElement(n.CaptionLabel,{className:s[m.CaptionLabel],role:"status","aria-live":"polite"},b(D.date,a.options,a))),l==="around"&&!t.hideNavigation&&T===u-1&&f.createElement(n.NextMonthButton,{type:"button",className:s[m.NextMonthButton],tabIndex:G?void 0:-1,"aria-disabled":G?void 0:!0,"aria-label":qt(G),onClick:Ye,"data-animated-button":t.animate?"true":void 0},f.createElement(n.Chevron,{disabled:G?void 0:!0,className:s[m.Chevron],orientation:t.dir==="rtl"?"left":"right"})),T===u-1&&l==="after"&&!t.hideNavigation&&f.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[m.Nav],style:y?.[m.Nav],"aria-label":Ge(),onPreviousClick:_e,onNextClick:Ye,previousMonth:$,nextMonth:G}),f.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":Bt(D.date,a.options,a)||void 0,className:s[m.MonthGrid],style:y?.[m.MonthGrid]},!t.hideWeekdays&&f.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[m.Weekdays],style:y?.[m.Weekdays]},P&&f.createElement(n.WeekNumberHeader,{"aria-label":zt(a.options),className:s[m.WeekNumberHeader],style:y?.[m.WeekNumberHeader],scope:"col"},A()),$t.map((Z,Oe)=>f.createElement(n.Weekday,{"aria-label":At(Z,a.options,a),className:s[m.Weekday],key:Oe,style:y?.[m.Weekday],scope:"col"},j(Z,a.options,a)))),f.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[m.Weeks],style:y?.[m.Weeks]},D.weeks.map((Z,Oe)=>f.createElement(n.Week,{className:s[m.Week],key:Z.weekNumber,style:y?.[m.Week],week:Z},P&&f.createElement(n.WeekNumber,{week:Z,style:y?.[m.WeekNumber],"aria-label":jt(Z.weekNumber,{locale:i}),className:s[m.WeekNumber],scope:"row",role:"rowheader"},I(Z.weekNumber,a)),Z.days.map(H=>{const{date:Q}=H,x=Se(H);if(x[F.focused]=!x.hidden&&!!Re?.isEqualTo(H),x[L.selected]=xe?.(Q)||x.selected,Ae(De)){const{from:Ee,to:Te}=De;x[L.range_start]=!!(Ee&&Te&&a.isSameDay(Q,Ee)),x[L.range_end]=!!(Ee&&Te&&a.isSameDay(Q,Te)),x[L.range_middle]=ee(De,Q,!0,a)}const rn=Eo(x,y,t.modifiersStyles),on=Gr(x,s,t.modifiersClassNames),an=!Ze&&!x.hidden?Ft(Q,x,a.options,a):void 0;return f.createElement(n.Day,{key:`${a.format(Q,"yyyy-MM-dd")}_${a.format(H.displayMonth,"yyyy-MM")}`,day:H,modifiers:x,className:on.join(" "),style:rn,role:"gridcell","aria-selected":x.selected||void 0,"aria-label":an,"data-day":a.format(Q,"yyyy-MM-dd"),"data-month":H.outside?a.format(Q,"yyyy-MM"):void 0,"data-selected":x.selected||void 0,"data-disabled":x.disabled||void 0,"data-hidden":x.hidden||void 0,"data-outside":H.outside||void 0,"data-focused":x.focused||void 0,"data-today":x.today||void 0},!x.hidden&&Ze?f.createElement(n.DayButton,{className:s[m.DayButton],style:y?.[m.DayButton],type:"button",day:H,modifiers:x,disabled:x.disabled||void 0,tabIndex:Tt(H)?0:-1,"aria-label":Pt(Q,x,a.options,a),onClick:Gt(H,x),onBlur:Lt(H,x),onFocus:Zt(H,x),onKeyDown:Qt(H,x),onMouseEnter:Xt(H,x),onMouseLeave:Vt(H,x)},w(Q,a.options,a)):!x.hidden&&w(H.date,a.options,a))}))))))})),t.footer&&f.createElement(n.Footer,{className:s[m.Footer],style:y?.[m.Footer],role:"status","aria-live":"polite"},t.footer)))}function Wa({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const c=je();return V.jsx(ga,{showOutsideDays:n,className:S("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:d=>d.toLocaleString("default",{month:"short"}),...a},classNames:{root:S("w-fit",c.root),months:S("flex gap-4 flex-col md:flex-row relative",c.months),month:S("flex flex-col w-full gap-4",c.month),nav:S("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",c.nav),button_previous:S(Qe({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_previous),button_next:S(Qe({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_next),month_caption:S("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",c.month_caption),dropdowns:S("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",c.dropdowns),dropdown_root:S("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",c.dropdown_root),dropdown:S("absolute bg-popover inset-0 opacity-0",c.dropdown),caption_label:S("select-none font-medium",r==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:S("flex",c.weekdays),weekday:S("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",c.weekday),week:S("flex w-full mt-2",c.week),week_number_header:S("select-none w-(--cell-size)",c.week_number_header),week_number:S("text-[0.8rem] select-none text-muted-foreground",c.week_number),day:S("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",c.day),range_start:S("rounded-l-md bg-accent",c.range_start),range_middle:S("rounded-none",c.range_middle),range_end:S("rounded-r-md bg-accent",c.range_end),today:S("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:S("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:S("text-muted-foreground opacity-50",c.disabled),hidden:S("invisible",c.hidden),...t},components:{Root:({className:d,rootRef:l,...u})=>V.jsx("div",{"data-slot":"calendar",ref:l,className:S(d),...u}),Chevron:({className:d,orientation:l,...u})=>l==="left"?V.jsx(hn,{className:S("size-4",d),...u}):l==="right"?V.jsx(un,{className:S("size-4",d),...u}):V.jsx(dn,{className:S("size-4",d),...u}),DayButton:pa,WeekNumber:({children:d,...l})=>V.jsx("td",{...l,children:V.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...s})}function pa({className:e,day:t,modifiers:n,...r}){const o=je(),a=_.useRef(null);return _.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),V.jsx(sn,{ref:a,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:S("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}const Ca=({onClear:e,visible:t=!0})=>t?V.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),e()},className:"absolute right-1 top-1/2 -translate-y-1/2 p-1 rounded",title:"Clear",children:V.jsx(ln,{className:"w-4 h-4 text-gray-500 hover:text-black"})}):null;export{Ca as C,Wa as a,xr as f};
@@ -1 +1 @@
1
- import{p as e,a as w,x as C,w as k}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{b as c,m as j,h as H,d as N,n as L,p as M,q as S,t as I}from"./utils-B48p8Qal.js";import{c as v,u as D,T as y,a as A,b as m,d as T,f as p,e as $,g as R,h as V}from"./index-Cgk-ojIv.js";import{B as G}from"./badge-DTudhbGs.js";import"./schemas-D-U8dKAF.js";import"./index-CbaefyjV.js";import"./schemas-CPJfa6mm.js";function Q({className:s,...a}){return e.jsx("div",{"data-slot":"skeleton",className:c("bg-accent animate-pulse rounded-md",s),...a})}function b({className:s,title:a,value:i,isLoading:o,...d}){return e.jsxs("div",{className:c("border border-border rounded-xl p-6",s),...d,children:[e.jsx("h3",{className:"text-xs text-muted-foreground",children:a}),o?e.jsx(Q,{className:"h-[1.125rem] sm:h-[1.875rem] w-16"}):e.jsx("p",{className:"text-lg sm:text-3xl font-bold leading-none",children:i})]})}const f=v(),h=[f.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(s){const a=s.getValue();return e.jsx("span",{title:a,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:a})}}),f.accessor("createdAt",{header:"Created",cell(s){return j(new Date(s.getValue()))}}),f.accessor("updatedAt",{header:"Updated",cell(s){return j(new Date(s.getValue()))}})];function z(){const{data:s}=H(),{data:a}=N(),i=w.useMemo(()=>!s||!a?[]:Object.entries(s).reduce((l,[n,r])=>l.concat(Object.values(r).filter(x=>x.isDraft).map(x=>({...x,type:n}))),[]).toSorted((l,n)=>l.updatedAt>n.updatedAt?-1:1).slice(0,6),[s,a]),o=D({data:i,columns:h,getCoreRowModel:V()});return o.getRowCount()===0?null:e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Drafts"}),e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(y,{children:[e.jsx(A,{children:o.getHeaderGroups().map(d=>e.jsx(m,{className:"grid",style:{gridTemplateColumns:`repeat(${h.length}, minmax(200px, 1fr))`},children:d.headers.map(t=>e.jsx(T,{children:t.isPlaceholder?null:p(t.column.columnDef.header,t.getContext())},t.id))},d.id))}),e.jsx($,{children:o.getRowModel().rows.map(d=>e.jsx(C,{to:`/admin/dashboard/${d.original.type}/${d.original.id}`,children:e.jsx(m,{className:"grid",style:{gridTemplateColumns:`repeat(${h.length}, minmax(200px, 1fr))`},children:d.getVisibleCells().map(t=>e.jsx(R,{className:c("p-2"),children:p(t.column.columnDef.cell,t.getContext())},t.id))},d.id)},d.original.id))})]})})]})}const u=v(),g=[u.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(s){const a=s.getValue();return e.jsx("span",{title:a,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:a})}}),u.accessor("type",{header:"Type",cell(s){return e.jsx("span",{className:"capitalize",children:s.getValue()})}}),u.accessor("status",{header:"Status",cell(s){const a=s.getValue();return e.jsx(G,{className:c("capitalize",L[a]),children:a})}}),u.accessor("updatedAt",{header:"Updated",cell(s){const a=s.getValue();return a?j(new Date(a)):"-"}})];function O(){const{data:s}=M(),{data:a}=N(),i=w.useMemo(()=>{if(!s||!a)return[];const t=[];for(const[l,n]of Object.entries(s.collections)){for(const r of n.added)t.push({id:r.id,type:l,status:"added",updatedAt:r.updatedAt});for(const r of n.modified)t.push({id:r.id,type:l,status:"modified",updatedAt:r.updatedAt});for(const r of n.deleted)t.push({id:r.id,type:l,status:"deleted",updatedAt:void 0})}for(const[l,n]of Object.entries(s.singles))t.push({id:n.preview?.id||n.production?.id||l,type:l,status:n.status,updatedAt:n.updatedAt});return t.toSorted((l,n)=>l.updatedAt?n.updatedAt?l.updatedAt>n.updatedAt?-1:1:-1:1)},[s,a]),o=D({data:i,columns:g,getCoreRowModel:V()});if(o.getRowCount()===0)return null;const d=t=>{const l=t.original.status==="deleted",n=e.jsx(m,{className:c("grid"),style:{gridTemplateColumns:`repeat(${g.length}, minmax(150px, 1fr))`},children:t.getVisibleCells().map(r=>e.jsx(R,{className:c("p-2"),children:p(r.column.columnDef.cell,r.getContext())},r.id))},t.id);return l?e.jsx("div",{children:n},`${t.original.type}-${t.original.id}`):e.jsx(C,{to:`/admin/dashboard/${t.original.type}/${t.original.id}`,children:n},`${t.original.type}-${t.original.id}`)};return e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Unpublished Changes"}),e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(y,{children:[e.jsx(A,{children:o.getHeaderGroups().map(t=>e.jsx(m,{className:"grid",style:{gridTemplateColumns:`repeat(${g.length}, minmax(150px, 1fr))`},children:t.headers.map(l=>e.jsx(T,{children:l.isPlaceholder?null:p(l.column.columnDef.header,l.getContext())},l.id))},t.id))}),e.jsx($,{className:"max-h-96 overflow-y-scroll",children:o.getRowModel().rows.map(d)})]})})]})}const K=k(function(){const{data:a,isLoading:i}=S(),{data:o,isLoading:d}=I();return e.jsx("div",{className:"flex flex-1 h-full p-4 gap-4",children:e.jsxs("div",{className:"flex flex-col overflow-hidden flex-1 gap-4",children:[e.jsxs("div",{className:"flex flex-row gap-2 grid-cols-12",children:[e.jsx(b,{className:"w-full sm:w-44",title:"Items",value:a,isLoading:i}),e.jsx(b,{className:"w-full sm:w-44",title:"Files",value:o,isLoading:d})]}),e.jsx(O,{}),e.jsx(z,{})]})})});export{K as default};
1
+ import{p as e,a as w,x as C,w as k}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{b as c,m as j,h as H,d as N,n as L,p as M,q as S,t as I}from"./utils-B48p8Qal.js";import{c as v,u as D,T as y,a as A,b as m,d as T,f as p,e as $,g as R,h as V}from"./index-Cgk-ojIv.js";import{B as G}from"./badge-DTudhbGs.js";import"./schemas-BabmyWH6.js";import"./index-CbaefyjV.js";import"./schemas-CPJfa6mm.js";function Q({className:s,...a}){return e.jsx("div",{"data-slot":"skeleton",className:c("bg-accent animate-pulse rounded-md",s),...a})}function b({className:s,title:a,value:i,isLoading:o,...d}){return e.jsxs("div",{className:c("border border-border rounded-xl p-6",s),...d,children:[e.jsx("h3",{className:"text-xs text-muted-foreground",children:a}),o?e.jsx(Q,{className:"h-[1.125rem] sm:h-[1.875rem] w-16"}):e.jsx("p",{className:"text-lg sm:text-3xl font-bold leading-none",children:i})]})}const f=v(),h=[f.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(s){const a=s.getValue();return e.jsx("span",{title:a,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:a})}}),f.accessor("createdAt",{header:"Created",cell(s){return j(new Date(s.getValue()))}}),f.accessor("updatedAt",{header:"Updated",cell(s){return j(new Date(s.getValue()))}})];function z(){const{data:s}=H(),{data:a}=N(),i=w.useMemo(()=>!s||!a?[]:Object.entries(s).reduce((l,[n,r])=>l.concat(Object.values(r).filter(x=>x.isDraft).map(x=>({...x,type:n}))),[]).toSorted((l,n)=>l.updatedAt>n.updatedAt?-1:1).slice(0,6),[s,a]),o=D({data:i,columns:h,getCoreRowModel:V()});return o.getRowCount()===0?null:e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Drafts"}),e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(y,{children:[e.jsx(A,{children:o.getHeaderGroups().map(d=>e.jsx(m,{className:"grid",style:{gridTemplateColumns:`repeat(${h.length}, minmax(200px, 1fr))`},children:d.headers.map(t=>e.jsx(T,{children:t.isPlaceholder?null:p(t.column.columnDef.header,t.getContext())},t.id))},d.id))}),e.jsx($,{children:o.getRowModel().rows.map(d=>e.jsx(C,{to:`/admin/dashboard/${d.original.type}/${d.original.id}`,children:e.jsx(m,{className:"grid",style:{gridTemplateColumns:`repeat(${h.length}, minmax(200px, 1fr))`},children:d.getVisibleCells().map(t=>e.jsx(R,{className:c("p-2"),children:p(t.column.columnDef.cell,t.getContext())},t.id))},d.id)},d.original.id))})]})})]})}const u=v(),g=[u.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(s){const a=s.getValue();return e.jsx("span",{title:a,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:a})}}),u.accessor("type",{header:"Type",cell(s){return e.jsx("span",{className:"capitalize",children:s.getValue()})}}),u.accessor("status",{header:"Status",cell(s){const a=s.getValue();return e.jsx(G,{className:c("capitalize",L[a]),children:a})}}),u.accessor("updatedAt",{header:"Updated",cell(s){const a=s.getValue();return a?j(new Date(a)):"-"}})];function O(){const{data:s}=M(),{data:a}=N(),i=w.useMemo(()=>{if(!s||!a)return[];const t=[];for(const[l,n]of Object.entries(s.collections)){for(const r of n.added)t.push({id:r.id,type:l,status:"added",updatedAt:r.updatedAt});for(const r of n.modified)t.push({id:r.id,type:l,status:"modified",updatedAt:r.updatedAt});for(const r of n.deleted)t.push({id:r.id,type:l,status:"deleted",updatedAt:void 0})}for(const[l,n]of Object.entries(s.singles))t.push({id:n.preview?.id||n.production?.id||l,type:l,status:n.status,updatedAt:n.updatedAt});return t.toSorted((l,n)=>l.updatedAt?n.updatedAt?l.updatedAt>n.updatedAt?-1:1:-1:1)},[s,a]),o=D({data:i,columns:g,getCoreRowModel:V()});if(o.getRowCount()===0)return null;const d=t=>{const l=t.original.status==="deleted",n=e.jsx(m,{className:c("grid"),style:{gridTemplateColumns:`repeat(${g.length}, minmax(150px, 1fr))`},children:t.getVisibleCells().map(r=>e.jsx(R,{className:c("p-2"),children:p(r.column.columnDef.cell,r.getContext())},r.id))},t.id);return l?e.jsx("div",{children:n},`${t.original.type}-${t.original.id}`):e.jsx(C,{to:`/admin/dashboard/${t.original.type}/${t.original.id}`,children:n},`${t.original.type}-${t.original.id}`)};return e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Unpublished Changes"}),e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(y,{children:[e.jsx(A,{children:o.getHeaderGroups().map(t=>e.jsx(m,{className:"grid",style:{gridTemplateColumns:`repeat(${g.length}, minmax(150px, 1fr))`},children:t.headers.map(l=>e.jsx(T,{children:l.isPlaceholder?null:p(l.column.columnDef.header,l.getContext())},l.id))},t.id))}),e.jsx($,{className:"max-h-96 overflow-y-scroll",children:o.getRowModel().rows.map(d)})]})})]})}const K=k(function(){const{data:a,isLoading:i}=S(),{data:o,isLoading:d}=I();return e.jsx("div",{className:"flex flex-1 h-full p-4 gap-4",children:e.jsxs("div",{className:"flex flex-col overflow-hidden flex-1 gap-4",children:[e.jsxs("div",{className:"flex flex-row gap-2 grid-cols-12",children:[e.jsx(b,{className:"w-full sm:w-44",title:"Items",value:a,isLoading:i}),e.jsx(b,{className:"w-full sm:w-44",title:"Files",value:o,isLoading:d})]}),e.jsx(O,{}),e.jsx(z,{})]})})});export{K as default};
@@ -1 +1 @@
1
- import{w as v,a,p as m}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I}from"./itemForm-BLyILW73.js";import{v as x,y,p as j}from"./utils-B48p8Qal.js";import"./index-B5ynPIRP.js";import"./index-CbaefyjV.js";import"./index-DLIEpuwL.js";import"./index-DutSppa2.js";import"./button-BEFuP7Ru.js";import"./badge-DTudhbGs.js";import"./zod-DU3Qlmru.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./schemas-CPJfa6mm.js";import"./input-C3iFdiD8.js";import"./chevron-down-qxzqwz13.js";import"./schemas-D-U8dKAF.js";import"./index-CZSVchcX.js";import"./x-D6gZWaAR.js";import"./loader-circle-BDUbeTTe.js";const H=v(function({params:l}){const{collectionId:t,documentId:e}=l,[p,n]=a.useState(void 0),{data:c,isFetching:u}=x(t),{data:f,isFetching:g}=y({itemType:t,id:e}),{data:i}=j(),h=a.useMemo(()=>{if(!i)return n(void 0),[];const o=i.singles[t];if(o?.changedFields)return n(o.status),o.changedFields;const s=i.collections[t];if(!s)return n(void 0),[];const r=s.modified.find(d=>d.id===e);return r?(n("modified"),r.changedFields):(s.added.find(d=>d.id===e)&&n("added"),[])},[i,t,e]),F=a.useMemo(()=>{if(!i)return[];const o=i.singles[t];if(o?.production)return o.production;const s=i.collections[t];if(!s)return[];const r=s.modified.find(d=>d.id===e);return r?r.production:[]},[i,t,e]);return!c||(u||g)?null:m.jsx("div",{className:"overflow-auto scrollbar-stable",children:m.jsx("div",{className:"p-4 gap-4",children:m.jsx(I,{itemType:t,fields:c.fields,data:f??void 0,isSingleton:c.singleton,changedFields:h,productionData:F,itemStatus:p},`${t}-${e}`)})})});export{H as default};
1
+ import{w as v,a,p as m}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I}from"./itemForm-DcKqLtr7.js";import{v as x,y,p as j}from"./utils-B48p8Qal.js";import"./index-B5ynPIRP.js";import"./index-CbaefyjV.js";import"./index-DLIEpuwL.js";import"./index-CW4Lhoah.js";import"./button-BEFuP7Ru.js";import"./badge-DTudhbGs.js";import"./zod-DU3Qlmru.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./schemas-CPJfa6mm.js";import"./input-C3iFdiD8.js";import"./chevron-down-qxzqwz13.js";import"./schemas-BabmyWH6.js";import"./index-CZSVchcX.js";import"./x-D6gZWaAR.js";import"./loader-circle-BDUbeTTe.js";const H=v(function({params:l}){const{collectionId:t,documentId:e}=l,[p,n]=a.useState(void 0),{data:c,isFetching:u}=x(t),{data:f,isFetching:g}=y({itemType:t,id:e}),{data:i}=j(),h=a.useMemo(()=>{if(!i)return n(void 0),[];const o=i.singles[t];if(o?.changedFields)return n(o.status),o.changedFields;const s=i.collections[t];if(!s)return n(void 0),[];const r=s.modified.find(d=>d.id===e);return r?(n("modified"),r.changedFields):(s.added.find(d=>d.id===e)&&n("added"),[])},[i,t,e]),F=a.useMemo(()=>{if(!i)return[];const o=i.singles[t];if(o?.production)return o.production;const s=i.collections[t];if(!s)return[];const r=s.modified.find(d=>d.id===e);return r?r.production:[]},[i,t,e]);return!c||(u||g)?null:m.jsx("div",{className:"overflow-auto scrollbar-stable",children:m.jsx("div",{className:"p-4 gap-4",children:m.jsx(I,{itemType:t,fields:c.fields,data:f??void 0,isSingleton:c.singleton,changedFields:h,productionData:F,itemStatus:p},`${t}-${e}`)})})});export{H as default};
@@ -1 +1 @@
1
- import{w as m,p as t}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I as e}from"./itemForm-BLyILW73.js";import{v as p}from"./utils-B48p8Qal.js";import"./index-B5ynPIRP.js";import"./index-CbaefyjV.js";import"./index-DLIEpuwL.js";import"./index-DutSppa2.js";import"./button-BEFuP7Ru.js";import"./badge-DTudhbGs.js";import"./zod-DU3Qlmru.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./schemas-CPJfa6mm.js";import"./input-C3iFdiD8.js";import"./chevron-down-qxzqwz13.js";import"./schemas-D-U8dKAF.js";import"./index-CZSVchcX.js";import"./x-D6gZWaAR.js";import"./loader-circle-BDUbeTTe.js";const _=m(function({params:r}){const{collectionId:i}=r,{data:o}=p(i);return o?t.jsx("div",{className:"overflow-auto",children:t.jsx("div",{className:" p-4 gap-4",children:t.jsx(e,{itemType:i,fields:o.fields,isNew:!0,isSingleton:o.singleton})})}):null});export{_ as default};
1
+ import{w as m,p as t}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I as e}from"./itemForm-DcKqLtr7.js";import{v as p}from"./utils-B48p8Qal.js";import"./index-B5ynPIRP.js";import"./index-CbaefyjV.js";import"./index-DLIEpuwL.js";import"./index-CW4Lhoah.js";import"./button-BEFuP7Ru.js";import"./badge-DTudhbGs.js";import"./zod-DU3Qlmru.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./schemas-CPJfa6mm.js";import"./input-C3iFdiD8.js";import"./chevron-down-qxzqwz13.js";import"./schemas-BabmyWH6.js";import"./index-CZSVchcX.js";import"./x-D6gZWaAR.js";import"./loader-circle-BDUbeTTe.js";const _=m(function({params:r}){const{collectionId:i}=r,{data:o}=p(i);return o?t.jsx("div",{className:"overflow-auto",children:t.jsx("div",{className:" p-4 gap-4",children:t.jsx(e,{itemType:i,fields:o.fields,isNew:!0,isSingleton:o.singleton})})}):null});export{_ as default};
@@ -1 +1 @@
1
- import{p as e,a as r,x as N,y as Z,v as xe,z as fe,R as be,w as me,O as ge}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as je,c as z,d as ve}from"./authSlice-DWtXmmFR.js";import{b as l,d as E,h as we,j as ye,k as Ne,l as Ce,u as Se}from"./utils-B48p8Qal.js";import{t as v}from"./index-CZSVchcX.js";import{R as Y,C as J,a as ee,T as te,D as ae,P as se,O as ne,u as ke}from"./index-DutSppa2.js";import{X as oe}from"./x-D6gZWaAR.js";import{B as _}from"./button-BEFuP7Ru.js";import{c as C}from"./createLucideIcon-BvSqmaUO.js";import{S as R,c as _e,u as Me}from"./index-CbaefyjV.js";import{P as Pe,u as Oe,c as ze,a as A,b as Ee,d as Re,e as Ae}from"./index-B5ynPIRP.js";import{P as De,R as Ie,T as Le,a as Te,C as $e,A as Be}from"./index-CU6_POhE.js";import{C as B}from"./chevron-down-qxzqwz13.js";import{L as P}from"./loader-circle-BDUbeTTe.js";import{A as Ge,a as He}from"./arrow-up-C0I0e1Jt.js";import{U as Fe}from"./upload-DhJ5wU_H.js";import{E as Ve}from"./external-link-ERgO2SVI.js";import{L as Ke}from"./Loading-C1QGFwZC.js";import{C as Ue}from"./chevron-right-BFlMu-RJ.js";import"./index-DLIEpuwL.js";const qe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],We=C("blocks",qe);const Qe=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Xe=C("files",Qe);const Ze=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ye=C("grid-3x3",Ze);const Je=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],et=C("heart",Je);const tt=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],at=C("log-out",tt);const st=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],nt=C("panel-left",st);const ot=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],it=C("square",ot);function rt({...t}){return e.jsx(Y,{"data-slot":"dialog",...t})}function lt({...t}){return e.jsx(se,{"data-slot":"dialog-portal",...t})}function dt({className:t,...a}){return e.jsx(ne,{"data-slot":"dialog-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(lt,{"data-slot":"dialog-portal",children:[e.jsx(dt,{}),e.jsxs(J,{"data-slot":"dialog-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(ee,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(oe,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2 text-center sm:text-left",t),...a})}function pt({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function ht({className:t,...a}){return e.jsx(te,{"data-slot":"dialog-title",className:l("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(ae,{"data-slot":"dialog-description",className:l("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=r.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),mt="#85EA2D",G=r.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=mt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function gt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(ht,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(_,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://lobelia-earth.github.io/editorial/",children:[e.jsx(G,{size:14}),"Documentation"]})}),e.jsx(_,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc/ui",children:[e.jsx(G,{size:14}),"Swagger API UI"]})}),e.jsx(_,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(pt,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(et,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var jt="Separator",H="horizontal",vt=["horizontal","vertical"],ie=r.forwardRef((t,a)=>{const{decorative:n,orientation:s=H,...o}=t,i=wt(s)?s:H,p=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(Pe.div,{"data-orientation":i,...p,...o,ref:a})});ie.displayName=jt;function wt(t){return vt.includes(t)}var yt=ie;function re({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(yt,{"data-slot":"separator-root",decorative:n,orientation:a,className:l("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function Nt({...t}){return e.jsx(Y,{"data-slot":"sheet",...t})}function Ct({...t}){return e.jsx(se,{"data-slot":"sheet-portal",...t})}function St({className:t,...a}){return e.jsx(ne,{"data-slot":"sheet-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function kt({className:t,children:a,side:n="right",...s}){return e.jsxs(Ct,{children:[e.jsx(St,{}),e.jsxs(J,{"data-slot":"sheet-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(ee,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(oe,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _t({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:l("flex flex-col gap-1.5 p-4",t),...a})}function Mt({className:t,...a}){return e.jsx(te,{"data-slot":"sheet-title",className:l("text-foreground font-semibold",t),...a})}function Pt({className:t,...a}){return e.jsx(ae,{"data-slot":"sheet-description",className:l("text-muted-foreground text-sm",t),...a})}function le({delayDuration:t=0,...a}){return e.jsx(De,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function Ot({...t}){return e.jsx(le,{children:e.jsx(Ie,{"data-slot":"tooltip",...t})})}function zt({...t}){return e.jsx(Le,{"data-slot":"tooltip-trigger",...t})}function Et({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(Te,{children:e.jsxs($e,{"data-slot":"tooltip-content",sideOffset:a,className:l("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(Be,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const O=768;function Rt(){const[t,a]=r.useState(void 0);return r.useEffect(()=>{const n=window.matchMedia(`(max-width: ${O-1}px)`),s=()=>{a(window.innerWidth<O)};return n.addEventListener("change",s),a(window.innerWidth<O),()=>n.removeEventListener("change",s)},[]),!!t}const At="sidebar_state",Dt=3600*24*7,It="16rem",Lt="18rem",Tt="3rem",$t="b",de=r.createContext(null);function D(){const t=r.useContext(de);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Bt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...u}){const p=Rt(),[f,h]=r.useState(!1),[x,S]=r.useState(t),m=a??x,b=r.useCallback(d=>{const c=typeof d=="function"?d(m):d;n?n(c):S(c),document.cookie=`${At}=${c}; path=/; max-age=${Dt}`},[n,m]),j=r.useCallback(()=>p?h(d=>!d):b(d=>!d),[p,b,h]);r.useEffect(()=>{const d=c=>{c.key===$t&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),j())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[j]);const w=m?"expanded":"collapsed",k=r.useMemo(()=>({state:w,open:m,setOpen:b,isMobile:p,openMobile:f,setOpenMobile:h,toggleSidebar:j}),[w,m,b,p,f,h,j]);return e.jsx(de.Provider,{value:k,children:e.jsx(le,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":It,"--sidebar-width-icon":Tt,...o},className:l("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...u,children:i})})})}function Gt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:u,state:p,openMobile:f,setOpenMobile:h}=D();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:l("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):u?e.jsx(Nt,{open:f,onOpenChange:h,...i,children:e.jsxs(kt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Lt},side:t,children:[e.jsxs(_t,{className:"sr-only",children:[e.jsx(Mt,{children:"Sidebar"}),e.jsx(Pt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":p==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:l("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:l("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ht({className:t,onClick:a,...n}){const{toggleSidebar:s}=D();return e.jsxs(_,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l("size-7",t),onClick:o=>{a?.(o),s()},...n,children:[e.jsx(nt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Ft({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l("flex flex-col gap-2 p-2",t),...a})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx(re,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:l("bg-sidebar-border mx-2 w-auto",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function F({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l("relative flex w-full min-w-0 flex-col p-2",t),...a})}function V({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:l("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function K({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l("w-full text-sm",t),...a})}function U({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l("flex w-full min-w-0 flex-col gap-1",t),...a})}function y({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l("group/menu-item relative",t),...a})}const qt=_e("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function g({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...u}){const p=t?R:"button",{isMobile:f,state:h}=D(),x=e.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:l(qt({variant:n,size:s}),i),...u});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(Ot,{children:[e.jsx(zt,{asChild:!0,children:x}),e.jsx(Et,{side:"right",align:"center",hidden:h!=="collapsed"||f,...o})]})):x}function Wt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:l("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Qt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:l("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=E(),{data:n}=we();if(!a)return null;const s=r.useMemo(()=>Object.entries(a).filter(([,o])=>t?o.singleton:!o.singleton).toSorted(([o],[i])=>o.localeCompare(i)),[a,t]);return e.jsx(e.Fragment,{children:s.map(([o,i])=>e.jsx(Wt,{children:e.jsx(Z,{to:t?`/admin/dashboard/${o}/default`:`/admin/dashboard/${o}`,className:({isActive:u,isPending:p})=>p?"pending":u?"active":"",children:({isActive:u})=>e.jsx(Qt,{isActive:u,asChild:!0,children:e.jsxs("div",{children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap",children:i.displayName}),!t&&n?.[o]&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1 min-w-[25px] text-right",children:Object.keys(n[o]).length})]})})})},i.displayName))})}var M="Collapsible",[Xt]=ze(M),[Zt,I]=Xt(M),ce=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:u,...p}=t,[f,h]=Oe({prop:s,defaultProp:o??!1,onChange:u,caller:M});return e.jsx(Zt,{scope:n,disabled:i,contentId:ke(),open:f,onOpenToggle:r.useCallback(()=>h(x=>!x),[h]),children:e.jsx(A.div,{"data-state":T(f),"data-disabled":i?"":void 0,...p,ref:a})})});ce.displayName=M;var ue="CollapsibleTrigger",pe=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=I(ue,n);return e.jsx(A.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":T(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:Ee(t.onClick,o.onOpenToggle)})});pe.displayName=ue;var L="CollapsibleContent",he=r.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=I(L,t.__scopeCollapsible);return e.jsx(Re,{present:n||o.open,children:({present:i})=>e.jsx(Yt,{...s,ref:a,present:i})})});he.displayName=L;var Yt=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,u=I(L,n),[p,f]=r.useState(s),h=r.useRef(null),x=Me(a,h),S=r.useRef(0),m=S.current,b=r.useRef(0),j=b.current,w=u.open||p,k=r.useRef(w),d=r.useRef(void 0);return r.useEffect(()=>{const c=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(c)},[]),Ae(()=>{const c=h.current;if(c){d.current=d.current||{transitionDuration:c.style.transitionDuration,animationName:c.style.animationName},c.style.transitionDuration="0s",c.style.animationName="none";const $=c.getBoundingClientRect();S.current=$.height,b.current=$.width,k.current||(c.style.transitionDuration=d.current.transitionDuration,c.style.animationName=d.current.animationName),f(s)}},[u.open,s]),e.jsx(A.div,{"data-state":T(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...i,ref:x,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:w&&o})});function T(t){return t?"open":"closed"}var Jt=ce;function W({...t}){return e.jsx(Jt,{"data-slot":"collapsible",...t})}function Q({...t}){return e.jsx(pe,{"data-slot":"collapsible-trigger",...t})}function X({...t}){return e.jsx(he,{"data-slot":"collapsible-content",...t})}function ea(){const t=je(),[a,n]=r.useState(!1),[s,o]=ye(),[i,u]=Ne(),[p,f]=Ce(),{data:h}=Se(),{data:x}=E(),S=r.useMemo(()=>x&&!!Object.values(x).find(d=>!d.singleton),[x]),m=r.useMemo(()=>x&&!!Object.values(x).find(d=>d.singleton),[x]),b=z(d=>d.auth.user),j=async d=>{try{await s({author:d}).unwrap()?v.success("Content published successfully."):v.error("Publishing failed.")}catch(c){v.error("Publishing failed."),console.error(c)}},w=async()=>{try{await i().unwrap()?v.success("Content pulled successfully."):v.error("Pulling content failed.")}catch(d){v.error("Pulling content failed."),console.error(d)}},k=async d=>{try{await p(d).unwrap()?v.success("Content pushed successfully."):v.error("Pushing content failed.")}catch(c){v.error("Pushing content failed."),console.error(c)}};return e.jsxs(Gt,{className:"z-50",children:[e.jsx(gt,{isOpen:a,setOpen:n}),e.jsx(Ft,{className:"h-14 justify-center",children:e.jsx(F,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:h?.name})})}),e.jsx(Ut,{children:e.jsxs(F,{children:[e.jsx(V,{children:"Content"}),e.jsx(K,{children:e.jsxs(U,{children:[e.jsx(W,{className:"group/collapsible",disabled:!S,children:e.jsxs(y,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(Ye,{}),e.jsx("span",{children:"Collections"}),e.jsx(B,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(X,{children:e.jsx(q,{})})]})}),e.jsx(W,{className:"group/collapsible",disabled:!m,children:e.jsxs(y,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(it,{}),e.jsx("span",{children:"Singles"}),e.jsx(B,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(X,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(y,{children:e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Xe,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(y,{children:e.jsxs(g,{disabled:!0,children:[e.jsx(We,{}),e.jsx("span",{children:"Components"})]})})]})})]})}),e.jsxs(Vt,{children:[e.jsx(V,{children:"Actions"}),e.jsx(K,{children:e.jsxs(U,{children:[b?.role==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>w(),children:[u.isLoading?e.jsx(P,{className:"animate-spin"}):e.jsx(Ge,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(y,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>k({author:b.email}),children:[f.isLoading?e.jsx(P,{className:"animate-spin"}):e.jsx(He,{}),e.jsx("span",{children:"Push to repo"})]})})]}),b&&e.jsx(y,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>{j(b.email)},children:[o.isLoading?e.jsx(P,{className:"animate-spin"}):e.jsx(Fe,{}),e.jsx("span",{children:"Publish"})]})})]})}),e.jsx(Kt,{}),e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:h?.previewUrl,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(g,{className:"cursor-pointer",onClick:()=>n(!0),children:"About"}),e.jsxs(g,{className:"cursor-pointer",onClick:()=>t(ve()),children:[e.jsx(at,{}),"Log out"]}),e.jsxs("div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",children:["Editorial v","6.21.0"]})]})]})}function ta({children:t}){const a=xe(),n=z(o=>o.auth.user),s=z(o=>o.auth.isLoading);return r.useEffect(()=>{!s&&!n&&a("/admin")},[s,a,n]),s||!n?e.jsx(Ke,{}):t}function aa(){const{pathname:t}=fe(),{data:a}=E(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(be.Fragment,{children:[i.length>1&&o>=1&&e.jsx(Ue,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsxs("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:[o<i.length-1&&a[s]&&a[s].singleton&&(a[s]?a[s].displayName:s),o<i.length-1&&a[s]&&!a[s].singleton&&e.jsx(Z,{to:`/admin/dashboard/${s}`,className:({isActive:u,isPending:p})=>p?"pending":u?"active":"",children:a[s]?a[s].displayName:s}),o===i.length-1&&(a[s]?a[s].displayName:s)]},s)]},o))}):null}const ya=me(function(){return e.jsx(ta,{children:e.jsxs(Bt,{className:"flex h-full",children:[e.jsx(ea,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ht,{}),e.jsx(re,{orientation:"vertical",className:"h-4"}),e.jsx(aa,{})]})}),e.jsx(ge,{})]})]})})});export{ya as default};
1
+ import{p as e,a as r,x as N,y as Z,v as xe,z as fe,R as be,w as me,O as ge}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as je,c as z,d as ve}from"./authSlice-DWtXmmFR.js";import{b as l,d as E,h as we,j as ye,k as Ne,l as Ce,u as Se}from"./utils-B48p8Qal.js";import{t as v}from"./index-CZSVchcX.js";import{R as Y,C as J,a as ee,T as te,D as ae,P as se,O as ne,u as ke}from"./index-CW4Lhoah.js";import{X as oe}from"./x-D6gZWaAR.js";import{B as _}from"./button-BEFuP7Ru.js";import{c as C}from"./createLucideIcon-BvSqmaUO.js";import{S as R,c as _e,u as Me}from"./index-CbaefyjV.js";import{P as Pe,u as Oe,c as ze,a as A,b as Ee,d as Re,e as Ae}from"./index-B5ynPIRP.js";import{P as De,R as Ie,T as Le,a as Te,C as $e,A as Be}from"./index-DRumOFGs.js";import{C as B}from"./chevron-down-qxzqwz13.js";import{L as P}from"./loader-circle-BDUbeTTe.js";import{A as Ge,a as He}from"./arrow-up-C0I0e1Jt.js";import{U as Fe}from"./upload-DhJ5wU_H.js";import{E as Ve}from"./external-link-ERgO2SVI.js";import{L as Ke}from"./Loading-C1QGFwZC.js";import{C as Ue}from"./chevron-right-BFlMu-RJ.js";import"./index-DLIEpuwL.js";const qe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],We=C("blocks",qe);const Qe=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Xe=C("files",Qe);const Ze=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ye=C("grid-3x3",Ze);const Je=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],et=C("heart",Je);const tt=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],at=C("log-out",tt);const st=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],nt=C("panel-left",st);const ot=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],it=C("square",ot);function rt({...t}){return e.jsx(Y,{"data-slot":"dialog",...t})}function lt({...t}){return e.jsx(se,{"data-slot":"dialog-portal",...t})}function dt({className:t,...a}){return e.jsx(ne,{"data-slot":"dialog-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(lt,{"data-slot":"dialog-portal",children:[e.jsx(dt,{}),e.jsxs(J,{"data-slot":"dialog-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(ee,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(oe,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2 text-center sm:text-left",t),...a})}function pt({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function ht({className:t,...a}){return e.jsx(te,{"data-slot":"dialog-title",className:l("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(ae,{"data-slot":"dialog-description",className:l("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=r.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),mt="#85EA2D",G=r.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=mt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function gt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(ht,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(_,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://lobelia-earth.github.io/editorial/",children:[e.jsx(G,{size:14}),"Documentation"]})}),e.jsx(_,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc/ui",children:[e.jsx(G,{size:14}),"Swagger API UI"]})}),e.jsx(_,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(pt,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(et,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var jt="Separator",H="horizontal",vt=["horizontal","vertical"],ie=r.forwardRef((t,a)=>{const{decorative:n,orientation:s=H,...o}=t,i=wt(s)?s:H,p=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(Pe.div,{"data-orientation":i,...p,...o,ref:a})});ie.displayName=jt;function wt(t){return vt.includes(t)}var yt=ie;function re({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(yt,{"data-slot":"separator-root",decorative:n,orientation:a,className:l("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function Nt({...t}){return e.jsx(Y,{"data-slot":"sheet",...t})}function Ct({...t}){return e.jsx(se,{"data-slot":"sheet-portal",...t})}function St({className:t,...a}){return e.jsx(ne,{"data-slot":"sheet-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function kt({className:t,children:a,side:n="right",...s}){return e.jsxs(Ct,{children:[e.jsx(St,{}),e.jsxs(J,{"data-slot":"sheet-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(ee,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(oe,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _t({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:l("flex flex-col gap-1.5 p-4",t),...a})}function Mt({className:t,...a}){return e.jsx(te,{"data-slot":"sheet-title",className:l("text-foreground font-semibold",t),...a})}function Pt({className:t,...a}){return e.jsx(ae,{"data-slot":"sheet-description",className:l("text-muted-foreground text-sm",t),...a})}function le({delayDuration:t=0,...a}){return e.jsx(De,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function Ot({...t}){return e.jsx(le,{children:e.jsx(Ie,{"data-slot":"tooltip",...t})})}function zt({...t}){return e.jsx(Le,{"data-slot":"tooltip-trigger",...t})}function Et({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(Te,{children:e.jsxs($e,{"data-slot":"tooltip-content",sideOffset:a,className:l("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(Be,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const O=768;function Rt(){const[t,a]=r.useState(void 0);return r.useEffect(()=>{const n=window.matchMedia(`(max-width: ${O-1}px)`),s=()=>{a(window.innerWidth<O)};return n.addEventListener("change",s),a(window.innerWidth<O),()=>n.removeEventListener("change",s)},[]),!!t}const At="sidebar_state",Dt=3600*24*7,It="16rem",Lt="18rem",Tt="3rem",$t="b",de=r.createContext(null);function D(){const t=r.useContext(de);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Bt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...u}){const p=Rt(),[f,h]=r.useState(!1),[x,S]=r.useState(t),m=a??x,b=r.useCallback(d=>{const c=typeof d=="function"?d(m):d;n?n(c):S(c),document.cookie=`${At}=${c}; path=/; max-age=${Dt}`},[n,m]),j=r.useCallback(()=>p?h(d=>!d):b(d=>!d),[p,b,h]);r.useEffect(()=>{const d=c=>{c.key===$t&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),j())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[j]);const w=m?"expanded":"collapsed",k=r.useMemo(()=>({state:w,open:m,setOpen:b,isMobile:p,openMobile:f,setOpenMobile:h,toggleSidebar:j}),[w,m,b,p,f,h,j]);return e.jsx(de.Provider,{value:k,children:e.jsx(le,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":It,"--sidebar-width-icon":Tt,...o},className:l("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...u,children:i})})})}function Gt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:u,state:p,openMobile:f,setOpenMobile:h}=D();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:l("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):u?e.jsx(Nt,{open:f,onOpenChange:h,...i,children:e.jsxs(kt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Lt},side:t,children:[e.jsxs(_t,{className:"sr-only",children:[e.jsx(Mt,{children:"Sidebar"}),e.jsx(Pt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":p==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:l("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:l("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ht({className:t,onClick:a,...n}){const{toggleSidebar:s}=D();return e.jsxs(_,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l("size-7",t),onClick:o=>{a?.(o),s()},...n,children:[e.jsx(nt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Ft({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l("flex flex-col gap-2 p-2",t),...a})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx(re,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:l("bg-sidebar-border mx-2 w-auto",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function F({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l("relative flex w-full min-w-0 flex-col p-2",t),...a})}function V({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:l("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function K({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l("w-full text-sm",t),...a})}function U({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l("flex w-full min-w-0 flex-col gap-1",t),...a})}function y({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l("group/menu-item relative",t),...a})}const qt=_e("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function g({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...u}){const p=t?R:"button",{isMobile:f,state:h}=D(),x=e.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:l(qt({variant:n,size:s}),i),...u});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(Ot,{children:[e.jsx(zt,{asChild:!0,children:x}),e.jsx(Et,{side:"right",align:"center",hidden:h!=="collapsed"||f,...o})]})):x}function Wt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:l("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Qt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:l("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=E(),{data:n}=we();if(!a)return null;const s=r.useMemo(()=>Object.entries(a).filter(([,o])=>t?o.singleton:!o.singleton).toSorted(([o],[i])=>o.localeCompare(i)),[a,t]);return e.jsx(e.Fragment,{children:s.map(([o,i])=>e.jsx(Wt,{children:e.jsx(Z,{to:t?`/admin/dashboard/${o}/default`:`/admin/dashboard/${o}`,className:({isActive:u,isPending:p})=>p?"pending":u?"active":"",children:({isActive:u})=>e.jsx(Qt,{isActive:u,asChild:!0,children:e.jsxs("div",{children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap",children:i.displayName}),!t&&n?.[o]&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1 min-w-[25px] text-right",children:Object.keys(n[o]).length})]})})})},i.displayName))})}var M="Collapsible",[Xt]=ze(M),[Zt,I]=Xt(M),ce=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:u,...p}=t,[f,h]=Oe({prop:s,defaultProp:o??!1,onChange:u,caller:M});return e.jsx(Zt,{scope:n,disabled:i,contentId:ke(),open:f,onOpenToggle:r.useCallback(()=>h(x=>!x),[h]),children:e.jsx(A.div,{"data-state":T(f),"data-disabled":i?"":void 0,...p,ref:a})})});ce.displayName=M;var ue="CollapsibleTrigger",pe=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=I(ue,n);return e.jsx(A.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":T(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:Ee(t.onClick,o.onOpenToggle)})});pe.displayName=ue;var L="CollapsibleContent",he=r.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=I(L,t.__scopeCollapsible);return e.jsx(Re,{present:n||o.open,children:({present:i})=>e.jsx(Yt,{...s,ref:a,present:i})})});he.displayName=L;var Yt=r.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,u=I(L,n),[p,f]=r.useState(s),h=r.useRef(null),x=Me(a,h),S=r.useRef(0),m=S.current,b=r.useRef(0),j=b.current,w=u.open||p,k=r.useRef(w),d=r.useRef(void 0);return r.useEffect(()=>{const c=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(c)},[]),Ae(()=>{const c=h.current;if(c){d.current=d.current||{transitionDuration:c.style.transitionDuration,animationName:c.style.animationName},c.style.transitionDuration="0s",c.style.animationName="none";const $=c.getBoundingClientRect();S.current=$.height,b.current=$.width,k.current||(c.style.transitionDuration=d.current.transitionDuration,c.style.animationName=d.current.animationName),f(s)}},[u.open,s]),e.jsx(A.div,{"data-state":T(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...i,ref:x,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:w&&o})});function T(t){return t?"open":"closed"}var Jt=ce;function W({...t}){return e.jsx(Jt,{"data-slot":"collapsible",...t})}function Q({...t}){return e.jsx(pe,{"data-slot":"collapsible-trigger",...t})}function X({...t}){return e.jsx(he,{"data-slot":"collapsible-content",...t})}function ea(){const t=je(),[a,n]=r.useState(!1),[s,o]=ye(),[i,u]=Ne(),[p,f]=Ce(),{data:h}=Se(),{data:x}=E(),S=r.useMemo(()=>x&&!!Object.values(x).find(d=>!d.singleton),[x]),m=r.useMemo(()=>x&&!!Object.values(x).find(d=>d.singleton),[x]),b=z(d=>d.auth.user),j=async d=>{try{await s({author:d}).unwrap()?v.success("Content published successfully."):v.error("Publishing failed.")}catch(c){v.error("Publishing failed."),console.error(c)}},w=async()=>{try{await i().unwrap()?v.success("Content pulled successfully."):v.error("Pulling content failed.")}catch(d){v.error("Pulling content failed."),console.error(d)}},k=async d=>{try{await p(d).unwrap()?v.success("Content pushed successfully."):v.error("Pushing content failed.")}catch(c){v.error("Pushing content failed."),console.error(c)}};return e.jsxs(Gt,{className:"z-50",children:[e.jsx(gt,{isOpen:a,setOpen:n}),e.jsx(Ft,{className:"h-14 justify-center",children:e.jsx(F,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:h?.name})})}),e.jsx(Ut,{children:e.jsxs(F,{children:[e.jsx(V,{children:"Content"}),e.jsx(K,{children:e.jsxs(U,{children:[e.jsx(W,{className:"group/collapsible",disabled:!S,children:e.jsxs(y,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(Ye,{}),e.jsx("span",{children:"Collections"}),e.jsx(B,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(X,{children:e.jsx(q,{})})]})}),e.jsx(W,{className:"group/collapsible",disabled:!m,children:e.jsxs(y,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(it,{}),e.jsx("span",{children:"Singles"}),e.jsx(B,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(X,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(y,{children:e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Xe,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(y,{children:e.jsxs(g,{disabled:!0,children:[e.jsx(We,{}),e.jsx("span",{children:"Components"})]})})]})})]})}),e.jsxs(Vt,{children:[e.jsx(V,{children:"Actions"}),e.jsx(K,{children:e.jsxs(U,{children:[b?.role==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(y,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>w(),children:[u.isLoading?e.jsx(P,{className:"animate-spin"}):e.jsx(Ge,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(y,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>k({author:b.email}),children:[f.isLoading?e.jsx(P,{className:"animate-spin"}):e.jsx(He,{}),e.jsx("span",{children:"Push to repo"})]})})]}),b&&e.jsx(y,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>{j(b.email)},children:[o.isLoading?e.jsx(P,{className:"animate-spin"}):e.jsx(Fe,{}),e.jsx("span",{children:"Publish"})]})})]})}),e.jsx(Kt,{}),e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:h?.previewUrl,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(g,{className:"cursor-pointer",onClick:()=>n(!0),children:"About"}),e.jsxs(g,{className:"cursor-pointer",onClick:()=>t(ve()),children:[e.jsx(at,{}),"Log out"]}),e.jsxs("div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",children:["Editorial v","6.22.0"]})]})]})}function ta({children:t}){const a=xe(),n=z(o=>o.auth.user),s=z(o=>o.auth.isLoading);return r.useEffect(()=>{!s&&!n&&a("/admin")},[s,a,n]),s||!n?e.jsx(Ke,{}):t}function aa(){const{pathname:t}=fe(),{data:a}=E(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(be.Fragment,{children:[i.length>1&&o>=1&&e.jsx(Ue,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsxs("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:[o<i.length-1&&a[s]&&a[s].singleton&&(a[s]?a[s].displayName:s),o<i.length-1&&a[s]&&!a[s].singleton&&e.jsx(Z,{to:`/admin/dashboard/${s}`,className:({isActive:u,isPending:p})=>p?"pending":u?"active":"",children:a[s]?a[s].displayName:s}),o===i.length-1&&(a[s]?a[s].displayName:s)]},s)]},o))}):null}const ya=me(function(){return e.jsx(ta,{children:e.jsxs(Bt,{className:"flex h-full",children:[e.jsx(ea,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ht,{}),e.jsx(re,{orientation:"vertical",className:"h-4"}),e.jsx(aa,{})]})}),e.jsx(ge,{})]})]})})});export{ya as default};
@@ -0,0 +1 @@
1
+ import{p as r}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as p}from"./button-BEFuP7Ru.js";import{f as l,C as n,a as f}from"./clear-button-C666rKTW.js";import{j as c,k as u,l as x}from"./itemForm-DcKqLtr7.js";import{b as d}from"./utils-B48p8Qal.js";import{C as j}from"./calendar-Frbsxn98.js";import"./index-CbaefyjV.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./chevron-down-qxzqwz13.js";import"./x-D6gZWaAR.js";import"./index-B5ynPIRP.js";import"./index-DLIEpuwL.js";import"./index-CW4Lhoah.js";import"./badge-DTudhbGs.js";import"./zod-DU3Qlmru.js";import"./check-DF0ucE8d.js";import"./schemas-CPJfa6mm.js";import"./input-C3iFdiD8.js";import"./schemas-BabmyWH6.js";import"./index-CZSVchcX.js";import"./loader-circle-BDUbeTTe.js";function H({id:i,date:t,onDateChange:o,placeholder:e="Pick a date",disabled:s=!1,className:m,allowClear:a=!1}){return r.jsxs(c,{children:[r.jsx(u,{asChild:!0,children:r.jsx(p,{variant:"outline",className:d("w-full justify-start text-left font-normal relative",!t&&"text-muted-foreground",m),disabled:s,children:r.jsxs(r.Fragment,{children:[r.jsx(j,{className:"mr-2 h-4 w-4"}),t?l(t,"PPP"):r.jsx("span",{children:e}),r.jsx(n,{onClear:()=>{o?.(void 0)},visible:a&&!!t})]})})}),r.jsx(x,{className:"w-auto p-0",children:r.jsx(f,{id:i,mode:"single",selected:t,onSelect:o,initialFocus:!0})})]})}export{H as default};
@@ -0,0 +1 @@
1
+ import{a as i,p as t}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as N}from"./button-BEFuP7Ru.js";import{f as n,C as b,a as H}from"./clear-button-C666rKTW.js";import{I as k}from"./input-C3iFdiD8.js";import{j as S,k as g,l as B}from"./itemForm-DcKqLtr7.js";import{b as E}from"./utils-B48p8Qal.js";import{C as w}from"./calendar-Frbsxn98.js";import"./index-CbaefyjV.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./chevron-down-qxzqwz13.js";import"./x-D6gZWaAR.js";import"./index-B5ynPIRP.js";import"./index-DLIEpuwL.js";import"./index-CW4Lhoah.js";import"./badge-DTudhbGs.js";import"./zod-DU3Qlmru.js";import"./check-DF0ucE8d.js";import"./schemas-CPJfa6mm.js";import"./schemas-BabmyWH6.js";import"./index-CZSVchcX.js";import"./loader-circle-BDUbeTTe.js";function T({id:d,date:s,onDateTimeChange:r,placeholder:x="Pick a date and time",disabled:c=!1,className:j,allowClear:v=!1}){const[e,a]=i.useState(s),[l,u]=i.useState(s?n(s,"HH:mm"):"12:00");i.useEffect(()=>{a(s),s&&u(n(s,"HH:mm"))},[s]);const h=i.useCallback(o=>{const m=o.target.value;if(u(m),!e)return;const[p,C]=m.split(":").map(Number),f=new Date(e);f.setHours(p,C,0,0),r?.(f)},[e,r]),P=i.useCallback(o=>{if(!o){a(void 0),r?.(void 0);return}const[m,p]=l.split(":").map(Number);o.setHours(m,p,0,0),a(o),r?.(o)},[l,r]);return t.jsxs("div",{className:"flex gap-2",children:[t.jsxs(S,{children:[t.jsx(g,{asChild:!0,children:t.jsx(N,{variant:"outline",className:E("flex-1 justify-start text-left font-normal relative",!e&&"text-muted-foreground",j),disabled:c,children:t.jsxs(t.Fragment,{children:[t.jsx(w,{className:"mr-2 h-4 w-4"}),e?n(e,"PPP"):t.jsx("span",{children:x}),t.jsx(b,{onClear:()=>{a(void 0),r?.(void 0)},visible:v&&!!s})]})})}),t.jsx(B,{className:"w-auto p-0",children:t.jsx(H,{id:d,mode:"single",selected:e,onSelect:P,initialFocus:!0})})]}),t.jsx(k,{type:"time",value:l,onChange:h,disabled:c||!e,className:"w-32"})]})}export{T as default};
@@ -42,4 +42,4 @@ import{a as l,B as Xn,p as S}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{e as Pe,a
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mo="DialogDescriptionWarning",po=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pn(mo).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vi=en,zi=nn,Yi=on,Ui=sn,Xi=an,Ki=ln,Gi=fn,qi=hn;const go=["top","right","bottom","left"],ee=Math.min,W=Math.max,De=Math.round,Ce=Math.floor,U=e=>({x:e,y:e}),vo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function Ze(e,t,n){return W(e,ee(t,n))}function G(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function ot(e){return e==="x"?"y":"x"}function it(e){return e==="y"?"height":"width"}const wo=new Set(["top","bottom"]);function Y(e){return wo.has(q(e))?"y":"x"}function st(e){return ot(Y(e))}function xo(e,t,n){n===void 0&&(n=!1);const r=de(e),o=st(e),i=it(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Te(s)),[s,Te(s)]}function bo(e){const t=Te(e);return[Qe(e),t,Qe(t)]}function Qe(e){return e.replace(/start|end/g,t=>yo[t])}const At=["left","right"],Pt=["right","left"],Eo=["top","bottom"],Co=["bottom","top"];function So(e,t,n){switch(e){case"top":case"bottom":return n?t?Pt:At:t?At:Pt;case"left":case"right":return t?Eo:Co;default:return[]}}function Ro(e,t,n,r){const o=de(e);let i=So(q(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Qe)))),i}function Te(e){return e.replace(/left|right|bottom|top/g,t=>vo[t])}function Ao(e){return{top:0,right:0,bottom:0,left:0,...e}}function gn(e){return typeof e!="number"?Ao(e):{top:e,right:e,bottom:e,left:e}}function Ne(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ot(e,t,n){let{reference:r,floating:o}=e;const i=Y(t),s=st(t),a=it(s),d=q(t),c=i==="y",u=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let m;switch(d){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(de(t)){case"start":m[s]-=p*(n&&c?-1:1);break;case"end":m[s]+=p*(n&&c?-1:1);break}return m}const Po=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:h}=Ot(c,r,d),p=r,m={},v=0;for(let f=0;f<a.length;f++){const{name:g,fn:y}=a[f],{x:w,y:b,data:x,reset:E}=await y({x:u,y:h,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,h=b??h,m={...m,[g]:{...m[g],...x}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:h}=Ot(c,p,d)),f=-1)}return{x:u,y:h,placement:p,strategy:o,middlewareData:m}};async function pe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=G(t,e),v=gn(m),g=a[p?h==="floating"?"reference":"floating":h],y=Ne(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),w=h==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Ne(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:d}):w);return{top:(y.top-E.top+v.top)/x.y,bottom:(E.bottom-y.bottom+v.bottom)/x.y,left:(y.left-E.left+v.left)/x.x,right:(E.right-y.right+v.right)/x.x}}const Oo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:d}=t,{element:c,padding:u=0}=G(e,t)||{};if(c==null)return{};const h=gn(u),p={x:n,y:r},m=st(o),v=it(m),f=await s.getDimensions(c),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[m]-p[m]-i.floating[v],E=p[m]-i.reference[m],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let C=R?R[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(R)))&&(C=a.floating[b]||i.floating[v]);const P=x/2-E/2,D=C/2-f[v]/2-1,O=ee(h[y],D),N=ee(h[w],D),k=O,L=C-f[v]-N,T=C/2-f[v]/2+P,I=Ze(k,T,L),M=!d.arrow&&de(o)!=null&&T!==I&&i.reference[v]/2-(T<k?O:N)-f[v]/2<0,F=M?T<k?T-k:T-L:0;return{[m]:p[m]+F,data:{[m]:I,centerOffset:T-I-F,...M&&{alignmentOffset:F}},reset:M}}}),Do=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:d,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=G(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=q(o),w=Y(a),b=q(a)===a,x=await(d.isRTL==null?void 0:d.isRTL(c.floating)),E=p||(b||!f?[Te(a)]:bo(a)),R=v!=="none";!p&&R&&E.push(...Ro(a,f,v,x));const C=[a,...E],P=await pe(t,g),D=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&D.push(P[y]),h){const T=xo(o,s,x);D.push(P[T[0]],P[T[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(T=>T<=0)){var N,k;const T=(((N=i.flip)==null?void 0:N.index)||0)+1,I=C[T];if(I&&(!(h==="alignment"?w!==Y(I):!1)||O.every(A=>Y(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:T,overflows:O},reset:{placement:I}};let M=(k=O.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!M)switch(m){case"bestFit":{var L;const F=(L=O.filter(A=>{if(R){const _=Y(A.placement);return _===w||_==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((A,_)=>A[1]-_[1])[0])==null?void 0:L[0];F&&(M=F);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Dt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tt(e){return go.some(t=>e[t]>=0)}const To=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=G(e,t);switch(r){case"referenceHidden":{const i=await pe(t,{...o,elementContext:"reference"}),s=Dt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Tt(s)}}}case"escaped":{const i=await pe(t,{...o,altBoundary:!0}),s=Dt(i,n.floating);return{data:{escapedOffsets:s,escaped:Tt(s)}}}default:return{}}}}},vn=new Set(["left","top"]);async function No(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=q(n),a=de(n),d=Y(n)==="y",c=vn.has(s)?-1:1,u=i&&d?-1:1,h=G(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Lo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,d=await No(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:s}}}}},Mo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...d}=G(e,t),c={x:n,y:r},u=await pe(t,d),h=Y(q(o)),p=ot(h);let m=c[p],v=c[h];if(i){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=m+u[g],b=m-u[y];m=Ze(w,m,b)}if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=v+u[g],b=v-u[y];v=Ze(w,v,b)}const f=a.fn({...t,[p]:m,[h]:v});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[p]:i,[h]:s}}}}}},Fo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:d=!0,crossAxis:c=!0}=G(e,t),u={x:n,y:r},h=Y(o),p=ot(h);let m=u[p],v=u[h];const f=G(a,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(d){const b=p==="y"?"height":"width",x=i.reference[p]-i.floating[b]+g.mainAxis,E=i.reference[p]+i.reference[b]-g.mainAxis;m<x?m=x:m>E&&(m=E)}if(c){var y,w;const b=p==="y"?"width":"height",x=vn.has(q(o)),E=i.reference[h]-i.floating[b]+(x&&((y=s.offset)==null?void 0:y[h])||0)+(x?0:g.crossAxis),R=i.reference[h]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[h])||0)-(x?g.crossAxis:0);v<E?v=E:v>R&&(v=R)}return{[p]:m,[h]:v}}}},ko=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:d=()=>{},...c}=G(e,t),u=await pe(t,c),h=q(o),p=de(o),m=Y(o)==="y",{width:v,height:f}=i.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,g=p==="end"?"top":"bottom");const w=f-u.top-u.bottom,b=v-u.left-u.right,x=ee(f-u[g],w),E=ee(v-u[y],b),R=!t.middlewareData.shift;let C=x,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!p){const O=W(u.left,0),N=W(u.right,0),k=W(u.top,0),L=W(u.bottom,0);m?P=v-2*(O!==0||N!==0?O+N:W(u.left,u.right)):C=f-2*(k!==0||L!==0?k+L:W(u.top,u.bottom))}await d({...t,availableWidth:P,availableHeight:C});const D=await s.getDimensions(a.floating);return v!==D.width||f!==D.height?{reset:{rects:!0}}:{}}}};function ke(){return typeof window<"u"}function he(e){return yn(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(yn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yn(e){return ke()?e instanceof Node||e instanceof B(e).Node:!1}function j(e){return ke()?e instanceof Element||e instanceof B(e).Element:!1}function X(e){return ke()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function Nt(e){return!ke()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}const _o=new Set(["inline","contents"]);function ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!_o.has(o)}const Io=new Set(["table","td","th"]);function Wo(e){return Io.has(he(e))}const Bo=[":popover-open",":modal"];function _e(e){return Bo.some(t=>{try{return e.matches(t)}catch{return!1}})}const $o=["transform","translate","scale","rotate","perspective"],jo=["transform","translate","scale","rotate","perspective","filter"],Ho=["paint","layout","strict","content"];function at(e){const t=ct(),n=j(e)?H(e):e;return $o.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||jo.some(r=>(n.willChange||"").includes(r))||Ho.some(r=>(n.contain||"").includes(r))}function Vo(e){let t=te(e);for(;X(t)&&!fe(t);){if(at(t))return t;if(_e(t))return null;t=te(t)}return null}function ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zo=new Set(["html","body","#document"]);function fe(e){return zo.has(he(e))}function H(e){return B(e).getComputedStyle(e)}function Ie(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function te(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nt(e)&&e.host||K(e);return Nt(t)?t.host:t}function wn(e){const t=te(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&ve(t)?t:wn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=B(o);if(i){const a=Je(s);return t.concat(s,s.visualViewport||[],ve(o)?o:[],a&&n?ge(a):[])}return t.concat(o,ge(o,[],n))}function Je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){const t=H(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=X(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=De(n)!==i||De(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function lt(e){return j(e)?e:e.contextElement}function le(e){const t=lt(e);if(!X(t))return U(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=xn(t);let s=(i?De(n.width):n.width)/r,a=(i?De(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Yo=U(0);function bn(e){const t=B(e);return!ct()||!t.visualViewport?Yo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=lt(e);let s=U(1);t&&(r?j(r)&&(s=le(r)):s=le(e));const a=Uo(i,n,r)?bn(i):U(0);let d=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(i){const p=B(i),m=r&&j(r)?B(r):r;let v=p,f=Je(v);for(;f&&r&&m!==v;){const g=le(f),y=f.getBoundingClientRect(),w=H(f),b=y.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,x=y.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;d*=g.x,c*=g.y,u*=g.x,h*=g.y,d+=b,c+=x,v=B(f),f=Je(v)}}return Ne({width:u,height:h,x:d,y:c})}function We(e,t){const n=Ie(e).scrollLeft;return t?t.left+n:oe(K(e)).left+n}function En(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-We(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=K(r),a=t?_e(t.floating):!1;if(r===s||a&&i)return n;let d={scrollLeft:0,scrollTop:0},c=U(1);const u=U(0),h=X(r);if((h||!h&&!i)&&((he(r)!=="body"||ve(s))&&(d=Ie(r)),X(r))){const m=oe(r);c=le(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const p=s&&!h&&!i?En(s,d):U(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-d.scrollTop*c.y+u.y+p.y}}function Ko(e){return Array.from(e.getClientRects())}function Go(e){const t=K(e),n=Ie(e),r=e.ownerDocument.body,o=W(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=W(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+We(e);const a=-n.scrollTop;return H(r).direction==="rtl"&&(s+=W(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Lt=25;function qo(e,t){const n=B(e),r=K(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,d=0;if(o){i=o.width,s=o.height;const u=ct();(!u||u&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const c=We(r);if(c<=0){const u=r.ownerDocument,h=u.body,p=getComputedStyle(h),m=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-h.clientWidth-m);v<=Lt&&(i-=v)}else c<=Lt&&(i+=c);return{width:i,height:s,x:a,y:d}}const Zo=new Set(["absolute","fixed"]);function Qo(e,t){const n=oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=X(e)?le(e):U(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,d=o*i.x,c=r*i.y;return{width:s,height:a,x:d,y:c}}function Mt(e,t,n){let r;if(t==="viewport")r=qo(e,n);else if(t==="document")r=Go(K(e));else if(j(t))r=Qo(t,n);else{const o=bn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ne(r)}function Cn(e,t){const n=te(e);return n===t||!j(n)||fe(n)?!1:H(n).position==="fixed"||Cn(n,t)}function Jo(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(a=>j(a)&&he(a)!=="body"),o=null;const i=H(e).position==="fixed";let s=i?te(e):e;for(;j(s)&&!fe(s);){const a=H(s),d=at(s);!d&&a.position==="fixed"&&(o=null),(i?!d&&!o:!d&&a.position==="static"&&!!o&&Zo.has(o.position)||ve(s)&&!d&&Cn(e,s))?r=r.filter(u=>u!==s):o=a,s=te(s)}return t.set(e,r),r}function ei(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_e(t)?[]:Jo(t,this._c):[].concat(n),r],a=s[0],d=s.reduce((c,u)=>{const h=Mt(t,u,o);return c.top=W(h.top,c.top),c.right=ee(h.right,c.right),c.bottom=ee(h.bottom,c.bottom),c.left=W(h.left,c.left),c},Mt(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ti(e){const{width:t,height:n}=xn(e);return{width:t,height:n}}function ni(e,t,n){const r=X(t),o=K(t),i=n==="fixed",s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const d=U(0);function c(){d.x=We(o)}if(r||!r&&!i)if((he(t)!=="body"||ve(o))&&(a=Ie(t)),r){const m=oe(t,!0,i,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?En(o,a):U(0),h=s.left+a.scrollLeft-d.x-u.x,p=s.top+a.scrollTop-d.y-u.y;return{x:h,y:p,width:s.width,height:s.height}}function Xe(e){return H(e).position==="static"}function Ft(e,t){if(!X(e)||H(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function Sn(e,t){const n=B(e);if(_e(e))return n;if(!X(e)){let o=te(e);for(;o&&!fe(o);){if(j(o)&&!Xe(o))return o;o=te(o)}return n}let r=Ft(e,t);for(;r&&Wo(r)&&Xe(r);)r=Ft(r,t);return r&&fe(r)&&Xe(r)&&!at(r)?n:r||Vo(e)||n}const ri=async function(e){const t=this.getOffsetParent||Sn,n=this.getDimensions,r=await n(e.floating);return{reference:ni(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oi(e){return H(e).direction==="rtl"}const ii={convertOffsetParentRelativeRectToViewportRelativeRect:Xo,getDocumentElement:K,getClippingRect:ei,getOffsetParent:Sn,getElementRects:ri,getClientRects:Ko,getDimensions:ti,getScale:le,isElement:j,isRTL:oi};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function si(e,t){let n=null,r;const o=K(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),i();const c=e.getBoundingClientRect(),{left:u,top:h,width:p,height:m}=c;if(a||t(),!p||!m)return;const v=Ce(h),f=Ce(o.clientWidth-(u+p)),g=Ce(o.clientHeight-(h+m)),y=Ce(u),b={rootMargin:-v+"px "+-f+"px "+-g+"px "+-y+"px",threshold:W(0,ee(1,d))||1};let x=!0;function E(R){const C=R[0].intersectionRatio;if(C!==d){if(!x)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Rn(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function ai(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,c=lt(e),u=o||i?[...c?ge(c):[],...ge(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=c&&a?si(c,n):null;let p=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),c&&!d&&m.observe(c),m.observe(t));let v,f=d?oe(e):null;d&&g();function g(){const y=oe(e);f&&!Rn(f,y)&&n(),f=y,v=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),h?.(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(v)}}const ci=Lo,li=Mo,ui=Do,fi=ko,di=To,kt=Oo,hi=Fo,mi=(e,t,n)=>{const r=new Map,o={platform:ii,...n},i={...o.platform,_c:r};return Po(e,t,{...o,platform:i})};var pi=typeof document<"u",gi=function(){},Ae=pi?l.useLayoutEffect:gi;function Le(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Le(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Le(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function An(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _t(e,t){const n=An(e);return Math.round(t*n)/n}function Ke(e){const t=l.useRef(e);return Ae(()=>{t.current=e}),t}function vi(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:c}=e,[u,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=l.useState(r);Le(p,r)||m(r);const[v,f]=l.useState(null),[g,y]=l.useState(null),w=l.useCallback(A=>{A!==R.current&&(R.current=A,f(A))},[]),b=l.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),x=i||v,E=s||g,R=l.useRef(null),C=l.useRef(null),P=l.useRef(u),D=d!=null,O=Ke(d),N=Ke(o),k=Ke(c),L=l.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:p};N.current&&(A.platform=N.current),mi(R.current,C.current,A).then(_=>{const z={..._,isPositioned:k.current!==!1};T.current&&!Le(P.current,z)&&(P.current=z,er.flushSync(()=>{h(z)}))})},[p,t,n,N,k]);Ae(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[c]);const T=l.useRef(!1);Ae(()=>(T.current=!0,()=>{T.current=!1}),[]),Ae(()=>{if(x&&(R.current=x),E&&(C.current=E),x&&E){if(O.current)return O.current(x,E,L);L()}},[x,E,L,O,D]);const I=l.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:b}),[w,b]),M=l.useMemo(()=>({reference:x,floating:E}),[x,E]),F=l.useMemo(()=>{const A={position:n,left:0,top:0};if(!M.floating)return A;const _=_t(M.floating,u.x),z=_t(M.floating,u.y);return a?{...A,transform:"translate("+_+"px, "+z+"px)",...An(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,a,M.floating,u.x,u.y]);return l.useMemo(()=>({...u,update:L,refs:I,elements:M,floatingStyles:F}),[u,L,I,M,F])}const yi=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?kt({element:r.current,padding:o}).fn(n):{}:r?kt({element:r,padding:o}).fn(n):{}}}},wi=(e,t)=>({...ci(e),options:[e,t]}),xi=(e,t)=>({...li(e),options:[e,t]}),bi=(e,t)=>({...hi(e),options:[e,t]}),Ei=(e,t)=>({...ui(e),options:[e,t]}),Ci=(e,t)=>({...fi(e),options:[e,t]}),Si=(e,t)=>({...di(e),options:[e,t]}),Ri=(e,t)=>({...yi(e),options:[e,t]});var Ai="Arrow",Pn=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return S.jsx($.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pn.displayName=Ai;var Pi=Pn,ut="Popper",[On,Zi]=It(ut),[Oi,Dn]=On(ut),Tn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return S.jsx(Oi,{scope:t,anchor:r,onAnchorChange:o,children:n})};Tn.displayName=ut;var Nn="PopperAnchor",Ln=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Dn(Nn,n),s=l.useRef(null),a=ne(t,s),d=l.useRef(null);return l.useEffect(()=>{const c=d.current;d.current=r?.current||s.current,c!==d.current&&i.onAnchorChange(d.current)}),r?null:S.jsx($.div,{...o,ref:a})});Ln.displayName=Nn;var ft="PopperContent",[Di,Ti]=On(ft),Mn=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:v,...f}=e,g=Dn(ft,n),[y,w]=l.useState(null),b=ne(t,me=>w(me)),[x,E]=l.useState(null),R=Qn(x),C=R?.width??0,P=R?.height??0,D=r+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(c)?c:[c],k=N.length>0,L={padding:O,boundary:N.filter(Li),altBoundary:k},{refs:T,floatingStyles:I,placement:M,isPositioned:F,middlewareData:A}=vi({strategy:"fixed",placement:D,whileElementsMounted:(...me)=>ai(...me,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[wi({mainAxis:o+P,alignmentAxis:s}),d&&xi({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?bi():void 0,...L}),d&&Ei({...L}),Ci({...L,apply:({elements:me,rects:ht,availableWidth:Vn,availableHeight:zn})=>{const{width:Yn,height:Un}=ht.reference,ye=me.floating.style;ye.setProperty("--radix-popper-available-width",`${Vn}px`),ye.setProperty("--radix-popper-available-height",`${zn}px`),ye.setProperty("--radix-popper-anchor-width",`${Yn}px`),ye.setProperty("--radix-popper-anchor-height",`${Un}px`)}}),x&&Ri({element:x,padding:a}),Mi({arrowWidth:C,arrowHeight:P}),p&&Si({strategy:"referenceHidden",...L})]}),[_,z]=_n(M),dt=ue(v);Pe(()=>{F&&dt?.()},[F,dt]);const Wn=A.arrow?.x,Bn=A.arrow?.y,$n=A.arrow?.centerOffset!==0,[jn,Hn]=l.useState();return Pe(()=>{y&&Hn(window.getComputedStyle(y).zIndex)},[y]),S.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:F?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:jn,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(Di,{scope:n,placedSide:_,onArrowChange:E,arrowX:Wn,arrowY:Bn,shouldHideArrow:$n,children:S.jsx($.div,{"data-side":_,"data-align":z,...f,ref:b,style:{...f.style,animation:F?void 0:"none"}})})})});Mn.displayName=ft;var Fn="PopperArrow",Ni={top:"bottom",right:"left",bottom:"top",left:"right"},kn=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ti(Fn,r),s=Ni[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:S.jsx(Pi,{...o,ref:n,style:{...o.style,display:"block"}})})});kn.displayName=Fn;function Li(e){return e!==null}var Mi=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[c,u]=_n(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+d/2;let v="",f="";return c==="bottom"?(v=s?h:`${p}px`,f=`${-d}px`):c==="top"?(v=s?h:`${p}px`,f=`${r.floating.height+d}px`):c==="right"?(v=`${-d}px`,f=s?h:`${m}px`):c==="left"&&(v=`${r.floating.width+d}px`,f=s?h:`${m}px`),{data:{x:v,y:f}}}});function _n(e){const[t,n="center"]=e.split("-");return[t,n]}var Qi=Tn,Ji=Ln,es=Mn,ts=kn,Fi=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ki="VisuallyHidden",In=l.forwardRef((e,t)=>S.jsx($.span,{...e,ref:t,style:{...Fi,...e.style}}));In.displayName=ki;var ns=In;export{Ji as A,Xi as C,Gi as D,Ht as F,Ui as O,Yi as P,Vi as R,Ki as T,Fi as V,Hi as W,qi as a,zi as b,ji as c,Zi as d,Qi as e,zt as f,ue as g,io as h,xr as i,Zt as j,$t as k,es as l,ts as m,ns as n,Be as u};
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mo="DialogDescriptionWarning",po=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pn(mo).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Vi=en,zi=nn,Yi=on,Ui=sn,Xi=an,Ki=ln,Gi=fn,qi=hn;const go=["top","right","bottom","left"],ee=Math.min,W=Math.max,De=Math.round,Ce=Math.floor,U=e=>({x:e,y:e}),vo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function Ze(e,t,n){return W(e,ee(t,n))}function G(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function ot(e){return e==="x"?"y":"x"}function it(e){return e==="y"?"height":"width"}const wo=new Set(["top","bottom"]);function Y(e){return wo.has(q(e))?"y":"x"}function st(e){return ot(Y(e))}function xo(e,t,n){n===void 0&&(n=!1);const r=de(e),o=st(e),i=it(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Te(s)),[s,Te(s)]}function bo(e){const t=Te(e);return[Qe(e),t,Qe(t)]}function Qe(e){return e.replace(/start|end/g,t=>yo[t])}const At=["left","right"],Pt=["right","left"],Eo=["top","bottom"],Co=["bottom","top"];function So(e,t,n){switch(e){case"top":case"bottom":return n?t?Pt:At:t?At:Pt;case"left":case"right":return t?Eo:Co;default:return[]}}function Ro(e,t,n,r){const o=de(e);let i=So(q(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Qe)))),i}function Te(e){return e.replace(/left|right|bottom|top/g,t=>vo[t])}function Ao(e){return{top:0,right:0,bottom:0,left:0,...e}}function gn(e){return typeof e!="number"?Ao(e):{top:e,right:e,bottom:e,left:e}}function Ne(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ot(e,t,n){let{reference:r,floating:o}=e;const i=Y(t),s=st(t),a=it(s),d=q(t),c=i==="y",u=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let m;switch(d){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(de(t)){case"start":m[s]-=p*(n&&c?-1:1);break;case"end":m[s]+=p*(n&&c?-1:1);break}return m}const Po=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:h}=Ot(c,r,d),p=r,m={},v=0;for(let f=0;f<a.length;f++){const{name:g,fn:y}=a[f],{x:w,y:b,data:x,reset:E}=await y({x:u,y:h,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,h=b??h,m={...m,[g]:{...m[g],...x}},E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:h}=Ot(c,p,d)),f=-1)}return{x:u,y:h,placement:p,strategy:o,middlewareData:m}};async function pe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=G(t,e),v=gn(m),g=a[p?h==="floating"?"reference":"floating":h],y=Ne(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),w=h==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Ne(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:d}):w);return{top:(y.top-E.top+v.top)/x.y,bottom:(E.bottom-y.bottom+v.bottom)/x.y,left:(y.left-E.left+v.left)/x.x,right:(E.right-y.right+v.right)/x.x}}const Oo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:d}=t,{element:c,padding:u=0}=G(e,t)||{};if(c==null)return{};const h=gn(u),p={x:n,y:r},m=st(o),v=it(m),f=await s.getDimensions(c),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[m]-p[m]-i.floating[v],E=p[m]-i.reference[m],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let C=R?R[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(R)))&&(C=a.floating[b]||i.floating[v]);const P=x/2-E/2,D=C/2-f[v]/2-1,O=ee(h[y],D),N=ee(h[w],D),k=O,L=C-f[v]-N,T=C/2-f[v]/2+P,I=Ze(k,T,L),M=!d.arrow&&de(o)!=null&&T!==I&&i.reference[v]/2-(T<k?O:N)-f[v]/2<0,F=M?T<k?T-k:T-L:0;return{[m]:p[m]+F,data:{[m]:I,centerOffset:T-I-F,...M&&{alignmentOffset:F}},reset:M}}}),Do=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:d,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=G(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=q(o),w=Y(a),b=q(a)===a,x=await(d.isRTL==null?void 0:d.isRTL(c.floating)),E=p||(b||!f?[Te(a)]:bo(a)),R=v!=="none";!p&&R&&E.push(...Ro(a,f,v,x));const C=[a,...E],P=await pe(t,g),D=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&D.push(P[y]),h){const T=xo(o,s,x);D.push(P[T[0]],P[T[1]])}if(O=[...O,{placement:o,overflows:D}],!D.every(T=>T<=0)){var N,k;const T=(((N=i.flip)==null?void 0:N.index)||0)+1,I=C[T];if(I&&(!(h==="alignment"?w!==Y(I):!1)||O.every(A=>Y(A.placement)===w?A.overflows[0]>0:!0)))return{data:{index:T,overflows:O},reset:{placement:I}};let M=(k=O.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!M)switch(m){case"bestFit":{var L;const F=(L=O.filter(A=>{if(R){const _=Y(A.placement);return _===w||_==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((A,_)=>A[1]-_[1])[0])==null?void 0:L[0];F&&(M=F);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Dt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tt(e){return go.some(t=>e[t]>=0)}const To=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=G(e,t);switch(r){case"referenceHidden":{const i=await pe(t,{...o,elementContext:"reference"}),s=Dt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Tt(s)}}}case"escaped":{const i=await pe(t,{...o,altBoundary:!0}),s=Dt(i,n.floating);return{data:{escapedOffsets:s,escaped:Tt(s)}}}default:return{}}}}},vn=new Set(["left","top"]);async function No(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=q(n),a=de(n),d=Y(n)==="y",c=vn.has(s)?-1:1,u=i&&d?-1:1,h=G(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),d?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const Lo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,d=await No(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:s}}}}},Mo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...d}=G(e,t),c={x:n,y:r},u=await pe(t,d),h=Y(q(o)),p=ot(h);let m=c[p],v=c[h];if(i){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=m+u[g],b=m-u[y];m=Ze(w,m,b)}if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=v+u[g],b=v-u[y];v=Ze(w,v,b)}const f=a.fn({...t,[p]:m,[h]:v});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[p]:i,[h]:s}}}}}},Fo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:d=!0,crossAxis:c=!0}=G(e,t),u={x:n,y:r},h=Y(o),p=ot(h);let m=u[p],v=u[h];const f=G(a,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(d){const b=p==="y"?"height":"width",x=i.reference[p]-i.floating[b]+g.mainAxis,E=i.reference[p]+i.reference[b]-g.mainAxis;m<x?m=x:m>E&&(m=E)}if(c){var y,w;const b=p==="y"?"width":"height",x=vn.has(q(o)),E=i.reference[h]-i.floating[b]+(x&&((y=s.offset)==null?void 0:y[h])||0)+(x?0:g.crossAxis),R=i.reference[h]+i.reference[b]+(x?0:((w=s.offset)==null?void 0:w[h])||0)-(x?g.crossAxis:0);v<E?v=E:v>R&&(v=R)}return{[p]:m,[h]:v}}}},ko=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:d=()=>{},...c}=G(e,t),u=await pe(t,c),h=q(o),p=de(o),m=Y(o)==="y",{width:v,height:f}=i.floating;let g,y;h==="top"||h==="bottom"?(g=h,y=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,g=p==="end"?"top":"bottom");const w=f-u.top-u.bottom,b=v-u.left-u.right,x=ee(f-u[g],w),E=ee(v-u[y],b),R=!t.middlewareData.shift;let C=x,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),R&&!p){const O=W(u.left,0),N=W(u.right,0),k=W(u.top,0),L=W(u.bottom,0);m?P=v-2*(O!==0||N!==0?O+N:W(u.left,u.right)):C=f-2*(k!==0||L!==0?k+L:W(u.top,u.bottom))}await d({...t,availableWidth:P,availableHeight:C});const D=await s.getDimensions(a.floating);return v!==D.width||f!==D.height?{reset:{rects:!0}}:{}}}};function ke(){return typeof window<"u"}function he(e){return yn(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(yn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yn(e){return ke()?e instanceof Node||e instanceof B(e).Node:!1}function j(e){return ke()?e instanceof Element||e instanceof B(e).Element:!1}function X(e){return ke()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function Nt(e){return!ke()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}const _o=new Set(["inline","contents"]);function ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!_o.has(o)}const Io=new Set(["table","td","th"]);function Wo(e){return Io.has(he(e))}const Bo=[":popover-open",":modal"];function _e(e){return Bo.some(t=>{try{return e.matches(t)}catch{return!1}})}const $o=["transform","translate","scale","rotate","perspective"],jo=["transform","translate","scale","rotate","perspective","filter"],Ho=["paint","layout","strict","content"];function at(e){const t=ct(),n=j(e)?H(e):e;return $o.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||jo.some(r=>(n.willChange||"").includes(r))||Ho.some(r=>(n.contain||"").includes(r))}function Vo(e){let t=te(e);for(;X(t)&&!fe(t);){if(at(t))return t;if(_e(t))return null;t=te(t)}return null}function ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zo=new Set(["html","body","#document"]);function fe(e){return zo.has(he(e))}function H(e){return B(e).getComputedStyle(e)}function Ie(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function te(e){if(he(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nt(e)&&e.host||K(e);return Nt(t)?t.host:t}function wn(e){const t=te(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&ve(t)?t:wn(t)}function ge(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wn(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=B(o);if(i){const a=Je(s);return t.concat(s,s.visualViewport||[],ve(o)?o:[],a&&n?ge(a):[])}return t.concat(o,ge(o,[],n))}function Je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){const t=H(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=X(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=De(n)!==i||De(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function lt(e){return j(e)?e:e.contextElement}function le(e){const t=lt(e);if(!X(t))return U(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=xn(t);let s=(i?De(n.width):n.width)/r,a=(i?De(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Yo=U(0);function bn(e){const t=B(e);return!ct()||!t.visualViewport?Yo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function oe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=lt(e);let s=U(1);t&&(r?j(r)&&(s=le(r)):s=le(e));const a=Uo(i,n,r)?bn(i):U(0);let d=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(i){const p=B(i),m=r&&j(r)?B(r):r;let v=p,f=Je(v);for(;f&&r&&m!==v;){const g=le(f),y=f.getBoundingClientRect(),w=H(f),b=y.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,x=y.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;d*=g.x,c*=g.y,u*=g.x,h*=g.y,d+=b,c+=x,v=B(f),f=Je(v)}}return Ne({width:u,height:h,x:d,y:c})}function We(e,t){const n=Ie(e).scrollLeft;return t?t.left+n:oe(K(e)).left+n}function En(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-We(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=K(r),a=t?_e(t.floating):!1;if(r===s||a&&i)return n;let d={scrollLeft:0,scrollTop:0},c=U(1);const u=U(0),h=X(r);if((h||!h&&!i)&&((he(r)!=="body"||ve(s))&&(d=Ie(r)),X(r))){const m=oe(r);c=le(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const p=s&&!h&&!i?En(s,d):U(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-d.scrollTop*c.y+u.y+p.y}}function Ko(e){return Array.from(e.getClientRects())}function Go(e){const t=K(e),n=Ie(e),r=e.ownerDocument.body,o=W(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=W(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+We(e);const a=-n.scrollTop;return H(r).direction==="rtl"&&(s+=W(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Lt=25;function qo(e,t){const n=B(e),r=K(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,d=0;if(o){i=o.width,s=o.height;const u=ct();(!u||u&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}const c=We(r);if(c<=0){const u=r.ownerDocument,h=u.body,p=getComputedStyle(h),m=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-h.clientWidth-m);v<=Lt&&(i-=v)}else c<=Lt&&(i+=c);return{width:i,height:s,x:a,y:d}}const Zo=new Set(["absolute","fixed"]);function Qo(e,t){const n=oe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=X(e)?le(e):U(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,d=o*i.x,c=r*i.y;return{width:s,height:a,x:d,y:c}}function Mt(e,t,n){let r;if(t==="viewport")r=qo(e,n);else if(t==="document")r=Go(K(e));else if(j(t))r=Qo(t,n);else{const o=bn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ne(r)}function Cn(e,t){const n=te(e);return n===t||!j(n)||fe(n)?!1:H(n).position==="fixed"||Cn(n,t)}function Jo(e,t){const n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(a=>j(a)&&he(a)!=="body"),o=null;const i=H(e).position==="fixed";let s=i?te(e):e;for(;j(s)&&!fe(s);){const a=H(s),d=at(s);!d&&a.position==="fixed"&&(o=null),(i?!d&&!o:!d&&a.position==="static"&&!!o&&Zo.has(o.position)||ve(s)&&!d&&Cn(e,s))?r=r.filter(u=>u!==s):o=a,s=te(s)}return t.set(e,r),r}function ei(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_e(t)?[]:Jo(t,this._c):[].concat(n),r],a=s[0],d=s.reduce((c,u)=>{const h=Mt(t,u,o);return c.top=W(h.top,c.top),c.right=ee(h.right,c.right),c.bottom=ee(h.bottom,c.bottom),c.left=W(h.left,c.left),c},Mt(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ti(e){const{width:t,height:n}=xn(e);return{width:t,height:n}}function ni(e,t,n){const r=X(t),o=K(t),i=n==="fixed",s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const d=U(0);function c(){d.x=We(o)}if(r||!r&&!i)if((he(t)!=="body"||ve(o))&&(a=Ie(t)),r){const m=oe(t,!0,i,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?En(o,a):U(0),h=s.left+a.scrollLeft-d.x-u.x,p=s.top+a.scrollTop-d.y-u.y;return{x:h,y:p,width:s.width,height:s.height}}function Xe(e){return H(e).position==="static"}function Ft(e,t){if(!X(e)||H(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function Sn(e,t){const n=B(e);if(_e(e))return n;if(!X(e)){let o=te(e);for(;o&&!fe(o);){if(j(o)&&!Xe(o))return o;o=te(o)}return n}let r=Ft(e,t);for(;r&&Wo(r)&&Xe(r);)r=Ft(r,t);return r&&fe(r)&&Xe(r)&&!at(r)?n:r||Vo(e)||n}const ri=async function(e){const t=this.getOffsetParent||Sn,n=this.getDimensions,r=await n(e.floating);return{reference:ni(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oi(e){return H(e).direction==="rtl"}const ii={convertOffsetParentRelativeRectToViewportRelativeRect:Xo,getDocumentElement:K,getClippingRect:ei,getOffsetParent:Sn,getElementRects:ri,getClientRects:Ko,getDimensions:ti,getScale:le,isElement:j,isRTL:oi};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function si(e,t){let n=null,r;const o=K(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),i();const c=e.getBoundingClientRect(),{left:u,top:h,width:p,height:m}=c;if(a||t(),!p||!m)return;const v=Ce(h),f=Ce(o.clientWidth-(u+p)),g=Ce(o.clientHeight-(h+m)),y=Ce(u),b={rootMargin:-v+"px "+-f+"px "+-g+"px "+-y+"px",threshold:W(0,ee(1,d))||1};let x=!0;function E(R){const C=R[0].intersectionRatio;if(C!==d){if(!x)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Rn(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function ai(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,c=lt(e),u=o||i?[...c?ge(c):[],...ge(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=c&&a?si(c,n):null;let p=-1,m=null;s&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),c&&!d&&m.observe(c),m.observe(t));let v,f=d?oe(e):null;d&&g();function g(){const y=oe(e);f&&!Rn(f,y)&&n(),f=y,v=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),h?.(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(v)}}const ci=Lo,li=Mo,ui=Do,fi=ko,di=To,kt=Oo,hi=Fo,mi=(e,t,n)=>{const r=new Map,o={platform:ii,...n},i={...o.platform,_c:r};return Po(e,t,{...o,platform:i})};var pi=typeof document<"u",gi=function(){},Ae=pi?l.useLayoutEffect:gi;function Le(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Le(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Le(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function An(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _t(e,t){const n=An(e);return Math.round(t*n)/n}function Ke(e){const t=l.useRef(e);return Ae(()=>{t.current=e}),t}function vi(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:c}=e,[u,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=l.useState(r);Le(p,r)||m(r);const[v,f]=l.useState(null),[g,y]=l.useState(null),w=l.useCallback(A=>{A!==R.current&&(R.current=A,f(A))},[]),b=l.useCallback(A=>{A!==C.current&&(C.current=A,y(A))},[]),x=i||v,E=s||g,R=l.useRef(null),C=l.useRef(null),P=l.useRef(u),D=d!=null,O=Ke(d),N=Ke(o),k=Ke(c),L=l.useCallback(()=>{if(!R.current||!C.current)return;const A={placement:t,strategy:n,middleware:p};N.current&&(A.platform=N.current),mi(R.current,C.current,A).then(_=>{const z={..._,isPositioned:k.current!==!1};T.current&&!Le(P.current,z)&&(P.current=z,er.flushSync(()=>{h(z)}))})},[p,t,n,N,k]);Ae(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(A=>({...A,isPositioned:!1})))},[c]);const T=l.useRef(!1);Ae(()=>(T.current=!0,()=>{T.current=!1}),[]),Ae(()=>{if(x&&(R.current=x),E&&(C.current=E),x&&E){if(O.current)return O.current(x,E,L);L()}},[x,E,L,O,D]);const I=l.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:b}),[w,b]),M=l.useMemo(()=>({reference:x,floating:E}),[x,E]),F=l.useMemo(()=>{const A={position:n,left:0,top:0};if(!M.floating)return A;const _=_t(M.floating,u.x),z=_t(M.floating,u.y);return a?{...A,transform:"translate("+_+"px, "+z+"px)",...An(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,a,M.floating,u.x,u.y]);return l.useMemo(()=>({...u,update:L,refs:I,elements:M,floatingStyles:F}),[u,L,I,M,F])}const yi=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?kt({element:r.current,padding:o}).fn(n):{}:r?kt({element:r,padding:o}).fn(n):{}}}},wi=(e,t)=>({...ci(e),options:[e,t]}),xi=(e,t)=>({...li(e),options:[e,t]}),bi=(e,t)=>({...hi(e),options:[e,t]}),Ei=(e,t)=>({...ui(e),options:[e,t]}),Ci=(e,t)=>({...fi(e),options:[e,t]}),Si=(e,t)=>({...di(e),options:[e,t]}),Ri=(e,t)=>({...yi(e),options:[e,t]});var Ai="Arrow",Pn=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return S.jsx($.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pn.displayName=Ai;var Pi=Pn,ut="Popper",[On,Zi]=It(ut),[Oi,Dn]=On(ut),Tn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return S.jsx(Oi,{scope:t,anchor:r,onAnchorChange:o,children:n})};Tn.displayName=ut;var Nn="PopperAnchor",Ln=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Dn(Nn,n),s=l.useRef(null),a=ne(t,s),d=l.useRef(null);return l.useEffect(()=>{const c=d.current;d.current=r?.current||s.current,c!==d.current&&i.onAnchorChange(d.current)}),r?null:S.jsx($.div,{...o,ref:a})});Ln.displayName=Nn;var ft="PopperContent",[Di,Ti]=On(ft),Mn=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:v,...f}=e,g=Dn(ft,n),[y,w]=l.useState(null),b=ne(t,me=>w(me)),[x,E]=l.useState(null),R=Qn(x),C=R?.width??0,P=R?.height??0,D=r+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},N=Array.isArray(c)?c:[c],k=N.length>0,L={padding:O,boundary:N.filter(Li),altBoundary:k},{refs:T,floatingStyles:I,placement:M,isPositioned:F,middlewareData:A}=vi({strategy:"fixed",placement:D,whileElementsMounted:(...me)=>ai(...me,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[wi({mainAxis:o+P,alignmentAxis:s}),d&&xi({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?bi():void 0,...L}),d&&Ei({...L}),Ci({...L,apply:({elements:me,rects:ht,availableWidth:Vn,availableHeight:zn})=>{const{width:Yn,height:Un}=ht.reference,ye=me.floating.style;ye.setProperty("--radix-popper-available-width",`${Vn}px`),ye.setProperty("--radix-popper-available-height",`${zn}px`),ye.setProperty("--radix-popper-anchor-width",`${Yn}px`),ye.setProperty("--radix-popper-anchor-height",`${Un}px`)}}),x&&Ri({element:x,padding:a}),Mi({arrowWidth:C,arrowHeight:P}),p&&Si({strategy:"referenceHidden",...L})]}),[_,z]=_n(M),dt=ue(v);Pe(()=>{F&&dt?.()},[F,dt]);const Wn=A.arrow?.x,Bn=A.arrow?.y,$n=A.arrow?.centerOffset!==0,[jn,Hn]=l.useState();return Pe(()=>{y&&Hn(window.getComputedStyle(y).zIndex)},[y]),S.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:F?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:jn,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(Di,{scope:n,placedSide:_,onArrowChange:E,arrowX:Wn,arrowY:Bn,shouldHideArrow:$n,children:S.jsx($.div,{"data-side":_,"data-align":z,...f,ref:b,style:{...f.style,animation:F?void 0:"none"}})})})});Mn.displayName=ft;var Fn="PopperArrow",Ni={top:"bottom",right:"left",bottom:"top",left:"right"},kn=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ti(Fn,r),s=Ni[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:S.jsx(Pi,{...o,ref:n,style:{...o.style,display:"block"}})})});kn.displayName=Fn;function Li(e){return e!==null}var Mi=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[c,u]=_n(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+d/2;let v="",f="";return c==="bottom"?(v=s?h:`${p}px`,f=`${-d}px`):c==="top"?(v=s?h:`${p}px`,f=`${r.floating.height+d}px`):c==="right"?(v=`${-d}px`,f=s?h:`${m}px`):c==="left"&&(v=`${r.floating.width+d}px`,f=s?h:`${m}px`),{data:{x:v,y:f}}}});function _n(e){const[t,n="center"]=e.split("-");return[t,n]}var Qi=Tn,Ji=Ln,es=Mn,ts=kn,Fi=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ki="VisuallyHidden",In=l.forwardRef((e,t)=>S.jsx($.span,{...e,ref:t,style:{...Fi,...e.style}}));In.displayName=ki;var ns=In;export{Ji as A,Xi as C,Gi as D,Ht as F,Ui as O,Yi as P,Vi as R,Ki as T,Fi as V,Hi as W,qi as a,zi as b,ji as c,Zi as d,Qi as e,zt as f,Zt as g,io as h,ts as i,xr as j,$t as k,es as l,ue as m,ns as n,Be as u};