@soton.ac.uk/cape3 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
package/dist/cape3.es.js CHANGED
@@ -7859,14 +7859,16 @@ const sm = /* @__PURE__ */ J({
7859
7859
  e.use(su), e.use(Hl()), e.provide("capeOptions", t), this.addCapeComponents(e, t), t.additionalComponents !== void 0 && this.addAdditionalComponents(e, t.additionalComponents);
7860
7860
  },
7861
7861
  addAdditionalComponents: function(e, t) {
7862
- Object.keys(t).forEach(function(s) {
7862
+ Object.keys(t).forEach((s) => {
7863
7863
  e.component(s, t[s]);
7864
7864
  });
7865
7865
  },
7866
7866
  addCapeComponents: function(e, t) {
7867
- e.component("CapeRoot", Ai), e.component("CapeAdvancedSearchToggle", Du), e.component("CapeFilters", Mu), e.component("CapeFormResetButton", Nu), e.component("CapeHeader", Yi), e.component("CapeHomePage", Ni), e.component("CapeHomepageLayout", Mi), e.component("CapeLoadError", Ci), e.component("CapeLoading", Fi), e.component("CapeNavigation", Pi), e.component("CapeNonProdWarning", ju), e.component("CapeRecordCount", Eu), e.component("CapeRecordCard", Ri), e.component("CapeRecordPage", $i), e.component("CapeResults", oc), e.component("CapeSummaryCard", Li), e.component("CapeLabelledValue", _p), e.component("CapeValue", Ca), e.component("CapeSingleValue", Rn), e.component("CapeFilterFieldText", Rp), e.component("CapeFilterFieldEnum", Em), e.component("CapeFilterFreeText", Ip), e.component("CapeFilterFieldInteger", Fm), e.component("CapeFilterFieldDate", Xm), e.component("CapeSortOrder", Ui), e.component("CapeResultsControls", Sn), t.additionalComponents !== void 0 && Object.keys(t.additionalComponents).forEach(function(s) {
7868
- t.additionalComponents !== void 0 && e.component(s, t.additionalComponents[s]);
7869
- });
7867
+ e.component("CapeRoot", Ai), e.component("CapeAdvancedSearchToggle", Du), e.component("CapeFilters", Mu), e.component("CapeFormResetButton", Nu), e.component("CapeHeader", Yi), e.component("CapeHomePage", Ni), e.component("CapeHomepageLayout", Mi), e.component("CapeLoadError", Ci), e.component("CapeLoading", Fi), e.component("CapeNavigation", Pi), e.component("CapeNonProdWarning", ju), e.component("CapeRecordCount", Eu), e.component("CapeRecordCard", Ri), e.component("CapeRecordPage", $i), e.component("CapeResults", oc), e.component("CapeSummaryCard", Li), e.component("CapeLabelledValue", _p), e.component("CapeValue", Ca), e.component("CapeSingleValue", Rn), e.component("CapeFilterFieldText", Rp), e.component("CapeFilterFieldEnum", Em), e.component("CapeFilterFreeText", Ip), e.component("CapeFilterFieldInteger", Fm), e.component("CapeFilterFieldDate", Xm), e.component("CapeSortOrder", Ui), e.component("CapeResultsControls", Sn), t.additionalComponents !== void 0 && Object.keys(t.additionalComponents).forEach(
7868
+ (s) => {
7869
+ t.additionalComponents !== void 0 && e.component(s, t.additionalComponents[s]);
7870
+ }
7871
+ );
7870
7872
  }
7871
7873
  }, tv = {
7872
7874
  template: "#templateCapeFooter"
package/dist/cape3.umd.js CHANGED
@@ -42,4 +42,4 @@ var Zs;function _(){return Zs.apply(null,arguments)}function lc(e){Zs=e}function
42
42
  [`+o+"] ";for(a in arguments[0])A(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];r.push(i)}Xs(e+`
43
43
  Arguments: `+Array.prototype.slice.call(r).join("")+`
44
44
  `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var ei={};function ti(e,t){_.deprecationHandler!=null&&_.deprecationHandler(e,t),ei[e]||(Xs(t),ei[e]=!0)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;function ve(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function dc(e){var t,n;for(n in e)A(e,n)&&(t=e[n],ve(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function rr(e,t){var n=Ge({},e),r;for(r in t)A(t,r)&&(Xe(e[r])&&Xe(t[r])?(n[r]={},Ge(n[r],e[r]),Ge(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)A(e,r)&&!A(t,r)&&Xe(e[r])&&(n[r]=Ge({},n[r]));return n}function sr(e){e!=null&&this.set(e)}var ir;Object.keys?ir=Object.keys:ir=function(e){var t,n=[];for(t in e)A(e,t)&&n.push(t);return n};var uc={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fc(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ve(r)?r.call(t,n):r}function Oe(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var or=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,sn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ar={},ut={};function v(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(ut[e]=i),t&&(ut[t[0]]=function(){return Oe(i.apply(this,arguments),t[1],t[2])}),n&&(ut[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function hc(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function pc(e){var t=e.match(or),n,r;for(n=0,r=t.length;n<r;n++)ut[t[n]]?t[n]=ut[t[n]]:t[n]=hc(t[n]);return function(i){var o="",a;for(a=0;a<r;a++)o+=ve(t[a])?t[a].call(i,e):t[a];return o}}function on(e,t){return e.isValid()?(t=ni(t,e.localeData()),ar[t]=ar[t]||pc(t),ar[t](e)):e.localeData().invalidDate()}function ni(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(sn.lastIndex=0;n>=0&&sn.test(e);)e=e.replace(sn,r),sn.lastIndex=0,n-=1;return e}var mc={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gc(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(or).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var _c="Invalid date";function yc(){return this._invalidDate}var wc="%d",Sc=/\d{1,2}/;function kc(e){return this._ordinal.replace("%d",e)}var bc={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Ec(e,t,n,r){var i=this._relativeTime[n];return ve(i)?i(e,t,n,r):i.replace(/%d/i,e)}function vc(e,t){var n=this._relativeTime[e>0?"future":"past"];return ve(n)?n(t):n.replace(/%s/i,t)}var ri={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fe(e){return typeof e=="string"?ri[e]||ri[e.toLowerCase()]:void 0}function lr(e){var t={},n,r;for(r in e)A(e,r)&&(n=fe(r),n&&(t[n]=e[r]));return t}var Oc={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Dc(e){var t=[],n;for(n in e)A(e,n)&&t.push({unit:n,priority:Oc[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var si=/\d/,ce=/\d\d/,ii=/\d{3}/,cr=/\d{4}/,an=/[+-]?\d{6}/,W=/\d\d?/,oi=/\d\d\d\d?/,ai=/\d\d\d\d\d\d?/,ln=/\d{1,3}/,dr=/\d{1,4}/,cn=/[+-]?\d{1,6}/,ft=/\d+/,dn=/[+-]?\d+/,Nc=/Z|[+-]\d\d:?\d\d/gi,un=/Z|[+-]\d\d(?::?\d\d)?/gi,Tc=/[+-]?\d+(\.\d{1,3})?/,xt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ht=/^[1-9]\d?/,ur=/^([1-9]\d|\d)/,fn;fn={};function w(e,t,n){fn[e]=ve(t)?t:function(r,i){return r&&n?n:t}}function Mc(e,t){return A(fn,e)?fn[e](t._strict,t._locale):new RegExp(Vc(e))}function Vc(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function he(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function C(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=he(t)),n}var fr={};function U(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),Ce(t)&&(r=function(o,a){a[t]=C(o)}),i=e.length,n=0;n<i;n++)fr[e[n]]=r}function It(e,t){U(e,function(n,r,i,o){i._w=i._w||{},t(n,i._w,i,o)})}function Cc(e,t,n){t!=null&&A(fr,e)&&fr[e](t,n._a,n,e)}function hn(e){return e%4===0&&e%100!==0||e%400===0}var se=0,$e=1,De=2,X=3,we=4,Pe=5,et=6,Rc=7,$c=8;v("Y",0,0,function(){var e=this.year();return e<=9999?Oe(e,4):"+"+e}),v(0,["YY",2],0,function(){return this.year()%100}),v(0,["YYYY",4],0,"year"),v(0,["YYYYY",5],0,"year"),v(0,["YYYYYY",6,!0],0,"year"),w("Y",dn),w("YY",W,ce),w("YYYY",dr,cr),w("YYYYY",cn,an),w("YYYYYY",cn,an),U(["YYYYY","YYYYYY"],se),U("YYYY",function(e,t){t[se]=e.length===2?_.parseTwoDigitYear(e):C(e)}),U("YY",function(e,t){t[se]=_.parseTwoDigitYear(e)}),U("Y",function(e,t){t[se]=parseInt(e,10)});function Bt(e){return hn(e)?366:365}_.parseTwoDigitYear=function(e){return C(e)+(C(e)>68?1900:2e3)};var li=pt("FullYear",!0);function Pc(){return hn(this.year())}function pt(e,t){return function(n){return n!=null?(ci(this,e,n),_.updateOffset(this,t),this):At(this,e)}}function At(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function ci(e,t,n){var r,i,o,a,l;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,a=e.month(),l=e.date(),l=l===29&&a===1&&!hn(o)?28:l,i?r.setUTCFullYear(o,a,l):r.setFullYear(o,a,l)}}function xc(e){return e=fe(e),ve(this[e])?this[e]():this}function Ic(e,t){if(typeof e=="object"){e=lr(e);var n=Dc(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=fe(e),ve(this[e]))return this[e](t);return this}function Bc(e,t){return(e%t+t)%t}var Z;Array.prototype.indexOf?Z=Array.prototype.indexOf:Z=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function hr(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Bc(t,12);return e+=(t-n)/12,n===1?hn(e)?29:28:31-n%7%2}v("M",["MM",2],"Mo",function(){return this.month()+1}),v("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),v("MMMM",0,0,function(e){return this.localeData().months(this,e)}),w("M",W,ht),w("MM",W,ce),w("MMM",function(e,t){return t.monthsShortRegex(e)}),w("MMMM",function(e,t){return t.monthsRegex(e)}),U(["M","MM"],function(e,t){t[$e]=C(e)-1}),U(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[$e]=i:T(n).invalidMonth=e});var Ac="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),di="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ui=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fc=xt,Yc=xt;function Lc(e,t){return e?_e(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ui).test(t)?"format":"standalone"][e.month()]:_e(this._months)?this._months:this._months.standalone}function Uc(e,t){return e?_e(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ui.test(t)?"format":"standalone"][e.month()]:_e(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Wc(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=Ee([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(i=Z.call(this._shortMonthsParse,a),i!==-1?i:null):(i=Z.call(this._longMonthsParse,a),i!==-1?i:null):t==="MMM"?(i=Z.call(this._shortMonthsParse,a),i!==-1?i:(i=Z.call(this._longMonthsParse,a),i!==-1?i:null)):(i=Z.call(this._longMonthsParse,a),i!==-1?i:(i=Z.call(this._shortMonthsParse,a),i!==-1?i:null))}function jc(e,t,n){var r,i,o;if(this._monthsParseExact)return Wc.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ee([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function fi(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=C(t);else if(t=e.localeData().monthsParse(t),!Ce(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,hr(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function hi(e){return e!=null?(fi(this,e),_.updateOffset(this,!0),this):At(this,"Month")}function Hc(){return hr(this.year(),this.month())}function Gc(e){return this._monthsParseExact?(A(this,"_monthsRegex")||pi.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(A(this,"_monthsShortRegex")||(this._monthsShortRegex=Fc),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zc(e){return this._monthsParseExact?(A(this,"_monthsRegex")||pi.call(this),e?this._monthsStrictRegex:this._monthsRegex):(A(this,"_monthsRegex")||(this._monthsRegex=Yc),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pi(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],i,o,a,l;for(i=0;i<12;i++)o=Ee([2e3,i]),a=Re(this.monthsShort(o,"")),l=Re(this.months(o,"")),t.push(a),n.push(l),r.push(l),r.push(a);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Kc(e,t,n,r,i,o,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,i,o,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,i,o,a),l}function Ft(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function pn(e,t,n){var r=7+t-n,i=(7+Ft(e,0,r).getUTCDay()-t)%7;return-i+r-1}function mi(e,t,n,r,i){var o=(7+n-r)%7,a=pn(e,r,i),l=1+7*(t-1)+o+a,c,u;return l<=0?(c=e-1,u=Bt(c)+l):l>Bt(e)?(c=e+1,u=l-Bt(e)):(c=e,u=l),{year:c,dayOfYear:u}}function Yt(e,t,n){var r=pn(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,a;return i<1?(a=e.year()-1,o=i+xe(a,t,n)):i>xe(e.year(),t,n)?(o=i-xe(e.year(),t,n),a=e.year()+1):(a=e.year(),o=i),{week:o,year:a}}function xe(e,t,n){var r=pn(e,t,n),i=pn(e+1,t,n);return(Bt(e)-r+i)/7}v("w",["ww",2],"wo","week"),v("W",["WW",2],"Wo","isoWeek"),w("w",W,ht),w("ww",W,ce),w("W",W,ht),w("WW",W,ce),It(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=C(e)});function qc(e){return Yt(e,this._week.dow,this._week.doy).week}var Zc={dow:0,doy:6};function Jc(){return this._week.dow}function Qc(){return this._week.doy}function Xc(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ed(e){var t=Yt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}v("d",0,"do","day"),v("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),v("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),v("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),v("e",0,0,"weekday"),v("E",0,0,"isoWeekday"),w("d",W),w("e",W),w("E",W),w("dd",function(e,t){return t.weekdaysMinRegex(e)}),w("ddd",function(e,t){return t.weekdaysShortRegex(e)}),w("dddd",function(e,t){return t.weekdaysRegex(e)}),It(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:T(n).invalidWeekday=e}),It(["d","e","E"],function(e,t,n,r){t[r]=C(e)});function td(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function nd(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function pr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var rd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sd="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),id=xt,od=xt,ad=xt;function ld(e,t){var n=_e(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?pr(n,this._week.dow):e?n[e.day()]:n}function cd(e){return e===!0?pr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function dd(e){return e===!0?pr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ud(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Ee([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=Z.call(this._weekdaysParse,a),i!==-1?i:null):t==="ddd"?(i=Z.call(this._shortWeekdaysParse,a),i!==-1?i:null):(i=Z.call(this._minWeekdaysParse,a),i!==-1?i:null):t==="dddd"?(i=Z.call(this._weekdaysParse,a),i!==-1||(i=Z.call(this._shortWeekdaysParse,a),i!==-1)?i:(i=Z.call(this._minWeekdaysParse,a),i!==-1?i:null)):t==="ddd"?(i=Z.call(this._shortWeekdaysParse,a),i!==-1||(i=Z.call(this._weekdaysParse,a),i!==-1)?i:(i=Z.call(this._minWeekdaysParse,a),i!==-1?i:null)):(i=Z.call(this._minWeekdaysParse,a),i!==-1||(i=Z.call(this._weekdaysParse,a),i!==-1)?i:(i=Z.call(this._shortWeekdaysParse,a),i!==-1?i:null))}function fd(e,t,n){var r,i,o;if(this._weekdaysParseExact)return ud.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ee([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function hd(e){if(!this.isValid())return e!=null?this:NaN;var t=At(this,"Day");return e!=null?(e=td(e,this.localeData()),this.add(e-t,"d")):t}function pd(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function md(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=nd(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function gd(e){return this._weekdaysParseExact?(A(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(A(this,"_weekdaysRegex")||(this._weekdaysRegex=id),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function _d(e){return this._weekdaysParseExact?(A(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(A(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=od),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yd(e){return this._weekdaysParseExact?(A(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(A(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ad),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function mr(){function e(d,h){return h.length-d.length}var t=[],n=[],r=[],i=[],o,a,l,c,u;for(o=0;o<7;o++)a=Ee([2e3,1]).day(o),l=Re(this.weekdaysMin(a,"")),c=Re(this.weekdaysShort(a,"")),u=Re(this.weekdays(a,"")),t.push(l),n.push(c),r.push(u),i.push(l),i.push(c),i.push(u);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function gr(){return this.hours()%12||12}function wd(){return this.hours()||24}v("H",["HH",2],0,"hour"),v("h",["hh",2],0,gr),v("k",["kk",2],0,wd),v("hmm",0,0,function(){return""+gr.apply(this)+Oe(this.minutes(),2)}),v("hmmss",0,0,function(){return""+gr.apply(this)+Oe(this.minutes(),2)+Oe(this.seconds(),2)}),v("Hmm",0,0,function(){return""+this.hours()+Oe(this.minutes(),2)}),v("Hmmss",0,0,function(){return""+this.hours()+Oe(this.minutes(),2)+Oe(this.seconds(),2)});function _i(e,t){v(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}_i("a",!0),_i("A",!1);function yi(e,t){return t._meridiemParse}w("a",yi),w("A",yi),w("H",W,ur),w("h",W,ht),w("k",W,ht),w("HH",W,ce),w("hh",W,ce),w("kk",W,ce),w("hmm",oi),w("hmmss",ai),w("Hmm",oi),w("Hmmss",ai),U(["H","HH"],X),U(["k","kk"],function(e,t,n){var r=C(e);t[X]=r===24?0:r}),U(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),U(["h","hh"],function(e,t,n){t[X]=C(e),T(n).bigHour=!0}),U("hmm",function(e,t,n){var r=e.length-2;t[X]=C(e.substr(0,r)),t[we]=C(e.substr(r)),T(n).bigHour=!0}),U("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[X]=C(e.substr(0,r)),t[we]=C(e.substr(r,2)),t[Pe]=C(e.substr(i)),T(n).bigHour=!0}),U("Hmm",function(e,t,n){var r=e.length-2;t[X]=C(e.substr(0,r)),t[we]=C(e.substr(r))}),U("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[X]=C(e.substr(0,r)),t[we]=C(e.substr(r,2)),t[Pe]=C(e.substr(i))});function Sd(e){return(e+"").toLowerCase().charAt(0)==="p"}var kd=/[ap]\.?m?\.?/i,bd=pt("Hours",!0);function Ed(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var wi={calendar:uc,longDateFormat:mc,invalidDate:_c,ordinal:wc,dayOfMonthOrdinalParse:Sc,relativeTime:bc,months:Ac,monthsShort:di,week:Zc,weekdays:rd,weekdaysMin:sd,weekdaysShort:gi,meridiemParse:kd},G={},Lt={},Ut;function vd(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Si(e){return e&&e.toLowerCase().replace("_","-")}function Od(e){for(var t=0,n,r,i,o;t<e.length;){for(o=Si(e[t]).split("-"),n=o.length,r=Si(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=mn(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&vd(o,r)>=n-1)break;n--}t++}return Ut}function Dd(e){return!!(e&&e.match("^[^/\\\\]*$"))}function mn(e){var t=null,n;if(G[e]===void 0&&typeof module<"u"&&module&&module.exports&&Dd(e))try{t=Ut._abbr,n=require,n("./locale/"+e),ze(t)}catch{G[e]=null}return G[e]}function ze(e,t){var n;return e&&(ae(t)?n=Ie(e):n=_r(e,t),n?Ut=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ut._abbr}function _r(e,t){if(t!==null){var n,r=wi;if(t.abbr=e,G[e]!=null)ti("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=G[e]._config;else if(t.parentLocale!=null)if(G[t.parentLocale]!=null)r=G[t.parentLocale]._config;else if(n=mn(t.parentLocale),n!=null)r=n._config;else return Lt[t.parentLocale]||(Lt[t.parentLocale]=[]),Lt[t.parentLocale].push({name:e,config:t}),null;return G[e]=new sr(rr(r,t)),Lt[e]&&Lt[e].forEach(function(i){_r(i.name,i.config)}),ze(e),G[e]}else return delete G[e],null}function Nd(e,t){if(t!=null){var n,r,i=wi;G[e]!=null&&G[e].parentLocale!=null?G[e].set(rr(G[e]._config,t)):(r=mn(e),r!=null&&(i=r._config),t=rr(i,t),r==null&&(t.abbr=e),n=new sr(t),n.parentLocale=G[e],G[e]=n),ze(e)}else G[e]!=null&&(G[e].parentLocale!=null?(G[e]=G[e].parentLocale,e===ze()&&ze(e)):G[e]!=null&&delete G[e]);return G[e]}function Ie(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ut;if(!_e(e)){if(t=mn(e),t)return t;e=[e]}return Od(e)}function Td(){return ir(G)}function yr(e){var t,n=e._a;return n&&T(e).overflow===-2&&(t=n[$e]<0||n[$e]>11?$e:n[De]<1||n[De]>hr(n[se],n[$e])?De:n[X]<0||n[X]>24||n[X]===24&&(n[we]!==0||n[Pe]!==0||n[et]!==0)?X:n[we]<0||n[we]>59?we:n[Pe]<0||n[Pe]>59?Pe:n[et]<0||n[et]>999?et:-1,T(e)._overflowDayOfYear&&(t<se||t>De)&&(t=De),T(e)._overflowWeeks&&t===-1&&(t=Rc),T(e)._overflowWeekday&&t===-1&&(t=$c),T(e).overflow=t),e}var Md=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Vd=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cd=/Z|[+-]\d\d(?::?\d\d)?/,gn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Rd=/^\/?Date\((-?\d+)/i,$d=/^(?:(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{4}))$/,Pd={UT:0,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){var t,n,r=e._i,i=Md.exec(r)||Vd.exec(r),o,a,l,c,u=gn.length,d=wr.length;if(i){for(T(e).iso=!0,t=0,n=u;t<n;t++)if(gn[t][1].exec(i[1])){a=gn[t][0],o=gn[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(i[3]){for(t=0,n=d;t<n;t++)if(wr[t][1].exec(i[3])){l=(i[2]||" ")+wr[t][0];break}if(l==null){e._isValid=!1;return}}if(!o&&l!=null){e._isValid=!1;return}if(i[4])if(Cd.exec(i[4]))c="Z";else{e._isValid=!1;return}e._f=a+(l||"")+(c||""),kr(e)}else e._isValid=!1}function xd(e,t,n,r,i,o){var a=[Id(e),di.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function Id(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Bd(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ad(e,t,n){if(e){var r=gi.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return T(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Fd(e,t,n){if(e)return Pd[e];if(t)return 0;var r=parseInt(n,10),i=r%100,o=(r-i)/100;return o*60+i}function bi(e){var t=$d.exec(Bd(e._i)),n;if(t){if(n=xd(t[4],t[3],t[2],t[5],t[6],t[7]),!Ad(t[1],n,e))return;e._a=n,e._tzm=Fd(t[8],t[9],t[10]),e._d=Ft.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),T(e).rfc2822=!0}else e._isValid=!1}function Yd(e){var t=Rd.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(ki(e),e._isValid===!1)delete e._isValid;else return;if(bi(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:_.createFromInputFallback(e)}_.createFromInputFallback=ue("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function mt(e,t,n){return e??t??n}function Ld(e){var t=new Date(_.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Sr(e){var t,n,r=[],i,o,a;if(!e._d){for(i=Ld(e),e._w&&e._a[De]==null&&e._a[$e]==null&&Ud(e),e._dayOfYear!=null&&(a=mt(e._a[se],i[se]),(e._dayOfYear>Bt(a)||e._dayOfYear===0)&&(T(e)._overflowDayOfYear=!0),n=Ft(a,0,e._dayOfYear),e._a[$e]=n.getUTCMonth(),e._a[De]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[X]===24&&e._a[we]===0&&e._a[Pe]===0&&e._a[et]===0&&(e._nextDay=!0,e._a[X]=0),e._d=(e._useUTC?Ft:Kc).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[X]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(T(e).weekdayMismatch=!0)}}function Ud(e){var t,n,r,i,o,a,l,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,a=4,n=mt(t.GG,e._a[se],Yt(j(),1,4).year),r=mt(t.W,1),i=mt(t.E,1),(i<1||i>7)&&(c=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=Yt(j(),o,a),n=mt(t.gg,e._a[se],u.year),r=mt(t.w,u.week),t.d!=null?(i=t.d,(i<0||i>6)&&(c=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(c=!0)):i=o),r<1||r>xe(n,o,a)?T(e)._overflowWeeks=!0:c!=null?T(e)._overflowWeekday=!0:(l=mi(n,r,i,o,a),e._a[se]=l.year,e._dayOfYear=l.dayOfYear)}_.ISO_8601=function(){},_.RFC_2822=function(){};function kr(e){if(e._f===_.ISO_8601){ki(e);return}if(e._f===_.RFC_2822){bi(e);return}e._a=[],T(e).empty=!0;var t=""+e._i,n,r,i,o,a,l=t.length,c=0,u,d;for(i=ni(e._f,e._locale).match(or)||[],d=i.length,n=0;n<d;n++)o=i[n],r=(t.match(Mc(o,e))||[])[0],r&&(a=t.substr(0,t.indexOf(r)),a.length>0&&T(e).unusedInput.push(a),t=t.slice(t.indexOf(r)+r.length),c+=r.length),ut[o]?(r?T(e).empty=!1:T(e).unusedTokens.push(o),Cc(o,r,e)):e._strict&&!r&&T(e).unusedTokens.push(o);T(e).charsLeftOver=l-c,t.length>0&&T(e).unusedInput.push(t),e._a[X]<=12&&T(e).bigHour===!0&&e._a[X]>0&&(T(e).bigHour=void 0),T(e).parsedDateParts=e._a.slice(0),T(e).meridiem=e._meridiem,e._a[X]=Wd(e._locale,e._a[X],e._meridiem),u=T(e).era,u!==null&&(e._a[se]=e._locale.erasConvertYear(u,e._a[se])),Sr(e),yr(e)}function Wd(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function jd(e){var t,n,r,i,o,a,l=!1,c=e._f.length;if(c===0){T(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)o=0,a=!1,t=nr({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],kr(t),er(t)&&(a=!0),o+=T(t).charsLeftOver,o+=T(t).unusedTokens.length*10,T(t).score=o,l?o<r&&(r=o,n=t):(r==null||o<r||a)&&(r=o,n=t,a&&(l=!0));Ge(e,n||t)}function Hd(e){if(!e._d){var t=lr(e._i),n=t.day===void 0?t.date:t.day;e._a=Js([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Sr(e)}}function Gd(e){var t=new Pt(yr(Ei(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ei(e){var t=e._i,n=e._f;return e._locale=e._locale||Ie(e._l),t===null||n===void 0&&t===""?rn({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ye(t)?new Pt(yr(t)):($t(t)?e._d=t:_e(n)?jd(e):n?kr(e):zd(e),er(e)||(e._d=null),e))}function zd(e){var t=e._i;ae(t)?e._d=new Date(_.now()):$t(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Yd(e):_e(t)?(e._a=Js(t.slice(0),function(n){return parseInt(n,10)}),Sr(e)):Xe(t)?Hd(e):Ce(t)?e._d=new Date(t):_.createFromInputFallback(e)}function vi(e,t,n,r,i){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Xe(e)&&Qn(e)||_e(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,Gd(o)}function j(e,t,n,r){return vi(e,t,n,r,!1)}var Kd=ue("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=j.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:rn()}),qd=ue("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=j.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:rn()});function Oi(e,t){var n,r;if(t.length===1&&_e(t[0])&&(t=t[0]),!t.length)return j();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Zd(){var e=[].slice.call(arguments,0);return Oi("isBefore",e)}function Jd(){var e=[].slice.call(arguments,0);return Oi("isAfter",e)}var Qd=function(){return Date.now?Date.now():+new Date},Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xd(e){var t,n=!1,r,i=Wt.length;for(t in e)if(A(e,t)&&!(Z.call(Wt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[Wt[r]]){if(n)return!1;parseFloat(e[Wt[r]])!==C(e[Wt[r]])&&(n=!0)}return!0}function eu(){return this._isValid}function tu(){return Se(NaN)}function _n(e){var t=lr(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=Xd(t),this._milliseconds=+d+u*1e3+c*6e4+l*1e3*60*60,this._days=+a+o*7,this._months=+i+r*3+n*12,this._data={},this._locale=Ie(),this._bubble()}function yn(e){return e instanceof _n}function br(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function nu(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0,a;for(a=0;a<r;a++)(n&&e[a]!==t[a]||!n&&C(e[a])!==C(t[a]))&&o++;return o+i}function Di(e,t){v(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Oe(~~(n/60),2)+t+Oe(~~n%60,2)})}Di("Z",":"),Di("ZZ",""),w("Z",un),w("ZZ",un),U(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Er(un,e)});var ru=/([\+\-]|\d\d)/gi;function Er(e,t){var n=(t||"").match(e),r,i,o;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(ru)||["-",0,0],o=+(i[1]*60)+C(i[2]),o===0?0:i[0]==="+"?o:-o)}function vr(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(ye(e)||$t(e)?e.valueOf():j(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),_.updateOffset(n,!1),n):j(e).local()}function Or(e){return-Math.round(e._d.getTimezoneOffset())}_.updateOffset=function(){};function su(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Er(un,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=Or(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?Vi(this,Se(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Or(this)}function iu(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ou(e){return this.utcOffset(0,e)}function au(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Or(this),"m")),this}function lu(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Er(Nc,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function cu(e){return this.isValid()?(e=e?j(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function du(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function uu(){if(!ae(this._isDSTShifted))return this._isDSTShifted;var e={},t;return nr(e,this),e=Ei(e),e._a?(t=e._isUTC?Ee(e._a):j(e._a),this._isDSTShifted=this.isValid()&&nu(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function fu(){return this.isValid()?!this._isUTC:!1}function hu(){return this.isValid()?this._isUTC:!1}function Ni(){return this.isValid()?this._isUTC&&this._offset===0:!1}var pu=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,mu=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Se(e,t){var n=e,r=null,i,o,a;return yn(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Ce(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=pu.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:C(r[De])*i,h:C(r[X])*i,m:C(r[we])*i,s:C(r[Pe])*i,ms:C(br(r[et]*1e3))*i}):(r=mu.exec(e))?(i=r[1]==="-"?-1:1,n={y:tt(r[2],i),M:tt(r[3],i),w:tt(r[4],i),d:tt(r[5],i),h:tt(r[6],i),m:tt(r[7],i),s:tt(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=gu(j(n.from),j(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),o=new _n(n),yn(e)&&A(e,"_locale")&&(o._locale=e._locale),yn(e)&&A(e,"_isValid")&&(o._isValid=e._isValid),o}Se.fn=_n.prototype,Se.invalid=tu;function tt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ti(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gu(e,t){var n;return e.isValid()&&t.isValid()?(t=vr(t,e),e.isBefore(t)?n=Ti(e,t):(n=Ti(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Mi(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(ti(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=Se(n,r),Vi(this,i,e),this}}function Vi(e,t,n,r){var i=t._milliseconds,o=br(t._days),a=br(t._months);e.isValid()&&(r=r??!0,a&&fi(e,At(e,"Month")+a*n),o&&ci(e,"Date",At(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&_.updateOffset(e,o||a))}var _u=Mi(1,"add"),yu=Mi(-1,"subtract");function Ci(e){return typeof e=="string"||e instanceof String}function wu(e){return ye(e)||$t(e)||Ci(e)||Ce(e)||ku(e)||Su(e)||e===null||e===void 0}function Su(e){var t=Xe(e)&&!Qn(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,a=r.length;for(i=0;i<a;i+=1)o=r[i],n=n||A(e,o);return t&&n}function ku(e){var t=_e(e),n=!1;return t&&(n=e.filter(function(r){return!Ce(r)&&Ci(e)}).length===0),t&&n}function bu(e){var t=Xe(e)&&!Qn(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,o;for(i=0;i<r.length;i+=1)o=r[i],n=n||A(e,o);return t&&n}function Eu(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function vu(e,t){arguments.length===1&&(arguments[0]?wu(arguments[0])?(e=arguments[0],t=void 0):bu(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||j(),r=vr(n,this).startOf("day"),i=_.calendarFormat(this,r)||"sameElse",o=t&&(ve(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,j(n)))}function Ou(){return new Pt(this)}function Du(e,t){var n=ye(e)?e:j(e);return this.isValid()&&n.isValid()?(t=fe(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Nu(e,t){var n=ye(e)?e:j(e);return this.isValid()&&n.isValid()?(t=fe(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Tu(e,t,n,r){var i=ye(e)?e:j(e),o=ye(t)?t:j(t);return this.isValid()&&i.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function Mu(e,t){var n=ye(e)?e:j(e),r;return this.isValid()&&n.isValid()?(t=fe(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Vu(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Cu(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ru(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(r=vr(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=fe(t),t){case"year":o=wn(this,r)/12;break;case"month":o=wn(this,r);break;case"quarter":o=wn(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:he(o)}function wn(e,t){if(e.date()<t.date())return-wn(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,o;return t-r<0?(i=e.clone().add(n-1,"months"),o=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),o=(t-r)/(i-r)),-(n+o)||0}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function $u(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Pu(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?on(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ve(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",on(n,"Z")):on(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xu(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function Iu(e){e||(e=this.isUtc()?_.defaultFormatUtc:_.defaultFormat);var t=on(this,e);return this.localeData().postformat(t)}function Bu(e,t){return this.isValid()&&(ye(e)&&e.isValid()||j(e).isValid())?Se({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Au(e){return this.from(j(),e)}function Fu(e,t){return this.isValid()&&(ye(e)&&e.isValid()||j(e).isValid())?Se({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Yu(e){return this.to(j(),e)}function Ri(e){var t;return e===void 0?this._locale._abbr:(t=Ie(e),t!=null&&(this._locale=t),this)}var $i=ue("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Pi(){return this._locale}var Sn=1e3,gt=60*Sn,kn=60*gt,xi=(365*400+97)*24*kn;function _t(e,t){return(e%t+t)%t}function Ii(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-xi:new Date(e,t,n).valueOf()}function Bi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-xi:Date.UTC(e,t,n)}function Lu(e){var t,n;if(e=fe(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Bi:Ii,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=_t(t+(this._isUTC?0:this.utcOffset()*gt),kn);break;case"minute":t=this._d.valueOf(),t-=_t(t,gt);break;case"second":t=this._d.valueOf(),t-=_t(t,Sn);break}return this._d.setTime(t),_.updateOffset(this,!0),this}function Uu(e){var t,n;if(e=fe(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Bi:Ii,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=kn-_t(t+(this._isUTC?0:this.utcOffset()*gt),kn)-1;break;case"minute":t=this._d.valueOf(),t+=gt-_t(t,gt)-1;break;case"second":t=this._d.valueOf(),t+=Sn-_t(t,Sn)-1;break}return this._d.setTime(t),_.updateOffset(this,!0),this}function Wu(){return this._d.valueOf()-(this._offset||0)*6e4}function ju(){return Math.floor(this.valueOf()/1e3)}function Hu(){return new Date(this.valueOf())}function Gu(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zu(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ku(){return this.isValid()?this.toISOString():null}function qu(){return er(this)}function Zu(){return Ge({},T(this))}function Ju(){return T(this).overflow}function Qu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}v("N",0,0,"eraAbbr"),v("NN",0,0,"eraAbbr"),v("NNN",0,0,"eraAbbr"),v("NNNN",0,0,"eraName"),v("NNNNN",0,0,"eraNarrow"),v("y",["y",1],"yo","eraYear"),v("y",["yy",2],0,"eraYear"),v("y",["yyy",3],0,"eraYear"),v("y",["yyyy",4],0,"eraYear"),w("N",Dr),w("NN",Dr),w("NNN",Dr),w("NNNN",df),w("NNNNN",uf),U(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?T(n).era=i:T(n).invalidEra=e}),w("y",ft),w("yy",ft),w("yyy",ft),w("yyyy",ft),w("yo",ff),U(["y","yy","yyy","yyyy"],se),U(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[se]=n._locale.eraYearOrdinalParse(e,i):t[se]=parseInt(e,10)});function Xu(e,t){var n,r,i,o=this._eras||Ie("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":i=_(o[n].since).startOf("day"),o[n].since=i.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":i=_(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf();break}}return o}function ef(e,t,n){var r,i,o=this.eras(),a,l,c;for(e=e.toUpperCase(),r=0,i=o.length;r<i;++r)if(a=o[r].name.toUpperCase(),l=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return o[r];break;case"NNNN":if(a===e)return o[r];break;case"NNNNN":if(c===e)return o[r];break}else if([a,l,c].indexOf(e)>=0)return o[r]}function tf(e,t){var n=e.since<=e.until?1:-1;return t===void 0?_(e.since).year():_(e.since).year()+(t-e.offset)*n}function nf(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function rf(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function sf(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function of(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-_(i[e].since).year())*n+i[e].offset;return this.year()}function af(e){return A(this,"_erasNameRegex")||Nr.call(this),e?this._erasNameRegex:this._erasRegex}function lf(e){return A(this,"_erasAbbrRegex")||Nr.call(this),e?this._erasAbbrRegex:this._erasRegex}function cf(e){return A(this,"_erasNarrowRegex")||Nr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Dr(e,t){return t.erasAbbrRegex(e)}function df(e,t){return t.erasNameRegex(e)}function uf(e,t){return t.erasNarrowRegex(e)}function ff(e,t){return t._eraYearOrdinalRegex||ft}function Nr(){var e=[],t=[],n=[],r=[],i,o,a,l,c,u=this.eras();for(i=0,o=u.length;i<o;++i)a=Re(u[i].name),l=Re(u[i].abbr),c=Re(u[i].narrow),t.push(a),e.push(l),n.push(c),r.push(a),r.push(l),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}v(0,["gg",2],0,function(){return this.weekYear()%100}),v(0,["GG",2],0,function(){return this.isoWeekYear()%100});function bn(e,t){v(0,[e,e.length],0,t)}bn("gggg","weekYear"),bn("ggggg","weekYear"),bn("GGGG","isoWeekYear"),bn("GGGGG","isoWeekYear"),w("G",dn),w("g",dn),w("GG",W,ce),w("gg",W,ce),w("GGGG",dr,cr),w("gggg",dr,cr),w("GGGGG",cn,an),w("ggggg",cn,an),It(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=C(e)}),It(["gg","GG"],function(e,t,n,r){t[r]=_.parseTwoDigitYear(e)});function hf(e){return Ai.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function pf(e){return Ai.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function mf(){return xe(this.year(),1,4)}function gf(){return xe(this.isoWeekYear(),1,4)}function _f(){var e=this.localeData()._week;return xe(this.year(),e.dow,e.doy)}function yf(){var e=this.localeData()._week;return xe(this.weekYear(),e.dow,e.doy)}function Ai(e,t,n,r,i){var o;return e==null?Yt(this,r,i).year:(o=xe(e,r,i),t>o&&(t=o),wf.call(this,e,t,n,r,i))}function wf(e,t,n,r,i){var o=mi(e,t,n,r,i),a=Ft(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}v("Q",0,"Qo","quarter"),w("Q",si),U("Q",function(e,t){t[$e]=(C(e)-1)*3});function Sf(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}v("D",["DD",2],"Do","date"),w("D",W,ht),w("DD",W,ce),w("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),U(["D","DD"],De),U("Do",function(e,t){t[De]=C(e.match(W)[0])});var Fi=pt("Date",!0);v("DDD",["DDDD",3],"DDDo","dayOfYear"),w("DDD",ln),w("DDDD",ii),U(["DDD","DDDD"],function(e,t,n){n._dayOfYear=C(e)});function kf(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}v("m",["mm",2],0,"minute"),w("m",W,ur),w("mm",W,ce),U(["m","mm"],we);var bf=pt("Minutes",!1);v("s",["ss",2],0,"second"),w("s",W,ur),w("ss",W,ce),U(["s","ss"],Pe);var Ef=pt("Seconds",!1);v("S",0,0,function(){return~~(this.millisecond()/100)}),v(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),v(0,["SSS",3],0,"millisecond"),v(0,["SSSS",4],0,function(){return this.millisecond()*10}),v(0,["SSSSS",5],0,function(){return this.millisecond()*100}),v(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),v(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),v(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),v(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),w("S",ln,si),w("SS",ln,ce),w("SSS",ln,ii);var Ke,Yi;for(Ke="SSSS";Ke.length<=9;Ke+="S")w(Ke,ft);function vf(e,t){t[et]=C(("0."+e)*1e3)}for(Ke="S";Ke.length<=9;Ke+="S")U(Ke,vf);Yi=pt("Milliseconds",!1),v("z",0,0,"zoneAbbr"),v("zz",0,0,"zoneName");function Of(){return this._isUTC?"UTC":""}function Df(){return this._isUTC?"Coordinated Universal Time":""}var m=Pt.prototype;m.add=_u,m.calendar=vu,m.clone=Ou,m.diff=Ru,m.endOf=Uu,m.format=Iu,m.from=Bu,m.fromNow=Au,m.to=Fu,m.toNow=Yu,m.get=xc,m.invalidAt=Ju,m.isAfter=Du,m.isBefore=Nu,m.isBetween=Tu,m.isSame=Mu,m.isSameOrAfter=Vu,m.isSameOrBefore=Cu,m.isValid=qu,m.lang=$i,m.locale=Ri,m.localeData=Pi,m.max=qd,m.min=Kd,m.parsingFlags=Zu,m.set=Ic,m.startOf=Lu,m.subtract=yu,m.toArray=Gu,m.toObject=zu,m.toDate=Hu,m.toISOString=Pu,m.inspect=xu,typeof Symbol<"u"&&Symbol.for!=null&&(m[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),m.toJSON=Ku,m.toString=$u,m.unix=ju,m.valueOf=Wu,m.creationData=Qu,m.eraName=nf,m.eraNarrow=rf,m.eraAbbr=sf,m.eraYear=of,m.year=li,m.isLeapYear=Pc,m.weekYear=hf,m.isoWeekYear=pf,m.quarter=m.quarters=Sf,m.month=hi,m.daysInMonth=Hc,m.week=m.weeks=Xc,m.isoWeek=m.isoWeeks=ed,m.weeksInYear=_f,m.weeksInWeekYear=yf,m.isoWeeksInYear=mf,m.isoWeeksInISOWeekYear=gf,m.date=Fi,m.day=m.days=hd,m.weekday=pd,m.isoWeekday=md,m.dayOfYear=kf,m.hour=m.hours=bd,m.minute=m.minutes=bf,m.second=m.seconds=Ef,m.millisecond=m.milliseconds=Yi,m.utcOffset=su,m.utc=ou,m.local=au,m.parseZone=lu,m.hasAlignedHourOffset=cu,m.isDST=du,m.isLocal=fu,m.isUtcOffset=hu,m.isUtc=Ni,m.isUTC=Ni,m.zoneAbbr=Of,m.zoneName=Df,m.dates=ue("dates accessor is deprecated. Use date instead.",Fi),m.months=ue("months accessor is deprecated. Use month instead",hi),m.years=ue("years accessor is deprecated. Use year instead",li),m.zone=ue("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",iu),m.isDSTShifted=ue("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",uu);function Nf(e){return j(e*1e3)}function Tf(){return j.apply(null,arguments).parseZone()}function Li(e){return e}var F=sr.prototype;F.calendar=fc,F.longDateFormat=gc,F.invalidDate=yc,F.ordinal=kc,F.preparse=Li,F.postformat=Li,F.relativeTime=Ec,F.pastFuture=vc,F.set=dc,F.eras=Xu,F.erasParse=ef,F.erasConvertYear=tf,F.erasAbbrRegex=lf,F.erasNameRegex=af,F.erasNarrowRegex=cf,F.months=Lc,F.monthsShort=Uc,F.monthsParse=jc,F.monthsRegex=zc,F.monthsShortRegex=Gc,F.week=qc,F.firstDayOfYear=Qc,F.firstDayOfWeek=Jc,F.weekdays=ld,F.weekdaysMin=dd,F.weekdaysShort=cd,F.weekdaysParse=fd,F.weekdaysRegex=gd,F.weekdaysShortRegex=_d,F.weekdaysMinRegex=yd,F.isPM=Sd,F.meridiem=Ed;function En(e,t,n,r){var i=Ie(),o=Ee().set(r,t);return i[n](o,e)}function Ui(e,t,n){if(Ce(e)&&(t=e,e=void 0),e=e||"",t!=null)return En(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=En(e,r,n,"month");return i}function Tr(e,t,n,r){typeof e=="boolean"?(Ce(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Ce(t)&&(n=t,t=void 0),t=t||"");var i=Ie(),o=e?i._week.dow:0,a,l=[];if(n!=null)return En(t,(n+o)%7,r,"day");for(a=0;a<7;a++)l[a]=En(t,(a+o)%7,r,"day");return l}function Mf(e,t){return Ui(e,t,"months")}function Vf(e,t){return Ui(e,t,"monthsShort")}function Cf(e,t,n){return Tr(e,t,n,"weekdays")}function Rf(e,t,n){return Tr(e,t,n,"weekdaysShort")}function $f(e,t,n){return Tr(e,t,n,"weekdaysMin")}ze("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=C(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),_.lang=ue("moment.lang is deprecated. Use moment.locale instead.",ze),_.langData=ue("moment.langData is deprecated. Use moment.localeData instead.",Ie);var Be=Math.abs;function Pf(){var e=this._data;return this._milliseconds=Be(this._milliseconds),this._days=Be(this._days),this._months=Be(this._months),e.milliseconds=Be(e.milliseconds),e.seconds=Be(e.seconds),e.minutes=Be(e.minutes),e.hours=Be(e.hours),e.months=Be(e.months),e.years=Be(e.years),this}function Wi(e,t,n,r){var i=Se(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function xf(e,t){return Wi(this,e,t,1)}function If(e,t){return Wi(this,e,t,-1)}function ji(e){return e<0?Math.floor(e):Math.ceil(e)}function Bf(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,a,l,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=ji(Mr(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=he(e/1e3),r.seconds=i%60,o=he(i/60),r.minutes=o%60,a=he(o/60),r.hours=a%24,t+=he(a/24),c=he(Hi(t)),n+=c,t-=ji(Mr(c)),l=he(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function Hi(e){return e*4800/146097}function Mr(e){return e*146097/4800}function Af(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=fe(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+Hi(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Mr(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Ae(e){return function(){return this.as(e)}}var Gi=Ae("ms"),Ff=Ae("s"),Yf=Ae("m"),Lf=Ae("h"),Uf=Ae("d"),Wf=Ae("w"),jf=Ae("M"),Hf=Ae("Q"),Gf=Ae("y"),zf=Gi;function Kf(){return Se(this)}function qf(e){return e=fe(e),this.isValid()?this[e+"s"]():NaN}function nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Zf=nt("milliseconds"),Jf=nt("seconds"),Qf=nt("minutes"),Xf=nt("hours"),eh=nt("days"),th=nt("months"),nh=nt("years");function rh(){return he(this.days()/7)}var Fe=Math.round,yt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sh(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ih(e,t,n,r){var i=Se(e).abs(),o=Fe(i.as("s")),a=Fe(i.as("m")),l=Fe(i.as("h")),c=Fe(i.as("d")),u=Fe(i.as("M")),d=Fe(i.as("w")),h=Fe(i.as("y")),f=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(f=f||d<=1&&["w"]||d<n.w&&["ww",d]),f=f||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h],f[2]=t,f[3]=+e>0,f[4]=r,sh.apply(null,f)}function oh(e){return e===void 0?Fe:typeof e=="function"?(Fe=e,!0):!1}function ah(e,t){return yt[e]===void 0?!1:t===void 0?yt[e]:(yt[e]=t,e==="s"&&(yt.ss=t-1),!0)}function lh(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=yt,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},yt,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=ih(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var Vr=Math.abs;function wt(e){return(e>0)-(e<0)||+e}function vn(){if(!this.isValid())return this.localeData().invalidDate();var e=Vr(this._milliseconds)/1e3,t=Vr(this._days),n=Vr(this._months),r,i,o,a,l=this.asSeconds(),c,u,d,h;return l?(r=he(e/60),i=he(r/60),e%=60,r%=60,o=he(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",u=wt(this._months)!==wt(l)?"-":"",d=wt(this._days)!==wt(l)?"-":"",h=wt(this._milliseconds)!==wt(l)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?h+i+"H":"")+(r?h+r+"M":"")+(e?h+a+"S":"")):"P0D"}var x=_n.prototype;x.isValid=eu,x.abs=Pf,x.add=xf,x.subtract=If,x.as=Af,x.asMilliseconds=Gi,x.asSeconds=Ff,x.asMinutes=Yf,x.asHours=Lf,x.asDays=Uf,x.asWeeks=Wf,x.asMonths=jf,x.asQuarters=Hf,x.asYears=Gf,x.valueOf=zf,x._bubble=Bf,x.clone=Kf,x.get=qf,x.milliseconds=Zf,x.seconds=Jf,x.minutes=Qf,x.hours=Xf,x.days=eh,x.weeks=rh,x.months=th,x.years=nh,x.humanize=lh,x.toISOString=vn,x.toString=vn,x.toJSON=vn,x.locale=Ri,x.localeData=Pi,x.toIsoString=ue("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",vn),x.lang=$i,v("X",0,0,"unix"),v("x",0,0,"valueOf"),w("x",dn),w("X",Tc),U("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),U("x",function(e,t,n){n._d=new Date(C(e))});//! moment.js
45
- _.version="2.30.1",lc(j),_.fn=m,_.min=Zd,_.max=Jd,_.now=Qd,_.utc=Ee,_.unix=Nf,_.months=Mf,_.isDate=$t,_.locale=ze,_.invalid=rn,_.duration=Se,_.isMoment=ye,_.weekdays=Cf,_.parseZone=Tf,_.localeData=Ie,_.isDuration=yn,_.monthsShort=Vf,_.weekdaysMin=$f,_.defineLocale=_r,_.updateLocale=Nd,_.locales=Td,_.weekdaysShort=Rf,_.normalizeUnits=fe,_.relativeTimeRounding=oh,_.relativeTimeThreshold=ah,_.calendarFormat=Eu,_.prototype=m,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const ch=["title"],Cr=s.defineComponent({__name:"CapeSingleValue",props:{fieldValuePair:{},link:{}},setup(e){const t=e,n=s.computed(()=>t.fieldValuePair.value),r=s.computed(()=>t.fieldValuePair.field),i=s.computed(()=>{let o=`${t.fieldValuePair.value}`;return t.fieldValuePair.field.type=="date"&&(o=_(o).format("dddd, D MMMM YYYY")),o});return(o,a)=>{const l=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("span",{class:"cape-single-value",title:r.value.description},[o.link?(s.openBlock(),s.createBlock(l,{key:0,to:r.value.id+"/"+n.value},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value),1)]),_:1},8,["to"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(i.value),1)],64))],8,ch)}}}),dh={key:0,class:"cape-error cape-value-error"},uh={key:1,class:"cape-value"},fh={key:0,class:"cape-value-null"},hh={key:0,class:"cape-value-multiple"},zi=s.defineComponent({__name:"CapeValue",props:{fieldValue:{},link:{},hideIfEmpty:{}},setup(e){const t=e,n=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.value}),r=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.field}),i=s.computed(()=>n.value===void 0||n.value===""||Array.isArray(n)&&n.value.length===0);return(o,a)=>!o.fieldValue||!r.value?(s.openBlock(),s.createElementBlock("div",dh," [Error: field value pair does not exist!] ")):!o.hideIfEmpty||!i.value?(s.openBlock(),s.createElementBlock("div",uh,[i.value?(s.openBlock(),s.createElementBlock("div",fh,"undefined")):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass("cape-value cape-value-field-"+r.value.id)},[r.value.isMultiple?(s.openBlock(),s.createElementBlock("ol",hh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(l,c)=>(s.openBlock(),s.createElementBlock("li",{key:c},[s.createVNode(Cr,{"field-value-pair":{field:r.value,value:l},link:o.link},null,8,["field-value-pair","link"])]))),128))])):(s.openBlock(),s.createBlock(Cr,{key:1,"field-value-pair":o.fieldValue,link:o.link},null,8,["field-value-pair","link"]))],2))])):s.createCommentVNode("",!0)}}),ph={key:0,class:"cape-labelled-value"},mh={key:0,class:"cape-error cape-labelled-value-error"},gh=["title"],_h={key:1,class:"cape-labelled-value-label"},yh=s.defineComponent({__name:"CapeLabelledValue",props:{fieldValue:{},link:{},hideIfEmpty:{}},setup(e){const t=e,n=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.value}),r=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.field}),i=s.computed(()=>n.value===void 0||n.value===""||Array.isArray(n)&&n.value.length===0);return(o,a)=>!o.hideIfEmpty||!i.value?(s.openBlock(),s.createElementBlock("div",ph,[!o.fieldValue||!r.value?(s.openBlock(),s.createElementBlock("div",mh," [Error, trying to render non-existent field] ")):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[r.value.description!==void 0&&r.value.description!==""?(s.openBlock(),s.createElementBlock("div",{key:0,title:r.value.description,class:"cape-labelled-value-label","data-toggle":"tooltip"},s.toDisplayString(r.value.label),9,gh)):(s.openBlock(),s.createElementBlock("div",_h,s.toDisplayString(r.value.label),1)),s.createVNode(zi,{link:o.link,"field-value":o.fieldValue},null,8,["link","field-value"])],64))])):s.createCommentVNode("",!0)}}),wh={class:"cape-filter-label"},Sh=["for"],kh={class:"cape-filter-mode"},bh=[s.createElementVNode("option",{value:"contains"},"contains",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],Eh={class:"cape-filter-term"},vh=["id","placeholder"],Oh=["id","placeholder"],Dh=s.defineComponent({__name:"CapeFilterFieldText",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId)),i=s.computed(()=>r.value.field);return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",wh,[s.createElementVNode("label",{for:"cape-filter-field-input-"+r.value.id,"data-test":"filter-label"},s.toDisplayString(r.value.field.label),9,Sh)]),s.createElementVNode("div",kh,[r.value.field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.mode=l),"data-test":"filter-mode-select","aria-label":"Filter mode"},bh,512)),[[s.vModelSelect,r.value.mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",Eh,[r.value.mode==="contains"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,id:"cape-filter-field-input-"+r.value.id,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.term=l),placeholder:i.value.placeholderContains,class:"cape-filter-field-text-term","data-test":"filter-term-input"},null,8,vh)),[[s.vModelText,r.value.term]]):s.createCommentVNode("",!0),r.value.mode==="is"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:"cape-filter-field-input-"+r.value.id,"onUpdate:modelValue":a[2]||(a[2]=l=>r.value.term=l),placeholder:i.value.placeholderIs,class:"cape-filter-field-text-term","data-test":"filter-term-input"},null,8,Oh)),[[s.vModelText,r.value.term]]):s.createCommentVNode("",!0)])],64))}}),Nh={class:"cape-filter-label"},Th=["for"],Mh={class:"cape-filter-wide-term"},Vh=["id","placeholder"],Ch=s.defineComponent({__name:"CapeFilterFreeText",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId));return(i,o)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Nh,[s.createElementVNode("label",{for:"cape-filter-input-"+r.value.id},"Free text",8,Th)]),s.createElementVNode("div",Mh,[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-input-"+r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.term=a),placeholder:r.value.placeholder,class:"cape-filter-freetext-term","data-test":"filter-term-input"},null,8,Vh),[[s.vModelText,r.value.term]])])],64))}}),Rh={class:"cape-filter-field-enum-one-of-checkbox"},$h=["id","value"],Ph=["for"],xh=s.defineComponent({__name:"CapeFilterFieldEnumOneOfCheckbox",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createElementBlock("ul",Rh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i).values,l=>(s.openBlock(),s.createElementBlock("li",{key:l},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-"+s.unref(r).id+"-"+l,"onUpdate:modelValue":a[0]||(a[0]=c=>s.unref(r).oneOfTerms=c),value:l,type:"checkbox"},null,8,$h),[[s.vModelCheckbox,s.unref(r).oneOfTerms]]),s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id+"-"+l},s.toDisplayString(l),9,Ph)]))),128))]))}});function Rr(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function Ih(e){return(...t)=>!e(...t)}function Bh(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function Ki(e,t,n,r){return t?e.filter(i=>Bh(r(i,n),t)).sort((i,o)=>r(i,n).length-r(o,n).length):e}function Ah(e){return e.filter(t=>!t.$isLabel)}function $r(e,t){return n=>n.reduce((r,i)=>i[e]&&i[e].length?(r.push({$groupLabel:i[t],$isLabel:!0}),r.concat(i[e])):r,[])}function Fh(e,t,n,r,i){return o=>o.map(a=>{if(!a[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const l=Ki(a[n],e,t,i);return l.length?{[r]:a[r],[n]:l}:[]})}const qi=(...e)=>t=>e.reduce((n,r)=>r(n),t);var Yh={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Rr(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):Ki(n,t,this.label,this.customLabel):n=this.groupValues?$r(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(Ih(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return qi(Fh(t,n,this.groupValues,this.groupLabel,this.customLabel),$r(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return qi($r(this.groupValues,this.groupLabel),Ah)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Rr(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Rr(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.internalValue.filter(r=>t[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",n)}else{let n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},Lh={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},Zi={name:"vue-multiselect",mixins:[Yh,Lh],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const Uh={ref:"tags",class:"multiselect__tags"},Wh={class:"multiselect__tags-wrap"},jh={class:"multiselect__spinner"},Hh={key:0},Gh={class:"multiselect__option"},zh={class:"multiselect__option"},Kh=s.createTextVNode("No elements found. Consider changing the search query."),qh={class:"multiselect__option"},Zh=s.createTextVNode("List is empty.");function Jh(e,t,n,r,i,o){return s.openBlock(),s.createBlock("div",{tabindex:e.searchable?-1:n.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":o.isAbove,"multiselect--has-options-group":o.hasOptionGroup},"multiselect"],onFocus:t[14]||(t[14]=a=>e.activate()),onBlur:t[15]||(t[15]=a=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=s.withKeys(s.withModifiers(a=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=s.withKeys(s.withModifiers(a=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=s.withKeys(s.withModifiers(a=>e.addPointerElement(a),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=s.withKeys(a=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[s.renderSlot(e.$slots,"caret",{toggle:e.toggle},()=>[s.createVNode("div",{onMousedown:t[1]||(t[1]=s.withModifiers(a=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),s.renderSlot(e.$slots,"clear",{search:e.search}),s.createVNode("div",Uh,[s.renderSlot(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:o.visibleValues,isOpen:e.isOpen},()=>[s.withDirectives(s.createVNode("div",Wh,[(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(o.visibleValues,(a,l)=>s.renderSlot(e.$slots,"tag",{option:a,search:e.search,remove:e.removeElement},()=>[(s.openBlock(),s.createBlock("span",{class:"multiselect__tag",key:l},[s.createVNode("span",{textContent:s.toDisplayString(e.getOptionLabel(a))},null,8,["textContent"]),s.createVNode("i",{tabindex:"1",onKeypress:s.withKeys(s.withModifiers(c=>e.removeElement(a),["prevent"]),["enter"]),onMousedown:s.withModifiers(c=>e.removeElement(a),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[s.vShow,o.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?s.renderSlot(e.$slots,"limit",{key:0},()=>[s.createVNode("strong",{class:"multiselect__strong",textContent:s.toDisplayString(n.limitText(e.internalValue.length-n.limit))},null,8,["textContent"])]):s.createCommentVNode("v-if",!0)]),s.createVNode(s.Transition,{name:"multiselect__loading"},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"loading",{},()=>[s.withDirectives(s.createVNode("div",jh,null,512),[[s.vShow,n.loading]])])]),_:3}),e.searchable?(s.openBlock(),s.createBlock("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:!1,placeholder:e.placeholder,style:o.inputStyle,value:e.search,disabled:n.disabled,tabindex:n.tabindex,onInput:t[2]||(t[2]=a=>e.updateSearch(a.target.value)),onFocus:t[3]||(t[3]=s.withModifiers(a=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=s.withModifiers(a=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=s.withKeys(a=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=s.withKeys(s.withModifiers(a=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=s.withKeys(s.withModifiers(a=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=s.withKeys(s.withModifiers(a=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=s.withKeys(s.withModifiers(a=>e.addPointerElement(a),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):s.createCommentVNode("v-if",!0),o.isSingleLabelVisible?(s.openBlock(),s.createBlock("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=s.withModifiers((...a)=>e.toggle&&e.toggle(...a),["prevent"]))},[s.renderSlot(e.$slots,"singleLabel",{option:o.singleValue},()=>[s.createTextVNode(s.toDisplayString(e.currentOptionLabel),1)])],32)):s.createCommentVNode("v-if",!0),o.isPlaceholderVisible?(s.openBlock(),s.createBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=s.withModifiers((...a)=>e.toggle&&e.toggle(...a),["prevent"]))},[s.renderSlot(e.$slots,"placeholder",{},()=>[s.createTextVNode(s.toDisplayString(e.placeholder),1)])],32)):s.createCommentVNode("v-if",!0)],512),s.createVNode(s.Transition,{name:"multiselect"},{default:s.withCtx(()=>[s.withDirectives(s.createVNode("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...a)=>e.activate&&e.activate(...a)),tabindex:"-1",onMousedown:t[13]||(t[13]=s.withModifiers(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[s.createVNode("ul",{class:"multiselect__content",style:o.contentStyle,role:"listbox",id:"listbox-"+e.id},[s.renderSlot(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(s.openBlock(),s.createBlock("li",Hh,[s.createVNode("span",Gh,[s.renderSlot(e.$slots,"maxElements",{},()=>[s.createTextVNode("Maximum of "+s.toDisplayString(e.max)+" options selected. First remove a selected option to select another.",1)])])])):s.createCommentVNode("v-if",!0),!e.max||e.internalValue.length<e.max?(s.openBlock(!0),s.createBlock(s.Fragment,{key:1},s.renderList(e.filteredOptions,(a,l)=>(s.openBlock(),s.createBlock("li",{class:"multiselect__element",key:l,id:e.id+"-"+l,role:a&&(a.$isLabel||a.$isDisabled)?null:"option"},[a&&(a.$isLabel||a.$isDisabled)?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createBlock("span",{key:0,class:[e.optionHighlight(l,a),"multiselect__option"],onClick:s.withModifiers(c=>e.select(a),["stop"]),onMouseenter:s.withModifiers(c=>e.pointerSet(l),["self"]),"data-select":a&&a.isTag?e.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[s.renderSlot(e.$slots,"option",{option:a,search:e.search,index:l},()=>[s.createVNode("span",null,s.toDisplayString(e.getOptionLabel(a)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),a&&(a.$isLabel||a.$isDisabled)?(s.openBlock(),s.createBlock("span",{key:1,"data-select":e.groupSelect&&o.selectGroupLabelText,"data-deselect":e.groupSelect&&o.deselectGroupLabelText,class:[e.groupHighlight(l,a),"multiselect__option"],onMouseenter:s.withModifiers(c=>e.groupSelect&&e.pointerSet(l),["self"]),onMousedown:s.withModifiers(c=>e.selectGroup(a),["prevent"])},[s.renderSlot(e.$slots,"option",{option:a,search:e.search,index:l},()=>[s.createVNode("span",null,s.toDisplayString(e.getOptionLabel(a)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):s.createCommentVNode("v-if",!0)],8,["id","role"]))),128)):s.createCommentVNode("v-if",!0),s.withDirectives(s.createVNode("li",null,[s.createVNode("span",zh,[s.renderSlot(e.$slots,"noResult",{search:e.search},()=>[Kh])])],512),[[s.vShow,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),s.withDirectives(s.createVNode("li",null,[s.createVNode("span",qh,[s.renderSlot(e.$slots,"noOptions",{},()=>[Zh])])],512),[[s.vShow,n.showNoOptions&&(e.options.length===0||o.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!n.loading]]),s.renderSlot(e.$slots,"afterList")],12,["id"])],36),[[s.vShow,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}Zi.render=Jh;const Qh=s.defineComponent({__name:"CapeFilterFieldEnumOneOfMultiselect",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createBlock(s.unref(Zi),{id:"filter-multiselect-"+s.unref(i).id,modelValue:s.unref(r).oneOfTerms,"onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).oneOfTerms=l),"clear-on-select":!1,"close-on-select":!0,multiple:!0,options:s.unref(i).values,"preserve-search":!0,placeholder:"Select (1 or more)"},null,8,["id","modelValue","options"]))}}),Xh=["aria-label"],ep=s.createElementVNode("option",{key:"",value:""},null,-1),tp=["value"],np=s.defineComponent({__name:"CapeFilterFieldEnumIsSelect",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>s.withDirectives((s.openBlock(),s.createElementBlock("select",{class:"cape-filter-field-enum-is-select","onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).isTerm=l),"aria-label":"Select "+s.unref(i).label+" value."},[ep,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i).values,l=>(s.openBlock(),s.createElementBlock("option",{key:l,value:l},s.toDisplayString(l),9,tp))),128))],8,Xh)),[[s.vModelSelect,s.unref(r).isTerm]])}}),rp={class:"cape-filter-field-enum-is-radio"},sp={class:"form-check form-check-inline"},ip=["id"],op=["for"],ap=[s.createElementVNode("em",null,"any",-1)],lp=["id","value"],cp=["for"],dp=s.defineComponent({__name:"CapeFilterFieldEnumIsRadio",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createElementBlock("ul",rp,[s.createElementVNode("li",sp,[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-"+s.unref(r).id+"-","onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).isTerm=l),type:"radio",value:""},null,8,ip),[[s.vModelRadio,s.unref(r).isTerm]]),s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id+"-"},ap,8,op)]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i).values,l=>(s.openBlock(),s.createElementBlock("li",{key:l},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-"+s.unref(r).id+"-"+l,"onUpdate:modelValue":a[1]||(a[1]=c=>s.unref(r).isTerm=c),value:l,type:"radio"},null,8,lp),[[s.vModelRadio,s.unref(r).isTerm]]),s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id+"-"+l},s.toDisplayString(l),9,cp)]))),128))]))}}),up={class:"cape-filter-label"},fp=["for"],hp={class:"cape-filter-mode"},pp=[s.createElementVNode("option",{value:"oneOf"},"is one of",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],mp={class:"cape-filter-term"},gp=s.defineComponent({__name:"CapeFilterFieldEnum",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",up,[s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id,"data-test":"filter-label"},s.toDisplayString(s.unref(r).field.label),9,fp)]),s.createElementVNode("div",hp,[s.unref(r).field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).mode=l),"data-test":"filter-mode-select","aria-label":"Filter mode"},pp,512)),[[s.vModelSelect,s.unref(r).mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",mp,[s.unref(r).mode==="oneOf"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.unref(i).filterInputStyleOnOneOf==="checkbox"?(s.openBlock(),s.createBlock(xh,{key:0,"filter-id":o.filterId},null,8,["filter-id"])):(s.openBlock(),s.createBlock(Qh,{key:1,"filter-id":o.filterId},null,8,["filter-id"]))],64)):s.createCommentVNode("",!0),s.unref(r).mode==="is"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.unref(i).filterInputStyleOnIs==="select"?(s.openBlock(),s.createBlock(np,{key:0,"filter-id":o.filterId},null,8,["filter-id"])):(s.openBlock(),s.createBlock(dp,{key:1,"filter-id":o.filterId},null,8,["filter-id"]))],64)):s.createCommentVNode("",!0)])],64))}}),_p={class:"cape-filter-label"},yp=["for"],wp={class:"cape-filter-mode"},Sp=[s.createElementVNode("option",{value:"between"},"between",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],kp={class:"cape-filter-term"},bp=["id","placeholder","min","max","step"],Ep=s.createElementVNode("span",{class:"cape-filter-field-integer-term-term-and"},"and",-1),vp=["id","placeholder","min","max","step"],Op=["id","placeholder","min","max","step"],Dp=s.defineComponent({__name:"CapeFilterFieldInteger",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId)),i=s.computed(()=>r.value.field);return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",_p,[s.createElementVNode("label",{for:"cape-filter-field-input-"+r.value.id,"data-test":"filter-label"},s.toDisplayString(r.value.field.label),9,yp)]),s.createElementVNode("div",wp,[r.value.field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.mode=l),"data-test":"filter-mode-select","aria-label":"Filter mode"},Sp,512)),[[s.vModelSelect,r.value.mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",kp,[r.value.mode==="between"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-lower-bound-"+r.value.id,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.lowerBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[0]:"",type:"number",min:i.value.min,max:i.value.max,step:i.value.step,class:"cape-filter-field-integer-term-lower-bound","data-test":"filter-term-input-lower-bound"},null,8,bp),[[s.vModelText,r.value.lowerBoundTerm]]),Ep,s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-upper-bound-"+r.value.id,"onUpdate:modelValue":a[2]||(a[2]=l=>r.value.upperBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[1]:"",type:"number",min:i.value.min,max:i.value.max,step:i.value.step,class:"cape-filter-field-integer-term-upper-bound","data-test":"filter-term-input-upper-bound"},null,8,vp),[[s.vModelText,r.value.upperBoundTerm]])],64)):s.createCommentVNode("",!0),r.value.mode==="is"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:"cape-filter-field-input-"+r.value.id,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value.isTerm=l),placeholder:i.value.placeholderIs,type:"number",min:i.value.min,max:i.value.max,step:i.value.step,class:"cape-filter-field-integer-term","data-test":"filter-term-input"},null,8,Op)),[[s.vModelText,r.value.isTerm]]):s.createCommentVNode("",!0)])],64))}}),Np={class:"cape-filter-label"},Tp=["for"],Mp={class:"cape-filter-mode"},Vp=[s.createElementVNode("option",{value:"between"},"between",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],Cp={class:"cape-filter-term"},Rp=["id","placeholder"],$p=s.createElementVNode("span",{class:"cape-filter-field-date-term-term-and"},"and",-1),Pp=["id","placeholder"],xp=["id","placeholder"],Ip=s.defineComponent({__name:"CapeFilterFieldDate",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId)),i=s.computed(()=>r.value.field);return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Np,[s.createElementVNode("label",{for:"cape-filter-field-input-"+r.value.id,"data-test":"filter-label"},s.toDisplayString(r.value.field.label),9,Tp)]),s.createElementVNode("div",Mp,[r.value.field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.mode=l),"data-test":"filter-mode-select"},Vp,512)),[[s.vModelSelect,r.value.mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",Cp,[r.value.mode==="between"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-lower-bound-"+r.value.id,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.lowerBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[0]:"",class:"cape-filter-field-date-term-term-lower-bound","data-test":"filter-term-input-lower-bound"},null,8,Rp),[[s.vModelText,r.value.lowerBoundTerm]]),$p,s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-upper-bound-"+r.value.id,"onUpdate:modelValue":a[2]||(a[2]=l=>r.value.upperBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[1]:"",class:"cape-filter-field-date-term-term-upper-bound","data-test":"filter-term-input-upper-bound"},null,8,Pp),[[s.vModelText,r.value.upperBoundTerm]])],64)):s.createCommentVNode("",!0),r.value.mode==="is"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:"cape-filter-field-input-"+r.value.id,type:"date","onUpdate:modelValue":a[3]||(a[3]=l=>r.value.isTerm=l),placeholder:i.value.placeholderIs,class:"cape-filter-field-date-term-term","data-test":"filter-term-input"},null,8,xp)),[[s.vModelText,r.value.isTerm]]):s.createCommentVNode("",!0)])],64))}}),Ji={install:function(e,t){e.use(sl),e.use(Ha()),e.provide("capeOptions",t),this.addCapeComponents(e,t),t.additionalComponents!==void 0&&this.addAdditionalComponents(e,t.additionalComponents)},addAdditionalComponents:function(e,t){Object.keys(t).forEach(function(n){e.component(n,t[n])})},addCapeComponents:function(e,t){e.component("CapeRoot",Hs),e.component("CapeAdvancedSearchToggle",Tl),e.component("CapeFilters",Vl),e.component("CapeFormResetButton",Cl),e.component("CapeHeader",Gs),e.component("CapeHomePage",Bs),e.component("CapeHomepageLayout",Is),e.component("CapeLoadError",Ls),e.component("CapeLoading",zs),e.component("CapeNavigation",Ys),e.component("CapeNonProdWarning",jl),e.component("CapeRecordCount",Nl),e.component("CapeRecordCard",As),e.component("CapeRecordPage",Fs),e.component("CapeResults",ac),e.component("CapeSummaryCard",Ks),e.component("CapeLabelledValue",yh),e.component("CapeValue",zi),e.component("CapeSingleValue",Cr),e.component("CapeFilterFieldText",Dh),e.component("CapeFilterFieldEnum",gp),e.component("CapeFilterFreeText",Ch),e.component("CapeFilterFieldInteger",Dp),e.component("CapeFilterFieldDate",Ip),e.component("CapeSortOrder",qs),e.component("CapeResultsControls",Jn),t.additionalComponents!==void 0&&Object.keys(t.additionalComponents).forEach(function(n){t.additionalComponents!==void 0&&e.component(n,t.additionalComponents[n])})}},Bp={template:"#templateCapeFooter"},Ap=s.defineComponent({__name:"App",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Gs),(s.openBlock(),s.createBlock(s.Suspense,null,{default:s.withCtx(()=>[s.createVNode(Hs)]),fallback:s.withCtx(()=>[s.createVNode(zs)]),_:1})),s.createVNode(Bp)],64))}}),Fp=e=>{const t=s.createApp(Ap);return t.use(Ji,e),t};J.CapePlugin=Ji,J.Filter=qn,J.createCapeApp=Fp,J.useDatasetStore=Ct,J.useFieldStore=en,J.useFilterStore=K,J.usePropertyStore=Kn,J.useSearchResultsStore=He,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
45
+ _.version="2.30.1",lc(j),_.fn=m,_.min=Zd,_.max=Jd,_.now=Qd,_.utc=Ee,_.unix=Nf,_.months=Mf,_.isDate=$t,_.locale=ze,_.invalid=rn,_.duration=Se,_.isMoment=ye,_.weekdays=Cf,_.parseZone=Tf,_.localeData=Ie,_.isDuration=yn,_.monthsShort=Vf,_.weekdaysMin=$f,_.defineLocale=_r,_.updateLocale=Nd,_.locales=Td,_.weekdaysShort=Rf,_.normalizeUnits=fe,_.relativeTimeRounding=oh,_.relativeTimeThreshold=ah,_.calendarFormat=Eu,_.prototype=m,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const ch=["title"],Cr=s.defineComponent({__name:"CapeSingleValue",props:{fieldValuePair:{},link:{}},setup(e){const t=e,n=s.computed(()=>t.fieldValuePair.value),r=s.computed(()=>t.fieldValuePair.field),i=s.computed(()=>{let o=`${t.fieldValuePair.value}`;return t.fieldValuePair.field.type=="date"&&(o=_(o).format("dddd, D MMMM YYYY")),o});return(o,a)=>{const l=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("span",{class:"cape-single-value",title:r.value.description},[o.link?(s.openBlock(),s.createBlock(l,{key:0,to:r.value.id+"/"+n.value},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.value),1)]),_:1},8,["to"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(i.value),1)],64))],8,ch)}}}),dh={key:0,class:"cape-error cape-value-error"},uh={key:1,class:"cape-value"},fh={key:0,class:"cape-value-null"},hh={key:0,class:"cape-value-multiple"},zi=s.defineComponent({__name:"CapeValue",props:{fieldValue:{},link:{},hideIfEmpty:{}},setup(e){const t=e,n=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.value}),r=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.field}),i=s.computed(()=>n.value===void 0||n.value===""||Array.isArray(n)&&n.value.length===0);return(o,a)=>!o.fieldValue||!r.value?(s.openBlock(),s.createElementBlock("div",dh," [Error: field value pair does not exist!] ")):!o.hideIfEmpty||!i.value?(s.openBlock(),s.createElementBlock("div",uh,[i.value?(s.openBlock(),s.createElementBlock("div",fh,"undefined")):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass("cape-value cape-value-field-"+r.value.id)},[r.value.isMultiple?(s.openBlock(),s.createElementBlock("ol",hh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(l,c)=>(s.openBlock(),s.createElementBlock("li",{key:c},[s.createVNode(Cr,{"field-value-pair":{field:r.value,value:l},link:o.link},null,8,["field-value-pair","link"])]))),128))])):(s.openBlock(),s.createBlock(Cr,{key:1,"field-value-pair":o.fieldValue,link:o.link},null,8,["field-value-pair","link"]))],2))])):s.createCommentVNode("",!0)}}),ph={key:0,class:"cape-labelled-value"},mh={key:0,class:"cape-error cape-labelled-value-error"},gh=["title"],_h={key:1,class:"cape-labelled-value-label"},yh=s.defineComponent({__name:"CapeLabelledValue",props:{fieldValue:{},link:{},hideIfEmpty:{}},setup(e){const t=e,n=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.value}),r=s.computed(()=>{var o;return(o=t.fieldValue)==null?void 0:o.field}),i=s.computed(()=>n.value===void 0||n.value===""||Array.isArray(n)&&n.value.length===0);return(o,a)=>!o.hideIfEmpty||!i.value?(s.openBlock(),s.createElementBlock("div",ph,[!o.fieldValue||!r.value?(s.openBlock(),s.createElementBlock("div",mh," [Error, trying to render non-existent field] ")):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[r.value.description!==void 0&&r.value.description!==""?(s.openBlock(),s.createElementBlock("div",{key:0,title:r.value.description,class:"cape-labelled-value-label","data-toggle":"tooltip"},s.toDisplayString(r.value.label),9,gh)):(s.openBlock(),s.createElementBlock("div",_h,s.toDisplayString(r.value.label),1)),s.createVNode(zi,{link:o.link,"field-value":o.fieldValue},null,8,["link","field-value"])],64))])):s.createCommentVNode("",!0)}}),wh={class:"cape-filter-label"},Sh=["for"],kh={class:"cape-filter-mode"},bh=[s.createElementVNode("option",{value:"contains"},"contains",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],Eh={class:"cape-filter-term"},vh=["id","placeholder"],Oh=["id","placeholder"],Dh=s.defineComponent({__name:"CapeFilterFieldText",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId)),i=s.computed(()=>r.value.field);return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",wh,[s.createElementVNode("label",{for:"cape-filter-field-input-"+r.value.id,"data-test":"filter-label"},s.toDisplayString(r.value.field.label),9,Sh)]),s.createElementVNode("div",kh,[r.value.field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.mode=l),"data-test":"filter-mode-select","aria-label":"Filter mode"},bh,512)),[[s.vModelSelect,r.value.mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",Eh,[r.value.mode==="contains"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,id:"cape-filter-field-input-"+r.value.id,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.term=l),placeholder:i.value.placeholderContains,class:"cape-filter-field-text-term","data-test":"filter-term-input"},null,8,vh)),[[s.vModelText,r.value.term]]):s.createCommentVNode("",!0),r.value.mode==="is"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:"cape-filter-field-input-"+r.value.id,"onUpdate:modelValue":a[2]||(a[2]=l=>r.value.term=l),placeholder:i.value.placeholderIs,class:"cape-filter-field-text-term","data-test":"filter-term-input"},null,8,Oh)),[[s.vModelText,r.value.term]]):s.createCommentVNode("",!0)])],64))}}),Nh={class:"cape-filter-label"},Th=["for"],Mh={class:"cape-filter-wide-term"},Vh=["id","placeholder"],Ch=s.defineComponent({__name:"CapeFilterFreeText",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId));return(i,o)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Nh,[s.createElementVNode("label",{for:"cape-filter-input-"+r.value.id},"Free text",8,Th)]),s.createElementVNode("div",Mh,[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-input-"+r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.term=a),placeholder:r.value.placeholder,class:"cape-filter-freetext-term","data-test":"filter-term-input"},null,8,Vh),[[s.vModelText,r.value.term]])])],64))}}),Rh={class:"cape-filter-field-enum-one-of-checkbox"},$h=["id","value"],Ph=["for"],xh=s.defineComponent({__name:"CapeFilterFieldEnumOneOfCheckbox",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createElementBlock("ul",Rh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i).values,l=>(s.openBlock(),s.createElementBlock("li",{key:l},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-"+s.unref(r).id+"-"+l,"onUpdate:modelValue":a[0]||(a[0]=c=>s.unref(r).oneOfTerms=c),value:l,type:"checkbox"},null,8,$h),[[s.vModelCheckbox,s.unref(r).oneOfTerms]]),s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id+"-"+l},s.toDisplayString(l),9,Ph)]))),128))]))}});function Rr(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function Ih(e){return(...t)=>!e(...t)}function Bh(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function Ki(e,t,n,r){return t?e.filter(i=>Bh(r(i,n),t)).sort((i,o)=>r(i,n).length-r(o,n).length):e}function Ah(e){return e.filter(t=>!t.$isLabel)}function $r(e,t){return n=>n.reduce((r,i)=>i[e]&&i[e].length?(r.push({$groupLabel:i[t],$isLabel:!0}),r.concat(i[e])):r,[])}function Fh(e,t,n,r,i){return o=>o.map(a=>{if(!a[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const l=Ki(a[n],e,t,i);return l.length?{[r]:a[r],[n]:l}:[]})}const qi=(...e)=>t=>e.reduce((n,r)=>r(n),t);var Yh={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Rr(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):Ki(n,t,this.label,this.customLabel):n=this.groupValues?$r(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(Ih(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return qi(Fh(t,n,this.groupValues,this.groupLabel,this.customLabel),$r(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return qi($r(this.groupValues,this.groupLabel),Ah)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Rr(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Rr(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.internalValue.filter(r=>t[this.groupValues].indexOf(r)===-1);this.$emit("update:modelValue",n)}else{let n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},Lh={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},Zi={name:"vue-multiselect",mixins:[Yh,Lh],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}};const Uh={ref:"tags",class:"multiselect__tags"},Wh={class:"multiselect__tags-wrap"},jh={class:"multiselect__spinner"},Hh={key:0},Gh={class:"multiselect__option"},zh={class:"multiselect__option"},Kh=s.createTextVNode("No elements found. Consider changing the search query."),qh={class:"multiselect__option"},Zh=s.createTextVNode("List is empty.");function Jh(e,t,n,r,i,o){return s.openBlock(),s.createBlock("div",{tabindex:e.searchable?-1:n.tabindex,class:[{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":o.isAbove,"multiselect--has-options-group":o.hasOptionGroup},"multiselect"],onFocus:t[14]||(t[14]=a=>e.activate()),onBlur:t[15]||(t[15]=a=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=s.withKeys(s.withModifiers(a=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=s.withKeys(s.withModifiers(a=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=s.withKeys(s.withModifiers(a=>e.addPointerElement(a),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=s.withKeys(a=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[s.renderSlot(e.$slots,"caret",{toggle:e.toggle},()=>[s.createVNode("div",{onMousedown:t[1]||(t[1]=s.withModifiers(a=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),s.renderSlot(e.$slots,"clear",{search:e.search}),s.createVNode("div",Uh,[s.renderSlot(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:o.visibleValues,isOpen:e.isOpen},()=>[s.withDirectives(s.createVNode("div",Wh,[(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(o.visibleValues,(a,l)=>s.renderSlot(e.$slots,"tag",{option:a,search:e.search,remove:e.removeElement},()=>[(s.openBlock(),s.createBlock("span",{class:"multiselect__tag",key:l},[s.createVNode("span",{textContent:s.toDisplayString(e.getOptionLabel(a))},null,8,["textContent"]),s.createVNode("i",{tabindex:"1",onKeypress:s.withKeys(s.withModifiers(c=>e.removeElement(a),["prevent"]),["enter"]),onMousedown:s.withModifiers(c=>e.removeElement(a),["prevent"]),class:"multiselect__tag-icon"},null,40,["onKeypress","onMousedown"])]))])),256))],512),[[s.vShow,o.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?s.renderSlot(e.$slots,"limit",{key:0},()=>[s.createVNode("strong",{class:"multiselect__strong",textContent:s.toDisplayString(n.limitText(e.internalValue.length-n.limit))},null,8,["textContent"])]):s.createCommentVNode("v-if",!0)]),s.createVNode(s.Transition,{name:"multiselect__loading"},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"loading",{},()=>[s.withDirectives(s.createVNode("div",jh,null,512),[[s.vShow,n.loading]])])]),_:3}),e.searchable?(s.openBlock(),s.createBlock("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:!1,placeholder:e.placeholder,style:o.inputStyle,value:e.search,disabled:n.disabled,tabindex:n.tabindex,onInput:t[2]||(t[2]=a=>e.updateSearch(a.target.value)),onFocus:t[3]||(t[3]=s.withModifiers(a=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=s.withModifiers(a=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=s.withKeys(a=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=s.withKeys(s.withModifiers(a=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=s.withKeys(s.withModifiers(a=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=s.withKeys(s.withModifiers(a=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=s.withKeys(s.withModifiers(a=>e.addPointerElement(a),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,["name","id","placeholder","value","disabled","tabindex","aria-controls"])):s.createCommentVNode("v-if",!0),o.isSingleLabelVisible?(s.openBlock(),s.createBlock("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=s.withModifiers((...a)=>e.toggle&&e.toggle(...a),["prevent"]))},[s.renderSlot(e.$slots,"singleLabel",{option:o.singleValue},()=>[s.createTextVNode(s.toDisplayString(e.currentOptionLabel),1)])],32)):s.createCommentVNode("v-if",!0),o.isPlaceholderVisible?(s.openBlock(),s.createBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=s.withModifiers((...a)=>e.toggle&&e.toggle(...a),["prevent"]))},[s.renderSlot(e.$slots,"placeholder",{},()=>[s.createTextVNode(s.toDisplayString(e.placeholder),1)])],32)):s.createCommentVNode("v-if",!0)],512),s.createVNode(s.Transition,{name:"multiselect"},{default:s.withCtx(()=>[s.withDirectives(s.createVNode("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...a)=>e.activate&&e.activate(...a)),tabindex:"-1",onMousedown:t[13]||(t[13]=s.withModifiers(()=>{},["prevent"])),style:{maxHeight:e.optimizedHeight+"px"},ref:"list"},[s.createVNode("ul",{class:"multiselect__content",style:o.contentStyle,role:"listbox",id:"listbox-"+e.id},[s.renderSlot(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(s.openBlock(),s.createBlock("li",Hh,[s.createVNode("span",Gh,[s.renderSlot(e.$slots,"maxElements",{},()=>[s.createTextVNode("Maximum of "+s.toDisplayString(e.max)+" options selected. First remove a selected option to select another.",1)])])])):s.createCommentVNode("v-if",!0),!e.max||e.internalValue.length<e.max?(s.openBlock(!0),s.createBlock(s.Fragment,{key:1},s.renderList(e.filteredOptions,(a,l)=>(s.openBlock(),s.createBlock("li",{class:"multiselect__element",key:l,id:e.id+"-"+l,role:a&&(a.$isLabel||a.$isDisabled)?null:"option"},[a&&(a.$isLabel||a.$isDisabled)?s.createCommentVNode("v-if",!0):(s.openBlock(),s.createBlock("span",{key:0,class:[e.optionHighlight(l,a),"multiselect__option"],onClick:s.withModifiers(c=>e.select(a),["stop"]),onMouseenter:s.withModifiers(c=>e.pointerSet(l),["self"]),"data-select":a&&a.isTag?e.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[s.renderSlot(e.$slots,"option",{option:a,search:e.search,index:l},()=>[s.createVNode("span",null,s.toDisplayString(e.getOptionLabel(a)),1)])],42,["onClick","onMouseenter","data-select","data-selected","data-deselect"])),a&&(a.$isLabel||a.$isDisabled)?(s.openBlock(),s.createBlock("span",{key:1,"data-select":e.groupSelect&&o.selectGroupLabelText,"data-deselect":e.groupSelect&&o.deselectGroupLabelText,class:[e.groupHighlight(l,a),"multiselect__option"],onMouseenter:s.withModifiers(c=>e.groupSelect&&e.pointerSet(l),["self"]),onMousedown:s.withModifiers(c=>e.selectGroup(a),["prevent"])},[s.renderSlot(e.$slots,"option",{option:a,search:e.search,index:l},()=>[s.createVNode("span",null,s.toDisplayString(e.getOptionLabel(a)),1)])],42,["data-select","data-deselect","onMouseenter","onMousedown"])):s.createCommentVNode("v-if",!0)],8,["id","role"]))),128)):s.createCommentVNode("v-if",!0),s.withDirectives(s.createVNode("li",null,[s.createVNode("span",zh,[s.renderSlot(e.$slots,"noResult",{search:e.search},()=>[Kh])])],512),[[s.vShow,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),s.withDirectives(s.createVNode("li",null,[s.createVNode("span",qh,[s.renderSlot(e.$slots,"noOptions",{},()=>[Zh])])],512),[[s.vShow,n.showNoOptions&&(e.options.length===0||o.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!n.loading]]),s.renderSlot(e.$slots,"afterList")],12,["id"])],36),[[s.vShow,e.isOpen]])]),_:3})],42,["tabindex","aria-owns"])}Zi.render=Jh;const Qh=s.defineComponent({__name:"CapeFilterFieldEnumOneOfMultiselect",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createBlock(s.unref(Zi),{id:"filter-multiselect-"+s.unref(i).id,modelValue:s.unref(r).oneOfTerms,"onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).oneOfTerms=l),"clear-on-select":!1,"close-on-select":!0,multiple:!0,options:s.unref(i).values,"preserve-search":!0,placeholder:"Select (1 or more)"},null,8,["id","modelValue","options"]))}}),Xh=["aria-label"],ep=s.createElementVNode("option",{key:"",value:""},null,-1),tp=["value"],np=s.defineComponent({__name:"CapeFilterFieldEnumIsSelect",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>s.withDirectives((s.openBlock(),s.createElementBlock("select",{class:"cape-filter-field-enum-is-select","onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).isTerm=l),"aria-label":"Select "+s.unref(i).label+" value."},[ep,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i).values,l=>(s.openBlock(),s.createElementBlock("option",{key:l,value:l},s.toDisplayString(l),9,tp))),128))],8,Xh)),[[s.vModelSelect,s.unref(r).isTerm]])}}),rp={class:"cape-filter-field-enum-is-radio"},sp={class:"form-check form-check-inline"},ip=["id"],op=["for"],ap=[s.createElementVNode("em",null,"any",-1)],lp=["id","value"],cp=["for"],dp=s.defineComponent({__name:"CapeFilterFieldEnumIsRadio",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createElementBlock("ul",rp,[s.createElementVNode("li",sp,[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-"+s.unref(r).id+"-","onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).isTerm=l),type:"radio",value:""},null,8,ip),[[s.vModelRadio,s.unref(r).isTerm]]),s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id+"-"},ap,8,op)]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(i).values,l=>(s.openBlock(),s.createElementBlock("li",{key:l},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-"+s.unref(r).id+"-"+l,"onUpdate:modelValue":a[1]||(a[1]=c=>s.unref(r).isTerm=c),value:l,type:"radio"},null,8,lp),[[s.vModelRadio,s.unref(r).isTerm]]),s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id+"-"+l},s.toDisplayString(l),9,cp)]))),128))]))}}),up={class:"cape-filter-label"},fp=["for"],hp={class:"cape-filter-mode"},pp=[s.createElementVNode("option",{value:"oneOf"},"is one of",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],mp={class:"cape-filter-term"},gp=s.defineComponent({__name:"CapeFilterFieldEnum",props:{filterId:{}},setup(e){const t=e,r=K().byId(t.filterId),i=r.field;return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",up,[s.createElementVNode("label",{for:"cape-filter-field-input-"+s.unref(r).id,"data-test":"filter-label"},s.toDisplayString(s.unref(r).field.label),9,fp)]),s.createElementVNode("div",hp,[s.unref(r).field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>s.unref(r).mode=l),"data-test":"filter-mode-select","aria-label":"Filter mode"},pp,512)),[[s.vModelSelect,s.unref(r).mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",mp,[s.unref(r).mode==="oneOf"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.unref(i).filterInputStyleOnOneOf==="checkbox"?(s.openBlock(),s.createBlock(xh,{key:0,"filter-id":o.filterId},null,8,["filter-id"])):(s.openBlock(),s.createBlock(Qh,{key:1,"filter-id":o.filterId},null,8,["filter-id"]))],64)):s.createCommentVNode("",!0),s.unref(r).mode==="is"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.unref(i).filterInputStyleOnIs==="select"?(s.openBlock(),s.createBlock(np,{key:0,"filter-id":o.filterId},null,8,["filter-id"])):(s.openBlock(),s.createBlock(dp,{key:1,"filter-id":o.filterId},null,8,["filter-id"]))],64)):s.createCommentVNode("",!0)])],64))}}),_p={class:"cape-filter-label"},yp=["for"],wp={class:"cape-filter-mode"},Sp=[s.createElementVNode("option",{value:"between"},"between",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],kp={class:"cape-filter-term"},bp=["id","placeholder","min","max","step"],Ep=s.createElementVNode("span",{class:"cape-filter-field-integer-term-term-and"},"and",-1),vp=["id","placeholder","min","max","step"],Op=["id","placeholder","min","max","step"],Dp=s.defineComponent({__name:"CapeFilterFieldInteger",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId)),i=s.computed(()=>r.value.field);return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",_p,[s.createElementVNode("label",{for:"cape-filter-field-input-"+r.value.id,"data-test":"filter-label"},s.toDisplayString(r.value.field.label),9,yp)]),s.createElementVNode("div",wp,[r.value.field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.mode=l),"data-test":"filter-mode-select","aria-label":"Filter mode"},Sp,512)),[[s.vModelSelect,r.value.mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",kp,[r.value.mode==="between"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-lower-bound-"+r.value.id,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.lowerBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[0]:"",type:"number",min:i.value.min,max:i.value.max,step:i.value.step,class:"cape-filter-field-integer-term-lower-bound","data-test":"filter-term-input-lower-bound"},null,8,bp),[[s.vModelText,r.value.lowerBoundTerm]]),Ep,s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-upper-bound-"+r.value.id,"onUpdate:modelValue":a[2]||(a[2]=l=>r.value.upperBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[1]:"",type:"number",min:i.value.min,max:i.value.max,step:i.value.step,class:"cape-filter-field-integer-term-upper-bound","data-test":"filter-term-input-upper-bound"},null,8,vp),[[s.vModelText,r.value.upperBoundTerm]])],64)):s.createCommentVNode("",!0),r.value.mode==="is"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:"cape-filter-field-input-"+r.value.id,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value.isTerm=l),placeholder:i.value.placeholderIs,type:"number",min:i.value.min,max:i.value.max,step:i.value.step,class:"cape-filter-field-integer-term","data-test":"filter-term-input"},null,8,Op)),[[s.vModelText,r.value.isTerm]]):s.createCommentVNode("",!0)])],64))}}),Np={class:"cape-filter-label"},Tp=["for"],Mp={class:"cape-filter-mode"},Vp=[s.createElementVNode("option",{value:"between"},"between",-1),s.createElementVNode("option",{value:"is"},"is",-1),s.createElementVNode("option",{value:"set"},"is present",-1),s.createElementVNode("option",{value:"notSet"},"is not present",-1)],Cp={class:"cape-filter-term"},Rp=["id","placeholder"],$p=s.createElementVNode("span",{class:"cape-filter-field-date-term-term-and"},"and",-1),Pp=["id","placeholder"],xp=["id","placeholder"],Ip=s.defineComponent({__name:"CapeFilterFieldDate",props:{filterId:{}},setup(e){const t=e,n=K(),r=s.computed(()=>n.byId(t.filterId)),i=s.computed(()=>r.value.field);return(o,a)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Np,[s.createElementVNode("label",{for:"cape-filter-field-input-"+r.value.id,"data-test":"filter-label"},s.toDisplayString(r.value.field.label),9,Tp)]),s.createElementVNode("div",Mp,[r.value.field.changeFilterMode?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value.mode=l),"data-test":"filter-mode-select"},Vp,512)),[[s.vModelSelect,r.value.mode]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",Cp,[r.value.mode==="between"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-lower-bound-"+r.value.id,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value.lowerBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[0]:"",class:"cape-filter-field-date-term-term-lower-bound","data-test":"filter-term-input-lower-bound"},null,8,Rp),[[s.vModelText,r.value.lowerBoundTerm]]),$p,s.withDirectives(s.createElementVNode("input",{id:"cape-filter-field-input-upper-bound-"+r.value.id,"onUpdate:modelValue":a[2]||(a[2]=l=>r.value.upperBoundTerm=l),placeholder:Array.isArray(i.value.placeholderBetween)?i.value.placeholderBetween[1]:"",class:"cape-filter-field-date-term-term-upper-bound","data-test":"filter-term-input-upper-bound"},null,8,Pp),[[s.vModelText,r.value.upperBoundTerm]])],64)):s.createCommentVNode("",!0),r.value.mode==="is"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,id:"cape-filter-field-input-"+r.value.id,type:"date","onUpdate:modelValue":a[3]||(a[3]=l=>r.value.isTerm=l),placeholder:i.value.placeholderIs,class:"cape-filter-field-date-term-term","data-test":"filter-term-input"},null,8,xp)),[[s.vModelText,r.value.isTerm]]):s.createCommentVNode("",!0)])],64))}}),Ji={install:function(e,t){e.use(sl),e.use(Ha()),e.provide("capeOptions",t),this.addCapeComponents(e,t),t.additionalComponents!==void 0&&this.addAdditionalComponents(e,t.additionalComponents)},addAdditionalComponents:function(e,t){Object.keys(t).forEach(n=>{e.component(n,t[n])})},addCapeComponents:function(e,t){e.component("CapeRoot",Hs),e.component("CapeAdvancedSearchToggle",Tl),e.component("CapeFilters",Vl),e.component("CapeFormResetButton",Cl),e.component("CapeHeader",Gs),e.component("CapeHomePage",Bs),e.component("CapeHomepageLayout",Is),e.component("CapeLoadError",Ls),e.component("CapeLoading",zs),e.component("CapeNavigation",Ys),e.component("CapeNonProdWarning",jl),e.component("CapeRecordCount",Nl),e.component("CapeRecordCard",As),e.component("CapeRecordPage",Fs),e.component("CapeResults",ac),e.component("CapeSummaryCard",Ks),e.component("CapeLabelledValue",yh),e.component("CapeValue",zi),e.component("CapeSingleValue",Cr),e.component("CapeFilterFieldText",Dh),e.component("CapeFilterFieldEnum",gp),e.component("CapeFilterFreeText",Ch),e.component("CapeFilterFieldInteger",Dp),e.component("CapeFilterFieldDate",Ip),e.component("CapeSortOrder",qs),e.component("CapeResultsControls",Jn),t.additionalComponents!==void 0&&Object.keys(t.additionalComponents).forEach(n=>{t.additionalComponents!==void 0&&e.component(n,t.additionalComponents[n])})}},Bp={template:"#templateCapeFooter"},Ap=s.defineComponent({__name:"App",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Gs),(s.openBlock(),s.createBlock(s.Suspense,null,{default:s.withCtx(()=>[s.createVNode(Hs)]),fallback:s.withCtx(()=>[s.createVNode(zs)]),_:1})),s.createVNode(Bp)],64))}}),Fp=e=>{const t=s.createApp(Ap);return t.use(Ji,e),t};J.CapePlugin=Ji,J.Filter=qn,J.createCapeApp=Fp,J.useDatasetStore=Ct,J.useFieldStore=en,J.useFilterStore=K,J.usePropertyStore=Kn,J.useSearchResultsStore=He,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: (options: CapeOptions) => any;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { RecordModel } from '../model/processed/RecordModel';
2
+ import type { VisibleFilterDisplayOptions } from '../model/VisibleFilterDisplayOptions';
3
+ export declare abstract class Filter {
4
+ id: string;
5
+ componentId: string;
6
+ displayPosition: number;
7
+ display: VisibleFilterDisplayOptions;
8
+ protected constructor(id: string, componentId: string, displayPosition: number, display: VisibleFilterDisplayOptions);
9
+ abstract reset(): void;
10
+ abstract isDefault(): boolean;
11
+ abstract isActive(): boolean;
12
+ filterRecords(records: RecordModel[]): RecordModel[];
13
+ matchesRecord(record: RecordModel): boolean;
14
+ }
package/dist/index.d.ts CHANGED
@@ -1,9 +1,12 @@
1
- export { default as createCapeApp } from "./createCapeApp";
2
- export { default as CapePlugin } from "./plugins/CapePlugin";
1
+ export { default as createCapeApp } from './createCapeApp';
2
+ export { default as CapePlugin } from './plugins/CapePlugin';
3
3
  export { useFilterStore } from "./stores/filterStore";
4
4
  export { useDatasetStore } from "./stores/datasetStore";
5
5
  export { useFieldStore } from "./stores/fieldStore";
6
6
  export { usePropertyStore } from "./stores/propertyStore";
7
7
  export { useSearchResultsStore } from "./stores/searchResultsStore";
8
8
  export { Filter } from "./filters/Filter";
9
- //# sourceMappingURL=index.d.ts.map
9
+ export type { CapeOptions } from './plugins/CapeOptions';
10
+ export type { FieldValuePair } from './model/processed/FieldValuePair';
11
+ export type { RecordModel } from './model/processed/RecordModel';
12
+ export type { CapeFieldValue } from './model/unprocessed/CapeFieldValue';
@@ -1,7 +1,7 @@
1
+ import type { Component } from '../../vue/dist/vue.esm-bundler.js';
1
2
  declare const _default: {
2
- install: (app: any, options: any) => void;
3
- addAdditionalComponents: (app: any, additionalComponents: any) => void;
4
- addCapeComponents: (app: any, options: any) => void;
3
+ install: (app: App, options: CapeOptions) => void;
4
+ addAdditionalComponents: (app: App, additionalComponents: Record<string, Component>) => void;
5
+ addCapeComponents: (app: App, options: CapeOptions) => void;
5
6
  };
6
7
  export default _default;
7
- //# sourceMappingURL=CapePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ export declare const useDatasetStore: any;
@@ -0,0 +1 @@
1
+ export declare const useFieldStore: any;
@@ -0,0 +1 @@
1
+ export declare const useFilterStore: any;
@@ -0,0 +1 @@
1
+ export declare const usePropertyStore: any;
@@ -0,0 +1 @@
1
+ export declare const useSearchResultsStore: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soton.ac.uk/cape3",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/cape3.umd.js",
@@ -76,6 +76,7 @@
76
76
  "tailwindcss": "^3.4.1",
77
77
  "typescript": "~5.3.0",
78
78
  "vite": "^5.0.10",
79
+ "vite-plugin-dts": "^3.7.3",
79
80
  "vitest": "^1.0.4",
80
81
  "vue-tsc": "^1.8.25"
81
82
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CapePlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/CapePlugin.ts"],"names":[],"mappings":";;;;;AA4BA,wBAqDE"}