@qikdev/vue-ui 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.es.js +8 -6
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/vue-ui.css +1 -1
- package/package.json +1 -1
package/dist/lib.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(B,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):(B=typeof globalThis<"u"?globalThis:B||self,t(B["@qikdev/vue-ui"]={},B.Vue,B.sdk))})(this,function(B,t,an){"use strict";var C$=Object.defineProperty;var V$=(B,t,an)=>t in B?C$(B,t,{enumerable:!0,configurable:!0,writable:!0,value:an}):B[t]=an;var J=(B,t,an)=>V$(B,typeof t!="symbol"?t+"":t,an);const Ng="0.4.0";class cn extends Error{}class Tg extends cn{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class Sg extends cn{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class Bg extends cn{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class ir extends cn{}class ec extends cn{constructor(n){super(`Invalid unit ${n}`)}}class it extends cn{}class Ht extends cn{constructor(){super("Zone is an abstract class")}}const O="numeric",ht="short",Qe="long",oi={year:O,month:O,day:O},tc={year:O,month:ht,day:O},Dg={year:O,month:ht,day:O,weekday:ht},nc={year:O,month:Qe,day:O},rc={year:O,month:Qe,day:O,weekday:Qe},oc={hour:O,minute:O},ic={hour:O,minute:O,second:O},sc={hour:O,minute:O,second:O,timeZoneName:ht},lc={hour:O,minute:O,second:O,timeZoneName:Qe},ac={hour:O,minute:O,hourCycle:"h23"},cc={hour:O,minute:O,second:O,hourCycle:"h23"},dc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:ht},uc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:Qe},mc={year:O,month:O,day:O,hour:O,minute:O},fc={year:O,month:O,day:O,hour:O,minute:O,second:O},hc={year:O,month:ht,day:O,hour:O,minute:O},pc={year:O,month:ht,day:O,hour:O,minute:O,second:O},Og={year:O,month:ht,day:O,weekday:ht,hour:O,minute:O},gc={year:O,month:Qe,day:O,hour:O,minute:O,timeZoneName:ht},yc={year:O,month:Qe,day:O,hour:O,minute:O,second:O,timeZoneName:ht},kc={year:O,month:Qe,day:O,weekday:Qe,hour:O,minute:O,timeZoneName:Qe},_c={year:O,month:Qe,day:O,weekday:Qe,hour:O,minute:O,second:O,timeZoneName:Qe};function Q(e){return typeof e>"u"}function dn(e){return typeof e=="number"}function Wr(e){return typeof e=="number"&&e%1===0}function Mg(e){return typeof e=="string"}function Fg(e){return Object.prototype.toString.call(e)==="[object Date]"}function wc(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Ig(e){return Array.isArray(e)?e:[e]}function xc(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 Ag(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function An(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function It(e,n,r){return Wr(e)&&e>=n&&e<=r}function Lg(e,n){return e-n*Math.floor(e/n)}function Ce(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Wt(e){if(!(Q(e)||e===null||e===""))return parseInt(e,10)}function un(e){if(!(Q(e)||e===null||e===""))return parseFloat(e)}function ii(e){if(!(Q(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function si(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function sr(e){return e%4===0&&(e%100!==0||e%400===0)}function lr(e){return sr(e)?366:365}function Gr(e,n){const r=Lg(n-1,12)+1,i=e+(n-r)/12;return r===2?sr(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function li(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 Yr(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 ai(e){return e>99?e:e>60?1900+e:2e3+e}function bc(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 Kr(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 Cc(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new it(`Invalid unit value ${e}`);return n}function Jr(e,n){const r={};for(const i in e)if(An(e,i)){const s=e[i];if(s==null)continue;r[n(i)]=Cc(s)}return r}function Zr(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}${Ce(r,2)}:${Ce(i,2)}`;case"narrow":return`${s}${r}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ce(r,2)}${Ce(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function Xr(e){return Ag(e,["hour","minute","second","millisecond"])}const Rg=/[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"],Vc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ug=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ec(e){switch(e){case"narrow":return[...Ug];case"short":return[...Vc];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 Nc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Tc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$g=["M","T","W","T","F","S","S"];function Sc(e){switch(e){case"narrow":return[...$g];case"short":return[...Tc];case"long":return[...Nc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Bc=["AM","PM"],zg=["Before Christ","Anno Domini"],jg=["BC","AD"],qg=["B","A"];function Dc(e){switch(e){case"narrow":return[...qg];case"short":return[...jg];case"long":return[...zg];default:return null}}function Hg(e){return Bc[e.hour<12?0:1]}function Wg(e,n){return Sc(n)[e.weekday-1]}function Gg(e,n){return Ec(n)[e.month-1]}function Yg(e,n){return Dc(n)[e.year<0?0:1]}function Kg(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 Oc(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const Jg={D:oi,DD:tc,DDD:nc,DDDD:rc,t:oc,tt:ic,ttt:sc,tttt:lc,T:ac,TT:cc,TTT:dc,TTTT:uc,f:mc,ff:hc,fff:gc,ffff:kc,F:fc,FF:pc,FFF:yc,FFFF:_c};class We{static create(n,r={}){return new We(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 Jg[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 Ce(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,g)=>this.loc.extract(n,h,g),l=h=>n.isOffsetFixed&&n.offset===0&&h.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,h.format):"",a=()=>i?Hg(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(h,g)=>i?Gg(n,h):o(g?{month:h}:{month:h,day:"numeric"},"month"),d=(h,g)=>i?Wg(n,h):o(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),m=h=>{const g=We.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(n,g):h},u=h=>i?Yg(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 Oc(We.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=We.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 Oc(o,s(a))}}class pt{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class ar{get type(){throw new Ht}get name(){throw new Ht}get isUniversal(){throw new Ht}offsetName(n,r){throw new Ht}formatOffset(n,r){throw new Ht}offset(n){throw new Ht}equals(n){throw new Ht}get isValid(){throw new Ht}}let ci=null;class di extends ar{static get instance(){return ci===null&&(ci=new di),ci}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return bc(n,r,i)}formatOffset(n,r){return Zr(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let Qr={};function Zg(e){return Qr[e]||(Qr[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"})),Qr[e]}const Xg={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Qg(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 vg(e,n){const r=e.formatToParts(n),i=[];for(let s=0;s<r.length;s++){const{type:o,value:l}=r[s],a=Xg[o];o==="era"?i[a]=l:Q(a)||(i[a]=parseInt(l,10))}return i}let vr={};class At extends ar{static create(n){return vr[n]||(vr[n]=new At(n)),vr[n]}static resetCache(){vr={},Qr={}}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=At.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return bc(n,r,i,this.name)}formatOffset(n,r){return Zr(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=Zg(this.name);let[s,o,l,a,c,d,m]=i.formatToParts?vg(i,r):Qg(i,r);a==="BC"&&(s=-Math.abs(s)+1);const f=li({year:s,month:o,day:l,hour:c===24?0:c,minute:d,second:m,millisecond:0});let h=+r;const g=h%1e3;return h-=g>=0?g:1e3+g,(f-h)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let ui=null;class Pe extends ar{static get utcInstance(){return ui===null&&(ui=new Pe(0)),ui}static instance(n){return n===0?Pe.utcInstance:new Pe(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new Pe(Kr(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Zr(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return Zr(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 ey extends ar{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 Gt(e,n){if(Q(e)||e===null)return n;if(e instanceof ar)return e;if(Mg(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?Pe.utcInstance:Pe.parseSpecifier(r)||At.create(e)}else return dn(e)?Pe.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new ey(e)}let Mc=()=>Date.now(),Fc="system",Ic=null,Ac=null,Lc=null,Rc;class Se{static get now(){return Mc}static set now(n){Mc=n}static set defaultZone(n){Fc=n}static get defaultZone(){return Gt(Fc,di.instance)}static get defaultLocale(){return Ic}static set defaultLocale(n){Ic=n}static get defaultNumberingSystem(){return Ac}static set defaultNumberingSystem(n){Ac=n}static get defaultOutputCalendar(){return Lc}static set defaultOutputCalendar(n){Lc=n}static get throwOnInvalid(){return Rc}static set throwOnInvalid(n){Rc=n}static resetCaches(){ye.resetCache(),At.resetCache()}}let Pc={};function ty(e,n={}){const r=JSON.stringify([e,n]);let i=Pc[r];return i||(i=new Intl.ListFormat(e,n),Pc[r]=i),i}let mi={};function fi(e,n={}){const r=JSON.stringify([e,n]);let i=mi[r];return i||(i=new Intl.DateTimeFormat(e,n),mi[r]=i),i}let hi={};function ny(e,n={}){const r=JSON.stringify([e,n]);let i=hi[r];return i||(i=new Intl.NumberFormat(e,n),hi[r]=i),i}let pi={};function ry(e,n={}){const{base:r,...i}=n,s=JSON.stringify([e,i]);let o=pi[s];return o||(o=new Intl.RelativeTimeFormat(e,n),pi[s]=o),o}let cr=null;function oy(){return cr||(cr=new Intl.DateTimeFormat().resolvedOptions().locale,cr)}function iy(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=fi(e).resolvedOptions()}catch{r=fi(i).resolvedOptions()}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function sy(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function ly(e){const n=[];for(let r=1;r<=12;r++){const i=x.utc(2016,r,1);n.push(e(i))}return n}function ay(e){const n=[];for(let r=1;r<=7;r++){const i=x.utc(2016,11,13+r);n.push(e(i))}return n}function eo(e,n,r,i,s){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):s(n)}function cy(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 dy{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=ny(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):si(n,3);return Ce(r,this.padTo)}}}class uy{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&&At.create(a).valid?(s=a,this.dt=n):(s="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:x.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=fi(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class my{constructor(n,r,i){this.opts={style:"long",...i},!r&&wc()&&(this.rtf=ry(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):Kg(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class ye{static fromOpts(n){return ye.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,s=!1){const o=n||Se.defaultLocale,l=o||(s?"en-US":oy()),a=r||Se.defaultNumberingSystem,c=i||Se.defaultOutputCalendar;return new ye(l,a,c,o)}static resetCache(){cr=null,mi={},hi={},pi={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return ye.create(n,r,i)}constructor(n,r,i,s){const[o,l,a]=iy(n);this.locale=o,this.numberingSystem=r||l||null,this.outputCalendar=i||a||null,this.intl=sy(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=cy(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:ye.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 eo(this,n,i,Ec,()=>{const s=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=ly(l=>this.extract(l,s,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return eo(this,n,i,Sc,()=>{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]=ay(l=>this.extract(l,s,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return eo(this,void 0,n,()=>Bc,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[x.utc(2016,11,13,9),x.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return eo(this,n,r,Dc,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[x.utc(-40,1,1),x.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 dy(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new uy(n,this.intl,r)}relFormatter(n={}){return new my(this.intl,this.isEnglish(),n)}listFormatter(n={}){return ty(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 Ln(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function mn(...e){return n=>e.reduce(([r,i,s],o)=>{const[l,a,c]=o(n,s);return[{...r,...l},i||a,c]},[{},null,1]).slice(0,2)}function Rn(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 Uc(...e){return(n,r)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Wt(n[r+s]);return[i,null,r+s]}}const $c=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,gi=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,zc=RegExp(`${gi.source}${$c.source}?`),yi=RegExp(`(?:T${zc.source})?`),fy=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,hy=/(\d{4})-?W(\d\d)(?:-?(\d))?/,py=/(\d{4})-?(\d{3})/,gy=Uc("weekYear","weekNumber","weekDay"),yy=Uc("year","ordinal"),ky=/(\d{4})-(\d\d)-(\d\d)/,jc=RegExp(`${gi.source} ?(?:${$c.source}|(${Rg.source}))?`),_y=RegExp(`(?: ${jc.source})?`);function Pn(e,n,r){const i=e[n];return Q(i)?r:Wt(i)}function qc(e,n){return[{year:Pn(e,n),month:Pn(e,n+1,1),day:Pn(e,n+2,1)},null,n+3]}function fn(e,n){return[{hours:Pn(e,n,0),minutes:Pn(e,n+1,0),seconds:Pn(e,n+2,0),milliseconds:ii(e[n+3])},null,n+4]}function Un(e,n){const r=!e[n]&&!e[n+1],i=Kr(e[n+1],e[n+2]),s=r?null:Pe.instance(i);return[{},s,n+3]}function Hc(e,n){const r=e[n]?At.create(e[n]):null;return[{},r,n+1]}const wy=RegExp(`^T?${gi.source}$`),xy=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function by(e){const[n,r,i,s,o,l,a,c,d]=e,m=n[0]==="-",u=c&&c[0]==="-",f=(h,g=!1)=>h!==void 0&&(g||h&&m)?-h:h;return[{years:f(un(r)),months:f(un(i)),weeks:f(un(s)),days:f(un(o)),hours:f(un(l)),minutes:f(un(a)),seconds:f(un(c),c==="-0"),milliseconds:f(ii(d),u)}]}const Cy={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 ki(e,n,r,i,s,o,l){const a={year:n.length===2?ai(Wt(n)):Wt(n),month:Vc.indexOf(r)+1,day:Wt(i),hour:Wt(s),minute:Wt(o)};return l&&(a.second=Wt(l)),e&&(a.weekday=e.length>3?Nc.indexOf(e)+1:Tc.indexOf(e)+1),a}const Vy=/^(?:(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 Ey(e){const[,n,r,i,s,o,l,a,c,d,m,u]=e,f=ki(n,s,i,r,o,l,a);let h;return c?h=Cy[c]:d?h=0:h=Kr(m,u),[f,new Pe(h)]}function Ny(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ty=/^(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$/,Sy=/^(Monday|Tuesday|Wedsday|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$/,By=/^(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 Wc(e){const[,n,r,i,s,o,l,a]=e;return[ki(n,s,i,r,o,l,a),Pe.utcInstance]}function Dy(e){const[,n,r,i,s,o,l,a]=e;return[ki(n,a,r,i,s,o,l),Pe.utcInstance]}const Oy=Ln(fy,yi),My=Ln(hy,yi),Fy=Ln(py,yi),Iy=Ln(zc),Ay=mn(qc,fn,Un),Ly=mn(gy,fn,Un),Ry=mn(yy,fn,Un),Py=mn(fn,Un);function Uy(e){return Rn(e,[Oy,Ay],[My,Ly],[Fy,Ry],[Iy,Py])}function $y(e){return Rn(Ny(e),[Vy,Ey])}function zy(e){return Rn(e,[Ty,Wc],[Sy,Wc],[By,Dy])}function jy(e){return Rn(e,[xy,by])}const qy=mn(fn);function Hy(e){return Rn(e,[wy,qy])}const Wy=Ln(ky,_y),Gy=Ln(jc),Yy=mn(qc,fn,Un,Hc),Ky=mn(fn,Un,Hc);function Jy(e){return Rn(e,[Wy,Yy],[Gy,Ky])}const Zy="Invalid Duration",Gc={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}},Xy={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},...Gc},st=146097/400,$n=146097/4800,Qy={years:{quarters:4,months:12,weeks:st/7,days:st,hours:st*24,minutes:st*24*60,seconds:st*24*60*60,milliseconds:st*24*60*60*1e3},quarters:{months:3,weeks:st/28,days:st/4,hours:st*24/4,minutes:st*24*60/4,seconds:st*24*60*60/4,milliseconds:st*24*60*60*1e3/4},months:{weeks:$n/7,days:$n,hours:$n*24,minutes:$n*24*60,seconds:$n*24*60*60,milliseconds:$n*24*60*60*1e3},...Gc},hn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vy=hn.slice(0).reverse();function pn(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 v(i)}function ek(e){return e<0?Math.floor(e):Math.ceil(e)}function Yc(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?ek(l):Math.trunc(l);i[s]+=c,n[r]-=c*o}function tk(e,n){vy.reduce((r,i)=>Q(n[i])?r:(r&&Yc(e,n,r,n,i),i),null)}class v{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||ye.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?Qy:Xy,this.isLuxonDuration=!0}static fromMillis(n,r){return v.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new it(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new v({values:Jr(n,v.normalizeUnit),loc:ye.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(dn(n))return v.fromMillis(n);if(v.isDuration(n))return n;if(typeof n=="object")return v.fromObject(n);throw new it(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=jy(n);return i?v.fromObject(i,r):v.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=Hy(n);return i?v.fromObject(i,r):v.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new it("need to specify a reason the Duration is invalid");const i=n instanceof pt?n:new pt(n,r);if(Se.throwOnInvalid)throw new Bg(i);return new v({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 ec(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?We.create(this.loc,i).formatDurationFromString(this,n):Zy}toHuman(n={}){const r=hn.map(i=>{const s=this.values[i];return Q(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+=si(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=v.fromDurationLike(n),i={};for(const s of hn)(An(r.values,s)||An(this.values,s))&&(i[s]=r.get(s)+this.get(s));return pn(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=v.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]=Cc(n(this.values[i],i));return pn(this,{values:r},!0)}get(n){return this[v.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r={...this.values,...Jr(n,v.normalizeUnit)};return pn(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),pn(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return tk(this.matrix,n),pn(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(l=>v.normalizeUnit(l));const r={},i={},s=this.toObject();let o;for(const l of hn)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;dn(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)hn.indexOf(d)>hn.indexOf(l)&&Yc(this.matrix,s,d,r,l)}else dn(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 pn(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 pn(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 hn)if(!r(this.values[i],n.values[i]))return!1;return!0}}const dr="Invalid Interval";function nk(e,n){return!e||!e.isValid?_e.invalid("missing or invalid start"):!n||!n.isValid?_e.invalid("missing or invalid end"):n<e?_e.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 _e{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 it("need to specify a reason the Interval is invalid");const i=n instanceof pt?n:new pt(n,r);if(Se.throwOnInvalid)throw new Sg(i);return new _e({invalid:i})}static fromDateTimes(n,r){const i=fr(n),s=fr(r),o=nk(i,s);return o??new _e({start:i,end:s})}static after(n,r){const i=v.fromDurationLike(r),s=fr(n);return _e.fromDateTimes(s,s.plus(i))}static before(n,r){const i=v.fromDurationLike(r),s=fr(n);return _e.fromDateTimes(s.minus(i),s)}static fromISO(n,r){const[i,s]=(n||"").split("/",2);if(i&&s){let o,l;try{o=x.fromISO(i,r),l=o.isValid}catch{l=!1}let a,c;try{a=x.fromISO(s,r),c=a.isValid}catch{c=!1}if(l&&c)return _e.fromDateTimes(o,a);if(l){const d=v.fromISO(s,r);if(d.isValid)return _e.after(o,d)}else if(c){const d=v.fromISO(i,r);if(d.isValid)return _e.before(a,d)}}return _e.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?_e.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(fr).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(_e.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(n){const r=v.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(_e.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:_e.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 _e.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(_e.fromDateTimes(r,c.time)),r=null);return _e.merge(s)}difference(...n){return _e.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:dr}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:dr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:dr}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:dr}toFormat(n,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:dr}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):v.invalid(this.invalidReason)}mapEndpoints(n){return _e.fromDateTimes(n(this.s),n(this.e))}}let to=class{static hasDST(n=Se.defaultZone){const r=x.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return At.isValidZone(n)}static normalizeZone(n){return Gt(n,Se.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||ye.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||ye.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ye.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ye.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return ye.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return ye.create(r,null,"gregory").eras(n)}static features(){return{relative:wc()}}};function Kc(e,n){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(v.fromMillis(i).as("days"))}function rk(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=Kc(a,c);return(d-d%7)/7}],["days",Kc]],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 ok(e,n,r,i){let[s,o,l,a]=rk(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=v.fromObject(o,i);return d.length>0?v.fromMillis(c,i).shiftTo(...d).plus(m):m}const _i={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Jc={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]},ik=_i.hanidec.replace(/[\[|\]]/g,"").split("");function sk(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(_i.hanidec)!==-1)n+=ik.indexOf(e[r]);else for(const s in Jc){const[o,l]=Jc[s];i>=o&&i<=l&&(n+=i-o)}}return parseInt(n,10)}else return n}function gt({numberingSystem:e},n=""){return new RegExp(`${_i[e||"latn"]}${n}`)}const lk="missing Intl.DateTimeFormat.formatToParts support";function oe(e,n=r=>r){return{regex:e,deser:([r])=>n(sk(r))}}const Zc="( | )",Xc=new RegExp(Zc,"g");function ak(e){return e.replace(/\./g,"\\.?").replace(Xc,Zc)}function Qc(e){return e.replace(/\./g,"").replace(Xc," ").toLowerCase()}function yt(e,n){return e===null?null:{regex:RegExp(e.map(ak).join("|")),deser:([r])=>e.findIndex(i=>Qc(r)===Qc(i))+n}}function vc(e,n){return{regex:e,deser:([,r,i])=>Kr(r,i),groups:n}}function wi(e){return{regex:e,deser:([n])=>n}}function ck(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function dk(e,n){const r=gt(n),i=gt(n,"{2}"),s=gt(n,"{3}"),o=gt(n,"{4}"),l=gt(n,"{6}"),a=gt(n,"{1,2}"),c=gt(n,"{1,3}"),d=gt(n,"{1,6}"),m=gt(n,"{1,9}"),u=gt(n,"{2,4}"),f=gt(n,"{4,6}"),h=k=>({regex:RegExp(ck(k.val)),deser:([y])=>y,literal:!0}),p=(k=>{if(e.literal)return h(k);switch(k.val){case"G":return yt(n.eras("short",!1),0);case"GG":return yt(n.eras("long",!1),0);case"y":return oe(d);case"yy":return oe(u,ai);case"yyyy":return oe(o);case"yyyyy":return oe(f);case"yyyyyy":return oe(l);case"M":return oe(a);case"MM":return oe(i);case"MMM":return yt(n.months("short",!0,!1),1);case"MMMM":return yt(n.months("long",!0,!1),1);case"L":return oe(a);case"LL":return oe(i);case"LLL":return yt(n.months("short",!1,!1),1);case"LLLL":return yt(n.months("long",!1,!1),1);case"d":return oe(a);case"dd":return oe(i);case"o":return oe(c);case"ooo":return oe(s);case"HH":return oe(i);case"H":return oe(a);case"hh":return oe(i);case"h":return oe(a);case"mm":return oe(i);case"m":return oe(a);case"q":return oe(a);case"qq":return oe(i);case"s":return oe(a);case"ss":return oe(i);case"S":return oe(c);case"SSS":return oe(s);case"u":return wi(m);case"uu":return wi(a);case"uuu":return oe(r);case"a":return yt(n.meridiems(),0);case"kkkk":return oe(o);case"kk":return oe(u,ai);case"W":return oe(a);case"WW":return oe(i);case"E":case"c":return oe(r);case"EEE":return yt(n.weekdays("short",!1,!1),1);case"EEEE":return yt(n.weekdays("long",!1,!1),1);case"ccc":return yt(n.weekdays("short",!0,!1),1);case"cccc":return yt(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return vc(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return vc(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return wi(/[a-z_+-/]{1,256}?/i);default:return h(k)}})(e)||{invalidReason:lk};return p.token=e,p}const uk={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 mk(e,n,r){const{type:i,value:s}=e;if(i==="literal")return{literal:!0,val:s};const o=r[i];let l=uk[i];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function fk(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(An(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 pk(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 Q(e.z)||(r=At.create(e.z)),Q(e.Z)||(r||(r=new Pe(e.Z)),i=e.Z),Q(e.q)||(e.M=(e.q-1)*3+1),Q(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),Q(e.u)||(e.S=ii(e.u)),[Object.keys(e).reduce((o,l)=>{const a=n(l);return a&&(o[a]=e[l]),o},{}),r,i]}let xi=null;function gk(){return xi||(xi=x.fromMillis(1555555555555)),xi}function yk(e,n){if(e.literal)return e;const r=We.macroTokenToFormatOpts(e.val);if(!r)return e;const o=We.create(n,r).formatDateTimeParts(gk()).map(l=>mk(l,n,r));return o.includes(void 0)?e:o}function kk(e,n){return Array.prototype.concat(...e.map(r=>yk(r,n)))}function ed(e,n,r){const i=kk(We.parseFormat(r),e),s=i.map(l=>dk(l,e)),o=s.find(l=>l.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[l,a]=fk(s),c=RegExp(l,"i"),[d,m]=hk(n,c,a),[u,f,h]=m?pk(m):[null,null,void 0];if(An(m,"a")&&An(m,"H"))throw new ir("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 _k(e,n,r){const{result:i,zone:s,specificOffset:o,invalidReason:l}=ed(e,n,r);return[i,s,o,l]}const td=[0,31,59,90,120,151,181,212,243,273,304,334],nd=[0,31,60,91,121,152,182,213,244,274,305,335];function lt(e,n){return new pt("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function rd(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 od(e,n,r){return r+(sr(e)?nd:td)[n-1]}function id(e,n){const r=sr(e)?nd:td,i=r.findIndex(o=>o<n),s=n-r[i];return{month:i+1,day:s}}function bi(e){const{year:n,month:r,day:i}=e,s=od(n,r,i),o=rd(n,r,i);let l=Math.floor((s-o+10)/7),a;return l<1?(a=n-1,l=Yr(a)):l>Yr(n)?(a=n+1,l=1):a=n,{weekYear:a,weekNumber:l,weekday:o,...Xr(e)}}function sd(e){const{weekYear:n,weekNumber:r,weekday:i}=e,s=rd(n,1,4),o=lr(n);let l=r*7+i-s-3,a;l<1?(a=n-1,l+=lr(a)):l>o?(a=n+1,l-=lr(n)):a=n;const{month:c,day:d}=id(a,l);return{year:a,month:c,day:d,...Xr(e)}}function Ci(e){const{year:n,month:r,day:i}=e,s=od(n,r,i);return{year:n,ordinal:s,...Xr(e)}}function ld(e){const{year:n,ordinal:r}=e,{month:i,day:s}=id(n,r);return{year:n,month:i,day:s,...Xr(e)}}function wk(e){const n=Wr(e.weekYear),r=It(e.weekNumber,1,Yr(e.weekYear)),i=It(e.weekday,1,7);return n?r?i?!1:lt("weekday",e.weekday):lt("week",e.week):lt("weekYear",e.weekYear)}function xk(e){const n=Wr(e.year),r=It(e.ordinal,1,lr(e.year));return n?r?!1:lt("ordinal",e.ordinal):lt("year",e.year)}function ad(e){const n=Wr(e.year),r=It(e.month,1,12),i=It(e.day,1,Gr(e.year,e.month));return n?r?i?!1:lt("day",e.day):lt("month",e.month):lt("year",e.year)}function cd(e){const{hour:n,minute:r,second:i,millisecond:s}=e,o=It(n,0,23)||n===24&&r===0&&i===0&&s===0,l=It(r,0,59),a=It(i,0,59),c=It(s,0,999);return o?l?a?c?!1:lt("millisecond",s):lt("second",i):lt("minute",r):lt("hour",n)}const Vi="Invalid DateTime",bk=864e13;function no(e){return new pt("unsupported zone",`the zone "${e.name}" is not supported`)}function Ei(e){return e.weekData===null&&(e.weekData=bi(e.c)),e.weekData}function ur(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new x({...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 ud(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 ro(e,n,r){return dd(li(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,Gr(i,s))+Math.trunc(n.days)+Math.trunc(n.weeks)*7},l=v.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=li(o);let[c,d]=dd(a,r,e.zone);return l!==0&&(c+=l,d=e.zone.offset(c)),{ts:c,o:d}}function mr(e,n,r,i,s,o){const{setZone:l,zone:a}=r;if(e&&Object.keys(e).length!==0){const c=n||a,d=x.fromObject(e,{...r,zone:c,specificOffset:o});return l?d:d.setZone(a)}else return x.invalid(new pt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function oo(e,n,r=!0){return e.isValid?We.create(ye.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function Ni(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Ce(e.c.year,r?6:4),n?(i+="-",i+=Ce(e.c.month),i+="-",i+=Ce(e.c.day)):(i+=Ce(e.c.month),i+=Ce(e.c.day)),i}function fd(e,n,r,i,s){let o=Ce(e.c.hour);return n?(o+=":",o+=Ce(e.c.minute),(e.c.second!==0||!r)&&(o+=":")):o+=Ce(e.c.minute),(e.c.second!==0||!r)&&(o+=Ce(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=Ce(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0?o+="Z":e.o<0?(o+="-",o+=Ce(Math.trunc(-e.o/60)),o+=":",o+=Ce(Math.trunc(-e.o%60))):(o+="+",o+=Ce(Math.trunc(e.o/60)),o+=":",o+=Ce(Math.trunc(e.o%60)))),o}const hd={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ck={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Vk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},pd=["year","month","day","hour","minute","second","millisecond"],Ek=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Nk=["year","ordinal","hour","minute","second","millisecond"];function gd(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 ec(e);return n}function yd(e,n){const r=Gt(n.zone,Se.defaultZone),i=ye.fromObject(n),s=Se.now();let o,l;if(Q(e.year))o=s;else{for(const d of pd)Q(e[d])&&(e[d]=hd[d]);const a=ad(e)||cd(e);if(a)return x.invalid(a);const c=r.offset(s);[o,l]=ro(e,c,r)}return new x({ts:o,zone:r,loc:i,o:l})}function kd(e,n,r){const i=Q(r.round)?!0:r.round,s=(l,a)=>(l=si(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 _d(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 x{constructor(n){const r=n.zone||Se.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new pt("invalid input"):null)||(r.isValid?null:no(r));this.ts=Q(n.ts)?Se.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=ud(this.ts,a),i=Number.isNaN(s.year)?new pt("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=r,this.loc=n.loc||ye.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new x({})}static local(){const[n,r]=_d(arguments),[i,s,o,l,a,c,d]=r;return yd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static utc(){const[n,r]=_d(arguments),[i,s,o,l,a,c,d]=r;return n.zone=Pe.utcInstance,yd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=Fg(n)?n.valueOf():NaN;if(Number.isNaN(i))return x.invalid("invalid input");const s=Gt(r.zone,Se.defaultZone);return s.isValid?new x({ts:i,zone:s,loc:ye.fromObject(r)}):x.invalid(no(s))}static fromMillis(n,r={}){if(dn(n))return n<-864e13||n>bk?x.invalid("Timestamp out of range"):new x({ts:n,zone:Gt(r.zone,Se.defaultZone),loc:ye.fromObject(r)});throw new it(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(dn(n))return new x({ts:n*1e3,zone:Gt(r.zone,Se.defaultZone),loc:ye.fromObject(r)});throw new it("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=Gt(r.zone,Se.defaultZone);if(!i.isValid)return x.invalid(no(i));const s=Se.now(),o=Q(r.specificOffset)?i.offset(s):r.specificOffset,l=Jr(n,gd),a=!Q(l.ordinal),c=!Q(l.year),d=!Q(l.month)||!Q(l.day),m=c||d,u=l.weekYear||l.weekNumber,f=ye.fromObject(r);if((m||a)&&u)throw new ir("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&a)throw new ir("Can't mix ordinal dates with month/day");const h=u||l.weekday&&!m;let g,p,k=ud(s,o);h?(g=Ek,p=Ck,k=bi(k)):a?(g=Nk,p=Vk,k=Ci(k)):(g=pd,p=hd);let y=!1;for(const U of g){const R=l[U];Q(R)?y?l[U]=p[U]:l[U]=k[U]:y=!0}const w=h?wk(l):a?xk(l):ad(l),T=w||cd(l);if(T)return x.invalid(T);const M=h?sd(l):a?ld(l):l,[$,W]=ro(M,o,i),C=new x({ts:$,zone:i,o:W,loc:f});return l.weekday&&m&&n.weekday!==C.weekday?x.invalid("mismatched weekday",`you can't specify both a weekday of ${l.weekday} and a date of ${C.toISO()}`):C}static fromISO(n,r={}){const[i,s]=Uy(n);return mr(i,s,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,s]=$y(n);return mr(i,s,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,s]=zy(n);return mr(i,s,r,"HTTP",r)}static fromFormat(n,r,i={}){if(Q(n)||Q(r))throw new it("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,l=ye.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,c,d,m]=_k(l,n,r);return m?x.invalid(m):mr(a,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return x.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,s]=Jy(n);return mr(i,s,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new it("need to specify a reason the DateTime is invalid");const i=n instanceof pt?n:new pt(n,r);if(Se.throwOnInvalid)throw new Tg(i);return new x({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?Ei(this).weekYear:NaN}get weekNumber(){return this.isValid?Ei(this).weekNumber:NaN}get weekday(){return this.isValid?Ei(this).weekday:NaN}get ordinal(){return this.isValid?Ci(this.c).ordinal:NaN}get monthShort(){return this.isValid?to.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?to.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?to.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?to.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}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return sr(this.year)}get daysInMonth(){return Gr(this.year,this.month)}get daysInYear(){return this.isValid?lr(this.year):NaN}get weeksInWeekYear(){return this.isValid?Yr(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:s}=We.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:s}}toUTC(n=0,r={}){return this.setZone(Pe.instance(n),r)}toLocal(){return this.setZone(Se.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=Gt(n,Se.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]=ro(l,o,n)}return ur(this,{ts:s,zone:n})}else return x.invalid(no(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return ur(this,{loc:s})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=Jr(n,gd),i=!Q(r.weekYear)||!Q(r.weekNumber)||!Q(r.weekday),s=!Q(r.ordinal),o=!Q(r.year),l=!Q(r.month)||!Q(r.day),a=o||l,c=r.weekYear||r.weekNumber;if((a||s)&&c)throw new ir("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new ir("Can't mix ordinal dates with month/day");let d;i?d=sd({...bi(this.c),...r}):Q(r.ordinal)?(d={...this.toObject(),...r},Q(r.day)&&(d.day=Math.min(Gr(d.year,d.month),d.day))):d=ld({...Ci(this.c),...r});const[m,u]=ro(d,this.o,this.zone);return ur(this,{ts:m,o:u})}plus(n){if(!this.isValid)return this;const r=v.fromDurationLike(n);return ur(this,md(this,r))}minus(n){if(!this.isValid)return this;const r=v.fromDurationLike(n).negate();return ur(this,md(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=v.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?We.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Vi}toLocaleString(n=oi,r={}){return this.isValid?We.create(this.loc.clone(r),n).formatDateTime(this):Vi}toLocaleParts(n={}){return this.isValid?We.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:s=!0}={}){if(!this.isValid)return null;const o=n==="extended";let l=Ni(this,o);return l+="T",l+=fd(this,o,r,i,s),l}toISODate({format:n="extended"}={}){return this.isValid?Ni(this,n==="extended"):null}toISOWeekDate(){return oo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:s=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+fd(this,o==="extended",r,n,i):null}toRFC2822(){return oo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return oo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ni(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")),oo(this,s,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Vi}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 v.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=Ig(r).map(v.normalizeUnit),l=n.valueOf()>this.valueOf(),a=l?this:n,c=l?n:this,d=ok(a,c,o,s);return l?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(x.now(),n,r)}until(n){return this.isValid?_e.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||x.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),kd(r,this.plus(i),{...n,numeric:"always",units:s,unit:o})}toRelativeCalendar(n={}){return this.isValid?kd(n.base||x.fromObject({},{zone:this.zone}),this,{...n,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...n){if(!n.every(x.isDateTime))throw new it("min requires all arguments be DateTimes");return xc(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(x.isDateTime))throw new it("max requires all arguments be DateTimes");return xc(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:s=null,numberingSystem:o=null}=i,l=ye.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return ed(l,n,r)}static fromStringExplain(n,r,i={}){return x.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return oi}static get DATE_MED(){return tc}static get DATE_MED_WITH_WEEKDAY(){return Dg}static get DATE_FULL(){return nc}static get DATE_HUGE(){return rc}static get TIME_SIMPLE(){return oc}static get TIME_WITH_SECONDS(){return ic}static get TIME_WITH_SHORT_OFFSET(){return sc}static get TIME_WITH_LONG_OFFSET(){return lc}static get TIME_24_SIMPLE(){return ac}static get TIME_24_WITH_SECONDS(){return cc}static get TIME_24_WITH_SHORT_OFFSET(){return dc}static get TIME_24_WITH_LONG_OFFSET(){return uc}static get DATETIME_SHORT(){return mc}static get DATETIME_SHORT_WITH_SECONDS(){return fc}static get DATETIME_MED(){return hc}static get DATETIME_MED_WITH_SECONDS(){return pc}static get DATETIME_MED_WITH_WEEKDAY(){return Og}static get DATETIME_FULL(){return gc}static get DATETIME_FULL_WITH_SECONDS(){return yc}static get DATETIME_HUGE(){return kc}static get DATETIME_HUGE_WITH_SECONDS(){return _c}}function fr(e){if(x.isDateTime(e))return e;if(e&&e.valueOf&&dn(e.valueOf()))return x.fromJSDate(e);if(e&&typeof e=="object")return x.fromObject(e);throw new it(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const le={};le.format=function(e,n){return e=e?new Date(e):new Date,x.fromJSDate(e).toFormat(n)},le.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),x.fromObject({hour:parseInt(n,10),minute:parseInt(r,10)}).toFormat("h:mma").toLowerCase().replace(/:00/g,"")},le.timeago=function(e,n){return x.fromJSDate(new Date(e)).toRelative(n)},le.getDatesBetween=function(e,n){const r=[];let i=x.fromISO(e);const s=x.fromISO(n);for(;i<=s;)r.push(i.toISODate()),i=i.plus({days:1});return r},le.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)}},le.getMiddleDate=function(e,n){const r=e.getTime(),i=n.getTime(),s=(r+i)/2;return new Date(s)},le.shortTime=function(e){return e.toJSDate||(e=x.fromJSDate(new Date(e))),e.toFormat("mm")==="00"?e.toFormat("ha").toLowerCase():e.toFormat("h:mma").toLowerCase()},le.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?x.fromJSDate(e).setZone(r):x.fromJSDate(e),o=n?r?x.fromJSDate(n).setZone(r):x.fromJSDate(n):s}catch{s=x.fromJSDate(e),o=n?x.fromJSDate(n):s}const l=x.now(),a=r&&s.zoneName!==x.local().zoneName?` (${s.zoneName})`:"",d=s.year!==l.year?` ${s.year}`:"";return s.hasSame(o,"day")?le.shortTime(s)==="12am"?`${s.toFormat("d MMMM")}${d}${a}`:`${le.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}`},le.readableDateRange=function(e,n,r){if(!e)return;if(!n)return le.readableDate(e);e=x.fromJSDate(new Date(e)),n=x.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?le.shortTime(e)==="12am"?`${le.readableDate(n)}`:`${le.shortTime(e)} - ${le.readableDate(n)}`:o===d?`${le.readableDate(e)} - ${le.readableDate(n)}`:s===c?`${e.toFormat("d")} - ${n.toFormat("d LLL")}`:i===a?`${le.readableDate(e)} - ${le.readableDate(n)}`:`${le.readableDate(e)} - ${le.readableDate(n)}`},le.readableDate=function(e){if(!e)return;const n=new Date,r=x.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=x.fromJSDate(e),c=a.toFormat("yyyy"),d=a.toFormat("LLL yyyy"),m=a.toFormat("WW yyyy");if(a.toFormat("d LLL yyyy")===l)return`${le.shortTime(a)} today`;if(m===o)if(e>n){const f=parseInt(r.toFormat("d"));return parseInt(a.toFormat("d"))-f===1?`${le.shortTime(a)} tomorrow`:`${le.shortTime(a)} ${a.toFormat("cccc")}`}else return`${a.toRelativeCalendar()}`;return d===s?le.shortTime(a)==="12am"?`${a.toFormat("d LLL")}`:`${le.shortTime(a)} ${a.toFormat("d LLL")}`:c===i?a.toFormat("cccc d LLL"):a.toFormat("d LLL yyyy")};function wd(e){var h,g;const n=t.reactive({items:[],hash:{},hex:{},loading:!1,loaded:!1,_fullyLoaded:{}});let r=null;const i={};function s(p,k){if(!(!p||!k))for(const y of Object.keys(k))p[y]=k[y]}function o(p){const k={},y={};return p.forEach(function(w){w.key&&(k[w.key]=w),w.hex&&(y[w.hex]=w)}),{hash:k,hex:y}}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:y}=await e.api.get("/glossary/index",{cache:!1}),w=y||[],{hash:T,hex:M}=o(w);n._fullyLoaded={},n.items=w,n.hash=T,n.hex=M,n.loaded=!0}catch(y){console.error("GlossaryService: failed to load glossary index",y)}finally{n.loading=!1,r=null}}async function c(p,k){return n._fullyLoaded[p]&&!k?n.hash[p]:(i[p]||(i[p]=d(p)),i[p])}async function d(p,k){try{const{data:y}=await e.api.get(`/glossary/index/${p}`,{cache:!1});if(!y)return;n.hash[p]?s(n.hash[p],y):n.hash[p]=y;const w=n.items.findIndex(function(T){return T.key===p});return w!==-1&&s(n.items[w],y),n._fullyLoaded[p]=!0,n.hash[p]}catch(y){console.error(`GlossaryService: failed to load definition for '${p}'`,y)}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(k){return c(k,!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(k){return c(k,!0)}))},n.definitionName=function(p,k){const y=n.hash[p];return y?k?y.plural:y.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,y;if(p){const w=(y=(k=p==null?void 0:p.session)==null?void 0:k.organisation)==null?void 0:y._id;u&&w!==u&&m(),u=w||null,l(!1)}else u=null,m()});const f=e.auth.getCurrentUser();return f&&(u=((g=(h=f==null?void 0:f.session)==null?void 0:h.organisation)==null?void 0:g._id)||null,l(!1)),n}const io={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"},Tk=(e,n)=>{try{if(!window.Stripe)throw new Error(io.STRIPE_NOT_LOADED);return window.Stripe(e,n)}catch(r){return console.error(r),r}},Sk=(e,n)=>{try{if(!e)throw new Error(io.INSTANCE_NOT_DEFINED);return e.elements(n)}catch(r){return console.error(r),r}},Bk=(e,n,r)=>{try{if(!e)throw new Error(io.ELEMENTS_NOT_DEFINED);if(!n)throw new Error(io.ELEMENT_TYPE_NOT_DEFINED);return e.create(n,r)}catch(i){return console.error(i),i}};var xd=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r};const Dk=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=Bk(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}}}),Ok={ref:"mountPoint"};function Mk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ok,null,512)}var Ti=xd(Dk,[["render",Mk]]);const Fk=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=Tk(n.value,r.value),o.value=Sk(s.value,i.value)}),t.watch(i,()=>{var a;(a=o.value)==null||a.update(i.value)}),{elements:o,instance:s,elementsUsable:l}}}),Ik={key:0};function Ak(e,n,r,i,s,o){return e.elementsUsable?(t.openBlock(),t.createElementBlock("div",Ik,[t.renderSlot(e.$slots,"default",{instance:e.instance,elements:e.elements})])):t.createCommentVNode("",!0)}var Si=xd(Fk,[["render",Ak]]);const b=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r},Lk={props:{center:{type:Boolean},shrink:{type:Boolean}}};function Rk(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 bd=b(Lk,[["render",Rk],["__scopeId","data-v-b03628f8"]]),Pk={},Uk={class:"flex-column-body"};function $k(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Uk,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Cd=b(Pk,[["render",$k],["__scopeId","data-v-ab49c425"]]),zk={},jk={class:"flex-column-header"};function qk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",jk,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Vd=b(zk,[["render",qk],["__scopeId","data-v-968bcded"]]),Hk={},Wk={class:"flex-column-footer"};function Gk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Wk,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Ed=b(Hk,[["render",Gk],["__scopeId","data-v-941966e2"]]),Yk={props:{flex:{type:Boolean},center:{type:Boolean},vcenter:{type:Boolean},alignBottom:{type:Boolean},shrink:{type:Boolean}}};function Kk(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 Nd=b(Yk,[["render",Kk],["__scopeId","data-v-efd82fd0"]]),Jk={props:{center:{type:Boolean},vcenter:{type:Boolean},gap:{type:Boolean},wrap:{type:Boolean}}};function Zk(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 Td=b(Jk,[["render",Zk],["__scopeId","data-v-bd96c129"]]),Xk={},Qk={class:"flex-spacer"};function vk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Qk)}const Sd=b(Xk,[["render",vk],["__scopeId","data-v-f42ac625"]]),e_={},t_={class:"panel"};function n_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",t_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Bd=b(e_,[["render",n_],["__scopeId","data-v-dc6d0d19"]]),r_={},o_={class:"panel-body"};function i_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",o_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Dd=b(r_,[["render",i_],["__scopeId","data-v-53a6d4be"]]),s_={},l_={class:"panel-header"};function a_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",l_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Od=b(s_,[["render",a_],["__scopeId","data-v-315be8cb"]]),c_={},d_={class:"panel-footer"};function u_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",d_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Md=b(c_,[["render",u_],["__scopeId","data-v-e87fc082"]]);var so=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bi,Fd;function hr(){if(Fd)return Bi;Fd=1;function e(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return Bi=e,Bi}var Di,Id;function Ad(){if(Id)return Di;Id=1;var e=typeof so=="object"&&so&&so.Object===Object&&so;return Di=e,Di}var Oi,Ld;function zn(){if(Ld)return Oi;Ld=1;var e=Ad(),n=typeof self=="object"&&self&&self.Object===Object&&self,r=e||n||Function("return this")();return Oi=r,Oi}var Mi,Rd;function m_(){if(Rd)return Mi;Rd=1;var e=zn(),n=function(){return e.Date.now()};return Mi=n,Mi}var Fi,Pd;function f_(){if(Pd)return Fi;Pd=1;var e=/\s/;function n(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return Fi=n,Fi}var Ii,Ud;function h_(){if(Ud)return Ii;Ud=1;var e=f_(),n=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Ii=r,Ii}var Ai,$d;function Li(){if($d)return Ai;$d=1;var e=zn(),n=e.Symbol;return Ai=n,Ai}var Ri,zd;function p_(){if(zd)return Ri;zd=1;var e=Li(),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 Ri=o,Ri}var Pi,jd;function g_(){if(jd)return Pi;jd=1;var e=Object.prototype,n=e.toString;function r(i){return n.call(i)}return Pi=r,Pi}var Ui,qd;function pr(){if(qd)return Ui;qd=1;var e=Li(),n=p_(),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 Ui=l,Ui}var $i,Hd;function gr(){if(Hd)return $i;Hd=1;function e(n){return n!=null&&typeof n=="object"}return $i=e,$i}var zi,Wd;function lo(){if(Wd)return zi;Wd=1;var e=pr(),n=gr(),r="[object Symbol]";function i(s){return typeof s=="symbol"||n(s)&&e(s)==r}return zi=i,zi}var ji,Gd;function Yd(){if(Gd)return ji;Gd=1;var e=h_(),n=hr(),r=lo(),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 ji=c,ji}var qi,Kd;function y_(){if(Kd)return qi;Kd=1;var e=hr(),n=m_(),r=Yd(),i="Expected a function",s=Math.max,o=Math.min;function l(a,c,d){var m,u,f,h,g,p,k=0,y=!1,w=!1,T=!0;if(typeof a!="function")throw new TypeError(i);c=r(c)||0,e(d)&&(y=!!d.leading,w="maxWait"in d,f=w?s(r(d.maxWait)||0,c):f,T="trailing"in d?!!d.trailing:T);function M(H){var te=m,he=u;return m=u=void 0,k=H,h=a.apply(he,te),h}function $(H){return k=H,g=setTimeout(U,c),y?M(H):h}function W(H){var te=H-p,he=H-k,ge=c-te;return w?o(ge,f-he):ge}function C(H){var te=H-p,he=H-k;return p===void 0||te>=c||te<0||w&&he>=f}function U(){var H=n();if(C(H))return R(H);g=setTimeout(U,W(H))}function R(H){return g=void 0,T&&m?M(H):(m=u=void 0,h)}function P(){g!==void 0&&clearTimeout(g),k=0,m=p=u=g=void 0}function F(){return g===void 0?h:R(n())}function re(){var H=n(),te=C(H);if(m=arguments,u=this,p=H,te){if(g===void 0)return $(p);if(w)return clearTimeout(g),g=setTimeout(U,c),M(p)}return g===void 0&&(g=setTimeout(U,c)),h}return re.cancel=P,re.flush=F,re}return qi=l,qi}var k_=y_();const jn=Yt(k_),__=["onClick"],w_=["onClick"],Jd=b({__name:"tabset",props:{vertical:Boolean,inline:Boolean,pills:Boolean,defaultTab:String},setup(e){const n=e,r=t.useSlots(),i=t.reactive({tabs:[]});t.provide("tabset",i);const s=t.ref();t.provide("activeHeading",s);const o=function(f){s.value=f},l=jn(function(){const h=r.default().reduce(function(k,y){var w;return((w=y.type)==null?void 0:w.name)==="tab"?k.push(y):y.children&&(k=[...k,...y.children]),k},[]).filter(function(k){var y;return((y=k.type)==null?void 0:y.name)==="tab"&&k.props.enabled!==!1}).map(function(k,y){const w=k.props.heading,T=k.props.tabKey||w;return{heading:w,key:T,index:y}});i.tabs=h;const g=h.reduce(function(k,y){return k[y.key||y.heading]=!0,k},{}),p=s.value;if((!p||!g[p])&&h.length){let k;n.defaultTab&&g[n.defaultTab]?k=n.defaultTab:k=h[0].key||h[0].heading,s.value=k}});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 g=t.resolveComponent("flex-body"),p=t.resolveComponent("flex-column"),k=t.resolveComponent("ux-button"),y=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},[t.unref(d)?(t.openBlock(),t.createBlock(p,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(g,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(T,M)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===T}),key:`tab-link-${T}`,onClick:$=>o(T)},t.toDisplayString(t.unref(a)[M]),11,__))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):e.pills?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(d)?(t.openBlock(),t.createBlock(w,{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(t.unref(c),(T,M)=>(t.openBlock(),t.createBlock(k,{color:s.value===T?"primary":"",key:`tab-pill-${T}`,onClick:$=>o(T)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)[M]),1)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.unref(d)?(t.openBlock(),t.createBlock(w,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(y,{ref_key:"menuRow",ref:m},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(T,M)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===T}),key:`tab-link-${T}`,onClick:$=>o(T)},t.toDisplayString(t.unref(a)[M]),11,w_))),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 b_(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 Zd=b(x_,[["render",b_]]);var Hi,Xd;function yr(){if(Xd)return Hi;Xd=1;var e=Array.isArray;return Hi=e,Hi}var Wi,Qd;function C_(){if(Qd)return Wi;Qd=1;var e=yr(),n=lo(),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 Wi=s,Wi}var Gi,vd;function eu(){if(vd)return Gi;vd=1;var e=pr(),n=hr(),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 Gi=l,Gi}var Yi,tu;function V_(){if(tu)return Yi;tu=1;var e=zn(),n=e["__core-js_shared__"];return Yi=n,Yi}var Ki,nu;function E_(){if(nu)return Ki;nu=1;var e=V_(),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 Ki=r,Ki}var Ji,ru;function N_(){if(ru)return Ji;ru=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 Ji=r,Ji}var Zi,ou;function T_(){if(ou)return Zi;ou=1;var e=eu(),n=E_(),r=hr(),i=N_(),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 Zi=u,Zi}var Xi,iu;function S_(){if(iu)return Xi;iu=1;function e(n,r){return n==null?void 0:n[r]}return Xi=e,Xi}var Qi,su;function vi(){if(su)return Qi;su=1;var e=T_(),n=S_();function r(i,s){var o=n(i,s);return e(o)?o:void 0}return Qi=r,Qi}var es,lu;function ao(){if(lu)return es;lu=1;var e=vi(),n=e(Object,"create");return es=n,es}var ts,au;function B_(){if(au)return ts;au=1;var e=ao();function n(){this.__data__=e?e(null):{},this.size=0}return ts=n,ts}var ns,cu;function D_(){if(cu)return ns;cu=1;function e(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}return ns=e,ns}var rs,du;function O_(){if(du)return rs;du=1;var e=ao(),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 rs=s,rs}var os,uu;function M_(){if(uu)return os;uu=1;var e=ao(),n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;return e?o[s]!==void 0:r.call(o,s)}return os=i,os}var is,mu;function F_(){if(mu)return is;mu=1;var e=ao(),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 is=r,is}var ss,fu;function I_(){if(fu)return ss;fu=1;var e=B_(),n=D_(),r=O_(),i=M_(),s=F_();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 ls,hu;function A_(){if(hu)return ls;hu=1;function e(){this.__data__=[],this.size=0}return ls=e,ls}var as,pu;function gu(){if(pu)return as;pu=1;function e(n,r){return n===r||n!==n&&r!==r}return as=e,as}var cs,yu;function co(){if(yu)return cs;yu=1;var e=gu();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 ds,ku;function L_(){if(ku)return ds;ku=1;var e=co(),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 ds=i,ds}var us,_u;function R_(){if(_u)return us;_u=1;var e=co();function n(r){var i=this.__data__,s=e(i,r);return s<0?void 0:i[s][1]}return us=n,us}var ms,wu;function P_(){if(wu)return ms;wu=1;var e=co();function n(r){return e(this.__data__,r)>-1}return ms=n,ms}var fs,xu;function U_(){if(xu)return fs;xu=1;var e=co();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 fs=n,fs}var hs,bu;function $_(){if(bu)return hs;bu=1;var e=A_(),n=L_(),r=R_(),i=P_(),s=U_();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,hs=o,hs}var ps,Cu;function z_(){if(Cu)return ps;Cu=1;var e=vi(),n=zn(),r=e(n,"Map");return ps=r,ps}var gs,Vu;function j_(){if(Vu)return gs;Vu=1;var e=I_(),n=$_(),r=z_();function i(){this.size=0,this.__data__={hash:new e,map:new(r||n),string:new e}}return gs=i,gs}var ys,Eu;function q_(){if(Eu)return ys;Eu=1;function e(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}return ys=e,ys}var ks,Nu;function uo(){if(Nu)return ks;Nu=1;var e=q_();function n(r,i){var s=r.__data__;return e(i)?s[typeof i=="string"?"string":"hash"]:s.map}return ks=n,ks}var _s,Tu;function H_(){if(Tu)return _s;Tu=1;var e=uo();function n(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return _s=n,_s}var ws,Su;function W_(){if(Su)return ws;Su=1;var e=uo();function n(r){return e(this,r).get(r)}return ws=n,ws}var xs,Bu;function G_(){if(Bu)return xs;Bu=1;var e=uo();function n(r){return e(this,r).has(r)}return xs=n,xs}var bs,Du;function Y_(){if(Du)return bs;Du=1;var e=uo();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 bs=n,bs}var Cs,Ou;function Mu(){if(Ou)return Cs;Ou=1;var e=j_(),n=H_(),r=W_(),i=G_(),s=Y_();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,Cs=o,Cs}var Vs,Fu;function K_(){if(Fu)return Vs;Fu=1;var e=Mu(),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,Vs=r,Vs}var Es,Iu;function J_(){if(Iu)return Es;Iu=1;var e=K_(),n=500;function r(i){var s=e(i,function(l){return o.size===n&&o.clear(),l}),o=s.cache;return s}return Es=r,Es}var Ns,Au;function Z_(){if(Au)return Ns;Au=1;var e=J_(),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 Ns=i,Ns}var Ts,Lu;function Ru(){if(Lu)return Ts;Lu=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 Ts=e,Ts}var Ss,Pu;function X_(){if(Pu)return Ss;Pu=1;var e=Li(),n=Ru(),r=yr(),i=lo(),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 Ss=l,Ss}var Bs,Uu;function Ds(){if(Uu)return Bs;Uu=1;var e=X_();function n(r){return r==null?"":e(r)}return Bs=n,Bs}var Os,$u;function Q_(){if($u)return Os;$u=1;var e=yr(),n=C_(),r=Z_(),i=Ds();function s(o,l){return e(o)?o:n(o,l)?[o]:r(i(o))}return Os=s,Os}var Ms,zu;function v_(){if(zu)return Ms;zu=1;var e=lo();function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return Ms=n,Ms}var Fs,ju;function ew(){if(ju)return Fs;ju=1;var e=Q_(),n=v_();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 Fs=r,Fs}var Is,qu;function tw(){if(qu)return Is;qu=1;var e=ew();function n(r,i,s){var o=r==null?void 0:e(r,i);return o===void 0?s:o}return Is=n,Is}var nw=tw();const Kt=Yt(nw),ke={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},rw={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)||[]}}},ow={class:"table-quicktag-cell"};function iw(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",ow,[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 sw=b(rw,[["render",iw],["__scopeId","data-v-d98dce09"]]),lw={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)}}},aw={class:"table-avatar-cell"},cw={class:"avatar-wrapper"};function dw(e,n,r,i,s,o){const l=t.resolveComponent("avatar",!0);return t.openBlock(),t.createElementBlock("td",aw,[t.createElementVNode("div",cw,[t.createVNode(l,{id:o.source,initials:o.initials},null,8,["id","initials"])])])}const uw=b(lw,[["render",dw],["__scopeId","data-v-a4b42e00"]]),mw={mixins:[ke],computed:{formatted(){return this.$sdk.date.readableTime(this.value)}}},fw={class:"table-time-cell"};function hw(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",fw,[t.createVNode(l,{icon:"far fa-clock"}),t.createTextVNode(" "+t.toDisplayString(o.formatted),1)])}const pw=b(mw,[["render",hw],["__scopeId","data-v-677f555b"]]),gw={mixins:[ke],computed:{key(){return this.column.key},rawSource(){return Kt(this.row,this.key)},source(){return Array.isArray(this.rawSource)?this.rawSource[0]:this.rawSource?this.rawSource: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 _w=b(gw,[["render",kw],["__scopeId","data-v-0d557d14"]]),ww={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 bw=b(ww,[["render",xw],["__scopeId","data-v-c62e82ec"]]),Cw={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,await this.button.action(this.row,this.column,this),this.processing=!1}}},Vw={class:"table-button-cell"};function Ew(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",Vw,[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 Nw=b(Cw,[["render",Ew],["__scopeId","data-v-413157fd"]]),Tw={mixins:[ke],methods:{timeago(e){return x.fromJSDate(e).toRelative()},readable(e){e=x.fromJSDate(e);let n=x.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)}}},Sw={class:"table-date-cell"},Bw={class:"date-pill"},Dw={class:"off"},Ow={class:"on"},Mw={class:"spacer"};function Fw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",Sw,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,l=>(t.openBlock(),t.createElementBlock("div",Bw,[t.createElementVNode("span",Dw,t.toDisplayString(l.readable),1),t.createElementVNode("span",Ow,t.toDisplayString(l.timeago),1),t.createElementVNode("span",Mw,t.toDisplayString(l.readable),1)]))),256))])}const Hu=b(Tw,[["render",Fw],["__scopeId","data-v-f3b929d9"]]),Iw={mixins:[ke],methods:{timeago(e){return x.fromJSDate(e).toRelative()},readable(e){e=x.fromJSDate(e);let n=x.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)}}},Aw={class:"table-date-cell"},Lw={class:"off"},Rw={class:"on"},Pw={class:"spacer"};function Uw(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",Aw,[(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",Lw,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)]),t.createElementVNode("span",Rw,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.timeago),1)]),t.createElementVNode("span",Pw,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)])],2))),256))])}const $w=b(Iw,[["render",Uw],["__scopeId","data-v-0e48d460"]]),zw={mixins:[ke],computed:{boolean(){return!!this.value}}};function jw(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 Wu=b(zw,[["render",jw],["__scopeId","data-v-b180904a"]]),qw={mixins:[ke],computed:{size(){return this.$sdk.files.filesize(this.value)}}};function Hw(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 Ww=b(qw,[["render",Hw],["__scopeId","data-v-0419990c"]]);function Gw(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 Yw={mixins:[ke],computed:{duration(){return Gw(this.value)}}};function Kw(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 Jw=b(Yw,[["render",Kw],["__scopeId","data-v-2910d792"]]),Zw={mixins:[ke],methods:{async clicked(){const e=this,n=e.$sdk.utils.id(e.row),r=e.public?"secure":"public";e.processing=!0,e.$sdk.content.patch(n,{meta:{security:r}}).catch(function(i){e.$sdk.error(i),e.processing=!1}).then(function(i){e.v=r,e.processing=!1,e.$sdk.notify(`Set security to ${r}`)})}},data(){return{processing:!1,v:this.value}},computed:{canEdit(){var e=this.user;return this.$sdk.access.canEditItem(e,this.row)},public(){return this.security==="public"},security(){return this.v||"secure"}}};function Xw(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 Qw=b(Zw,[["render",Xw],["__scopeId","data-v-45dd2b07"]]),vw={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}}},e1={class:"table-url-cell"},t1=["href"];function n1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",e1,[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,t1)):t.createCommentVNode("",!0)])}const Gu=b(vw,[["render",n1],["__scopeId","data-v-aa99a5e7"]]);var Yu=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}};const Ku={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(C){a[C]===void 0&&(h.$data[C]=n[C])}),Object.keys(r).forEach(function(C){c[C]===void 0&&(h.$props[C]=r[C])}),Object.keys(l).forEach(function(C){m[C]===void 0&&(h.methods[C]=l[C])}),Object.keys(o).forEach(function(C){u[C]===void 0&&(h.computed[C]=o[C])}),Object.keys(s).forEach(function(C){f[C]===void 0&&(h.components[C]=s[C])});var g=Object.keys(h.methods||{}),p=Object.keys(h.$data||{}),k=Object.keys(h.$props||{}),y=Object.keys(this.templateProps),w=p.concat(k).concat(g).concat(y),T=($=e,W={},g.forEach(function(C){return Yu($,W,C)}),W),M=function(C){var U={};return C.forEach(function(R){R&&Object.getOwnPropertyNames(R).forEach(function(P){return Yu(R,U,P)})}),U}([h.$data,h.$props,T,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({},M))}var $,W}},r1={components:{Compile:Ku},mixins:[ke]},o1={class:"table-computed-cell"};function i1(e,n,r,i,s,o){const l=t.resolveComponent("compile");return t.openBlock(),t.createElementBlock("td",o1,[t.createVNode(l,{template:this.column.code},null,8,["template"])])}const s1=b(r1,[["render",i1],["__scopeId","data-v-05dd3203"]]),l1={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 x.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 a1(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 c1=b(l1,[["render",a1],["__scopeId","data-v-27442ac9"]]),d1=".total",u1={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,-d1.length)},itemPath(){return`${this.rawPath}.items`},value(){return Kt(this.row,this.column.key)},items(){return Kt(this.row,this.itemPath)}}},m1={class:"table-complex-cell"},f1={class:"items"};function h1(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",m1,[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)]),_:2},1040)]),default:t.withCtx(()=>[t.createElementVNode("div",f1,[(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 p1=b(u1,[["render",h1],["__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 _1=b(g1,[["render",k1],["__scopeId","data-v-9c894a39"]]),w1={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 b1(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 C1=b(w1,[["render",b1],["__scopeId","data-v-be3bef4b"]]),V1={mixins:[ke],computed:{status(){return String(this.value||"").toLowerCase()}}},E1={key:0,class:"pill"};function N1(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",E1,t.toDisplayString(o.status),1)):t.createCommentVNode("",!0)],2)}const T1=b(V1,[["render",N1],["__scopeId","data-v-357810c2"]]),S1={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}}},B1={class:"title"},D1={key:0,class:"subtitle"};function O1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-title-cell",e.status])},[t.createElementVNode("div",B1,t.toDisplayString(e.value),1),o.subtitle?(t.openBlock(),t.createElementBlock("div",D1,t.toDisplayString(o.subtitle),1)):t.createCommentVNode("",!0)],2)}const M1=b(S1,[["render",O1],["__scopeId","data-v-bf723bb2"]]),F1={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 I1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("span",{class:"ux-circle",style:t.normalizeStyle(o.style)},null,4)}const mo=b(F1,[["render",I1],["__scopeId","data-v-6f2d4cea"]]),A1={mixins:[ke],components:{UxCircle:mo},computed:{scopes(){return this.column.key==="_id"?[this.row]:(this.value||[]).filter(function({unit:n}){return!n})}}},L1={class:"scope-circles-cell"};function R1(e,n,r,i,s,o){const l=t.resolveComponent("ux-circle"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",L1,[(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 P1=b(A1,[["render",R1],["__scopeId","data-v-f79f00ee"]]),U1={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}}},$1={class:"content-type-cell"};function z1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",$1,t.toDisplayString(o.title),1)}const j1=b(U1,[["render",z1],["__scopeId","data-v-f8cf385c"]]),q1={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}}},H1={class:"table-roster-cell"},W1={class:"event-title"},G1={class:"event-date"},Y1={class:"event-subtitle"},K1={class:"preview"},J1={class:"grid"},Z1={class:"face"};function X1(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",H1,[o.rosterEnabled&&o.count?(t.openBlock(),t.createBlock(h,{key:0,right:"",group:"roster-preview"},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"sm"},t.toHandlers(g),{icon:"",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:2},1040)]),default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",W1,t.toDisplayString(e.row.title),1),t.createElementVNode("div",G1,t.toDisplayString(e.$sdk.date.readableEventDate(e.row)),1),t.createElementVNode("div",Y1,t.toDisplayString(e.row.subtitle),1)]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",K1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.rosters,g=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",J1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.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,k=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["assignment",k.state||"unknown"])},[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",Z1,[t.createVNode(c,{initials:`${k.profile.firstName} ${k.profile.lastName}`,id:k.profile},null,8,["initials","id"])])]),_:2},1024),t.createVNode(d,null,{default:t.withCtx(()=>{var y,w;return[t.createTextVNode(t.toDisplayString((y=k.profile)==null?void 0:y.firstName)+" "+t.toDisplayString((w=k.profile)==null?void 0:w.lastName),1)]}),_:2},1024)]),_:2},1024)],2))),256))]))),256))])]))),256))])]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)])}const Q1=b(q1,[["render",X1],["__scopeId","data-v-88720bfa"]]),v1={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}}},ex={class:"table-roster-cell"},tx={class:"wrp"},nx={key:1,class:"hover"};function rx(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",ex,[t.withDirectives((t.openBlock(),t.createElementBlock("div",tx,[o.count?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.count>1?(t.openBlock(),t.createBlock(u,{key:0},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"xs"},t.toHandlers(g),{onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"])),icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:2},1040)]),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,g=>(t.openBlock(),t.createBlock(c,{onClick:p=>o.openRunsheet(g)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.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(g=>o.openRunsheet(s.runsheets[0]),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1}))],64)):(t.openBlock(),t.createElementBlock("div",nx,[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 ox=b(v1,[["render",rx],["__scopeId","data-v-3ea39cda"]]);function As(e,n){if(!e||!n)return;const r=n.split("|");n=r[0];const i=r[1];var s=Kt(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=Kt(e,l);return Array.isArray(c)?c.map(function(d){return As(d,a)}).flat().filter(Boolean):As(c,a)}const ix={data(){return{component:null}},components:{ValueRenderer:c1},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;default:i=i||e.column.widget;break}switch(r){case"boolean":i="boolean";break;case"reference":e.column.referenceType==="image"&&(i="thumbnail");break}switch(i){case"filesize":n=Ww;break;case"duration":n=Jw;break;case"button":n=Nw;break;case"security":n=Qw;break;case"boolean":n=Wu;break;case"roster":n=Q1;break;case"runsheet":n=ox;break;case"personainvite":n=C1;break;case"personaemail":n=_1;break;case"time":case"timefield":n=pw;break;case"date":case"datetime":n=Hu;break;case"due":n=$w;break;case"circles":n=P1;break;case"title":n=M1;break;case"type":n=j1;break;case"complex":n=p1;break;case"status":n=T1;break;case"computed":n=s1;break;case"url":n=Gu;break;case"currency":n=bw;break;case"tag":n=sw;break;case"avatar":n=uw;break;case"thumbnail":n=_w;break;default:switch(r){case"date":n=Hu;break;case"boolean":n=Wu;break;case"url":n=Gu;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=As(this.row,this.column.key);return e}}},sx={class:"value"};function lx(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",sx,[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 Ju=b(ix,[["render",lx],["__scopeId","data-v-43da03cf"]]),ax={components:{TableCell:Ju},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}}},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}}};function cx(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})])):t.createCommentVNode("",!0)],!0)],2)}const dx=b(ax,[["render",cx],["__scopeId","data-v-e196f762"]]),Zu={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)}},ux={mixins:[Zu],components:{TableRow:dx,TableCell:Ju},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=Kt(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)}}},mx={class:"table-scroll",ref:"scroll"},fx={key:0,class:"first table-select shrink"},hx=["onClick"],px={key:1,class:"last shrink"},gx={key:0};function yx(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",mx,[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",fx,[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(()=>[t.createTextVNode(" Select Page ")]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[1]||(n[1]=h=>o.deselectPage())},{default:t.withCtx(()=>[t.createTextVNode(" Deselect Page ")]),_: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(()=>[t.createTextVNode(" Deselect All ")]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,h=>{var g;return t.openBlock(),t.createElementBlock("th",{onClick:p=>o.toggleSort(h),class:t.normalizeClass([{sortable:h.sortable!==!1,active:h.key===((g=s.sorting)==null?void 0:g.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,hx)}),256)),r.enableActions?(t.openBlock(),t.createElementBlock("th",px,[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",gx,[t.createElementVNode("td",null,t.toDisplayString(h.title),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.rows,(g,p)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,key:g._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onMousedown:select":o.mousedownSelect,"onMouseenter:select":o.mouseenterSelect,"onClick:actions":o.clickActions,selected:o.isSelected(g),row:g,index:p,columns:r.columns},null,8,["enableSelection","enableActions","onClick:cell","onClick:row","onMousedown:select","onMouseenter:select","onClick:actions","selected","row","index","columns"]))),128))],64))),256))])])],512)],34)}const Xu=b(ux,[["render",yx],["__scopeId","data-v-08948247"]]);var fo={exports:{}},Qu;function kx(){if(Qu)return fo.exports;Qu=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 fo.exports=function(s,o,l){return JSON.stringify(i(s),o,l)},fo.exports.ensureProperties=i,fo.exports}var _x=kx();const Ls=Yt(_x);function wx(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function vu(e){return e!=null}const K={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);(Ls(r)!=Ls(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=vu(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),vu(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 wx(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]),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 e=this.$refs.input;if(e){var n;Array.isArray(e)?(console.log("ELEMENTS LENGTH?",e),n=e[e.length-1]):n=e,n&&(console.log("INPUT",n),n.focus())}}}};function xx(e){return e===void 0||typeof e>"u"||e===null||String(e)==="null"||String(e)==="undefined"}const bx={data(){return{candidate:null}},props:{modelValue:{},pills:{type:Boolean,default:!1}},mixins:[K],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 xx(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}))}}},Cx=e=>(t.pushScopeId("data-v-bf1479ae"),e=e(),t.popScopeId(),e),Vx={key:0,class:"ux-field-title"},Ex={key:0,class:"ux-required-marker"},Nx={key:1,class:"ux-field-description"},Tx={key:2,class:"select-tags"},Sx=["onClick"],Bx={key:3},Dx={key:4,class:"select-input-wrapper"},Ox={class:"ui-select-button"},Mx=Cx(()=>t.createElementVNode("option",{value:""},"Select an option",-1)),Fx=["label"],Ix=["value"],Ax=["value"],Lx={class:"ui-select-button"},Rx=["multiple"],Px={key:0,value:""},Ux=["label"],$x=["value"],zx=["value"];function jx(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",Vx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Ex,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Nx,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Tx,[(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:g=>o.removeValue(h)},[t.createVNode(a,{icon:"fa-times"})],8,Sx)]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.loadingAsyncOptions?(t.openBlock(),t.createElementBlock("div",Bx,[t.createVNode(a,{icon:"fa-spinner",spin:"",left:""}),t.createTextVNode(" Loading Options ")])):(t.openBlock(),t.createElementBlock("div",Dx,[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.canAddValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Ox,[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},[Mx,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,Ix))),256))],8,Fx))),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,Ax))),256))],32)),[[t.vModelSelect,s.candidate]])],64)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",Lx,[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",Px,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,$x))),256))],8,Ux))),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,zx))),256))],40,Rx)),[[t.vModelSelect,e.model]])],64))]))],2)}const Vt=b(bx,[["render",jx],["__scopeId","data-v-bf1479ae"]]),qx={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:Vt},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 Hx(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 em=b(qx,[["render",Hx],["__scopeId","data-v-93d339c8"]]);function Wx(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function tm(e){return typeof e=="function"?e():t.unref(e)}const Gx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yx=e=>e!=null,Rs=()=>{};function Ps(e){var n;const r=tm(e);return(n=r==null?void 0:r.$el)!=null?n:r}const Kx=Gx?window:void 0;function Jx(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function Zx(e){const n=Jx();return t.computed(()=>(n.value,!!e()))}function Xx(e,n,r={}){const{root:i,rootMargin:s="0px",threshold:o=.1,window:l=Kx,immediate:a=!0}=r,c=Zx(()=>l&&"IntersectionObserver"in l),d=t.computed(()=>{const g=tm(e);return(Array.isArray(g)?g:[g]).map(Ps).filter(Yx)});let m=Rs;const u=t.ref(a),f=c.value?t.watch(()=>[d.value,Ps(i),u.value],([g,p])=>{if(m(),!u.value||!g.length)return;const k=new IntersectionObserver(n,{root:Ps(p),rootMargin:s,threshold:o});g.forEach(y=>y&&k.observe(y)),m=()=>{k.disconnect(),m=Rs}},{immediate:a,flush:"post"}):Rs,h=()=>{m(),f(),u.value=!1};return Wx(h),{isSupported:c,isActive:u,pause(){m(),u.value=!1},resume(){u.value=!0},stop:h}}const Qx={setup(){const e=t.ref(!1),n=t.ref(),{stop:r}=Xx(n,([{isIntersecting:i}])=>{i&&(e.value=!0,r())},{rootMargin:"600px"});return{targetEl:n,shouldRender:e}}},vx={ref:"targetEl"};function eb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",vx,[i.shouldRender?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)],512)}const nm=b(Qx,[["render",eb]]),tb={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}}},nb={class:"icon-circle"};function rb(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",nb,[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 rm=b(tb,[["render",rb],["__scopeId","data-v-9669e7c0"]]),ob={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}}},ib={key:0,class:"initials"};function sb(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",ib,t.toDisplayString(o.initialLetters),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"avatar-img",style:t.normalizeStyle(o.style)},null,4)],2)}const Us=b(ob,[["render",sb],["__scopeId","data-v-f8d86e04"]]),lb={props:{large:{type:Boolean}}},ab=[(e=>(t.pushScopeId("data-v-d9a57955"),e=e(),t.popScopeId(),e))(()=>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))];function cb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},ab,2)}const gn=b(lb,[["render",cb],["__scopeId","data-v-d9a57955"]]),db={components:{Spinner:gn},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"}}}},ub={class:"ux-btn-text"};function mb(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",ub,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}const om=b(db,[["render",mb],["__scopeId","data-v-ea56e98b"]]),fb={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 hb(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 ho=b(fb,[["render",hb],["__scopeId","data-v-54bb07ba"]]),pb={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 gb(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 $s=b(pb,[["render",gb],["__scopeId","data-v-1a0e83ee"]]),yb={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 kb(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 im=b(yb,[["render",kb],["__scopeId","data-v-7a924ee2"]]),_b={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 wb(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 sm=b(_b,[["render",wb],["__scopeId","data-v-d3c61976"]]),po={cache:{}},xb={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,po.cache[this.group]===this&&(po.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){var n=this.$refs.menu,r=e.srcElement;n&&n.contains(r)?this.closeOnClick&&(this.expanded=!1):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=po.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),po.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 bb(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 lm=b(xb,[["render",bb],["__scopeId","data-v-9a06e510"]]),Cb={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.currentExpandedItems=[]},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 Vb(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 am=b(Cb,[["render",Vb],["__scopeId","data-v-cbfd31c1"]]),Eb={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()},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}}},Nb=["alt","data"],Tb=["loading","alt","src"];function Sb(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,Nb)):(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,Tb))],6)}const cm=b(Eb,[["render",Sb],["__scopeId","data-v-ba449734"]]),Bb={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()},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}}},Db=["poster","playsinline","muted","loop","autoplay","width","height","controls","controlslist"],Ob=["src","type"],Mb=["width","height","src","title"];function Fb(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,Ob),t.createTextVNode(" Your browser does not support the video tag. ")],8,Db)],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,Mb)],4)):t.createCommentVNode("",!0)],2)}const dm=b(Bb,[["render",Fb],["__scopeId","data-v-8f908e0a"]]),Ib={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"}}},Ab={class:"ux-progress"};function Lb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ab,[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 zs=b(Ib,[["render",Lb],["__scopeId","data-v-6e492d1a"]]),Rb={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}}}},Pb={key:0,class:"pill-avatar"},Ub={class:"font-sm font-muted"};function $b(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",Pb,[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",Ub," • "+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 um=b(Rb,[["render",$b],["__scopeId","data-v-709f24b0"]]),zb={},jb={class:"ux-list"};function qb(e,n){return t.openBlock(),t.createElementBlock("ul",jb,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const mm=b(zb,[["render",qb],["__scopeId","data-v-670de630"]]),Hb={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 Wb(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=b(Hb,[["render",Wb],["__scopeId","data-v-a5de8929"]]);var ne;(function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"})(ne||(ne={}));var fe;(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"})(fe||(fe={}));var at;(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"})(at||(at={}));function yn(e,n){e.assign("day",n.getDate()),e.assign("month",n.getMonth()+1),e.assign("year",n.getFullYear())}function hm(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?ne.AM:ne.PM)}function qn(e,n){e.imply("day",n.getDate()),e.imply("month",n.getMonth()+1),e.imply("year",n.getFullYear())}function js(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?ne.AM:ne.PM)}const Gb={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=>pm(e,at.MARCH,fe.SUNDAY,2),dstEnd:e=>pm(e,at.OCTOBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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 Jt(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 pm(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 gm(e,n,r={}){if(e==null)return null;if(typeof e=="number")return e;const i=r[e]??Gb[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 Yb={day:0,second:0,millisecond:0};function Ge(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 go(e){const n={};for(const r in e)n[r]=-e[r];return n}class Zt{constructor(n,r){J(this,"instant");J(this,"timezoneOffset");this.instant=n??new Date,this.timezoneOffset=r??null}static fromDate(n){return new Zt(n)}static fromInput(n,r){if(n instanceof Date)return Zt.fromDate(n);const i=(n==null?void 0:n.instant)??new Date,s=gm(n==null?void 0:n.timezone,i,r);return new Zt(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 de{constructor(n,r){J(this,"knownValues");J(this,"impliedValues");J(this,"reference");J(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=Yb){let i=Ge(n.getDateWithAdjustedTimezone(),r);const s=new de(n);return s.addTag("result/relativeDate"),"hour"in r||"minute"in r||"second"in r||"millisecond"in r?(s.addTag("result/relativeDateAndTime"),hm(s,i),yn(s,i),s.assign("timezoneOffset",n.getTimezoneOffset())):(js(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=Ge(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 de(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(B,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):(B=typeof globalThis<"u"?globalThis:B||self,t(B["@qikdev/vue-ui"]={},B.Vue,B.sdk))})(this,function(B,t,an){"use strict";var C$=Object.defineProperty;var V$=(B,t,an)=>t in B?C$(B,t,{enumerable:!0,configurable:!0,writable:!0,value:an}):B[t]=an;var J=(B,t,an)=>V$(B,typeof t!="symbol"?t+"":t,an);const Ng="0.4.1";class cn extends Error{}class Tg extends cn{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class Sg extends cn{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class Bg extends cn{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class ir extends cn{}class ec extends cn{constructor(n){super(`Invalid unit ${n}`)}}class it extends cn{}class Ht extends cn{constructor(){super("Zone is an abstract class")}}const O="numeric",ht="short",Qe="long",oi={year:O,month:O,day:O},tc={year:O,month:ht,day:O},Dg={year:O,month:ht,day:O,weekday:ht},nc={year:O,month:Qe,day:O},rc={year:O,month:Qe,day:O,weekday:Qe},oc={hour:O,minute:O},ic={hour:O,minute:O,second:O},sc={hour:O,minute:O,second:O,timeZoneName:ht},lc={hour:O,minute:O,second:O,timeZoneName:Qe},ac={hour:O,minute:O,hourCycle:"h23"},cc={hour:O,minute:O,second:O,hourCycle:"h23"},dc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:ht},uc={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:Qe},mc={year:O,month:O,day:O,hour:O,minute:O},fc={year:O,month:O,day:O,hour:O,minute:O,second:O},hc={year:O,month:ht,day:O,hour:O,minute:O},pc={year:O,month:ht,day:O,hour:O,minute:O,second:O},Og={year:O,month:ht,day:O,weekday:ht,hour:O,minute:O},gc={year:O,month:Qe,day:O,hour:O,minute:O,timeZoneName:ht},yc={year:O,month:Qe,day:O,hour:O,minute:O,second:O,timeZoneName:ht},kc={year:O,month:Qe,day:O,weekday:Qe,hour:O,minute:O,timeZoneName:Qe},_c={year:O,month:Qe,day:O,weekday:Qe,hour:O,minute:O,second:O,timeZoneName:Qe};function Q(e){return typeof e>"u"}function dn(e){return typeof e=="number"}function Wr(e){return typeof e=="number"&&e%1===0}function Mg(e){return typeof e=="string"}function Fg(e){return Object.prototype.toString.call(e)==="[object Date]"}function wc(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Ig(e){return Array.isArray(e)?e:[e]}function xc(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 Ag(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function An(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function It(e,n,r){return Wr(e)&&e>=n&&e<=r}function Lg(e,n){return e-n*Math.floor(e/n)}function Ce(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Wt(e){if(!(Q(e)||e===null||e===""))return parseInt(e,10)}function un(e){if(!(Q(e)||e===null||e===""))return parseFloat(e)}function ii(e){if(!(Q(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function si(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function sr(e){return e%4===0&&(e%100!==0||e%400===0)}function lr(e){return sr(e)?366:365}function Gr(e,n){const r=Lg(n-1,12)+1,i=e+(n-r)/12;return r===2?sr(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function li(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 Yr(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 ai(e){return e>99?e:e>60?1900+e:2e3+e}function bc(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 Kr(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 Cc(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new it(`Invalid unit value ${e}`);return n}function Jr(e,n){const r={};for(const i in e)if(An(e,i)){const s=e[i];if(s==null)continue;r[n(i)]=Cc(s)}return r}function Zr(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}${Ce(r,2)}:${Ce(i,2)}`;case"narrow":return`${s}${r}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ce(r,2)}${Ce(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function Xr(e){return Ag(e,["hour","minute","second","millisecond"])}const Rg=/[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"],Vc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ug=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ec(e){switch(e){case"narrow":return[...Ug];case"short":return[...Vc];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 Nc=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Tc=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$g=["M","T","W","T","F","S","S"];function Sc(e){switch(e){case"narrow":return[...$g];case"short":return[...Tc];case"long":return[...Nc];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Bc=["AM","PM"],zg=["Before Christ","Anno Domini"],jg=["BC","AD"],qg=["B","A"];function Dc(e){switch(e){case"narrow":return[...qg];case"short":return[...jg];case"long":return[...zg];default:return null}}function Hg(e){return Bc[e.hour<12?0:1]}function Wg(e,n){return Sc(n)[e.weekday-1]}function Gg(e,n){return Ec(n)[e.month-1]}function Yg(e,n){return Dc(n)[e.year<0?0:1]}function Kg(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 Oc(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const Jg={D:oi,DD:tc,DDD:nc,DDDD:rc,t:oc,tt:ic,ttt:sc,tttt:lc,T:ac,TT:cc,TTT:dc,TTTT:uc,f:mc,ff:hc,fff:gc,ffff:kc,F:fc,FF:pc,FFF:yc,FFFF:_c};class We{static create(n,r={}){return new We(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 Jg[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 Ce(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,g)=>this.loc.extract(n,h,g),l=h=>n.isOffsetFixed&&n.offset===0&&h.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,h.format):"",a=()=>i?Hg(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(h,g)=>i?Gg(n,h):o(g?{month:h}:{month:h,day:"numeric"},"month"),d=(h,g)=>i?Wg(n,h):o(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),m=h=>{const g=We.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(n,g):h},u=h=>i?Yg(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 Oc(We.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=We.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 Oc(o,s(a))}}class pt{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class ar{get type(){throw new Ht}get name(){throw new Ht}get isUniversal(){throw new Ht}offsetName(n,r){throw new Ht}formatOffset(n,r){throw new Ht}offset(n){throw new Ht}equals(n){throw new Ht}get isValid(){throw new Ht}}let ci=null;class di extends ar{static get instance(){return ci===null&&(ci=new di),ci}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return bc(n,r,i)}formatOffset(n,r){return Zr(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let Qr={};function Zg(e){return Qr[e]||(Qr[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"})),Qr[e]}const Xg={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Qg(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 vg(e,n){const r=e.formatToParts(n),i=[];for(let s=0;s<r.length;s++){const{type:o,value:l}=r[s],a=Xg[o];o==="era"?i[a]=l:Q(a)||(i[a]=parseInt(l,10))}return i}let vr={};class At extends ar{static create(n){return vr[n]||(vr[n]=new At(n)),vr[n]}static resetCache(){vr={},Qr={}}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=At.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return bc(n,r,i,this.name)}formatOffset(n,r){return Zr(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=Zg(this.name);let[s,o,l,a,c,d,m]=i.formatToParts?vg(i,r):Qg(i,r);a==="BC"&&(s=-Math.abs(s)+1);const f=li({year:s,month:o,day:l,hour:c===24?0:c,minute:d,second:m,millisecond:0});let h=+r;const g=h%1e3;return h-=g>=0?g:1e3+g,(f-h)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let ui=null;class Pe extends ar{static get utcInstance(){return ui===null&&(ui=new Pe(0)),ui}static instance(n){return n===0?Pe.utcInstance:new Pe(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new Pe(Kr(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Zr(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return Zr(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 ey extends ar{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 Gt(e,n){if(Q(e)||e===null)return n;if(e instanceof ar)return e;if(Mg(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?Pe.utcInstance:Pe.parseSpecifier(r)||At.create(e)}else return dn(e)?Pe.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new ey(e)}let Mc=()=>Date.now(),Fc="system",Ic=null,Ac=null,Lc=null,Rc;class Se{static get now(){return Mc}static set now(n){Mc=n}static set defaultZone(n){Fc=n}static get defaultZone(){return Gt(Fc,di.instance)}static get defaultLocale(){return Ic}static set defaultLocale(n){Ic=n}static get defaultNumberingSystem(){return Ac}static set defaultNumberingSystem(n){Ac=n}static get defaultOutputCalendar(){return Lc}static set defaultOutputCalendar(n){Lc=n}static get throwOnInvalid(){return Rc}static set throwOnInvalid(n){Rc=n}static resetCaches(){ye.resetCache(),At.resetCache()}}let Pc={};function ty(e,n={}){const r=JSON.stringify([e,n]);let i=Pc[r];return i||(i=new Intl.ListFormat(e,n),Pc[r]=i),i}let mi={};function fi(e,n={}){const r=JSON.stringify([e,n]);let i=mi[r];return i||(i=new Intl.DateTimeFormat(e,n),mi[r]=i),i}let hi={};function ny(e,n={}){const r=JSON.stringify([e,n]);let i=hi[r];return i||(i=new Intl.NumberFormat(e,n),hi[r]=i),i}let pi={};function ry(e,n={}){const{base:r,...i}=n,s=JSON.stringify([e,i]);let o=pi[s];return o||(o=new Intl.RelativeTimeFormat(e,n),pi[s]=o),o}let cr=null;function oy(){return cr||(cr=new Intl.DateTimeFormat().resolvedOptions().locale,cr)}function iy(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=fi(e).resolvedOptions()}catch{r=fi(i).resolvedOptions()}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function sy(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function ly(e){const n=[];for(let r=1;r<=12;r++){const i=x.utc(2016,r,1);n.push(e(i))}return n}function ay(e){const n=[];for(let r=1;r<=7;r++){const i=x.utc(2016,11,13+r);n.push(e(i))}return n}function eo(e,n,r,i,s){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):s(n)}function cy(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 dy{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=ny(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):si(n,3);return Ce(r,this.padTo)}}}class uy{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&&At.create(a).valid?(s=a,this.dt=n):(s="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:x.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=fi(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class my{constructor(n,r,i){this.opts={style:"long",...i},!r&&wc()&&(this.rtf=ry(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):Kg(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class ye{static fromOpts(n){return ye.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,s=!1){const o=n||Se.defaultLocale,l=o||(s?"en-US":oy()),a=r||Se.defaultNumberingSystem,c=i||Se.defaultOutputCalendar;return new ye(l,a,c,o)}static resetCache(){cr=null,mi={},hi={},pi={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return ye.create(n,r,i)}constructor(n,r,i,s){const[o,l,a]=iy(n);this.locale=o,this.numberingSystem=r||l||null,this.outputCalendar=i||a||null,this.intl=sy(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=cy(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:ye.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 eo(this,n,i,Ec,()=>{const s=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=ly(l=>this.extract(l,s,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return eo(this,n,i,Sc,()=>{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]=ay(l=>this.extract(l,s,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return eo(this,void 0,n,()=>Bc,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[x.utc(2016,11,13,9),x.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return eo(this,n,r,Dc,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[x.utc(-40,1,1),x.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 dy(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new uy(n,this.intl,r)}relFormatter(n={}){return new my(this.intl,this.isEnglish(),n)}listFormatter(n={}){return ty(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 Ln(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function mn(...e){return n=>e.reduce(([r,i,s],o)=>{const[l,a,c]=o(n,s);return[{...r,...l},i||a,c]},[{},null,1]).slice(0,2)}function Rn(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 Uc(...e){return(n,r)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Wt(n[r+s]);return[i,null,r+s]}}const $c=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,gi=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,zc=RegExp(`${gi.source}${$c.source}?`),yi=RegExp(`(?:T${zc.source})?`),fy=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,hy=/(\d{4})-?W(\d\d)(?:-?(\d))?/,py=/(\d{4})-?(\d{3})/,gy=Uc("weekYear","weekNumber","weekDay"),yy=Uc("year","ordinal"),ky=/(\d{4})-(\d\d)-(\d\d)/,jc=RegExp(`${gi.source} ?(?:${$c.source}|(${Rg.source}))?`),_y=RegExp(`(?: ${jc.source})?`);function Pn(e,n,r){const i=e[n];return Q(i)?r:Wt(i)}function qc(e,n){return[{year:Pn(e,n),month:Pn(e,n+1,1),day:Pn(e,n+2,1)},null,n+3]}function fn(e,n){return[{hours:Pn(e,n,0),minutes:Pn(e,n+1,0),seconds:Pn(e,n+2,0),milliseconds:ii(e[n+3])},null,n+4]}function Un(e,n){const r=!e[n]&&!e[n+1],i=Kr(e[n+1],e[n+2]),s=r?null:Pe.instance(i);return[{},s,n+3]}function Hc(e,n){const r=e[n]?At.create(e[n]):null;return[{},r,n+1]}const wy=RegExp(`^T?${gi.source}$`),xy=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function by(e){const[n,r,i,s,o,l,a,c,d]=e,m=n[0]==="-",u=c&&c[0]==="-",f=(h,g=!1)=>h!==void 0&&(g||h&&m)?-h:h;return[{years:f(un(r)),months:f(un(i)),weeks:f(un(s)),days:f(un(o)),hours:f(un(l)),minutes:f(un(a)),seconds:f(un(c),c==="-0"),milliseconds:f(ii(d),u)}]}const Cy={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 ki(e,n,r,i,s,o,l){const a={year:n.length===2?ai(Wt(n)):Wt(n),month:Vc.indexOf(r)+1,day:Wt(i),hour:Wt(s),minute:Wt(o)};return l&&(a.second=Wt(l)),e&&(a.weekday=e.length>3?Nc.indexOf(e)+1:Tc.indexOf(e)+1),a}const Vy=/^(?:(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 Ey(e){const[,n,r,i,s,o,l,a,c,d,m,u]=e,f=ki(n,s,i,r,o,l,a);let h;return c?h=Cy[c]:d?h=0:h=Kr(m,u),[f,new Pe(h)]}function Ny(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ty=/^(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$/,Sy=/^(Monday|Tuesday|Wedsday|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$/,By=/^(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 Wc(e){const[,n,r,i,s,o,l,a]=e;return[ki(n,s,i,r,o,l,a),Pe.utcInstance]}function Dy(e){const[,n,r,i,s,o,l,a]=e;return[ki(n,a,r,i,s,o,l),Pe.utcInstance]}const Oy=Ln(fy,yi),My=Ln(hy,yi),Fy=Ln(py,yi),Iy=Ln(zc),Ay=mn(qc,fn,Un),Ly=mn(gy,fn,Un),Ry=mn(yy,fn,Un),Py=mn(fn,Un);function Uy(e){return Rn(e,[Oy,Ay],[My,Ly],[Fy,Ry],[Iy,Py])}function $y(e){return Rn(Ny(e),[Vy,Ey])}function zy(e){return Rn(e,[Ty,Wc],[Sy,Wc],[By,Dy])}function jy(e){return Rn(e,[xy,by])}const qy=mn(fn);function Hy(e){return Rn(e,[wy,qy])}const Wy=Ln(ky,_y),Gy=Ln(jc),Yy=mn(qc,fn,Un,Hc),Ky=mn(fn,Un,Hc);function Jy(e){return Rn(e,[Wy,Yy],[Gy,Ky])}const Zy="Invalid Duration",Gc={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}},Xy={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},...Gc},st=146097/400,$n=146097/4800,Qy={years:{quarters:4,months:12,weeks:st/7,days:st,hours:st*24,minutes:st*24*60,seconds:st*24*60*60,milliseconds:st*24*60*60*1e3},quarters:{months:3,weeks:st/28,days:st/4,hours:st*24/4,minutes:st*24*60/4,seconds:st*24*60*60/4,milliseconds:st*24*60*60*1e3/4},months:{weeks:$n/7,days:$n,hours:$n*24,minutes:$n*24*60,seconds:$n*24*60*60,milliseconds:$n*24*60*60*1e3},...Gc},hn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vy=hn.slice(0).reverse();function pn(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 v(i)}function ek(e){return e<0?Math.floor(e):Math.ceil(e)}function Yc(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?ek(l):Math.trunc(l);i[s]+=c,n[r]-=c*o}function tk(e,n){vy.reduce((r,i)=>Q(n[i])?r:(r&&Yc(e,n,r,n,i),i),null)}class v{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||ye.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?Qy:Xy,this.isLuxonDuration=!0}static fromMillis(n,r){return v.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new it(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new v({values:Jr(n,v.normalizeUnit),loc:ye.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(dn(n))return v.fromMillis(n);if(v.isDuration(n))return n;if(typeof n=="object")return v.fromObject(n);throw new it(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=jy(n);return i?v.fromObject(i,r):v.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=Hy(n);return i?v.fromObject(i,r):v.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new it("need to specify a reason the Duration is invalid");const i=n instanceof pt?n:new pt(n,r);if(Se.throwOnInvalid)throw new Bg(i);return new v({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 ec(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?We.create(this.loc,i).formatDurationFromString(this,n):Zy}toHuman(n={}){const r=hn.map(i=>{const s=this.values[i];return Q(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+=si(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=v.fromDurationLike(n),i={};for(const s of hn)(An(r.values,s)||An(this.values,s))&&(i[s]=r.get(s)+this.get(s));return pn(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=v.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]=Cc(n(this.values[i],i));return pn(this,{values:r},!0)}get(n){return this[v.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r={...this.values,...Jr(n,v.normalizeUnit)};return pn(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),pn(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return tk(this.matrix,n),pn(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(l=>v.normalizeUnit(l));const r={},i={},s=this.toObject();let o;for(const l of hn)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;dn(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)hn.indexOf(d)>hn.indexOf(l)&&Yc(this.matrix,s,d,r,l)}else dn(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 pn(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 pn(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 hn)if(!r(this.values[i],n.values[i]))return!1;return!0}}const dr="Invalid Interval";function nk(e,n){return!e||!e.isValid?_e.invalid("missing or invalid start"):!n||!n.isValid?_e.invalid("missing or invalid end"):n<e?_e.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 _e{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 it("need to specify a reason the Interval is invalid");const i=n instanceof pt?n:new pt(n,r);if(Se.throwOnInvalid)throw new Sg(i);return new _e({invalid:i})}static fromDateTimes(n,r){const i=fr(n),s=fr(r),o=nk(i,s);return o??new _e({start:i,end:s})}static after(n,r){const i=v.fromDurationLike(r),s=fr(n);return _e.fromDateTimes(s,s.plus(i))}static before(n,r){const i=v.fromDurationLike(r),s=fr(n);return _e.fromDateTimes(s.minus(i),s)}static fromISO(n,r){const[i,s]=(n||"").split("/",2);if(i&&s){let o,l;try{o=x.fromISO(i,r),l=o.isValid}catch{l=!1}let a,c;try{a=x.fromISO(s,r),c=a.isValid}catch{c=!1}if(l&&c)return _e.fromDateTimes(o,a);if(l){const d=v.fromISO(s,r);if(d.isValid)return _e.after(o,d)}else if(c){const d=v.fromISO(i,r);if(d.isValid)return _e.before(a,d)}}return _e.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?_e.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(fr).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(_e.fromDateTimes(s,a)),s=a,o+=1}return i}splitBy(n){const r=v.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(_e.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:_e.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 _e.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(_e.fromDateTimes(r,c.time)),r=null);return _e.merge(s)}difference(...n){return _e.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:dr}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:dr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:dr}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:dr}toFormat(n,{separator:r=" – "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:dr}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):v.invalid(this.invalidReason)}mapEndpoints(n){return _e.fromDateTimes(n(this.s),n(this.e))}}let to=class{static hasDST(n=Se.defaultZone){const r=x.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return At.isValidZone(n)}static normalizeZone(n){return Gt(n,Se.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||ye.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null,outputCalendar:o="gregory"}={}){return(s||ye.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ye.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ye.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return ye.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return ye.create(r,null,"gregory").eras(n)}static features(){return{relative:wc()}}};function Kc(e,n){const r=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(v.fromMillis(i).as("days"))}function rk(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=Kc(a,c);return(d-d%7)/7}],["days",Kc]],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 ok(e,n,r,i){let[s,o,l,a]=rk(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=v.fromObject(o,i);return d.length>0?v.fromMillis(c,i).shiftTo(...d).plus(m):m}const _i={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Jc={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]},ik=_i.hanidec.replace(/[\[|\]]/g,"").split("");function sk(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(_i.hanidec)!==-1)n+=ik.indexOf(e[r]);else for(const s in Jc){const[o,l]=Jc[s];i>=o&&i<=l&&(n+=i-o)}}return parseInt(n,10)}else return n}function gt({numberingSystem:e},n=""){return new RegExp(`${_i[e||"latn"]}${n}`)}const lk="missing Intl.DateTimeFormat.formatToParts support";function oe(e,n=r=>r){return{regex:e,deser:([r])=>n(sk(r))}}const Zc="( | )",Xc=new RegExp(Zc,"g");function ak(e){return e.replace(/\./g,"\\.?").replace(Xc,Zc)}function Qc(e){return e.replace(/\./g,"").replace(Xc," ").toLowerCase()}function yt(e,n){return e===null?null:{regex:RegExp(e.map(ak).join("|")),deser:([r])=>e.findIndex(i=>Qc(r)===Qc(i))+n}}function vc(e,n){return{regex:e,deser:([,r,i])=>Kr(r,i),groups:n}}function wi(e){return{regex:e,deser:([n])=>n}}function ck(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function dk(e,n){const r=gt(n),i=gt(n,"{2}"),s=gt(n,"{3}"),o=gt(n,"{4}"),l=gt(n,"{6}"),a=gt(n,"{1,2}"),c=gt(n,"{1,3}"),d=gt(n,"{1,6}"),m=gt(n,"{1,9}"),u=gt(n,"{2,4}"),f=gt(n,"{4,6}"),h=k=>({regex:RegExp(ck(k.val)),deser:([y])=>y,literal:!0}),p=(k=>{if(e.literal)return h(k);switch(k.val){case"G":return yt(n.eras("short",!1),0);case"GG":return yt(n.eras("long",!1),0);case"y":return oe(d);case"yy":return oe(u,ai);case"yyyy":return oe(o);case"yyyyy":return oe(f);case"yyyyyy":return oe(l);case"M":return oe(a);case"MM":return oe(i);case"MMM":return yt(n.months("short",!0,!1),1);case"MMMM":return yt(n.months("long",!0,!1),1);case"L":return oe(a);case"LL":return oe(i);case"LLL":return yt(n.months("short",!1,!1),1);case"LLLL":return yt(n.months("long",!1,!1),1);case"d":return oe(a);case"dd":return oe(i);case"o":return oe(c);case"ooo":return oe(s);case"HH":return oe(i);case"H":return oe(a);case"hh":return oe(i);case"h":return oe(a);case"mm":return oe(i);case"m":return oe(a);case"q":return oe(a);case"qq":return oe(i);case"s":return oe(a);case"ss":return oe(i);case"S":return oe(c);case"SSS":return oe(s);case"u":return wi(m);case"uu":return wi(a);case"uuu":return oe(r);case"a":return yt(n.meridiems(),0);case"kkkk":return oe(o);case"kk":return oe(u,ai);case"W":return oe(a);case"WW":return oe(i);case"E":case"c":return oe(r);case"EEE":return yt(n.weekdays("short",!1,!1),1);case"EEEE":return yt(n.weekdays("long",!1,!1),1);case"ccc":return yt(n.weekdays("short",!0,!1),1);case"cccc":return yt(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return vc(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return vc(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return wi(/[a-z_+-/]{1,256}?/i);default:return h(k)}})(e)||{invalidReason:lk};return p.token=e,p}const uk={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 mk(e,n,r){const{type:i,value:s}=e;if(i==="literal")return{literal:!0,val:s};const o=r[i];let l=uk[i];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function fk(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(An(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 pk(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 Q(e.z)||(r=At.create(e.z)),Q(e.Z)||(r||(r=new Pe(e.Z)),i=e.Z),Q(e.q)||(e.M=(e.q-1)*3+1),Q(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),Q(e.u)||(e.S=ii(e.u)),[Object.keys(e).reduce((o,l)=>{const a=n(l);return a&&(o[a]=e[l]),o},{}),r,i]}let xi=null;function gk(){return xi||(xi=x.fromMillis(1555555555555)),xi}function yk(e,n){if(e.literal)return e;const r=We.macroTokenToFormatOpts(e.val);if(!r)return e;const o=We.create(n,r).formatDateTimeParts(gk()).map(l=>mk(l,n,r));return o.includes(void 0)?e:o}function kk(e,n){return Array.prototype.concat(...e.map(r=>yk(r,n)))}function ed(e,n,r){const i=kk(We.parseFormat(r),e),s=i.map(l=>dk(l,e)),o=s.find(l=>l.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[l,a]=fk(s),c=RegExp(l,"i"),[d,m]=hk(n,c,a),[u,f,h]=m?pk(m):[null,null,void 0];if(An(m,"a")&&An(m,"H"))throw new ir("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 _k(e,n,r){const{result:i,zone:s,specificOffset:o,invalidReason:l}=ed(e,n,r);return[i,s,o,l]}const td=[0,31,59,90,120,151,181,212,243,273,304,334],nd=[0,31,60,91,121,152,182,213,244,274,305,335];function lt(e,n){return new pt("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function rd(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 od(e,n,r){return r+(sr(e)?nd:td)[n-1]}function id(e,n){const r=sr(e)?nd:td,i=r.findIndex(o=>o<n),s=n-r[i];return{month:i+1,day:s}}function bi(e){const{year:n,month:r,day:i}=e,s=od(n,r,i),o=rd(n,r,i);let l=Math.floor((s-o+10)/7),a;return l<1?(a=n-1,l=Yr(a)):l>Yr(n)?(a=n+1,l=1):a=n,{weekYear:a,weekNumber:l,weekday:o,...Xr(e)}}function sd(e){const{weekYear:n,weekNumber:r,weekday:i}=e,s=rd(n,1,4),o=lr(n);let l=r*7+i-s-3,a;l<1?(a=n-1,l+=lr(a)):l>o?(a=n+1,l-=lr(n)):a=n;const{month:c,day:d}=id(a,l);return{year:a,month:c,day:d,...Xr(e)}}function Ci(e){const{year:n,month:r,day:i}=e,s=od(n,r,i);return{year:n,ordinal:s,...Xr(e)}}function ld(e){const{year:n,ordinal:r}=e,{month:i,day:s}=id(n,r);return{year:n,month:i,day:s,...Xr(e)}}function wk(e){const n=Wr(e.weekYear),r=It(e.weekNumber,1,Yr(e.weekYear)),i=It(e.weekday,1,7);return n?r?i?!1:lt("weekday",e.weekday):lt("week",e.week):lt("weekYear",e.weekYear)}function xk(e){const n=Wr(e.year),r=It(e.ordinal,1,lr(e.year));return n?r?!1:lt("ordinal",e.ordinal):lt("year",e.year)}function ad(e){const n=Wr(e.year),r=It(e.month,1,12),i=It(e.day,1,Gr(e.year,e.month));return n?r?i?!1:lt("day",e.day):lt("month",e.month):lt("year",e.year)}function cd(e){const{hour:n,minute:r,second:i,millisecond:s}=e,o=It(n,0,23)||n===24&&r===0&&i===0&&s===0,l=It(r,0,59),a=It(i,0,59),c=It(s,0,999);return o?l?a?c?!1:lt("millisecond",s):lt("second",i):lt("minute",r):lt("hour",n)}const Vi="Invalid DateTime",bk=864e13;function no(e){return new pt("unsupported zone",`the zone "${e.name}" is not supported`)}function Ei(e){return e.weekData===null&&(e.weekData=bi(e.c)),e.weekData}function ur(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new x({...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 ud(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 ro(e,n,r){return dd(li(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,Gr(i,s))+Math.trunc(n.days)+Math.trunc(n.weeks)*7},l=v.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=li(o);let[c,d]=dd(a,r,e.zone);return l!==0&&(c+=l,d=e.zone.offset(c)),{ts:c,o:d}}function mr(e,n,r,i,s,o){const{setZone:l,zone:a}=r;if(e&&Object.keys(e).length!==0){const c=n||a,d=x.fromObject(e,{...r,zone:c,specificOffset:o});return l?d:d.setZone(a)}else return x.invalid(new pt("unparsable",`the input "${s}" can't be parsed as ${i}`))}function oo(e,n,r=!0){return e.isValid?We.create(ye.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function Ni(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Ce(e.c.year,r?6:4),n?(i+="-",i+=Ce(e.c.month),i+="-",i+=Ce(e.c.day)):(i+=Ce(e.c.month),i+=Ce(e.c.day)),i}function fd(e,n,r,i,s){let o=Ce(e.c.hour);return n?(o+=":",o+=Ce(e.c.minute),(e.c.second!==0||!r)&&(o+=":")):o+=Ce(e.c.minute),(e.c.second!==0||!r)&&(o+=Ce(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=Ce(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0?o+="Z":e.o<0?(o+="-",o+=Ce(Math.trunc(-e.o/60)),o+=":",o+=Ce(Math.trunc(-e.o%60))):(o+="+",o+=Ce(Math.trunc(e.o/60)),o+=":",o+=Ce(Math.trunc(e.o%60)))),o}const hd={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ck={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Vk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},pd=["year","month","day","hour","minute","second","millisecond"],Ek=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Nk=["year","ordinal","hour","minute","second","millisecond"];function gd(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 ec(e);return n}function yd(e,n){const r=Gt(n.zone,Se.defaultZone),i=ye.fromObject(n),s=Se.now();let o,l;if(Q(e.year))o=s;else{for(const d of pd)Q(e[d])&&(e[d]=hd[d]);const a=ad(e)||cd(e);if(a)return x.invalid(a);const c=r.offset(s);[o,l]=ro(e,c,r)}return new x({ts:o,zone:r,loc:i,o:l})}function kd(e,n,r){const i=Q(r.round)?!0:r.round,s=(l,a)=>(l=si(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 _d(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 x{constructor(n){const r=n.zone||Se.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new pt("invalid input"):null)||(r.isValid?null:no(r));this.ts=Q(n.ts)?Se.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=ud(this.ts,a),i=Number.isNaN(s.year)?new pt("invalid input"):null,s=i?null:s,o=i?null:a}this._zone=r,this.loc=n.loc||ye.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}static now(){return new x({})}static local(){const[n,r]=_d(arguments),[i,s,o,l,a,c,d]=r;return yd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static utc(){const[n,r]=_d(arguments),[i,s,o,l,a,c,d]=r;return n.zone=Pe.utcInstance,yd({year:i,month:s,day:o,hour:l,minute:a,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=Fg(n)?n.valueOf():NaN;if(Number.isNaN(i))return x.invalid("invalid input");const s=Gt(r.zone,Se.defaultZone);return s.isValid?new x({ts:i,zone:s,loc:ye.fromObject(r)}):x.invalid(no(s))}static fromMillis(n,r={}){if(dn(n))return n<-864e13||n>bk?x.invalid("Timestamp out of range"):new x({ts:n,zone:Gt(r.zone,Se.defaultZone),loc:ye.fromObject(r)});throw new it(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(dn(n))return new x({ts:n*1e3,zone:Gt(r.zone,Se.defaultZone),loc:ye.fromObject(r)});throw new it("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=Gt(r.zone,Se.defaultZone);if(!i.isValid)return x.invalid(no(i));const s=Se.now(),o=Q(r.specificOffset)?i.offset(s):r.specificOffset,l=Jr(n,gd),a=!Q(l.ordinal),c=!Q(l.year),d=!Q(l.month)||!Q(l.day),m=c||d,u=l.weekYear||l.weekNumber,f=ye.fromObject(r);if((m||a)&&u)throw new ir("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&a)throw new ir("Can't mix ordinal dates with month/day");const h=u||l.weekday&&!m;let g,p,k=ud(s,o);h?(g=Ek,p=Ck,k=bi(k)):a?(g=Nk,p=Vk,k=Ci(k)):(g=pd,p=hd);let y=!1;for(const U of g){const R=l[U];Q(R)?y?l[U]=p[U]:l[U]=k[U]:y=!0}const w=h?wk(l):a?xk(l):ad(l),T=w||cd(l);if(T)return x.invalid(T);const M=h?sd(l):a?ld(l):l,[$,W]=ro(M,o,i),C=new x({ts:$,zone:i,o:W,loc:f});return l.weekday&&m&&n.weekday!==C.weekday?x.invalid("mismatched weekday",`you can't specify both a weekday of ${l.weekday} and a date of ${C.toISO()}`):C}static fromISO(n,r={}){const[i,s]=Uy(n);return mr(i,s,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,s]=$y(n);return mr(i,s,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,s]=zy(n);return mr(i,s,r,"HTTP",r)}static fromFormat(n,r,i={}){if(Q(n)||Q(r))throw new it("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:o=null}=i,l=ye.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0}),[a,c,d,m]=_k(l,n,r);return m?x.invalid(m):mr(a,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return x.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,s]=Jy(n);return mr(i,s,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new it("need to specify a reason the DateTime is invalid");const i=n instanceof pt?n:new pt(n,r);if(Se.throwOnInvalid)throw new Tg(i);return new x({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?Ei(this).weekYear:NaN}get weekNumber(){return this.isValid?Ei(this).weekNumber:NaN}get weekday(){return this.isValid?Ei(this).weekday:NaN}get ordinal(){return this.isValid?Ci(this.c).ordinal:NaN}get monthShort(){return this.isValid?to.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?to.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?to.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?to.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}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return sr(this.year)}get daysInMonth(){return Gr(this.year,this.month)}get daysInYear(){return this.isValid?lr(this.year):NaN}get weeksInWeekYear(){return this.isValid?Yr(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:s}=We.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:s}}toUTC(n=0,r={}){return this.setZone(Pe.instance(n),r)}toLocal(){return this.setZone(Se.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=Gt(n,Se.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]=ro(l,o,n)}return ur(this,{ts:s,zone:n})}else return x.invalid(no(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const s=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return ur(this,{loc:s})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=Jr(n,gd),i=!Q(r.weekYear)||!Q(r.weekNumber)||!Q(r.weekday),s=!Q(r.ordinal),o=!Q(r.year),l=!Q(r.month)||!Q(r.day),a=o||l,c=r.weekYear||r.weekNumber;if((a||s)&&c)throw new ir("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new ir("Can't mix ordinal dates with month/day");let d;i?d=sd({...bi(this.c),...r}):Q(r.ordinal)?(d={...this.toObject(),...r},Q(r.day)&&(d.day=Math.min(Gr(d.year,d.month),d.day))):d=ld({...Ci(this.c),...r});const[m,u]=ro(d,this.o,this.zone);return ur(this,{ts:m,o:u})}plus(n){if(!this.isValid)return this;const r=v.fromDurationLike(n);return ur(this,md(this,r))}minus(n){if(!this.isValid)return this;const r=v.fromDurationLike(n).negate();return ur(this,md(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=v.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?We.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Vi}toLocaleString(n=oi,r={}){return this.isValid?We.create(this.loc.clone(r),n).formatDateTime(this):Vi}toLocaleParts(n={}){return this.isValid?We.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:s=!0}={}){if(!this.isValid)return null;const o=n==="extended";let l=Ni(this,o);return l+="T",l+=fd(this,o,r,i,s),l}toISODate({format:n="extended"}={}){return this.isValid?Ni(this,n==="extended"):null}toISOWeekDate(){return oo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:s=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+fd(this,o==="extended",r,n,i):null}toRFC2822(){return oo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return oo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ni(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")),oo(this,s,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Vi}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 v.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=Ig(r).map(v.normalizeUnit),l=n.valueOf()>this.valueOf(),a=l?this:n,c=l?n:this,d=ok(a,c,o,s);return l?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(x.now(),n,r)}until(n){return this.isValid?_e.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||x.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),kd(r,this.plus(i),{...n,numeric:"always",units:s,unit:o})}toRelativeCalendar(n={}){return this.isValid?kd(n.base||x.fromObject({},{zone:this.zone}),this,{...n,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...n){if(!n.every(x.isDateTime))throw new it("min requires all arguments be DateTimes");return xc(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(x.isDateTime))throw new it("max requires all arguments be DateTimes");return xc(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:s=null,numberingSystem:o=null}=i,l=ye.fromOpts({locale:s,numberingSystem:o,defaultToEN:!0});return ed(l,n,r)}static fromStringExplain(n,r,i={}){return x.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return oi}static get DATE_MED(){return tc}static get DATE_MED_WITH_WEEKDAY(){return Dg}static get DATE_FULL(){return nc}static get DATE_HUGE(){return rc}static get TIME_SIMPLE(){return oc}static get TIME_WITH_SECONDS(){return ic}static get TIME_WITH_SHORT_OFFSET(){return sc}static get TIME_WITH_LONG_OFFSET(){return lc}static get TIME_24_SIMPLE(){return ac}static get TIME_24_WITH_SECONDS(){return cc}static get TIME_24_WITH_SHORT_OFFSET(){return dc}static get TIME_24_WITH_LONG_OFFSET(){return uc}static get DATETIME_SHORT(){return mc}static get DATETIME_SHORT_WITH_SECONDS(){return fc}static get DATETIME_MED(){return hc}static get DATETIME_MED_WITH_SECONDS(){return pc}static get DATETIME_MED_WITH_WEEKDAY(){return Og}static get DATETIME_FULL(){return gc}static get DATETIME_FULL_WITH_SECONDS(){return yc}static get DATETIME_HUGE(){return kc}static get DATETIME_HUGE_WITH_SECONDS(){return _c}}function fr(e){if(x.isDateTime(e))return e;if(e&&e.valueOf&&dn(e.valueOf()))return x.fromJSDate(e);if(e&&typeof e=="object")return x.fromObject(e);throw new it(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const le={};le.format=function(e,n){return e=e?new Date(e):new Date,x.fromJSDate(e).toFormat(n)},le.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),x.fromObject({hour:parseInt(n,10),minute:parseInt(r,10)}).toFormat("h:mma").toLowerCase().replace(/:00/g,"")},le.timeago=function(e,n){return x.fromJSDate(new Date(e)).toRelative(n)},le.getDatesBetween=function(e,n){const r=[];let i=x.fromISO(e);const s=x.fromISO(n);for(;i<=s;)r.push(i.toISODate()),i=i.plus({days:1});return r},le.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)}},le.getMiddleDate=function(e,n){const r=e.getTime(),i=n.getTime(),s=(r+i)/2;return new Date(s)},le.shortTime=function(e){return e.toJSDate||(e=x.fromJSDate(new Date(e))),e.toFormat("mm")==="00"?e.toFormat("ha").toLowerCase():e.toFormat("h:mma").toLowerCase()},le.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?x.fromJSDate(e).setZone(r):x.fromJSDate(e),o=n?r?x.fromJSDate(n).setZone(r):x.fromJSDate(n):s}catch{s=x.fromJSDate(e),o=n?x.fromJSDate(n):s}const l=x.now(),a=r&&s.zoneName!==x.local().zoneName?` (${s.zoneName})`:"",d=s.year!==l.year?` ${s.year}`:"";return s.hasSame(o,"day")?le.shortTime(s)==="12am"?`${s.toFormat("d MMMM")}${d}${a}`:`${le.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}`},le.readableDateRange=function(e,n,r){if(!e)return;if(!n)return le.readableDate(e);e=x.fromJSDate(new Date(e)),n=x.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?le.shortTime(e)==="12am"?`${le.readableDate(n)}`:`${le.shortTime(e)} - ${le.readableDate(n)}`:o===d?`${le.readableDate(e)} - ${le.readableDate(n)}`:s===c?`${e.toFormat("d")} - ${n.toFormat("d LLL")}`:i===a?`${le.readableDate(e)} - ${le.readableDate(n)}`:`${le.readableDate(e)} - ${le.readableDate(n)}`},le.readableDate=function(e){if(!e)return;const n=new Date,r=x.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=x.fromJSDate(e),c=a.toFormat("yyyy"),d=a.toFormat("LLL yyyy"),m=a.toFormat("WW yyyy");if(a.toFormat("d LLL yyyy")===l)return`${le.shortTime(a)} today`;if(m===o)if(e>n){const f=parseInt(r.toFormat("d"));return parseInt(a.toFormat("d"))-f===1?`${le.shortTime(a)} tomorrow`:`${le.shortTime(a)} ${a.toFormat("cccc")}`}else return`${a.toRelativeCalendar()}`;return d===s?le.shortTime(a)==="12am"?`${a.toFormat("d LLL")}`:`${le.shortTime(a)} ${a.toFormat("d LLL")}`:c===i?a.toFormat("cccc d LLL"):a.toFormat("d LLL yyyy")};function wd(e){var h,g;const n=t.reactive({items:[],hash:{},hex:{},loading:!1,loaded:!1,_fullyLoaded:{}});let r=null;const i={};function s(p,k){if(!(!p||!k))for(const y of Object.keys(k))p[y]=k[y]}function o(p){const k={},y={};return p.forEach(function(w){w.key&&(k[w.key]=w),w.hex&&(y[w.hex]=w)}),{hash:k,hex:y}}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:y}=await e.api.get("/glossary/index",{cache:!1}),w=y||[],{hash:T,hex:M}=o(w);n._fullyLoaded={},n.items=w,n.hash=T,n.hex=M,n.loaded=!0}catch(y){console.error("GlossaryService: failed to load glossary index",y)}finally{n.loading=!1,r=null}}async function c(p,k){return n._fullyLoaded[p]&&!k?n.hash[p]:(i[p]||(i[p]=d(p)),i[p])}async function d(p,k){try{const{data:y}=await e.api.get(`/glossary/index/${p}`,{cache:!1});if(!y)return;n.hash[p]?s(n.hash[p],y):n.hash[p]=y;const w=n.items.findIndex(function(T){return T.key===p});return w!==-1&&s(n.items[w],y),n._fullyLoaded[p]=!0,n.hash[p]}catch(y){console.error(`GlossaryService: failed to load definition for '${p}'`,y)}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(k){return c(k,!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(k){return c(k,!0)}))},n.definitionName=function(p,k){const y=n.hash[p];return y?k?y.plural:y.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,y;if(p){const w=(y=(k=p==null?void 0:p.session)==null?void 0:k.organisation)==null?void 0:y._id;u&&w!==u&&m(),u=w||null,l(!1)}else u=null,m()});const f=e.auth.getCurrentUser();return f&&(u=((g=(h=f==null?void 0:f.session)==null?void 0:h.organisation)==null?void 0:g._id)||null,l(!1)),n}const io={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"},Tk=(e,n)=>{try{if(!window.Stripe)throw new Error(io.STRIPE_NOT_LOADED);return window.Stripe(e,n)}catch(r){return console.error(r),r}},Sk=(e,n)=>{try{if(!e)throw new Error(io.INSTANCE_NOT_DEFINED);return e.elements(n)}catch(r){return console.error(r),r}},Bk=(e,n,r)=>{try{if(!e)throw new Error(io.ELEMENTS_NOT_DEFINED);if(!n)throw new Error(io.ELEMENT_TYPE_NOT_DEFINED);return e.create(n,r)}catch(i){return console.error(i),i}};var xd=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r};const Dk=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=Bk(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}}}),Ok={ref:"mountPoint"};function Mk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ok,null,512)}var Ti=xd(Dk,[["render",Mk]]);const Fk=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=Tk(n.value,r.value),o.value=Sk(s.value,i.value)}),t.watch(i,()=>{var a;(a=o.value)==null||a.update(i.value)}),{elements:o,instance:s,elementsUsable:l}}}),Ik={key:0};function Ak(e,n,r,i,s,o){return e.elementsUsable?(t.openBlock(),t.createElementBlock("div",Ik,[t.renderSlot(e.$slots,"default",{instance:e.instance,elements:e.elements})])):t.createCommentVNode("",!0)}var Si=xd(Fk,[["render",Ak]]);const b=(e,n)=>{const r=e.__vccOpts||e;for(const[i,s]of n)r[i]=s;return r},Lk={props:{center:{type:Boolean},shrink:{type:Boolean}}};function Rk(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 bd=b(Lk,[["render",Rk],["__scopeId","data-v-b03628f8"]]),Pk={},Uk={class:"flex-column-body"};function $k(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Uk,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Cd=b(Pk,[["render",$k],["__scopeId","data-v-ab49c425"]]),zk={},jk={class:"flex-column-header"};function qk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",jk,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Vd=b(zk,[["render",qk],["__scopeId","data-v-968bcded"]]),Hk={},Wk={class:"flex-column-footer"};function Gk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Wk,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Ed=b(Hk,[["render",Gk],["__scopeId","data-v-941966e2"]]),Yk={props:{flex:{type:Boolean},center:{type:Boolean},vcenter:{type:Boolean},alignBottom:{type:Boolean},shrink:{type:Boolean}}};function Kk(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 Nd=b(Yk,[["render",Kk],["__scopeId","data-v-efd82fd0"]]),Jk={props:{center:{type:Boolean},vcenter:{type:Boolean},gap:{type:Boolean},wrap:{type:Boolean}}};function Zk(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 Td=b(Jk,[["render",Zk],["__scopeId","data-v-bd96c129"]]),Xk={},Qk={class:"flex-spacer"};function vk(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Qk)}const Sd=b(Xk,[["render",vk],["__scopeId","data-v-f42ac625"]]),e_={},t_={class:"panel"};function n_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",t_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Bd=b(e_,[["render",n_],["__scopeId","data-v-dc6d0d19"]]),r_={},o_={class:"panel-body"};function i_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",o_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Dd=b(r_,[["render",i_],["__scopeId","data-v-53a6d4be"]]),s_={},l_={class:"panel-header"};function a_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",l_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Od=b(s_,[["render",a_],["__scopeId","data-v-315be8cb"]]),c_={},d_={class:"panel-footer"};function u_(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",d_,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const Md=b(c_,[["render",u_],["__scopeId","data-v-e87fc082"]]);var so=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bi,Fd;function hr(){if(Fd)return Bi;Fd=1;function e(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return Bi=e,Bi}var Di,Id;function Ad(){if(Id)return Di;Id=1;var e=typeof so=="object"&&so&&so.Object===Object&&so;return Di=e,Di}var Oi,Ld;function zn(){if(Ld)return Oi;Ld=1;var e=Ad(),n=typeof self=="object"&&self&&self.Object===Object&&self,r=e||n||Function("return this")();return Oi=r,Oi}var Mi,Rd;function m_(){if(Rd)return Mi;Rd=1;var e=zn(),n=function(){return e.Date.now()};return Mi=n,Mi}var Fi,Pd;function f_(){if(Pd)return Fi;Pd=1;var e=/\s/;function n(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return Fi=n,Fi}var Ii,Ud;function h_(){if(Ud)return Ii;Ud=1;var e=f_(),n=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Ii=r,Ii}var Ai,$d;function Li(){if($d)return Ai;$d=1;var e=zn(),n=e.Symbol;return Ai=n,Ai}var Ri,zd;function p_(){if(zd)return Ri;zd=1;var e=Li(),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 Ri=o,Ri}var Pi,jd;function g_(){if(jd)return Pi;jd=1;var e=Object.prototype,n=e.toString;function r(i){return n.call(i)}return Pi=r,Pi}var Ui,qd;function pr(){if(qd)return Ui;qd=1;var e=Li(),n=p_(),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 Ui=l,Ui}var $i,Hd;function gr(){if(Hd)return $i;Hd=1;function e(n){return n!=null&&typeof n=="object"}return $i=e,$i}var zi,Wd;function lo(){if(Wd)return zi;Wd=1;var e=pr(),n=gr(),r="[object Symbol]";function i(s){return typeof s=="symbol"||n(s)&&e(s)==r}return zi=i,zi}var ji,Gd;function Yd(){if(Gd)return ji;Gd=1;var e=h_(),n=hr(),r=lo(),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 ji=c,ji}var qi,Kd;function y_(){if(Kd)return qi;Kd=1;var e=hr(),n=m_(),r=Yd(),i="Expected a function",s=Math.max,o=Math.min;function l(a,c,d){var m,u,f,h,g,p,k=0,y=!1,w=!1,T=!0;if(typeof a!="function")throw new TypeError(i);c=r(c)||0,e(d)&&(y=!!d.leading,w="maxWait"in d,f=w?s(r(d.maxWait)||0,c):f,T="trailing"in d?!!d.trailing:T);function M(H){var te=m,he=u;return m=u=void 0,k=H,h=a.apply(he,te),h}function $(H){return k=H,g=setTimeout(U,c),y?M(H):h}function W(H){var te=H-p,he=H-k,ge=c-te;return w?o(ge,f-he):ge}function C(H){var te=H-p,he=H-k;return p===void 0||te>=c||te<0||w&&he>=f}function U(){var H=n();if(C(H))return R(H);g=setTimeout(U,W(H))}function R(H){return g=void 0,T&&m?M(H):(m=u=void 0,h)}function P(){g!==void 0&&clearTimeout(g),k=0,m=p=u=g=void 0}function F(){return g===void 0?h:R(n())}function re(){var H=n(),te=C(H);if(m=arguments,u=this,p=H,te){if(g===void 0)return $(p);if(w)return clearTimeout(g),g=setTimeout(U,c),M(p)}return g===void 0&&(g=setTimeout(U,c)),h}return re.cancel=P,re.flush=F,re}return qi=l,qi}var k_=y_();const jn=Yt(k_),__=["onClick"],w_=["onClick"],Jd=b({__name:"tabset",props:{vertical:Boolean,inline:Boolean,pills:Boolean,defaultTab:String},setup(e){const n=e,r=t.useSlots(),i=t.reactive({tabs:[]});t.provide("tabset",i);const s=t.ref();t.provide("activeHeading",s);const o=function(f){s.value=f},l=jn(function(){const h=r.default().reduce(function(k,y){var w;return((w=y.type)==null?void 0:w.name)==="tab"?k.push(y):y.children&&(k=[...k,...y.children]),k},[]).filter(function(k){var y;return((y=k.type)==null?void 0:y.name)==="tab"&&k.props.enabled!==!1}).map(function(k,y){const w=k.props.heading,T=k.props.tabKey||w;return{heading:w,key:T,index:y}});i.tabs=h;const g=h.reduce(function(k,y){return k[y.key||y.heading]=!0,k},{}),p=s.value;if((!p||!g[p])&&h.length){let k;n.defaultTab&&g[n.defaultTab]?k=n.defaultTab:k=h[0].key||h[0].heading,s.value=k}});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 g=t.resolveComponent("flex-body"),p=t.resolveComponent("flex-column"),k=t.resolveComponent("ux-button"),y=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},[t.unref(d)?(t.openBlock(),t.createBlock(p,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(g,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(T,M)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===T}),key:`tab-link-${T}`,onClick:$=>o(T)},t.toDisplayString(t.unref(a)[M]),11,__))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):e.pills?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(d)?(t.openBlock(),t.createBlock(w,{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(t.unref(c),(T,M)=>(t.openBlock(),t.createBlock(k,{color:s.value===T?"primary":"",key:`tab-pill-${T}`,onClick:$=>o(T)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)[M]),1)]),_:2},1032,["color","onClick"]))),128))]),_:1})]),_:1})):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.unref(d)?(t.openBlock(),t.createBlock(w,{key:0,class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(y,{ref_key:"menuRow",ref:m},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(T,M)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:s.value===T}),key:`tab-link-${T}`,onClick:$=>o(T)},t.toDisplayString(t.unref(a)[M]),11,w_))),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 b_(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 Zd=b(x_,[["render",b_]]);var Hi,Xd;function yr(){if(Xd)return Hi;Xd=1;var e=Array.isArray;return Hi=e,Hi}var Wi,Qd;function C_(){if(Qd)return Wi;Qd=1;var e=yr(),n=lo(),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 Wi=s,Wi}var Gi,vd;function eu(){if(vd)return Gi;vd=1;var e=pr(),n=hr(),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 Gi=l,Gi}var Yi,tu;function V_(){if(tu)return Yi;tu=1;var e=zn(),n=e["__core-js_shared__"];return Yi=n,Yi}var Ki,nu;function E_(){if(nu)return Ki;nu=1;var e=V_(),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 Ki=r,Ki}var Ji,ru;function N_(){if(ru)return Ji;ru=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 Ji=r,Ji}var Zi,ou;function T_(){if(ou)return Zi;ou=1;var e=eu(),n=E_(),r=hr(),i=N_(),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 Zi=u,Zi}var Xi,iu;function S_(){if(iu)return Xi;iu=1;function e(n,r){return n==null?void 0:n[r]}return Xi=e,Xi}var Qi,su;function vi(){if(su)return Qi;su=1;var e=T_(),n=S_();function r(i,s){var o=n(i,s);return e(o)?o:void 0}return Qi=r,Qi}var es,lu;function ao(){if(lu)return es;lu=1;var e=vi(),n=e(Object,"create");return es=n,es}var ts,au;function B_(){if(au)return ts;au=1;var e=ao();function n(){this.__data__=e?e(null):{},this.size=0}return ts=n,ts}var ns,cu;function D_(){if(cu)return ns;cu=1;function e(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}return ns=e,ns}var rs,du;function O_(){if(du)return rs;du=1;var e=ao(),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 rs=s,rs}var os,uu;function M_(){if(uu)return os;uu=1;var e=ao(),n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;return e?o[s]!==void 0:r.call(o,s)}return os=i,os}var is,mu;function F_(){if(mu)return is;mu=1;var e=ao(),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 is=r,is}var ss,fu;function I_(){if(fu)return ss;fu=1;var e=B_(),n=D_(),r=O_(),i=M_(),s=F_();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 ls,hu;function A_(){if(hu)return ls;hu=1;function e(){this.__data__=[],this.size=0}return ls=e,ls}var as,pu;function gu(){if(pu)return as;pu=1;function e(n,r){return n===r||n!==n&&r!==r}return as=e,as}var cs,yu;function co(){if(yu)return cs;yu=1;var e=gu();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 ds,ku;function L_(){if(ku)return ds;ku=1;var e=co(),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 ds=i,ds}var us,_u;function R_(){if(_u)return us;_u=1;var e=co();function n(r){var i=this.__data__,s=e(i,r);return s<0?void 0:i[s][1]}return us=n,us}var ms,wu;function P_(){if(wu)return ms;wu=1;var e=co();function n(r){return e(this.__data__,r)>-1}return ms=n,ms}var fs,xu;function U_(){if(xu)return fs;xu=1;var e=co();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 fs=n,fs}var hs,bu;function $_(){if(bu)return hs;bu=1;var e=A_(),n=L_(),r=R_(),i=P_(),s=U_();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,hs=o,hs}var ps,Cu;function z_(){if(Cu)return ps;Cu=1;var e=vi(),n=zn(),r=e(n,"Map");return ps=r,ps}var gs,Vu;function j_(){if(Vu)return gs;Vu=1;var e=I_(),n=$_(),r=z_();function i(){this.size=0,this.__data__={hash:new e,map:new(r||n),string:new e}}return gs=i,gs}var ys,Eu;function q_(){if(Eu)return ys;Eu=1;function e(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}return ys=e,ys}var ks,Nu;function uo(){if(Nu)return ks;Nu=1;var e=q_();function n(r,i){var s=r.__data__;return e(i)?s[typeof i=="string"?"string":"hash"]:s.map}return ks=n,ks}var _s,Tu;function H_(){if(Tu)return _s;Tu=1;var e=uo();function n(r){var i=e(this,r).delete(r);return this.size-=i?1:0,i}return _s=n,_s}var ws,Su;function W_(){if(Su)return ws;Su=1;var e=uo();function n(r){return e(this,r).get(r)}return ws=n,ws}var xs,Bu;function G_(){if(Bu)return xs;Bu=1;var e=uo();function n(r){return e(this,r).has(r)}return xs=n,xs}var bs,Du;function Y_(){if(Du)return bs;Du=1;var e=uo();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 bs=n,bs}var Cs,Ou;function Mu(){if(Ou)return Cs;Ou=1;var e=j_(),n=H_(),r=W_(),i=G_(),s=Y_();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,Cs=o,Cs}var Vs,Fu;function K_(){if(Fu)return Vs;Fu=1;var e=Mu(),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,Vs=r,Vs}var Es,Iu;function J_(){if(Iu)return Es;Iu=1;var e=K_(),n=500;function r(i){var s=e(i,function(l){return o.size===n&&o.clear(),l}),o=s.cache;return s}return Es=r,Es}var Ns,Au;function Z_(){if(Au)return Ns;Au=1;var e=J_(),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 Ns=i,Ns}var Ts,Lu;function Ru(){if(Lu)return Ts;Lu=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 Ts=e,Ts}var Ss,Pu;function X_(){if(Pu)return Ss;Pu=1;var e=Li(),n=Ru(),r=yr(),i=lo(),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 Ss=l,Ss}var Bs,Uu;function Ds(){if(Uu)return Bs;Uu=1;var e=X_();function n(r){return r==null?"":e(r)}return Bs=n,Bs}var Os,$u;function Q_(){if($u)return Os;$u=1;var e=yr(),n=C_(),r=Z_(),i=Ds();function s(o,l){return e(o)?o:n(o,l)?[o]:r(i(o))}return Os=s,Os}var Ms,zu;function v_(){if(zu)return Ms;zu=1;var e=lo();function n(r){if(typeof r=="string"||e(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return Ms=n,Ms}var Fs,ju;function ew(){if(ju)return Fs;ju=1;var e=Q_(),n=v_();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 Fs=r,Fs}var Is,qu;function tw(){if(qu)return Is;qu=1;var e=ew();function n(r,i,s){var o=r==null?void 0:e(r,i);return o===void 0?s:o}return Is=n,Is}var nw=tw();const Kt=Yt(nw),ke={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},rw={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)||[]}}},ow={class:"table-quicktag-cell"};function iw(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",ow,[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 sw=b(rw,[["render",iw],["__scopeId","data-v-d98dce09"]]),lw={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)}}},aw={class:"table-avatar-cell"},cw={class:"avatar-wrapper"};function dw(e,n,r,i,s,o){const l=t.resolveComponent("avatar",!0);return t.openBlock(),t.createElementBlock("td",aw,[t.createElementVNode("div",cw,[t.createVNode(l,{id:o.source,initials:o.initials},null,8,["id","initials"])])])}const uw=b(lw,[["render",dw],["__scopeId","data-v-a4b42e00"]]),mw={mixins:[ke],computed:{formatted(){return this.$sdk.date.readableTime(this.value)}}},fw={class:"table-time-cell"};function hw(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",fw,[t.createVNode(l,{icon:"far fa-clock"}),t.createTextVNode(" "+t.toDisplayString(o.formatted),1)])}const pw=b(mw,[["render",hw],["__scopeId","data-v-677f555b"]]),gw={mixins:[ke],computed:{key(){return this.column.key},rawSource(){return Kt(this.row,this.key)},source(){return Array.isArray(this.rawSource)?this.rawSource[0]:this.rawSource?this.rawSource: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 _w=b(gw,[["render",kw],["__scopeId","data-v-0d557d14"]]),ww={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 bw=b(ww,[["render",xw],["__scopeId","data-v-c62e82ec"]]),Cw={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,await this.button.action(this.row,this.column,this),this.processing=!1}}},Vw={class:"table-button-cell"};function Ew(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon"),a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",Vw,[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 Nw=b(Cw,[["render",Ew],["__scopeId","data-v-413157fd"]]),Tw={mixins:[ke],methods:{timeago(e){return x.fromJSDate(e).toRelative()},readable(e){e=x.fromJSDate(e);let n=x.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)}}},Sw={class:"table-date-cell"},Bw={class:"date-pill"},Dw={class:"off"},Ow={class:"on"},Mw={class:"spacer"};function Fw(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",Sw,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.mapped,l=>(t.openBlock(),t.createElementBlock("div",Bw,[t.createElementVNode("span",Dw,t.toDisplayString(l.readable),1),t.createElementVNode("span",Ow,t.toDisplayString(l.timeago),1),t.createElementVNode("span",Mw,t.toDisplayString(l.readable),1)]))),256))])}const Hu=b(Tw,[["render",Fw],["__scopeId","data-v-f3b929d9"]]),Iw={mixins:[ke],methods:{timeago(e){return x.fromJSDate(e).toRelative()},readable(e){e=x.fromJSDate(e);let n=x.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)}}},Aw={class:"table-date-cell"},Lw={class:"off"},Rw={class:"on"},Pw={class:"spacer"};function Uw(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",Aw,[(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",Lw,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)]),t.createElementVNode("span",Rw,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.timeago),1)]),t.createElementVNode("span",Pw,[t.createVNode(l,{icon:"far fa-clock",left:""}),t.createTextVNode(t.toDisplayString(a.readable),1)])],2))),256))])}const $w=b(Iw,[["render",Uw],["__scopeId","data-v-0e48d460"]]),zw={mixins:[ke],computed:{boolean(){return!!this.value}}};function jw(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 Wu=b(zw,[["render",jw],["__scopeId","data-v-b180904a"]]),qw={mixins:[ke],computed:{size(){return this.$sdk.files.filesize(this.value)}}};function Hw(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 Ww=b(qw,[["render",Hw],["__scopeId","data-v-0419990c"]]);function Gw(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 Yw={mixins:[ke],computed:{duration(){return Gw(this.value)}}};function Kw(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 Jw=b(Yw,[["render",Kw],["__scopeId","data-v-2910d792"]]),Zw={mixins:[ke],methods:{async clicked(){const e=this,n=e.$sdk.utils.id(e.row),r=e.public?"secure":"public";e.processing=!0,e.$sdk.content.patch(n,{meta:{security:r}}).catch(function(i){e.$sdk.error(i),e.processing=!1}).then(function(i){e.v=r,e.processing=!1,e.$sdk.notify(`Set security to ${r}`)})}},data(){return{processing:!1,v:this.value}},computed:{canEdit(){var e=this.user;return this.$sdk.access.canEditItem(e,this.row)},public(){return this.security==="public"},security(){return this.v||"secure"}}};function Xw(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 Qw=b(Zw,[["render",Xw],["__scopeId","data-v-45dd2b07"]]),vw={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}}},e1={class:"table-url-cell"},t1=["href"];function n1(e,n,r,i,s,o){const l=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",e1,[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,t1)):t.createCommentVNode("",!0)])}const Gu=b(vw,[["render",n1],["__scopeId","data-v-aa99a5e7"]]);var Yu=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}};const Ku={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(C){a[C]===void 0&&(h.$data[C]=n[C])}),Object.keys(r).forEach(function(C){c[C]===void 0&&(h.$props[C]=r[C])}),Object.keys(l).forEach(function(C){m[C]===void 0&&(h.methods[C]=l[C])}),Object.keys(o).forEach(function(C){u[C]===void 0&&(h.computed[C]=o[C])}),Object.keys(s).forEach(function(C){f[C]===void 0&&(h.components[C]=s[C])});var g=Object.keys(h.methods||{}),p=Object.keys(h.$data||{}),k=Object.keys(h.$props||{}),y=Object.keys(this.templateProps),w=p.concat(k).concat(g).concat(y),T=($=e,W={},g.forEach(function(C){return Yu($,W,C)}),W),M=function(C){var U={};return C.forEach(function(R){R&&Object.getOwnPropertyNames(R).forEach(function(P){return Yu(R,U,P)})}),U}([h.$data,h.$props,T,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({},M))}var $,W}},r1={components:{Compile:Ku},mixins:[ke]},o1={class:"table-computed-cell"};function i1(e,n,r,i,s,o){const l=t.resolveComponent("compile");return t.openBlock(),t.createElementBlock("td",o1,[t.createVNode(l,{template:this.column.code},null,8,["template"])])}const s1=b(r1,[["render",i1],["__scopeId","data-v-05dd3203"]]),l1={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 x.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 a1(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 c1=b(l1,[["render",a1],["__scopeId","data-v-27442ac9"]]),d1=".total",u1={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,-d1.length)},itemPath(){return`${this.rawPath}.items`},value(){return Kt(this.row,this.column.key)},items(){return Kt(this.row,this.itemPath)}}},m1={class:"table-complex-cell"},f1={class:"items"};function h1(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",m1,[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)]),_:2},1040)]),default:t.withCtx(()=>[t.createElementVNode("div",f1,[(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 p1=b(u1,[["render",h1],["__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 _1=b(g1,[["render",k1],["__scopeId","data-v-9c894a39"]]),w1={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 b1(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 C1=b(w1,[["render",b1],["__scopeId","data-v-be3bef4b"]]),V1={mixins:[ke],computed:{status(){return String(this.value||"").toLowerCase()}}},E1={key:0,class:"pill"};function N1(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",E1,t.toDisplayString(o.status),1)):t.createCommentVNode("",!0)],2)}const T1=b(V1,[["render",N1],["__scopeId","data-v-357810c2"]]),S1={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}}},B1={class:"title"},D1={key:0,class:"subtitle"};function O1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-title-cell",e.status])},[t.createElementVNode("div",B1,t.toDisplayString(e.value),1),o.subtitle?(t.openBlock(),t.createElementBlock("div",D1,t.toDisplayString(o.subtitle),1)):t.createCommentVNode("",!0)],2)}const M1=b(S1,[["render",O1],["__scopeId","data-v-bf723bb2"]]),F1={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 I1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("span",{class:"ux-circle",style:t.normalizeStyle(o.style)},null,4)}const mo=b(F1,[["render",I1],["__scopeId","data-v-6f2d4cea"]]),A1={mixins:[ke],components:{UxCircle:mo},computed:{scopes(){return this.column.key==="_id"?[this.row]:(this.value||[]).filter(function({unit:n}){return!n})}}},L1={class:"scope-circles-cell"};function R1(e,n,r,i,s,o){const l=t.resolveComponent("ux-circle"),a=t.resolveComponent("tippy");return t.openBlock(),t.createElementBlock("td",L1,[(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 P1=b(A1,[["render",R1],["__scopeId","data-v-f79f00ee"]]),U1={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}}},$1={class:"content-type-cell"};function z1(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("td",$1,t.toDisplayString(o.title),1)}const j1=b(U1,[["render",z1],["__scopeId","data-v-f8cf385c"]]),q1={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}}},H1={class:"table-roster-cell"},W1={class:"event-title"},G1={class:"event-date"},Y1={class:"event-subtitle"},K1={class:"preview"},J1={class:"grid"},Z1={class:"face"};function X1(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",H1,[o.rosterEnabled&&o.count?(t.openBlock(),t.createBlock(h,{key:0,right:"",group:"roster-preview"},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"sm"},t.toHandlers(g),{icon:"",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:2},1040)]),default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",W1,t.toDisplayString(e.row.title),1),t.createElementVNode("div",G1,t.toDisplayString(e.$sdk.date.readableEventDate(e.row)),1),t.createElementVNode("div",Y1,t.toDisplayString(e.row.subtitle),1)]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",K1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.rosters,g=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",J1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.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,k=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["assignment",k.state||"unknown"])},[t.createVNode(m,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",Z1,[t.createVNode(c,{initials:`${k.profile.firstName} ${k.profile.lastName}`,id:k.profile},null,8,["initials","id"])])]),_:2},1024),t.createVNode(d,null,{default:t.withCtx(()=>{var y,w;return[t.createTextVNode(t.toDisplayString((y=k.profile)==null?void 0:y.firstName)+" "+t.toDisplayString((w=k.profile)==null?void 0:w.lastName),1)]}),_:2},1024)]),_:2},1024)],2))),256))]))),256))])]))),256))])]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)])}const Q1=b(q1,[["render",X1],["__scopeId","data-v-88720bfa"]]),v1={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}}},ex={class:"table-roster-cell"},tx={class:"wrp"},nx={key:1,class:"hover"};function rx(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",ex,[t.withDirectives((t.openBlock(),t.createElementBlock("div",tx,[o.count?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.count>1?(t.openBlock(),t.createBlock(u,{key:0},{activator:t.withCtx(({on:g})=>[t.createVNode(l,t.mergeProps({size:"xs"},t.toHandlers(g),{onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"])),icon:""}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:2},1040)]),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,g=>(t.openBlock(),t.createBlock(c,{onClick:p=>o.openRunsheet(g)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.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(g=>o.openRunsheet(s.runsheets[0]),["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.count),1)]),_:1}))],64)):(t.openBlock(),t.createElementBlock("div",nx,[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 ox=b(v1,[["render",rx],["__scopeId","data-v-3ea39cda"]]);function As(e,n){if(!e||!n)return;const r=n.split("|");n=r[0];const i=r[1];var s=Kt(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=Kt(e,l);return Array.isArray(c)?c.map(function(d){return As(d,a)}).flat().filter(Boolean):As(c,a)}const ix={data(){return{component:null}},components:{ValueRenderer:c1},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;default:i=i||e.column.widget;break}switch(r){case"boolean":i="boolean";break;case"reference":e.column.referenceType==="image"&&(i="thumbnail");break}switch(i){case"filesize":n=Ww;break;case"duration":n=Jw;break;case"button":n=Nw;break;case"security":n=Qw;break;case"boolean":n=Wu;break;case"roster":n=Q1;break;case"runsheet":n=ox;break;case"personainvite":n=C1;break;case"personaemail":n=_1;break;case"time":case"timefield":n=pw;break;case"date":case"datetime":n=Hu;break;case"due":n=$w;break;case"circles":n=P1;break;case"title":n=M1;break;case"type":n=j1;break;case"complex":n=p1;break;case"status":n=T1;break;case"computed":n=s1;break;case"url":n=Gu;break;case"currency":n=bw;break;case"tag":n=sw;break;case"avatar":n=uw;break;case"thumbnail":n=_w;break;default:switch(r){case"date":n=Hu;break;case"boolean":n=Wu;break;case"url":n=Gu;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=As(this.row,this.column.key);return e}}},sx={class:"value"};function lx(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",sx,[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 Ju=b(ix,[["render",lx],["__scopeId","data-v-43da03cf"]]),ax={components:{TableCell:Ju},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}}},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}}};function cx(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})])):t.createCommentVNode("",!0)],!0)],2)}const dx=b(ax,[["render",cx],["__scopeId","data-v-e196f762"]]),Zu={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)}},ux={mixins:[Zu],components:{TableRow:dx,TableCell:Ju},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=Kt(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)}}},mx={class:"table-scroll",ref:"scroll"},fx={key:0,class:"first table-select shrink"},hx=["onClick"],px={key:1,class:"last shrink"},gx={key:0};function yx(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",mx,[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",fx,[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(()=>[t.createTextVNode(" Select Page ")]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[1]||(n[1]=h=>o.deselectPage())},{default:t.withCtx(()=>[t.createTextVNode(" Deselect Page ")]),_: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(()=>[t.createTextVNode(" Deselect All ")]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,h=>{var g;return t.openBlock(),t.createElementBlock("th",{onClick:p=>o.toggleSort(h),class:t.normalizeClass([{sortable:h.sortable!==!1,active:h.key===((g=s.sorting)==null?void 0:g.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,hx)}),256)),r.enableActions?(t.openBlock(),t.createElementBlock("th",px,[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",gx,[t.createElementVNode("td",null,t.toDisplayString(h.title),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.rows,(g,p)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,key:g._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onMousedown:select":o.mousedownSelect,"onMouseenter:select":o.mouseenterSelect,"onClick:actions":o.clickActions,selected:o.isSelected(g),row:g,index:p,columns:r.columns},null,8,["enableSelection","enableActions","onClick:cell","onClick:row","onMousedown:select","onMouseenter:select","onClick:actions","selected","row","index","columns"]))),128))],64))),256))])])],512)],34)}const Xu=b(ux,[["render",yx],["__scopeId","data-v-08948247"]]);var fo={exports:{}},Qu;function kx(){if(Qu)return fo.exports;Qu=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 fo.exports=function(s,o,l){return JSON.stringify(i(s),o,l)},fo.exports.ensureProperties=i,fo.exports}var _x=kx();const Ls=Yt(_x);function wx(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function vu(e){return e!=null}const K={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);(Ls(r)!=Ls(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=vu(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),vu(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 wx(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]),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 e=this.$refs.input;if(e){var n;Array.isArray(e)?(console.log("ELEMENTS LENGTH?",e),n=e[e.length-1]):n=e,n&&(console.log("INPUT",n),n.focus())}}}};function xx(e){return e===void 0||typeof e>"u"||e===null||String(e)==="null"||String(e)==="undefined"}const bx={data(){return{candidate:null}},props:{modelValue:{},pills:{type:Boolean,default:!1}},mixins:[K],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 xx(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}))}}},Cx=e=>(t.pushScopeId("data-v-bf1479ae"),e=e(),t.popScopeId(),e),Vx={key:0,class:"ux-field-title"},Ex={key:0,class:"ux-required-marker"},Nx={key:1,class:"ux-field-description"},Tx={key:2,class:"select-tags"},Sx=["onClick"],Bx={key:3},Dx={key:4,class:"select-input-wrapper"},Ox={class:"ui-select-button"},Mx=Cx(()=>t.createElementVNode("option",{value:""},"Select an option",-1)),Fx=["label"],Ix=["value"],Ax=["value"],Lx={class:"ui-select-button"},Rx=["multiple"],Px={key:0,value:""},Ux=["label"],$x=["value"],zx=["value"];function jx(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",Vx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Ex,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Nx,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Tx,[(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:g=>o.removeValue(h)},[t.createVNode(a,{icon:"fa-times"})],8,Sx)]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.loadingAsyncOptions?(t.openBlock(),t.createElementBlock("div",Bx,[t.createVNode(a,{icon:"fa-spinner",spin:"",left:""}),t.createTextVNode(" Loading Options ")])):(t.openBlock(),t.createElementBlock("div",Dx,[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.canAddValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Ox,[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},[Mx,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,Ix))),256))],8,Fx))),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,Ax))),256))],32)),[[t.vModelSelect,s.candidate]])],64)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",Lx,[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",Px,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,$x))),256))],8,Ux))),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,zx))),256))],40,Rx)),[[t.vModelSelect,e.model]])],64))]))],2)}const Vt=b(bx,[["render",jx],["__scopeId","data-v-bf1479ae"]]),qx={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:Vt},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 Hx(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 em=b(qx,[["render",Hx],["__scopeId","data-v-93d339c8"]]);function Wx(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function tm(e){return typeof e=="function"?e():t.unref(e)}const Gx=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yx=e=>e!=null,Rs=()=>{};function Ps(e){var n;const r=tm(e);return(n=r==null?void 0:r.$el)!=null?n:r}const Kx=Gx?window:void 0;function Jx(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function Zx(e){const n=Jx();return t.computed(()=>(n.value,!!e()))}function Xx(e,n,r={}){const{root:i,rootMargin:s="0px",threshold:o=.1,window:l=Kx,immediate:a=!0}=r,c=Zx(()=>l&&"IntersectionObserver"in l),d=t.computed(()=>{const g=tm(e);return(Array.isArray(g)?g:[g]).map(Ps).filter(Yx)});let m=Rs;const u=t.ref(a),f=c.value?t.watch(()=>[d.value,Ps(i),u.value],([g,p])=>{if(m(),!u.value||!g.length)return;const k=new IntersectionObserver(n,{root:Ps(p),rootMargin:s,threshold:o});g.forEach(y=>y&&k.observe(y)),m=()=>{k.disconnect(),m=Rs}},{immediate:a,flush:"post"}):Rs,h=()=>{m(),f(),u.value=!1};return Wx(h),{isSupported:c,isActive:u,pause(){m(),u.value=!1},resume(){u.value=!0},stop:h}}const Qx={setup(){const e=t.ref(!1),n=t.ref(),{stop:r}=Xx(n,([{isIntersecting:i}])=>{i&&(e.value=!0,r())},{rootMargin:"600px"});return{targetEl:n,shouldRender:e}}},vx={ref:"targetEl"};function eb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",vx,[i.shouldRender?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0)],512)}const nm=b(Qx,[["render",eb]]),tb={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}}},nb={class:"icon-circle"};function rb(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",nb,[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 rm=b(tb,[["render",rb],["__scopeId","data-v-9669e7c0"]]),ob={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}}},ib={key:0,class:"initials"};function sb(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",ib,t.toDisplayString(o.initialLetters),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"avatar-img",style:t.normalizeStyle(o.style)},null,4)],2)}const Us=b(ob,[["render",sb],["__scopeId","data-v-f8d86e04"]]),lb={props:{large:{type:Boolean}}},ab=[(e=>(t.pushScopeId("data-v-d9a57955"),e=e(),t.popScopeId(),e))(()=>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))];function cb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},ab,2)}const gn=b(lb,[["render",cb],["__scopeId","data-v-d9a57955"]]),db={components:{Spinner:gn},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"}}}},ub={class:"ux-btn-text"};function mb(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",ub,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}const om=b(db,[["render",mb],["__scopeId","data-v-ea56e98b"]]),fb={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 hb(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 ho=b(fb,[["render",hb],["__scopeId","data-v-54bb07ba"]]),pb={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 gb(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 $s=b(pb,[["render",gb],["__scopeId","data-v-1a0e83ee"]]),yb={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 kb(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 im=b(yb,[["render",kb],["__scopeId","data-v-7a924ee2"]]),_b={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 wb(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 sm=b(_b,[["render",wb],["__scopeId","data-v-d3c61976"]]),po={cache:{}},xb={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,po.cache[this.group]===this&&(po.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){var n=this.$refs.menu,r=e.srcElement;n&&n.contains(r)?this.closeOnClick&&(this.expanded=!1):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=po.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),po.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 bb(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 lm=b(xb,[["render",bb],["__scopeId","data-v-9a06e510"]]),Cb={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 Vb(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 am=b(Cb,[["render",Vb],["__scopeId","data-v-601e888e"]]),Eb={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()},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}}},Nb=["alt","data"],Tb=["loading","alt","src"];function Sb(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,Nb)):(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,Tb))],6)}const cm=b(Eb,[["render",Sb],["__scopeId","data-v-ba449734"]]),Bb={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()},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}}},Db=["poster","playsinline","muted","loop","autoplay","width","height","controls","controlslist"],Ob=["src","type"],Mb=["width","height","src","title"];function Fb(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,Ob),t.createTextVNode(" Your browser does not support the video tag. ")],8,Db)],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,Mb)],4)):t.createCommentVNode("",!0)],2)}const dm=b(Bb,[["render",Fb],["__scopeId","data-v-8f908e0a"]]),Ib={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"}}},Ab={class:"ux-progress"};function Lb(e,n,r,i,s,o){return t.openBlock(),t.createElementBlock("div",Ab,[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 zs=b(Ib,[["render",Lb],["__scopeId","data-v-6e492d1a"]]),Rb={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}}}},Pb={key:0,class:"pill-avatar"},Ub={class:"font-sm font-muted"};function $b(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",Pb,[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",Ub," • "+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 um=b(Rb,[["render",$b],["__scopeId","data-v-709f24b0"]]),zb={},jb={class:"ux-list"};function qb(e,n){return t.openBlock(),t.createElementBlock("ul",jb,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}const mm=b(zb,[["render",qb],["__scopeId","data-v-670de630"]]),Hb={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 Wb(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=b(Hb,[["render",Wb],["__scopeId","data-v-a5de8929"]]);var ne;(function(e){e[e.AM=0]="AM",e[e.PM=1]="PM"})(ne||(ne={}));var fe;(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"})(fe||(fe={}));var at;(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"})(at||(at={}));function yn(e,n){e.assign("day",n.getDate()),e.assign("month",n.getMonth()+1),e.assign("year",n.getFullYear())}function hm(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?ne.AM:ne.PM)}function qn(e,n){e.imply("day",n.getDate()),e.imply("month",n.getMonth()+1),e.imply("year",n.getFullYear())}function js(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?ne.AM:ne.PM)}const Gb={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=>pm(e,at.MARCH,fe.SUNDAY,2),dstEnd:e=>pm(e,at.OCTOBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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=>Jt(e,at.MARCH,fe.SUNDAY,2,2),dstEnd:e=>Jt(e,at.NOVEMBER,fe.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 Jt(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 pm(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 gm(e,n,r={}){if(e==null)return null;if(typeof e=="number")return e;const i=r[e]??Gb[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 Yb={day:0,second:0,millisecond:0};function Ge(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 go(e){const n={};for(const r in e)n[r]=-e[r];return n}class Zt{constructor(n,r){J(this,"instant");J(this,"timezoneOffset");this.instant=n??new Date,this.timezoneOffset=r??null}static fromDate(n){return new Zt(n)}static fromInput(n,r){if(n instanceof Date)return Zt.fromDate(n);const i=(n==null?void 0:n.instant)??new Date,s=gm(n==null?void 0:n.timezone,i,r);return new Zt(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 de{constructor(n,r){J(this,"knownValues");J(this,"impliedValues");J(this,"reference");J(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=Yb){let i=Ge(n.getDateWithAdjustedTimezone(),r);const s=new de(n);return s.addTag("result/relativeDate"),"hour"in r||"minute"in r||"second"in r||"millisecond"in r?(s.addTag("result/relativeDateAndTime"),hm(s,i),yn(s,i),s.assign("timezoneOffset",n.getTimezoneOffset())):(js(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=Ge(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 de(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)}},
|