@qikdev/vue-ui 0.5.12 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.es.js +1 -1
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@qikdev/sdk")):typeof define=="function"&&define.amd?define(["exports","vue","@qikdev/sdk"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["@qikdev/vue-ui"]={},D.Vue,D.sdk))})(this,function(D,t,pn){"use strict";var C8=Object.defineProperty;var V8=(D,t,pn)=>t in D?C8(D,t,{enumerable:!0,configurable:!0,writable:!0,value:pn}):D[t]=pn;var X=(D,t,pn)=>V8(D,typeof t!="symbol"?t+"":t,pn);const og="0.5.12";class yn extends Error{}class ig extends yn{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class sg extends yn{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class lg extends yn{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class dr extends yn{}class _c extends yn{constructor(n){super(`Invalid unit ${n}`)}}class dt extends yn{}class Zt extends yn{constructor(){super("Zone is an abstract class")}}const F="numeric",gt="short",rt="long",ki={year:F,month:F,day:F},wc={year:F,month:gt,day:F},ag={year:F,month:gt,day:F,weekday:gt},bc={year:F,month:rt,day:F},xc={year:F,month:rt,day:F,weekday:rt},Cc={hour:F,minute:F},Vc={hour:F,minute:F,second:F},Ec={hour:F,minute:F,second:F,timeZoneName:gt},Nc={hour:F,minute:F,second:F,timeZoneName:rt},Tc={hour:F,minute:F,hourCycle:"h23"},Sc={hour:F,minute:F,second:F,hourCycle:"h23"},Bc={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:gt},Dc={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:rt},Oc={year:F,month:F,day:F,hour:F,minute:F},Mc={year:F,month:F,day:F,hour:F,minute:F,second:F},Fc={year:F,month:gt,day:F,hour:F,minute:F},Ic={year:F,month:gt,day:F,hour:F,minute:F,second:F},cg={year:F,month:gt,day:F,weekday:gt,hour:F,minute:F},Ac={year:F,month:rt,day:F,hour:F,minute:F,timeZoneName:gt},Lc={year:F,month:rt,day:F,hour:F,minute:F,second:F,timeZoneName:gt},Rc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,timeZoneName:rt},Pc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,second:F,timeZoneName:rt};function te(e){return typeof e>"u"}function gn(e){return typeof e=="number"}function vr(e){return typeof e=="number"&&e%1===0}function dg(e){return typeof e=="string"}function ug(e){return Object.prototype.toString.call(e)==="[object Date]"}function Uc(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function mg(e){return Array.isArray(e)?e:[e]}function $c(e,n,r){if(e.length!==0)return e.reduce((i,s)=>{const o=[n(s),s];return i&&r(i[0],o[0])===i[0]?i:o},null)[1]}function fg(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function Rn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function Wt(e,n,r){return vr(e)&&e>=n&&e<=r}function hg(e,n){return e-n*Math.floor(e/n)}function Ne(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Xt(e){if(!(te(e)||e===null||e===""))return parseInt(e,10)}function kn(e){if(!(te(e)||e===null||e===""))return parseFloat(e)}function _i(e){if(!(te(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function wi(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function ur(e){return e%4===0&&(e%100!==0||e%400===0)}function mr(e){return ur(e)?366:365}function eo(e,n){const r=hg(n-1,12)+1,i=e+(n-r)/12;return r===2?ur(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function bi(e){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(n=new Date(n),n.setUTCFullYear(n.getUTCFullYear()-1900)),+n}function to(e){const n=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return n===4||i===3?53:52}function xi(e){return e>99?e:e>60?1900+e:2e3+e}function zc(e,n,r,i=null){const s=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const l={timeZoneName:n,...o},a=new Intl.DateTimeFormat(r,l).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function no(e,n){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(n,10)||0,s=r<0||Object.is(r,-0)?-i:i;return r*60+s}function jc(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new dt(`Invalid unit value ${e}`);return n}function ro(e,n){const r={};for(const i in e)if(Rn(e,i)){const s=e[i];if(s==null)continue;r[n(i)]=jc(s)}return r}function fr(e,n){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(n){case"short":return`${s}${Ne(r,2)}:${Ne(i,2)}`;case"narrow":return`${s}${r}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ne(r,2)}${Ne(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function oo(e){return fg(e,["hour","minute","second","millisecond"])}const qc=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,pg=["January","February","March","April","May","June","July","August","September","October","November","December"],Wc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yg=["J","F","M","A","M","J","J","A","S","O","N","D"];function Hc(e){switch(e){case"narrow":return[...yg];case"short":return[...Wc];case"long":return[...pg];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Gc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Yc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gg=["M","T","W","T","F","S","S"];function Kc(e){switch(e){case"narrow":return[...gg];case"short":return[...Yc];case"long":return[...Gc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Jc=["AM","PM"],kg=["Before Christ","Anno Domini"],_g=["BC","AD"],wg=["B","A"];function Zc(e){switch(e){case"narrow":return[...wg];case"short":return[..._g];case"long":return[...kg];default:return null}}function bg(e){return Jc[e.hour<12?0:1]}function xg(e,n){return Kc(n)[e.weekday-1]}function Cg(e,n){return Hc(n)[e.month-1]}function Vg(e,n){return Zc(n)[e.year<0?0:1]}function Eg(e,n,r="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){const u=e==="days";switch(n){case 1:return u?"tomorrow":`next ${s[e][0]}`;case-1:return u?"yesterday":`last ${s[e][0]}`;case 0:return u?"today":`this ${s[e][0]}`}}const l=Object.is(n,-0)||n<0,a=Math.abs(n),c=a===1,d=s[e],m=i?c?d[1]:d[2]||d[1]:c?s[e][0]:e;return l?`${a} ${m} ago`:`in ${a} ${m}`}function Xc(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const Ng={D:ki,DD:wc,DDD:bc,DDDD:xc,t:Cc,tt:Vc,ttt:Ec,tttt:Nc,T:Tc,TT:Sc,TTT:Bc,TTTT:Dc,f:Oc,ff:Fc,fff:Ac,ffff:Rc,F:Mc,FF:Ic,FFF:Lc,FFFF:Pc};class Ye{static create(n,r={}){return new Ye(n,r)}static parseFormat(n){let r=null,i="",s=!1;const o=[];for(let l=0;l<n.length;l++){const a=n.charAt(l);a==="'"?(i.length>0&&o.push({literal:s,val:i}),r=null,i="",s=!s):s||a===r?i+=a:(i.length>0&&o.push({literal:!1,val:i}),i=a,r=a)}return i.length>0&&o.push({literal:s,val:i}),o}static macroTokenToFormatOpts(n){return Ng[n]}constructor(n,r){this.opts=r,this.loc=n,this.systemLoc=null}formatWithSystemDefault(n,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTime(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTimeParts(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).formatToParts()}resolvedOptions(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).resolvedOptions()}num(n,r=0){if(this.opts.forceSimple)return Ne(n,r);const i={...this.opts};return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(n)}formatDateTimeFromString(n,r){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(h,y)=>this.loc.extract(n,h,y),l=h=>n.isOffsetFixed&&n.offset===0&&h.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,h.format):"",a=()=>i?bg(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(h,y)=>i?Cg(n,h):o(y?{month:h}:{month:h,day:"numeric"},"month"),d=(h,y)=>i?xg(n,h):o(y?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),m=h=>{const y=Ye.macroTokenToFormatOpts(h);return y?this.formatWithSystemDefault(n,y):h},u=h=>i?Vg(n,h):o({era:h},"era"),f=h=>{switch(h){case"S":return this.num(n.millisecond);case"u":case"SSS":return this.num(n.millisecond,3);case"s":return this.num(n.second);case"ss":return this.num(n.second,2);case"uu":return this.num(Math.floor(n.millisecond/10),2);case"uuu":return this.num(Math.floor(n.millisecond/100));case"m":return this.num(n.minute);case"mm":return this.num(n.minute,2);case"h":return this.num(n.hour%12===0?12:n.hour%12);case"hh":return this.num(n.hour%12===0?12:n.hour%12,2);case"H":return this.num(n.hour);case"HH":return this.num(n.hour,2);case"Z":return l({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return l({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return l({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:this.loc.locale});case"z":return n.zoneName;case"a":return a();case"d":return s?o({day:"numeric"},"day"):this.num(n.day);case"dd":return s?o({day:"2-digit"},"day"):this.num(n.day,2);case"c":return this.num(n.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(n.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):this.num(n.month);case"LL":return s?o({month:"2-digit",day:"numeric"},"month"):this.num(n.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?o({month:"numeric"},"month"):this.num(n.month);case"MM":return s?o({month:"2-digit"},"month"):this.num(n.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?o({year:"numeric"},"year"):this.num(n.year);case"yy":return s?o({year:"2-digit"},"year"):this.num(n.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):this.num(n.year,4);case"yyyyyy":return s?o({year:"numeric"},"year"):this.num(n.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(n.weekYear.toString().slice(-2),2);case"kkkk":return this.num(n.weekYear,4);case"W":return this.num(n.weekNumber);case"WW":return this.num(n.weekNumber,2);case"o":return this.num(n.ordinal);case"ooo":return this.num(n.ordinal,3);case"q":return this.num(n.quarter);case"qq":return this.num(n.quarter,2);case"X":return this.num(Math.floor(n.ts/1e3));case"x":return this.num(n.ts);default:return m(h)}};return Xc(Ye.parseFormat(r),f)}formatDurationFromString(n,r){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>d=>{const m=i(d);return m?this.num(c.get(m),d.length):d},o=Ye.parseFormat(r),l=o.reduce((c,{literal:d,val:m})=>d?c:c.concat(m),[]),a=n.shiftTo(...l.map(i).filter(c=>c));return Xc(o,s(a))}}class kt{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class hr{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(n,r){throw new Zt}formatOffset(n,r){throw new Zt}offset(n){throw new Zt}equals(n){throw new Zt}get isValid(){throw new Zt}}let Ci=null;class Vi extends hr{static get instance(){return Ci===null&&(Ci=new Vi),Ci}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return zc(n,r,i)}formatOffset(n,r){return fr(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let io={};function Tg(e){return io[e]||(io[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),io[e]}const Sg={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Bg(e,n){const r=e.format(n).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,s,o,l,a,c,d,m]=i;return[l,s,o,a,c,d,m]}function Dg(e,n){const r=e.formatToParts(n),i=[];for(let s=0;s<r.length;s++){const{type:o,value:l}=r[s],a=Sg[o];o==="era"?i[a]=l:te(a)||(i[a]=parseInt(l,10))}return i}let so={};class Ht extends hr{static create(n){return so[n]||(so[n]=new Ht(n)),so[n]}static resetCache(){so={},io={}}static isValidSpecifier(n){return this.isValidZone(n)}static isValidZone(n){if(!n)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}).format(),!0}catch{return!1}}constructor(n){super(),this.zoneName=n,this.valid=Ht.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return zc(n,r,i,this.name)}formatOffset(n,r){return fr(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=Tg(this.name);let[s,o,l,a,c,d,m]=i.formatToParts?Dg(i,r):Bg(i,r);a==="BC"&&(s=-Math.abs(s)+1);const f=bi({year:s,month:o,day:l,hour:c===24?0:c,minute:d,second:m,millisecond:0});let h=+r;const y=h%1e3;return h-=y>=0?y:1e3+y,(f-h)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let Ei=null;class qe extends hr{static get utcInstance(){return Ei===null&&(Ei=new qe(0)),Ei}static instance(n){return n===0?qe.utcInstance:new qe(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new qe(no(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${fr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${fr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return fr(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(n){return n.type==="fixed"&&n.fixed===this.fixed}get isValid(){return!0}}class Og extends hr{constructor(n){super(),this.zoneName=n}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Qt(e,n){if(te(e)||e===null)return n;if(e instanceof hr)return e;if(dg(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?qe.utcInstance:qe.parseSpecifier(r)||Ht.create(e)}else return gn(e)?qe.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new Og(e)}let Qc=()=>Date.now(),vc="system",ed=null,td=null,nd=null,rd;class Me{static get now(){return Qc}static set now(n){Qc=n}static set defaultZone(n){vc=n}static get defaultZone(){return Qt(vc,Vi.instance)}static get defaultLocale(){return ed}static set defaultLocale(n){ed=n}static get defaultNumberingSystem(){return td}static set defaultNumberingSystem(n){td=n}static get defaultOutputCalendar(){return nd}static set defaultOutputCalendar(n){nd=n}static get throwOnInvalid(){return rd}static set throwOnInvalid(n){rd=n}static resetCaches(){we.resetCache(),Ht.resetCache()}}let od={};function Mg(e,n={}){const r=JSON.stringify([e,n]);let i=od[r];return i||(i=new Intl.ListFormat(e,n),od[r]=i),i}let Ni={};function Ti(e,n={}){const r=JSON.stringify([e,n]);let i=Ni[r];return i||(i=new Intl.DateTimeFormat(e,n),Ni[r]=i),i}let Si={};function Fg(e,n={}){const r=JSON.stringify([e,n]);let i=Si[r];return i||(i=new Intl.NumberFormat(e,n),Si[r]=i),i}let Bi={};function Ig(e,n={}){const{base:r,...i}=n,s=JSON.stringify([e,i]);let o=Bi[s];return o||(o=new Intl.RelativeTimeFormat(e,n),Bi[s]=o),o}let pr=null;function Ag(){return pr||(pr=new Intl.DateTimeFormat().resolvedOptions().locale,pr)}function Lg(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=Ti(e).resolvedOptions()}catch{r=Ti(i).resolvedOptions()}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Rg(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function Pg(e){const n=[];for(let r=1;r<=12;r++){const i=b.utc(2016,r,1);n.push(e(i))}return n}function Ug(e){const n=[];for(let r=1;r<=7;r++){const i=b.utc(2016,11,13+r);n.push(e(i))}return n}function lo(e,n,r,i,s){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):s(n)}function $g(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class zg{constructor(n,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:o,...l}=i;if(!r||Object.keys(l).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=Fg(n,a)}}format(n){if(this.inf){const r=this.floor?Math.floor(n):n;return this.inf.format(r)}else{const r=this.floor?Math.floor(n):wi(n,3);return Ne(r,this.padTo)}}}class jg{constructor(n,r,i){this.opts=i;let s;if(n.zone.isUniversal){const l=-1*(n.offset/60),a=l>=0?`Etc/GMT+${l}`:`Etc/GMT${l}`;n.offset!==0&&Ht.create(a).valid?(s=a,this.dt=n):(s="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:b.fromMillis(n.ts+n.offset*60*1e3))}else n.zone.type==="system"?this.dt=n:(this.dt=n,s=n.zone.name);const o={...this.opts};s&&(o.timeZone=s),this.dtf=Ti(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class qg{constructor(n,r,i){this.opts={style:"long",...i},!r&&Uc()&&(this.rtf=Ig(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):Eg(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class we{static fromOpts(n){return we.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,s=!1){const o=n||Me.defaultLocale,l=o||(s?"en-US":Ag()),a=r||Me.defaultNumberingSystem,c=i||Me.defaultOutputCalendar;return new we(l,a,c,o)}static resetCache(){pr=null,Ni={},Si={},Bi={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return we.create(n,r,i)}constructor(n,r,i,s){const[o,l,a]=Lg(n);this.locale=o,this.numberingSystem=r||l||null,this.outputCalendar=i||a||null,this.intl=Rg(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=$g(this)),this.fastNumbersCached}listingMode(){const n=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&r?"en":"intl"}clone(n){return!n||Object.getOwnPropertyNames(n).length===0?this:we.create(n.locale||this.specifiedLocale,n.numberingSystem||this.numberingSystem,n.outputCalendar||this.outputCalendar,n.defaultToEN||!1)}redefaultToEN(n={}){return this.clone({...n,defaultToEN:!0})}redefaultToSystem(n={}){return this.clone({...n,defaultToEN:!1})}months(n,r=!1,i=!0){return lo(this,n,i,Hc,()=>{const s=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=Pg(l=>this.extract(l,s,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return lo(this,n,i,Kc,()=>{const s=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},o=r?"format":"standalone";return this.weekdaysCache[o][n]||(this.weekdaysCache[o][n]=Ug(l=>this.extract(l,s,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return lo(this,void 0,n,()=>Jc,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return lo(this,n,r,Zc,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[n]})}extract(n,r,i){const s=this.dtFormatter(n,r),o=s.formatToParts(),l=o.find(a=>a.type.toLowerCase()===i);return l?l.value:null}numberFormatter(n={}){return new zg(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new jg(n,this.intl,r)}relFormatter(n={}){return new qg(this.intl,this.isEnglish(),n)}listFormatter(n={}){return Mg(this.intl,n)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(n){return this.locale===n.locale&&this.numberingSystem===n.numberingSystem&&this.outputCalendar===n.outputCalendar}}function Pn(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function Un(...e){return n=>e.reduce(([r,i,s],o)=>{const[l,a,c]=o(n,s);return[{...r,...l},a||i,c]},[{},null,1]).slice(0,2)}function $n(e,...n){if(e==null)return[null,null];for(const[r,i]of n){const s=r.exec(e);if(s)return i(s)}return[null,null]}function id(...e){return(n,r)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Xt(n[r+s]);return[i,null,r+s]}}const sd=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Wg=`(?:${sd.source}?(?:\\[(${qc.source})\\])?)?`,Di=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ld=RegExp(`${Di.source}${Wg}`),Oi=RegExp(`(?:T${ld.source})?`),Hg=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Gg=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Yg=/(\d{4})-?(\d{3})/,Kg=id("weekYear","weekNumber","weekDay"),Jg=id("year","ordinal"),Zg=/(\d{4})-(\d\d)-(\d\d)/,ad=RegExp(`${Di.source} ?(?:${sd.source}|(${qc.source}))?`),Xg=RegExp(`(?: ${ad.source})?`);function zn(e,n,r){const i=e[n];return te(i)?r:Xt(i)}function Qg(e,n){return[{year:zn(e,n),month:zn(e,n+1,1),day:zn(e,n+2,1)},null,n+3]}function jn(e,n){return[{hours:zn(e,n,0),minutes:zn(e,n+1,0),seconds:zn(e,n+2,0),milliseconds:_i(e[n+3])},null,n+4]}function yr(e,n){const r=!e[n]&&!e[n+1],i=no(e[n+1],e[n+2]),s=r?null:qe.instance(i);return[{},s,n+3]}function gr(e,n){const r=e[n]?Ht.create(e[n]):null;return[{},r,n+1]}const vg=RegExp(`^T?${Di.source}$`),ek=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function tk(e){const[n,r,i,s,o,l,a,c,d]=e,m=n[0]==="-",u=c&&c[0]==="-",f=(h,y=!1)=>h!==void 0&&(y||h&&m)?-h:h;return[{years:f(kn(r)),months:f(kn(i)),weeks:f(kn(s)),days:f(kn(o)),hours:f(kn(l)),minutes:f(kn(a)),seconds:f(kn(c),c==="-0"),milliseconds:f(_i(d),u)}]}const nk={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Mi(e,n,r,i,s,o,l){const a={year:n.length===2?xi(Xt(n)):Xt(n),month:Wc.indexOf(r)+1,day:Xt(i),hour:Xt(s),minute:Xt(o)};return l&&(a.second=Xt(l)),e&&(a.weekday=e.length>3?Gc.indexOf(e)+1:Yc.indexOf(e)+1),a}const rk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ok(e){const[,n,r,i,s,o,l,a,c,d,m,u]=e,f=Mi(n,s,i,r,o,l,a);let h;return c?h=nk[c]:d?h=0:h=no(m,u),[f,new qe(h)]}function ik(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const sk=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,lk=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ak=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function cd(e){const[,n,r,i,s,o,l,a]=e;return[Mi(n,s,i,r,o,l,a),qe.utcInstance]}function ck(e){const[,n,r,i,s,o,l,a]=e;return[Mi(n,a,r,i,s,o,l),qe.utcInstance]}const dk=Pn(Hg,Oi),uk=Pn(Gg,Oi),mk=Pn(Yg,Oi),fk=Pn(ld),dd=Un(Qg,jn,yr,gr),hk=Un(Kg,jn,yr,gr),pk=Un(Jg,jn,yr,gr),yk=Un(jn,yr,gr);function gk(e){return $n(e,[dk,dd],[uk,hk],[mk,pk],[fk,yk])}function kk(e){return $n(ik(e),[rk,ok])}function _k(e){return $n(e,[sk,cd],[lk,cd],[ak,ck])}function wk(e){return $n(e,[ek,tk])}const bk=Un(jn);function xk(e){return $n(e,[vg,bk])}const Ck=Pn(Zg,Xg),Vk=Pn(ad),Ek=Un(jn,yr,gr);function Nk(e){return $n(e,[Ck,dd],[Vk,Ek])}const Tk="Invalid Duration",ud={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Sk={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...ud},ut=146097/400,qn=146097/4800,Bk={years:{quarters:4,months:12,weeks:ut/7,days:ut,hours:ut*24,minutes:ut*24*60,seconds:ut*24*60*60,milliseconds:ut*24*60*60*1e3},quarters:{months:3,weeks:ut/28,days:ut/4,hours:ut*24/4,minutes:ut*24*60/4,seconds:ut*24*60*60/4,milliseconds:ut*24*60*60*1e3/4},months:{weeks:qn/7,days:qn,hours:qn*24,minutes:qn*24*60,seconds:qn*24*60*60,milliseconds:qn*24*60*60*1e3},...ud},_n=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Dk=_n.slice(0).reverse();function wn(e,n,r=!1){const i={values:r?n.values:{...e.values,...n.values||{}},loc:e.loc.clone(n.loc),conversionAccuracy:n.conversionAccuracy||e.conversionAccuracy};return new oe(i)}function Ok(e){return e<0?Math.floor(e):Math.ceil(e)}function md(e,n,r,i,s){const o=e[s][r],l=n[r]/o,a=Math.sign(l)===Math.sign(i[s]),c=!a&&i[s]!==0&&Math.abs(l)<=1?Ok(l):Math.trunc(l);i[s]+=c,n[r]-=c*o}function Mk(e,n){Dk.reduce((r,i)=>te(n[i])?r:(r&&md(e,n,r,n,i),i),null)}class oe{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||we.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?Bk:Sk,this.isLuxonDuration=!0}static fromMillis(n,r){return oe.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new dt(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new oe({values:ro(n,oe.normalizeUnit),loc:we.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(gn(n))return oe.fromMillis(n);if(oe.isDuration(n))return n;if(typeof n=="object")return oe.fromObject(n);throw new dt(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=wk(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=xk(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Duration is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new lg(i);return new oe({invalid:i})}static normalizeUnit(n){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[n&&n.toLowerCase()];if(!r)throw new _c(n);return r}static isDuration(n){return n&&n.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(n,r={}){const i={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Ye.create(this.loc,i).formatDurationFromString(this,n):Tk}toHuman(n={}){const r=_n.map(i=>{const s=this.values[i];return te(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...n,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:n.listStyle||"narrow",...n}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let n="P";return this.years!==0&&(n+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(n+=this.months+this.quarters*3+"M"),this.weeks!==0&&(n+=this.weeks+"W"),this.days!==0&&(n+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(n+="T"),this.hours!==0&&(n+=this.hours+"H"),this.minutes!==0&&(n+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(n+=wi(this.seconds+this.milliseconds/1e3,3)+"S"),n==="P"&&(n+="T0S"),n}toISOTime(n={}){if(!this.isValid)return null;const r=this.toMillis();if(r<0||r>=864e5)return null;n={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...n};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=n.format==="basic"?"hhmm":"hh:mm";(!n.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=n.format==="basic"?"ss":":ss",(!n.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let o=i.toFormat(s);return n.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n),i={};for(const s of _n)(Rn(r.values,s)||Rn(this.values,s))&&(i[s]=r.get(s)+this.get(s));return wn(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return this.plus(r.negate())}mapUnits(n){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=jc(n(this.values[i],i));return wn(this,{values:r},!0)}get(n){return this[oe.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r={...this.values,...ro(n,oe.normalizeUnit)};return wn(this,{values:r})}reconfigure({locale:n,numberingSystem:r,conversionAccuracy:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r}),o={loc:s};return i&&(o.conversionAccuracy=i),wn(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return Mk(this.matrix,n),wn(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(l=>oe.normalizeUnit(l));const r={},i={},s=this.toObject();let o;for(const l of _n)if(n.indexOf(l)>=0){o=l;let a=0;for(const d in i)a+=this.matrix[d][l]*i[d],i[d]=0;gn(s[l])&&(a+=s[l]);const c=Math.trunc(a);r[l]=c,i[l]=(a*1e3-c*1e3)/1e3;for(const d in s)_n.indexOf(d)>_n.indexOf(l)&&md(this.matrix,s,d,r,l)}else gn(s[l])&&(i[l]=s[l]);for(const l in i)i[l]!==0&&(r[o]+=l===o?i[l]:i[l]/this.matrix[o][l]);return wn(this,{values:r},!0).normalize()}negate(){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=this.values[r]===0?0:-this.values[r];return wn(this,{values:n},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(n){if(!this.isValid||!n.isValid||!this.loc.equals(n.loc))return!1;function r(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of _n)if(!r(this.values[i],n.values[i]))return!1;return!0}}const kr="Invalid Interval";function Fk(e,n){return!e||!e.isValid?xe.invalid("missing or invalid start"):!n||!n.isValid?xe.invalid("missing or invalid end"):n<e?xe.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${n.toISO()}`):null}class xe{constructor(n){this.s=n.start,this.e=n.end,this.invalid=n.invalid||null,this.isLuxonInterval=!0}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Interval is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new sg(i);return new xe({invalid:i})}static fromDateTimes(n,r){const i=br(n),s=br(r),o=Fk(i,s);return o??new xe({start:i,end:s})}static after(n,r){const i=oe.fromDurationLike(r),s=br(n);return xe.fromDateTimes(s,s.plus(i))}static before(n,r){const i=oe.fromDurationLike(r),s=br(n);return xe.fromDateTimes(s.minus(i),s)}static fromISO(n,r){const[i,s]=(n||"").split("/",2);if(i&&s){let o,l;try{o=b.fromISO(i,r),l=o.isValid}catch{l=!1}let a,c;try{a=b.fromISO(s,r),c=a.isValid}catch{c=!1}if(l&&c)return xe.fromDateTimes(o,a);if(l){const d=oe.fromISO(s,r);if(d.isValid)return xe.after(o,d)}else if(c){const d=oe.fromISO(i,r);if(d.isValid)return xe.before(a,d)}}return xe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static isInterval(n){return n&&n.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(n="milliseconds"){return this.isValid?this.toDuration(n).get(n):NaN}count(n="milliseconds"){if(!this.isValid)return NaN;const r=this.start.startOf(n),i=this.end.startOf(n);return Math.floor(i.diff(r,n).get(n))+1}hasSame(n){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,n):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(n){return this.isValid?this.s>n:!1}isBefore(n){return this.isValid?this.e<=n:!1}contains(n){return this.isValid?this.s<=n&&this.e>n:!1}set({start:n,end:r}={}){return this.isValid?xe.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(br).filter(l=>this.contains(l)).sort(),i=[];let{s}=this,o=0;for(;s<this.e;){const l=r[o]||this.e,a=+l>+this.e?this.e:l;i.push(xe.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(n){const r=oe.fromDurationLike(n);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,s=1,o;const l=[];for(;i<this.e;){const a=this.start.plus(r.mapUnits(c=>c*s));o=+a>+this.e?this.e:a,l.push(xe.fromDateTimes(i,o)),i=o,s+=1}return l}divideEqually(n){return this.isValid?this.splitBy(this.length()/n).slice(0,n):[]}overlaps(n){return this.e>n.s&&this.s<n.e}abutsStart(n){return this.isValid?+this.e==+n.s:!1}abutsEnd(n){return this.isValid?+n.e==+this.s:!1}engulfs(n){return this.isValid?this.s<=n.s&&this.e>=n.e:!1}equals(n){return!this.isValid||!n.isValid?!1:this.s.equals(n.s)&&this.e.equals(n.e)}intersection(n){if(!this.isValid)return this;const r=this.s>n.s?this.s:n.s,i=this.e<n.e?this.e:n.e;return r>=i?null:xe.fromDateTimes(r,i)}union(n){if(!this.isValid)return this;const r=this.s<n.s?this.s:n.s,i=this.e>n.e?this.e:n.e;return xe.fromDateTimes(r,i)}static merge(n){const[r,i]=n.sort((s,o)=>s.s-o.s).reduce(([s,o],l)=>o?o.overlaps(l)||o.abutsStart(l)?[s,o.union(l)]:[s.concat([o]),l]:[s,l],[[],null]);return i&&r.push(i),r}static xor(n){let r=null,i=0;const s=[],o=n.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),l=Array.prototype.concat(...o),a=l.sort((c,d)=>c.time-d.time);for(const c of a)i+=c.type==="s"?1:-1,i===1?r=c.time:(r&&+r!=+c.time&&s.push(xe.fromDateTimes(r,c.time)),r=null);return xe.merge(s)}difference(...n){return xe.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:kr}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:kr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:kr}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:kr}toFormat(n,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:kr}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):oe.invalid(this.invalidReason)}mapEndpoints(n){return xe.fromDateTimes(n(this.s),n(this.e))}}let ao=class{static hasDST(n=Me.defaultZone){const r=b.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return Ht.isValidZone(n)}static normalizeZone(n){return Qt(n,Me.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return we.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return we.create(r,null,"gregory").eras(n)}static features(){return{relative:Uc()}}};function fd(e,n){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(oe.fromMillis(i).as("days"))}function Ik(e,n,r){const i=[["years",(a,c)=>c.year-a.year],["quarters",(a,c)=>c.quarter-a.quarter],["months",(a,c)=>c.month-a.month+(c.year-a.year)*12],["weeks",(a,c)=>{const d=fd(a,c);return(d-d%7)/7}],["days",fd]],s={};let o,l;for(const[a,c]of i)if(r.indexOf(a)>=0){o=a;let d=c(e,n);l=e.plus({[a]:d}),l>n?(e=e.plus({[a]:d-1}),d-=1):e=l,s[a]=d}return[e,s,l,o]}function Ak(e,n,r,i){let[s,o,l,a]=Ik(e,n,r);const c=n-s,d=r.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(l<n&&(l=s.plus({[a]:1})),l!==s&&(o[a]=(o[a]||0)+c/(l-s)));const m=oe.fromObject(o,i);return d.length>0?oe.fromMillis(c,i).shiftTo(...d).plus(m):m}const Fi={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},hd={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Lk=Fi.hanidec.replace(/[\[|\]]/g,"").split("");function Rk(e){let n=parseInt(e,10);if(isNaN(n)){n="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(Fi.hanidec)!==-1)n+=Lk.indexOf(e[r]);else for(const s in hd){const[o,l]=hd[s];i>=o&&i<=l&&(n+=i-o)}}return parseInt(n,10)}else return n}function _t({numberingSystem:e},n=""){return new RegExp(`${Fi[e||"latn"]}${n}`)}const Pk="missing Intl.DateTimeFormat.formatToParts support";function le(e,n=r=>r){return{regex:e,deser:([r])=>n(Rk(r))}}const pd="[ ]",yd=new RegExp(pd,"g");function Uk(e){return e.replace(/\./g,"\\.?").replace(yd,pd)}function gd(e){return e.replace(/\./g,"").replace(yd," ").toLowerCase()}function wt(e,n){return e===null?null:{regex:RegExp(e.map(Uk).join("|")),deser:([r])=>e.findIndex(i=>gd(r)===gd(i))+n}}function kd(e,n){return{regex:e,deser:([,r,i])=>no(r,i),groups:n}}function Ii(e){return{regex:e,deser:([n])=>n}}function $k(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function zk(e,n){const r=_t(n),i=_t(n,"{2}"),s=_t(n,"{3}"),o=_t(n,"{4}"),l=_t(n,"{6}"),a=_t(n,"{1,2}"),c=_t(n,"{1,3}"),d=_t(n,"{1,6}"),m=_t(n,"{1,9}"),u=_t(n,"{2,4}"),f=_t(n,"{4,6}"),h=_=>({regex:RegExp($k(_.val)),deser:([k])=>k,literal:!0}),p=(_=>{if(e.literal)return h(_);switch(_.val){case"G":return wt(n.eras("short",!1),0);case"GG":return wt(n.eras("long",!1),0);case"y":return le(d);case"yy":return le(u,xi);case"yyyy":return le(o);case"yyyyy":return le(f);case"yyyyyy":return le(l);case"M":return le(a);case"MM":return le(i);case"MMM":return wt(n.months("short",!0,!1),1);case"MMMM":return wt(n.months("long",!0,!1),1);case"L":return le(a);case"LL":return le(i);case"LLL":return wt(n.months("short",!1,!1),1);case"LLLL":return wt(n.months("long",!1,!1),1);case"d":return le(a);case"dd":return le(i);case"o":return le(c);case"ooo":return le(s);case"HH":return le(i);case"H":return le(a);case"hh":return le(i);case"h":return le(a);case"mm":return le(i);case"m":return le(a);case"q":return le(a);case"qq":return le(i);case"s":return le(a);case"ss":return le(i);case"S":return le(c);case"SSS":return le(s);case"u":return Ii(m);case"uu":return Ii(a);case"uuu":return le(r);case"a":return wt(n.meridiems(),0);case"kkkk":return le(o);case"kk":return le(u,xi);case"W":return le(a);case"WW":return le(i);case"E":case"c":return le(r);case"EEE":return wt(n.weekdays("short",!1,!1),1);case"EEEE":return wt(n.weekdays("long",!1,!1),1);case"ccc":return wt(n.weekdays("short",!0,!1),1);case"cccc":return wt(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return kd(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return kd(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Ii(/[a-z_+-/]{1,256}?/i);default:return h(_)}})(e)||{invalidReason:Pk};return p.token=e,p}const jk={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function qk(e,n,r){const{type:i,value:s}=e;if(i==="literal")return{literal:!0,val:s};const o=r[i];let l=jk[i];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function Wk(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function Hk(e,n,r){const i=e.match(n);if(i){const s={};let o=1;for(const l in r)if(Rn(r,l)){const a=r[l],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,s]}else return[i,{}]}function Gk(e){const n=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return te(e.z)||(r=Ht.create(e.z)),te(e.Z)||(r||(r=new qe(e.Z)),i=e.Z),te(e.q)||(e.M=(e.q-1)*3+1),te(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),te(e.u)||(e.S=_i(e.u)),[Object.keys(e).reduce((o,l)=>{const a=n(l);return a&&(o[a]=e[l]),o},{}),r,i]}let Ai=null;function Yk(){return Ai||(Ai=b.fromMillis(1555555555555)),Ai}function Kk(e,n){if(e.literal)return e;const r=Ye.macroTokenToFormatOpts(e.val);if(!r)return e;const o=Ye.create(n,r).formatDateTimeParts(Yk()).map(l=>qk(l,n,r));return o.includes(void 0)?e:o}function Jk(e,n){return Array.prototype.concat(...e.map(r=>Kk(r,n)))}function _d(e,n,r){const i=Jk(Ye.parseFormat(r),e),s=i.map(l=>zk(l,e)),o=s.find(l=>l.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[l,a]=Wk(s),c=RegExp(l,"i"),[d,m]=Hk(n,c,a),[u,f,h]=m?Gk(m):[null,null,void 0];if(Rn(m,"a")&&Rn(m,"H"))throw new dr("Can't include meridiem when specifying 24-hour format");return{input:n,tokens:i,regex:c,rawMatches:d,matches:m,result:u,zone:f,specificOffset:h}}}function Zk(e,n,r){const{result:i,zone:s,specificOffset:o,invalidReason:l}=_d(e,n,r);return[i,s,o,l]}const wd=[0,31,59,90,120,151,181,212,243,273,304,334],bd=[0,31,60,91,121,152,182,213,244,274,305,335];function mt(e,n){return new kt("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function xd(e,n,r){const i=new Date(Date.UTC(e,n-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Cd(e,n,r){return r+(ur(e)?bd:wd)[n-1]}function Vd(e,n){const r=ur(e)?bd:wd,i=r.findIndex(o=>o<n),s=n-r[i];return{month:i+1,day:s}}function Li(e){const{year:n,month:r,day:i}=e,s=Cd(n,r,i),o=xd(n,r,i);let l=Math.floor((s-o+10)/7),a;return l<1?(a=n-1,l=to(a)):l>to(n)?(a=n+1,l=1):a=n,{weekYear:a,weekNumber:l,weekday:o,...oo(e)}}function Ed(e){const{weekYear:n,weekNumber:r,weekday:i}=e,s=xd(n,1,4),o=mr(n);let l=r*7+i-s-3,a;l<1?(a=n-1,l+=mr(a)):l>o?(a=n+1,l-=mr(n)):a=n;const{month:c,day:d}=Vd(a,l);return{year:a,month:c,day:d,...oo(e)}}function Ri(e){const{year:n,month:r,day:i}=e,s=Cd(n,r,i);return{year:n,ordinal:s,...oo(e)}}function Nd(e){const{year:n,ordinal:r}=e,{month:i,day:s}=Vd(n,r);return{year:n,month:i,day:s,...oo(e)}}function Xk(e){const n=vr(e.weekYear),r=Wt(e.weekNumber,1,to(e.weekYear)),i=Wt(e.weekday,1,7);return n?r?i?!1:mt("weekday",e.weekday):mt("week",e.week):mt("weekYear",e.weekYear)}function Qk(e){const n=vr(e.year),r=Wt(e.ordinal,1,mr(e.year));return n?r?!1:mt("ordinal",e.ordinal):mt("year",e.year)}function Td(e){const n=vr(e.year),r=Wt(e.month,1,12),i=Wt(e.day,1,eo(e.year,e.month));return n?r?i?!1:mt("day",e.day):mt("month",e.month):mt("year",e.year)}function Sd(e){const{hour:n,minute:r,second:i,millisecond:s}=e,o=Wt(n,0,23)||n===24&&r===0&&i===0&&s===0,l=Wt(r,0,59),a=Wt(i,0,59),c=Wt(s,0,999);return o?l?a?c?!1:mt("millisecond",s):mt("second",i):mt("minute",r):mt("hour",n)}const Pi="Invalid DateTime",Bd=864e13;function co(e){return new kt("unsupported zone",`the zone "${e.name}" is not supported`)}function Ui(e){return e.weekData===null&&(e.weekData=Li(e.c)),e.weekData}function _r(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new b({...r,...n,old:r})}function Dd(e,n,r){let i=e-n*60*1e3;const s=r.offset(i);if(n===s)return[i,n];i-=(s-n)*60*1e3;const o=r.offset(i);return s===o?[i,s]:[e-Math.min(s,o)*60*1e3,Math.max(s,o)]}function Od(e,n){e+=n*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function uo(e,n,r){return Dd(bi(e),n,r)}function Md(e,n){const r=e.o,i=e.c.year+Math.trunc(n.years),s=e.c.month+Math.trunc(n.months)+Math.trunc(n.quarters)*3,o={...e.c,year:i,month:s,day:Math.min(e.c.day,eo(i,s))+Math.trunc(n.days)+Math.trunc(n.weeks)*7},l=oe.fromObject({years:n.years-Math.trunc(n.years),quarters:n.quarters-Math.trunc(n.quarters),months:n.months-Math.trunc(n.months),weeks:n.weeks-Math.trunc(n.weeks),days:n.days-Math.trunc(n.days),hours:n.hours,minutes:n.minutes,seconds:n.seconds,milliseconds:n.milliseconds}).as("milliseconds"),a=bi(o);let[c,d]=Dd(a,r,e.zone);return l!==0&&(c+=l,d=e.zone.offset(c)),{ts:c,o:d}}function wr(e,n,r,i,s,o){const{setZone:l,zone:a}=r;if(e&&Object.keys(e).length!==0){const c=n||a,d=b.fromObject(e,{...r,zone:c,specificOffset:o});return l?d:d.setZone(a)}else return b.invalid(new kt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function mo(e,n,r=!0){return e.isValid?Ye.create(we.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function $i(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Ne(e.c.year,r?6:4),n?(i+="-",i+=Ne(e.c.month),i+="-",i+=Ne(e.c.day)):(i+=Ne(e.c.month),i+=Ne(e.c.day)),i}function Fd(e,n,r,i,s,o){let l=Ne(e.c.hour);return n?(l+=":",l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=":")):l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=Ne(e.c.second),(e.c.millisecond!==0||!i)&&(l+=".",l+=Ne(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!o?l+="Z":e.o<0?(l+="-",l+=Ne(Math.trunc(-e.o/60)),l+=":",l+=Ne(Math.trunc(-e.o%60))):(l+="+",l+=Ne(Math.trunc(e.o/60)),l+=":",l+=Ne(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const Id={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},vk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},e_={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ad=["year","month","day","hour","minute","second","millisecond"],t_=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],n_=["year","ordinal","hour","minute","second","millisecond"];function Ld(e){const n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!n)throw new _c(e);return n}function Rd(e,n){const r=Qt(n.zone,Me.defaultZone),i=we.fromObject(n),s=Me.now();let o,l;if(te(e.year))o=s;else{for(const d of Ad)te(e[d])&&(e[d]=Id[d]);const a=Td(e)||Sd(e);if(a)return b.invalid(a);const c=r.offset(s);[o,l]=uo(e,c,r)}return new b({ts:o,zone:r,loc:i,o:l})}function Pd(e,n,r){const i=te(r.round)?!0:r.round,s=(l,a)=>(l=wi(l,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(l,a)),o=l=>r.calendary?n.hasSame(e,l)?0:n.startOf(l).diff(e.startOf(l),l).get(l):n.diff(e,l).get(l);if(r.unit)return s(o(r.unit),r.unit);for(const l of r.units){const a=o(l);if(Math.abs(a)>=1)return s(a,l)}return s(e>n?-0:0,r.units[r.units.length-1])}function Ud(e){let n={},r;return e.length>0&&typeof e[e.length-1]=="object"?(n=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[n,r]}class b{constructor(n){const r=n.zone||Me.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new kt("invalid input"):null)||(r.isValid?null:co(r));this.ts=te(n.ts)?Me.now():n.ts;let s=null,o=null;if(!i)if(n.old&&n.old.ts===this.ts&&n.old.zone.equals(r))[s,o]=[n.old.c,n.old.o];else{const a=r.offset(this.ts);s=Od(this.ts,a),i=Number.isNaN(s.year)?new kt("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=r,this.loc=n.loc||we.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[n,r]=Ud(arguments),[i,s,o,l,a,c,d]=r;return Rd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static utc(){const[n,r]=Ud(arguments),[i,s,o,l,a,c,d]=r;return n.zone=qe.utcInstance,Rd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=ug(n)?n.valueOf():NaN;if(Number.isNaN(i))return b.invalid("invalid input");const s=Qt(r.zone,Me.defaultZone);return s.isValid?new b({ts:i,zone:s,loc:we.fromObject(r)}):b.invalid(co(s))}static fromMillis(n,r={}){if(gn(n))return n<-Bd||n>Bd?b.invalid("Timestamp out of range"):new b({ts:n,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(gn(n))return new b({ts:n*1e3,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=Qt(r.zone,Me.defaultZone);if(!i.isValid)return b.invalid(co(i));const s=Me.now(),o=te(r.specificOffset)?i.offset(s):r.specificOffset,l=ro(n,Ld),a=!te(l.ordinal),c=!te(l.year),d=!te(l.month)||!te(l.day),m=c||d,u=l.weekYear||l.weekNumber,f=we.fromObject(r);if((m||a)&&u)throw new dr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&a)throw new dr("Can't mix ordinal dates with month/day");const h=u||l.weekday&&!m;let y,p,_=Od(s,o);h?(y=t_,p=vk,_=Li(_)):a?(y=n_,p=e_,_=Ri(_)):(y=Ad,p=Id);let k=!1;for(const z of y){const L=l[z];te(L)?k?l[z]=p[z]:l[z]=_[z]:k=!0}const w=h?Xk(l):a?Qk(l):Td(l),S=w||Sd(l);if(S)return b.invalid(S);const I=h?Ed(l):a?Nd(l):l,[P,$]=uo(I,o,i),V=new b({ts:P,zone:i,o:$,loc:f});return l.weekday&&m&&n.weekday!==V.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${l.weekday} and a date of ${V.toISO()}`):V}static fromISO(n,r={}){const[i,s]=gk(n);return wr(i,s,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,s]=kk(n);return wr(i,s,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,s]=_k(n);return wr(i,s,r,"HTTP",r)}static fromFormat(n,r,i={}){if(te(n)||te(r))throw new dt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,c,d,m]=Zk(l,n,r);return m?b.invalid(m):wr(a,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return b.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,s]=Nk(n);return wr(i,s,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the DateTime is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new ig(i);return new b({invalid:i})}static isDateTime(n){return n&&n.isLuxonDateTime||!1}get(n){return this[n]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ui(this).weekYear:NaN}get weekNumber(){return this.isValid?Ui(this).weekNumber:NaN}get weekday(){return this.isValid?Ui(this).weekday:NaN}get ordinal(){return this.isValid?Ri(this.c).ordinal:NaN}get monthShort(){return this.isValid?ao.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ao.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ao.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ao.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return ur(this.year)}get daysInMonth(){return eo(this.year,this.month)}get daysInYear(){return this.isValid?mr(this.year):NaN}get weeksInWeekYear(){return this.isValid?to(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:s}=Ye.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:s}}toUTC(n=0,r={}){return this.setZone(qe.instance(n),r)}toLocal(){return this.setZone(Me.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=Qt(n,Me.defaultZone),n.equals(this.zone))return this;if(n.isValid){let s=this.ts;if(r||i){const o=n.offset(this.ts),l=this.toObject();[s]=uo(l,o,n)}return _r(this,{ts:s,zone:n})}else return b.invalid(co(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return _r(this,{loc:s})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=ro(n,Ld),i=!te(r.weekYear)||!te(r.weekNumber)||!te(r.weekday),s=!te(r.ordinal),o=!te(r.year),l=!te(r.month)||!te(r.day),a=o||l,c=r.weekYear||r.weekNumber;if((a||s)&&c)throw new dr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new dr("Can't mix ordinal dates with month/day");let d;i?d=Ed({...Li(this.c),...r}):te(r.ordinal)?(d={...this.toObject(),...r},te(r.day)&&(d.day=Math.min(eo(d.year,d.month),d.day))):d=Nd({...Ri(this.c),...r});const[m,u]=uo(d,this.o,this.zone);return _r(this,{ts:m,o:u})}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return _r(this,Md(this,r))}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n).negate();return _r(this,Md(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=oe.normalizeUnit(n);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks"&&(r.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(n){return this.isValid?this.plus({[n]:1}).startOf(n).minus(1):this}toFormat(n,r={}){return this.isValid?Ye.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Pi}toLocaleString(n=ki,r={}){return this.isValid?Ye.create(this.loc.clone(r),n).formatDateTime(this):Pi}toLocaleParts(n={}){return this.isValid?Ye.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const l=n==="extended";let a=$i(this,l);return a+="T",a+=Fd(this,l,r,i,s,o),a}toISODate({format:n="extended"}={}){return this.isValid?$i(this,n==="extended"):null}toISOWeekDate(){return mo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:o=!1,format:l="extended"}={}){return this.isValid?(s?"T":"")+Fd(this,l==="extended",r,n,i,o):null}toRFC2822(){return mo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?$i(this,!0):null}toSQLTime({includeOffset:n=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(r||n)&&(i&&(s+=" "),r?s+="z":n&&(s+="ZZ")),mo(this,s,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Pi}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(n={}){if(!this.isValid)return{};const r={...this.c};return n.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(n,r="milliseconds",i={}){if(!this.isValid||!n.isValid)return oe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=mg(r).map(oe.normalizeUnit),l=n.valueOf()>this.valueOf(),a=l?this:n,c=l?n:this,d=Ak(a,c,o,s);return l?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(b.now(),n,r)}until(n){return this.isValid?xe.fromDateTimes(this,n):this}hasSame(n,r){if(!this.isValid)return!1;const i=n.valueOf(),s=this.setZone(n.zone,{keepLocalTime:!0});return s.startOf(r)<=i&&i<=s.endOf(r)}equals(n){return this.isValid&&n.isValid&&this.valueOf()===n.valueOf()&&this.zone.equals(n.zone)&&this.loc.equals(n.loc)}toRelative(n={}){if(!this.isValid)return null;const r=n.base||b.fromObject({},{zone:this.zone}),i=n.padding?this<r?-n.padding:n.padding:0;let s=["years","months","days","hours","minutes","seconds"],o=n.unit;return Array.isArray(n.unit)&&(s=n.unit,o=void 0),Pd(r,this.plus(i),{...n,numeric:"always",units:s,unit:o})}toRelativeCalendar(n={}){return this.isValid?Pd(n.base||b.fromObject({},{zone:this.zone}),this,{...n,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...n){if(!n.every(b.isDateTime))throw new dt("min requires all arguments be DateTimes");return $c(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(b.isDateTime))throw new dt("max requires all arguments be DateTimes");return $c(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return _d(l,n,r)}static fromStringExplain(n,r,i={}){return b.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return ki}static get DATE_MED(){return wc}static get DATE_MED_WITH_WEEKDAY(){return ag}static get DATE_FULL(){return bc}static get DATE_HUGE(){return xc}static get TIME_SIMPLE(){return Cc}static get TIME_WITH_SECONDS(){return Vc}static get TIME_WITH_SHORT_OFFSET(){return Ec}static get TIME_WITH_LONG_OFFSET(){return Nc}static get TIME_24_SIMPLE(){return Tc}static get TIME_24_WITH_SECONDS(){return Sc}static get TIME_24_WITH_SHORT_OFFSET(){return Bc}static get TIME_24_WITH_LONG_OFFSET(){return Dc}static get DATETIME_SHORT(){return Oc}static get DATETIME_SHORT_WITH_SECONDS(){return Mc}static get DATETIME_MED(){return Fc}static get DATETIME_MED_WITH_SECONDS(){return Ic}static get DATETIME_MED_WITH_WEEKDAY(){return cg}static get DATETIME_FULL(){return Ac}static get DATETIME_FULL_WITH_SECONDS(){return Lc}static get DATETIME_HUGE(){return Rc}static get DATETIME_HUGE_WITH_SECONDS(){return Pc}}function br(e){if(b.isDateTime(e))return e;if(e&&e.valueOf&&gn(e.valueOf()))return b.fromJSDate(e);if(e&&typeof e=="object")return b.fromObject(e);throw new dt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ue={};ue.format=function(e,n){return e=e?new Date(e):new Date,b.fromJSDate(e).toFormat(n)},ue.readableTime=function(e){if(e=String(e||""),!e||!/^\d{4}$/.test(e))return e;const n=e.substring(0,2),r=e.substring(2,4);return console.log(e,n,r),b.fromObject({hour:parseInt(n,10),minute:parseInt(r,10)}).toFormat("h:mma").toLowerCase().replace(/:00/g,"")},ue.timeago=function(e,n){return b.fromJSDate(new Date(e)).toRelative(n)},ue.getDatesBetween=function(e,n){const r=[];let i=b.fromISO(e);const s=b.fromISO(n);for(;i<=s;)r.push(i.toISODate()),i=i.plus({days:1});return r},ue.getCalendarDateLimits=function(e){const n=e.getFullYear(),r=e.getMonth(),i=new Date(n,r,1),s=new Date(n,r+1,0),o=new Date(i);o.setDate(o.getDate()-o.getDay());const l=new Date(s);l.setDate(l.getDate()+(6-l.getDay()));const a={weekday:"long",day:"numeric",month:"long",year:"numeric"},c=o.toLocaleDateString("en-US",a),d=l.toLocaleDateString("en-US",a);return{start:new Date(c),end:new Date(d)}},ue.getMiddleDate=function(e,n){const r=e.getTime(),i=n.getTime(),s=(r+i)/2;return new Date(s)},ue.shortTime=function(e){return e.toJSDate||(e=b.fromJSDate(new Date(e))),e.toFormat("mm")==="00"?e.toFormat("ha").toLowerCase():e.toFormat("h:mma").toLowerCase()},ue.readableEventDate=function({startDate:e,endDate:n,timezone:r},i){if(!e)return"";e=new Date(e),n=n?new Date(n):void 0;let s,o;try{s=r?b.fromJSDate(e).setZone(r):b.fromJSDate(e),o=n?r?b.fromJSDate(n).setZone(r):b.fromJSDate(n):s}catch{s=b.fromJSDate(e),o=n?b.fromJSDate(n):s}const l=b.now(),a=r&&s.zoneName!==b.local().zoneName?` (${s.zoneName})`:"",d=s.year!==l.year?` ${s.year}`:"";return s.hasSame(o,"day")?ue.shortTime(s)==="12am"?`${s.toFormat("d MMMM")}${d}${a}`:`${ue.shortTime(s)}, ${s.toFormat("cccc d MMMM")}${d}${a}`:s.hasSame(o,"month")?`${s.toFormat("d")}-${o.toFormat("d MMMM")}${d}${a}`:s.hasSame(o,"year")?`${s.toFormat("d MMM")} - ${o.toFormat("d MMM")}${d}${a}`:`${s.toFormat("d MMM yyyy")} - ${o.toFormat("d MMM yyyy")}${a}`},ue.readableDateRange=function(e,n,r){if(!e)return;if(!n)return ue.readableDate(e);e=b.fromJSDate(new Date(e)),n=b.fromJSDate(new Date(n));const i=e.toFormat("yyyy"),s=e.toFormat("LLL yyyy"),o=e.toFormat("WW yyyy"),l=e.toFormat("d LLL yyyy"),a=n.toFormat("yyyy"),c=n.toFormat("LLL yyyy"),d=n.toFormat("WW yyyy"),m=n.toFormat("d LLL yyyy");return l===m?ue.shortTime(e)==="12am"?`${ue.readableDate(n)}`:`${ue.shortTime(e)} - ${ue.readableDate(n)}`:o===d?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:s===c?`${e.toFormat("d")} - ${n.toFormat("d LLL")}`:i===a?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:`${ue.readableDate(e)} - ${ue.readableDate(n)}`},ue.readableDate=function(e){if(!e)return;const n=new Date,r=b.fromJSDate(n),i=r.toFormat("yyyy"),s=r.toFormat("LLL yyyy"),o=r.toFormat("WW yyyy"),l=r.toFormat("d LLL yyyy");e=new Date(e);const a=b.fromJSDate(e),c=a.toFormat("yyyy"),d=a.toFormat("LLL yyyy"),m=a.toFormat("WW yyyy");if(a.toFormat("d LLL yyyy")===l)return`${ue.shortTime(a)} today`;if(m===o)if(e>n){const f=parseInt(r.toFormat("d"));return parseInt(a.toFormat("d"))-f===1?`${ue.shortTime(a)} tomorrow`:`${ue.shortTime(a)} ${a.toFormat("cccc")}`}else return`${a.toRelativeCalendar()}`;return d===s?ue.shortTime(a)==="12am"?`${a.toFormat("d LLL")}`:`${ue.shortTime(a)} ${a.toFormat("d LLL")}`:c===i?a.toFormat("cccc d LLL"):a.toFormat("d LLL yyyy")};function $d(e){var h,y;const n=t.reactive({items:[],hash:{},hex:{},loading:!1,loaded:!1,_fullyLoaded:{}});let r=null;const i={};function s(p,_){if(!(!p||!_))for(const k of Object.keys(_))p[k]=_[k]}function o(p){const _={},k={};return p.forEach(function(w){w.key&&(_[w.key]=w),w.hex&&(k[w.hex]=w)}),{hash:_,hex:k}}async function l(p){if(r)return r;if(!(n.loaded&&!p))return r=a(),r}async function a(p){if(!e.auth.getCurrentUser()){m();return}n.loading=!0;try{const{data:k}=await e.api.get("/glossary/index",{cache:!1}),S=(k||[]).map(function($){const V=$.key&&n.hash[$.key];return V?(s(V,$),V):$}),{hash:I,hex:P}=o(S);n._fullyLoaded={},n.items=S,n.hash=I,n.hex=P,n.loaded=!0}catch(k){console.error("GlossaryService: failed to load glossary index",k)}finally{n.loading=!1,r=null}}async function c(p,_){return n._fullyLoaded[p]&&!_?n.hash[p]:(i[p]||(i[p]=d(p)),i[p])}async function d(p,_){try{const{data:k}=await e.api.get(`/glossary/index/${p}`,{cache:!1});if(!k)return;n.hash[p]?s(n.hash[p],k):n.hash[p]=k;const w=n.items.findIndex(function(S){return S.key===p});return w!==-1&&s(n.items[w],k),n._fullyLoaded[p]=!0,n.hash[p]}catch(k){console.error(`GlossaryService: failed to load definition for '${p}'`,k)}finally{delete i[p]}}n.ensure=async function(p){if(!p)return l(!1);if(await l(!1),typeof p=="string")return c(p,!1);if(Array.isArray(p))return Promise.all(p.map(function(_){return c(_,!1)}))},n.reload=async function(p){if(!p)return l(!0);if(await l(!1),typeof p=="string")return c(p,!0);if(Array.isArray(p))return Promise.all(p.map(function(_){return c(_,!0)}))},n.definitionName=function(p,_){const k=n.hash[p];return k?_?k.plural:k.title:p},n.clear=m;function m(){n.items=[],n.hash={},n.hex={},n.loaded=!1,n.loading=!1,n._fullyLoaded={},r=null;for(const p in i)delete i[p]}let u=null;e.auth.addEventListener("change",function(p){var _,k;if(p){const w=(k=(_=p==null?void 0:p.session)==null?void 0:_.organisation)==null?void 0:k._id;u&&w!==u&&m(),u=w||null,l(!1)}else u=null,m()});const f=e.auth.getCurrentUser();return f&&(u=((y=(h=f==null?void 0:f.session)==null?void 0:h.organisation)==null?void 0:y._id)||null,l(!1)),n}const fo={STRIPE_NOT_LOADED:"Stripe v3 library is not loaded",INSTANCE_NOT_DEFINED:"Instance object is not defined. Make sure you initialized Stripe before creating elements",ELEMENTS_NOT_DEFINED:"Elements object is not defined. You can't create stripe element without it",ELEMENT_TYPE_NOT_DEFINED:"elementType is required. You can't create stripe element without it"},r_=(e,n)=>{try{if(!window.Stripe)throw new Error(fo.STRIPE_NOT_LOADED);return window.Stripe(e,n)}catch(r){return console.error(r),r}},o_=(e,n)=>{try{if(!e)throw new Error(fo.INSTANCE_NOT_DEFINED);return e.elements(n)}catch(r){return console.error(r),r}},i_=(e,n,r)=>{try{if(!e)throw new Error(fo.ELEMENTS_NOT_DEFINED);if(!n)throw new Error(fo.ELEMENT_TYPE_NOT_DEFINED);return e.create(n,r)}catch(i){return console.error(i),i}};var zd=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r};const s_=t.defineComponent({name:"StripeElement",props:{elements:{type:Object,required:!0},type:{type:String,default:()=>"card"},options:{type:Object,default:()=>({})}},setup(e,{emit:n}){const r=t.ref(document.createElement("div")),i=t.ref(),s=t.ref(),{elements:o,type:l,options:a}=t.toRefs(e);return t.onMounted(()=>{const c=()=>{i.value=i_(o.value,l.value,a.value),i.value.mount(r.value),s.value.appendChild(r.value)},d=(u,f)=>{n(u,f)},m=()=>{["change","ready","focus","blur","click","escape"].forEach(f=>{i.value.on(f,d.bind(null,f))})};try{c(),m()}catch(u){console.error(u)}}),t.onBeforeUnmount(()=>{var c,d;(c=i.value)==null||c.unmount(),(d=i.value)==null||d.destroy()}),t.watch(a,()=>{var c;(c=i.value)==null||c.update(e.options)}),{stripeElement:i,domElement:r,mountPoint:s}}}),l_={ref:"mountPoint"};function a_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",l_,null,512)}var zi=zd(s_,[["render",a_]]);const c_=t.defineComponent({name:"StripeElements",props:{stripeKey:{type:String,required:!0},instanceOptions:{type:Object,default:()=>({})},elementsOptions:{type:Object,default:()=>({})}},setup(e){const{stripeKey:n,instanceOptions:r,elementsOptions:i}=t.toRefs(e),s=t.ref(),o=t.ref(),l=t.computed(()=>o.value?Object.keys(o.value).length>0:!1);return t.onMounted(()=>{s.value=r_(n.value,r.value),o.value=o_(s.value,i.value)}),t.watch(i,()=>{var a;(a=o.value)==null||a.update(i.value)}),{elements:o,instance:s,elementsUsable:l}}}),d_={key:0};function u_(e,n,r,i,s,o){return e.elementsUsable?(t.openBlock(),t.createElementBlock("div",d_,[t.renderSlot(e.$slots,"default",{instance:e.instance,elements:e.elements})])):t.createCommentVNode("",!0)}var ji=zd(c_,[["render",u_]]);const C=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r},m_={props:{center:{type:Boolean},shrink:{type:Boolean}}};function f_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-column",{center:r.center,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const jd=C(m_,[["render",f_],["__scopeId","data-v-b03628f8"]]),h_={},p_={class:"flex-column-body"};function y_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",p_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const qd=C(h_,[["render",y_],["__scopeId","data-v-ab49c425"]]),g_={},k_={class:"flex-column-header"};function __(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",k_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Wd=C(g_,[["render",__],["__scopeId","data-v-968bcded"]]),w_={},b_={class:"flex-column-footer"};function x_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",b_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Hd=C(w_,[["render",x_],["__scopeId","data-v-941966e2"]]),C_={props:{flex:{type:Boolean},center:{type:Boolean},vcenter:{type:Boolean},alignBottom:{type:Boolean},shrink:{type:Boolean}}};function V_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-cell",{flex:r.flex,center:r.center,vcenter:r.vcenter,"align-bottom":r.alignBottom,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const Gd=C(C_,[["render",V_],["__scopeId","data-v-efd82fd0"]]),E_={props:{center:{type:Boolean},vcenter:{type:Boolean},gap:{type:Boolean},wrap:{type:Boolean}}};function N_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-row",{gap:r.gap,vcenter:r.vcenter,center:r.center,wrap:r.wrap}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const Yd=C(E_,[["render",N_],["__scopeId","data-v-bd96c129"]]),T_={},S_={class:"flex-spacer"};function B_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",S_)}const Kd=C(T_,[["render",B_],["__scopeId","data-v-f42ac625"]]),D_={},O_={class:"panel"};function M_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",O_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Jd=C(D_,[["render",M_],["__scopeId","data-v-dc6d0d19"]]),F_={},I_={class:"panel-body"};function A_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",I_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Zd=C(F_,[["render",A_],["__scopeId","data-v-53a6d4be"]]),L_={},R_={class:"panel-header"};function P_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",R_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Xd=C(L_,[["render",P_],["__scopeId","data-v-49143033"]]),U_={},$_={class:"panel-footer"};function z_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",$_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Qd=C(U_,[["render",z_],["__scopeId","data-v-e87fc082"]]);var ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qi,vd;function xr(){if(vd)return qi;vd=1;function e(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return qi=e,qi}var Wi,eu;function tu(){if(eu)return Wi;eu=1;var e=typeof ho=="object"&&ho&&ho.Object===Object&&ho;return Wi=e,Wi}var Hi,nu;function Wn(){if(nu)return Hi;nu=1;var e=tu(),n=typeof self=="object"&&self&&self.Object===Object&&self,r=e||n||Function("return this")();return Hi=r,Hi}var Gi,ru;function j_(){if(ru)return Gi;ru=1;var e=Wn(),n=function(){return e.Date.now()};return Gi=n,Gi}var Yi,ou;function q_(){if(ou)return Yi;ou=1;var e=/\s/;function n(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return Yi=n,Yi}var Ki,iu;function W_(){if(iu)return Ki;iu=1;var e=q_(),n=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Ki=r,Ki}var Ji,su;function Zi(){if(su)return Ji;su=1;var e=Wn(),n=e.Symbol;return Ji=n,Ji}var Xi,lu;function H_(){if(lu)return Xi;lu=1;var e=Zi(),n=Object.prototype,r=n.hasOwnProperty,i=n.toString,s=e?e.toStringTag:void 0;function o(l){var a=r.call(l,s),c=l[s];try{l[s]=void 0;var d=!0}catch{}var m=i.call(l);return d&&(a?l[s]=c:delete l[s]),m}return Xi=o,Xi}var Qi,au;function G_(){if(au)return Qi;au=1;var e=Object.prototype,n=e.toString;function r(i){return n.call(i)}return Qi=r,Qi}var vi,cu;function Cr(){if(cu)return vi;cu=1;var e=Zi(),n=H_(),r=G_(),i="[object Null]",s="[object Undefined]",o=e?e.toStringTag:void 0;function l(a){return a==null?a===void 0?s:i:o&&o in Object(a)?n(a):r(a)}return vi=l,vi}var es,du;function Vr(){if(du)return es;du=1;function e(n){return n!=null&&typeof n=="object"}return es=e,es}var ts,uu;function po(){if(uu)return ts;uu=1;var e=Cr(),n=Vr(),r="[object Symbol]";function i(s){return typeof s=="symbol"||n(s)&&e(s)==r}return ts=i,ts}var ns,mu;function fu(){if(mu)return ns;mu=1;var e=W_(),n=xr(),r=po(),i=NaN,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,a=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return i;if(n(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=n(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var u=o.test(d);return u||l.test(d)?a(d.slice(2),u?2:8):s.test(d)?i:+d}return ns=c,ns}var rs,hu;function Y_(){if(hu)return rs;hu=1;var e=xr(),n=j_(),r=fu(),i="Expected a function",s=Math.max,o=Math.min;function l(a,c,d){var m,u,f,h,y,p,_=0,k=!1,w=!1,S=!0;if(typeof a!="function")throw new TypeError(i);c=r(c)||0,e(d)&&(k=!!d.leading,w="maxWait"in d,f=w?s(r(d.maxWait)||0,c):f,S="trailing"in d?!!d.trailing:S);function I(K){var ce=m,me=u;return m=u=void 0,_=K,h=a.apply(me,ce),h}function P(K){return _=K,y=setTimeout(z,c),k?I(K):h}function $(K){var ce=K-p,me=K-_,ye=c-ce;return w?o(ye,f-me):ye}function V(K){var ce=K-p,me=K-_;return p===void 0||ce>=c||ce<0||w&&me>=f}function z(){var K=n();if(V(K))return L(K);y=setTimeout(z,$(K))}function L(K){return y=void 0,S&&m?I(K):(m=u=void 0,h)}function R(){y!==void 0&&clearTimeout(y),_=0,m=p=u=y=void 0}function q(){return y===void 0?h:L(n())}function re(){var K=n(),ce=V(K);if(m=arguments,u=this,p=K,ce){if(y===void 0)return P(p);if(w)return clearTimeout(y),y=setTimeout(z,c),I(p)}return y===void 0&&(y=setTimeout(z,c)),h}return re.cancel=R,re.flush=q,re}return rs=l,rs}var K_=Y_();const Hn=vt(K_),J_=["onClick"],Z_=["onClick"],pu=C({__name:"tabset",props:{vertical:Boolean,inline:Boolean,pills:Boolean,defaultTab:String},setup(e){const n=t.useSlots(),r=e,i=t.reactive({tabs:[]});t.provide("tabset",i);const s=t.ref();t.provide("activeHeading",s);const o=function(f){s.value=f},l=Hn(function(){const h=n.default().reduce(function(_,k){var w;return((w=k.type)==null?void 0:w.name)==="tab"?_.push(k):k.children&&(_=[..._,...k.children]),_},[]).filter(function(_){var k;return((k=_.type)==null?void 0:k.name)==="tab"&&_.props.enabled!==!1}).map(function(_,k){const w=_.props.heading,S=_.props.tabKey||w;return{heading:w,key:S,index:k}});i.tabs=h;const y=h.reduce(function(_,k){return _[k.key||k.heading]=!0,_},{}),p=s.value;if((!p||!y[p])&&h.length){let _;r.defaultTab&&y[r.defaultTab]?_=r.defaultTab:_=h[0].key||h[0].heading,s.value=_}});t.provide("rebuild",l);const a=t.computed(function(){return i.tabs.map(function(f){if(f)return f.heading}).filter(Boolean)}),c=t.computed(function(){return i.tabs.map(function(f){if(f)return f.key}).filter(Boolean)}),d=t.computed(function(){return a.value.length>1}),m=t.ref(null);function u(){t.nextTick(function(){const f=m.value&&m.value.$el;if(!f)return;const h=f.querySelector("a.active");if(!h){f.style.removeProperty("--ind-width");return}f.style.setProperty("--ind-left",`${h.offsetLeft}px`),f.style.setProperty("--ind-width",`${h.offsetWidth}px`)})}return t.watch(s,u),t.watch(a,u),t.onMounted(function(){u(),window.addEventListener("resize",u),document.fonts&&document.fonts.ready&&document.fonts.ready.then(u)}),t.onBeforeUnmount(function(){window.removeEventListener("resize",u)}),l(),(f,h)=>{const y=t.resolveComponent("flex-body"),p=t.resolveComponent("flex-column"),_=t.resolveComponent("ux-button"),k=t.resolveComponent("flex-row"),w=t.resolveComponent("flex-header");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-tabset",{vertical:e.vertical,horizontal:!e.vertical,inline:e.inline,block:!e.inline&&!e.pills,pills:e.pills}])},[e.vertical?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[d.value?(t.openBlock(),t.createBlock(p,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(y,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:P=>o(S)},t.toDisplayString(a.value[I]),11,J_))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):e.pills?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[d.value?(t.openBlock(),t.createBlock(w,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(k,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createBlock(_,{color:s.value===S?"primary":"",key:`tab-pill-${S}`,onClick:P=>o(S)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.value[I]),1)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[d.value?(t.openBlock(),t.createBlock(w,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(k,{ref_key:"menuRow",ref:m},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:P=>o(S)},t.toDisplayString(a.value[I]),11,Z_))),128))]),_:1},512)]),_:1})):t.createCommentVNode("",!0)],64)),t.createVNode(p,null,{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3})],2)}}},[["__scopeId","data-v-e4752404"]]),X_={emits:["mount","unmount"],name:"tab",props:{heading:{type:String,required:!0},tabKey:{type:String},enabled:{type:Boolean,default:!0},keepAlive:{type:Boolean,default:!1}},created(){this.rebuild()},unmounted(){this.rebuild()},watch:{heading(){this.rebuild()}},inject:["tabset","activeHeading","rebuild"],computed:{active(){var r;return String(this.tabKey||this.heading)===String(((r=this.activeHeading)==null?void 0:r.value)||this.activeHeading)}}};function Q_(e,n,r,i,s,o){const l=t.resolveComponent("flex-column");return r.keepAlive?t.withDirectives((t.openBlock(),t.createBlock(l,{key:0},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},512)),[[t.vShow,o.active]]):o.active?(t.openBlock(),t.createBlock(l,{key:1},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})):t.createCommentVNode("",!0)}const yu=C(X_,[["render",Q_]]);var os,gu;function Er(){if(gu)return os;gu=1;var e=Array.isArray;return os=e,os}var is,ku;function v_(){if(ku)return is;ku=1;var e=Er(),n=po(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function s(o,l){if(e(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||n(o)?!0:i.test(o)||!r.test(o)||l!=null&&o in Object(l)}return is=s,is}var ss,_u;function wu(){if(_u)return ss;_u=1;var e=Cr(),n=xr(),r="[object AsyncFunction]",i="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function l(a){if(!n(a))return!1;var c=e(a);return c==i||c==s||c==r||c==o}return ss=l,ss}var ls,bu;function ew(){if(bu)return ls;bu=1;var e=Wn(),n=e["__core-js_shared__"];return ls=n,ls}var as,xu;function tw(){if(xu)return as;xu=1;var e=ew(),n=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function r(i){return!!n&&n in i}return as=r,as}var cs,Cu;function nw(){if(Cu)return cs;Cu=1;var e=Function.prototype,n=e.toString;function r(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return cs=r,cs}var ds,Vu;function rw(){if(Vu)return ds;Vu=1;var e=wu(),n=tw(),r=xr(),i=nw(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,a=Object.prototype,c=l.toString,d=a.hasOwnProperty,m=RegExp("^"+c.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(f){if(!r(f)||n(f))return!1;var h=e(f)?m:o;return h.test(i(f))}return ds=u,ds}var us,Eu;function ow(){if(Eu)return us;Eu=1;function e(n,r){return n==null?void 0:n[r]}return us=e,us}var ms,Nu;function fs(){if(Nu)return ms;Nu=1;var e=rw(),n=ow();function r(i,s){var o=n(i,s);return e(o)?o:void 0}return ms=r,ms}var hs,Tu;function yo(){if(Tu)return hs;Tu=1;var e=fs(),n=e(Object,"create");return hs=n,hs}var ps,Su;function iw(){if(Su)return ps;Su=1;var e=yo();function n(){this.__data__=e?e(null):{},this.size=0}return ps=n,ps}var ys,Bu;function sw(){if(Bu)return ys;Bu=1;function e(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}return ys=e,ys}var gs,Du;function lw(){if(Du)return gs;Du=1;var e=yo(),n="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function s(o){var l=this.__data__;if(e){var a=l[o];return a===n?void 0:a}return i.call(l,o)?l[o]:void 0}return gs=s,gs}var ks,Ou;function aw(){if(Ou)return ks;Ou=1;var e=yo(),n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;return e?o[s]!==void 0:r.call(o,s)}return ks=i,ks}var _s,Mu;function cw(){if(Mu)return _s;Mu=1;var e=yo(),n="__lodash_hash_undefined__";function r(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=e&&s===void 0?n:s,this}return _s=r,_s}var ws,Fu;function dw(){if(Fu)return ws;Fu=1;var e=iw(),n=sw(),r=lw(),i=aw(),s=cw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,ws=o,ws}var bs,Iu;function uw(){if(Iu)return bs;Iu=1;function e(){this.__data__=[],this.size=0}return bs=e,bs}var xs,Au;function Lu(){if(Au)return xs;Au=1;function e(n,r){return n===r||n!==n&&r!==r}return xs=e,xs}var Cs,Ru;function go(){if(Ru)return Cs;Ru=1;var e=Lu();function n(r,i){for(var s=r.length;s--;)if(e(r[s][0],i))return s;return-1}return Cs=n,Cs}var Vs,Pu;function mw(){if(Pu)return Vs;Pu=1;var e=go(),n=Array.prototype,r=n.splice;function i(s){var o=this.__data__,l=e(o,s);if(l<0)return!1;var a=o.length-1;return l==a?o.pop():r.call(o,l,1),--this.size,!0}return Vs=i,Vs}var Es,Uu;function fw(){if(Uu)return Es;Uu=1;var e=go();function n(r){var i=this.__data__,s=e(i,r);return s<0?void 0:i[s][1]}return Es=n,Es}var Ns,$u;function hw(){if($u)return Ns;$u=1;var e=go();function n(r){return e(this.__data__,r)>-1}return Ns=n,Ns}var Ts,zu;function pw(){if(zu)return Ts;zu=1;var e=go();function n(r,i){var s=this.__data__,o=e(s,r);return o<0?(++this.size,s.push([r,i])):s[o][1]=i,this}return Ts=n,Ts}var Ss,ju;function yw(){if(ju)return Ss;ju=1;var e=uw(),n=mw(),r=fw(),i=hw(),s=pw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Ss=o,Ss}var Bs,qu;function gw(){if(qu)return Bs;qu=1;var e=fs(),n=Wn(),r=e(n,"Map");return Bs=r,Bs}var Ds,Wu;function kw(){if(Wu)return Ds;Wu=1;var e=dw(),n=yw(),r=gw();function i(){this.size=0,this.__data__={hash:new e,map:new(r||n),string:new e}}return Ds=i,Ds}var Os,Hu;function _w(){if(Hu)return Os;Hu=1;function e(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}return Os=e,Os}var Ms,Gu;function ko(){if(Gu)return Ms;Gu=1;var e=_w();function n(r,i){var s=r.__data__;return e(i)?s[typeof i=="string"?"string":"hash"]:s.map}return Ms=n,Ms}var Fs,Yu;function ww(){if(Yu)return Fs;Yu=1;var e=ko();function n(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return Fs=n,Fs}var Is,Ku;function bw(){if(Ku)return Is;Ku=1;var e=ko();function n(r){return e(this,r).get(r)}return Is=n,Is}var As,Ju;function xw(){if(Ju)return As;Ju=1;var e=ko();function n(r){return e(this,r).has(r)}return As=n,As}var Ls,Zu;function Cw(){if(Zu)return Ls;Zu=1;var e=ko();function n(r,i){var s=e(this,r),o=s.size;return s.set(r,i),this.size+=s.size==o?0:1,this}return Ls=n,Ls}var Rs,Xu;function Qu(){if(Xu)return Rs;Xu=1;var e=kw(),n=ww(),r=bw(),i=xw(),s=Cw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Rs=o,Rs}var Ps,vu;function Vw(){if(vu)return Ps;vu=1;var e=Qu(),n="Expected a function";function r(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new TypeError(n);var o=function(){var l=arguments,a=s?s.apply(this,l):l[0],c=o.cache;if(c.has(a))return c.get(a);var d=i.apply(this,l);return o.cache=c.set(a,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,Ps=r,Ps}var Us,em;function Ew(){if(em)return Us;em=1;var e=Vw(),n=500;function r(i){var s=e(i,function(l){return o.size===n&&o.clear(),l}),o=s.cache;return s}return Us=r,Us}var $s,tm;function Nw(){if(tm)return $s;tm=1;var e=Ew(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=e(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(n,function(l,a,c,d){o.push(c?d.replace(r,"$1"):a||l)}),o});return $s=i,$s}var zs,nm;function rm(){if(nm)return zs;nm=1;function e(n,r){for(var i=-1,s=n==null?0:n.length,o=Array(s);++i<s;)o[i]=r(n[i],i,n);return o}return zs=e,zs}var js,om;function Tw(){if(om)return js;om=1;var e=Zi(),n=rm(),r=Er(),i=po(),s=e?e.prototype:void 0,o=s?s.toString:void 0;function l(a){if(typeof a=="string")return a;if(r(a))return n(a,l)+"";if(i(a))return o?o.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return js=l,js}var qs,im;function Ws(){if(im)return qs;im=1;var e=Tw();function n(r){return r==null?"":e(r)}return qs=n,qs}var Hs,sm;function Sw(){if(sm)return Hs;sm=1;var e=Er(),n=v_(),r=Nw(),i=Ws();function s(o,l){return e(o)?o:n(o,l)?[o]:r(i(o))}return Hs=s,Hs}var Gs,lm;function Bw(){if(lm)return Gs;lm=1;var e=po();function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return Gs=n,Gs}var Ys,am;function Dw(){if(am)return Ys;am=1;var e=Sw(),n=Bw();function r(i,s){s=e(s,i);for(var o=0,l=s.length;i!=null&&o<l;)i=i[n(s[o++])];return o&&o==l?i:void 0}return Ys=r,Ys}var Ks,cm;function Ow(){if(cm)return Ks;cm=1;var e=Dw();function n(r,i,s){var o=r==null?void 0:e(r,i);return o===void 0?s:o}return Ks=n,Ks}var Mw=Ow();const en=vt(Mw),ke={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},Fw={mixins:[ke],data(){return{processing:!1}},methods:{async clicked(){const e=this,n=(e.tags||[]).slice(),r=await e.$sdk.tag({title:"Edit tags",description:e.row.title,model:n.slice()}),i=e.$sdk.utils.ids(n),s=e.$sdk.utils.ids(r);JSON.stringify(i.sort())===JSON.stringify(s.sort())||(e.processing=!0,await e.$sdk.content.patch(this.itemID,{meta:{tags:r}}),e.row.meta.tags=r,e.processing=!1,e.$sdk.notify("Tags were updated"))}},computed:{canEditItem(){return this.$sdk.access.canEditItem(this.user,this.row)},itemID(){return this.row._id},tags(){var r;return((r=this.row.meta)==null?void 0:r.tags)||[]}}},Iw={class:"table-quicktag-cell"};function Aw(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-icon"),m=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",Iw,[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tags,u=>(t.openBlock(),t.createBlock(l,{icon:"fa-tag",tag:"a",value:u},null,8,["value"]))),256))]),_:1})]),_:1}),o.canEditItem?(t.openBlock(),t.createElementBlock("div",{key:0,class:"clicker",onClick:n[0]||(n[0]=t.withModifiers((...u)=>o.clicked&&o.clicked(...u),["stop","prevent"]))},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{icon:"",size:"xs"},{default:t.withCtx(()=>[t.createVNode(d,{icon:"fa-pen-to-square"})]),_:1})]),_:1})]),_:1})])):t.createCommentVNode("",!0)])}const Lw=C(Fw,[["render",Aw],["__scopeId","data-v-d98dce09"]]),Rw={mixins:[ke],computed:{initials(){var e,n;return`${((e=this.row)==null?void 0:e.firstName)||""} ${((n=this.row)==null?void 0:n.lastName)||""}`.trim()||this.row.title},source(){return this.$sdk.utils.id(this.value)||this.$sdk.utils.id(this.row)}}},Pw={class:"table-avatar-cell"},Uw={class:"avatar-wrapper"};function $w(e,n,r,i,s,o){const l=t.resolveComponent("avatar",!0);return t.openBlock(),t.createElementBlock("td",Pw,[t.createElementVNode("div",Uw,[t.createVNode(l,{id:o.source,initials:o.initials},null,8,["id","initials"])])])}const zw=C(Rw,[["render",$w],["__scopeId","data-v-a4b42e00"]]),jw={mixins:[ke],computed:{formatted(){return this.$sdk.date.readableTime(this.value)}}},qw={class:"table-time-cell"};function Ww(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",qw,[t.createVNode(l,{icon:"far fa-clock"}),t.createTextVNode(" "+t.toDisplayString(o.formatted),1)])}const Hw=C(jw,[["render",Ww],["__scopeId","data-v-677f555b"]]),Gw={mixins:[ke],computed:{key(){return this.column.key},rawSource(){return this.value!==void 0?this.value:en(this.row,this.key)},source(){const e=this.rawSource;return Array.isArray(e)?e[0]:e??(this.key?void 0:this.row)},imageSource(){var r;const e=this.source;if(e)switch((r=e==null?void 0:e.meta)==null?void 0:r.type){case"video":case"image":case"event":case"persona":case"profile":case"audio":case"file":return this.source;default:{const i=this.$sdk.utils.id(this.source);if(!i)return;var n=i.slice(8,10);switch(n){case"69":return{_id:i,meta:{type:"image"}};case"76":return{_id:i,meta:{type:"video"}};case"24":return{_id:i,meta:{type:"persona"}};case"70":return{_id:i,meta:{type:"profile"}};case"71":return{_id:i,meta:{type:"checkin"}}}return i}}},type(){var e,n;return(n=(e=this.imageSource)==null?void 0:e.meta)==null?void 0:n.type}},methods:{clicked(e){this.$sdk.dispatch("item:view",this.imageSource)}}},Yw={class:"table-image-cell"};function Kw(e,n,r,i,s,o){const l=t.resolveComponent("ux-image"),a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",Yw,[o.imageSource?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.type=="image"||o.type=="video"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])])):o.type==="audio"?(t.openBlock(),t.createBlock(a,{key:1,icon:"fa-music"})):o.type==="file"?(t.openBlock(),t.createBlock(a,{key:2,icon:"fa-file"})):(t.openBlock(),t.createElementBlock("div",{key:3,onClick:n[1]||(n[1]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])]))],64)):t.createCommentVNode("",!0)])}const Jw=C(Gw,[["render",Kw],["__scopeId","data-v-f57b1d98"]]),Zw={mixins:[ke],computed:{string(){return isNaN(this.amount)?"0.00":this.amount.toFixed(2)},amount(){return Number(parseInt(this.value)/100)},credit(){return this.amount>0},debit(){return this.amount<0},invalid(){var e;return((e=this.column)==null?void 0:e.key)==="amount"&&this.adjusted},adjusted(){return this.row.effectiveAmount!==this.row.amount},empty(){return parseInt(this.value)===0},currency(){return this.column.currency||this.row.currency}}};function Xw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-currency-cell",{credit:o.credit,empty:o.empty,debit:o.debit,invalid:o.invalid,adjusted:o.adjusted}])},t.toDisplayString(o.string),3)}const Qw=C(Zw,[["render",Xw],["__scopeId","data-v-c62e82ec"]]),vw={data(){return{processing:!1}},mixins:[ke],computed:{visible(){return!this.hidden},enabled(){const e=this;switch(typeof e.button.enabled){case"function":return e.button.enabled(e.row,e.column);case"undefined":case"null":return!0;default:return e.button.enabled}},hidden(){const e=this;switch(typeof e.button.hidden){case"function":return!!e.button.hidden(e.row,e.column);case"undefined":case"null":return!1;default:return!!e.button.hidden}},button(){return this.column.button},type(){var e,n;return(n=(e=this.row)==null?void 0:e.meta)==null?void 0:n.type},label(){const e=this.button;return typeof e.text=="function"?e.text(this):e.text}},methods:{async clicked(){this.processing=!0;try{await this.button.action(this.row,this.column,this)}finally{this.processing=!1}}}},e1={class:"table-button-cell"};function t1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",e1,[o.visible?(t.openBlock(),t.createBlock(a,{key:0,block:o.button.block,color:o.button.color,size:o.button.size,loading:s.processing,disabled:!o.enabled,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[o.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.label),1)],64)):t.createCommentVNode("",!0),o.button.icon?(t.openBlock(),t.createBlock(l,{key:1,icon:o.button.icon,right:""},null,8,["icon"])):t.createCommentVNode("",!0)]),_:1},8,["block","color","size","loading","disabled","onClick"])):t.createCommentVNode("",!0)])}const n1=C(vw,[["render",t1],["__scopeId","data-v-a915cc59"]]),r1={mixins:[ke],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mma, ccc d MMM").replace(/:00/g,"").replace(/PM,/g,"pm,").replace(/:AM,/g,"am,"):e.toFormat("h:mma, ccc d MMM yyyy").replace(/:00/g,"").replace(/:PM,/g,"pm,").replace(/:AM,/g,"am,")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n);return{readable:e.readable(r),timeago:e.timeago(r)}}).filter(Boolean)}}},o1={class:"table-date-cell"},i1={class:"date-pill"},s1={class:"off"},l1={class:"on"},a1={class:"spacer"};function c1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",o1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,l=>(t.openBlock(),t.createElementBlock("div",i1,[t.createElementVNode("span",s1,t.toDisplayString(l.readable),1),t.createElementVNode("span",l1,t.toDisplayString(l.timeago),1),t.createElementVNode("span",a1,t.toDisplayString(l.readable),1)]))),256))])}const dm=C(r1,[["render",c1],["__scopeId","data-v-f3b929d9"]]),d1={mixins:[ke],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mm a - dd MMM"):e.toFormat("h:mm a - dd MMM yyyy")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n),i=r<new Date;return{readable:e.readable(r),timeago:e.timeago(r),overdue:i}}).filter(Boolean)}}},u1={class:"table-date-cell"},m1={class:"off"},f1={class:"on"},h1={class:"spacer"};function p1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",u1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,a=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["date-pill",{overdue:a.overdue}])},[t.createElementVNode("span",m1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)]),t.createElementVNode("span",f1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.timeago),1)]),t.createElementVNode("span",h1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)])],2))),256))])}const y1=C(d1,[["render",p1],["__scopeId","data-v-0e48d460"]]),g1={mixins:[ke],computed:{boolean(){return!!this.value}}};function k1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-boolean-cell",{true:o.boolean,false:!o.boolean}])},[t.createVNode(l,{icon:o.boolean?"fa-check":"fa-times"},null,8,["icon"])],2)}const um=C(g1,[["render",k1],["__scopeId","data-v-b180904a"]]),_1={mixins:[ke],computed:{size(){return this.$sdk.files.filesize(this.value)}}};function w1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-filesize-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.size),3)}const b1=C(_1,[["render",w1],["__scopeId","data-v-0419990c"]]);function x1(e){const n=Math.round(e),r=Math.floor(n/3600),i=Math.floor(n%3600/60),s=n%60;return r>0?`${r}:${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`:`${i}:${s.toString().padStart(2,"0")}`}const C1={mixins:[ke],computed:{duration(){return x1(this.value)}}};function V1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-duration-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.duration),3)}const E1=C(C1,[["render",V1],["__scopeId","data-v-2910d792"]]),N1={mixins:[ke],methods:{async clicked(){const e=this,n=e.$sdk.utils.id(e.row),r=e.public?"secure":"public";e.processing=!0;try{await e.$sdk.content.patch(n,{meta:{security:r}}),e.row.meta||(e.row.meta={}),e.row.meta.security=r,e.$sdk.notify(`Set security to ${r}`)}catch(i){e.$sdk.error(i)}finally{e.processing=!1}}},data(){return{processing:!1}},computed:{canEdit(){var e=this.user;return this.$sdk.access.canEditItem(e,this.row)},public(){return this.security==="public"},security(){return this.value||"secure"}}};function T1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-security-cell",o.security])},[o.canEdit?(t.openBlock(),t.createBlock(a,{key:0,size:"sm",loading:s.processing,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(l,{icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"])]),_:1},8,["loading","onClick"])):(t.openBlock(),t.createBlock(l,{key:1,icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"]))],2)}const S1=C(N1,[["render",T1],["__scopeId","data-v-147f957e"]]),B1={mixins:[ke],methods:{open(){window.open(this.href)}},computed:{actualValue(){return String(this.value||"").trim()},href(){let e=this.actualValue;return/^https?:\/\//i.test(e)?e:"https://"+e}}},D1={class:"table-url-cell"},O1=["href"];function M1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",D1,[o.actualValue?(t.openBlock(),t.createElementBlock("a",{key:0,href:o.href,onClick:n[0]||(n[0]=t.withModifiers((...a)=>o.open&&o.open(...a),["stop","prevent"])),target:"_blank"},[t.createTextVNode(t.toDisplayString(o.actualValue)+" ",1),t.createVNode(l,{right:"",icon:"fa-external-link"})],8,O1)):t.createCommentVNode("",!0)])}const mm=C(B1,[["render",M1],["__scopeId","data-v-aa99a5e7"]]);var fm=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}};const hm={props:{template:String,parent:Object,templateProps:{type:Object,default:function(){return{}}}},render:function(){if(this.template){var e=this.parent||this.$parent,n=e.$data;n===void 0&&(n={});var r=e.$props;r===void 0&&(r={});var i=e.$options;i===void 0&&(i={});var s=i.components;s===void 0&&(s={});var o=i.computed;o===void 0&&(o={});var l=i.methods;l===void 0&&(l={});var a=this.$data;a===void 0&&(a={});var c=this.$props;c===void 0&&(c={});var d=this.$options;d===void 0&&(d={});var m=d.methods;m===void 0&&(m={});var u=d.computed;u===void 0&&(u={});var f=d.components;f===void 0&&(f={});var h={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n).forEach(function(V){a[V]===void 0&&(h.$data[V]=n[V])}),Object.keys(r).forEach(function(V){c[V]===void 0&&(h.$props[V]=r[V])}),Object.keys(l).forEach(function(V){m[V]===void 0&&(h.methods[V]=l[V])}),Object.keys(o).forEach(function(V){u[V]===void 0&&(h.computed[V]=o[V])}),Object.keys(s).forEach(function(V){f[V]===void 0&&(h.components[V]=s[V])});var y=Object.keys(h.methods||{}),p=Object.keys(h.$data||{}),_=Object.keys(h.$props||{}),k=Object.keys(this.templateProps),w=p.concat(_).concat(y).concat(k),S=(P=e,$={},y.forEach(function(V){return fm(P,$,V)}),$),I=function(V){var z={};return V.forEach(function(L){L&&Object.getOwnPropertyNames(L).forEach(function(R){return fm(L,z,R)})}),z}([h.$data,h.$props,S,this.templateProps]);return t.h({template:this.template||"<div></div>",props:w,computed:h.computed,components:h.components,provide:this.$parent.$.provides?this.$parent.$.provides:{}},Object.assign({},I))}var P,$}},F1={components:{Compile:hm},mixins:[ke]},I1={class:"table-computed-cell"};function A1(e,n,r,i,s,o){const l=t.resolveComponent("compile");return t.openBlock(),t.createElementBlock("td",I1,[t.createVNode(l,{template:this.column.code},null,8,["template"])])}const L1=C(F1,[["render",A1],["__scopeId","data-v-05dd3203"]]),R1={props:{multi:{type:Boolean},last:{type:Boolean},value:{required:!0},type:{type:String},widget:{type:String}},computed:{reference(){return!!(this.value&&this.value._id)},renderValue(){return this.value?this.value.title||this.value.name||this.value:void 0},date(){return b.fromISO(this.value).toFormat("dd MMM yyyy")},actualWidget(){var e;if(this.widget)e=this.widget;else switch(this.type){case"date":e="datetime";break}return e}},methods:{clicked(e){this.$sdk.dispatch("item:view",e)}}};function P1(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill");return o.reference?(t.openBlock(),t.createBlock(l,{key:0,tag:"a",value:r.value,onClick:n[0]||(n[0]=t.withModifiers(a=>o.clicked(r.value),["stop","prevent"]))},null,8,["value"])):r.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.date),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(o.renderValue),1),r.multi&&!r.last?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)],64))}const U1=C(R1,[["render",P1],["__scopeId","data-v-27442ac9"]]),$1=".total",z1={mixins:[ke],methods:{clicked(e){this.menuOpen=!1,this.$sdk.dispatch("item:view",e)}},data(){return{menuOpen:!1}},computed:{path(){return this.column.key||""},rawPath(){return this.path.slice(0,-$1.length)},itemPath(){return`${this.rawPath}.items`},value(){return en(this.row,this.column.key)},items(){return en(this.row,this.itemPath)}}},j1={class:"table-complex-cell"},q1={class:"items"};function W1(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-pill"),c=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",j1,[t.createVNode(c,{modelValue:s.menuOpen,"onUpdate:modelValue":n[1]||(n[1]=d=>s.menuOpen=d)},{activator:t.withCtx(({on:d})=>[t.createVNode(l,t.mergeProps({size:"sm",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop","prevent"]))},t.toHandlers(d),{icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},16)]),default:t.withCtx(()=>[t.createElementVNode("div",q1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.items,d=>(t.openBlock(),t.createBlock(a,{tag:"a",value:d,onClick:t.withModifiers(m=>o.clicked(d),["stop","prevent"])},null,8,["value","onClick"]))),256))])]),_:1},8,["modelValue"])])}const H1=C(z1,[["render",W1],["__scopeId","data-v-1cdab26c"]]),G1={mixins:[ke],computed:{email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress}}},Y1={class:"table-persona-email-cell"};function K1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",Y1,t.toDisplayString(o.email),1)}const J1=C(G1,[["render",K1],["__scopeId","data-v-9c894a39"]]),Z1={mixins:[ke],computed:{className(){return this.isConnected?"connected":this.isInvited?"invited":this.isManaged?"managed":"empty"},isConnected(){return!!this.row.user},isInvited(){return!this.isConnected&&this.row.collectionEmailAddress},isManaged(){return!this.isConnected&&!this.isInvited},email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress},text(){switch(this.className){case"connected":return"Qik User";case"invited":return"Invite sent";case"managed":return"App user";default:return""}},tooltip(){var r,i,s,o;const e=this,n=(i=(r=e.user)==null?void 0:r.organisation)!=null&&i.title?`'${(o=(s=e.user)==null?void 0:s.organisation)==null?void 0:o.title}'`:void 0;switch(e.className){case"connected":return`This user can sign in to ${n||"your organisation"} on the Qik platform.`;case"invited":return"We've sent an invite to this user to join your organisation on Qik.";case"managed":return"This user can only sign in to your applications.";default:return""}},icon(){switch(this.className){case"connected":return"far fa-user";case"invited":return"far fa-envelope";case"managed":return"far fa-user";default:return}}}},X1={class:"pill"};function Q1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-persona-invite-cell",o.className])},[t.createVNode(a,{content:o.tooltip},{default:t.withCtx(()=>[t.createElementVNode("div",X1,[t.createVNode(l,{icon:o.icon,left:""},null,8,["icon"]),t.createTextVNode(" "+t.toDisplayString(o.text),1)])]),_:1},8,["content"])],2)}const v1=C(Z1,[["render",Q1],["__scopeId","data-v-be3bef4b"]]),eb={mixins:[ke],computed:{status(){return String(this.value||"").toLowerCase()}}},tb={key:0,class:"pill"};function nb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-status-cell",o.status])},[o.status?(t.openBlock(),t.createElementBlock("div",tb,t.toDisplayString(o.status),1)):t.createCommentVNode("",!0)],2)}const rb=C(eb,[["render",nb],["__scopeId","data-v-357810c2"]]),ob={mixins:[ke],computed:{typeKey(){var e;return(e=this.row.meta)==null?void 0:e.type},subtitle(){var l,a,c,d,m,u,f;const e=this,n=this.row,r=n.subtitle,i=n.description,s=(l=n.meta)==null?void 0:l.description,o=r||i||s;switch(this.typeKey){case"runsheet":return n.event?`${n.event.title} • ${e.$sdk.date.readableEventDate(n.event)}`:"";case"venue":return[(a=n.address)==null?void 0:a.addressLine1,(c=n.address)==null?void 0:c.addressLine2,(d=n.address)==null?void 0:d.suburb,(m=n.address)==null?void 0:m.state,(u=n.address)==null?void 0:u.postalCode,(f=n.address)==null?void 0:f.country].filter(Boolean).join(" ");case"event":if(n.startDate,n.endDate,e.$sdk.date)return o?`${e.$sdk.date.readableEventDate(n)} • ${o}`:`${e.$sdk.date.readableEventDate(n)}`;break}return o}}},ib={class:"title"},sb={key:0,class:"subtitle"};function lb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-title-cell",e.status])},[t.createElementVNode("div",ib,t.toDisplayString(e.value),1),o.subtitle?(t.openBlock(),t.createElementBlock("div",sb,t.toDisplayString(o.subtitle),1)):t.createCommentVNode("",!0)],2)}const ab=C(ob,[["render",lb],["__scopeId","data-v-bf723bb2"]]),cb={mixins:[ke],computed:{alternatives(){const e=this.column.alternatives;return e?(this.row[e]||[]).filter(Boolean):[]}}},db={class:"table-name-cell"},ub={class:"name"},mb={key:0,class:"alternatives"};function fb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",db,[t.createElementVNode("span",ub,t.toDisplayString(e.value),1),o.alternatives.length?(t.openBlock(),t.createElementBlock("span",mb," ("+t.toDisplayString(o.alternatives.join(", "))+")",1)):t.createCommentVNode("",!0)])}const hb=C(cb,[["render",fb],["__scopeId","data-v-dfab6d42"]]),pb={props:{value:{type:Object}},computed:{style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{backgroundColor:n||e}}}};function yb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("span",{class:"ux-circle",style:t.normalizeStyle(o.style)},null,4)}const Nr=C(pb,[["render",yb],["__scopeId","data-v-6f2d4cea"]]),gb={mixins:[ke],components:{UxCircle:Nr},computed:{scopes(){return this.column.key==="_id"?[this.row]:(this.value||[]).filter(function({unit:n}){return!n})}}},kb={class:"scope-circles-cell"};function _b(e,n,r,i,s,o){const l=t.resolveComponent("ux-circle"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",kb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.scopes,c=>(t.openBlock(),t.createBlock(a,{content:c.title},{default:t.withCtx(()=>[t.createVNode(l,{value:c},null,8,["value"])]),_:2},1032,["content"]))),256))])}const wb=C(gb,[["render",_b],["__scopeId","data-v-f79f00ee"]]),bb={mixins:[ke],created(){this.$glossary.ensure()},computed:{lookup(){return this.$glossary.hash},match(){return this.lookup?this.lookup[this.value]:null},title(){var e;return((e=this.match)==null?void 0:e.title)||this.value},plural(){var e;return((e=this.match)==null?void 0:e.plural)||this.title},rendered(){return this.column.plural?this.plural:this.title}}},xb={class:"content-type-cell"};function Cb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",xb,t.toDisplayString(o.title),1)}const Vb=C(bb,[["render",Cb],["__scopeId","data-v-f8cf385c"]]),Eb={mixins:[ke],computed:{count(){return this.rosters.reduce(function(e,n){return n.slots.forEach(function(r){e+=r.assignments.length}),e},0)},rosters(){return Object.entries(this.row.join_roster||{}).map(function([n,r]){return{title:n,slots:r.items}})},rosterEnabled(){return this.$sdk.access.hasFeature(this.user,"rostering")?this.$sdk.access.canKnowOf(this.user,"roster")||this.$sdk.access.canKnowOf(this.user,"assignment"):void 0}}},Nb={class:"table-roster-cell"},Tb={class:"event-title"},Sb={class:"event-date"},Bb={class:"event-subtitle"},Db={class:"preview"},Ob={class:"grid"},Mb={class:"face"};function Fb(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-header"),c=t.resolveComponent("ux-avatar"),d=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-row"),u=t.resolveComponent("ux-panel-body"),f=t.resolveComponent("ux-panel"),h=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",Nb,[o.rosterEnabled&&o.count?(t.openBlock(),t.createBlock(h,{key:0,right:"",group:"roster-preview"},{activator:t.withCtx(({on:y})=>[t.createVNode(l,t.mergeProps({size:"sm"},t.toHandlers(y),{icon:"",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",Tb,t.toDisplayString(e.row.title),1),t.createElementVNode("div",Sb,t.toDisplayString(e.$sdk.date.readableEventDate(e.row)),1),t.createElementVNode("div",Bb,t.toDisplayString(e.row.subtitle),1)]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",Db,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.rosters,y=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Ob,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.slots,p=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("h4",null,t.toDisplayString(p.title),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.assignments,_=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["assignment",_.state||"unknown"])},[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",Mb,[t.createVNode(c,{initials:`${_.profile.firstName} ${_.profile.lastName}`,id:_.profile},null,8,["initials","id"])])]),_:2},1024),t.createVNode(d,null,{default:t.withCtx(()=>{var k,w;return[t.createTextVNode(t.toDisplayString((k=_.profile)==null?void 0:k.firstName)+" "+t.toDisplayString((w=_.profile)==null?void 0:w.lastName),1)]}),_:2},1024)]),_:2},1024)],2))),256))]))),256))])]))),256))])]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)])}const Ib=C(Eb,[["render",Fb],["__scopeId","data-v-88720bfa"]]),Ab={mixins:[ke],data(){return{runsheets:[],creating:!1}},created(){var e,n;this.runsheets=((n=(e=this.row.join_runsheet)==null?void 0:e.runsheet)==null?void 0:n.items)||[]},methods:{async addRunsheet(){const e=this;e.creating=!0,e.$sdk.global.create("runsheet",{model:{event:e.row}}).then(function(n){e.runsheets.push(n),e.openRunsheet(n),e.creating=!1},function(n){e.creating=!1})},async openRunsheet(e){const n=this.$sdk.access.canEditItem(this.user,e);return console.log("OPEN",n,e),n?this.editRunsheet(e):this.viewRunsheet(e)},async editRunsheet(e){const n=await this.$sdk.global.edit(e,!0);e.title=n.title},async viewRunsheet(e){const n=await this.$sdk.global.view(e,!0);e.title=n.title}},computed:{count(){var e;return(e=this.runsheets)==null?void 0:e.length}}},Lb={class:"table-roster-cell"},Rb={class:"wrp"},Pb={key:1,class:"hover"};function Ub(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-body"),c=t.resolveComponent("ux-list-item"),d=t.resolveComponent("ux-list"),m=t.resolveComponent("ux-panel"),u=t.resolveComponent("ux-menu"),f=t.resolveComponent("ux-icon"),h=t.resolveDirective("tippy");return t.openBlock(),t.createElementBlock("td",Lb,[t.withDirectives((t.openBlock(),t.createElementBlock("div",Rb,[o.count?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.count>1?(t.openBlock(),t.createBlock(u,{key:0},{activator:t.withCtx(({on:y})=>[t.createVNode(l,t.mergeProps({size:"xs"},t.toHandlers(y),{onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"])),icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count)+" Run Sheet"+t.toDisplayString(o.count===1?"":"s"),1)]),_:1}),t.createVNode(d,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.runsheets,y=>(t.openBlock(),t.createBlock(c,{onClick:p=>o.openRunsheet(y)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y.title),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1})]),_:1})):(t.openBlock(),t.createBlock(l,{key:1,size:"xs",icon:"",onClick:n[1]||(n[1]=t.withModifiers(y=>o.openRunsheet(s.runsheets[0]),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1}))],64)):(t.openBlock(),t.createElementBlock("div",Pb,[t.createVNode(l,{size:"xs",icon:"",loading:s.creating,onClick:t.withModifiers(o.addRunsheet,["stop"])},{default:t.withCtx(()=>[t.createVNode(f,{icon:"fa-plus"})]),_:1},8,["loading","onClick"])]))])),[[h,{placement:"bottom",content:`${o.count} Run Sheets`}]])])}const $b=C(Ab,[["render",Ub],["__scopeId","data-v-3ea39cda"]]);function Js(e,n){if(!e||!n)return;const r=n.split("|");n=r[0];const i=r[1];var s=en(e,n);if(s)return i&&Array.isArray(s)?s.filter(function(d){var u;const m=(u=d==null?void 0:d.meta)==null?void 0:u.definition;if(i==="null")return!m;if(m)return m===i}):s;const o=n.split("."),l=o.shift(),a=o.join("."),c=en(e,l);return Array.isArray(c)?c.map(function(d){return Js(d,a)}).flat().filter(Boolean):Js(c,a)}const zb={data(){return{component:null}},components:{ValueRenderer:U1},async created(){const e=this;let n,r=e.column.type,i=e.column.renderer,s=e.column.key;if(!i)switch(s){case"fileSize":i="filesize";break;case"duration":i="duration";break;case"title":i="title";break;case"status":case"paymentStatus":case"meta.status":i="status";break;case"meta.tags":i="tag";break;case"meta.definition":i="type";break}switch(e.column.widget){case"button":break;case"computed":i="computed";break;default:i=i||e.column.widget;break}if(i!=="computed")switch(r){case"boolean":i="boolean";break;case"reference":e.column.referenceType==="image"&&(i="thumbnail");break}switch(i){case"filesize":n=b1;break;case"duration":n=E1;break;case"button":n=n1;break;case"security":n=S1;break;case"boolean":n=um;break;case"roster":n=Ib;break;case"runsheet":n=$b;break;case"personainvite":n=v1;break;case"personaemail":n=J1;break;case"time":case"timefield":n=Hw;break;case"date":case"datetime":n=dm;break;case"due":n=y1;break;case"circles":n=wb;break;case"title":n=ab;break;case"name":n=hb;break;case"type":n=Vb;break;case"complex":n=H1;break;case"status":n=rb;break;case"computed":n=L1;break;case"url":n=mm;break;case"currency":n=Qw;break;case"tag":n=Lw;break;case"avatar":n=zw;break;case"thumbnail":n=Jw;break;default:switch(r){case"date":n=dm;break;case"boolean":n=um;break;case"url":n=mm;break}break}e.component=n},props:{column:{type:Object,required:!0},row:{type:Object,required:!0}},computed:{nowrap(){return this.column.wrap===!1},multiValue(){return Array.isArray(this.value)},renderer(){return this.column.renderer},renderValue(){var e=this.value;if(e!=null)return e.title||e.name||e},value(){var e=Js(this.row,this.column.key);return e}}},jb={class:"value"};function qb(e,n,r,i,s,o){const l=t.resolveComponent("value-renderer");return s.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s.component),{key:0,column:r.column,row:r.row,value:o.value},null,8,["column","row","value"])):(t.openBlock(),t.createElementBlock("td",{key:1,class:t.normalizeClass(["table-cell",{nowrap:o.nowrap}])},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.value,(a,c)=>(t.openBlock(),t.createElementBlock("span",jb,[t.createVNode(l,{type:r.column.type,multi:"",last:c===o.value.length-1,value:a},null,8,["type","last","value"])]))),256)):(t.openBlock(),t.createBlock(l,{key:1,type:r.column.type,value:o.value},null,8,["type","value"]))],2))}const pm=C(zb,[["render",qb],["__scopeId","data-v-47a33145"]]),Wb={components:{TableCell:pm},props:{selected:{type:Boolean},index:{type:Number},row:{type:Object,required:!0},columns:{type:Array,required:!0},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},hasCorner:{type:Boolean,default(){return!1}}},emits:["click:cell","click:row","click:actions","mousedown:select","mouseenter:select"],methods:{clickCell(e){this.$emit("click:cell",{row:this.row,column:e}),this.$emit("click:row",this.row)},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e){this.$emit("mousedown:select",this.row,this.index,e)},mouseenterSelect(){this.$emit("mouseenter:select",this.row,this.index)}},computed:{classes(){var n,r;var e=[];return this.selected&&e.push("selected"),((r=(n=this.row)==null?void 0:n.meta)==null?void 0:r.status)==="inactive"&&e.push("inactive"),e}}},Hb={key:2,class:"table-cell last shrink"};function Gb(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("table-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("tr",{class:t.normalizeClass([o.classes,"table-row"])},[t.renderSlot(e.$slots,"default",{},()=>[r.enableSelection?(t.openBlock(),t.createElementBlock("th",{key:0,class:"table-cell table-select first shrink",onMousedown:n[0]||(n[0]=t.withModifiers((...m)=>o.mousedownSelect&&o.mousedownSelect(...m),["prevent"])),onMouseenter:n[1]||(n[1]=(...m)=>o.mouseenterSelect&&o.mouseenterSelect(...m)),onClick:n[2]||(n[2]=t.withModifiers(()=>{},["stop","prevent"]))},[t.createVNode(l,{value:r.selected},null,8,["value"])],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.columns,(m,u)=>(t.openBlock(),t.createBlock(a,{key:`${m.path||m.key}-${u}-${m.type}-${m.renderer}`,onClick:t.withModifiers(f=>o.clickCell(m),["stop","prevent"]),column:m,row:r.row},null,8,["onClick","column","row"]))),128)),r.enableActions?(t.openBlock(),t.createElementBlock("th",{key:1,class:"table-cell last shrink",onClick:n[3]||(n[3]=t.withModifiers(m=>o.clickActions(r.row),["stop","prevent"]))},[t.createVNode(d,{size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-ellipsis"})]),_:1})])):r.hasCorner?(t.openBlock(),t.createElementBlock("th",Hb)):t.createCommentVNode("",!0)],!0)],2)}const Yb=C(Wb,[["render",Gb],["__scopeId","data-v-28bb2cce"]]),ym={data(){return{scrollTop:0}},methods:{updateScroll(e){var n=this.$refs.scroll;n=(n==null?void 0:n.$el)||n,n&&(this.scrollTop=n.scrollTop)}},mounted(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.addEventListener("scroll",this.updateScroll)},beforeUnmount(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.removeEventListener("scroll",this.updateScroll)},activated(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&(e.scrollTop=this.scrollTop)}},Kb={mixins:[ym],components:{TableRow:Yb,TableCell:pm},emits:["update:sort","select:multiple","deselect:multiple","select:multiple","click:row","click:cell","click:actions","select:row:toggle","contextmenu:header"],watch:{rows(){this.$refs.scroll.scroll({top:0,left:0})},sort(e){this.sorting=e},sorting(e){this.$emit("update:sort",e)}},props:{total:{type:Number},columns:{type:Array,default(){return[]}},rows:{type:Array,default(){return[]}},scrollable:{type:Boolean,default(){return!0}},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},sort:{type:Object,default(){return{key:"meta.created",type:"date",direction:"desc"}}},selection:{type:Array,default(){return[]}},selectAll:{type:Function},deselectAll:{type:Function},group:{type:Object,default(){return{}}}},data(){return{sorting:this.sort,lastSelectedIndex:null,lastSelectAction:null,dragging:!1,dragMode:null,dragStart:null}},beforeUnmount(){window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)},computed:{groupedRows(){const e=this.group.key,n=this.group.type||"string";if(e){const{values:r}=this.renderRows.reduce(function(i,s){let o=en(s,e);o=String(o);let l=i.keys[o];return l||(l=i.keys[o]={title:o,rows:[]},i.values.push(l)),i},{values:[],keys:{}});return r}return[{rows:this.renderRows}]},currentSortDirection(){var e;return((e=this.sorting)==null?void 0:e.direction)||"asc"},selectionHash(){var e=this;return e.selection.reduce(function(n,r){var i=r._id||r.id;return n[i]=r,n},{})},pageSelected(){var e=this;if(!(!e.rows||!e.rows.length))return!e.rows.some(function(n){return!e.selectionHash[n._id||n.id]})},renderColumns(){return this.columns.map(function(n){var r=Object.assign({},n);return r.class=[],r.shrink&&r.class.push("shrink"),r})},renderRows(){return this.rows},someSelectedOnPage(){return this.rows.some(this.isSelected)}},methods:{togglePage(){var e=this;e.pageSelected?e.deselectPage():e.selectPage()},selectPage(){var e=this;e.$emit("select:multiple",e.rows)},deselectPage(){var e=this;e.$emit("deselect:multiple",e.rows)},isSelected(e){var n=this,r=e._id||e.id;return n.selection.some(function(i){var s=i._id||i.id;return i==e||s==r})},classes(e){let n=[];return this.isSelected(e)&&n.push("selected"),n},selectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("select:multiple",s)},deselectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("deselect:multiple",s)},toggleSort(e){var o,l;const n=(o=this.sorting)==null?void 0:o.key,r=((l=this.sorting)==null?void 0:l.direction)||"asc";let{key:i,direction:s}=e;i===n&&(s=r==="dsc"?"asc":"dsc"),this.sorting={key:i,direction:s,type:e.type}},clickRow(e){this.$emit("click:row",e)},clickCell({row:e,column:n}){this.$emit("click:cell",{row:e,column:n})},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e,n,r){const s=this.isSelected(e)?"deselect":"select";if(r.shiftKey&&this.lastSelectedIndex!=null&&this.lastSelectedIndex!==n){this.lastSelectAction==="deselect"?this.deselectRange(this.lastSelectedIndex,n):this.selectRange(this.lastSelectedIndex,n),this.lastSelectedIndex=n;return}s==="select"?this.$emit("select:multiple",[e]):this.$emit("deselect:multiple",[e]),this.lastSelectedIndex=n,this.lastSelectAction=s,this.dragMode=s,this.dragStart={x:r.clientX,y:r.clientY},window.addEventListener("mousemove",this.checkDragStart),window.addEventListener("mouseup",this.endDrag,{once:!0})},mouseenterSelect(e,n){if(!this.dragging)return;const r=this.isSelected(e);this.dragMode==="select"&&!r?this.$emit("select:multiple",[e]):this.dragMode==="deselect"&&r&&this.$emit("deselect:multiple",[e])},checkDragStart(e){if(!this.dragStart)return;const n=e.clientX-this.dragStart.x,r=e.clientY-this.dragStart.y;n*n+r*r>=9&&(this.dragging=!0,window.removeEventListener("mousemove",this.checkDragStart))},endDrag(){this.dragging=!1,this.dragMode=null,this.dragStart=null,window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)}}},Jb={class:"table-scroll",ref:"scroll"},Zb={key:0,class:"first table-select shrink"},Xb=["onClick"],Qb={key:1,class:"last shrink"},vb={key:0};function ex(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("ux-list-item"),c=t.resolveComponent("ux-list"),d=t.resolveComponent("ux-menu"),m=t.resolveComponent("flex-cell"),u=t.resolveComponent("flex-row"),f=t.resolveComponent("table-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["table-wrapper",{dragging:s.dragging}]),onMouseup:n[5]||(n[5]=(...h)=>o.endDrag&&o.endDrag(...h))},[t.createElementVNode("div",Jb,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[t.createElementVNode("tr",{onContextmenu:n[4]||(n[4]=t.withModifiers(h=>e.$emit("contextmenu:header",h),["prevent"]))},[r.enableSelection?(t.openBlock(),t.createElementBlock("th",Zb,[t.createVNode(d,null,{activator:t.withCtx(({on:h})=>[t.createVNode(l,t.mergeProps(t.toHandlers(h),{value:o.pageSelected}),null,16,["value"])]),default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(a,{onClick:n[0]||(n[0]=h=>o.selectPage())},{default:t.withCtx(()=>[...n[6]||(n[6]=[t.createTextVNode(" Select Page ",-1)])]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[1]||(n[1]=h=>o.deselectPage())},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createTextVNode(" Deselect Page ",-1)])]),_:1})):t.createCommentVNode("",!0),r.selectAll?(t.openBlock(),t.createBlock(a,{key:1,onClick:n[2]||(n[2]=h=>r.selectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Select All ("+t.toDisplayString(r.total)+") ",1)]),_:1})):t.createCommentVNode("",!0),r.deselectAll?(t.openBlock(),t.createBlock(a,{key:2,onClick:n[3]||(n[3]=h=>r.deselectAll())},{default:t.withCtx(()=>[...n[8]||(n[8]=[t.createTextVNode(" Deselect All ",-1)])]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,h=>{var y;return t.openBlock(),t.createElementBlock("th",{onClick:p=>o.toggleSort(h),class:t.normalizeClass([{sortable:h.sortable!==!1,active:h.key===((y=s.sorting)==null?void 0:y.key)},h.class])},[t.createVNode(u,{gap:"",vcenter:""},{default:t.withCtx(()=>{var p;return[t.createVNode(m,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.title),1)]),_:2},1024),h.key===((p=s.sorting)==null?void 0:p.key)?(t.openBlock(),t.createBlock(m,{key:0,class:"caret",shrink:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.currentSortDirection==="asc"?"▲":"▼"),1)]),_:1})):t.createCommentVNode("",!0)]}),_:2},1024)],10,Xb)}),256)),r.enableActions||e.$slots.corner?(t.openBlock(),t.createElementBlock("th",Qb,[t.renderSlot(e.$slots,"corner",{},void 0,!0)])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.groupedRows,h=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[h.title?(t.openBlock(),t.createElementBlock("tr",vb,[t.createElementVNode("td",null,t.toDisplayString(h.title),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.rows,(y,p)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,hasCorner:!!e.$slots.corner,key:y._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onMousedown:select":o.mousedownSelect,"onMouseenter:select":o.mouseenterSelect,"onClick:actions":o.clickActions,selected:o.isSelected(y),row:y,index:p,columns:r.columns},null,8,["enableSelection","enableActions","hasCorner","onClick:cell","onClick:row","onMousedown:select","onMouseenter:select","onClick:actions","selected","row","index","columns"]))),128))],64))),256))])])],512)],34)}const gm=C(Kb,[["render",ex],["__scopeId","data-v-faa7539a"]]);var _o={exports:{}},km;function tx(){if(km)return _o.exports;km=1;var e=Object.prototype.hasOwnProperty;function n(s){return"[Throws: "+(s?s.message:"?")+"]"}function r(s,o){if(e.call(s,o))try{return s[o]}catch(l){return n(l)}return s[o]}function i(s){var o=[];function l(a){if(a===null||typeof a!="object")return a;if(o.indexOf(a)!==-1)return"[Circular]";if(o.push(a),typeof a.toJSON=="function")try{var c=l(a.toJSON());return o.pop(),c}catch(u){return n(u)}if(Array.isArray(a)){var d=a.map(l);return o.pop(),d}var m=Object.keys(a).reduce(function(u,f){return u[f]=l(r(a,f)),u},{});return o.pop(),m}return l(s)}return _o.exports=function(s,o,l){return JSON.stringify(i(s),o,l)},_o.exports.ensureProperties=i,_o.exports}var nx=tx();const Zs=vt(nx);function rx(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function Xs(e){return e!=null}const Z={emits:["touched","update:modelValue"],props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{dynamicOptions:[],asyncOptionsAreLoading:this.field.asyncOptions,value:this.modelValue}},watch:{modelValue(e,n){this.model=e}},mounted(){this.checkAutofocus()},async created(){const e=this;e.hasAsyncOptions&&await e.reloadAsyncOptions()},inject:{form:{default(){}},fieldPath:{default(){}}},computed:{asyncOptionsURL(){const e=this;if(e.field.asyncOptions&&String(e.field.asyncOptions||"").trim().length)return e.field.asyncOptions;if(e.field.dynamicOptions){const n=e.$sdk.utils.id(e.field.dynamicOptions);if(n)return e.$sdk.api.generateEndpointURL(`/smartlist/${n}/select`)}},hasAuthenticationToken(){return this.$sdk.auth.getCurrentToken()},hasAsyncOptions(){var e;if(this.asyncOptionsURL)return!0;if(this.field.type==="reference"){if((e=this.field.allowedReferences)!=null&&e.length)return!1;switch(this.field.widget){case"select":if(this.hasAuthenticationToken)return!0;break;default:return!1}if(this.field.lockFilter)return!0}return!1},loadingAsyncOptions(){return this.hasAsyncOptions&&this.asyncOptionsAreLoading},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},selectableOptions(){return this.options},required(){return this.minimum},model:{get(){var e=this.cleanOutput(this.value);return e},set(e){let n;(this.isGroup||this.widget==="form")&&(e===this.value?n=!1:n=!0);const r=this.cleanInput(e),i=this.cleanInput(this.value);(Zs(r)!=Zs(i)||n)&&(this.value=r,this.checkAutofocus(),this.dispatch())}},options(){var e=this;if(e.field.type==="reference"){const n=(e.field.allowedReferences||[]).filter(Boolean);if(n.length)return n.map(function(r){let{_id:i,title:s}=r;return s=s||[r.firstName,r.lastName].filter(Boolean).join(" "),{title:s,value:i,_id:i}})}return e.hasAsyncOptions?e.dynamicOptions:(e.field.options||[]).reduce(function(n,r){if(!r)return n;const i=e.getValue(r);var o={title:r.title||r.name||r.label||i,value:i,none:r.none,group:r.group,source:r};return e.field.type=="reference"&&(o._id=i),n.push(o),n},[])},prefix(){return this.field.suffix},suffix(){return this.field.suffix},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},canAddValue(){if(!this.singleValue&&!(this.options.length&&this.selectableOptions.length===0))return this.maximum===0||this.numValues<this.maximum},canRemoveValue(){return this.numValues>this.minimum},widget(){return this.field.widget},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},multiValue(){return!this.singleValue},label(){return this.field.title},title(){return this.label},plural(){return this.field.plural},description(){return this.field.description},placeholder(){return this.field.placeholder||this.field.hint},addLabel(){return this.field.addLabel?this.field.addLabel:this.numValues?`Add another ${this.label}`:`Add ${this.label}`},removeLabel(){return"Remove"},size(){return this.field.size},numValues(){return this.singleValue?1:(this.value||[]).length||0},showLabel(){return this.field.title&&!this.field.hideTitle},showDescription(){return this.description},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)},ask(){var e=parseInt(this.field.ask);return e=Math.max(e,this.minimum),this.maximum&&(e=Math.min(e,this.maximum)),e},minDate(){if(this.field.minDate)return new Date(this.field.minDate)},maxDate(){if(this.field.maxDate)return new Date(this.field.maxDate)}},methods:{async reloadAsyncOptions(){const e=this;if(!e.hasAsyncOptions){e.asyncOptionsAreLoading=!1;return}if(e.asyncOptionsAreLoading=!0,e.asyncOptionsURL){const{data:n}=await e.$sdk.api.get(e.asyncOptionsURL);e.dynamicOptions=(n||[]).map(function(r){let i=r==null?void 0:r.title;i||(i=r==null?void 0:r.name),i||(i=r==null?void 0:r.label),i||(i=[r.firstName,r.lastName].filter(Boolean).join(" ").trim()),i||(i=r.value||String(r));const s=String((r==null?void 0:r.value)||(r==null?void 0:r.title)||(r==null?void 0:r.name)||(r==null?void 0:r.label)||r),o=e.$sdk.utils.id((r==null?void 0:r._id)||r);return{title:i,value:s,_id:o}})}else if(e.hasAuthenticationToken){const n=e.field.referenceType,r={filter:e.field.lockFilter,sort:{key:"title",direction:"asc",type:"string"},page:{size:1e3}},{items:i}=await e.$sdk.content.list(n,r);e.dynamicOptions=i.map(function({_id:s,title:o}){return{value:s,title:o,_id:s}})}e.asyncOptionsAreLoading=!1},cleanTextInput(e,n,r){switch(n){case"url":e=r.$sdk.utils.parseURL(e);break;case"key":e=String(r.$sdk.utils.machineName(e||"")||"").trim();break;case"integer":e=parseInt(String(e).replace(/[^0-9-]/g,"")),isNaN(e)&&(e=void 0);break;case"number":case"decimal":case"float":e=Number(String(e).replace(/[^0-9.-]/g,"")),isNaN(e)&&(e=void 0);break}return e},checkAutofocus(){if(this.field.autofocus){if(this.value)return;this.$nextTick(function(){this.refocus()})}},getValue(e){if(!e)return this.cleanTextInput(e);var n=this.cleanTextInput(e._id||e.value),r=Xs(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),Xs(n)?n:e},getLabel(e){if(e){var n=e.title;return!n&&n!==0&&n!==!1&&(n=e.name),!n&&n!==0&&n!==!1&&(n=e.label),!n&&n!==0&&n!==!1&&(n=e.value),typeof n=="object"?"(no title)":n}},touch(){this.$emit("touched")},getNewDefaultEntry(){},add(){if(this.canAddValue){var e=this.cleanInputValue(this.getNewDefaultEntry());(!this.value||!Array.isArray(this.value))&&(this.value=[]),this.value.push(e),this.dispatch(),this.$nextTick(function(){this.refocus()}),this.touch()}},remove(e){var n=this.model.indexOf(e);this.model.splice(n,1),this.dispatch(),this.touch()},dispatch(){this.$emit("update:modelValue",this.value)},cleanInputValue(e){return e},cleanOutputValue(e){return e},cleanOutput(e){var n=this;return rx(e,n.field.type)?n.multiValue?e=[]:e=void 0:n.multiValue?(Array.isArray(e)||(e=[]),e.forEach(function(r,i){e[i]=n.cleanOutputValue(r)})):e=n.cleanOutputValue(e),e},cleanInput(e){var n=this;if(n.multiValue){for(e||(e=[]),Array.isArray(e)||(e=[e]),e=e.filter(Xs),n.maximum&&e.length>n.maximum&&(e.length=n.maximum);e.length<n.minimum;)e.push(n.cleanInputValue(n.getNewDefaultEntry()));e=e.map(function(r){var i=n.cleanInputValue(r);return i})}else e&&(e=n.cleanInputValue(e));return e},refocus(){var r;var e=this.$refs.input;if(e){var n;Array.isArray(e)?n=e[e.length-1]:n=e,n&&(typeof n.focus=="function"?n.focus():typeof((r=n.$el)==null?void 0:r.focus)=="function"&&n.$el.focus())}}}};function ox(e){return e===void 0||typeof e>"u"||e===null||String(e)==="null"||String(e)==="undefined"}const ix={data(){return{candidate:null}},props:{modelValue:{},pills:{type:Boolean,default:!1}},mixins:[Z],created(){this.model=this.model},methods:{maybeAutoSelectSingleOption(){if(this.loadingAsyncOptions||!this.singleValue||!this.minimum||this.model||this.model===!1||this.model===0)return;const e=this.selectableOptions.filter(function(n){return!n.none});e.length===1&&(this.model=e[0])},displayLabelFromValue(e){if(!e)return;const n=e.value||e,r=this.optionLookup[n]||{};return r.title||r.name||e.title||e.value||e},addValue(e){this.canAddValue&&this.model.indexOf(e)===-1&&(this.model=[...this.model,e])},removeValue(e){var n=this.model.slice();e!=-1&&(n.splice(e,1),this.model=n)},cleanOutput(e){var n=this;return ox(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(function(r){return r!=null}).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(function(i){return i!=null}).map(function(i){var s=n.getValue(i);return n.returnObject?n.optionLookup[s]:s});else{var r=n.getValue(e);switch(e=n.returnObject?n.optionLookup[r]:r,e){case"":switch(n.type){case"decimal":case"float":case"number":case"integer":e=void 0;break}break}}return e}},watch:{candidate(e){e&&(this.addValue(e),this.candidate=null)},selectableOptions:{immediate:!0,handler(){this.maybeAutoSelectSingleOption()}},loadingAsyncOptions(){this.maybeAutoSelectSingleOption()}},computed:{noneTitle(){return this.field.placeholder||"None"},usePills(){return this.field.pills||this.pills},returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),this.usePills&&e.push("pills"),e},summary(){if(this.multiValue)return"Select an option";const e=this.selectableOptions.find(function(i){return i.none}),n=(e==null?void 0:e.title)||(e==null?void 0:e.label),r=this.model;return r||r===!1||r===0?this.getLabel(this.optionLookup[this.model]):n||this.noneTitle||this.title||"Click to select"},grouped(){const e=this,{values:n}=e.selectableOptions.reduce(function(r,i){const s=i.group||"";let o=r.hash[s];return o||(o=r.hash[s]={title:s,options:[]},r.values.push(o)),o.options.push(i),r},{hash:{},values:[]});if(!(n.length<=1))return n},modelLookup(){var e=this;return e.multiValue?e.model.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{}):{}},selectableOptions(){var r;const e=this;let n=e.options;return e.multiValue&&(n=n.filter(function(i){return!e.modelLookup[e.getValue(i)]})),(r=e.field)!=null&&r.sorted?n.sort(function(i,s){var o=(i.title||i).toLowerCase(),l=(s.title||s).toLowerCase();return o<l?-1:o>l?1:0}):n},showNoneOption(){return!(!(this.singleValue&&!this.minimum)||this.selectableOptions.find(function(r){return r.none}))}}},sx={key:0,class:"ux-field-title"},lx={key:0,class:"ux-required-marker"},ax={key:1,class:"ux-field-description"},cx={key:2,class:"select-tags"},dx=["onClick"],ux={key:3},mx={key:4,class:"select-input-wrapper"},fx={class:"ui-select-button"},hx=["label"],px=["value"],yx=["value"],gx={class:"ui-select-button"},kx=["multiple"],_x={key:0,value:""},wx=["label"],bx=["value"],xx=["value"];function Cx(e,n,r,i,s,o){var m,u;const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",sx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",lx,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",ax,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",cx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"select-tag",key:f.value||f},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.displayLabelFromValue(f)),1)]),_:2},1024),t.createVNode(l,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("a",{onClick:y=>o.removeValue(h)},[t.createVNode(a,{icon:"fa-times"})],8,dx)]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.loadingAsyncOptions?(t.openBlock(),t.createElementBlock("div",ux,[t.createVNode(a,{icon:"fa-spinner",spin:"",left:""}),n[4]||(n[4]=t.createTextVNode(" Loading Options ",-1))])):(t.openBlock(),t.createElementBlock("div",mx,[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.canAddValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",fx,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),"onUpdate:modelValue":n[1]||(n[1]=f=>s.candidate=f),key:(m=e.model)==null?void 0:m.length},[n[5]||(n[5]=t.createElementVNode("option",{value:""},"Select an option",-1)),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,px))),256))],8,hx))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,yx))),256))],32)),[[t.vModelSelect,s.candidate]])],64)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",gx,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[2]||(n[2]=(...f)=>e.touch&&e.touch(...f)),multiple:e.multiValue,"onUpdate:modelValue":n[3]||(n[3]=f=>e.model=f),key:(u=e.model)==null?void 0:u.length},[o.showNoneOption?(t.openBlock(),t.createElementBlock("option",_x,t.toDisplayString(o.noneTitle),1)):t.createCommentVNode("",!0),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,bx))),256))],8,wx))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,xx))),256))],40,kx)),[[t.vModelSelect,e.model]])],64))]))],2)}const St=C(ix,[["render",Cx],["__scopeId","data-v-bf1479ae"]]),Vx={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}},sizeOptions:{type:Array,default(){return[50,100,250,500]}}},components:{NativeSelect:St},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:this.sizeOptions.map(function(e){return{title:`${e} per page`,value:e}})}}}};function Ex(e,n,r,i,s,o){const l=t.resolveComponent("native-select"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),m=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(m,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=u=>o.perPage=u),field:s.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a),o.totalPages>1?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=u=>o.currentPage=u),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[2]||(n[2]=u=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[3]||(n[3]=u=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}const _m=C(Vx,[["render",Ex],["__scopeId","data-v-93d339c8"]]);function Nx(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function wm(e){return typeof e=="function"?e():t.unref(e)}const Tx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Sx=e=>e!=null,Qs=()=>{};function vs(e){var n;const r=wm(e);return(n=r==null?void 0:r.$el)!=null?n:r}const Bx=Tx?window:void 0;function Dx(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function Ox(e){const n=Dx();return t.computed(()=>(n.value,!!e()))}function Mx(e,n,r={}){const{root:i,rootMargin:s="0px",threshold:o=.1,window:l=Bx,immediate:a=!0}=r,c=Ox(()=>l&&"IntersectionObserver"in l),d=t.computed(()=>{const y=wm(e);return(Array.isArray(y)?y:[y]).map(vs).filter(Sx)});let m=Qs;const u=t.ref(a),f=c.value?t.watch(()=>[d.value,vs(i),u.value],([y,p])=>{if(m(),!u.value||!y.length)return;const _=new IntersectionObserver(n,{root:vs(p),rootMargin:s,threshold:o});y.forEach(k=>k&&_.observe(k)),m=()=>{_.disconnect(),m=Qs}},{immediate:a,flush:"post"}):Qs,h=()=>{m(),f(),u.value=!1};return Nx(h),{isSupported:c,isActive:u,pause(){m(),u.value=!1},resume(){u.value=!0},stop:h}}const Fx={setup(){const e=t.ref(!1),n=t.ref(),{stop:r}=Mx(n,([{isIntersecting:i}])=>{i&&(e.value=!0,r())},{rootMargin:"600px"});return{targetEl:n,shouldRender:e}}},Ix={ref:"targetEl"};function Ax(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ix,[i.shouldRender?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)],512)}const bm=C(Fx,[["render",Ax]]),Lx={props:{icon:{type:[Object,String],default(){return"fa-exclamation"}},type:{type:String,default:"info"}},computed:{classes(){var e=[];return e.push(`ux-info-${this.type}`),e}}},Rx={class:"icon-circle"};function Px(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-info-box",o.classes])},[t.createVNode(c,{style:{gap:"1em"},center:""},{default:t.withCtx(()=>[r.icon?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",Rx,[t.createVNode(l,{icon:r.icon},null,8,["icon"])])]),_:1})):t.createCommentVNode("",!0),t.createVNode(a,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})],2)}const xm=C(Lx,[["render",Px],["__scopeId","data-v-9669e7c0"]]),Ux={props:{id:{type:[Object,String]},initials:{type:[String,Object]},cacheKey:{type:[String,Number]}},data(){return{stringID:this.$sdk.utils.id(this.id)}},watch:{id(e){this.stringID=this.$sdk.utils.id(e)}},computed:{initialString(){var s,o,l;if(typeof this.initials=="string")return this.initials;const e=((s=this.initials)==null?void 0:s.firstName)||"",n=((o=this.initials)==null?void 0:o.lastName)||"",r=`${e} ${n}`.trim(),i=(l=this.initials)==null?void 0:l.title;return r||i},initialLetters(){const e=this.initialString||"";if(!e||!e.length)return"";const n=e.split(/\s+/);let r="";return n[0]&&(r+=String(n[0][0]||"").toUpperCase()),n[1]&&(r+=String(n[1][0]||"").toUpperCase()),r},url(){const e={};return this.cacheKey&&(e.cacheKey=this.cacheKey),this.$sdk.api.generateEndpointURL(`/image/${this.stringID}`,e,{file:!0})},style(){const e={};return e.backgroundImage=`url(${this.url})`,e}}},$x={key:0,class:"initials"};function zx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["avatar-image",{"with-initials":o.initialLetters}])},[o.initialLetters?(t.openBlock(),t.createElementBlock("div",$x,t.toDisplayString(o.initialLetters),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"avatar-img",style:t.normalizeStyle(o.style)},null,4)],2)}const el=C(Ux,[["render",zx],["__scopeId","data-v-f8d86e04"]]),jx={props:{large:{type:Boolean}}};function qx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},[...n[0]||(n[0]=[t.createElementVNode("svg",{width:"24",height:"24",stroke:"#000",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("g",{class:"spinner_V8m1"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"9.5",fill:"none","stroke-width":"2"})])],-1)])],2)}const bn=C(jx,[["render",qx],["__scopeId","data-v-d9a57955"]]),Wx={components:{Spinner:bn},props:{to:{type:[Object,String]},icon:{type:Boolean},color:{type:String,default:"default"},bgColor:{type:String},fgColor:{type:String},tag:{type:String},href:{type:String},target:{type:String},loading:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},size:{type:String,default:"md"}},computed:{style(){var e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.fgColor&&(e.color=this.fgColor),e},classes(){var e=[];return e.push(`ux-btn-${this.size}`),this.block&&e.push("ux-btn-block"),this.loading&&e.push("ux-btn-loading"),this.active&&e.push("ux-btn-active"),this.icon&&e.push("ux-btn-icon"),e.push(`ux-btn-color-${this.color}`),this.disabled&&e.push("ux-btn-disabled"),e},element(){switch(this.tag){case"span":return this.tag;case"submit":return"button";default:return this.to||this.href?"ux-link":this.tag||"button"}}}},Hx={class:"ux-btn-text"};function Gx(e,n,r,i,s,o){const l=t.resolveComponent("spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{type:"button",active:r.active,loading:r.loading,to:r.to,href:r.href,target:r.target,style:t.normalizeStyle(o.style),class:t.normalizeClass([o.classes,"ux-btn"]),disabled:r.disabled},{default:t.withCtx(()=>[r.loading?(t.openBlock(),t.createBlock(l,{key:0})):t.createCommentVNode("",!0),t.createElementVNode("span",Hx,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}const Cm=C(Wx,[["render",Gx],["__scopeId","data-v-ea56e98b"]]),Yx={},Kx={class:"ux-btn-group"};function Jx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Kx,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Vm=C(Yx,[["render",Jx],["__scopeId","data-v-a0ecb730"]]),Zx={props:{value:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-checkbox-true"):e.push("ux-checkbox-false"),e}}};function Xx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["ux-checkbox",o.classes])},[t.createVNode(l,{class:"icon",icon:"fa-check"})],2)}const wo=C(Zx,[["render",Xx],["__scopeId","data-v-54bb07ba"]]),Qx={props:{value:{type:Boolean,default(){return!1}},loading:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-switch-true"):e.push("ux-switch-false"),this.loading&&e.push("ux-switch-loading"),e}}};function vx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["ux-switch",o.classes])},[t.createElementVNode("span",null,[t.createVNode(l,{spin:"",icon:"fa-spinner"})])],2)}const tl=C(Qx,[["render",vx],["__scopeId","data-v-1a0e83ee"]]),eC={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean},active:{type:Boolean}},methods:{clicked(e){var n=this;if(n.to&&(n.buildMode||n.nuxtMode))return e.preventDefault(),e.stopImmediatePropagation(),n.$sdk.app.to(n.to);if(n.href){if(n.buildMode){e.preventDefault(),window.open(n.href);return}if(n.nuxtMode){e.preventDefault(),e.stopImmediatePropagation();return}}}},computed:{actualHref(){if(this.href)return this.href;if(this.nuxtMode)return this.to?this.$sdk.app.createHref(this.to):void 0;if(this.to&&this.$router&&this.$router.resolve){const e=this.$router;this.$route;const n=!1,{location:r,route:i,href:s}=e.resolve(this.to,this.$route,n);return s}},nuxtMode(){return this.to&&this.$sdk.nuxt&&this.$sdk.app&&this.$sdk.app.createHref},buildMode(){return!!this.$sdk&&this.$sdk.app&&this.$sdk.app.builder},class(){var e=[];return this.disabled&&e.push("disabled"),this.active&&e.push("active"),(this.href||this.to)&&e.push("haslink"),e},element(){return this.nuxtMode||this.buildMode?"a":this.to?"router-link":"a"}}};function tC(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{onClick:o.clicked,to:r.to,href:o.actualHref,target:r.target,class:t.normalizeClass([o.class,"ux-link"])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onClick","to","href","target","class"])}const Em=C(eC,[["render",tC],["__scopeId","data-v-7a924ee2"]]),nC={props:{icon:{type:[Object,String]},spin:{type:Boolean},left:{type:Boolean},right:{type:Boolean},fixed:{type:Boolean}},computed:{useSvgLayout(){return!!this.$slots.default||!this.icon},modifierClasses(){var e=[];return this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),this.fixed&&e.push("ux-icon-fixed"),e},iconClasses(){return[this.icon,...this.modifierClasses]}}};function rC(e,n,r,i,s,o){return o.useSvgLayout?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["ux-icon ux-icon-svg",o.modifierClasses])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)):(t.openBlock(),t.createElementBlock("i",{key:1,class:t.normalizeClass(["ux-icon fa",o.iconClasses])},null,2))}const Nm=C(nC,[["render",rC],["__scopeId","data-v-d3c61976"]]),bo={cache:{}},oC={props:{group:{type:String},right:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},stop:{type:Boolean,default:!1},flex:{type:Boolean,default:!1},overflow:{type:Boolean},closeOnClick:{type:Boolean,default:!0},visible:{type:Boolean,default:!0},modelValue:{type:Boolean,default:!1}},data(){return{outerStyle:{},innerStyle:{},anchorRect:null,isExpanded:this.modelValue,isVisible:this.visible,triggerEvent:null,refMenu:null,mounted:!1,repositionFrame:null,resizeObserver:null}},watch:{modelValue(e){this.expanded=e},visible(e){this.isVisible=e}},mounted(){this.refMenu=this.$refs.menu,this.mounted=!0},beforeUnmount(){this.removeListeners(),this.refMenu=null,this.mounted=!1,bo.cache[this.group]===this&&(bo.cache[this.group]=null)},methods:{removeListeners(){document.removeEventListener("click",this.globalClick),window.removeEventListener("resize",this.scheduleReposition),window.removeEventListener("scroll",this.scheduleReposition,!0),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.repositionFrame&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=null),this.refMenu&&this.refMenu.removeEventListener("click",this.immediateClick)},addEventListeners(){document.addEventListener("click",this.globalClick),window.addEventListener("resize",this.scheduleReposition),window.addEventListener("scroll",this.scheduleReposition,!0),this.$nextTick(()=>{const e=this.$refs.menu;!e||!this.isExpanded||typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(this.scheduleReposition),this.resizeObserver.observe(e))}),this.refMenu&&this.refMenu.addEventListener("click",this.immediateClick)},scheduleReposition(){this.repositionFrame||(this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=null,this.isExpanded&&this.position()}))},immediateClick(e){this.expanded&&this.closeOnClick&&(e.stopImmediatePropagation(),this.expanded=!1)},globalClick(e){if(this.triggerEvent===e)return;var n=this.$refs.menu,r=e.target||e.srcElement;if(r&&r.isConnected===!1)return;if(n&&n.contains(r)){this.closeOnClick&&(this.expanded=!1);return}const i=r.closest&&r.closest(".ux-menu-outer, .modal-wrapper");i&&!i.contains(this.$el)||(this.expanded=!1)},position(){const e=this.anchorRect||this.$el.getBoundingClientRect();let n=e.left+window.scrollX,r=e.bottom+window.scrollY;this.outerStyle.left=`${n}px`,this.outerStyle.top=`${r}px`,this.innerStyle={},this.right&&!this.anchorRect&&(this.innerStyle.right=`-${e.width}px`),this.bottom&&!this.anchorRect&&(this.innerStyle.bottom=`${e.height}px`);var i=this.getMaxZIndex();this.outerStyle.zIndex=i,this.$nextTick(()=>{this.adjustForViewportBoundaries(e)})},adjustForViewportBoundaries(e){const n=this.$refs.menu;if(!n)return;const r=n.getBoundingClientRect(),i={height:window.innerHeight},s=r.bottom>i.height,o=e.top,l=i.height-e.bottom;s&&o>l&&!this.anchorRect?(this.innerStyle={...this.innerStyle,bottom:`${e.height}px`},this.$nextTick(()=>this.ensureWithinViewport())):this.ensureWithinViewport()},ensureWithinViewport(){const e=this.$refs.menu;if(!e)return;const n=e.getBoundingClientRect(),r={width:window.innerWidth,height:window.innerHeight};let i=parseInt(this.outerStyle.left)||0,s=parseInt(this.outerStyle.top)||0;n.right>r.width&&(i-=n.right-r.width+10),n.left<0&&(i+=Math.abs(n.left)+10),n.bottom>r.height&&(s-=n.bottom-r.height+10),n.top<0&&(s+=Math.abs(n.top)+10),this.outerStyle.left=`${Math.max(0,i)}px`,this.outerStyle.top=`${Math.max(0,s)}px`},getMaxZIndex(){return Math.max(...Array.from(document.querySelectorAll("body *"),e=>parseFloat(window.getComputedStyle(e).zIndex)).filter(e=>!Number.isNaN(e)),0)},close(){this.expanded=!1},openAt(e,n){this.anchorRect={left:e,right:e,top:n,bottom:n,width:0,height:0},this.isExpanded?this.position():this.expanded=!0}},computed:{expanded:{get(){return this.isExpanded},set(e){var n;this.group&&(n=bo.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),bo.cache[this.group]=this,n&&n!=this&&(n.expanded=!1)):(this.removeListeners(),this.anchorRect=null),this.$emit("update:modelValue",e))}},on(){var e=this;return{click(n){e.stop&&n.stopImmediatePropagation(),e.triggerEvent=n,e.expanded=!e.expanded}}}}};function iC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-menu",{right:r.right}])},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"activator",{on:o.on},void 0,!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"ux-menu-transition",appear:""},{default:t.withCtx(()=>[s.isExpanded?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-menu-outer",style:t.normalizeStyle(s.outerStyle)},[t.createElementVNode("div",{class:t.normalizeClass(["ux-menu-panel",{flex:r.flex,overflow:r.overflow}]),ref:"menu",style:t.normalizeStyle(s.innerStyle)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],4)),[[t.vShow,s.isVisible]]):t.createCommentVNode("",!0)]),_:3})]))],2)}const Tm=C(oC,[["render",iC],["__scopeId","data-v-54043858"]]),sC={name:"menulist",props:{items:{type:Array,default(){return[]}},depth:{type:Number,default:0},expandOn:{type:String,default:"none"},isolate:{type:Boolean,default:!0},collapseOnRouteChange:{type:Boolean,default:!0},displayCaret:{type:Boolean,default:!0}},mounted(){this.mounted=!0,this.addRouteChangeListeners()},beforeUnmount(){this.mounted=!1,this.removeRouteChangeListeners(),this.removeListeners()},computed:{actualDepth(){const e=this.depth;return isNaN(e)||!parseInt(e)?0:Math.max(e,0)},filteredItems(){const e=this;let n=e.tree.filter(function(r){return!(r.advancedOptions&&e.$sdk.utils.checkContextVisibility&&!e.$sdk.utils.checkContextVisibility(r.contextVisibility)||r.disabled)});return this.actualDepth===1&&(n=n.map(function(r){return{...r,items:[]}})),n}},data(){return{currentExpandedItems:[],tree:JSON.parse(JSON.stringify(this.items))}},methods:{globalClick(e){this.collapseAll()},routeChanged(){this.collapseOnRouteChange&&this.collapseAll()},addRouteChangeListeners(){this.$sdk.addEventListener("route:change",this.routeChanged)},removeRouteChangeListeners(){this.$sdk.removeEventListener("route:change",this.routeChanged)},addListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.addEventListener("click",this.globalClick)},removeListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.removeEventListener("click",this.globalClick)},expandItem(e){e.expanded=!0,this.currentExpandedItems.push(e)},collapseItem(e){const n=this.currentExpandedItems.indexOf(e);n!==-1&&(e.expanded=!1,this.currentExpandedItems.splice(n,1))},collapseAll(){this.currentExpandedItems.forEach(function(e){e.expanded=!1}),this.currentExpandedItems=[],this.currentExpandedItems.length?this.addListeners():this.removeListeners()},toggle(e){const n=e.expanded;this.isolate&&(this.currentExpandedItems.forEach(function(i){i.expanded=!1}),this.currentExpandedItems=[]);const r=this.currentExpandedItems.indexOf(e);n||r!==-1?this.collapseItem(e):this.expandItem(e),this.currentExpandedItems.length?this.addListeners():this.removeListeners()}},watch:{items:{handler(e){this.tree=JSON.parse(JSON.stringify(e))},deep:!0}}};function lC(e,n,r,i,s,o){const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-link"),m=t.resolveComponent("menulist",!0);return t.openBlock(),t.createElementBlock("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.filteredItems,u=>{var f;return t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass({expanded:u.expanded,collapsed:!u.expanded}),key:u.title},[r.expandOn==="click"&&((f=u.items)!=null&&f.length)?(t.openBlock(),t.createBlock(d,{key:0,onClick:t.withModifiers(h=>o.toggle(u),["stop","prevent"]),class:t.normalizeClass(u.class)},{default:t.withCtx(()=>[t.createVNode(c,{center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1024),r.displayCaret?(t.openBlock(),t.createBlock(l,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{class:"caret",icon:"fa-angle-down"})]),_:1})):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["onClick","class"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[u.type==="url"?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass(u.class),target:u.target,href:u.href||u.url},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","target","href"])):u.type==="route"?(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass(u.class),to:{name:u.route}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","to"])):t.createCommentVNode("",!0)],64)),u.items&&u.items.length?(t.openBlock(),t.createBlock(m,{key:2,expandOn:r.expandOn,items:u.items,displayCaret:r.displayCaret,isolate:r.isolate,depth:o.actualDepth-1},null,8,["expandOn","items","displayCaret","isolate","depth"])):t.createCommentVNode("",!0)],2)}),128))])}const Sm=C(sC,[["render",lC],["__scopeId","data-v-601e888e"]]),aC={props:{item:{type:[Object,String]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},auto:{type:Boolean,default:!0},inline:{type:Boolean},quality:{type:[Number,String]},contain:{type:Boolean,default:!0},preview:{type:Boolean,default:!1},crop:{type:Boolean},cover:{type:Boolean},format:{type:String},upscale:{type:Boolean,default:!0},type:{type:String,default:"image"},svg:{type:Boolean},lazy:{type:Boolean},eager:{type:Boolean}},data(){return{model:this.item,retries:0,cacheBuster:0,retryTimer:null}},watch:{item(e){this.model=e}},beforeMount(){this.$sdk.auth.ensureValidToken().catch(()=>{})},mounted(){const e=this.$refs.img;e&&e.addEventListener("error",this.imageLoadError)},beforeUnmount(){const e=this.$refs.img;e&&e.removeEventListener("error",this.imageLoadError)},methods:{imageLoadError(e){const n=this;n.retryTimer&&(clearTimeout(n.retryTimer),n.retryTimer=!1),n.retryTimer=setTimeout(function(){n.retries<5&&(n.cacheBuster++,n.retries++)},500)}},computed:{actualFormat(){var r,i;const e=((r=this.item)==null?void 0:r.fileMime)==="image/heic",n=((i=this.item)==null?void 0:i.fileExtension)==="heic";return e||n?"png":this.format},loading(){if(this.lazy)return"lazy";if(this.eager)return"eager"},altText(){var e;return this.alt||((e=this.model)==null?void 0:e.title)},className(){var e=[];return this.portrait&&e.push("img-portrait"),e.join(" ")},isSvg(){var e;if(this.svg)return!0;switch((e=this.item)==null?void 0:e.fileMime){case"image/svg+xml":case"image/svg":return!0}},portrait(){return this.crop?this.dimensionHeight>this.dimensionWidth:this.modelHeight>this.modelWidth},manualWidth(){return parseInt(this.width)},manualHeight(){return parseInt(this.height)},modelWidth(){var e;return parseInt((e=this.model)==null?void 0:e.width)},modelHeight(){var e;return parseInt((e=this.model)==null?void 0:e.height)},id(){return this.$sdk.utils.id(this.model)},params(){var n,r,i,s;var e={};if(e.access_token=this.$sdk.auth.getCurrentToken(),e.cb=this.cacheBuster,this.manualWidth&&(e.w=this.manualWidth?this.manualWidth:void 0),this.manualHeight&&(e.h=this.manualHeight?this.manualHeight:void 0),this.upscale&&(e.u=!0),this.auto&&!e.w&&!e.h){const o=(s=(i=(r=(n=this.$sdk.app)==null?void 0:n.device)==null?void 0:r.image)==null?void 0:i.auto)==null?void 0:s.med;o&&(e.w=o,e.u=!1)}return this.crop?e.c=!0:this.contain||(e.c=!!parseInt(this.manualWidth)&&!!parseInt(this.manualHeight)),this.quality&&(e.q=parseInt(this.quality)),this.actualFormat&&(e.f=this.actualFormat),e},src(){return this.$sdk.api.generateEndpointURL(`/image/${this.id}`,this.params,{file:!0})},previewSrc(){var e=Object.assign({},this.params);return e.w=50,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}`,e,{file:!0})},imageStyle(){var e={};return this.crop||(e["object-fit"]="contain"),this.cover&&(e["object-fit"]="cover"),this.inline?e.maxWidth="100%":(e.width="100%",e.height="100%",e.top="0",e.left="0",e.position="absolute"),e},dimensionWidth(){if(this.manualHeight&&this.manualWidth)return this.manualWidth;if(this.modelWidth&&this.modelHeight)return this.modelWidth},dimensionHeight(){if(this.manualHeight&&this.manualWidth)return this.manualHeight;if(this.modelWidth&&this.modelHeight)return this.modelHeight},style(){var r,i,s;var e={};this.inline?e.display="inline-block":this.dimensionHeight&&this.dimensionWidth&&(e.height=0,e.overflow="hidden",e.paddingBottom=`${this.dimensionHeight/this.dimensionWidth*100}%`,e.position="relative");var n=(s=(i=(r=this.model)==null?void 0:r.fileMeta)==null?void 0:i.colors)==null?void 0:s.colors;return n&&n.length&&(e.backgroundColor=n[0]),this.isSvg||this.preview&&(e.backgroundImage=`url(${this.previewSrc})`),e}}},cC=["alt","data"],dC=["loading","alt","src"];function uC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-image",o.className]),style:t.normalizeStyle(o.style)},[r.svg?(t.openBlock(),t.createElementBlock("object",{key:0,alt:o.altText,type:"image/svg+xml",data:o.src},null,8,cC)):(t.openBlock(),t.createElementBlock("img",{key:1,ref:"img",loading:o.loading,alt:o.altText,style:t.normalizeStyle(o.imageStyle),src:o.src},null,12,dC))],6)}const Bm=C(aC,[["render",uC],["__scopeId","data-v-a2d635ea"]]),mC={props:{item:{type:[Object,String]},width:{type:[Number,String]},height:{type:[Number,String]},controls:{type:Boolean,default:!0},controlslist:{type:String},autoplay:{type:Boolean,default:!1},playsinline:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1}},data(){return{model:this.item,isMuted:this.muted||this.autoplay,playsInline:this.playsinline||this.autoplay}},watch:{playsinline(e){this.playsInline=e},muted(e){this.isMuted=e}},beforeMount(){this.$sdk.auth.ensureValidToken().catch(()=>{})},computed:{padHeight(){return this.actualHeight&&this.actualWidth?`${this.actualHeight/this.actualWidth*100}%`:void 0},youtubeSrc(){return`https://www.youtube.com/embed/${this.mediaID}`},title(){var e;return(e=this.model)==null?void 0:e.title},mediaID(){var e;return(e=this.model)==null?void 0:e.mediaIntegrationID},mediaType(){var e;return((e=this.model)==null?void 0:e.mediaIntegrationType)||"upload"},mimetype(){var e;return((e=this.model)==null?void 0:e.fileMime)||"video/mp4"},actualWidth(){return parseInt(this.width)||this.modelWidth||1920},actualHeight(){return parseInt(this.height)||this.modelHeight||1080},className(){var e=[];return this.portrait&&e.push("video-portrait"),e.push(`video-type-${this.mediaType}`),e.join(" ")},portrait(){return this.actualHeight>this.actualWidth},modelWidth(){var e;return parseInt(((e=this.model)==null?void 0:e.width)||0)},modelHeight(){var e;return parseInt(((e=this.model)==null?void 0:e.height)||0)},id(){return this.$sdk.utils.id(this.model)},params(){var e={};return e.access_token=this.$sdk.auth.getCurrentToken(),e},src(){return this.$sdk.api.generateEndpointURL(`/video/${this.id}`,this.params,{file:!0})},thumbnailSrc(){var e=Object.assign({},this.params);return e.w=this.actualWidth,e.h=this.actualHeight,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}/poster.png`,e,{file:!0})},embedStyle(){var e={};return this.padHeight&&(e.height=0,e.paddingBottom=this.padHeight,e.overflow="hidden",e.position="relative"),e}}},fC=["poster","playsinline","muted","loop","autoplay","width","height","controls","controlslist"],hC=["src","type"],pC=["width","height","src","title"];function yC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-video",o.className])},[o.mediaType==="upload"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-video-embed ux-video-embed-upload",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("video",{poster:o.thumbnailSrc,playsinline:s.playsInline,muted:s.isMuted,loop:r.loop,autoplay:r.autoplay,width:o.actualWidth,height:o.actualHeight,controls:r.controls,controlslist:r.controlslist},[t.createElementVNode("source",{src:o.src,type:o.mimetype},null,8,hC),n[0]||(n[0]=t.createTextVNode(" Your browser does not support the video tag. ",-1))],8,fC)],4)):t.createCommentVNode("",!0),o.mediaType==="youtube"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"ux-video-embed ux-video-embed-youtube",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("iframe",{width:o.actualWidth,height:o.actualHeight,src:o.youtubeSrc,title:o.title,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,pC)],4)):t.createCommentVNode("",!0)],2)}const Dm=C(mC,[["render",yC],["__scopeId","data-v-c519c9ea"]]),gC={props:{value:{type:Number},active:{type:Boolean}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},percent(){return this.value},barStyle(){return{width:`${this.percent}%`}},element(){return"i"}}},kC={class:"ux-progress"};function _C(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",kC,[t.createElementVNode("div",{class:t.normalizeClass(["ux-progress-bg",{active:r.active}])},null,2),t.createElementVNode("div",{class:"ux-progress-fg",style:t.normalizeStyle(o.barStyle)},null,4)])}const nl=C(gC,[["render",_C],["__scopeId","data-v-6e492d1a"]]),wC={props:{value:{},tag:{type:String,default:"span"},clickable:{type:Boolean},deleteable:{type:Boolean},icon:{type:String}},computed:{avatar(){var s;const e=(s=this.value)==null?void 0:s._id;if(!e)return;const n=e.slice(8,10)==="24",r=e.slice(8,10)==="70",i=e.slice(8,10)==="71";if(n||r||i)return e},elementType(){return this.tag||"span"},title(){var e,n,r,i,s,o,l,a;return[(e=this.value)==null?void 0:e.title,(n=this.value)==null?void 0:n.name,(r=this.value)!=null&&r.firstName&&((i=this.value)!=null&&i.lastName)?`${(s=this.value)==null?void 0:s.firstName} ${(o=this.value)==null?void 0:o.lastName}`:(l=this.value)==null?void 0:l.firstName,(a=this.value)==null?void 0:a.firstName,this.value].filter(Boolean)[0]},subtitle(){var e;if((e=this.value)!=null&&e.startDate)return this.$sdk.date?this.$sdk.date.readableEventDate(this.value):void 0},hasLink(){return this.tag==="a"||this.clickable},style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{color:e,backgroundColor:n}}}},bC={key:0,class:"pill-avatar"},xC={class:"font-sm font-muted"};function CC(e,n,r,i,s,o){const l=t.resolveComponent("ux-avatar"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.elementType),{class:t.normalizeClass(["ux-pill",{"has-link":o.hasLink}]),style:t.normalizeStyle(o.style)},{default:t.withCtx(()=>[t.createVNode(d,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[o.avatar?(t.openBlock(),t.createElementBlock("div",bC,[t.createVNode(l,{id:o.avatar,initials:o.title},null,8,["id","initials"])])):t.createCommentVNode("",!0),o.subtitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1),t.createElementVNode("span",xC," • "+t.toDisplayString(o.subtitle),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1)],64))]),_:1}),r.deleteable?(t.openBlock(),t.createBlock(c,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class","style"])}const Om=C(wC,[["render",CC],["__scopeId","data-v-709f24b0"]]),VC={},EC={class:"ux-list"};function NC(e,n){return t.openBlock(),t.createElementBlock("ul",EC,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Mm=C(VC,[["render",NC],["__scopeId","data-v-670de630"]]),TC={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean}},computed:{element(){return this.to||this.href?"ux-link":"div"}}};function SC(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{class:"ux-list-item",to:r.to,href:r.href,target:r.target,disabled:r.disabled},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["to","href","target","disabled"])}const Fm=C(TC,[["render",SC],["__scopeId","data-v-a5de8929"]]);var se;(function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"})(se||(se={}));var ge;(function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"})(ge||(ge={}));var ft;(function(e){e[e.JANUARY=1]="JANUARY",e[e.FEBRUARY=2]="FEBRUARY",e[e.MARCH=3]="MARCH",e[e.APRIL=4]="APRIL",e[e.MAY=5]="MAY",e[e.JUNE=6]="JUNE",e[e.JULY=7]="JULY",e[e.AUGUST=8]="AUGUST",e[e.SEPTEMBER=9]="SEPTEMBER",e[e.OCTOBER=10]="OCTOBER",e[e.NOVEMBER=11]="NOVEMBER",e[e.DECEMBER=12]="DECEMBER"})(ft||(ft={}));function xn(e,n){e.assign("day",n.getDate()),e.assign("month",n.getMonth()+1),e.assign("year",n.getFullYear())}function Im(e,n){e.assign("hour",n.getHours()),e.assign("minute",n.getMinutes()),e.assign("second",n.getSeconds()),e.assign("millisecond",n.getMilliseconds()),e.assign("meridiem",n.getHours()<12?se.AM:se.PM)}function Gn(e,n){e.imply("day",n.getDate()),e.imply("month",n.getMonth()+1),e.imply("year",n.getFullYear())}function rl(e,n){e.imply("hour",n.getHours()),e.imply("minute",n.getMinutes()),e.imply("second",n.getSeconds()),e.imply("millisecond",n.getMilliseconds()),e.imply("meridiem",n.getHours()<12?se.AM:se.PM)}const BC={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:2*60,timezoneOffsetNonDst:60,dstStart:e=>Am(e,ft.MARCH,ge.SUNDAY,2),dstEnd:e=>Am(e,ft.OCTOBER,ge.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-5*60,timezoneOffsetNonDst:-6*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-4*60,timezoneOffsetNonDst:-5*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-6*60,timezoneOffsetNonDst:-7*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-7*60,timezoneOffsetNonDst:-8*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function tn(e,n,r,i,s=0){let o=0,l=0;for(;l<i;)o++,new Date(e,n-1,o).getDay()===r&&l++;return new Date(e,n-1,o,s)}function Am(e,n,r,i=0){const s=r===0?7:r,o=new Date(e,n-1+1,1,12),l=o.getDay()===0?7:o.getDay();let a;return l===s?a=7:l<s?a=7+l-s:a=l-s,o.setDate(o.getDate()-a),new Date(e,n-1,o.getDate(),i)}function Lm(e,n,r={}){if(e==null)return null;if(typeof e=="number")return e;const i=r[e]??BC[e];return i==null?null:typeof i=="number"?i:n==null?null:n>i.dstStart(n.getFullYear())&&!(n>i.dstEnd(n.getFullYear()))?i.timezoneOffsetDuringDst:i.timezoneOffsetNonDst}const DC={day:0,second:0,millisecond:0};function Ke(e,n){let r=new Date(e);if(n.y&&(n.year=n.y,delete n.y),n.mo&&(n.month=n.mo,delete n.mo),n.M&&(n.month=n.M,delete n.M),n.w&&(n.week=n.w,delete n.w),n.d&&(n.day=n.d,delete n.d),n.h&&(n.hour=n.h,delete n.h),n.m&&(n.minute=n.m,delete n.m),n.s&&(n.second=n.s,delete n.s),n.ms&&(n.millisecond=n.ms,delete n.ms),"year"in n){const i=Math.floor(n.year);r.setFullYear(r.getFullYear()+i);const s=n.year-i;s>0&&(n.month=(n==null?void 0:n.month)??0,n.month+=s*12)}if("quarter"in n){const i=Math.floor(n.quarter);r.setMonth(r.getMonth()+i*3)}if("month"in n){const i=Math.floor(n.month);r.setMonth(r.getMonth()+i);const s=n.month-i;s>0&&(n.week=(n==null?void 0:n.week)??0,n.week+=s*4)}if("week"in n){const i=Math.floor(n.week);r.setDate(r.getDate()+i*7);const s=n.week-i;s>0&&(n.day=(n==null?void 0:n.day)??0,n.day+=Math.round(s*7))}if("day"in n){const i=Math.floor(n.day);r.setDate(r.getDate()+i);const s=n.day-i;s>0&&(n.hour=(n==null?void 0:n.hour)??0,n.hour+=Math.round(s*24))}if("hour"in n){const i=Math.floor(n.hour);r.setHours(r.getHours()+i);const s=n.hour-i;s>0&&(n.minute=(n==null?void 0:n.minute)??0,n.minute+=Math.round(s*60))}if("minute"in n){const i=Math.floor(n.minute);r.setMinutes(r.getMinutes()+i);const s=n.minute-i;s>0&&(n.second=(n==null?void 0:n.second)??0,n.second+=Math.round(s*60))}if("second"in n){const i=Math.floor(n.second);r.setSeconds(r.getSeconds()+i);const s=n.second-i;s>0&&(n.millisecond=(n==null?void 0:n.millisecond)??0,n.millisecond+=Math.round(s*1e3))}if("millisecond"in n){const i=Math.floor(n.millisecond);r.setMilliseconds(r.getMilliseconds()+i)}return r}function xo(e){const n={};for(const r in e)n[r]=-e[r];return n}class nn{constructor(n,r){X(this,"instant");X(this,"timezoneOffset");this.instant=n??new Date,this.timezoneOffset=r??null}static fromDate(n){return new nn(n)}static fromInput(n,r){if(n instanceof Date)return nn.fromDate(n);const i=(n==null?void 0:n.instant)??new Date,s=Lm(n==null?void 0:n.timezone,i,r);return new nn(i,s)}getDateWithAdjustedTimezone(){const n=new Date(this.instant);return this.timezoneOffset!==null&&n.setMinutes(n.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),n}getSystemTimezoneAdjustmentMinute(n,r){(!n||n.getTime()<0)&&(n=new Date);const i=-n.getTimezoneOffset(),s=r??this.timezoneOffset??i;return i-s}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}}class pe{constructor(n,r){X(this,"knownValues");X(this,"impliedValues");X(this,"reference");X(this,"_tags",new Set);if(this.reference=n,this.knownValues={},this.impliedValues={},r)for(const s in r)this.knownValues[s]=r[s];const i=n.getDateWithAdjustedTimezone();this.imply("day",i.getDate()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}static createRelativeFromReference(n,r=DC){let i=Ke(n.getDateWithAdjustedTimezone(),r);const s=new pe(n);return s.addTag("result/relativeDate"),"hour"in r||"minute"in r||"second"in r||"millisecond"in r?(s.addTag("result/relativeDateAndTime"),Im(s,i),xn(s,i),s.assign("timezoneOffset",n.getTimezoneOffset())):(rl(s,i),s.imply("timezoneOffset",n.getTimezoneOffset()),"day"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.assign("weekday",i.getDay())):"week"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.imply("weekday",i.getDay())):(s.imply("day",i.getDate()),"month"in r?(s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear())):(s.imply("month",i.getMonth()+1),"year"in r?s.assign("year",i.getFullYear()):s.imply("year",i.getFullYear())))),s}get(n){return n in this.knownValues?this.knownValues[n]:n in this.impliedValues?this.impliedValues[n]:null}isCertain(n){return n in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(n,r){return n in this.knownValues?this:(this.impliedValues[n]=r,this)}assign(n,r){return this.knownValues[n]=r,delete this.impliedValues[n],this}addDurationAsImplied(n){const r=this.dateWithoutTimezoneAdjustment(),i=Ke(r,n);return("day"in n||"week"in n||"month"in n||"year"in n)&&(this.delete(["day","weekday","month","year"]),this.imply("day",i.getDate()),this.imply("weekday",i.getDay()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear())),("second"in n||"minute"in n||"hour"in n)&&(this.delete(["second","minute","hour"]),this.imply("second",i.getSeconds()),this.imply("minute",i.getMinutes()),this.imply("hour",i.getHours())),this}delete(n){typeof n=="string"&&(n=[n]);for(const r of n)delete this.knownValues[r],delete this.impliedValues[r]}clone(){const n=new pe(this.reference);n.knownValues={},n.impliedValues={};for(const r in this.knownValues)n.knownValues[r]=this.knownValues[r];for(const r in this.impliedValues)n.impliedValues[r]=this.impliedValues[r];return n}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){const n=this.dateWithoutTimezoneAdjustment();return!(n.getFullYear()!==this.get("year")||n.getMonth()!==this.get("month")-1||n.getDate()!==this.get("day")||this.get("hour")!=null&&n.getHours()!=this.get("hour")||this.get("minute")!=null&&n.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {
|
|
1
|
+
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@qikdev/sdk")):typeof define=="function"&&define.amd?define(["exports","vue","@qikdev/sdk"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["@qikdev/vue-ui"]={},D.Vue,D.sdk))})(this,function(D,t,pn){"use strict";var C8=Object.defineProperty;var V8=(D,t,pn)=>t in D?C8(D,t,{enumerable:!0,configurable:!0,writable:!0,value:pn}):D[t]=pn;var X=(D,t,pn)=>V8(D,typeof t!="symbol"?t+"":t,pn);const og="0.5.13";class yn extends Error{}class ig extends yn{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class sg extends yn{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class lg extends yn{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class dr extends yn{}class _c extends yn{constructor(n){super(`Invalid unit ${n}`)}}class dt extends yn{}class Zt extends yn{constructor(){super("Zone is an abstract class")}}const F="numeric",gt="short",rt="long",ki={year:F,month:F,day:F},wc={year:F,month:gt,day:F},ag={year:F,month:gt,day:F,weekday:gt},bc={year:F,month:rt,day:F},xc={year:F,month:rt,day:F,weekday:rt},Cc={hour:F,minute:F},Vc={hour:F,minute:F,second:F},Ec={hour:F,minute:F,second:F,timeZoneName:gt},Nc={hour:F,minute:F,second:F,timeZoneName:rt},Tc={hour:F,minute:F,hourCycle:"h23"},Sc={hour:F,minute:F,second:F,hourCycle:"h23"},Bc={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:gt},Dc={hour:F,minute:F,second:F,hourCycle:"h23",timeZoneName:rt},Oc={year:F,month:F,day:F,hour:F,minute:F},Mc={year:F,month:F,day:F,hour:F,minute:F,second:F},Fc={year:F,month:gt,day:F,hour:F,minute:F},Ic={year:F,month:gt,day:F,hour:F,minute:F,second:F},cg={year:F,month:gt,day:F,weekday:gt,hour:F,minute:F},Ac={year:F,month:rt,day:F,hour:F,minute:F,timeZoneName:gt},Lc={year:F,month:rt,day:F,hour:F,minute:F,second:F,timeZoneName:gt},Rc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,timeZoneName:rt},Pc={year:F,month:rt,day:F,weekday:rt,hour:F,minute:F,second:F,timeZoneName:rt};function te(e){return typeof e>"u"}function gn(e){return typeof e=="number"}function vr(e){return typeof e=="number"&&e%1===0}function dg(e){return typeof e=="string"}function ug(e){return Object.prototype.toString.call(e)==="[object Date]"}function Uc(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function mg(e){return Array.isArray(e)?e:[e]}function $c(e,n,r){if(e.length!==0)return e.reduce((i,s)=>{const o=[n(s),s];return i&&r(i[0],o[0])===i[0]?i:o},null)[1]}function fg(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function Rn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function Wt(e,n,r){return vr(e)&&e>=n&&e<=r}function hg(e,n){return e-n*Math.floor(e/n)}function Ne(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Xt(e){if(!(te(e)||e===null||e===""))return parseInt(e,10)}function kn(e){if(!(te(e)||e===null||e===""))return parseFloat(e)}function _i(e){if(!(te(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function wi(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function ur(e){return e%4===0&&(e%100!==0||e%400===0)}function mr(e){return ur(e)?366:365}function eo(e,n){const r=hg(n-1,12)+1,i=e+(n-r)/12;return r===2?ur(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function bi(e){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(n=new Date(n),n.setUTCFullYear(n.getUTCFullYear()-1900)),+n}function to(e){const n=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return n===4||i===3?53:52}function xi(e){return e>99?e:e>60?1900+e:2e3+e}function zc(e,n,r,i=null){const s=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const l={timeZoneName:n,...o},a=new Intl.DateTimeFormat(r,l).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function no(e,n){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(n,10)||0,s=r<0||Object.is(r,-0)?-i:i;return r*60+s}function jc(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new dt(`Invalid unit value ${e}`);return n}function ro(e,n){const r={};for(const i in e)if(Rn(e,i)){const s=e[i];if(s==null)continue;r[n(i)]=jc(s)}return r}function fr(e,n){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(n){case"short":return`${s}${Ne(r,2)}:${Ne(i,2)}`;case"narrow":return`${s}${r}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ne(r,2)}${Ne(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function oo(e){return fg(e,["hour","minute","second","millisecond"])}const qc=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,pg=["January","February","March","April","May","June","July","August","September","October","November","December"],Wc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yg=["J","F","M","A","M","J","J","A","S","O","N","D"];function Hc(e){switch(e){case"narrow":return[...yg];case"short":return[...Wc];case"long":return[...pg];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Gc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Yc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gg=["M","T","W","T","F","S","S"];function Kc(e){switch(e){case"narrow":return[...gg];case"short":return[...Yc];case"long":return[...Gc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Jc=["AM","PM"],kg=["Before Christ","Anno Domini"],_g=["BC","AD"],wg=["B","A"];function Zc(e){switch(e){case"narrow":return[...wg];case"short":return[..._g];case"long":return[...kg];default:return null}}function bg(e){return Jc[e.hour<12?0:1]}function xg(e,n){return Kc(n)[e.weekday-1]}function Cg(e,n){return Hc(n)[e.month-1]}function Vg(e,n){return Zc(n)[e.year<0?0:1]}function Eg(e,n,r="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){const u=e==="days";switch(n){case 1:return u?"tomorrow":`next ${s[e][0]}`;case-1:return u?"yesterday":`last ${s[e][0]}`;case 0:return u?"today":`this ${s[e][0]}`}}const l=Object.is(n,-0)||n<0,a=Math.abs(n),c=a===1,d=s[e],m=i?c?d[1]:d[2]||d[1]:c?s[e][0]:e;return l?`${a} ${m} ago`:`in ${a} ${m}`}function Xc(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const Ng={D:ki,DD:wc,DDD:bc,DDDD:xc,t:Cc,tt:Vc,ttt:Ec,tttt:Nc,T:Tc,TT:Sc,TTT:Bc,TTTT:Dc,f:Oc,ff:Fc,fff:Ac,ffff:Rc,F:Mc,FF:Ic,FFF:Lc,FFFF:Pc};class Ye{static create(n,r={}){return new Ye(n,r)}static parseFormat(n){let r=null,i="",s=!1;const o=[];for(let l=0;l<n.length;l++){const a=n.charAt(l);a==="'"?(i.length>0&&o.push({literal:s,val:i}),r=null,i="",s=!s):s||a===r?i+=a:(i.length>0&&o.push({literal:!1,val:i}),i=a,r=a)}return i.length>0&&o.push({literal:s,val:i}),o}static macroTokenToFormatOpts(n){return Ng[n]}constructor(n,r){this.opts=r,this.loc=n,this.systemLoc=null}formatWithSystemDefault(n,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTime(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).format()}formatDateTimeParts(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).formatToParts()}resolvedOptions(n,r={}){return this.loc.dtFormatter(n,{...this.opts,...r}).resolvedOptions()}num(n,r=0){if(this.opts.forceSimple)return Ne(n,r);const i={...this.opts};return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(n)}formatDateTimeFromString(n,r){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(h,y)=>this.loc.extract(n,h,y),l=h=>n.isOffsetFixed&&n.offset===0&&h.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,h.format):"",a=()=>i?bg(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(h,y)=>i?Cg(n,h):o(y?{month:h}:{month:h,day:"numeric"},"month"),d=(h,y)=>i?xg(n,h):o(y?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),m=h=>{const y=Ye.macroTokenToFormatOpts(h);return y?this.formatWithSystemDefault(n,y):h},u=h=>i?Vg(n,h):o({era:h},"era"),f=h=>{switch(h){case"S":return this.num(n.millisecond);case"u":case"SSS":return this.num(n.millisecond,3);case"s":return this.num(n.second);case"ss":return this.num(n.second,2);case"uu":return this.num(Math.floor(n.millisecond/10),2);case"uuu":return this.num(Math.floor(n.millisecond/100));case"m":return this.num(n.minute);case"mm":return this.num(n.minute,2);case"h":return this.num(n.hour%12===0?12:n.hour%12);case"hh":return this.num(n.hour%12===0?12:n.hour%12,2);case"H":return this.num(n.hour);case"HH":return this.num(n.hour,2);case"Z":return l({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return l({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return l({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:this.loc.locale});case"z":return n.zoneName;case"a":return a();case"d":return s?o({day:"numeric"},"day"):this.num(n.day);case"dd":return s?o({day:"2-digit"},"day"):this.num(n.day,2);case"c":return this.num(n.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(n.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?o({month:"numeric",day:"numeric"},"month"):this.num(n.month);case"LL":return s?o({month:"2-digit",day:"numeric"},"month"):this.num(n.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?o({month:"numeric"},"month"):this.num(n.month);case"MM":return s?o({month:"2-digit"},"month"):this.num(n.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?o({year:"numeric"},"year"):this.num(n.year);case"yy":return s?o({year:"2-digit"},"year"):this.num(n.year.toString().slice(-2),2);case"yyyy":return s?o({year:"numeric"},"year"):this.num(n.year,4);case"yyyyyy":return s?o({year:"numeric"},"year"):this.num(n.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(n.weekYear.toString().slice(-2),2);case"kkkk":return this.num(n.weekYear,4);case"W":return this.num(n.weekNumber);case"WW":return this.num(n.weekNumber,2);case"o":return this.num(n.ordinal);case"ooo":return this.num(n.ordinal,3);case"q":return this.num(n.quarter);case"qq":return this.num(n.quarter,2);case"X":return this.num(Math.floor(n.ts/1e3));case"x":return this.num(n.ts);default:return m(h)}};return Xc(Ye.parseFormat(r),f)}formatDurationFromString(n,r){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>d=>{const m=i(d);return m?this.num(c.get(m),d.length):d},o=Ye.parseFormat(r),l=o.reduce((c,{literal:d,val:m})=>d?c:c.concat(m),[]),a=n.shiftTo(...l.map(i).filter(c=>c));return Xc(o,s(a))}}class kt{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class hr{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(n,r){throw new Zt}formatOffset(n,r){throw new Zt}offset(n){throw new Zt}equals(n){throw new Zt}get isValid(){throw new Zt}}let Ci=null;class Vi extends hr{static get instance(){return Ci===null&&(Ci=new Vi),Ci}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return zc(n,r,i)}formatOffset(n,r){return fr(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let io={};function Tg(e){return io[e]||(io[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),io[e]}const Sg={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Bg(e,n){const r=e.format(n).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,s,o,l,a,c,d,m]=i;return[l,s,o,a,c,d,m]}function Dg(e,n){const r=e.formatToParts(n),i=[];for(let s=0;s<r.length;s++){const{type:o,value:l}=r[s],a=Sg[o];o==="era"?i[a]=l:te(a)||(i[a]=parseInt(l,10))}return i}let so={};class Ht extends hr{static create(n){return so[n]||(so[n]=new Ht(n)),so[n]}static resetCache(){so={},io={}}static isValidSpecifier(n){return this.isValidZone(n)}static isValidZone(n){if(!n)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}).format(),!0}catch{return!1}}constructor(n){super(),this.zoneName=n,this.valid=Ht.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return zc(n,r,i,this.name)}formatOffset(n,r){return fr(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=Tg(this.name);let[s,o,l,a,c,d,m]=i.formatToParts?Dg(i,r):Bg(i,r);a==="BC"&&(s=-Math.abs(s)+1);const f=bi({year:s,month:o,day:l,hour:c===24?0:c,minute:d,second:m,millisecond:0});let h=+r;const y=h%1e3;return h-=y>=0?y:1e3+y,(f-h)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let Ei=null;class qe extends hr{static get utcInstance(){return Ei===null&&(Ei=new qe(0)),Ei}static instance(n){return n===0?qe.utcInstance:new qe(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new qe(no(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${fr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${fr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return fr(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(n){return n.type==="fixed"&&n.fixed===this.fixed}get isValid(){return!0}}class Og extends hr{constructor(n){super(),this.zoneName=n}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Qt(e,n){if(te(e)||e===null)return n;if(e instanceof hr)return e;if(dg(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?qe.utcInstance:qe.parseSpecifier(r)||Ht.create(e)}else return gn(e)?qe.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new Og(e)}let Qc=()=>Date.now(),vc="system",ed=null,td=null,nd=null,rd;class Me{static get now(){return Qc}static set now(n){Qc=n}static set defaultZone(n){vc=n}static get defaultZone(){return Qt(vc,Vi.instance)}static get defaultLocale(){return ed}static set defaultLocale(n){ed=n}static get defaultNumberingSystem(){return td}static set defaultNumberingSystem(n){td=n}static get defaultOutputCalendar(){return nd}static set defaultOutputCalendar(n){nd=n}static get throwOnInvalid(){return rd}static set throwOnInvalid(n){rd=n}static resetCaches(){we.resetCache(),Ht.resetCache()}}let od={};function Mg(e,n={}){const r=JSON.stringify([e,n]);let i=od[r];return i||(i=new Intl.ListFormat(e,n),od[r]=i),i}let Ni={};function Ti(e,n={}){const r=JSON.stringify([e,n]);let i=Ni[r];return i||(i=new Intl.DateTimeFormat(e,n),Ni[r]=i),i}let Si={};function Fg(e,n={}){const r=JSON.stringify([e,n]);let i=Si[r];return i||(i=new Intl.NumberFormat(e,n),Si[r]=i),i}let Bi={};function Ig(e,n={}){const{base:r,...i}=n,s=JSON.stringify([e,i]);let o=Bi[s];return o||(o=new Intl.RelativeTimeFormat(e,n),Bi[s]=o),o}let pr=null;function Ag(){return pr||(pr=new Intl.DateTimeFormat().resolvedOptions().locale,pr)}function Lg(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=Ti(e).resolvedOptions()}catch{r=Ti(i).resolvedOptions()}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Rg(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function Pg(e){const n=[];for(let r=1;r<=12;r++){const i=b.utc(2016,r,1);n.push(e(i))}return n}function Ug(e){const n=[];for(let r=1;r<=7;r++){const i=b.utc(2016,11,13+r);n.push(e(i))}return n}function lo(e,n,r,i,s){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):s(n)}function $g(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class zg{constructor(n,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:o,...l}=i;if(!r||Object.keys(l).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=Fg(n,a)}}format(n){if(this.inf){const r=this.floor?Math.floor(n):n;return this.inf.format(r)}else{const r=this.floor?Math.floor(n):wi(n,3);return Ne(r,this.padTo)}}}class jg{constructor(n,r,i){this.opts=i;let s;if(n.zone.isUniversal){const l=-1*(n.offset/60),a=l>=0?`Etc/GMT+${l}`:`Etc/GMT${l}`;n.offset!==0&&Ht.create(a).valid?(s=a,this.dt=n):(s="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:b.fromMillis(n.ts+n.offset*60*1e3))}else n.zone.type==="system"?this.dt=n:(this.dt=n,s=n.zone.name);const o={...this.opts};s&&(o.timeZone=s),this.dtf=Ti(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class qg{constructor(n,r,i){this.opts={style:"long",...i},!r&&Uc()&&(this.rtf=Ig(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):Eg(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class we{static fromOpts(n){return we.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,s=!1){const o=n||Me.defaultLocale,l=o||(s?"en-US":Ag()),a=r||Me.defaultNumberingSystem,c=i||Me.defaultOutputCalendar;return new we(l,a,c,o)}static resetCache(){pr=null,Ni={},Si={},Bi={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return we.create(n,r,i)}constructor(n,r,i,s){const[o,l,a]=Lg(n);this.locale=o,this.numberingSystem=r||l||null,this.outputCalendar=i||a||null,this.intl=Rg(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=$g(this)),this.fastNumbersCached}listingMode(){const n=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&r?"en":"intl"}clone(n){return!n||Object.getOwnPropertyNames(n).length===0?this:we.create(n.locale||this.specifiedLocale,n.numberingSystem||this.numberingSystem,n.outputCalendar||this.outputCalendar,n.defaultToEN||!1)}redefaultToEN(n={}){return this.clone({...n,defaultToEN:!0})}redefaultToSystem(n={}){return this.clone({...n,defaultToEN:!1})}months(n,r=!1,i=!0){return lo(this,n,i,Hc,()=>{const s=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=Pg(l=>this.extract(l,s,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return lo(this,n,i,Kc,()=>{const s=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},o=r?"format":"standalone";return this.weekdaysCache[o][n]||(this.weekdaysCache[o][n]=Ug(l=>this.extract(l,s,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return lo(this,void 0,n,()=>Jc,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return lo(this,n,r,Zc,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[n]})}extract(n,r,i){const s=this.dtFormatter(n,r),o=s.formatToParts(),l=o.find(a=>a.type.toLowerCase()===i);return l?l.value:null}numberFormatter(n={}){return new zg(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new jg(n,this.intl,r)}relFormatter(n={}){return new qg(this.intl,this.isEnglish(),n)}listFormatter(n={}){return Mg(this.intl,n)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(n){return this.locale===n.locale&&this.numberingSystem===n.numberingSystem&&this.outputCalendar===n.outputCalendar}}function Pn(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function Un(...e){return n=>e.reduce(([r,i,s],o)=>{const[l,a,c]=o(n,s);return[{...r,...l},a||i,c]},[{},null,1]).slice(0,2)}function $n(e,...n){if(e==null)return[null,null];for(const[r,i]of n){const s=r.exec(e);if(s)return i(s)}return[null,null]}function id(...e){return(n,r)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Xt(n[r+s]);return[i,null,r+s]}}const sd=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Wg=`(?:${sd.source}?(?:\\[(${qc.source})\\])?)?`,Di=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ld=RegExp(`${Di.source}${Wg}`),Oi=RegExp(`(?:T${ld.source})?`),Hg=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Gg=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Yg=/(\d{4})-?(\d{3})/,Kg=id("weekYear","weekNumber","weekDay"),Jg=id("year","ordinal"),Zg=/(\d{4})-(\d\d)-(\d\d)/,ad=RegExp(`${Di.source} ?(?:${sd.source}|(${qc.source}))?`),Xg=RegExp(`(?: ${ad.source})?`);function zn(e,n,r){const i=e[n];return te(i)?r:Xt(i)}function Qg(e,n){return[{year:zn(e,n),month:zn(e,n+1,1),day:zn(e,n+2,1)},null,n+3]}function jn(e,n){return[{hours:zn(e,n,0),minutes:zn(e,n+1,0),seconds:zn(e,n+2,0),milliseconds:_i(e[n+3])},null,n+4]}function yr(e,n){const r=!e[n]&&!e[n+1],i=no(e[n+1],e[n+2]),s=r?null:qe.instance(i);return[{},s,n+3]}function gr(e,n){const r=e[n]?Ht.create(e[n]):null;return[{},r,n+1]}const vg=RegExp(`^T?${Di.source}$`),ek=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function tk(e){const[n,r,i,s,o,l,a,c,d]=e,m=n[0]==="-",u=c&&c[0]==="-",f=(h,y=!1)=>h!==void 0&&(y||h&&m)?-h:h;return[{years:f(kn(r)),months:f(kn(i)),weeks:f(kn(s)),days:f(kn(o)),hours:f(kn(l)),minutes:f(kn(a)),seconds:f(kn(c),c==="-0"),milliseconds:f(_i(d),u)}]}const nk={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Mi(e,n,r,i,s,o,l){const a={year:n.length===2?xi(Xt(n)):Xt(n),month:Wc.indexOf(r)+1,day:Xt(i),hour:Xt(s),minute:Xt(o)};return l&&(a.second=Xt(l)),e&&(a.weekday=e.length>3?Gc.indexOf(e)+1:Yc.indexOf(e)+1),a}const rk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ok(e){const[,n,r,i,s,o,l,a,c,d,m,u]=e,f=Mi(n,s,i,r,o,l,a);let h;return c?h=nk[c]:d?h=0:h=no(m,u),[f,new qe(h)]}function ik(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const sk=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,lk=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ak=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function cd(e){const[,n,r,i,s,o,l,a]=e;return[Mi(n,s,i,r,o,l,a),qe.utcInstance]}function ck(e){const[,n,r,i,s,o,l,a]=e;return[Mi(n,a,r,i,s,o,l),qe.utcInstance]}const dk=Pn(Hg,Oi),uk=Pn(Gg,Oi),mk=Pn(Yg,Oi),fk=Pn(ld),dd=Un(Qg,jn,yr,gr),hk=Un(Kg,jn,yr,gr),pk=Un(Jg,jn,yr,gr),yk=Un(jn,yr,gr);function gk(e){return $n(e,[dk,dd],[uk,hk],[mk,pk],[fk,yk])}function kk(e){return $n(ik(e),[rk,ok])}function _k(e){return $n(e,[sk,cd],[lk,cd],[ak,ck])}function wk(e){return $n(e,[ek,tk])}const bk=Un(jn);function xk(e){return $n(e,[vg,bk])}const Ck=Pn(Zg,Xg),Vk=Pn(ad),Ek=Un(jn,yr,gr);function Nk(e){return $n(e,[Ck,dd],[Vk,Ek])}const Tk="Invalid Duration",ud={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Sk={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...ud},ut=146097/400,qn=146097/4800,Bk={years:{quarters:4,months:12,weeks:ut/7,days:ut,hours:ut*24,minutes:ut*24*60,seconds:ut*24*60*60,milliseconds:ut*24*60*60*1e3},quarters:{months:3,weeks:ut/28,days:ut/4,hours:ut*24/4,minutes:ut*24*60/4,seconds:ut*24*60*60/4,milliseconds:ut*24*60*60*1e3/4},months:{weeks:qn/7,days:qn,hours:qn*24,minutes:qn*24*60,seconds:qn*24*60*60,milliseconds:qn*24*60*60*1e3},...ud},_n=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Dk=_n.slice(0).reverse();function wn(e,n,r=!1){const i={values:r?n.values:{...e.values,...n.values||{}},loc:e.loc.clone(n.loc),conversionAccuracy:n.conversionAccuracy||e.conversionAccuracy};return new oe(i)}function Ok(e){return e<0?Math.floor(e):Math.ceil(e)}function md(e,n,r,i,s){const o=e[s][r],l=n[r]/o,a=Math.sign(l)===Math.sign(i[s]),c=!a&&i[s]!==0&&Math.abs(l)<=1?Ok(l):Math.trunc(l);i[s]+=c,n[r]-=c*o}function Mk(e,n){Dk.reduce((r,i)=>te(n[i])?r:(r&&md(e,n,r,n,i),i),null)}class oe{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||we.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?Bk:Sk,this.isLuxonDuration=!0}static fromMillis(n,r){return oe.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new dt(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new oe({values:ro(n,oe.normalizeUnit),loc:we.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(gn(n))return oe.fromMillis(n);if(oe.isDuration(n))return n;if(typeof n=="object")return oe.fromObject(n);throw new dt(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=wk(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=xk(n);return i?oe.fromObject(i,r):oe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Duration is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new lg(i);return new oe({invalid:i})}static normalizeUnit(n){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[n&&n.toLowerCase()];if(!r)throw new _c(n);return r}static isDuration(n){return n&&n.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(n,r={}){const i={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Ye.create(this.loc,i).formatDurationFromString(this,n):Tk}toHuman(n={}){const r=_n.map(i=>{const s=this.values[i];return te(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...n,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:n.listStyle||"narrow",...n}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let n="P";return this.years!==0&&(n+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(n+=this.months+this.quarters*3+"M"),this.weeks!==0&&(n+=this.weeks+"W"),this.days!==0&&(n+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(n+="T"),this.hours!==0&&(n+=this.hours+"H"),this.minutes!==0&&(n+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(n+=wi(this.seconds+this.milliseconds/1e3,3)+"S"),n==="P"&&(n+="T0S"),n}toISOTime(n={}){if(!this.isValid)return null;const r=this.toMillis();if(r<0||r>=864e5)return null;n={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...n};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=n.format==="basic"?"hhmm":"hh:mm";(!n.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=n.format==="basic"?"ss":":ss",(!n.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let o=i.toFormat(s);return n.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n),i={};for(const s of _n)(Rn(r.values,s)||Rn(this.values,s))&&(i[s]=r.get(s)+this.get(s));return wn(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return this.plus(r.negate())}mapUnits(n){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=jc(n(this.values[i],i));return wn(this,{values:r},!0)}get(n){return this[oe.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r={...this.values,...ro(n,oe.normalizeUnit)};return wn(this,{values:r})}reconfigure({locale:n,numberingSystem:r,conversionAccuracy:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r}),o={loc:s};return i&&(o.conversionAccuracy=i),wn(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return Mk(this.matrix,n),wn(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(l=>oe.normalizeUnit(l));const r={},i={},s=this.toObject();let o;for(const l of _n)if(n.indexOf(l)>=0){o=l;let a=0;for(const d in i)a+=this.matrix[d][l]*i[d],i[d]=0;gn(s[l])&&(a+=s[l]);const c=Math.trunc(a);r[l]=c,i[l]=(a*1e3-c*1e3)/1e3;for(const d in s)_n.indexOf(d)>_n.indexOf(l)&&md(this.matrix,s,d,r,l)}else gn(s[l])&&(i[l]=s[l]);for(const l in i)i[l]!==0&&(r[o]+=l===o?i[l]:i[l]/this.matrix[o][l]);return wn(this,{values:r},!0).normalize()}negate(){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=this.values[r]===0?0:-this.values[r];return wn(this,{values:n},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(n){if(!this.isValid||!n.isValid||!this.loc.equals(n.loc))return!1;function r(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of _n)if(!r(this.values[i],n.values[i]))return!1;return!0}}const kr="Invalid Interval";function Fk(e,n){return!e||!e.isValid?xe.invalid("missing or invalid start"):!n||!n.isValid?xe.invalid("missing or invalid end"):n<e?xe.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${n.toISO()}`):null}class xe{constructor(n){this.s=n.start,this.e=n.end,this.invalid=n.invalid||null,this.isLuxonInterval=!0}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the Interval is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new sg(i);return new xe({invalid:i})}static fromDateTimes(n,r){const i=br(n),s=br(r),o=Fk(i,s);return o??new xe({start:i,end:s})}static after(n,r){const i=oe.fromDurationLike(r),s=br(n);return xe.fromDateTimes(s,s.plus(i))}static before(n,r){const i=oe.fromDurationLike(r),s=br(n);return xe.fromDateTimes(s.minus(i),s)}static fromISO(n,r){const[i,s]=(n||"").split("/",2);if(i&&s){let o,l;try{o=b.fromISO(i,r),l=o.isValid}catch{l=!1}let a,c;try{a=b.fromISO(s,r),c=a.isValid}catch{c=!1}if(l&&c)return xe.fromDateTimes(o,a);if(l){const d=oe.fromISO(s,r);if(d.isValid)return xe.after(o,d)}else if(c){const d=oe.fromISO(i,r);if(d.isValid)return xe.before(a,d)}}return xe.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static isInterval(n){return n&&n.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(n="milliseconds"){return this.isValid?this.toDuration(n).get(n):NaN}count(n="milliseconds"){if(!this.isValid)return NaN;const r=this.start.startOf(n),i=this.end.startOf(n);return Math.floor(i.diff(r,n).get(n))+1}hasSame(n){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,n):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(n){return this.isValid?this.s>n:!1}isBefore(n){return this.isValid?this.e<=n:!1}contains(n){return this.isValid?this.s<=n&&this.e>n:!1}set({start:n,end:r}={}){return this.isValid?xe.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(br).filter(l=>this.contains(l)).sort(),i=[];let{s}=this,o=0;for(;s<this.e;){const l=r[o]||this.e,a=+l>+this.e?this.e:l;i.push(xe.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(n){const r=oe.fromDurationLike(n);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,s=1,o;const l=[];for(;i<this.e;){const a=this.start.plus(r.mapUnits(c=>c*s));o=+a>+this.e?this.e:a,l.push(xe.fromDateTimes(i,o)),i=o,s+=1}return l}divideEqually(n){return this.isValid?this.splitBy(this.length()/n).slice(0,n):[]}overlaps(n){return this.e>n.s&&this.s<n.e}abutsStart(n){return this.isValid?+this.e==+n.s:!1}abutsEnd(n){return this.isValid?+n.e==+this.s:!1}engulfs(n){return this.isValid?this.s<=n.s&&this.e>=n.e:!1}equals(n){return!this.isValid||!n.isValid?!1:this.s.equals(n.s)&&this.e.equals(n.e)}intersection(n){if(!this.isValid)return this;const r=this.s>n.s?this.s:n.s,i=this.e<n.e?this.e:n.e;return r>=i?null:xe.fromDateTimes(r,i)}union(n){if(!this.isValid)return this;const r=this.s<n.s?this.s:n.s,i=this.e>n.e?this.e:n.e;return xe.fromDateTimes(r,i)}static merge(n){const[r,i]=n.sort((s,o)=>s.s-o.s).reduce(([s,o],l)=>o?o.overlaps(l)||o.abutsStart(l)?[s,o.union(l)]:[s.concat([o]),l]:[s,l],[[],null]);return i&&r.push(i),r}static xor(n){let r=null,i=0;const s=[],o=n.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),l=Array.prototype.concat(...o),a=l.sort((c,d)=>c.time-d.time);for(const c of a)i+=c.type==="s"?1:-1,i===1?r=c.time:(r&&+r!=+c.time&&s.push(xe.fromDateTimes(r,c.time)),r=null);return xe.merge(s)}difference(...n){return xe.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:kr}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:kr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:kr}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:kr}toFormat(n,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:kr}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):oe.invalid(this.invalidReason)}mapEndpoints(n){return xe.fromDateTimes(n(this.s),n(this.e))}}let ao=class{static hasDST(n=Me.defaultZone){const r=b.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return Ht.isValidZone(n)}static normalizeZone(n){return Qt(n,Me.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||we.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||we.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return we.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return we.create(r,null,"gregory").eras(n)}static features(){return{relative:Uc()}}};function fd(e,n){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(oe.fromMillis(i).as("days"))}function Ik(e,n,r){const i=[["years",(a,c)=>c.year-a.year],["quarters",(a,c)=>c.quarter-a.quarter],["months",(a,c)=>c.month-a.month+(c.year-a.year)*12],["weeks",(a,c)=>{const d=fd(a,c);return(d-d%7)/7}],["days",fd]],s={};let o,l;for(const[a,c]of i)if(r.indexOf(a)>=0){o=a;let d=c(e,n);l=e.plus({[a]:d}),l>n?(e=e.plus({[a]:d-1}),d-=1):e=l,s[a]=d}return[e,s,l,o]}function Ak(e,n,r,i){let[s,o,l,a]=Ik(e,n,r);const c=n-s,d=r.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);d.length===0&&(l<n&&(l=s.plus({[a]:1})),l!==s&&(o[a]=(o[a]||0)+c/(l-s)));const m=oe.fromObject(o,i);return d.length>0?oe.fromMillis(c,i).shiftTo(...d).plus(m):m}const Fi={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},hd={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Lk=Fi.hanidec.replace(/[\[|\]]/g,"").split("");function Rk(e){let n=parseInt(e,10);if(isNaN(n)){n="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(Fi.hanidec)!==-1)n+=Lk.indexOf(e[r]);else for(const s in hd){const[o,l]=hd[s];i>=o&&i<=l&&(n+=i-o)}}return parseInt(n,10)}else return n}function _t({numberingSystem:e},n=""){return new RegExp(`${Fi[e||"latn"]}${n}`)}const Pk="missing Intl.DateTimeFormat.formatToParts support";function le(e,n=r=>r){return{regex:e,deser:([r])=>n(Rk(r))}}const pd="[ ]",yd=new RegExp(pd,"g");function Uk(e){return e.replace(/\./g,"\\.?").replace(yd,pd)}function gd(e){return e.replace(/\./g,"").replace(yd," ").toLowerCase()}function wt(e,n){return e===null?null:{regex:RegExp(e.map(Uk).join("|")),deser:([r])=>e.findIndex(i=>gd(r)===gd(i))+n}}function kd(e,n){return{regex:e,deser:([,r,i])=>no(r,i),groups:n}}function Ii(e){return{regex:e,deser:([n])=>n}}function $k(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function zk(e,n){const r=_t(n),i=_t(n,"{2}"),s=_t(n,"{3}"),o=_t(n,"{4}"),l=_t(n,"{6}"),a=_t(n,"{1,2}"),c=_t(n,"{1,3}"),d=_t(n,"{1,6}"),m=_t(n,"{1,9}"),u=_t(n,"{2,4}"),f=_t(n,"{4,6}"),h=_=>({regex:RegExp($k(_.val)),deser:([k])=>k,literal:!0}),p=(_=>{if(e.literal)return h(_);switch(_.val){case"G":return wt(n.eras("short",!1),0);case"GG":return wt(n.eras("long",!1),0);case"y":return le(d);case"yy":return le(u,xi);case"yyyy":return le(o);case"yyyyy":return le(f);case"yyyyyy":return le(l);case"M":return le(a);case"MM":return le(i);case"MMM":return wt(n.months("short",!0,!1),1);case"MMMM":return wt(n.months("long",!0,!1),1);case"L":return le(a);case"LL":return le(i);case"LLL":return wt(n.months("short",!1,!1),1);case"LLLL":return wt(n.months("long",!1,!1),1);case"d":return le(a);case"dd":return le(i);case"o":return le(c);case"ooo":return le(s);case"HH":return le(i);case"H":return le(a);case"hh":return le(i);case"h":return le(a);case"mm":return le(i);case"m":return le(a);case"q":return le(a);case"qq":return le(i);case"s":return le(a);case"ss":return le(i);case"S":return le(c);case"SSS":return le(s);case"u":return Ii(m);case"uu":return Ii(a);case"uuu":return le(r);case"a":return wt(n.meridiems(),0);case"kkkk":return le(o);case"kk":return le(u,xi);case"W":return le(a);case"WW":return le(i);case"E":case"c":return le(r);case"EEE":return wt(n.weekdays("short",!1,!1),1);case"EEEE":return wt(n.weekdays("long",!1,!1),1);case"ccc":return wt(n.weekdays("short",!0,!1),1);case"cccc":return wt(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return kd(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return kd(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Ii(/[a-z_+-/]{1,256}?/i);default:return h(_)}})(e)||{invalidReason:Pk};return p.token=e,p}const jk={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function qk(e,n,r){const{type:i,value:s}=e;if(i==="literal")return{literal:!0,val:s};const o=r[i];let l=jk[i];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function Wk(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function Hk(e,n,r){const i=e.match(n);if(i){const s={};let o=1;for(const l in r)if(Rn(r,l)){const a=r[l],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(o,o+c))),o+=c}return[i,s]}else return[i,{}]}function Gk(e){const n=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return te(e.z)||(r=Ht.create(e.z)),te(e.Z)||(r||(r=new qe(e.Z)),i=e.Z),te(e.q)||(e.M=(e.q-1)*3+1),te(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),te(e.u)||(e.S=_i(e.u)),[Object.keys(e).reduce((o,l)=>{const a=n(l);return a&&(o[a]=e[l]),o},{}),r,i]}let Ai=null;function Yk(){return Ai||(Ai=b.fromMillis(1555555555555)),Ai}function Kk(e,n){if(e.literal)return e;const r=Ye.macroTokenToFormatOpts(e.val);if(!r)return e;const o=Ye.create(n,r).formatDateTimeParts(Yk()).map(l=>qk(l,n,r));return o.includes(void 0)?e:o}function Jk(e,n){return Array.prototype.concat(...e.map(r=>Kk(r,n)))}function _d(e,n,r){const i=Jk(Ye.parseFormat(r),e),s=i.map(l=>zk(l,e)),o=s.find(l=>l.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[l,a]=Wk(s),c=RegExp(l,"i"),[d,m]=Hk(n,c,a),[u,f,h]=m?Gk(m):[null,null,void 0];if(Rn(m,"a")&&Rn(m,"H"))throw new dr("Can't include meridiem when specifying 24-hour format");return{input:n,tokens:i,regex:c,rawMatches:d,matches:m,result:u,zone:f,specificOffset:h}}}function Zk(e,n,r){const{result:i,zone:s,specificOffset:o,invalidReason:l}=_d(e,n,r);return[i,s,o,l]}const wd=[0,31,59,90,120,151,181,212,243,273,304,334],bd=[0,31,60,91,121,152,182,213,244,274,305,335];function mt(e,n){return new kt("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function xd(e,n,r){const i=new Date(Date.UTC(e,n-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Cd(e,n,r){return r+(ur(e)?bd:wd)[n-1]}function Vd(e,n){const r=ur(e)?bd:wd,i=r.findIndex(o=>o<n),s=n-r[i];return{month:i+1,day:s}}function Li(e){const{year:n,month:r,day:i}=e,s=Cd(n,r,i),o=xd(n,r,i);let l=Math.floor((s-o+10)/7),a;return l<1?(a=n-1,l=to(a)):l>to(n)?(a=n+1,l=1):a=n,{weekYear:a,weekNumber:l,weekday:o,...oo(e)}}function Ed(e){const{weekYear:n,weekNumber:r,weekday:i}=e,s=xd(n,1,4),o=mr(n);let l=r*7+i-s-3,a;l<1?(a=n-1,l+=mr(a)):l>o?(a=n+1,l-=mr(n)):a=n;const{month:c,day:d}=Vd(a,l);return{year:a,month:c,day:d,...oo(e)}}function Ri(e){const{year:n,month:r,day:i}=e,s=Cd(n,r,i);return{year:n,ordinal:s,...oo(e)}}function Nd(e){const{year:n,ordinal:r}=e,{month:i,day:s}=Vd(n,r);return{year:n,month:i,day:s,...oo(e)}}function Xk(e){const n=vr(e.weekYear),r=Wt(e.weekNumber,1,to(e.weekYear)),i=Wt(e.weekday,1,7);return n?r?i?!1:mt("weekday",e.weekday):mt("week",e.week):mt("weekYear",e.weekYear)}function Qk(e){const n=vr(e.year),r=Wt(e.ordinal,1,mr(e.year));return n?r?!1:mt("ordinal",e.ordinal):mt("year",e.year)}function Td(e){const n=vr(e.year),r=Wt(e.month,1,12),i=Wt(e.day,1,eo(e.year,e.month));return n?r?i?!1:mt("day",e.day):mt("month",e.month):mt("year",e.year)}function Sd(e){const{hour:n,minute:r,second:i,millisecond:s}=e,o=Wt(n,0,23)||n===24&&r===0&&i===0&&s===0,l=Wt(r,0,59),a=Wt(i,0,59),c=Wt(s,0,999);return o?l?a?c?!1:mt("millisecond",s):mt("second",i):mt("minute",r):mt("hour",n)}const Pi="Invalid DateTime",Bd=864e13;function co(e){return new kt("unsupported zone",`the zone "${e.name}" is not supported`)}function Ui(e){return e.weekData===null&&(e.weekData=Li(e.c)),e.weekData}function _r(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new b({...r,...n,old:r})}function Dd(e,n,r){let i=e-n*60*1e3;const s=r.offset(i);if(n===s)return[i,n];i-=(s-n)*60*1e3;const o=r.offset(i);return s===o?[i,s]:[e-Math.min(s,o)*60*1e3,Math.max(s,o)]}function Od(e,n){e+=n*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function uo(e,n,r){return Dd(bi(e),n,r)}function Md(e,n){const r=e.o,i=e.c.year+Math.trunc(n.years),s=e.c.month+Math.trunc(n.months)+Math.trunc(n.quarters)*3,o={...e.c,year:i,month:s,day:Math.min(e.c.day,eo(i,s))+Math.trunc(n.days)+Math.trunc(n.weeks)*7},l=oe.fromObject({years:n.years-Math.trunc(n.years),quarters:n.quarters-Math.trunc(n.quarters),months:n.months-Math.trunc(n.months),weeks:n.weeks-Math.trunc(n.weeks),days:n.days-Math.trunc(n.days),hours:n.hours,minutes:n.minutes,seconds:n.seconds,milliseconds:n.milliseconds}).as("milliseconds"),a=bi(o);let[c,d]=Dd(a,r,e.zone);return l!==0&&(c+=l,d=e.zone.offset(c)),{ts:c,o:d}}function wr(e,n,r,i,s,o){const{setZone:l,zone:a}=r;if(e&&Object.keys(e).length!==0){const c=n||a,d=b.fromObject(e,{...r,zone:c,specificOffset:o});return l?d:d.setZone(a)}else return b.invalid(new kt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function mo(e,n,r=!0){return e.isValid?Ye.create(we.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function $i(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Ne(e.c.year,r?6:4),n?(i+="-",i+=Ne(e.c.month),i+="-",i+=Ne(e.c.day)):(i+=Ne(e.c.month),i+=Ne(e.c.day)),i}function Fd(e,n,r,i,s,o){let l=Ne(e.c.hour);return n?(l+=":",l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=":")):l+=Ne(e.c.minute),(e.c.second!==0||!r)&&(l+=Ne(e.c.second),(e.c.millisecond!==0||!i)&&(l+=".",l+=Ne(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!o?l+="Z":e.o<0?(l+="-",l+=Ne(Math.trunc(-e.o/60)),l+=":",l+=Ne(Math.trunc(-e.o%60))):(l+="+",l+=Ne(Math.trunc(e.o/60)),l+=":",l+=Ne(Math.trunc(e.o%60)))),o&&(l+="["+e.zone.ianaName+"]"),l}const Id={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},vk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},e_={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ad=["year","month","day","hour","minute","second","millisecond"],t_=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],n_=["year","ordinal","hour","minute","second","millisecond"];function Ld(e){const n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!n)throw new _c(e);return n}function Rd(e,n){const r=Qt(n.zone,Me.defaultZone),i=we.fromObject(n),s=Me.now();let o,l;if(te(e.year))o=s;else{for(const d of Ad)te(e[d])&&(e[d]=Id[d]);const a=Td(e)||Sd(e);if(a)return b.invalid(a);const c=r.offset(s);[o,l]=uo(e,c,r)}return new b({ts:o,zone:r,loc:i,o:l})}function Pd(e,n,r){const i=te(r.round)?!0:r.round,s=(l,a)=>(l=wi(l,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(l,a)),o=l=>r.calendary?n.hasSame(e,l)?0:n.startOf(l).diff(e.startOf(l),l).get(l):n.diff(e,l).get(l);if(r.unit)return s(o(r.unit),r.unit);for(const l of r.units){const a=o(l);if(Math.abs(a)>=1)return s(a,l)}return s(e>n?-0:0,r.units[r.units.length-1])}function Ud(e){let n={},r;return e.length>0&&typeof e[e.length-1]=="object"?(n=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[n,r]}class b{constructor(n){const r=n.zone||Me.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new kt("invalid input"):null)||(r.isValid?null:co(r));this.ts=te(n.ts)?Me.now():n.ts;let s=null,o=null;if(!i)if(n.old&&n.old.ts===this.ts&&n.old.zone.equals(r))[s,o]=[n.old.c,n.old.o];else{const a=r.offset(this.ts);s=Od(this.ts,a),i=Number.isNaN(s.year)?new kt("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=r,this.loc=n.loc||we.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[n,r]=Ud(arguments),[i,s,o,l,a,c,d]=r;return Rd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static utc(){const[n,r]=Ud(arguments),[i,s,o,l,a,c,d]=r;return n.zone=qe.utcInstance,Rd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=ug(n)?n.valueOf():NaN;if(Number.isNaN(i))return b.invalid("invalid input");const s=Qt(r.zone,Me.defaultZone);return s.isValid?new b({ts:i,zone:s,loc:we.fromObject(r)}):b.invalid(co(s))}static fromMillis(n,r={}){if(gn(n))return n<-Bd||n>Bd?b.invalid("Timestamp out of range"):new b({ts:n,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(gn(n))return new b({ts:n*1e3,zone:Qt(r.zone,Me.defaultZone),loc:we.fromObject(r)});throw new dt("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=Qt(r.zone,Me.defaultZone);if(!i.isValid)return b.invalid(co(i));const s=Me.now(),o=te(r.specificOffset)?i.offset(s):r.specificOffset,l=ro(n,Ld),a=!te(l.ordinal),c=!te(l.year),d=!te(l.month)||!te(l.day),m=c||d,u=l.weekYear||l.weekNumber,f=we.fromObject(r);if((m||a)&&u)throw new dr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&a)throw new dr("Can't mix ordinal dates with month/day");const h=u||l.weekday&&!m;let y,p,_=Od(s,o);h?(y=t_,p=vk,_=Li(_)):a?(y=n_,p=e_,_=Ri(_)):(y=Ad,p=Id);let k=!1;for(const z of y){const L=l[z];te(L)?k?l[z]=p[z]:l[z]=_[z]:k=!0}const w=h?Xk(l):a?Qk(l):Td(l),S=w||Sd(l);if(S)return b.invalid(S);const I=h?Ed(l):a?Nd(l):l,[P,$]=uo(I,o,i),V=new b({ts:P,zone:i,o:$,loc:f});return l.weekday&&m&&n.weekday!==V.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${l.weekday} and a date of ${V.toISO()}`):V}static fromISO(n,r={}){const[i,s]=gk(n);return wr(i,s,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,s]=kk(n);return wr(i,s,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,s]=_k(n);return wr(i,s,r,"HTTP",r)}static fromFormat(n,r,i={}){if(te(n)||te(r))throw new dt("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,c,d,m]=Zk(l,n,r);return m?b.invalid(m):wr(a,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return b.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,s]=Nk(n);return wr(i,s,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new dt("need to specify a reason the DateTime is invalid");const i=n instanceof kt?n:new kt(n,r);if(Me.throwOnInvalid)throw new ig(i);return new b({invalid:i})}static isDateTime(n){return n&&n.isLuxonDateTime||!1}get(n){return this[n]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ui(this).weekYear:NaN}get weekNumber(){return this.isValid?Ui(this).weekNumber:NaN}get weekday(){return this.isValid?Ui(this).weekday:NaN}get ordinal(){return this.isValid?Ri(this.c).ordinal:NaN}get monthShort(){return this.isValid?ao.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ao.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ao.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ao.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return ur(this.year)}get daysInMonth(){return eo(this.year,this.month)}get daysInYear(){return this.isValid?mr(this.year):NaN}get weeksInWeekYear(){return this.isValid?to(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:s}=Ye.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:s}}toUTC(n=0,r={}){return this.setZone(qe.instance(n),r)}toLocal(){return this.setZone(Me.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=Qt(n,Me.defaultZone),n.equals(this.zone))return this;if(n.isValid){let s=this.ts;if(r||i){const o=n.offset(this.ts),l=this.toObject();[s]=uo(l,o,n)}return _r(this,{ts:s,zone:n})}else return b.invalid(co(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return _r(this,{loc:s})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=ro(n,Ld),i=!te(r.weekYear)||!te(r.weekNumber)||!te(r.weekday),s=!te(r.ordinal),o=!te(r.year),l=!te(r.month)||!te(r.day),a=o||l,c=r.weekYear||r.weekNumber;if((a||s)&&c)throw new dr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new dr("Can't mix ordinal dates with month/day");let d;i?d=Ed({...Li(this.c),...r}):te(r.ordinal)?(d={...this.toObject(),...r},te(r.day)&&(d.day=Math.min(eo(d.year,d.month),d.day))):d=Nd({...Ri(this.c),...r});const[m,u]=uo(d,this.o,this.zone);return _r(this,{ts:m,o:u})}plus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n);return _r(this,Md(this,r))}minus(n){if(!this.isValid)return this;const r=oe.fromDurationLike(n).negate();return _r(this,Md(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=oe.normalizeUnit(n);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks"&&(r.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(n){return this.isValid?this.plus({[n]:1}).startOf(n).minus(1):this}toFormat(n,r={}){return this.isValid?Ye.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Pi}toLocaleString(n=ki,r={}){return this.isValid?Ye.create(this.loc.clone(r),n).formatDateTime(this):Pi}toLocaleParts(n={}){return this.isValid?Ye.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const l=n==="extended";let a=$i(this,l);return a+="T",a+=Fd(this,l,r,i,s,o),a}toISODate({format:n="extended"}={}){return this.isValid?$i(this,n==="extended"):null}toISOWeekDate(){return mo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:o=!1,format:l="extended"}={}){return this.isValid?(s?"T":"")+Fd(this,l==="extended",r,n,i,o):null}toRFC2822(){return mo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?$i(this,!0):null}toSQLTime({includeOffset:n=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(r||n)&&(i&&(s+=" "),r?s+="z":n&&(s+="ZZ")),mo(this,s,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Pi}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(n={}){if(!this.isValid)return{};const r={...this.c};return n.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(n,r="milliseconds",i={}){if(!this.isValid||!n.isValid)return oe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=mg(r).map(oe.normalizeUnit),l=n.valueOf()>this.valueOf(),a=l?this:n,c=l?n:this,d=Ak(a,c,o,s);return l?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(b.now(),n,r)}until(n){return this.isValid?xe.fromDateTimes(this,n):this}hasSame(n,r){if(!this.isValid)return!1;const i=n.valueOf(),s=this.setZone(n.zone,{keepLocalTime:!0});return s.startOf(r)<=i&&i<=s.endOf(r)}equals(n){return this.isValid&&n.isValid&&this.valueOf()===n.valueOf()&&this.zone.equals(n.zone)&&this.loc.equals(n.loc)}toRelative(n={}){if(!this.isValid)return null;const r=n.base||b.fromObject({},{zone:this.zone}),i=n.padding?this<r?-n.padding:n.padding:0;let s=["years","months","days","hours","minutes","seconds"],o=n.unit;return Array.isArray(n.unit)&&(s=n.unit,o=void 0),Pd(r,this.plus(i),{...n,numeric:"always",units:s,unit:o})}toRelativeCalendar(n={}){return this.isValid?Pd(n.base||b.fromObject({},{zone:this.zone}),this,{...n,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...n){if(!n.every(b.isDateTime))throw new dt("min requires all arguments be DateTimes");return $c(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(b.isDateTime))throw new dt("max requires all arguments be DateTimes");return $c(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:s=null,numberingSystem:o=null}=i,l=we.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return _d(l,n,r)}static fromStringExplain(n,r,i={}){return b.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return ki}static get DATE_MED(){return wc}static get DATE_MED_WITH_WEEKDAY(){return ag}static get DATE_FULL(){return bc}static get DATE_HUGE(){return xc}static get TIME_SIMPLE(){return Cc}static get TIME_WITH_SECONDS(){return Vc}static get TIME_WITH_SHORT_OFFSET(){return Ec}static get TIME_WITH_LONG_OFFSET(){return Nc}static get TIME_24_SIMPLE(){return Tc}static get TIME_24_WITH_SECONDS(){return Sc}static get TIME_24_WITH_SHORT_OFFSET(){return Bc}static get TIME_24_WITH_LONG_OFFSET(){return Dc}static get DATETIME_SHORT(){return Oc}static get DATETIME_SHORT_WITH_SECONDS(){return Mc}static get DATETIME_MED(){return Fc}static get DATETIME_MED_WITH_SECONDS(){return Ic}static get DATETIME_MED_WITH_WEEKDAY(){return cg}static get DATETIME_FULL(){return Ac}static get DATETIME_FULL_WITH_SECONDS(){return Lc}static get DATETIME_HUGE(){return Rc}static get DATETIME_HUGE_WITH_SECONDS(){return Pc}}function br(e){if(b.isDateTime(e))return e;if(e&&e.valueOf&&gn(e.valueOf()))return b.fromJSDate(e);if(e&&typeof e=="object")return b.fromObject(e);throw new dt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ue={};ue.format=function(e,n){return e=e?new Date(e):new Date,b.fromJSDate(e).toFormat(n)},ue.readableTime=function(e){if(e=String(e||""),!e||!/^\d{4}$/.test(e))return e;const n=e.substring(0,2),r=e.substring(2,4);return console.log(e,n,r),b.fromObject({hour:parseInt(n,10),minute:parseInt(r,10)}).toFormat("h:mma").toLowerCase().replace(/:00/g,"")},ue.timeago=function(e,n){return b.fromJSDate(new Date(e)).toRelative(n)},ue.getDatesBetween=function(e,n){const r=[];let i=b.fromISO(e);const s=b.fromISO(n);for(;i<=s;)r.push(i.toISODate()),i=i.plus({days:1});return r},ue.getCalendarDateLimits=function(e){const n=e.getFullYear(),r=e.getMonth(),i=new Date(n,r,1),s=new Date(n,r+1,0),o=new Date(i);o.setDate(o.getDate()-o.getDay());const l=new Date(s);l.setDate(l.getDate()+(6-l.getDay()));const a={weekday:"long",day:"numeric",month:"long",year:"numeric"},c=o.toLocaleDateString("en-US",a),d=l.toLocaleDateString("en-US",a);return{start:new Date(c),end:new Date(d)}},ue.getMiddleDate=function(e,n){const r=e.getTime(),i=n.getTime(),s=(r+i)/2;return new Date(s)},ue.shortTime=function(e){return e.toJSDate||(e=b.fromJSDate(new Date(e))),e.toFormat("mm")==="00"?e.toFormat("ha").toLowerCase():e.toFormat("h:mma").toLowerCase()},ue.readableEventDate=function({startDate:e,endDate:n,timezone:r},i){if(!e)return"";e=new Date(e),n=n?new Date(n):void 0;let s,o;try{s=r?b.fromJSDate(e).setZone(r):b.fromJSDate(e),o=n?r?b.fromJSDate(n).setZone(r):b.fromJSDate(n):s}catch{s=b.fromJSDate(e),o=n?b.fromJSDate(n):s}const l=b.now(),a=r&&s.zoneName!==b.local().zoneName?` (${s.zoneName})`:"",d=s.year!==l.year?` ${s.year}`:"";return s.hasSame(o,"day")?ue.shortTime(s)==="12am"?`${s.toFormat("d MMMM")}${d}${a}`:`${ue.shortTime(s)}, ${s.toFormat("cccc d MMMM")}${d}${a}`:s.hasSame(o,"month")?`${s.toFormat("d")}-${o.toFormat("d MMMM")}${d}${a}`:s.hasSame(o,"year")?`${s.toFormat("d MMM")} - ${o.toFormat("d MMM")}${d}${a}`:`${s.toFormat("d MMM yyyy")} - ${o.toFormat("d MMM yyyy")}${a}`},ue.readableDateRange=function(e,n,r){if(!e)return;if(!n)return ue.readableDate(e);e=b.fromJSDate(new Date(e)),n=b.fromJSDate(new Date(n));const i=e.toFormat("yyyy"),s=e.toFormat("LLL yyyy"),o=e.toFormat("WW yyyy"),l=e.toFormat("d LLL yyyy"),a=n.toFormat("yyyy"),c=n.toFormat("LLL yyyy"),d=n.toFormat("WW yyyy"),m=n.toFormat("d LLL yyyy");return l===m?ue.shortTime(e)==="12am"?`${ue.readableDate(n)}`:`${ue.shortTime(e)} - ${ue.readableDate(n)}`:o===d?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:s===c?`${e.toFormat("d")} - ${n.toFormat("d LLL")}`:i===a?`${ue.readableDate(e)} - ${ue.readableDate(n)}`:`${ue.readableDate(e)} - ${ue.readableDate(n)}`},ue.readableDate=function(e){if(!e)return;const n=new Date,r=b.fromJSDate(n),i=r.toFormat("yyyy"),s=r.toFormat("LLL yyyy"),o=r.toFormat("WW yyyy"),l=r.toFormat("d LLL yyyy");e=new Date(e);const a=b.fromJSDate(e),c=a.toFormat("yyyy"),d=a.toFormat("LLL yyyy"),m=a.toFormat("WW yyyy");if(a.toFormat("d LLL yyyy")===l)return`${ue.shortTime(a)} today`;if(m===o)if(e>n){const f=parseInt(r.toFormat("d"));return parseInt(a.toFormat("d"))-f===1?`${ue.shortTime(a)} tomorrow`:`${ue.shortTime(a)} ${a.toFormat("cccc")}`}else return`${a.toRelativeCalendar()}`;return d===s?ue.shortTime(a)==="12am"?`${a.toFormat("d LLL")}`:`${ue.shortTime(a)} ${a.toFormat("d LLL")}`:c===i?a.toFormat("cccc d LLL"):a.toFormat("d LLL yyyy")};function $d(e){var h,y;const n=t.reactive({items:[],hash:{},hex:{},loading:!1,loaded:!1,_fullyLoaded:{}});let r=null;const i={};function s(p,_){if(!(!p||!_))for(const k of Object.keys(_))p[k]=_[k]}function o(p){const _={},k={};return p.forEach(function(w){w.key&&(_[w.key]=w),w.hex&&(k[w.hex]=w)}),{hash:_,hex:k}}async function l(p){if(r)return r;if(!(n.loaded&&!p))return r=a(),r}async function a(p){if(!e.auth.getCurrentUser()){m();return}n.loading=!0;try{const{data:k}=await e.api.get("/glossary/index",{cache:!1}),S=(k||[]).map(function($){const V=$.key&&n.hash[$.key];return V?(s(V,$),V):$}),{hash:I,hex:P}=o(S);n._fullyLoaded={},n.items=S,n.hash=I,n.hex=P,n.loaded=!0}catch(k){console.error("GlossaryService: failed to load glossary index",k)}finally{n.loading=!1,r=null}}async function c(p,_){return n._fullyLoaded[p]&&!_?n.hash[p]:(i[p]||(i[p]=d(p)),i[p])}async function d(p,_){try{const{data:k}=await e.api.get(`/glossary/index/${p}`,{cache:!1});if(!k)return;n.hash[p]?s(n.hash[p],k):n.hash[p]=k;const w=n.items.findIndex(function(S){return S.key===p});return w!==-1&&s(n.items[w],k),n._fullyLoaded[p]=!0,n.hash[p]}catch(k){console.error(`GlossaryService: failed to load definition for '${p}'`,k)}finally{delete i[p]}}n.ensure=async function(p){if(!p)return l(!1);if(await l(!1),typeof p=="string")return c(p,!1);if(Array.isArray(p))return Promise.all(p.map(function(_){return c(_,!1)}))},n.reload=async function(p){if(!p)return l(!0);if(await l(!1),typeof p=="string")return c(p,!0);if(Array.isArray(p))return Promise.all(p.map(function(_){return c(_,!0)}))},n.definitionName=function(p,_){const k=n.hash[p];return k?_?k.plural:k.title:p},n.clear=m;function m(){n.items=[],n.hash={},n.hex={},n.loaded=!1,n.loading=!1,n._fullyLoaded={},r=null;for(const p in i)delete i[p]}let u=null;e.auth.addEventListener("change",function(p){var _,k;if(p){const w=(k=(_=p==null?void 0:p.session)==null?void 0:_.organisation)==null?void 0:k._id;u&&w!==u&&m(),u=w||null,l(!1)}else u=null,m()});const f=e.auth.getCurrentUser();return f&&(u=((y=(h=f==null?void 0:f.session)==null?void 0:h.organisation)==null?void 0:y._id)||null,l(!1)),n}const fo={STRIPE_NOT_LOADED:"Stripe v3 library is not loaded",INSTANCE_NOT_DEFINED:"Instance object is not defined. Make sure you initialized Stripe before creating elements",ELEMENTS_NOT_DEFINED:"Elements object is not defined. You can't create stripe element without it",ELEMENT_TYPE_NOT_DEFINED:"elementType is required. You can't create stripe element without it"},r_=(e,n)=>{try{if(!window.Stripe)throw new Error(fo.STRIPE_NOT_LOADED);return window.Stripe(e,n)}catch(r){return console.error(r),r}},o_=(e,n)=>{try{if(!e)throw new Error(fo.INSTANCE_NOT_DEFINED);return e.elements(n)}catch(r){return console.error(r),r}},i_=(e,n,r)=>{try{if(!e)throw new Error(fo.ELEMENTS_NOT_DEFINED);if(!n)throw new Error(fo.ELEMENT_TYPE_NOT_DEFINED);return e.create(n,r)}catch(i){return console.error(i),i}};var zd=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r};const s_=t.defineComponent({name:"StripeElement",props:{elements:{type:Object,required:!0},type:{type:String,default:()=>"card"},options:{type:Object,default:()=>({})}},setup(e,{emit:n}){const r=t.ref(document.createElement("div")),i=t.ref(),s=t.ref(),{elements:o,type:l,options:a}=t.toRefs(e);return t.onMounted(()=>{const c=()=>{i.value=i_(o.value,l.value,a.value),i.value.mount(r.value),s.value.appendChild(r.value)},d=(u,f)=>{n(u,f)},m=()=>{["change","ready","focus","blur","click","escape"].forEach(f=>{i.value.on(f,d.bind(null,f))})};try{c(),m()}catch(u){console.error(u)}}),t.onBeforeUnmount(()=>{var c,d;(c=i.value)==null||c.unmount(),(d=i.value)==null||d.destroy()}),t.watch(a,()=>{var c;(c=i.value)==null||c.update(e.options)}),{stripeElement:i,domElement:r,mountPoint:s}}}),l_={ref:"mountPoint"};function a_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",l_,null,512)}var zi=zd(s_,[["render",a_]]);const c_=t.defineComponent({name:"StripeElements",props:{stripeKey:{type:String,required:!0},instanceOptions:{type:Object,default:()=>({})},elementsOptions:{type:Object,default:()=>({})}},setup(e){const{stripeKey:n,instanceOptions:r,elementsOptions:i}=t.toRefs(e),s=t.ref(),o=t.ref(),l=t.computed(()=>o.value?Object.keys(o.value).length>0:!1);return t.onMounted(()=>{s.value=r_(n.value,r.value),o.value=o_(s.value,i.value)}),t.watch(i,()=>{var a;(a=o.value)==null||a.update(i.value)}),{elements:o,instance:s,elementsUsable:l}}}),d_={key:0};function u_(e,n,r,i,s,o){return e.elementsUsable?(t.openBlock(),t.createElementBlock("div",d_,[t.renderSlot(e.$slots,"default",{instance:e.instance,elements:e.elements})])):t.createCommentVNode("",!0)}var ji=zd(c_,[["render",u_]]);const C=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r},m_={props:{center:{type:Boolean},shrink:{type:Boolean}}};function f_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-column",{center:r.center,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const jd=C(m_,[["render",f_],["__scopeId","data-v-b03628f8"]]),h_={},p_={class:"flex-column-body"};function y_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",p_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const qd=C(h_,[["render",y_],["__scopeId","data-v-ab49c425"]]),g_={},k_={class:"flex-column-header"};function __(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",k_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Wd=C(g_,[["render",__],["__scopeId","data-v-968bcded"]]),w_={},b_={class:"flex-column-footer"};function x_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",b_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Hd=C(w_,[["render",x_],["__scopeId","data-v-941966e2"]]),C_={props:{flex:{type:Boolean},center:{type:Boolean},vcenter:{type:Boolean},alignBottom:{type:Boolean},shrink:{type:Boolean}}};function V_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-cell",{flex:r.flex,center:r.center,vcenter:r.vcenter,"align-bottom":r.alignBottom,shrink:r.shrink}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const Gd=C(C_,[["render",V_],["__scopeId","data-v-efd82fd0"]]),E_={props:{center:{type:Boolean},vcenter:{type:Boolean},gap:{type:Boolean},wrap:{type:Boolean}}};function N_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex-row",{gap:r.gap,vcenter:r.vcenter,center:r.center,wrap:r.wrap}])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)}const Yd=C(E_,[["render",N_],["__scopeId","data-v-bd96c129"]]),T_={},S_={class:"flex-spacer"};function B_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",S_)}const Kd=C(T_,[["render",B_],["__scopeId","data-v-f42ac625"]]),D_={},O_={class:"panel"};function M_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",O_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Jd=C(D_,[["render",M_],["__scopeId","data-v-dc6d0d19"]]),F_={},I_={class:"panel-body"};function A_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",I_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Zd=C(F_,[["render",A_],["__scopeId","data-v-53a6d4be"]]),L_={},R_={class:"panel-header"};function P_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",R_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Xd=C(L_,[["render",P_],["__scopeId","data-v-49143033"]]),U_={},$_={class:"panel-footer"};function z_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",$_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Qd=C(U_,[["render",z_],["__scopeId","data-v-e87fc082"]]);var ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qi,vd;function xr(){if(vd)return qi;vd=1;function e(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return qi=e,qi}var Wi,eu;function tu(){if(eu)return Wi;eu=1;var e=typeof ho=="object"&&ho&&ho.Object===Object&&ho;return Wi=e,Wi}var Hi,nu;function Wn(){if(nu)return Hi;nu=1;var e=tu(),n=typeof self=="object"&&self&&self.Object===Object&&self,r=e||n||Function("return this")();return Hi=r,Hi}var Gi,ru;function j_(){if(ru)return Gi;ru=1;var e=Wn(),n=function(){return e.Date.now()};return Gi=n,Gi}var Yi,ou;function q_(){if(ou)return Yi;ou=1;var e=/\s/;function n(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return Yi=n,Yi}var Ki,iu;function W_(){if(iu)return Ki;iu=1;var e=q_(),n=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Ki=r,Ki}var Ji,su;function Zi(){if(su)return Ji;su=1;var e=Wn(),n=e.Symbol;return Ji=n,Ji}var Xi,lu;function H_(){if(lu)return Xi;lu=1;var e=Zi(),n=Object.prototype,r=n.hasOwnProperty,i=n.toString,s=e?e.toStringTag:void 0;function o(l){var a=r.call(l,s),c=l[s];try{l[s]=void 0;var d=!0}catch{}var m=i.call(l);return d&&(a?l[s]=c:delete l[s]),m}return Xi=o,Xi}var Qi,au;function G_(){if(au)return Qi;au=1;var e=Object.prototype,n=e.toString;function r(i){return n.call(i)}return Qi=r,Qi}var vi,cu;function Cr(){if(cu)return vi;cu=1;var e=Zi(),n=H_(),r=G_(),i="[object Null]",s="[object Undefined]",o=e?e.toStringTag:void 0;function l(a){return a==null?a===void 0?s:i:o&&o in Object(a)?n(a):r(a)}return vi=l,vi}var es,du;function Vr(){if(du)return es;du=1;function e(n){return n!=null&&typeof n=="object"}return es=e,es}var ts,uu;function po(){if(uu)return ts;uu=1;var e=Cr(),n=Vr(),r="[object Symbol]";function i(s){return typeof s=="symbol"||n(s)&&e(s)==r}return ts=i,ts}var ns,mu;function fu(){if(mu)return ns;mu=1;var e=W_(),n=xr(),r=po(),i=NaN,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,a=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return i;if(n(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=n(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var u=o.test(d);return u||l.test(d)?a(d.slice(2),u?2:8):s.test(d)?i:+d}return ns=c,ns}var rs,hu;function Y_(){if(hu)return rs;hu=1;var e=xr(),n=j_(),r=fu(),i="Expected a function",s=Math.max,o=Math.min;function l(a,c,d){var m,u,f,h,y,p,_=0,k=!1,w=!1,S=!0;if(typeof a!="function")throw new TypeError(i);c=r(c)||0,e(d)&&(k=!!d.leading,w="maxWait"in d,f=w?s(r(d.maxWait)||0,c):f,S="trailing"in d?!!d.trailing:S);function I(K){var ce=m,me=u;return m=u=void 0,_=K,h=a.apply(me,ce),h}function P(K){return _=K,y=setTimeout(z,c),k?I(K):h}function $(K){var ce=K-p,me=K-_,ye=c-ce;return w?o(ye,f-me):ye}function V(K){var ce=K-p,me=K-_;return p===void 0||ce>=c||ce<0||w&&me>=f}function z(){var K=n();if(V(K))return L(K);y=setTimeout(z,$(K))}function L(K){return y=void 0,S&&m?I(K):(m=u=void 0,h)}function R(){y!==void 0&&clearTimeout(y),_=0,m=p=u=y=void 0}function q(){return y===void 0?h:L(n())}function re(){var K=n(),ce=V(K);if(m=arguments,u=this,p=K,ce){if(y===void 0)return P(p);if(w)return clearTimeout(y),y=setTimeout(z,c),I(p)}return y===void 0&&(y=setTimeout(z,c)),h}return re.cancel=R,re.flush=q,re}return rs=l,rs}var K_=Y_();const Hn=vt(K_),J_=["onClick"],Z_=["onClick"],pu=C({__name:"tabset",props:{vertical:Boolean,inline:Boolean,pills:Boolean,defaultTab:String},setup(e){const n=t.useSlots(),r=e,i=t.reactive({tabs:[]});t.provide("tabset",i);const s=t.ref();t.provide("activeHeading",s);const o=function(f){s.value=f},l=Hn(function(){const h=n.default().reduce(function(_,k){var w;return((w=k.type)==null?void 0:w.name)==="tab"?_.push(k):k.children&&(_=[..._,...k.children]),_},[]).filter(function(_){var k;return((k=_.type)==null?void 0:k.name)==="tab"&&_.props.enabled!==!1}).map(function(_,k){const w=_.props.heading,S=_.props.tabKey||w;return{heading:w,key:S,index:k}});i.tabs=h;const y=h.reduce(function(_,k){return _[k.key||k.heading]=!0,_},{}),p=s.value;if((!p||!y[p])&&h.length){let _;r.defaultTab&&y[r.defaultTab]?_=r.defaultTab:_=h[0].key||h[0].heading,s.value=_}});t.provide("rebuild",l);const a=t.computed(function(){return i.tabs.map(function(f){if(f)return f.heading}).filter(Boolean)}),c=t.computed(function(){return i.tabs.map(function(f){if(f)return f.key}).filter(Boolean)}),d=t.computed(function(){return a.value.length>1}),m=t.ref(null);function u(){t.nextTick(function(){const f=m.value&&m.value.$el;if(!f)return;const h=f.querySelector("a.active");if(!h){f.style.removeProperty("--ind-width");return}f.style.setProperty("--ind-left",`${h.offsetLeft}px`),f.style.setProperty("--ind-width",`${h.offsetWidth}px`)})}return t.watch(s,u),t.watch(a,u),t.onMounted(function(){u(),window.addEventListener("resize",u),document.fonts&&document.fonts.ready&&document.fonts.ready.then(u)}),t.onBeforeUnmount(function(){window.removeEventListener("resize",u)}),l(),(f,h)=>{const y=t.resolveComponent("flex-body"),p=t.resolveComponent("flex-column"),_=t.resolveComponent("ux-button"),k=t.resolveComponent("flex-row"),w=t.resolveComponent("flex-header");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-tabset",{vertical:e.vertical,horizontal:!e.vertical,inline:e.inline,block:!e.inline&&!e.pills,pills:e.pills}])},[e.vertical?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[d.value?(t.openBlock(),t.createBlock(p,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(y,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:P=>o(S)},t.toDisplayString(a.value[I]),11,J_))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):e.pills?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[d.value?(t.openBlock(),t.createBlock(w,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(k,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createBlock(_,{color:s.value===S?"primary":"",key:`tab-pill-${S}`,onClick:P=>o(S)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.value[I]),1)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[d.value?(t.openBlock(),t.createBlock(w,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(k,{ref_key:"menuRow",ref:m},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(S,I)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===S}),key:`tab-link-${S}`,onClick:P=>o(S)},t.toDisplayString(a.value[I]),11,Z_))),128))]),_:1},512)]),_:1})):t.createCommentVNode("",!0)],64)),t.createVNode(p,null,{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default",{},void 0,!0)]),_:3})],2)}}},[["__scopeId","data-v-e4752404"]]),X_={emits:["mount","unmount"],name:"tab",props:{heading:{type:String,required:!0},tabKey:{type:String},enabled:{type:Boolean,default:!0},keepAlive:{type:Boolean,default:!1}},created(){this.rebuild()},unmounted(){this.rebuild()},watch:{heading(){this.rebuild()}},inject:["tabset","activeHeading","rebuild"],computed:{active(){var r;return String(this.tabKey||this.heading)===String(((r=this.activeHeading)==null?void 0:r.value)||this.activeHeading)}}};function Q_(e,n,r,i,s,o){const l=t.resolveComponent("flex-column");return r.keepAlive?t.withDirectives((t.openBlock(),t.createBlock(l,{key:0},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},512)),[[t.vShow,o.active]]):o.active?(t.openBlock(),t.createBlock(l,{key:1},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})):t.createCommentVNode("",!0)}const yu=C(X_,[["render",Q_]]);var os,gu;function Er(){if(gu)return os;gu=1;var e=Array.isArray;return os=e,os}var is,ku;function v_(){if(ku)return is;ku=1;var e=Er(),n=po(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function s(o,l){if(e(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||n(o)?!0:i.test(o)||!r.test(o)||l!=null&&o in Object(l)}return is=s,is}var ss,_u;function wu(){if(_u)return ss;_u=1;var e=Cr(),n=xr(),r="[object AsyncFunction]",i="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function l(a){if(!n(a))return!1;var c=e(a);return c==i||c==s||c==r||c==o}return ss=l,ss}var ls,bu;function ew(){if(bu)return ls;bu=1;var e=Wn(),n=e["__core-js_shared__"];return ls=n,ls}var as,xu;function tw(){if(xu)return as;xu=1;var e=ew(),n=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function r(i){return!!n&&n in i}return as=r,as}var cs,Cu;function nw(){if(Cu)return cs;Cu=1;var e=Function.prototype,n=e.toString;function r(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return cs=r,cs}var ds,Vu;function rw(){if(Vu)return ds;Vu=1;var e=wu(),n=tw(),r=xr(),i=nw(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,a=Object.prototype,c=l.toString,d=a.hasOwnProperty,m=RegExp("^"+c.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(f){if(!r(f)||n(f))return!1;var h=e(f)?m:o;return h.test(i(f))}return ds=u,ds}var us,Eu;function ow(){if(Eu)return us;Eu=1;function e(n,r){return n==null?void 0:n[r]}return us=e,us}var ms,Nu;function fs(){if(Nu)return ms;Nu=1;var e=rw(),n=ow();function r(i,s){var o=n(i,s);return e(o)?o:void 0}return ms=r,ms}var hs,Tu;function yo(){if(Tu)return hs;Tu=1;var e=fs(),n=e(Object,"create");return hs=n,hs}var ps,Su;function iw(){if(Su)return ps;Su=1;var e=yo();function n(){this.__data__=e?e(null):{},this.size=0}return ps=n,ps}var ys,Bu;function sw(){if(Bu)return ys;Bu=1;function e(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}return ys=e,ys}var gs,Du;function lw(){if(Du)return gs;Du=1;var e=yo(),n="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function s(o){var l=this.__data__;if(e){var a=l[o];return a===n?void 0:a}return i.call(l,o)?l[o]:void 0}return gs=s,gs}var ks,Ou;function aw(){if(Ou)return ks;Ou=1;var e=yo(),n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;return e?o[s]!==void 0:r.call(o,s)}return ks=i,ks}var _s,Mu;function cw(){if(Mu)return _s;Mu=1;var e=yo(),n="__lodash_hash_undefined__";function r(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=e&&s===void 0?n:s,this}return _s=r,_s}var ws,Fu;function dw(){if(Fu)return ws;Fu=1;var e=iw(),n=sw(),r=lw(),i=aw(),s=cw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,ws=o,ws}var bs,Iu;function uw(){if(Iu)return bs;Iu=1;function e(){this.__data__=[],this.size=0}return bs=e,bs}var xs,Au;function Lu(){if(Au)return xs;Au=1;function e(n,r){return n===r||n!==n&&r!==r}return xs=e,xs}var Cs,Ru;function go(){if(Ru)return Cs;Ru=1;var e=Lu();function n(r,i){for(var s=r.length;s--;)if(e(r[s][0],i))return s;return-1}return Cs=n,Cs}var Vs,Pu;function mw(){if(Pu)return Vs;Pu=1;var e=go(),n=Array.prototype,r=n.splice;function i(s){var o=this.__data__,l=e(o,s);if(l<0)return!1;var a=o.length-1;return l==a?o.pop():r.call(o,l,1),--this.size,!0}return Vs=i,Vs}var Es,Uu;function fw(){if(Uu)return Es;Uu=1;var e=go();function n(r){var i=this.__data__,s=e(i,r);return s<0?void 0:i[s][1]}return Es=n,Es}var Ns,$u;function hw(){if($u)return Ns;$u=1;var e=go();function n(r){return e(this.__data__,r)>-1}return Ns=n,Ns}var Ts,zu;function pw(){if(zu)return Ts;zu=1;var e=go();function n(r,i){var s=this.__data__,o=e(s,r);return o<0?(++this.size,s.push([r,i])):s[o][1]=i,this}return Ts=n,Ts}var Ss,ju;function yw(){if(ju)return Ss;ju=1;var e=uw(),n=mw(),r=fw(),i=hw(),s=pw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Ss=o,Ss}var Bs,qu;function gw(){if(qu)return Bs;qu=1;var e=fs(),n=Wn(),r=e(n,"Map");return Bs=r,Bs}var Ds,Wu;function kw(){if(Wu)return Ds;Wu=1;var e=dw(),n=yw(),r=gw();function i(){this.size=0,this.__data__={hash:new e,map:new(r||n),string:new e}}return Ds=i,Ds}var Os,Hu;function _w(){if(Hu)return Os;Hu=1;function e(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}return Os=e,Os}var Ms,Gu;function ko(){if(Gu)return Ms;Gu=1;var e=_w();function n(r,i){var s=r.__data__;return e(i)?s[typeof i=="string"?"string":"hash"]:s.map}return Ms=n,Ms}var Fs,Yu;function ww(){if(Yu)return Fs;Yu=1;var e=ko();function n(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return Fs=n,Fs}var Is,Ku;function bw(){if(Ku)return Is;Ku=1;var e=ko();function n(r){return e(this,r).get(r)}return Is=n,Is}var As,Ju;function xw(){if(Ju)return As;Ju=1;var e=ko();function n(r){return e(this,r).has(r)}return As=n,As}var Ls,Zu;function Cw(){if(Zu)return Ls;Zu=1;var e=ko();function n(r,i){var s=e(this,r),o=s.size;return s.set(r,i),this.size+=s.size==o?0:1,this}return Ls=n,Ls}var Rs,Xu;function Qu(){if(Xu)return Rs;Xu=1;var e=kw(),n=ww(),r=bw(),i=xw(),s=Cw();function o(l){var a=-1,c=l==null?0:l.length;for(this.clear();++a<c;){var d=l[a];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Rs=o,Rs}var Ps,vu;function Vw(){if(vu)return Ps;vu=1;var e=Qu(),n="Expected a function";function r(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new TypeError(n);var o=function(){var l=arguments,a=s?s.apply(this,l):l[0],c=o.cache;if(c.has(a))return c.get(a);var d=i.apply(this,l);return o.cache=c.set(a,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,Ps=r,Ps}var Us,em;function Ew(){if(em)return Us;em=1;var e=Vw(),n=500;function r(i){var s=e(i,function(l){return o.size===n&&o.clear(),l}),o=s.cache;return s}return Us=r,Us}var $s,tm;function Nw(){if(tm)return $s;tm=1;var e=Ew(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=e(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(n,function(l,a,c,d){o.push(c?d.replace(r,"$1"):a||l)}),o});return $s=i,$s}var zs,nm;function rm(){if(nm)return zs;nm=1;function e(n,r){for(var i=-1,s=n==null?0:n.length,o=Array(s);++i<s;)o[i]=r(n[i],i,n);return o}return zs=e,zs}var js,om;function Tw(){if(om)return js;om=1;var e=Zi(),n=rm(),r=Er(),i=po(),s=e?e.prototype:void 0,o=s?s.toString:void 0;function l(a){if(typeof a=="string")return a;if(r(a))return n(a,l)+"";if(i(a))return o?o.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}return js=l,js}var qs,im;function Ws(){if(im)return qs;im=1;var e=Tw();function n(r){return r==null?"":e(r)}return qs=n,qs}var Hs,sm;function Sw(){if(sm)return Hs;sm=1;var e=Er(),n=v_(),r=Nw(),i=Ws();function s(o,l){return e(o)?o:n(o,l)?[o]:r(i(o))}return Hs=s,Hs}var Gs,lm;function Bw(){if(lm)return Gs;lm=1;var e=po();function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return Gs=n,Gs}var Ys,am;function Dw(){if(am)return Ys;am=1;var e=Sw(),n=Bw();function r(i,s){s=e(s,i);for(var o=0,l=s.length;i!=null&&o<l;)i=i[n(s[o++])];return o&&o==l?i:void 0}return Ys=r,Ys}var Ks,cm;function Ow(){if(cm)return Ks;cm=1;var e=Dw();function n(r,i,s){var o=r==null?void 0:e(r,i);return o===void 0?s:o}return Ks=n,Ks}var Mw=Ow();const en=vt(Mw),ke={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},Fw={mixins:[ke],data(){return{processing:!1}},methods:{async clicked(){const e=this,n=(e.tags||[]).slice(),r=await e.$sdk.tag({title:"Edit tags",description:e.row.title,model:n.slice()}),i=e.$sdk.utils.ids(n),s=e.$sdk.utils.ids(r);JSON.stringify(i.sort())===JSON.stringify(s.sort())||(e.processing=!0,await e.$sdk.content.patch(this.itemID,{meta:{tags:r}}),e.row.meta.tags=r,e.processing=!1,e.$sdk.notify("Tags were updated"))}},computed:{canEditItem(){return this.$sdk.access.canEditItem(this.user,this.row)},itemID(){return this.row._id},tags(){var r;return((r=this.row.meta)==null?void 0:r.tags)||[]}}},Iw={class:"table-quicktag-cell"};function Aw(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-icon"),m=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",Iw,[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tags,u=>(t.openBlock(),t.createBlock(l,{icon:"fa-tag",tag:"a",value:u},null,8,["value"]))),256))]),_:1})]),_:1}),o.canEditItem?(t.openBlock(),t.createElementBlock("div",{key:0,class:"clicker",onClick:n[0]||(n[0]=t.withModifiers((...u)=>o.clicked&&o.clicked(...u),["stop","prevent"]))},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{icon:"",size:"xs"},{default:t.withCtx(()=>[t.createVNode(d,{icon:"fa-pen-to-square"})]),_:1})]),_:1})]),_:1})])):t.createCommentVNode("",!0)])}const Lw=C(Fw,[["render",Aw],["__scopeId","data-v-d98dce09"]]),Rw={mixins:[ke],computed:{initials(){var e,n;return`${((e=this.row)==null?void 0:e.firstName)||""} ${((n=this.row)==null?void 0:n.lastName)||""}`.trim()||this.row.title},source(){return this.$sdk.utils.id(this.value)||this.$sdk.utils.id(this.row)}}},Pw={class:"table-avatar-cell"},Uw={class:"avatar-wrapper"};function $w(e,n,r,i,s,o){const l=t.resolveComponent("avatar",!0);return t.openBlock(),t.createElementBlock("td",Pw,[t.createElementVNode("div",Uw,[t.createVNode(l,{id:o.source,initials:o.initials},null,8,["id","initials"])])])}const zw=C(Rw,[["render",$w],["__scopeId","data-v-a4b42e00"]]),jw={mixins:[ke],computed:{formatted(){return this.$sdk.date.readableTime(this.value)}}},qw={class:"table-time-cell"};function Ww(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",qw,[t.createVNode(l,{icon:"far fa-clock"}),t.createTextVNode(" "+t.toDisplayString(o.formatted),1)])}const Hw=C(jw,[["render",Ww],["__scopeId","data-v-677f555b"]]),Gw={mixins:[ke],computed:{key(){return this.column.key},rawSource(){return this.value!==void 0?this.value:en(this.row,this.key)},source(){const e=this.rawSource;return Array.isArray(e)?e[0]:e??(this.key?void 0:this.row)},imageSource(){var r;const e=this.source;if(e)switch((r=e==null?void 0:e.meta)==null?void 0:r.type){case"video":case"image":case"event":case"persona":case"profile":case"audio":case"file":return this.source;default:{const i=this.$sdk.utils.id(this.source);if(!i)return;var n=i.slice(8,10);switch(n){case"69":return{_id:i,meta:{type:"image"}};case"76":return{_id:i,meta:{type:"video"}};case"24":return{_id:i,meta:{type:"persona"}};case"70":return{_id:i,meta:{type:"profile"}};case"71":return{_id:i,meta:{type:"checkin"}}}return i}}},type(){var e,n;return(n=(e=this.imageSource)==null?void 0:e.meta)==null?void 0:n.type}},methods:{clicked(e){this.$sdk.dispatch("item:view",this.imageSource)}}},Yw={class:"table-image-cell"};function Kw(e,n,r,i,s,o){const l=t.resolveComponent("ux-image"),a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",Yw,[o.imageSource?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.type=="image"||o.type=="video"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])])):o.type==="audio"?(t.openBlock(),t.createBlock(a,{key:1,icon:"fa-music"})):o.type==="file"?(t.openBlock(),t.createBlock(a,{key:2,icon:"fa-file"})):(t.openBlock(),t.createElementBlock("div",{key:3,onClick:n[1]||(n[1]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(l,{lazy:"",item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])]))],64)):t.createCommentVNode("",!0)])}const Jw=C(Gw,[["render",Kw],["__scopeId","data-v-f57b1d98"]]),Zw={mixins:[ke],computed:{string(){return isNaN(this.amount)?"0.00":this.amount.toFixed(2)},amount(){return Number(parseInt(this.value)/100)},credit(){return this.amount>0},debit(){return this.amount<0},invalid(){var e;return((e=this.column)==null?void 0:e.key)==="amount"&&this.adjusted},adjusted(){return this.row.effectiveAmount!==this.row.amount},empty(){return parseInt(this.value)===0},currency(){return this.column.currency||this.row.currency}}};function Xw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-currency-cell",{credit:o.credit,empty:o.empty,debit:o.debit,invalid:o.invalid,adjusted:o.adjusted}])},t.toDisplayString(o.string),3)}const Qw=C(Zw,[["render",Xw],["__scopeId","data-v-c62e82ec"]]),vw={data(){return{processing:!1}},mixins:[ke],computed:{visible(){return!this.hidden},enabled(){const e=this;switch(typeof e.button.enabled){case"function":return e.button.enabled(e.row,e.column);case"undefined":case"null":return!0;default:return e.button.enabled}},hidden(){const e=this;switch(typeof e.button.hidden){case"function":return!!e.button.hidden(e.row,e.column);case"undefined":case"null":return!1;default:return!!e.button.hidden}},button(){return this.column.button},type(){var e,n;return(n=(e=this.row)==null?void 0:e.meta)==null?void 0:n.type},label(){const e=this.button;return typeof e.text=="function"?e.text(this):e.text}},methods:{async clicked(){this.processing=!0;try{await this.button.action(this.row,this.column,this)}finally{this.processing=!1}}}},e1={class:"table-button-cell"};function t1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",e1,[o.visible?(t.openBlock(),t.createBlock(a,{key:0,block:o.button.block,color:o.button.color,size:o.button.size,loading:s.processing,disabled:!o.enabled,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[o.label?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.label),1)],64)):t.createCommentVNode("",!0),o.button.icon?(t.openBlock(),t.createBlock(l,{key:1,icon:o.button.icon,right:""},null,8,["icon"])):t.createCommentVNode("",!0)]),_:1},8,["block","color","size","loading","disabled","onClick"])):t.createCommentVNode("",!0)])}const n1=C(vw,[["render",t1],["__scopeId","data-v-a915cc59"]]),r1={mixins:[ke],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mma, ccc d MMM").replace(/:00/g,"").replace(/PM,/g,"pm,").replace(/:AM,/g,"am,"):e.toFormat("h:mma, ccc d MMM yyyy").replace(/:00/g,"").replace(/:PM,/g,"pm,").replace(/:AM,/g,"am,")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n);return{readable:e.readable(r),timeago:e.timeago(r)}}).filter(Boolean)}}},o1={class:"table-date-cell"},i1={class:"date-pill"},s1={class:"off"},l1={class:"on"},a1={class:"spacer"};function c1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",o1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,l=>(t.openBlock(),t.createElementBlock("div",i1,[t.createElementVNode("span",s1,t.toDisplayString(l.readable),1),t.createElementVNode("span",l1,t.toDisplayString(l.timeago),1),t.createElementVNode("span",a1,t.toDisplayString(l.readable),1)]))),256))])}const dm=C(r1,[["render",c1],["__scopeId","data-v-f3b929d9"]]),d1={mixins:[ke],methods:{timeago(e){return b.fromJSDate(e).toRelative()},readable(e){e=b.fromJSDate(e);let n=b.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?e.toFormat("h:mm a - dd MMM"):e.toFormat("h:mm a - dd MMM yyyy")}},computed:{values(){return Array.isArray(this.value)?this.value:[this.value]},mapped(){const e=this;return e.values.map(function(n){if(!n)return;const r=new Date(n),i=r<new Date;return{readable:e.readable(r),timeago:e.timeago(r),overdue:i}}).filter(Boolean)}}},u1={class:"table-date-cell"},m1={class:"off"},f1={class:"on"},h1={class:"spacer"};function p1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",u1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,a=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["date-pill",{overdue:a.overdue}])},[t.createElementVNode("span",m1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)]),t.createElementVNode("span",f1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.timeago),1)]),t.createElementVNode("span",h1,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)])],2))),256))])}const y1=C(d1,[["render",p1],["__scopeId","data-v-0e48d460"]]),g1={mixins:[ke],computed:{boolean(){return!!this.value}}};function k1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-boolean-cell",{true:o.boolean,false:!o.boolean}])},[t.createVNode(l,{icon:o.boolean?"fa-check":"fa-times"},null,8,["icon"])],2)}const um=C(g1,[["render",k1],["__scopeId","data-v-b180904a"]]),_1={mixins:[ke],computed:{size(){return this.$sdk.files.filesize(this.value)}}};function w1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-filesize-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.size),3)}const b1=C(_1,[["render",w1],["__scopeId","data-v-0419990c"]]);function x1(e){const n=Math.round(e),r=Math.floor(n/3600),i=Math.floor(n%3600/60),s=n%60;return r>0?`${r}:${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`:`${i}:${s.toString().padStart(2,"0")}`}const C1={mixins:[ke],computed:{duration(){return x1(this.value)}}};function V1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-duration-cell",{true:e.boolean,false:!e.boolean}])},t.toDisplayString(o.duration),3)}const E1=C(C1,[["render",V1],["__scopeId","data-v-2910d792"]]),N1={mixins:[ke],methods:{async clicked(){const e=this,n=e.$sdk.utils.id(e.row),r=e.public?"secure":"public";e.processing=!0;try{await e.$sdk.content.patch(n,{meta:{security:r}}),e.row.meta||(e.row.meta={}),e.row.meta.security=r,e.$sdk.notify(`Set security to ${r}`)}catch(i){e.$sdk.error(i)}finally{e.processing=!1}}},data(){return{processing:!1}},computed:{canEdit(){var e=this.user;return this.$sdk.access.canEditItem(e,this.row)},public(){return this.security==="public"},security(){return this.value||"secure"}}};function T1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-security-cell",o.security])},[o.canEdit?(t.openBlock(),t.createBlock(a,{key:0,size:"sm",loading:s.processing,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(l,{icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"])]),_:1},8,["loading","onClick"])):(t.openBlock(),t.createBlock(l,{key:1,icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"]))],2)}const S1=C(N1,[["render",T1],["__scopeId","data-v-147f957e"]]),B1={mixins:[ke],methods:{open(){window.open(this.href)}},computed:{actualValue(){return String(this.value||"").trim()},href(){let e=this.actualValue;return/^https?:\/\//i.test(e)?e:"https://"+e}}},D1={class:"table-url-cell"},O1=["href"];function M1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",D1,[o.actualValue?(t.openBlock(),t.createElementBlock("a",{key:0,href:o.href,onClick:n[0]||(n[0]=t.withModifiers((...a)=>o.open&&o.open(...a),["stop","prevent"])),target:"_blank"},[t.createTextVNode(t.toDisplayString(o.actualValue)+" ",1),t.createVNode(l,{right:"",icon:"fa-external-link"})],8,O1)):t.createCommentVNode("",!0)])}const mm=C(B1,[["render",M1],["__scopeId","data-v-aa99a5e7"]]);var fm=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}};const hm={props:{template:String,parent:Object,templateProps:{type:Object,default:function(){return{}}}},render:function(){if(this.template){var e=this.parent||this.$parent,n=e.$data;n===void 0&&(n={});var r=e.$props;r===void 0&&(r={});var i=e.$options;i===void 0&&(i={});var s=i.components;s===void 0&&(s={});var o=i.computed;o===void 0&&(o={});var l=i.methods;l===void 0&&(l={});var a=this.$data;a===void 0&&(a={});var c=this.$props;c===void 0&&(c={});var d=this.$options;d===void 0&&(d={});var m=d.methods;m===void 0&&(m={});var u=d.computed;u===void 0&&(u={});var f=d.components;f===void 0&&(f={});var h={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n).forEach(function(V){a[V]===void 0&&(h.$data[V]=n[V])}),Object.keys(r).forEach(function(V){c[V]===void 0&&(h.$props[V]=r[V])}),Object.keys(l).forEach(function(V){m[V]===void 0&&(h.methods[V]=l[V])}),Object.keys(o).forEach(function(V){u[V]===void 0&&(h.computed[V]=o[V])}),Object.keys(s).forEach(function(V){f[V]===void 0&&(h.components[V]=s[V])});var y=Object.keys(h.methods||{}),p=Object.keys(h.$data||{}),_=Object.keys(h.$props||{}),k=Object.keys(this.templateProps),w=p.concat(_).concat(y).concat(k),S=(P=e,$={},y.forEach(function(V){return fm(P,$,V)}),$),I=function(V){var z={};return V.forEach(function(L){L&&Object.getOwnPropertyNames(L).forEach(function(R){return fm(L,z,R)})}),z}([h.$data,h.$props,S,this.templateProps]);return t.h({template:this.template||"<div></div>",props:w,computed:h.computed,components:h.components,provide:this.$parent.$.provides?this.$parent.$.provides:{}},Object.assign({},I))}var P,$}},F1={components:{Compile:hm},mixins:[ke]},I1={class:"table-computed-cell"};function A1(e,n,r,i,s,o){const l=t.resolveComponent("compile");return t.openBlock(),t.createElementBlock("td",I1,[t.createVNode(l,{template:this.column.code},null,8,["template"])])}const L1=C(F1,[["render",A1],["__scopeId","data-v-05dd3203"]]),R1={props:{multi:{type:Boolean},last:{type:Boolean},value:{required:!0},type:{type:String},widget:{type:String}},computed:{reference(){return!!(this.value&&this.value._id)},renderValue(){return this.value?this.value.title||this.value.name||this.value:void 0},date(){return b.fromISO(this.value).toFormat("dd MMM yyyy")},actualWidget(){var e;if(this.widget)e=this.widget;else switch(this.type){case"date":e="datetime";break}return e}},methods:{clicked(e){this.$sdk.dispatch("item:view",e)}}};function P1(e,n,r,i,s,o){const l=t.resolveComponent("ux-pill");return o.reference?(t.openBlock(),t.createBlock(l,{key:0,tag:"a",value:r.value,onClick:n[0]||(n[0]=t.withModifiers(a=>o.clicked(r.value),["stop","prevent"]))},null,8,["value"])):r.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.date),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(o.renderValue),1),r.multi&&!r.last?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)],64))}const U1=C(R1,[["render",P1],["__scopeId","data-v-27442ac9"]]),$1=".total",z1={mixins:[ke],methods:{clicked(e){this.menuOpen=!1,this.$sdk.dispatch("item:view",e)}},data(){return{menuOpen:!1}},computed:{path(){return this.column.key||""},rawPath(){return this.path.slice(0,-$1.length)},itemPath(){return`${this.rawPath}.items`},value(){return en(this.row,this.column.key)},items(){return en(this.row,this.itemPath)}}},j1={class:"table-complex-cell"},q1={class:"items"};function W1(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-pill"),c=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",j1,[t.createVNode(c,{modelValue:s.menuOpen,"onUpdate:modelValue":n[1]||(n[1]=d=>s.menuOpen=d)},{activator:t.withCtx(({on:d})=>[t.createVNode(l,t.mergeProps({size:"sm",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop","prevent"]))},t.toHandlers(d),{icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},16)]),default:t.withCtx(()=>[t.createElementVNode("div",q1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.items,d=>(t.openBlock(),t.createBlock(a,{tag:"a",value:d,onClick:t.withModifiers(m=>o.clicked(d),["stop","prevent"])},null,8,["value","onClick"]))),256))])]),_:1},8,["modelValue"])])}const H1=C(z1,[["render",W1],["__scopeId","data-v-1cdab26c"]]),G1={mixins:[ke],computed:{email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress}}},Y1={class:"table-persona-email-cell"};function K1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",Y1,t.toDisplayString(o.email),1)}const J1=C(G1,[["render",K1],["__scopeId","data-v-9c894a39"]]),Z1={mixins:[ke],computed:{className(){return this.isConnected?"connected":this.isInvited?"invited":this.isManaged?"managed":"empty"},isConnected(){return!!this.row.user},isInvited(){return!this.isConnected&&this.row.collectionEmailAddress},isManaged(){return!this.isConnected&&!this.isInvited},email(){var e;return this.row.username||((e=this.row.user)==null?void 0:e.email)||this.row.userEmailAddress||this.row.collectionEmailAddress},text(){switch(this.className){case"connected":return"Qik User";case"invited":return"Invite sent";case"managed":return"App user";default:return""}},tooltip(){var r,i,s,o;const e=this,n=(i=(r=e.user)==null?void 0:r.organisation)!=null&&i.title?`'${(o=(s=e.user)==null?void 0:s.organisation)==null?void 0:o.title}'`:void 0;switch(e.className){case"connected":return`This user can sign in to ${n||"your organisation"} on the Qik platform.`;case"invited":return"We've sent an invite to this user to join your organisation on Qik.";case"managed":return"This user can only sign in to your applications.";default:return""}},icon(){switch(this.className){case"connected":return"far fa-user";case"invited":return"far fa-envelope";case"managed":return"far fa-user";default:return}}}},X1={class:"pill"};function Q1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-persona-invite-cell",o.className])},[t.createVNode(a,{content:o.tooltip},{default:t.withCtx(()=>[t.createElementVNode("div",X1,[t.createVNode(l,{icon:o.icon,left:""},null,8,["icon"]),t.createTextVNode(" "+t.toDisplayString(o.text),1)])]),_:1},8,["content"])],2)}const v1=C(Z1,[["render",Q1],["__scopeId","data-v-be3bef4b"]]),eb={mixins:[ke],computed:{status(){return String(this.value||"").toLowerCase()}}},tb={key:0,class:"pill"};function nb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-status-cell",o.status])},[o.status?(t.openBlock(),t.createElementBlock("div",tb,t.toDisplayString(o.status),1)):t.createCommentVNode("",!0)],2)}const rb=C(eb,[["render",nb],["__scopeId","data-v-357810c2"]]),ob={mixins:[ke],computed:{typeKey(){var e;return(e=this.row.meta)==null?void 0:e.type},subtitle(){var l,a,c,d,m,u,f;const e=this,n=this.row,r=n.subtitle,i=n.description,s=(l=n.meta)==null?void 0:l.description,o=r||i||s;switch(this.typeKey){case"runsheet":return n.event?`${n.event.title} • ${e.$sdk.date.readableEventDate(n.event)}`:"";case"venue":return[(a=n.address)==null?void 0:a.addressLine1,(c=n.address)==null?void 0:c.addressLine2,(d=n.address)==null?void 0:d.suburb,(m=n.address)==null?void 0:m.state,(u=n.address)==null?void 0:u.postalCode,(f=n.address)==null?void 0:f.country].filter(Boolean).join(" ");case"event":if(n.startDate,n.endDate,e.$sdk.date)return o?`${e.$sdk.date.readableEventDate(n)} • ${o}`:`${e.$sdk.date.readableEventDate(n)}`;break}return o}}},ib={class:"title"},sb={key:0,class:"subtitle"};function lb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-title-cell",e.status])},[t.createElementVNode("div",ib,t.toDisplayString(e.value),1),o.subtitle?(t.openBlock(),t.createElementBlock("div",sb,t.toDisplayString(o.subtitle),1)):t.createCommentVNode("",!0)],2)}const ab=C(ob,[["render",lb],["__scopeId","data-v-bf723bb2"]]),cb={mixins:[ke],computed:{alternatives(){const e=this.column.alternatives;return e?(this.row[e]||[]).filter(Boolean):[]}}},db={class:"table-name-cell"},ub={class:"name"},mb={key:0,class:"alternatives"};function fb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",db,[t.createElementVNode("span",ub,t.toDisplayString(e.value),1),o.alternatives.length?(t.openBlock(),t.createElementBlock("span",mb," ("+t.toDisplayString(o.alternatives.join(", "))+")",1)):t.createCommentVNode("",!0)])}const hb=C(cb,[["render",fb],["__scopeId","data-v-dfab6d42"]]),pb={props:{value:{type:Object}},computed:{style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{backgroundColor:n||e}}}};function yb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("span",{class:"ux-circle",style:t.normalizeStyle(o.style)},null,4)}const Nr=C(pb,[["render",yb],["__scopeId","data-v-6f2d4cea"]]),gb={mixins:[ke],components:{UxCircle:Nr},computed:{scopes(){return this.column.key==="_id"?[this.row]:(this.value||[]).filter(function({unit:n}){return!n})}}},kb={class:"scope-circles-cell"};function _b(e,n,r,i,s,o){const l=t.resolveComponent("ux-circle"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",kb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.scopes,c=>(t.openBlock(),t.createBlock(a,{content:c.title},{default:t.withCtx(()=>[t.createVNode(l,{value:c},null,8,["value"])]),_:2},1032,["content"]))),256))])}const wb=C(gb,[["render",_b],["__scopeId","data-v-f79f00ee"]]),bb={mixins:[ke],created(){this.$glossary.ensure()},computed:{lookup(){return this.$glossary.hash},match(){return this.lookup?this.lookup[this.value]:null},title(){var e;return((e=this.match)==null?void 0:e.title)||this.value},plural(){var e;return((e=this.match)==null?void 0:e.plural)||this.title},rendered(){return this.column.plural?this.plural:this.title}}},xb={class:"content-type-cell"};function Cb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",xb,t.toDisplayString(o.title),1)}const Vb=C(bb,[["render",Cb],["__scopeId","data-v-f8cf385c"]]),Eb={mixins:[ke],computed:{count(){return this.rosters.reduce(function(e,n){return n.slots.forEach(function(r){e+=r.assignments.length}),e},0)},rosters(){return Object.entries(this.row.join_roster||{}).map(function([n,r]){return{title:n,slots:r.items}})},rosterEnabled(){return this.$sdk.access.hasFeature(this.user,"rostering")?this.$sdk.access.canKnowOf(this.user,"roster")||this.$sdk.access.canKnowOf(this.user,"assignment"):void 0}}},Nb={class:"table-roster-cell"},Tb={class:"event-title"},Sb={class:"event-date"},Bb={class:"event-subtitle"},Db={class:"preview"},Ob={class:"grid"},Mb={class:"face"};function Fb(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-header"),c=t.resolveComponent("ux-avatar"),d=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-row"),u=t.resolveComponent("ux-panel-body"),f=t.resolveComponent("ux-panel"),h=t.resolveComponent("ux-menu");return t.openBlock(),t.createElementBlock("td",Nb,[o.rosterEnabled&&o.count?(t.openBlock(),t.createBlock(h,{key:0,right:"",group:"roster-preview"},{activator:t.withCtx(({on:y})=>[t.createVNode(l,t.mergeProps({size:"sm"},t.toHandlers(y),{icon:"",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",Tb,t.toDisplayString(e.row.title),1),t.createElementVNode("div",Sb,t.toDisplayString(e.$sdk.date.readableEventDate(e.row)),1),t.createElementVNode("div",Bb,t.toDisplayString(e.row.subtitle),1)]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",Db,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.rosters,y=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Ob,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.slots,p=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("h4",null,t.toDisplayString(p.title),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.assignments,_=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["assignment",_.state||"unknown"])},[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",Mb,[t.createVNode(c,{initials:`${_.profile.firstName} ${_.profile.lastName}`,id:_.profile},null,8,["initials","id"])])]),_:2},1024),t.createVNode(d,null,{default:t.withCtx(()=>{var k,w;return[t.createTextVNode(t.toDisplayString((k=_.profile)==null?void 0:k.firstName)+" "+t.toDisplayString((w=_.profile)==null?void 0:w.lastName),1)]}),_:2},1024)]),_:2},1024)],2))),256))]))),256))])]))),256))])]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)])}const Ib=C(Eb,[["render",Fb],["__scopeId","data-v-88720bfa"]]),Ab={mixins:[ke],data(){return{runsheets:[],creating:!1}},created(){var e,n;this.runsheets=((n=(e=this.row.join_runsheet)==null?void 0:e.runsheet)==null?void 0:n.items)||[]},methods:{async addRunsheet(){const e=this;e.creating=!0,e.$sdk.global.create("runsheet",{model:{event:e.row}}).then(function(n){e.runsheets.push(n),e.openRunsheet(n),e.creating=!1},function(n){e.creating=!1})},async openRunsheet(e){const n=this.$sdk.access.canEditItem(this.user,e);return console.log("OPEN",n,e),n?this.editRunsheet(e):this.viewRunsheet(e)},async editRunsheet(e){const n=await this.$sdk.global.edit(e,!0);e.title=n.title},async viewRunsheet(e){const n=await this.$sdk.global.view(e,!0);e.title=n.title}},computed:{count(){var e;return(e=this.runsheets)==null?void 0:e.length}}},Lb={class:"table-roster-cell"},Rb={class:"wrp"},Pb={key:1,class:"hover"};function Ub(e,n,r,i,s,o){const l=t.resolveComponent("ux-button"),a=t.resolveComponent("ux-panel-body"),c=t.resolveComponent("ux-list-item"),d=t.resolveComponent("ux-list"),m=t.resolveComponent("ux-panel"),u=t.resolveComponent("ux-menu"),f=t.resolveComponent("ux-icon"),h=t.resolveDirective("tippy");return t.openBlock(),t.createElementBlock("td",Lb,[t.withDirectives((t.openBlock(),t.createElementBlock("div",Rb,[o.count?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.count>1?(t.openBlock(),t.createBlock(u,{key:0},{activator:t.withCtx(({on:y})=>[t.createVNode(l,t.mergeProps({size:"xs"},t.toHandlers(y),{onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"])),icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1},16)]),default:t.withCtx(()=>[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count)+" Run Sheet"+t.toDisplayString(o.count===1?"":"s"),1)]),_:1}),t.createVNode(d,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.runsheets,y=>(t.openBlock(),t.createBlock(c,{onClick:p=>o.openRunsheet(y)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y.title),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1})]),_:1})):(t.openBlock(),t.createBlock(l,{key:1,size:"xs",icon:"",onClick:n[1]||(n[1]=t.withModifiers(y=>o.openRunsheet(s.runsheets[0]),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1}))],64)):(t.openBlock(),t.createElementBlock("div",Pb,[t.createVNode(l,{size:"xs",icon:"",loading:s.creating,onClick:t.withModifiers(o.addRunsheet,["stop"])},{default:t.withCtx(()=>[t.createVNode(f,{icon:"fa-plus"})]),_:1},8,["loading","onClick"])]))])),[[h,{placement:"bottom",content:`${o.count} Run Sheets`}]])])}const $b=C(Ab,[["render",Ub],["__scopeId","data-v-3ea39cda"]]);function Js(e,n){if(!e||!n)return;const r=n.split("|");n=r[0];const i=r[1];var s=en(e,n);if(s)return i&&Array.isArray(s)?s.filter(function(d){var u;const m=(u=d==null?void 0:d.meta)==null?void 0:u.definition;if(i==="null")return!m;if(m)return m===i}):s;const o=n.split("."),l=o.shift(),a=o.join("."),c=en(e,l);return Array.isArray(c)?c.map(function(d){return Js(d,a)}).flat().filter(Boolean):Js(c,a)}const zb={data(){return{component:null}},components:{ValueRenderer:U1},async created(){const e=this;let n,r=e.column.type,i=e.column.renderer,s=e.column.key;if(!i)switch(s){case"fileSize":i="filesize";break;case"duration":i="duration";break;case"title":i="title";break;case"status":case"paymentStatus":case"meta.status":i="status";break;case"meta.tags":i="tag";break;case"meta.definition":i="type";break}switch(e.column.widget){case"button":break;case"computed":i="computed";break;default:i=i||e.column.widget;break}if(i!=="computed")switch(r){case"boolean":i="boolean";break;case"reference":e.column.referenceType==="image"&&(i="thumbnail");break}switch(i){case"filesize":n=b1;break;case"duration":n=E1;break;case"button":n=n1;break;case"security":n=S1;break;case"boolean":n=um;break;case"roster":n=Ib;break;case"runsheet":n=$b;break;case"personainvite":n=v1;break;case"personaemail":n=J1;break;case"time":case"timefield":n=Hw;break;case"date":case"datetime":n=dm;break;case"due":n=y1;break;case"circles":n=wb;break;case"title":n=ab;break;case"name":n=hb;break;case"type":n=Vb;break;case"complex":n=H1;break;case"status":n=rb;break;case"computed":n=L1;break;case"url":n=mm;break;case"currency":n=Qw;break;case"tag":n=Lw;break;case"avatar":n=zw;break;case"thumbnail":n=Jw;break;default:switch(r){case"date":n=dm;break;case"boolean":n=um;break;case"url":n=mm;break}break}e.component=n},props:{column:{type:Object,required:!0},row:{type:Object,required:!0}},computed:{nowrap(){return this.column.wrap===!1},multiValue(){return Array.isArray(this.value)},renderer(){return this.column.renderer},renderValue(){var e=this.value;if(e!=null)return e.title||e.name||e},value(){var e=Js(this.row,this.column.key);return e}}},jb={class:"value"};function qb(e,n,r,i,s,o){const l=t.resolveComponent("value-renderer");return s.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s.component),{key:0,column:r.column,row:r.row,value:o.value},null,8,["column","row","value"])):(t.openBlock(),t.createElementBlock("td",{key:1,class:t.normalizeClass(["table-cell",{nowrap:o.nowrap}])},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.value,(a,c)=>(t.openBlock(),t.createElementBlock("span",jb,[t.createVNode(l,{type:r.column.type,multi:"",last:c===o.value.length-1,value:a},null,8,["type","last","value"])]))),256)):(t.openBlock(),t.createBlock(l,{key:1,type:r.column.type,value:o.value},null,8,["type","value"]))],2))}const pm=C(zb,[["render",qb],["__scopeId","data-v-47a33145"]]),Wb={components:{TableCell:pm},props:{selected:{type:Boolean},index:{type:Number},row:{type:Object,required:!0},columns:{type:Array,required:!0},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},hasCorner:{type:Boolean,default(){return!1}}},emits:["click:cell","click:row","click:actions","mousedown:select","mouseenter:select"],methods:{clickCell(e){this.$emit("click:cell",{row:this.row,column:e}),this.$emit("click:row",this.row)},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e){this.$emit("mousedown:select",this.row,this.index,e)},mouseenterSelect(){this.$emit("mouseenter:select",this.row,this.index)}},computed:{classes(){var n,r;var e=[];return this.selected&&e.push("selected"),((r=(n=this.row)==null?void 0:n.meta)==null?void 0:r.status)==="inactive"&&e.push("inactive"),e}}},Hb={key:2,class:"table-cell last shrink"};function Gb(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("table-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("tr",{class:t.normalizeClass([o.classes,"table-row"])},[t.renderSlot(e.$slots,"default",{},()=>[r.enableSelection?(t.openBlock(),t.createElementBlock("th",{key:0,class:"table-cell table-select first shrink",onMousedown:n[0]||(n[0]=t.withModifiers((...m)=>o.mousedownSelect&&o.mousedownSelect(...m),["prevent"])),onMouseenter:n[1]||(n[1]=(...m)=>o.mouseenterSelect&&o.mouseenterSelect(...m)),onClick:n[2]||(n[2]=t.withModifiers(()=>{},["stop","prevent"]))},[t.createVNode(l,{value:r.selected},null,8,["value"])],32)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.columns,(m,u)=>(t.openBlock(),t.createBlock(a,{key:`${m.path||m.key}-${u}-${m.type}-${m.renderer}`,onClick:t.withModifiers(f=>o.clickCell(m),["stop","prevent"]),column:m,row:r.row},null,8,["onClick","column","row"]))),128)),r.enableActions?(t.openBlock(),t.createElementBlock("th",{key:1,class:"table-cell last shrink",onClick:n[3]||(n[3]=t.withModifiers(m=>o.clickActions(r.row),["stop","prevent"]))},[t.createVNode(d,{size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-ellipsis"})]),_:1})])):r.hasCorner?(t.openBlock(),t.createElementBlock("th",Hb)):t.createCommentVNode("",!0)],!0)],2)}const Yb=C(Wb,[["render",Gb],["__scopeId","data-v-28bb2cce"]]),ym={data(){return{scrollTop:0}},methods:{updateScroll(e){var n=this.$refs.scroll;n=(n==null?void 0:n.$el)||n,n&&(this.scrollTop=n.scrollTop)}},mounted(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.addEventListener("scroll",this.updateScroll)},beforeUnmount(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&e.removeEventListener("scroll",this.updateScroll)},activated(){var e=this.$refs.scroll;e=(e==null?void 0:e.$el)||e,e&&(e.scrollTop=this.scrollTop)}},Kb={mixins:[ym],components:{TableRow:Yb,TableCell:pm},emits:["update:sort","select:multiple","deselect:multiple","select:multiple","click:row","click:cell","click:actions","select:row:toggle","contextmenu:header"],watch:{rows(){this.$refs.scroll.scroll({top:0,left:0})},sort(e){this.sorting=e},sorting(e){this.$emit("update:sort",e)}},props:{total:{type:Number},columns:{type:Array,default(){return[]}},rows:{type:Array,default(){return[]}},scrollable:{type:Boolean,default(){return!0}},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},sort:{type:Object,default(){return{key:"meta.created",type:"date",direction:"desc"}}},selection:{type:Array,default(){return[]}},selectAll:{type:Function},deselectAll:{type:Function},group:{type:Object,default(){return{}}}},data(){return{sorting:this.sort,lastSelectedIndex:null,lastSelectAction:null,dragging:!1,dragMode:null,dragStart:null}},beforeUnmount(){window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)},computed:{groupedRows(){const e=this.group.key,n=this.group.type||"string";if(e){const{values:r}=this.renderRows.reduce(function(i,s){let o=en(s,e);o=String(o);let l=i.keys[o];return l||(l=i.keys[o]={title:o,rows:[]},i.values.push(l)),i},{values:[],keys:{}});return r}return[{rows:this.renderRows}]},currentSortDirection(){var e;return((e=this.sorting)==null?void 0:e.direction)||"asc"},selectionHash(){var e=this;return e.selection.reduce(function(n,r){var i=r._id||r.id;return n[i]=r,n},{})},pageSelected(){var e=this;if(!(!e.rows||!e.rows.length))return!e.rows.some(function(n){return!e.selectionHash[n._id||n.id]})},renderColumns(){return this.columns.map(function(n){var r=Object.assign({},n);return r.class=[],r.shrink&&r.class.push("shrink"),r})},renderRows(){return this.rows},someSelectedOnPage(){return this.rows.some(this.isSelected)}},methods:{togglePage(){var e=this;e.pageSelected?e.deselectPage():e.selectPage()},selectPage(){var e=this;e.$emit("select:multiple",e.rows)},deselectPage(){var e=this;e.$emit("deselect:multiple",e.rows)},isSelected(e){var n=this,r=e._id||e.id;return n.selection.some(function(i){var s=i._id||i.id;return i==e||s==r})},classes(e){let n=[];return this.isSelected(e)&&n.push("selected"),n},selectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("select:multiple",s)},deselectRange(e,n){const r=Math.min(e,n),i=Math.max(e,n)+1,s=this.renderRows.slice(r,i);this.$emit("deselect:multiple",s)},toggleSort(e){var o,l;const n=(o=this.sorting)==null?void 0:o.key,r=((l=this.sorting)==null?void 0:l.direction)||"asc";let{key:i,direction:s}=e;i===n&&(s=r==="dsc"?"asc":"dsc"),this.sorting={key:i,direction:s,type:e.type}},clickRow(e){this.$emit("click:row",e)},clickCell({row:e,column:n}){this.$emit("click:cell",{row:e,column:n})},clickActions(e){this.$emit("click:actions",e)},mousedownSelect(e,n,r){const s=this.isSelected(e)?"deselect":"select";if(r.shiftKey&&this.lastSelectedIndex!=null&&this.lastSelectedIndex!==n){this.lastSelectAction==="deselect"?this.deselectRange(this.lastSelectedIndex,n):this.selectRange(this.lastSelectedIndex,n),this.lastSelectedIndex=n;return}s==="select"?this.$emit("select:multiple",[e]):this.$emit("deselect:multiple",[e]),this.lastSelectedIndex=n,this.lastSelectAction=s,this.dragMode=s,this.dragStart={x:r.clientX,y:r.clientY},window.addEventListener("mousemove",this.checkDragStart),window.addEventListener("mouseup",this.endDrag,{once:!0})},mouseenterSelect(e,n){if(!this.dragging)return;const r=this.isSelected(e);this.dragMode==="select"&&!r?this.$emit("select:multiple",[e]):this.dragMode==="deselect"&&r&&this.$emit("deselect:multiple",[e])},checkDragStart(e){if(!this.dragStart)return;const n=e.clientX-this.dragStart.x,r=e.clientY-this.dragStart.y;n*n+r*r>=9&&(this.dragging=!0,window.removeEventListener("mousemove",this.checkDragStart))},endDrag(){this.dragging=!1,this.dragMode=null,this.dragStart=null,window.removeEventListener("mouseup",this.endDrag),window.removeEventListener("mousemove",this.checkDragStart)}}},Jb={class:"table-scroll",ref:"scroll"},Zb={key:0,class:"first table-select shrink"},Xb=["onClick"],Qb={key:1,class:"last shrink"},vb={key:0};function ex(e,n,r,i,s,o){const l=t.resolveComponent("ux-checkbox"),a=t.resolveComponent("ux-list-item"),c=t.resolveComponent("ux-list"),d=t.resolveComponent("ux-menu"),m=t.resolveComponent("flex-cell"),u=t.resolveComponent("flex-row"),f=t.resolveComponent("table-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["table-wrapper",{dragging:s.dragging}]),onMouseup:n[5]||(n[5]=(...h)=>o.endDrag&&o.endDrag(...h))},[t.createElementVNode("div",Jb,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[t.createElementVNode("tr",{onContextmenu:n[4]||(n[4]=t.withModifiers(h=>e.$emit("contextmenu:header",h),["prevent"]))},[r.enableSelection?(t.openBlock(),t.createElementBlock("th",Zb,[t.createVNode(d,null,{activator:t.withCtx(({on:h})=>[t.createVNode(l,t.mergeProps(t.toHandlers(h),{value:o.pageSelected}),null,16,["value"])]),default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(a,{onClick:n[0]||(n[0]=h=>o.selectPage())},{default:t.withCtx(()=>[...n[6]||(n[6]=[t.createTextVNode(" Select Page ",-1)])]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[1]||(n[1]=h=>o.deselectPage())},{default:t.withCtx(()=>[...n[7]||(n[7]=[t.createTextVNode(" Deselect Page ",-1)])]),_:1})):t.createCommentVNode("",!0),r.selectAll?(t.openBlock(),t.createBlock(a,{key:1,onClick:n[2]||(n[2]=h=>r.selectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Select All ("+t.toDisplayString(r.total)+") ",1)]),_:1})):t.createCommentVNode("",!0),r.deselectAll?(t.openBlock(),t.createBlock(a,{key:2,onClick:n[3]||(n[3]=h=>r.deselectAll())},{default:t.withCtx(()=>[...n[8]||(n[8]=[t.createTextVNode(" Deselect All ",-1)])]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,h=>{var y;return t.openBlock(),t.createElementBlock("th",{onClick:p=>o.toggleSort(h),class:t.normalizeClass([{sortable:h.sortable!==!1,active:h.key===((y=s.sorting)==null?void 0:y.key)},h.class])},[t.createVNode(u,{gap:"",vcenter:""},{default:t.withCtx(()=>{var p;return[t.createVNode(m,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.title),1)]),_:2},1024),h.key===((p=s.sorting)==null?void 0:p.key)?(t.openBlock(),t.createBlock(m,{key:0,class:"caret",shrink:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.currentSortDirection==="asc"?"▲":"▼"),1)]),_:1})):t.createCommentVNode("",!0)]}),_:2},1024)],10,Xb)}),256)),r.enableActions||e.$slots.corner?(t.openBlock(),t.createElementBlock("th",Qb,[t.renderSlot(e.$slots,"corner",{},void 0,!0)])):t.createCommentVNode("",!0)],32)]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.groupedRows,h=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[h.title?(t.openBlock(),t.createElementBlock("tr",vb,[t.createElementVNode("td",null,t.toDisplayString(h.title),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.rows,(y,p)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,hasCorner:!!e.$slots.corner,key:y._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onMousedown:select":o.mousedownSelect,"onMouseenter:select":o.mouseenterSelect,"onClick:actions":o.clickActions,selected:o.isSelected(y),row:y,index:p,columns:r.columns},null,8,["enableSelection","enableActions","hasCorner","onClick:cell","onClick:row","onMousedown:select","onMouseenter:select","onClick:actions","selected","row","index","columns"]))),128))],64))),256))])])],512)],34)}const gm=C(Kb,[["render",ex],["__scopeId","data-v-faa7539a"]]);var _o={exports:{}},km;function tx(){if(km)return _o.exports;km=1;var e=Object.prototype.hasOwnProperty;function n(s){return"[Throws: "+(s?s.message:"?")+"]"}function r(s,o){if(e.call(s,o))try{return s[o]}catch(l){return n(l)}return s[o]}function i(s){var o=[];function l(a){if(a===null||typeof a!="object")return a;if(o.indexOf(a)!==-1)return"[Circular]";if(o.push(a),typeof a.toJSON=="function")try{var c=l(a.toJSON());return o.pop(),c}catch(u){return n(u)}if(Array.isArray(a)){var d=a.map(l);return o.pop(),d}var m=Object.keys(a).reduce(function(u,f){return u[f]=l(r(a,f)),u},{});return o.pop(),m}return l(s)}return _o.exports=function(s,o,l){return JSON.stringify(i(s),o,l)},_o.exports.ensureProperties=i,_o.exports}var nx=tx();const Zs=vt(nx);function rx(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function Xs(e){return e!=null}const Z={emits:["touched","update:modelValue"],props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{dynamicOptions:[],asyncOptionsAreLoading:this.field.asyncOptions,value:this.modelValue}},watch:{modelValue(e,n){this.model=e}},mounted(){this.checkAutofocus()},async created(){const e=this;e.hasAsyncOptions&&await e.reloadAsyncOptions()},inject:{form:{default(){}},fieldPath:{default(){}}},computed:{asyncOptionsURL(){const e=this;if(e.field.asyncOptions&&String(e.field.asyncOptions||"").trim().length)return e.field.asyncOptions;if(e.field.dynamicOptions){const n=e.$sdk.utils.id(e.field.dynamicOptions);if(n)return e.$sdk.api.generateEndpointURL(`/smartlist/${n}/select`)}},hasAuthenticationToken(){return this.$sdk.auth.getCurrentToken()},hasAsyncOptions(){var e;if(this.asyncOptionsURL)return!0;if(this.field.type==="reference"){if((e=this.field.allowedReferences)!=null&&e.length)return!1;switch(this.field.widget){case"select":if(this.hasAuthenticationToken)return!0;break;default:return!1}if(this.field.lockFilter)return!0}return!1},loadingAsyncOptions(){return this.hasAsyncOptions&&this.asyncOptionsAreLoading},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},selectableOptions(){return this.options},required(){return this.minimum},model:{get(){var e=this.cleanOutput(this.value);return e},set(e){let n;(this.isGroup||this.widget==="form")&&(e===this.value?n=!1:n=!0);const r=this.cleanInput(e),i=this.cleanInput(this.value);(Zs(r)!=Zs(i)||n)&&(this.value=r,this.checkAutofocus(),this.dispatch())}},options(){var e=this;if(e.field.type==="reference"){const n=(e.field.allowedReferences||[]).filter(Boolean);if(n.length)return n.map(function(r){let{_id:i,title:s}=r;return s=s||[r.firstName,r.lastName].filter(Boolean).join(" "),{title:s,value:i,_id:i}})}return e.hasAsyncOptions?e.dynamicOptions:(e.field.options||[]).reduce(function(n,r){if(!r)return n;const i=e.getValue(r);var o={title:r.title||r.name||r.label||i,value:i,none:r.none,group:r.group,source:r};return e.field.type=="reference"&&(o._id=i),n.push(o),n},[])},prefix(){return this.field.suffix},suffix(){return this.field.suffix},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},canAddValue(){if(!this.singleValue&&!(this.options.length&&this.selectableOptions.length===0))return this.maximum===0||this.numValues<this.maximum},canRemoveValue(){return this.numValues>this.minimum},widget(){return this.field.widget},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},multiValue(){return!this.singleValue},label(){return this.field.title},title(){return this.label},plural(){return this.field.plural},description(){return this.field.description},placeholder(){return this.field.placeholder||this.field.hint},addLabel(){return this.field.addLabel?this.field.addLabel:this.numValues?`Add another ${this.label}`:`Add ${this.label}`},removeLabel(){return"Remove"},size(){return this.field.size},numValues(){return this.singleValue?1:(this.value||[]).length||0},showLabel(){return this.field.title&&!this.field.hideTitle},showDescription(){return this.description},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)},ask(){var e=parseInt(this.field.ask);return e=Math.max(e,this.minimum),this.maximum&&(e=Math.min(e,this.maximum)),e},minDate(){if(this.field.minDate)return new Date(this.field.minDate)},maxDate(){if(this.field.maxDate)return new Date(this.field.maxDate)}},methods:{async reloadAsyncOptions(){const e=this;if(!e.hasAsyncOptions){e.asyncOptionsAreLoading=!1;return}if(e.asyncOptionsAreLoading=!0,e.asyncOptionsURL){const{data:n}=await e.$sdk.api.get(e.asyncOptionsURL);e.dynamicOptions=(n||[]).map(function(r){let i=r==null?void 0:r.title;i||(i=r==null?void 0:r.name),i||(i=r==null?void 0:r.label),i||(i=[r.firstName,r.lastName].filter(Boolean).join(" ").trim()),i||(i=r.value||String(r));const s=String((r==null?void 0:r.value)||(r==null?void 0:r.title)||(r==null?void 0:r.name)||(r==null?void 0:r.label)||r),o=e.$sdk.utils.id((r==null?void 0:r._id)||r);return{title:i,value:s,_id:o}})}else if(e.hasAuthenticationToken){const n=e.field.referenceType,r={filter:e.field.lockFilter,sort:{key:"title",direction:"asc",type:"string"},page:{size:1e3}},{items:i}=await e.$sdk.content.list(n,r);e.dynamicOptions=i.map(function({_id:s,title:o}){return{value:s,title:o,_id:s}})}e.asyncOptionsAreLoading=!1},cleanTextInput(e,n,r){switch(n){case"url":e=r.$sdk.utils.parseURL(e);break;case"key":e=String(r.$sdk.utils.machineName(e||"")||"").trim();break;case"integer":e=parseInt(String(e).replace(/[^0-9-]/g,"")),isNaN(e)&&(e=void 0);break;case"number":case"decimal":case"float":e=Number(String(e).replace(/[^0-9.-]/g,"")),isNaN(e)&&(e=void 0);break}return e},checkAutofocus(){if(this.field.autofocus){if(this.value)return;this.$nextTick(function(){this.refocus()})}},getValue(e){if(!e)return this.cleanTextInput(e);var n=this.cleanTextInput(e._id||e.value),r=Xs(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),Xs(n)?n:e},getLabel(e){if(e){var n=e.title;return!n&&n!==0&&n!==!1&&(n=e.name),!n&&n!==0&&n!==!1&&(n=e.label),!n&&n!==0&&n!==!1&&(n=e.value),typeof n=="object"?"(no title)":n}},touch(){this.$emit("touched")},getNewDefaultEntry(){},add(){if(this.canAddValue){var e=this.cleanInputValue(this.getNewDefaultEntry());(!this.value||!Array.isArray(this.value))&&(this.value=[]),this.value.push(e),this.dispatch(),this.$nextTick(function(){this.refocus()}),this.touch()}},remove(e){var n=this.model.indexOf(e);this.model.splice(n,1),this.dispatch(),this.touch()},dispatch(){this.$emit("update:modelValue",this.value)},cleanInputValue(e){return e},cleanOutputValue(e){return e},cleanOutput(e){var n=this;return rx(e,n.field.type)?n.multiValue?e=[]:e=void 0:n.multiValue?(Array.isArray(e)||(e=[]),e.forEach(function(r,i){e[i]=n.cleanOutputValue(r)})):e=n.cleanOutputValue(e),e},cleanInput(e){var n=this;if(n.multiValue){for(e||(e=[]),Array.isArray(e)||(e=[e]),e=e.filter(Xs),n.maximum&&e.length>n.maximum&&(e.length=n.maximum);e.length<n.minimum;)e.push(n.cleanInputValue(n.getNewDefaultEntry()));e=e.map(function(r){var i=n.cleanInputValue(r);return i})}else e&&(e=n.cleanInputValue(e));return e},refocus(){var r;var e=this.$refs.input;if(e){var n;Array.isArray(e)?n=e[e.length-1]:n=e,n&&(typeof n.focus=="function"?n.focus():typeof((r=n.$el)==null?void 0:r.focus)=="function"&&n.$el.focus())}}}};function ox(e){return e===void 0||typeof e>"u"||e===null||String(e)==="null"||String(e)==="undefined"}const ix={data(){return{candidate:null}},props:{modelValue:{},pills:{type:Boolean,default:!1}},mixins:[Z],created(){this.model=this.model},methods:{maybeAutoSelectSingleOption(){if(this.loadingAsyncOptions||!this.singleValue||!this.minimum||this.model||this.model===!1||this.model===0)return;const e=this.selectableOptions.filter(function(n){return!n.none});e.length===1&&(this.model=e[0])},displayLabelFromValue(e){if(!e)return;const n=e.value||e,r=this.optionLookup[n]||{};return r.title||r.name||e.title||e.value||e},addValue(e){this.canAddValue&&this.model.indexOf(e)===-1&&(this.model=[...this.model,e])},removeValue(e){var n=this.model.slice();e!=-1&&(n.splice(e,1),this.model=n)},cleanOutput(e){var n=this;return ox(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(function(r){return r!=null}).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(function(i){return i!=null}).map(function(i){var s=n.getValue(i);return n.returnObject?n.optionLookup[s]:s});else{var r=n.getValue(e);switch(e=n.returnObject?n.optionLookup[r]:r,e){case"":switch(n.type){case"decimal":case"float":case"number":case"integer":e=void 0;break}break}}return e}},watch:{candidate(e){e&&(this.addValue(e),this.candidate=null)},selectableOptions:{immediate:!0,handler(){this.maybeAutoSelectSingleOption()}},loadingAsyncOptions(){this.maybeAutoSelectSingleOption()}},computed:{noneTitle(){return this.field.placeholder||"None"},usePills(){return this.field.pills||this.pills},returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),this.usePills&&e.push("pills"),e},summary(){if(this.multiValue)return"Select an option";const e=this.selectableOptions.find(function(i){return i.none}),n=(e==null?void 0:e.title)||(e==null?void 0:e.label),r=this.model;return r||r===!1||r===0?this.getLabel(this.optionLookup[this.model]):n||this.noneTitle||this.title||"Click to select"},grouped(){const e=this,{values:n}=e.selectableOptions.reduce(function(r,i){const s=i.group||"";let o=r.hash[s];return o||(o=r.hash[s]={title:s,options:[]},r.values.push(o)),o.options.push(i),r},{hash:{},values:[]});if(!(n.length<=1))return n},modelLookup(){var e=this;return e.multiValue?e.model.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{}):{}},selectableOptions(){var r;const e=this;let n=e.options;return e.multiValue&&(n=n.filter(function(i){return!e.modelLookup[e.getValue(i)]})),(r=e.field)!=null&&r.sorted?n.sort(function(i,s){var o=(i.title||i).toLowerCase(),l=(s.title||s).toLowerCase();return o<l?-1:o>l?1:0}):n},showNoneOption(){return!(!(this.singleValue&&!this.minimum)||this.selectableOptions.find(function(r){return r.none}))}}},sx={key:0,class:"ux-field-title"},lx={key:0,class:"ux-required-marker"},ax={key:1,class:"ux-field-description"},cx={key:2,class:"select-tags"},dx=["onClick"],ux={key:3},mx={key:4,class:"select-input-wrapper"},fx={class:"ui-select-button"},hx=["label"],px=["value"],yx=["value"],gx={class:"ui-select-button"},kx=["multiple"],_x={key:0,value:""},wx=["label"],bx=["value"],xx=["value"];function Cx(e,n,r,i,s,o){var m,u;const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",sx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",lx,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",ax,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",cx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(f,h)=>(t.openBlock(),t.createElementBlock("div",{class:"select-tag",key:f.value||f},[t.createVNode(c,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.displayLabelFromValue(f)),1)]),_:2},1024),t.createVNode(l,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("a",{onClick:y=>o.removeValue(h)},[t.createVNode(a,{icon:"fa-times"})],8,dx)]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.loadingAsyncOptions?(t.openBlock(),t.createElementBlock("div",ux,[t.createVNode(a,{icon:"fa-spinner",spin:"",left:""}),n[4]||(n[4]=t.createTextVNode(" Loading Options ",-1))])):(t.openBlock(),t.createElementBlock("div",mx,[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.canAddValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",fx,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),"onUpdate:modelValue":n[1]||(n[1]=f=>s.candidate=f),key:(m=e.model)==null?void 0:m.length},[n[5]||(n[5]=t.createElementVNode("option",{value:""},"Select an option",-1)),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,px))),256))],8,hx))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,yx))),256))],32)),[[t.vModelSelect,s.candidate]])],64)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",gx,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(d,{size:e.size,tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["size"])],!0)]),t.withDirectives((t.openBlock(),t.createElementBlock("select",{onFocus:n[2]||(n[2]=(...f)=>e.touch&&e.touch(...f)),multiple:e.multiValue,"onUpdate:modelValue":n[3]||(n[3]=f=>e.model=f),key:(u=e.model)==null?void 0:u.length},[o.showNoneOption?(t.openBlock(),t.createElementBlock("option",_x,t.toDisplayString(o.noneTitle),1)):t.createCommentVNode("",!0),o.grouped?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.grouped,f=>(t.openBlock(),t.createElementBlock("optgroup",{label:f.title,key:f.title},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,h=>(t.openBlock(),t.createElementBlock("option",{value:h.value},t.toDisplayString(h.title),9,bx))),256))],8,wx))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(o.selectableOptions,f=>(t.openBlock(),t.createElementBlock("option",{value:f.value},t.toDisplayString(f.title),9,xx))),256))],40,kx)),[[t.vModelSelect,e.model]])],64))]))],2)}const St=C(ix,[["render",Cx],["__scopeId","data-v-bf1479ae"]]),Vx={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}},sizeOptions:{type:Array,default(){return[50,100,250,500]}}},components:{NativeSelect:St},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:this.sizeOptions.map(function(e){return{title:`${e} per page`,value:e}})}}}};function Ex(e,n,r,i,s,o){const l=t.resolveComponent("native-select"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),m=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(m,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=u=>o.perPage=u),field:s.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a),o.totalPages>1?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(a,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(l,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=u=>o.currentPage=u),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[2]||(n[2]=u=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:"",onClick:n[3]||(n[3]=u=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}const _m=C(Vx,[["render",Ex],["__scopeId","data-v-93d339c8"]]);function Nx(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function wm(e){return typeof e=="function"?e():t.unref(e)}const Tx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Sx=e=>e!=null,Qs=()=>{};function vs(e){var n;const r=wm(e);return(n=r==null?void 0:r.$el)!=null?n:r}const Bx=Tx?window:void 0;function Dx(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function Ox(e){const n=Dx();return t.computed(()=>(n.value,!!e()))}function Mx(e,n,r={}){const{root:i,rootMargin:s="0px",threshold:o=.1,window:l=Bx,immediate:a=!0}=r,c=Ox(()=>l&&"IntersectionObserver"in l),d=t.computed(()=>{const y=wm(e);return(Array.isArray(y)?y:[y]).map(vs).filter(Sx)});let m=Qs;const u=t.ref(a),f=c.value?t.watch(()=>[d.value,vs(i),u.value],([y,p])=>{if(m(),!u.value||!y.length)return;const _=new IntersectionObserver(n,{root:vs(p),rootMargin:s,threshold:o});y.forEach(k=>k&&_.observe(k)),m=()=>{_.disconnect(),m=Qs}},{immediate:a,flush:"post"}):Qs,h=()=>{m(),f(),u.value=!1};return Nx(h),{isSupported:c,isActive:u,pause(){m(),u.value=!1},resume(){u.value=!0},stop:h}}const Fx={setup(){const e=t.ref(!1),n=t.ref(),{stop:r}=Mx(n,([{isIntersecting:i}])=>{i&&(e.value=!0,r())},{rootMargin:"600px"});return{targetEl:n,shouldRender:e}}},Ix={ref:"targetEl"};function Ax(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ix,[i.shouldRender?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)],512)}const bm=C(Fx,[["render",Ax]]),Lx={props:{icon:{type:[Object,String],default(){return"fa-exclamation"}},type:{type:String,default:"info"}},computed:{classes(){var e=[];return e.push(`ux-info-${this.type}`),e}}},Rx={class:"icon-circle"};function Px(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-info-box",o.classes])},[t.createVNode(c,{style:{gap:"1em"},center:""},{default:t.withCtx(()=>[r.icon?(t.openBlock(),t.createBlock(a,{key:0,shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",Rx,[t.createVNode(l,{icon:r.icon},null,8,["icon"])])]),_:1})):t.createCommentVNode("",!0),t.createVNode(a,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})],2)}const xm=C(Lx,[["render",Px],["__scopeId","data-v-9669e7c0"]]),Ux={props:{id:{type:[Object,String]},initials:{type:[String,Object]},cacheKey:{type:[String,Number]}},data(){return{stringID:this.$sdk.utils.id(this.id)}},watch:{id(e){this.stringID=this.$sdk.utils.id(e)}},computed:{initialString(){var s,o,l;if(typeof this.initials=="string")return this.initials;const e=((s=this.initials)==null?void 0:s.firstName)||"",n=((o=this.initials)==null?void 0:o.lastName)||"",r=`${e} ${n}`.trim(),i=(l=this.initials)==null?void 0:l.title;return r||i},initialLetters(){const e=this.initialString||"";if(!e||!e.length)return"";const n=e.split(/\s+/);let r="";return n[0]&&(r+=String(n[0][0]||"").toUpperCase()),n[1]&&(r+=String(n[1][0]||"").toUpperCase()),r},url(){const e={};return this.cacheKey&&(e.cacheKey=this.cacheKey),this.$sdk.api.generateEndpointURL(`/image/${this.stringID}`,e,{file:!0})},style(){const e={};return e.backgroundImage=`url(${this.url})`,e}}},$x={key:0,class:"initials"};function zx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["avatar-image",{"with-initials":o.initialLetters}])},[o.initialLetters?(t.openBlock(),t.createElementBlock("div",$x,t.toDisplayString(o.initialLetters),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"avatar-img",style:t.normalizeStyle(o.style)},null,4)],2)}const el=C(Ux,[["render",zx],["__scopeId","data-v-f8d86e04"]]),jx={props:{large:{type:Boolean}}};function qx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},[...n[0]||(n[0]=[t.createElementVNode("svg",{width:"24",height:"24",stroke:"#000",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("g",{class:"spinner_V8m1"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"9.5",fill:"none","stroke-width":"2"})])],-1)])],2)}const bn=C(jx,[["render",qx],["__scopeId","data-v-d9a57955"]]),Wx={components:{Spinner:bn},props:{to:{type:[Object,String]},icon:{type:Boolean},color:{type:String,default:"default"},bgColor:{type:String},fgColor:{type:String},tag:{type:String},href:{type:String},target:{type:String},loading:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},size:{type:String,default:"md"}},computed:{style(){var e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.fgColor&&(e.color=this.fgColor),e},classes(){var e=[];return e.push(`ux-btn-${this.size}`),this.block&&e.push("ux-btn-block"),this.loading&&e.push("ux-btn-loading"),this.active&&e.push("ux-btn-active"),this.icon&&e.push("ux-btn-icon"),e.push(`ux-btn-color-${this.color}`),this.disabled&&e.push("ux-btn-disabled"),e},element(){switch(this.tag){case"span":return this.tag;case"submit":return"button";default:return this.to||this.href?"ux-link":this.tag||"button"}}}},Hx={class:"ux-btn-text"};function Gx(e,n,r,i,s,o){const l=t.resolveComponent("spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{type:"button",active:r.active,loading:r.loading,to:r.to,href:r.href,target:r.target,style:t.normalizeStyle(o.style),class:t.normalizeClass([o.classes,"ux-btn"]),disabled:r.disabled},{default:t.withCtx(()=>[r.loading?(t.openBlock(),t.createBlock(l,{key:0})):t.createCommentVNode("",!0),t.createElementVNode("span",Hx,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}const Cm=C(Wx,[["render",Gx],["__scopeId","data-v-ea56e98b"]]),Yx={},Kx={class:"ux-btn-group"};function Jx(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Kx,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Vm=C(Yx,[["render",Jx],["__scopeId","data-v-a0ecb730"]]),Zx={props:{value:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-checkbox-true"):e.push("ux-checkbox-false"),e}}};function Xx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["ux-checkbox",o.classes])},[t.createVNode(l,{class:"icon",icon:"fa-check"})],2)}const wo=C(Zx,[["render",Xx],["__scopeId","data-v-54bb07ba"]]),Qx={props:{value:{type:Boolean,default(){return!1}},loading:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-switch-true"):e.push("ux-switch-false"),this.loading&&e.push("ux-switch-loading"),e}}};function vx(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["ux-switch",o.classes])},[t.createElementVNode("span",null,[t.createVNode(l,{spin:"",icon:"fa-spinner"})])],2)}const tl=C(Qx,[["render",vx],["__scopeId","data-v-1a0e83ee"]]),eC={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean},active:{type:Boolean}},methods:{clicked(e){var n=this;if(n.to&&(n.buildMode||n.nuxtMode))return e.preventDefault(),e.stopImmediatePropagation(),n.$sdk.app.to(n.to);if(n.href){if(n.buildMode){e.preventDefault(),window.open(n.href);return}if(n.nuxtMode){e.preventDefault(),e.stopImmediatePropagation();return}}}},computed:{actualHref(){if(this.href)return this.href;if(this.nuxtMode)return this.to?this.$sdk.app.createHref(this.to):void 0;if(this.to&&this.$router&&this.$router.resolve){const e=this.$router;this.$route;const n=!1,{location:r,route:i,href:s}=e.resolve(this.to,this.$route,n);return s}},nuxtMode(){return this.to&&this.$sdk.nuxt&&this.$sdk.app&&this.$sdk.app.createHref},buildMode(){return!!this.$sdk&&this.$sdk.app&&this.$sdk.app.builder},class(){var e=[];return this.disabled&&e.push("disabled"),this.active&&e.push("active"),(this.href||this.to)&&e.push("haslink"),e},element(){return this.nuxtMode||this.buildMode?"a":this.to?"router-link":"a"}}};function tC(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{onClick:o.clicked,to:r.to,href:o.actualHref,target:r.target,class:t.normalizeClass([o.class,"ux-link"])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onClick","to","href","target","class"])}const Em=C(eC,[["render",tC],["__scopeId","data-v-7a924ee2"]]),nC={props:{icon:{type:[Object,String]},spin:{type:Boolean},left:{type:Boolean},right:{type:Boolean},fixed:{type:Boolean}},computed:{useSvgLayout(){return!!this.$slots.default||!this.icon},modifierClasses(){var e=[];return this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),this.fixed&&e.push("ux-icon-fixed"),e},iconClasses(){return[this.icon,...this.modifierClasses]}}};function rC(e,n,r,i,s,o){return o.useSvgLayout?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["ux-icon ux-icon-svg",o.modifierClasses])},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)):(t.openBlock(),t.createElementBlock("i",{key:1,class:t.normalizeClass(["ux-icon fa",o.iconClasses])},null,2))}const Nm=C(nC,[["render",rC],["__scopeId","data-v-d3c61976"]]),bo={cache:{}},oC={props:{group:{type:String},right:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},stop:{type:Boolean,default:!1},flex:{type:Boolean,default:!1},overflow:{type:Boolean},closeOnClick:{type:Boolean,default:!0},visible:{type:Boolean,default:!0},modelValue:{type:Boolean,default:!1}},data(){return{outerStyle:{},innerStyle:{},anchorRect:null,isExpanded:this.modelValue,isVisible:this.visible,triggerEvent:null,refMenu:null,mounted:!1,repositionFrame:null,resizeObserver:null}},watch:{modelValue(e){this.expanded=e},visible(e){this.isVisible=e}},mounted(){this.refMenu=this.$refs.menu,this.mounted=!0},beforeUnmount(){this.removeListeners(),this.refMenu=null,this.mounted=!1,bo.cache[this.group]===this&&(bo.cache[this.group]=null)},methods:{removeListeners(){document.removeEventListener("click",this.globalClick),window.removeEventListener("resize",this.scheduleReposition),window.removeEventListener("scroll",this.scheduleReposition,!0),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.repositionFrame&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=null),this.refMenu&&this.refMenu.removeEventListener("click",this.immediateClick)},addEventListeners(){document.addEventListener("click",this.globalClick),window.addEventListener("resize",this.scheduleReposition),window.addEventListener("scroll",this.scheduleReposition,!0),this.$nextTick(()=>{const e=this.$refs.menu;!e||!this.isExpanded||typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(this.scheduleReposition),this.resizeObserver.observe(e))}),this.refMenu&&this.refMenu.addEventListener("click",this.immediateClick)},scheduleReposition(){this.repositionFrame||(this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=null,this.isExpanded&&this.position()}))},immediateClick(e){this.expanded&&this.closeOnClick&&(e.stopImmediatePropagation(),this.expanded=!1)},globalClick(e){if(this.triggerEvent===e)return;var n=this.$refs.menu,r=e.target||e.srcElement;if(r&&r.isConnected===!1)return;if(n&&n.contains(r)){this.closeOnClick&&(this.expanded=!1);return}const i=r.closest&&r.closest(".ux-menu-outer, .modal-wrapper");i&&!i.contains(this.$el)||(this.expanded=!1)},position(){const e=this.anchorRect||this.$el.getBoundingClientRect();let n=e.left+window.scrollX,r=e.bottom+window.scrollY;this.outerStyle.left=`${n}px`,this.outerStyle.top=`${r}px`,this.innerStyle={},this.right&&!this.anchorRect&&(this.innerStyle.right=`-${e.width}px`),this.bottom&&!this.anchorRect&&(this.innerStyle.bottom=`${e.height}px`);var i=this.getMaxZIndex();this.outerStyle.zIndex=i,this.$nextTick(()=>{this.adjustForViewportBoundaries(e)})},adjustForViewportBoundaries(e){const n=this.$refs.menu;if(!n)return;const r=n.getBoundingClientRect(),i={height:window.innerHeight},s=r.bottom>i.height,o=e.top,l=i.height-e.bottom;s&&o>l&&!this.anchorRect?(this.innerStyle={...this.innerStyle,bottom:`${e.height}px`},this.$nextTick(()=>this.ensureWithinViewport())):this.ensureWithinViewport()},ensureWithinViewport(){const e=this.$refs.menu;if(!e)return;const n=e.getBoundingClientRect(),r={width:window.innerWidth,height:window.innerHeight};let i=parseInt(this.outerStyle.left)||0,s=parseInt(this.outerStyle.top)||0;n.right>r.width&&(i-=n.right-r.width+10),n.left<0&&(i+=Math.abs(n.left)+10),n.bottom>r.height&&(s-=n.bottom-r.height+10),n.top<0&&(s+=Math.abs(n.top)+10),this.outerStyle.left=`${Math.max(0,i)}px`,this.outerStyle.top=`${Math.max(0,s)}px`},getMaxZIndex(){return Math.max(...Array.from(document.querySelectorAll("body *"),e=>parseFloat(window.getComputedStyle(e).zIndex)).filter(e=>!Number.isNaN(e)),0)},close(){this.expanded=!1},openAt(e,n){this.anchorRect={left:e,right:e,top:n,bottom:n,width:0,height:0},this.isExpanded?this.position():this.expanded=!0}},computed:{expanded:{get(){return this.isExpanded},set(e){var n;this.group&&(n=bo.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),bo.cache[this.group]=this,n&&n!=this&&(n.expanded=!1)):(this.removeListeners(),this.anchorRect=null),this.$emit("update:modelValue",e))}},on(){var e=this;return{click(n){e.stop&&n.stopImmediatePropagation(),e.triggerEvent=n,e.expanded=!e.expanded}}}}};function iC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-menu",{right:r.right}])},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"activator",{on:o.on},void 0,!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"ux-menu-transition",appear:""},{default:t.withCtx(()=>[s.isExpanded?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-menu-outer",style:t.normalizeStyle(s.outerStyle)},[t.createElementVNode("div",{class:t.normalizeClass(["ux-menu-panel",{flex:r.flex,overflow:r.overflow}]),ref:"menu",style:t.normalizeStyle(s.innerStyle)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],4)),[[t.vShow,s.isVisible]]):t.createCommentVNode("",!0)]),_:3})]))],2)}const Tm=C(oC,[["render",iC],["__scopeId","data-v-54043858"]]),sC={name:"menulist",props:{items:{type:Array,default(){return[]}},depth:{type:Number,default:0},expandOn:{type:String,default:"none"},isolate:{type:Boolean,default:!0},collapseOnRouteChange:{type:Boolean,default:!0},displayCaret:{type:Boolean,default:!0}},mounted(){this.mounted=!0,this.addRouteChangeListeners()},beforeUnmount(){this.mounted=!1,this.removeRouteChangeListeners(),this.removeListeners()},computed:{actualDepth(){const e=this.depth;return isNaN(e)||!parseInt(e)?0:Math.max(e,0)},filteredItems(){const e=this;let n=e.tree.filter(function(r){return!(r.advancedOptions&&e.$sdk.utils.checkContextVisibility&&!e.$sdk.utils.checkContextVisibility(r.contextVisibility)||r.disabled)});return this.actualDepth===1&&(n=n.map(function(r){return{...r,items:[]}})),n}},data(){return{currentExpandedItems:[],tree:JSON.parse(JSON.stringify(this.items))}},methods:{globalClick(e){this.collapseAll()},routeChanged(){this.collapseOnRouteChange&&this.collapseAll()},addRouteChangeListeners(){this.$sdk.addEventListener("route:change",this.routeChanged)},removeRouteChangeListeners(){this.$sdk.removeEventListener("route:change",this.routeChanged)},addListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.addEventListener("click",this.globalClick)},removeListeners(){var n;const e=(n=this.$el)==null?void 0:n.ownerDocument;e&&e.body.removeEventListener("click",this.globalClick)},expandItem(e){e.expanded=!0,this.currentExpandedItems.push(e)},collapseItem(e){const n=this.currentExpandedItems.indexOf(e);n!==-1&&(e.expanded=!1,this.currentExpandedItems.splice(n,1))},collapseAll(){this.currentExpandedItems.forEach(function(e){e.expanded=!1}),this.currentExpandedItems=[],this.currentExpandedItems.length?this.addListeners():this.removeListeners()},toggle(e){const n=e.expanded;this.isolate&&(this.currentExpandedItems.forEach(function(i){i.expanded=!1}),this.currentExpandedItems=[]);const r=this.currentExpandedItems.indexOf(e);n||r!==-1?this.collapseItem(e):this.expandItem(e),this.currentExpandedItems.length?this.addListeners():this.removeListeners()}},watch:{items:{handler(e){this.tree=JSON.parse(JSON.stringify(e))},deep:!0}}};function lC(e,n,r,i,s,o){const l=t.resolveComponent("flex-cell"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("ux-link"),m=t.resolveComponent("menulist",!0);return t.openBlock(),t.createElementBlock("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.filteredItems,u=>{var f;return t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass({expanded:u.expanded,collapsed:!u.expanded}),key:u.title},[r.expandOn==="click"&&((f=u.items)!=null&&f.length)?(t.openBlock(),t.createBlock(d,{key:0,onClick:t.withModifiers(h=>o.toggle(u),["stop","prevent"]),class:t.normalizeClass(u.class)},{default:t.withCtx(()=>[t.createVNode(c,{center:""},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1024),r.displayCaret?(t.openBlock(),t.createBlock(l,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{class:"caret",icon:"fa-angle-down"})]),_:1})):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["onClick","class"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[u.type==="url"?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass(u.class),target:u.target,href:u.href||u.url},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","target","href"])):u.type==="route"?(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass(u.class),to:{name:u.route}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u.title),1)]),_:2},1032,["class","to"])):t.createCommentVNode("",!0)],64)),u.items&&u.items.length?(t.openBlock(),t.createBlock(m,{key:2,expandOn:r.expandOn,items:u.items,displayCaret:r.displayCaret,isolate:r.isolate,depth:o.actualDepth-1},null,8,["expandOn","items","displayCaret","isolate","depth"])):t.createCommentVNode("",!0)],2)}),128))])}const Sm=C(sC,[["render",lC],["__scopeId","data-v-601e888e"]]),aC={props:{item:{type:[Object,String]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},auto:{type:Boolean,default:!0},inline:{type:Boolean},quality:{type:[Number,String]},contain:{type:Boolean,default:!0},preview:{type:Boolean,default:!1},crop:{type:Boolean},cover:{type:Boolean},format:{type:String},upscale:{type:Boolean,default:!0},type:{type:String,default:"image"},svg:{type:Boolean},lazy:{type:Boolean},eager:{type:Boolean}},data(){return{model:this.item,retries:0,cacheBuster:0,retryTimer:null}},watch:{item(e){this.model=e}},beforeMount(){this.$sdk.auth.ensureValidToken().catch(()=>{})},mounted(){const e=this.$refs.img;e&&e.addEventListener("error",this.imageLoadError)},beforeUnmount(){const e=this.$refs.img;e&&e.removeEventListener("error",this.imageLoadError)},methods:{imageLoadError(e){const n=this;n.retryTimer&&(clearTimeout(n.retryTimer),n.retryTimer=!1),n.retryTimer=setTimeout(function(){n.retries<5&&(n.cacheBuster++,n.retries++)},500)}},computed:{actualFormat(){var r,i;const e=((r=this.item)==null?void 0:r.fileMime)==="image/heic",n=((i=this.item)==null?void 0:i.fileExtension)==="heic";return e||n?"png":this.format},loading(){if(this.lazy)return"lazy";if(this.eager)return"eager"},altText(){var e;return this.alt||((e=this.model)==null?void 0:e.title)},className(){var e=[];return this.portrait&&e.push("img-portrait"),e.join(" ")},isSvg(){var e;if(this.svg)return!0;switch((e=this.item)==null?void 0:e.fileMime){case"image/svg+xml":case"image/svg":return!0}},portrait(){return this.crop?this.dimensionHeight>this.dimensionWidth:this.modelHeight>this.modelWidth},manualWidth(){return parseInt(this.width)},manualHeight(){return parseInt(this.height)},modelWidth(){var e;return parseInt((e=this.model)==null?void 0:e.width)},modelHeight(){var e;return parseInt((e=this.model)==null?void 0:e.height)},id(){return this.$sdk.utils.id(this.model)},params(){var n,r,i,s;var e={};if(e.access_token=this.$sdk.auth.getCurrentToken(),e.cb=this.cacheBuster,this.manualWidth&&(e.w=this.manualWidth?this.manualWidth:void 0),this.manualHeight&&(e.h=this.manualHeight?this.manualHeight:void 0),this.upscale&&(e.u=!0),this.auto&&!e.w&&!e.h){const o=(s=(i=(r=(n=this.$sdk.app)==null?void 0:n.device)==null?void 0:r.image)==null?void 0:i.auto)==null?void 0:s.med;o&&(e.w=o,e.u=!1)}return this.crop?e.c=!0:this.contain||(e.c=!!parseInt(this.manualWidth)&&!!parseInt(this.manualHeight)),this.quality&&(e.q=parseInt(this.quality)),this.actualFormat&&(e.f=this.actualFormat),e},src(){return this.$sdk.api.generateEndpointURL(`/image/${this.id}`,this.params,{file:!0})},previewSrc(){var e=Object.assign({},this.params);return e.w=50,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}`,e,{file:!0})},imageStyle(){var e={};return this.crop||(e["object-fit"]="contain"),this.cover&&(e["object-fit"]="cover"),this.inline?e.maxWidth="100%":(e.width="100%",e.height="100%",e.top="0",e.left="0",e.position="absolute"),e},dimensionWidth(){if(this.manualHeight&&this.manualWidth)return this.manualWidth;if(this.modelWidth&&this.modelHeight)return this.modelWidth},dimensionHeight(){if(this.manualHeight&&this.manualWidth)return this.manualHeight;if(this.modelWidth&&this.modelHeight)return this.modelHeight},style(){var r,i,s;var e={};this.inline?e.display="inline-block":this.dimensionHeight&&this.dimensionWidth&&(e.height=0,e.overflow="hidden",e.paddingBottom=`${this.dimensionHeight/this.dimensionWidth*100}%`,e.position="relative");var n=(s=(i=(r=this.model)==null?void 0:r.fileMeta)==null?void 0:i.colors)==null?void 0:s.colors;return n&&n.length&&(e.backgroundColor=n[0]),this.isSvg||this.preview&&(e.backgroundImage=`url(${this.previewSrc})`),e}}},cC=["alt","data"],dC=["loading","alt","src"];function uC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-image",o.className]),style:t.normalizeStyle(o.style)},[r.svg?(t.openBlock(),t.createElementBlock("object",{key:0,alt:o.altText,type:"image/svg+xml",data:o.src},null,8,cC)):(t.openBlock(),t.createElementBlock("img",{key:1,ref:"img",loading:o.loading,alt:o.altText,style:t.normalizeStyle(o.imageStyle),src:o.src},null,12,dC))],6)}const Bm=C(aC,[["render",uC],["__scopeId","data-v-a2d635ea"]]),mC={props:{item:{type:[Object,String]},width:{type:[Number,String]},height:{type:[Number,String]},controls:{type:Boolean,default:!0},controlslist:{type:String},autoplay:{type:Boolean,default:!1},playsinline:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},muted:{type:Boolean,default:!1}},data(){return{model:this.item,isMuted:this.muted||this.autoplay,playsInline:this.playsinline||this.autoplay}},watch:{playsinline(e){this.playsInline=e},muted(e){this.isMuted=e}},beforeMount(){this.$sdk.auth.ensureValidToken().catch(()=>{})},computed:{padHeight(){return this.actualHeight&&this.actualWidth?`${this.actualHeight/this.actualWidth*100}%`:void 0},youtubeSrc(){return`https://www.youtube.com/embed/${this.mediaID}`},title(){var e;return(e=this.model)==null?void 0:e.title},mediaID(){var e;return(e=this.model)==null?void 0:e.mediaIntegrationID},mediaType(){var e;return((e=this.model)==null?void 0:e.mediaIntegrationType)||"upload"},mimetype(){var e;return((e=this.model)==null?void 0:e.fileMime)||"video/mp4"},actualWidth(){return parseInt(this.width)||this.modelWidth||1920},actualHeight(){return parseInt(this.height)||this.modelHeight||1080},className(){var e=[];return this.portrait&&e.push("video-portrait"),e.push(`video-type-${this.mediaType}`),e.join(" ")},portrait(){return this.actualHeight>this.actualWidth},modelWidth(){var e;return parseInt(((e=this.model)==null?void 0:e.width)||0)},modelHeight(){var e;return parseInt(((e=this.model)==null?void 0:e.height)||0)},id(){return this.$sdk.utils.id(this.model)},params(){var e={};return e.access_token=this.$sdk.auth.getCurrentToken(),e},src(){return this.$sdk.api.generateEndpointURL(`/video/${this.id}`,this.params,{file:!0})},thumbnailSrc(){var e=Object.assign({},this.params);return e.w=this.actualWidth,e.h=this.actualHeight,delete e.h,this.$sdk.api.generateEndpointURL(`/image/${this.id}/poster.png`,e,{file:!0})},embedStyle(){var e={};return this.padHeight&&(e.height=0,e.paddingBottom=this.padHeight,e.overflow="hidden",e.position="relative"),e}}},fC=["poster","playsinline","muted","loop","autoplay","width","height","controls","controlslist"],hC=["src","type"],pC=["width","height","src","title"];function yC(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-video",o.className])},[o.mediaType==="upload"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-video-embed ux-video-embed-upload",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("video",{poster:o.thumbnailSrc,playsinline:s.playsInline,muted:s.isMuted,loop:r.loop,autoplay:r.autoplay,width:o.actualWidth,height:o.actualHeight,controls:r.controls,controlslist:r.controlslist},[t.createElementVNode("source",{src:o.src,type:o.mimetype},null,8,hC),n[0]||(n[0]=t.createTextVNode(" Your browser does not support the video tag. ",-1))],8,fC)],4)):t.createCommentVNode("",!0),o.mediaType==="youtube"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"ux-video-embed ux-video-embed-youtube",style:t.normalizeStyle(o.embedStyle)},[t.createElementVNode("iframe",{width:o.actualWidth,height:o.actualHeight,src:o.youtubeSrc,title:o.title,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,pC)],4)):t.createCommentVNode("",!0)],2)}const Dm=C(mC,[["render",yC],["__scopeId","data-v-c519c9ea"]]),gC={props:{value:{type:Number},active:{type:Boolean}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},percent(){return this.value},barStyle(){return{width:`${this.percent}%`}},element(){return"i"}}},kC={class:"ux-progress"};function _C(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",kC,[t.createElementVNode("div",{class:t.normalizeClass(["ux-progress-bg",{active:r.active}])},null,2),t.createElementVNode("div",{class:"ux-progress-fg",style:t.normalizeStyle(o.barStyle)},null,4)])}const nl=C(gC,[["render",_C],["__scopeId","data-v-6e492d1a"]]),wC={props:{value:{},tag:{type:String,default:"span"},clickable:{type:Boolean},deleteable:{type:Boolean},icon:{type:String}},computed:{avatar(){var s;const e=(s=this.value)==null?void 0:s._id;if(!e)return;const n=e.slice(8,10)==="24",r=e.slice(8,10)==="70",i=e.slice(8,10)==="71";if(n||r||i)return e},elementType(){return this.tag||"span"},title(){var e,n,r,i,s,o,l,a;return[(e=this.value)==null?void 0:e.title,(n=this.value)==null?void 0:n.name,(r=this.value)!=null&&r.firstName&&((i=this.value)!=null&&i.lastName)?`${(s=this.value)==null?void 0:s.firstName} ${(o=this.value)==null?void 0:o.lastName}`:(l=this.value)==null?void 0:l.firstName,(a=this.value)==null?void 0:a.firstName,this.value].filter(Boolean)[0]},subtitle(){var e;if((e=this.value)!=null&&e.startDate)return this.$sdk.date?this.$sdk.date.readableEventDate(this.value):void 0},hasLink(){return this.tag==="a"||this.clickable},style(){var r,i;const e=(r=this.value)==null?void 0:r.color,n=(i=this.value)==null?void 0:i.bgColor;if(e||n)return{color:e,backgroundColor:n}}}},bC={key:0,class:"pill-avatar"},xC={class:"font-sm font-muted"};function CC(e,n,r,i,s,o){const l=t.resolveComponent("ux-avatar"),a=t.resolveComponent("ux-icon"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.elementType),{class:t.normalizeClass(["ux-pill",{"has-link":o.hasLink}]),style:t.normalizeStyle(o.style)},{default:t.withCtx(()=>[t.createVNode(d,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[o.avatar?(t.openBlock(),t.createElementBlock("div",bC,[t.createVNode(l,{id:o.avatar,initials:o.title},null,8,["id","initials"])])):t.createCommentVNode("",!0),o.subtitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1),t.createElementVNode("span",xC," • "+t.toDisplayString(o.subtitle),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[r.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:r.icon,left:""},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(t.toDisplayString(o.title),1)],64))]),_:1}),r.deleteable?(t.openBlock(),t.createBlock(c,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class","style"])}const Om=C(wC,[["render",CC],["__scopeId","data-v-709f24b0"]]),VC={},EC={class:"ux-list"};function NC(e,n){return t.openBlock(),t.createElementBlock("ul",EC,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Mm=C(VC,[["render",NC],["__scopeId","data-v-670de630"]]),TC={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean}},computed:{element(){return this.to||this.href?"ux-link":"div"}}};function SC(e,n,r,i,s,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{class:"ux-list-item",to:r.to,href:r.href,target:r.target,disabled:r.disabled},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["to","href","target","disabled"])}const Fm=C(TC,[["render",SC],["__scopeId","data-v-a5de8929"]]);var se;(function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"})(se||(se={}));var ge;(function(e){e[e.SUNDAY=0]="SUNDAY",e[e.MONDAY=1]="MONDAY",e[e.TUESDAY=2]="TUESDAY",e[e.WEDNESDAY=3]="WEDNESDAY",e[e.THURSDAY=4]="THURSDAY",e[e.FRIDAY=5]="FRIDAY",e[e.SATURDAY=6]="SATURDAY"})(ge||(ge={}));var ft;(function(e){e[e.JANUARY=1]="JANUARY",e[e.FEBRUARY=2]="FEBRUARY",e[e.MARCH=3]="MARCH",e[e.APRIL=4]="APRIL",e[e.MAY=5]="MAY",e[e.JUNE=6]="JUNE",e[e.JULY=7]="JULY",e[e.AUGUST=8]="AUGUST",e[e.SEPTEMBER=9]="SEPTEMBER",e[e.OCTOBER=10]="OCTOBER",e[e.NOVEMBER=11]="NOVEMBER",e[e.DECEMBER=12]="DECEMBER"})(ft||(ft={}));function xn(e,n){e.assign("day",n.getDate()),e.assign("month",n.getMonth()+1),e.assign("year",n.getFullYear())}function Im(e,n){e.assign("hour",n.getHours()),e.assign("minute",n.getMinutes()),e.assign("second",n.getSeconds()),e.assign("millisecond",n.getMilliseconds()),e.assign("meridiem",n.getHours()<12?se.AM:se.PM)}function Gn(e,n){e.imply("day",n.getDate()),e.imply("month",n.getMonth()+1),e.imply("year",n.getFullYear())}function rl(e,n){e.imply("hour",n.getHours()),e.imply("minute",n.getMinutes()),e.imply("second",n.getSeconds()),e.imply("millisecond",n.getMilliseconds()),e.imply("meridiem",n.getHours()<12?se.AM:se.PM)}const BC={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:2*60,timezoneOffsetNonDst:60,dstStart:e=>Am(e,ft.MARCH,ge.SUNDAY,2),dstEnd:e=>Am(e,ft.OCTOBER,ge.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-5*60,timezoneOffsetNonDst:-6*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-4*60,timezoneOffsetNonDst:-5*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-6*60,timezoneOffsetNonDst:-7*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-7*60,timezoneOffsetNonDst:-8*60,dstStart:e=>tn(e,ft.MARCH,ge.SUNDAY,2,2),dstEnd:e=>tn(e,ft.NOVEMBER,ge.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function tn(e,n,r,i,s=0){let o=0,l=0;for(;l<i;)o++,new Date(e,n-1,o).getDay()===r&&l++;return new Date(e,n-1,o,s)}function Am(e,n,r,i=0){const s=r===0?7:r,o=new Date(e,n-1+1,1,12),l=o.getDay()===0?7:o.getDay();let a;return l===s?a=7:l<s?a=7+l-s:a=l-s,o.setDate(o.getDate()-a),new Date(e,n-1,o.getDate(),i)}function Lm(e,n,r={}){if(e==null)return null;if(typeof e=="number")return e;const i=r[e]??BC[e];return i==null?null:typeof i=="number"?i:n==null?null:n>i.dstStart(n.getFullYear())&&!(n>i.dstEnd(n.getFullYear()))?i.timezoneOffsetDuringDst:i.timezoneOffsetNonDst}const DC={day:0,second:0,millisecond:0};function Ke(e,n){let r=new Date(e);if(n.y&&(n.year=n.y,delete n.y),n.mo&&(n.month=n.mo,delete n.mo),n.M&&(n.month=n.M,delete n.M),n.w&&(n.week=n.w,delete n.w),n.d&&(n.day=n.d,delete n.d),n.h&&(n.hour=n.h,delete n.h),n.m&&(n.minute=n.m,delete n.m),n.s&&(n.second=n.s,delete n.s),n.ms&&(n.millisecond=n.ms,delete n.ms),"year"in n){const i=Math.floor(n.year);r.setFullYear(r.getFullYear()+i);const s=n.year-i;s>0&&(n.month=(n==null?void 0:n.month)??0,n.month+=s*12)}if("quarter"in n){const i=Math.floor(n.quarter);r.setMonth(r.getMonth()+i*3)}if("month"in n){const i=Math.floor(n.month);r.setMonth(r.getMonth()+i);const s=n.month-i;s>0&&(n.week=(n==null?void 0:n.week)??0,n.week+=s*4)}if("week"in n){const i=Math.floor(n.week);r.setDate(r.getDate()+i*7);const s=n.week-i;s>0&&(n.day=(n==null?void 0:n.day)??0,n.day+=Math.round(s*7))}if("day"in n){const i=Math.floor(n.day);r.setDate(r.getDate()+i);const s=n.day-i;s>0&&(n.hour=(n==null?void 0:n.hour)??0,n.hour+=Math.round(s*24))}if("hour"in n){const i=Math.floor(n.hour);r.setHours(r.getHours()+i);const s=n.hour-i;s>0&&(n.minute=(n==null?void 0:n.minute)??0,n.minute+=Math.round(s*60))}if("minute"in n){const i=Math.floor(n.minute);r.setMinutes(r.getMinutes()+i);const s=n.minute-i;s>0&&(n.second=(n==null?void 0:n.second)??0,n.second+=Math.round(s*60))}if("second"in n){const i=Math.floor(n.second);r.setSeconds(r.getSeconds()+i);const s=n.second-i;s>0&&(n.millisecond=(n==null?void 0:n.millisecond)??0,n.millisecond+=Math.round(s*1e3))}if("millisecond"in n){const i=Math.floor(n.millisecond);r.setMilliseconds(r.getMilliseconds()+i)}return r}function xo(e){const n={};for(const r in e)n[r]=-e[r];return n}class nn{constructor(n,r){X(this,"instant");X(this,"timezoneOffset");this.instant=n??new Date,this.timezoneOffset=r??null}static fromDate(n){return new nn(n)}static fromInput(n,r){if(n instanceof Date)return nn.fromDate(n);const i=(n==null?void 0:n.instant)??new Date,s=Lm(n==null?void 0:n.timezone,i,r);return new nn(i,s)}getDateWithAdjustedTimezone(){const n=new Date(this.instant);return this.timezoneOffset!==null&&n.setMinutes(n.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),n}getSystemTimezoneAdjustmentMinute(n,r){(!n||n.getTime()<0)&&(n=new Date);const i=-n.getTimezoneOffset(),s=r??this.timezoneOffset??i;return i-s}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}}class pe{constructor(n,r){X(this,"knownValues");X(this,"impliedValues");X(this,"reference");X(this,"_tags",new Set);if(this.reference=n,this.knownValues={},this.impliedValues={},r)for(const s in r)this.knownValues[s]=r[s];const i=n.getDateWithAdjustedTimezone();this.imply("day",i.getDate()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}static createRelativeFromReference(n,r=DC){let i=Ke(n.getDateWithAdjustedTimezone(),r);const s=new pe(n);return s.addTag("result/relativeDate"),"hour"in r||"minute"in r||"second"in r||"millisecond"in r?(s.addTag("result/relativeDateAndTime"),Im(s,i),xn(s,i),s.assign("timezoneOffset",n.getTimezoneOffset())):(rl(s,i),s.imply("timezoneOffset",n.getTimezoneOffset()),"day"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.assign("weekday",i.getDay())):"week"in r?(s.assign("day",i.getDate()),s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear()),s.imply("weekday",i.getDay())):(s.imply("day",i.getDate()),"month"in r?(s.assign("month",i.getMonth()+1),s.assign("year",i.getFullYear())):(s.imply("month",i.getMonth()+1),"year"in r?s.assign("year",i.getFullYear()):s.imply("year",i.getFullYear())))),s}get(n){return n in this.knownValues?this.knownValues[n]:n in this.impliedValues?this.impliedValues[n]:null}isCertain(n){return n in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(n,r){return n in this.knownValues?this:(this.impliedValues[n]=r,this)}assign(n,r){return this.knownValues[n]=r,delete this.impliedValues[n],this}addDurationAsImplied(n){const r=this.dateWithoutTimezoneAdjustment(),i=Ke(r,n);return("day"in n||"week"in n||"month"in n||"year"in n)&&(this.delete(["day","weekday","month","year"]),this.imply("day",i.getDate()),this.imply("weekday",i.getDay()),this.imply("month",i.getMonth()+1),this.imply("year",i.getFullYear())),("second"in n||"minute"in n||"hour"in n)&&(this.delete(["second","minute","hour"]),this.imply("second",i.getSeconds()),this.imply("minute",i.getMinutes()),this.imply("hour",i.getHours())),this}delete(n){typeof n=="string"&&(n=[n]);for(const r of n)delete this.knownValues[r],delete this.impliedValues[r]}clone(){const n=new pe(this.reference);n.knownValues={},n.impliedValues={};for(const r in this.knownValues)n.knownValues[r]=this.knownValues[r];for(const r in this.impliedValues)n.impliedValues[r]=this.impliedValues[r];return n}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){const n=this.dateWithoutTimezoneAdjustment();return!(n.getFullYear()!==this.get("year")||n.getMonth()!==this.get("month")-1||n.getDate()!==this.get("day")||this.get("hour")!=null&&n.getHours()!=this.get("hour")||this.get("minute")!=null&&n.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {
|
|
2
2
|
tags: ${JSON.stringify(Array.from(this._tags).sort())},
|
|
3
3
|
knownValues: ${JSON.stringify(this.knownValues)},
|
|
4
4
|
impliedValues: ${JSON.stringify(this.impliedValues)}},
|