@spscommerce/ds-react 8.21.3 → 8.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(O,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@spscommerce/utils"),require("moment-timezone"),require("@spscommerce/ds-shared"),require("react-dom"),require("@spscommerce/ds-colors"),require("@sps-woodland/tabs"),require("@react-stately/collections"),require("@sps-woodland/illustrations")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/utils","moment-timezone","@spscommerce/ds-shared","react-dom","@spscommerce/ds-colors","@sps-woodland/tabs","@react-stately/collections","@sps-woodland/illustrations"],x):(O=typeof globalThis<"u"?globalThis:O||self,x(O.DSReact={},O.React,O.utils,O.moment$4,O.dsShared,O.ReactDOM,O.dsColors,O.tabs,O.collections,O.illustrations))})(this,function(O,x,v,Xe,G,vo,Ls,Nh,sr,Kl){"use strict";var qx=Object.defineProperty;var Ch=O=>{throw TypeError(O)};var Jx=(O,x,v)=>x in O?qx(O,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):O[x]=v;var Yt=(O,x,v)=>Jx(O,typeof x!="symbol"?x+"":x,v),Dh=(O,x,v)=>x.has(O)||Ch("Cannot "+v);var or=(O,x,v)=>(Dh(O,x,"read from private field"),v?v.call(O):x.get(O)),Os=(O,x,v)=>x.has(O)?Ch("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(O):x.set(O,v),hn=(O,x,v,Xe)=>(Dh(O,x,"write to private field"),Xe?Xe.call(O,v):x.set(O,v),v);var Xn,In,xn;function Hl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=Hl(x),ar=Hl(Xe);function Wl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Wl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Y(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Wl(e))&&(r&&(r+=" "),r+=t);return r}let mt=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Sn(e){return x.useRef(e||mt())}function vt(e,t){const n=Sn(e),r=x.useRef(`${n.current}_ctrl`);return x.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kh="[object Object]";function Ih(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function xh(e,t){return function(n){return e(t(n))}}var Mh=Function.prototype,Gl=Object.prototype,Yl=Mh.toString,_h=Gl.hasOwnProperty,Oh=Yl.call(Object),Lh=Gl.toString,Ph=xh(Object.getPrototypeOf,Object);function Rh(e){return!!e&&typeof e=="object"}function Bh(e){if(!Rh(e)||Lh.call(e)!=kh||Ih(e))return!1;var t=Ph(e);if(t===null)return!0;var n=_h.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Yl.call(n)==Oh}var Ah=Bh;const Ul=Ps(Ah),wt=new Set,ir=new Set,zt=new Set,yo=new Set;function zl(e){wt.has(e)||zt.has(e)||yo.has(e)||ir.add(e)}function jl(e){wt.has(e)||zt.has(e)||ir.has(e)||yo.add(e)}const nt=ar.default||ar,lr="MM/DD/YYYY",Fh="MM/DD/YYYY hh:mm A",Vh="MM/DD/YYYY HH:mm",$h="hh:mm A",Kh="HH:mm",Hh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,Or=Symbol("Date Parse Error");function cr(e){return nt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const Q=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=nt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Hh.exec(e);if(n){const[,r,s,a]=n;return Object.freeze({year:Number(a),month:Number(r),date:Number(s)})}}return Object.freeze({[Or]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createMomentFrom(e,t){if(!e)return null;let n=null;return typeof e=="string"?t?n=nt(e,t,!0):n=nt(e):nt.isMoment(e)?n=e:n=Q.toMoment(e),n!==null&&nt.isMoment(n)&&n.isValid()?n:Object.freeze({[Or]:!0,year:void 0,month:void 0,date:void 0})},getRangeSeparator(e){return e!=null&&e.includes("-")?"/":"-"},createRangeFrom(e,t){if(!e)return null;if(t){const n=Q.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(s=>Q.createFrom(s,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>Q.createFrom(n))},isValid(e){var t;return e?nt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=Q.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return Q.isValid(e)?e:null},toMoment(e){return e?nt.isMoment(e)?e:nt({...e,month:e.month-1}):null},toString(e,t){const n=Q.toMoment(e);return n&&n.isValid()?n.format(t||lr):""},toStringRange(e,t){if(!e)return"";const n=Q.getRangeSeparator(t);return e.slice(0,2).map(r=>Q.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&nt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Kh}`):e.format(`${n} ${$h}`):t?e.format(Vh):e.format(Fh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=Q.getRangeSeparator(n);return e.map(s=>Q.toDateTimeString(s,t,n)).join(r)},create(){const e=new Date;return Object.freeze({year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()})},isSameDate(e,t){return e&&t&&e.year===t.year&&e.month===t.month&&e.date===t.date},isSameMonth(e,t){return e&&t&&e.year===t.year&&e.month===t.month},isAfter(e,t){return!e||!t?null:cr(e)>cr(t)},isBefore(e,t){return!e||!t?null:cr(e)<cr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=cr(e),[s,a]=t.map(cr);return s&&a&&(n&&r>=s&&r<=a||!n&&r>s&&r<a)},prevMonth(e){return Object.freeze({year:e.month===1?e.year-1:e.year,month:e.month-1||12,date:e.date})},nextMonth(e){return Object.freeze({year:e.month===12?e.year+1:e.year,month:e.month+1>12?1:e.month+1,date:e.date})},createRangeFromPreset(e,t){if(typeof e.definition=="function")return e.definition();const n=nt(),r=n.clone().subtract(nt.duration(e.definition));return[Q.createFrom(r,t),Q.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=nt().startOf("day"):t=nt().subtract(nt.duration(e.definition));const n=nt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n){return e&&nt.isMoment(e)&&e.isValid()?Q.toDateTimeString(e,t,n).split(" "):["",t?"00:00":"12:00",t?void 0:"AM"]},getCurrentMoment(){return nt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",s=n[1]||"0",a=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(s))?NaN:parseInt(s,10),c=n.length<=2&&r.length<=2&&s.length<=2;return t?c&&a>=0&&a<=23&&l>=0&&l<=59:c&&(!Number.isNaN(a)&&r.length===1||a>=1)&&a<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),s=parseInt(n[1]||"0",10);if(t){const a=r<10?`0${r}`:`${r}`,l=s<10?`0${s}`:`${s}`;return`${a}:${l}`}else{const a=r===0?"12":r<10?`0${r}`:`${r}`,l=s<10?`0${s}`:`${s}`;return`${a}:${l}`}}}),Rs=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Bs=["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"];let To=lr;function ql(e){To=e}const Lr=function(t){if(Array.isArray(t)){const n=Lr(t[0]),r=Lr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[Or])return{dateFormat:To};if(!Q.isValid(t))return{dateValidity:!0}}return null};wt.add("dateFormat"),wt.add("dateValidity");const Jl=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&Q.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};wt.add("dateRangeOrder");const Zl=function({minDate:t,maxDate:n}){function r(s){const a=Q.isBefore(s,t),l=Q.isAfter(s,n),c={minExceeded:a?Q.toString(t,To):null,maxExceeded:l?Q.toString(n,To):null};return a||l?{dateConstraint:c}:null}return function(a){if(!a)return null;if(Array.isArray(a)){const l=r(a[0]),c=r(a[1]);return l||c}return a.hasOwnProperty("year")?r(a):null}};wt.add("dateConstraint");const Wh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:Zl,dateRange:Jl,setDateFormat:ql},Symbol.toStringTag,{value:"Module"}));function en(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const Gh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>en(r,n)};wt.add("min");const Yh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>en(r,n)};ir.add("max");const Uh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};ir.add("required");const zh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>en(r,n)};wt.add("minLength");const jh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};wt.add("minLengthArray");const qh=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>en(r,n)};zt.add("maxLength");const Jh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};wt.add("maxLengthArray");const Zh=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(s){return n.test(s)?null:{pattern:t}}return s=>en(s,r)};wt.add("pattern");const Xh=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return en(e,t)};zt.add("alpha");const Qh=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return en(e,t)};zt.add("numeric");const eS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return en(e,t)};zt.add("positiveOrNegativeNumber");const tS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return en(e,t)};zt.add("nonNumeric");const Eo=Object.freeze({...Wh,min:Gh,max:Yh,required:Uh,minLength:zh,minLengthArray:jh,maxLength:qh,maxLengthArray:Jh,pattern:Zh,alpha:Xh,numeric:Qh,nonNumeric:tS,positiveOrNegativeNumber:eS,OnBlurErrorKeys:wt});function wo(e,t=[]){const n=t.reduce((r,s)=>Object.assign(r,s(e)||{}),{});return Object.keys(n).length?n:null}var jt=(e=>(e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT",e))(jt||{});function nS(e,t={},n=[]){for(const[r,s]of Object.entries(t))s===0?zl(r):s===2&&jl(r);return o.useCallback(e,n)}class Pn{constructor(t,n){Yt(this,"validators",[]);Os(this,Xn,null);Os(this,In,null);Os(this,xn,null);Yt(this,"preventativeErrors",[]);Yt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return or(this,Xn)===null&&or(this,In)===null&&or(this,xn)===null?null:{...or(this,Xn)??{},...or(this,In)??{},...or(this,xn)??{}}}setValidators(t){return this.update(this.path,null,void 0,t),this}validate(t,n,r=!1){if(this.validators&&this.validators.length>0){const s=wo(t,this.validators);let a={onSubmit:{},onChange:{},onBlur:{}};s&&(a=Object.keys(s).reduce((l,c)=>(yo.has(c)?l.onSubmit[c]=s[c]:ir.has(c)?l.onChange[c]=s[c]:l.onBlur[c]=s[c],l),a)),(typeof n>"u"||n===jt.ON_CHANGE)&&hn(this,In,Object.keys(a.onChange).length===0?null:a.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&hn(this,xn,Object.keys(a.onBlur).length===0?null:a.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(hn(this,Xn,Object.keys(a.onSubmit).length===0?null:a.onSubmit),hn(this,In,Object.keys(a.onChange).length===0?null:a.onChange),hn(this,xn,Object.keys(a.onBlur).length===0?null:a.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(hn(this,Xn,null),hn(this,xn,null),hn(this,In,null),r||this.update());return this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return!this.isValid()}hasError(t){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,t)}hasPreventativeError(t){return this.preventativeErrors.includes(t)}hasPreventativeErrors(){return this.preventativeErrors.length>0}isRequired(){return this.validators&&this.validators.indexOf(Eo.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Xn=new WeakMap,In=new WeakMap,xn=new WeakMap;class Pr extends Pn{constructor(){super(...arguments);Yt(this,"id",mt());Yt(this,"focused",!1);Yt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=wo(n,this.validators);if(r&&Object.keys(r).filter(a=>zt.has(a)).length>0){this.preventativeErrors=Object.keys(r);return}}this.update(this.path,n)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.update(),this}markAsDirty(){return this.pristine=!1,this.update(),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this}markAsBlurred(){return this.update(this.path,null,!0),this.onBlur&&this.onBlur(),this.preventativeErrors=[],this}markAsSubmitted(){return this.submitted=!0,this.update(this.path,null,!1,void 0,!0),this}}class Rn extends Pr{constructor(n,r,s){super(s?r:n,s||r);Yt(this,"fields");s&&this.inferMembers(n)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(n=>this.fields[n].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const n of Object.keys(this.fields))this.fields[n].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const n of Object.keys(this.fields))this.fields[n].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const n of Object.keys(this.fields))this.fields[n].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const n of Object.keys(this.fields))this.fields[n].markAsSubmitted();return this}inferSpsControl(n,r){return Co(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,s)=>r&&(!this.fields[s][n]||this.fields[s][n]()),!0)}}class Xl extends Rn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class Ql extends Rn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Co(e,t,n){return e instanceof Pn?(e.path=t,e.update=n,e):Array.isArray(e)?new Ql(e,t,n):Ul(e)?new Xl(e,t,n):new Pr(t,n)}function Rr(e,t){return t.length===0||!e?e:Rr(e.fields[t[0]],t.slice(1,t.length))}function As(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const r=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(s=>e.fields[s]);return t.length===0?r:r.reduce((s,a)=>[...s,...As(a,t)],[])}return As(e.fields[n],t)}function Fs(e,t,n){for(const r of Object.keys(t)){const s=t[r];for(const a of As(e,r.split(".")))a&&s&&n(a,s)}}function Do(e,t,n,r=!1,s=!1){Fs(t,n,(a,l)=>{a.validators=typeof l=="function"?l(e):l,r&&a.validate(v.getPath(e,a.path),void 0,s)})}function Vs(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,s)=>s===Number(n)?Vs(r,t):r):Ul(e)?Object.keys(e).reduce((r,s)=>Object.assign(r,{[s]:s===n?Vs(e[s],t):e[s]}),{}):e}function rS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function ec(e,t={}){rS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const s=x.useRef(t),a=x.useCallback(h=>{var T,E;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const w=Rr(S.formMeta,h.path);if(w){w.focused=!1;const N=v.getPath(S.formValue,h.path);w.validate(N,jt.ON_BLUR)}}else if(h.newValidators){if(s.current){const w=h.path.join(".");s.current={...s.current,[w]:h.newValidators},Do(S.formValue,S.formMeta,s.current,!0)}}else if(h.markAsSubmitted){const w=Rr(S.formMeta,h.path);if(w){w.submitted=!0;const N=v.getPath(S.formValue,h.path);w.validate(N,jt.ON_SUBMIT)}}else y=Vs(S.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((T=h==null?void 0:h.updateFormOptions)!=null&&T.validators&&(s.current={...s.current,...h.updateFormOptions.validators},Do(S.formValue,S.formMeta,s.current,((E=h.updateFormOptions)==null?void 0:E.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const w=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,V]}of w){const B=Rr(S.formMeta,k);if(typeof I!="symbol"&&B){let C;switch(M){case v.DiffChange.ADDITION:B.fields[I]=Co(V[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(B.fields)?B.fields[I]=void 0:delete B.fields[I];break;case v.DiffChange.ALTERATION:C=Co(V[I],[...k,I],c),(C instanceof Rn&&!(B.fields[I]instanceof Rn)||!(C instanceof Rn)&&B.fields[I]instanceof Rn)&&(C.pristine=!1,B.fields[I]=C);break}}}const N=new Set;if(w.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),N),Array.from(N).forEach(M=>{const I=Rr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),s.current){Do(y,S.formMeta,s.current);const M=new Set;t&&Fs(S.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:V,objects:[,B]}of w)if(typeof k!="symbol"){let C=S.formMeta,P=y;if(C){for(const L of V)C=C.fields[L],P=P[L],M.has(C)||C.validate(P,jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const L=C.fields[k];if(!M.has(L)&&(C.fields[k].validate(B[k],jt.ON_CHANGE),I===v.DiffChange.ADDITION&&L.fields))for(const[H,q]of Object.entries(L.fields))q.validate(B[k][H],jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?a({value:h,updateFormOptions:S}):a()},[a]),c=x.useCallback((h,S,y=!1,T,E=!1)=>{h?a({path:h,value:S,markAsBlurred:y,newValidators:T,markAsSubmitted:E}):l()},[a,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=Co(e,[],c);return t&&Do(e,h,t,!1,!0),h},[]),m=x.useCallback(()=>(u.current.formMeta.markAsDirty(),s.current&&Fs(u.current.formMeta,s.current,(h,S)=>{(typeof S=="function"||Array.isArray(S))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),f=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:m,getCurrentFormValue:f});return u.current}const at=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:s,formControl:a,formMeta:l,inputRef:c,onClick:p,...m}=e,f=o.useRef(),h=c||(t||f);function S(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Pr&&l.markAsFocused()}function T(){h&&h!==t&&h.current&&l&&l instanceof Pr&&l.markAsBlurred()}const E=Y("sps-form-group",(a&&a.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(a&&!a.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function w(N){s&&S(),p&&p(N)}return o.useEffect(()=>{function N(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),o.createElement("div",{...m,className:E,ref:t,tabIndex:-1,onClick:w,onFocus:y,onBlur:T},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function tc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function nc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $s(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return nc(n.overflowY,t)||nc(n.overflowX,t)||function(r){var s=function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!s&&(s.clientHeight<r.scrollHeight||s.clientWidth<r.scrollWidth)}(e)}return!1}function No(e,t,n,r,s,a,l,c){return a<e&&l>t||a>e&&l<t?0:a<=e&&c<=n||l>=t&&c>=n?a-e-r:l>t&&c<n||a<e&&c>n?l-t+s:0}var rc=function(e,t){var n=window,r=t.scrollMode,s=t.block,a=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(Ae){return Ae!==l};if(!tc(e))throw new TypeError("Invalid target");for(var m,f,u=document.scrollingElement||document.documentElement,h=[],S=e;tc(S)&&p(S);){if((S=(f=(m=S).parentElement)==null?m.getRootNode().host||null:f)===u){h.push(S);break}S!=null&&S===document.body&&$s(S)&&!$s(document.documentElement)||S!=null&&$s(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,T=n.visualViewport?n.visualViewport.height:innerHeight,E=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),M=N.height,I=N.width,k=N.top,V=N.right,B=N.bottom,C=N.left,P=s==="start"||s==="nearest"?k:s==="end"?B:k+M/2,L=a==="center"?C+I/2:a==="end"?V:C,H=[],q=0;q<h.length;q++){var _=h[q],ee=_.getBoundingClientRect(),A=ee.height,te=ee.width,$=ee.top,Z=ee.right,se=ee.bottom,W=ee.left;if(r==="if-needed"&&k>=0&&C>=0&&B<=T&&V<=y&&k>=$&&B<=se&&C>=W&&V<=Z)return H;var z=getComputedStyle(_),re=parseInt(z.borderLeftWidth,10),ne=parseInt(z.borderTopWidth,10),U=parseInt(z.borderRightWidth,10),R=parseInt(z.borderBottomWidth,10),j=0,X=0,oe="offsetWidth"in _?_.offsetWidth-_.clientWidth-re-U:0,le="offsetHeight"in _?_.offsetHeight-_.clientHeight-ne-R:0,de="offsetWidth"in _?_.offsetWidth===0?0:te/_.offsetWidth:0,ie="offsetHeight"in _?_.offsetHeight===0?0:A/_.offsetHeight:0;if(u===_)j=s==="start"?P:s==="end"?P-T:s==="nearest"?No(w,w+T,T,ne,R,w+P,w+P+M,M):P-T/2,X=a==="start"?L:a==="center"?L-y/2:a==="end"?L-y:No(E,E+y,y,re,U,E+L,E+L+I,I),j=Math.max(0,j+w),X=Math.max(0,X+E);else{j=s==="start"?P-$-ne:s==="end"?P-se+R+le:s==="nearest"?No($,se,A,ne,R+le,P,P+M,M):P-($+A/2)+le/2,X=a==="start"?L-W-re:a==="center"?L-(W+te/2)+oe/2:a==="end"?L-Z+U+oe:No(W,Z,te,re,U+oe,L,L+I,I);var ae=_.scrollLeft,we=_.scrollTop;P+=we-(j=Math.max(0,Math.min(we+j/ie,_.scrollHeight-A/ie+le))),L+=ae-(X=Math.max(0,Math.min(ae+X/de,_.scrollWidth-te/de+oe)))}H.push({el:_,top:j,left:X})}return H};function oc(e){return e===Object(e)&&Object.keys(e).length!==0}function oS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var s=r.el,a=r.top,l=r.left;s.scroll&&n?s.scroll({top:a,left:l,behavior:t}):(s.scrollTop=a,s.scrollLeft=l)})}function sS(e){return e===!1?{block:"end",inline:"nearest"}:oc(e)?e:{block:"start",inline:"nearest"}}function ko(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(oc(t)&&typeof t.behavior=="function")return t.behavior(n?rc(e,t):[]);if(n){var r=sS(t);return oS(rc(e,r),r.behavior)}}const Ks=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),He=o.createContext(G.noI18nI18n),aS={alt:"string",size:"SpinnerSize",title:"string"};function Hs(e){const{alt:t,className:n,size:r=G.SpinnerSize.MEDIUM,"data-testid":s,title:a,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(He),m=t||a||p("design-system:spinner.defaultAltText"),f=Y(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:f,"data-testid":s,title:m,...c})}Object.assign(Hs,{props:aS,displayName:"SpsSpinner"});const iS=60;function Io(e){return typeof e>"u"?"inherit":`${e}px`}function Ws(e){switch(e){case G.Position.TOP_LEFT:return G.Position.BOTTOM_LEFT;case G.Position.TOP_MIDDLE:return G.Position.BOTTOM_MIDDLE;case G.Position.TOP_RIGHT:return G.Position.BOTTOM_RIGHT;case G.Position.RIGHT_TOP:return G.Position.LEFT_TOP;case G.Position.RIGHT_MIDDLE:return G.Position.LEFT_MIDDLE;case G.Position.RIGHT_BOTTOM:return G.Position.LEFT_BOTTOM;case G.Position.BOTTOM_RIGHT:return G.Position.TOP_RIGHT;case G.Position.BOTTOM_MIDDLE:return G.Position.TOP_MIDDLE;case G.Position.BOTTOM_LEFT:return G.Position.TOP_LEFT;case G.Position.LEFT_BOTTOM:return G.Position.RIGHT_BOTTOM;case G.Position.LEFT_MIDDLE:return G.Position.RIGHT_MIDDLE;case G.Position.LEFT_TOP:return G.Position.RIGHT_TOP}}function lS(e,t,n,r,s,a,l,c){const p=l&&l.current,m=p?p.scrollTop:window.pageYOffset,f=c?0:m,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[S,y]=e.split(" ");let T,E,w,N;switch(S){case"top":w=t.height-n.top-f-a[0];break;case"left":E=t.width-n.left-h-a[0];break;case"right":N=n.right+h-a[0];break;case"bottom":T=n.bottom+f-a[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":N=n.left+h+a[1];break;case"top":T=n.top+f+a[1];break;case"middle":S==="top"||S==="bottom"?N=n.left+h+n.width/2-s/2+a[1]:(S==="left"||S==="right")&&(T=n.top+f+n.height/2-r.height/2+a[1]);break;case"bottom":w=t.height-n.bottom-f+a[1];break;case"right":E=t.width-n.right-h+a[1];break;default:throw new Error(`Invalid position ${e}`)}return[T,E,w,N]}function Bn(e,t,n,{altPosition:r,setMinWidth:s=!1,setWidth:a=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const m=e.current.getBoundingClientRect(),f=t.current.getBoundingClientRect(),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.getBoundingClientRect().width;let y=((l==null?void 0:l.current)??document.documentElement).getBoundingClientRect();c&&(y={x:0,y:0,width:h,height:u,top:0,left:0,bottom:u,right:h,toJSON(){return{width:h,height:u,top:0,left:0,bottom:u,right:h}}});const[T,E]=n.split(" ");let w=n;if(r&&(T==="top"&&f.top-m.height<iS||T==="right"&&f.right+m.width>h||T==="bottom"&&f.bottom+m.height>u||T==="left"&&f.left-m.width<0)&&(w=r),E==="left"&&f.left+m.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(T){case"bottom":w=G.Position.BOTTOM_RIGHT;break;case"top":w=G.Position.TOP_RIGHT;break}const N=s?Math.max(f.width,m.width):m.width,M=a?f.width:N,[I,k,V,B]=lS(w,y,f,m,M,p,l,c),C={top:Io(I),right:Io(k),bottom:Io(V),left:Io(B)};return c&&(C.position="fixed",C.zIndex=G.ZStratum.BAR),s&&(C.minWidth=`${f.width}px`),a&&(C.width=`${f.width}px`),[C,w===r]}return[{},!1]}const It=x.createContext(null);function dr(e,t=[]){const n=x.useContext(It);return x.useMemo(()=>r=>{const a=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=a.lastElementChild;for(;c&&c!==a.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)a.contains(l)||a.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);a.appendChild(l)}return vo.createPortal(r,l)},[n])}async function sc(e,t,n,r,s,a){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),a.current=c?l:null;const m=c?await l||[]:l||[];if(c&&a.current!==l)return;let f=Array.from(m).filter(Boolean).map(u=>new G.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new G.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),f=f.filter(h=>{const S=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?S.test(y)||S.test(p(h.caption)):S.test(y)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of f)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(f)),e.onOptionListChanged&&e.onOptionListChanged(f.length),s(f.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function cS(e,t,n){const[r,s]=o.useState(Object.freeze([])),[a,l]=o.useState(!1),c=o.useRef(null),p=o.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const m=o.useMemo(()=>typeof p.current=="function"?v.debounce(sc,typeof e.searchDebounce<"u"?e.searchDebounce:500):sc,[p.current,e.disabledOptions]);return o.useEffect(()=>{m(e,t,n,s,l,c)},[p.current,t.value,e.disabledOptions]),[r,a]}class gn{constructor(t,n){Yt(this,"nativeEvent");Yt(this,"currentTarget");Yt(this,"isPgStoppedInternal",!1);this.target=t,this.currentTarget=t,this.nativeEvent=new CustomEvent("change",n),Object.defineProperty(this.nativeEvent,"target",{value:t,writable:!1,configurable:!1,enumerable:!0})}get bubbles(){return this.nativeEvent.bubbles}get cancelable(){return this.nativeEvent.cancelable}get defaultPrevented(){return this.nativeEvent.defaultPrevented}get eventPhase(){return this.nativeEvent.eventPhase}get isTrusted(){return this.nativeEvent.isTrusted}get timeStamp(){return this.nativeEvent.timeStamp}get type(){return this.nativeEvent.type}preventDefault(){this.nativeEvent.preventDefault()}isDefaultPrevented(){return this.defaultPrevented}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPgStoppedInternal=!0}isPropagationStopped(){return this.isPgStoppedInternal}persist(){throw new Error("This is not a real React ChangeEvent. React does not permit the creation of SyntheticEvents in userland.")}}function dS(e,t){return{...e,...t}}function qt(e){return x.useReducer(dS,e)}function pS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:s="Search…",searchInputRef:a}){const[l,c]=qt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(S=>{c({value:S.target.value}),n&&n(S)},[n]),m=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),f=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),c({value:""}),a!=null&&a.current&&(n&&n(new gn(a.current)),a.current.focus())},[n]),u=S=>{S&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation())};return o.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?o.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},o.createElement("div",{className:"sps-form-control"},!l.value&&o.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:s,ref:a,value:l.value,onChange:p,onClick:m,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:f}))):o.createElement(o.Fragment,null),l,c]}const uS=ko||Ks,mS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"],fS=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function hS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function ac(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var s;return r[t]&&r[t]===((s=n==null?void 0:n.value)==null?void 0:s[t])})):!1}const Br=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:s,options:a,tall:l,textKey:c,valueKey:p,zeroState:m,hideInlineSearch:f,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:T,attachTo:E,className:w,conformWidth:N,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:V,keyDown:B,nullOption:C,onOptionListChanged:P,onOptionSelected:L,onPositionFlip:H,onSelfToggle:q,optionRole:_,positionOverride:ee,selectedOption:A,specialAction:te,unsafelyReplaceClassName:$,loading:Z,filterByTextAndCaptionKey:se,maxHeightPx:W,maxHeightRem:z,disableOptionsMemoization:re,disableDefaultOptionsFiltering:ne,"data-testid":U,...R}=e,j=o.useMemo(()=>te?new G.SpsOptionListOption(te,{textKey:"label",captionKey:"caption"}):null,[te]),[X,oe]=o.useState(-1),[le,de]=o.useState(k),ie=t||o.useRef(null),ae=o.useRef(null),we=o.useRef(null),Ae=dr("sps-option-list-portal"),Je=o.useContext(It),[dt,St]=ee||[G.Position.BOTTOM_LEFT,G.Position.TOP_LEFT],[[pt,ge],je]=o.useState([{},!1]),De=o.useRef(null),[ye,Ie,Qe]=pS({...e,searchInputRef:De}),[$e,et]=cS(e,Ie,Qe);o.useEffect(()=>{je(le?Bn(ie,E,dt,{altPosition:St,setMinWidth:!I,setWidth:!I&&N,...Je}):[{},!1])},[le,dt,St,$e]),o.useEffect(()=>{let be;return le&&(be=()=>{le&&je(Bn(ie,E,dt,{altPosition:St,setMinWidth:!I,setWidth:!I&&N,...Je}))},document.addEventListener("scroll",be)),()=>{be&&document.removeEventListener("scroll",be)}},[le]),o.useEffect(()=>{oe(-1)},[Ie]);const Xt=Y($||"sps-option-list","z-stratum-dropdown",le&&"sps-option-list--open",Ie.isAsync&&"sps-option-list--searchable",ge&&"sps-option-list--opens-upward",te&&te.label&&"sps-option-list--has-special-action",w),Mn=Y($||"sps-option-list__options",l&&"sps-option-list__options--tall"),ue=o.useCallback(()=>{le||(de(!0),De.current&&De.current.focus(),oe(-1),q&&q(!0))},[le,q]),he=o.useCallback(()=>{le&&(de(!1),oe(-1),q&&q(!1))},[le,q]),Oe=o.useCallback((be,Te)=>{Te||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),T&&T()):typeof L=="function"&&L(be.value),V||he())},[L,he]),lt=o.useCallback((be,Te,qe)=>{be.stopPropagation(),Oe(Te,qe)},[Oe]),Ne=o.useRef(s||[]);Ne.current=s||[];const gt=o.useCallback(be=>{switch(be.key){case"Tab":case"Escape":he();break;case"Enter":if(X>-1){const Te=$e[X]||j;be.preventDefault();const qe=!!Te&&ac(Ne.current,r||"",Te);!qe&&Te&&typeof L=="function"&&typeof Te.value=="function"?Te.value():Te&&Oe(Te,qe)}break;case"Up":case"ArrowUp":{let Te=X;ge?X<=-1?Te=$e.length-1:X===0?te&&(Te=$e.length):X<$e.length&&(Te=X-1):X>-1&&(Te=X-1),Te!==X&&(be.preventDefault(),oe(Te));break}case"Down":case"ArrowDown":{ue();let Te=X;ge?X!==-1&&(X>=$e.length?Te=0:X===$e.length-1?Te=-1:Te=X+1):X<$e.length-1+ +!!te&&(Te=X+1),Te!==X&&(be.preventDefault(),oe(Te));break}default:ue()}},[he,ue,X,Oe,L,ge,$e]),Et=o.useCallback(be=>{const Te=$e.findIndex(qe=>{if(qe.textKey){const Ht=qe.textKey;return qe.value[Ht].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return qe.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});Te>-1&&oe(Te)},[$e]),Be=o.useCallback(be=>{be&&(mS.includes(be.key)?gt(be):fS.includes(be.key)&&!f&&Et(be))},[he,ue,X,Oe,L,ge,$e]);o.useEffect(()=>{if(Je!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{q&&q(!1)},Te=document.getElementsByClassName("sps-modal__body")[0];return Te.addEventListener("scroll",be),()=>{Te.removeEventListener("scroll",be)}}},[]),o.useEffect(()=>{le&&we.current&&uS(we.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[X,le]),o.useEffect(()=>{de(k),k?De.current&&De.current.focus():oe(-1)},[k]),o.useEffect(()=>{B&&Be(B)},[B]),o.useEffect(()=>{!le&&ae.current&&(Qe({value:""}),ae.current.scrollTop=0),le&&H&&H(ge)},[le]);const ct=W?W/16:z,Qn=ct?{maxHeight:`${ct}rem`}:{};function Kt(be,Te){return Te?o.createElement(o.Fragment,null,be.split(Te).map((qe,Ht)=>Te.test(qe)?o.createElement("u",{key:Ht},qe):o.createElement(o.Fragment,{key:Ht},qe))):o.createElement(o.Fragment,null,be)}return Ae(o.createElement("div",{className:Xt,id:M,"aria-activedescendant":X>-1?`${M}-option-${X}`:"",tabIndex:-1,ref:ie,style:pt,onMouseLeave:()=>oe(-1),"data-testid":U,...R},ye,o.createElement("div",{className:Mn,ref:ae,"data-testid":`${U}-options`,style:Qn},!Z&&!Ie.pending&&m&&$e.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},m),(Z||Ie.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Hs,null)),!Z&&!Ie.pending&&$e.map((be,Te)=>{const qe=`${M}-option-${Te}`,Ht=hS(be.value,A,r),er=ac(Ne.current,r||"",be);return o.createElement("a",{key:qe,id:qe,role:_,"aria-selected":Ht,href:be.href,className:Y("sps-option-list__option",be.caption&&"sps-option-list__option--has-caption",be.disabled&&"sps-option-list__option--disabled",be.bold&&"sps-option-list__option--bold",(Ht||er)&&"sps-option-list__option--selected",X===Te&&"sps-option-list__option--highlighted"),onClick:me=>lt(me,be,er),onMouseOver:()=>oe(Te),tabIndex:-1,ref:X===Te?we:null,"data-testid":`${U}-option-${Te}`},be.value&&be.value.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&et)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,Kt(be.text,Ie.replacementPattern)),be.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,Kt(be.caption,Ie.replacementPattern))))})),j&&(te==null?void 0:te.label)&&o.createElement("a",{className:Y("sps-option-list__option","sps-option-list__special-action",X===$e.length&&"sps-option-list__option--highlighted",te.disabled&&"sps-option-list__special-action--disabled"),href:j.href,target:j.href&&te.newTab?"_blank":"_self",onClick:be=>lt(be,j),onMouseOver:()=>oe($e.length),"data-testid":`${U}-special-action`},te.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(te.icon)}`)}),!te.icon&&et&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,te.label))))});Object.assign(Br,{displayName:"SpsOptionList"});function SS(e,t,n=[]){return o.useMemo(()=>{function r(s){return o.createElement(e,{...s,...t},s.children)}return r},n)}function yt(e){return typeof e=="function"?e():e}const ic=function({children:e,elements:t}){if(t.length===0)return o.createElement(o.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return o.createElement(n,{...r??{}},o.createElement(ic,{elements:t.slice(1)},e))},lc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(ic,{elements:t},e))},gS=function({children:e,className:t,...n}){return o.createElement(lc,{className:`sps-app ${t}`,...n},e)};function xt(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(a=>Array.isArray(a)?a:[a]),s=new Array(r.length+1).fill(null).map(()=>[]);for(const a of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:m={}}of r[c])if(a.type===p&&Object.keys(m).every(u=>m[u]===a.props[u])){l=!0,s[c].push(a);break}l||s[s.length-1].push(a)}return s}function cc(e,t,n){const r=Object.entries(t).filter(([,a])=>typeof a!="string"&&a.deprecated).map(([a])=>a),s=r.map(a=>n[a]);o.useEffect(()=>{s.find(a=>typeof a<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},s)}function Gs(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ys(e,t,n){const r=o.useRef(t(...n));o.useEffect(()=>(document.addEventListener(e,r.current,{capture:!0}),()=>document.removeEventListener(e,r.current)),[]),o.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current,{capture:!0})},n)}function dc(e,t,n){return function(s){var a,l;!((a=e.current)!=null&&a.contains(s.target))&&!((l=t.current)!=null&&l.contains(s.target))&&n()}}function pr(e,t,n){const r=o.useRef(!1),[s,a]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:a(!0)},[]),c=o.useCallback((p=!1)=>{a(!1),r.current=p,n&&n()},[]);return Ys("mousedown",dc,[e,t,c]),Ys("pointerdown",dc,[e,t,c]),{showPopup:s,doShowPopup:l,doHidePopup:c}}const pc=e=>{const t=/(auto|scroll)/,n=(c,p)=>c.parentNode===null?p:n(c.parentNode,p.concat([c])),r=(c,p)=>getComputedStyle(c,null).getPropertyValue(p),s=c=>r(c,"overflow")+r(c,"overflow-y"),a=c=>t.test(s(c));return(c=>{if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const p=n(c.parentNode,[]);for(let m=0;m<p.length;m+=1)if(a(p[m]))return p[m];return null})(e)};let Us=0;function xo({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,s;if(e&&t.current){Us+=1,n=pc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const a=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=a&&a!=="0px"?`calc(${a} + ${r}px)`:`${r}px`,n===document.body)if(s=document.getElementsByClassName("sps-navbar-container").item(0),s&&window.getComputedStyle(s).position==="fixed"){const l=window.getComputedStyle(s).paddingRight;s.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(s=l==null?void 0:l.parentElement,s&&window.getComputedStyle(s).position==="fixed"){const c=window.getComputedStyle(s).paddingRight;s.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(Us-=1,Us===0&&(n.style.overflow=null,n.style.paddingRight=null,s&&(s.style.paddingRight=null)))}},[e])}const bS={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
1
+ (function(O,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@spscommerce/utils"),require("moment-timezone"),require("@spscommerce/ds-shared"),require("react-dom"),require("@spscommerce/ds-colors"),require("@sps-woodland/tabs"),require("@react-stately/collections"),require("@sps-woodland/illustrations")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/utils","moment-timezone","@spscommerce/ds-shared","react-dom","@spscommerce/ds-colors","@sps-woodland/tabs","@react-stately/collections","@sps-woodland/illustrations"],x):(O=typeof globalThis<"u"?globalThis:O||self,x(O.DSReact={},O.React,O.utils,O.moment$4,O.dsShared,O.ReactDOM,O.dsColors,O.tabs,O.collections,O.illustrations))})(this,function(O,x,v,Xe,G,vo,Ls,Nh,sr,Kl){"use strict";var qx=Object.defineProperty;var Ch=O=>{throw TypeError(O)};var Jx=(O,x,v)=>x in O?qx(O,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):O[x]=v;var Yt=(O,x,v)=>Jx(O,typeof x!="symbol"?x+"":x,v),Dh=(O,x,v)=>x.has(O)||Ch("Cannot "+v);var or=(O,x,v)=>(Dh(O,x,"read from private field"),v?v.call(O):x.get(O)),Os=(O,x,v)=>x.has(O)?Ch("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(O):x.set(O,v),hn=(O,x,v,Xe)=>(Dh(O,x,"write to private field"),Xe?Xe.call(O,v):x.set(O,v),v);var Xn,In,xn;function Hl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=Hl(x),ar=Hl(Xe);function Wl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Wl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Y(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Wl(e))&&(r&&(r+=" "),r+=t);return r}let mt=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Sn(e){return x.useRef(e||mt())}function vt(e,t){const n=Sn(e),r=x.useRef(`${n.current}_ctrl`);return x.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kh="[object Object]";function Ih(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function xh(e,t){return function(n){return e(t(n))}}var Mh=Function.prototype,Gl=Object.prototype,Yl=Mh.toString,_h=Gl.hasOwnProperty,Oh=Yl.call(Object),Lh=Gl.toString,Ph=xh(Object.getPrototypeOf,Object);function Rh(e){return!!e&&typeof e=="object"}function Bh(e){if(!Rh(e)||Lh.call(e)!=kh||Ih(e))return!1;var t=Ph(e);if(t===null)return!0;var n=_h.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Yl.call(n)==Oh}var Ah=Bh;const Ul=Ps(Ah),wt=new Set,ir=new Set,zt=new Set,yo=new Set;function zl(e){wt.has(e)||zt.has(e)||yo.has(e)||ir.add(e)}function jl(e){wt.has(e)||zt.has(e)||ir.has(e)||yo.add(e)}const nt=ar.default||ar,lr="MM/DD/YYYY",Fh="MM/DD/YYYY hh:mm A",Vh="MM/DD/YYYY HH:mm",$h="hh:mm A",Kh="HH:mm",Hh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,Or=Symbol("Date Parse Error");function cr(e){return nt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const Q=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=nt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Hh.exec(e);if(n){const[,r,s,a]=n;return Object.freeze({year:Number(a),month:Number(r),date:Number(s)})}}return Object.freeze({[Or]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createMomentFrom(e,t){if(!e)return null;let n=null;return typeof e=="string"?t?n=nt(e,t,!0):n=nt(e):nt.isMoment(e)?n=e:n=Q.toMoment(e),n!==null&&nt.isMoment(n)&&n.isValid()?n:Object.freeze({[Or]:!0,year:void 0,month:void 0,date:void 0})},getRangeSeparator(e){return e!=null&&e.includes("-")?"/":"-"},createRangeFrom(e,t){if(!e)return null;if(t){const n=Q.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(s=>Q.createFrom(s,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>Q.createFrom(n))},isValid(e){var t;return e?nt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=Q.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return Q.isValid(e)?e:null},toMoment(e){return e?nt.isMoment(e)?e:nt({...e,month:e.month-1}):null},toString(e,t){const n=Q.toMoment(e);return n&&n.isValid()?n.format(t||lr):""},toStringRange(e,t){if(!e)return"";const n=Q.getRangeSeparator(t);return e.slice(0,2).map(r=>Q.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&nt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Kh}`):e.format(`${n} ${$h}`):t?e.format(Vh):e.format(Fh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=Q.getRangeSeparator(n);return e.map(s=>Q.toDateTimeString(s,t,n)).join(r)},create(){const e=new Date;return Object.freeze({year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()})},isSameDate(e,t){return e&&t&&e.year===t.year&&e.month===t.month&&e.date===t.date},isSameMonth(e,t){return e&&t&&e.year===t.year&&e.month===t.month},isAfter(e,t){return!e||!t?null:cr(e)>cr(t)},isBefore(e,t){return!e||!t?null:cr(e)<cr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=cr(e),[s,a]=t.map(cr);return s&&a&&(n&&r>=s&&r<=a||!n&&r>s&&r<a)},prevMonth(e){return Object.freeze({year:e.month===1?e.year-1:e.year,month:e.month-1||12,date:e.date})},nextMonth(e){return Object.freeze({year:e.month===12?e.year+1:e.year,month:e.month+1>12?1:e.month+1,date:e.date})},createRangeFromPreset(e,t){if(typeof e.definition=="function")return e.definition();const n=nt(),r=n.clone().subtract(nt.duration(e.definition));return[Q.createFrom(r,t),Q.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=nt().startOf("day"):t=nt().subtract(nt.duration(e.definition));const n=nt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n){return e&&nt.isMoment(e)&&e.isValid()?Q.toDateTimeString(e,t,n).split(" "):["",t?"00:00":"12:00",t?void 0:"AM"]},getCurrentMoment(){return nt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",s=n[1]||"0",a=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(s))?NaN:parseInt(s,10),c=n.length<=2&&r.length<=2&&s.length<=2;return t?c&&a>=0&&a<=23&&l>=0&&l<=59:c&&(!Number.isNaN(a)&&r.length===1||a>=1)&&a<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),s=parseInt(n[1]||"0",10);if(t){const a=r<10?`0${r}`:`${r}`,l=s<10?`0${s}`:`${s}`;return`${a}:${l}`}else{const a=r===0?"12":r<10?`0${r}`:`${r}`,l=s<10?`0${s}`:`${s}`;return`${a}:${l}`}}}),Rs=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Bs=["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"];let To=lr;function ql(e){To=e}const Lr=function(t){if(Array.isArray(t)){const n=Lr(t[0]),r=Lr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[Or])return{dateFormat:To};if(!Q.isValid(t))return{dateValidity:!0}}return null};wt.add("dateFormat"),wt.add("dateValidity");const Jl=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&Q.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};wt.add("dateRangeOrder");const Zl=function({minDate:t,maxDate:n}){function r(s){const a=Q.isBefore(s,t),l=Q.isAfter(s,n),c={minExceeded:a?Q.toString(t,To):null,maxExceeded:l?Q.toString(n,To):null};return a||l?{dateConstraint:c}:null}return function(a){if(!a)return null;if(Array.isArray(a)){const l=r(a[0]),c=r(a[1]);return l||c}return a.hasOwnProperty("year")?r(a):null}};wt.add("dateConstraint");const Wh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:Zl,dateRange:Jl,setDateFormat:ql},Symbol.toStringTag,{value:"Module"}));function en(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const Gh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>en(r,n)};wt.add("min");const Yh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>en(r,n)};ir.add("max");const Uh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};ir.add("required");const zh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>en(r,n)};wt.add("minLength");const jh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};wt.add("minLengthArray");const qh=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>en(r,n)};zt.add("maxLength");const Jh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};wt.add("maxLengthArray");const Zh=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(s){return n.test(s)?null:{pattern:t}}return s=>en(s,r)};wt.add("pattern");const Xh=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return en(e,t)};zt.add("alpha");const Qh=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return en(e,t)};zt.add("numeric");const eS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return en(e,t)};zt.add("positiveOrNegativeNumber");const tS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return en(e,t)};zt.add("nonNumeric");const Eo=Object.freeze({...Wh,min:Gh,max:Yh,required:Uh,minLength:zh,minLengthArray:jh,maxLength:qh,maxLengthArray:Jh,pattern:Zh,alpha:Xh,numeric:Qh,nonNumeric:tS,positiveOrNegativeNumber:eS,OnBlurErrorKeys:wt});function wo(e,t=[]){const n=t.reduce((r,s)=>Object.assign(r,s(e)||{}),{});return Object.keys(n).length?n:null}var jt=(e=>(e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT",e))(jt||{});function nS(e,t={},n=[]){for(const[r,s]of Object.entries(t))s===0?zl(r):s===2&&jl(r);return o.useCallback(e,n)}class Pn{constructor(t,n){Yt(this,"validators",[]);Os(this,Xn,null);Os(this,In,null);Os(this,xn,null);Yt(this,"preventativeErrors",[]);Yt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return or(this,Xn)===null&&or(this,In)===null&&or(this,xn)===null?null:{...or(this,Xn)??{},...or(this,In)??{},...or(this,xn)??{}}}setValidators(t){return this.update(this.path,null,void 0,t),this}validate(t,n,r=!1){if(this.validators&&this.validators.length>0){const s=wo(t,this.validators);let a={onSubmit:{},onChange:{},onBlur:{}};s&&(a=Object.keys(s).reduce((l,c)=>(yo.has(c)?l.onSubmit[c]=s[c]:ir.has(c)?l.onChange[c]=s[c]:l.onBlur[c]=s[c],l),a)),(typeof n>"u"||n===jt.ON_CHANGE)&&hn(this,In,Object.keys(a.onChange).length===0?null:a.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&hn(this,xn,Object.keys(a.onBlur).length===0?null:a.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(hn(this,Xn,Object.keys(a.onSubmit).length===0?null:a.onSubmit),hn(this,In,Object.keys(a.onChange).length===0?null:a.onChange),hn(this,xn,Object.keys(a.onBlur).length===0?null:a.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(hn(this,Xn,null),hn(this,xn,null),hn(this,In,null),r||this.update());return this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return!this.isValid()}hasError(t){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,t)}hasPreventativeError(t){return this.preventativeErrors.includes(t)}hasPreventativeErrors(){return this.preventativeErrors.length>0}isRequired(){return this.validators&&this.validators.indexOf(Eo.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Xn=new WeakMap,In=new WeakMap,xn=new WeakMap;class Pr extends Pn{constructor(){super(...arguments);Yt(this,"id",mt());Yt(this,"focused",!1);Yt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=wo(n,this.validators);if(r&&Object.keys(r).filter(a=>zt.has(a)).length>0){this.preventativeErrors=Object.keys(r);return}}this.update(this.path,n)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.update(),this}markAsDirty(){return this.pristine=!1,this.update(),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this}markAsBlurred(){return this.update(this.path,null,!0),this.onBlur&&this.onBlur(),this.preventativeErrors=[],this}markAsSubmitted(){return this.submitted=!0,this.update(this.path,null,!1,void 0,!0),this}}class Rn extends Pr{constructor(n,r,s){super(s?r:n,s||r);Yt(this,"fields");s&&this.inferMembers(n)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(n=>this.fields[n].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const n of Object.keys(this.fields))this.fields[n].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const n of Object.keys(this.fields))this.fields[n].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const n of Object.keys(this.fields))this.fields[n].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const n of Object.keys(this.fields))this.fields[n].markAsSubmitted();return this}inferSpsControl(n,r){return Co(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,s)=>r&&(!this.fields[s][n]||this.fields[s][n]()),!0)}}class Xl extends Rn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class Ql extends Rn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Co(e,t,n){return e instanceof Pn?(e.path=t,e.update=n,e):Array.isArray(e)?new Ql(e,t,n):Ul(e)?new Xl(e,t,n):new Pr(t,n)}function Rr(e,t){return t.length===0||!e?e:Rr(e.fields[t[0]],t.slice(1,t.length))}function As(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const r=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(s=>e.fields[s]);return t.length===0?r:r.reduce((s,a)=>[...s,...As(a,t)],[])}return As(e.fields[n],t)}function Fs(e,t,n){for(const r of Object.keys(t)){const s=t[r];for(const a of As(e,r.split(".")))a&&s&&n(a,s)}}function Do(e,t,n,r=!1,s=!1){Fs(t,n,(a,l)=>{a.validators=typeof l=="function"?l(e):l,r&&a.validate(v.getPath(e,a.path),void 0,s)})}function Vs(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,s)=>s===Number(n)?Vs(r,t):r):Ul(e)?Object.keys(e).reduce((r,s)=>Object.assign(r,{[s]:s===n?Vs(e[s],t):e[s]}),{}):e}function rS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function ec(e,t={}){rS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const s=x.useRef(t),a=x.useCallback(h=>{var T,E;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const w=Rr(S.formMeta,h.path);if(w){w.focused=!1;const N=v.getPath(S.formValue,h.path);w.validate(N,jt.ON_BLUR)}}else if(h.newValidators){if(s.current){const w=h.path.join(".");s.current={...s.current,[w]:h.newValidators},Do(S.formValue,S.formMeta,s.current,!0)}}else if(h.markAsSubmitted){const w=Rr(S.formMeta,h.path);if(w){w.submitted=!0;const N=v.getPath(S.formValue,h.path);w.validate(N,jt.ON_SUBMIT)}}else y=Vs(S.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((T=h==null?void 0:h.updateFormOptions)!=null&&T.validators&&(s.current={...s.current,...h.updateFormOptions.validators},Do(S.formValue,S.formMeta,s.current,((E=h.updateFormOptions)==null?void 0:E.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const w=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,V]}of w){const B=Rr(S.formMeta,k);if(typeof I!="symbol"&&B){let C;switch(M){case v.DiffChange.ADDITION:B.fields[I]=Co(V[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(B.fields)?B.fields[I]=void 0:delete B.fields[I];break;case v.DiffChange.ALTERATION:C=Co(V[I],[...k,I],c),(C instanceof Rn&&!(B.fields[I]instanceof Rn)||!(C instanceof Rn)&&B.fields[I]instanceof Rn)&&(C.pristine=!1,B.fields[I]=C);break}}}const N=new Set;if(w.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),N),Array.from(N).forEach(M=>{const I=Rr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),s.current){Do(y,S.formMeta,s.current);const M=new Set;t&&Fs(S.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:V,objects:[,B]}of w)if(typeof k!="symbol"){let C=S.formMeta,P=y;if(C){for(const L of V)C=C.fields[L],P=P[L],M.has(C)||C.validate(P,jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const L=C.fields[k];if(!M.has(L)&&(C.fields[k].validate(B[k],jt.ON_CHANGE),I===v.DiffChange.ADDITION&&L.fields))for(const[H,q]of Object.entries(L.fields))q.validate(B[k][H],jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?a({value:h,updateFormOptions:S}):a()},[a]),c=x.useCallback((h,S,y=!1,T,E=!1)=>{h?a({path:h,value:S,markAsBlurred:y,newValidators:T,markAsSubmitted:E}):l()},[a,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=Co(e,[],c);return t&&Do(e,h,t,!1,!0),h},[]),m=x.useCallback(()=>(u.current.formMeta.markAsDirty(),s.current&&Fs(u.current.formMeta,s.current,(h,S)=>{(typeof S=="function"||Array.isArray(S))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),f=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:m,getCurrentFormValue:f});return u.current}const at=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:s,formControl:a,formMeta:l,inputRef:c,onClick:p,...m}=e,f=o.useRef(),h=c||(t||f);function S(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Pr&&l.markAsFocused()}function T(){h&&h!==t&&h.current&&l&&l instanceof Pr&&l.markAsBlurred()}const E=Y("sps-form-group",(a&&a.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(a&&!a.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function w(N){s&&S(),p&&p(N)}return o.useEffect(()=>{function N(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),o.createElement("div",{...m,className:E,ref:t,tabIndex:-1,onClick:w,onFocus:y,onBlur:T},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function tc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function nc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $s(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return nc(n.overflowY,t)||nc(n.overflowX,t)||function(r){var s=function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!s&&(s.clientHeight<r.scrollHeight||s.clientWidth<r.scrollWidth)}(e)}return!1}function No(e,t,n,r,s,a,l,c){return a<e&&l>t||a>e&&l<t?0:a<=e&&c<=n||l>=t&&c>=n?a-e-r:l>t&&c<n||a<e&&c>n?l-t+s:0}var rc=function(e,t){var n=window,r=t.scrollMode,s=t.block,a=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(Ae){return Ae!==l};if(!tc(e))throw new TypeError("Invalid target");for(var m,f,u=document.scrollingElement||document.documentElement,h=[],S=e;tc(S)&&p(S);){if((S=(f=(m=S).parentElement)==null?m.getRootNode().host||null:f)===u){h.push(S);break}S!=null&&S===document.body&&$s(S)&&!$s(document.documentElement)||S!=null&&$s(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,T=n.visualViewport?n.visualViewport.height:innerHeight,E=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),M=N.height,I=N.width,k=N.top,V=N.right,B=N.bottom,C=N.left,P=s==="start"||s==="nearest"?k:s==="end"?B:k+M/2,L=a==="center"?C+I/2:a==="end"?V:C,H=[],q=0;q<h.length;q++){var _=h[q],ee=_.getBoundingClientRect(),A=ee.height,te=ee.width,$=ee.top,Z=ee.right,se=ee.bottom,W=ee.left;if(r==="if-needed"&&k>=0&&C>=0&&B<=T&&V<=y&&k>=$&&B<=se&&C>=W&&V<=Z)return H;var z=getComputedStyle(_),re=parseInt(z.borderLeftWidth,10),ne=parseInt(z.borderTopWidth,10),U=parseInt(z.borderRightWidth,10),R=parseInt(z.borderBottomWidth,10),j=0,X=0,oe="offsetWidth"in _?_.offsetWidth-_.clientWidth-re-U:0,le="offsetHeight"in _?_.offsetHeight-_.clientHeight-ne-R:0,de="offsetWidth"in _?_.offsetWidth===0?0:te/_.offsetWidth:0,ie="offsetHeight"in _?_.offsetHeight===0?0:A/_.offsetHeight:0;if(u===_)j=s==="start"?P:s==="end"?P-T:s==="nearest"?No(w,w+T,T,ne,R,w+P,w+P+M,M):P-T/2,X=a==="start"?L:a==="center"?L-y/2:a==="end"?L-y:No(E,E+y,y,re,U,E+L,E+L+I,I),j=Math.max(0,j+w),X=Math.max(0,X+E);else{j=s==="start"?P-$-ne:s==="end"?P-se+R+le:s==="nearest"?No($,se,A,ne,R+le,P,P+M,M):P-($+A/2)+le/2,X=a==="start"?L-W-re:a==="center"?L-(W+te/2)+oe/2:a==="end"?L-Z+U+oe:No(W,Z,te,re,U+oe,L,L+I,I);var ae=_.scrollLeft,we=_.scrollTop;P+=we-(j=Math.max(0,Math.min(we+j/ie,_.scrollHeight-A/ie+le))),L+=ae-(X=Math.max(0,Math.min(ae+X/de,_.scrollWidth-te/de+oe)))}H.push({el:_,top:j,left:X})}return H};function oc(e){return e===Object(e)&&Object.keys(e).length!==0}function oS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var s=r.el,a=r.top,l=r.left;s.scroll&&n?s.scroll({top:a,left:l,behavior:t}):(s.scrollTop=a,s.scrollLeft=l)})}function sS(e){return e===!1?{block:"end",inline:"nearest"}:oc(e)?e:{block:"start",inline:"nearest"}}function ko(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(oc(t)&&typeof t.behavior=="function")return t.behavior(n?rc(e,t):[]);if(n){var r=sS(t);return oS(rc(e,r),r.behavior)}}const Ks=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),He=o.createContext(G.noI18nI18n),aS={alt:"string",size:"SpinnerSize",title:"string"};function Hs(e){const{alt:t,className:n,size:r=G.SpinnerSize.MEDIUM,"data-testid":s,title:a,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(He),m=t||a||p("design-system:spinner.defaultAltText"),f=Y(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:f,"data-testid":s,title:m,...c})}Object.assign(Hs,{props:aS,displayName:"SpsSpinner"});const iS=60;function Io(e){return typeof e>"u"?"inherit":`${e}px`}function Ws(e){switch(e){case G.Position.TOP_LEFT:return G.Position.BOTTOM_LEFT;case G.Position.TOP_MIDDLE:return G.Position.BOTTOM_MIDDLE;case G.Position.TOP_RIGHT:return G.Position.BOTTOM_RIGHT;case G.Position.RIGHT_TOP:return G.Position.LEFT_TOP;case G.Position.RIGHT_MIDDLE:return G.Position.LEFT_MIDDLE;case G.Position.RIGHT_BOTTOM:return G.Position.LEFT_BOTTOM;case G.Position.BOTTOM_RIGHT:return G.Position.TOP_RIGHT;case G.Position.BOTTOM_MIDDLE:return G.Position.TOP_MIDDLE;case G.Position.BOTTOM_LEFT:return G.Position.TOP_LEFT;case G.Position.LEFT_BOTTOM:return G.Position.RIGHT_BOTTOM;case G.Position.LEFT_MIDDLE:return G.Position.RIGHT_MIDDLE;case G.Position.LEFT_TOP:return G.Position.RIGHT_TOP}}function lS(e,t,n,r,s,a,l,c){const p=l&&l.current,m=p?p.scrollTop:window.pageYOffset,f=c?0:m,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[S,y]=e.split(" ");let T,E,w,N;switch(S){case"top":w=t.height-n.top-f-a[0];break;case"left":E=t.width-n.left-h-a[0];break;case"right":N=n.right+h-a[0];break;case"bottom":T=n.bottom+f-a[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":N=n.left+h+a[1];break;case"top":T=n.top+f+a[1];break;case"middle":S==="top"||S==="bottom"?N=n.left+h+n.width/2-s/2+a[1]:(S==="left"||S==="right")&&(T=n.top+f+n.height/2-r.height/2+a[1]);break;case"bottom":w=t.height-n.bottom-f+a[1];break;case"right":E=t.width-n.right-h+a[1];break;default:throw new Error(`Invalid position ${e}`)}return[T,E,w,N]}function Bn(e,t,n,{altPosition:r,setMinWidth:s=!1,setWidth:a=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const m=e.current.getBoundingClientRect(),f=t.current.getBoundingClientRect(),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.getBoundingClientRect().width;let y=((l==null?void 0:l.current)??document.documentElement).getBoundingClientRect();c&&(y={x:0,y:0,width:h,height:u,top:0,left:0,bottom:u,right:h,toJSON(){return{width:h,height:u,top:0,left:0,bottom:u,right:h}}});const[T,E]=n.split(" ");let w=n;if(r&&(T==="top"&&f.top-m.height<iS||T==="right"&&f.right+m.width>h||T==="bottom"&&f.bottom+m.height>u||T==="left"&&f.left-m.width<0)&&(w=r),E==="left"&&f.left+m.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(T){case"bottom":w=G.Position.BOTTOM_RIGHT;break;case"top":w=G.Position.TOP_RIGHT;break}const N=s?Math.max(f.width,m.width):m.width,M=a?f.width:N,[I,k,V,B]=lS(w,y,f,m,M,p,l,c),C={top:Io(I),right:Io(k),bottom:Io(V),left:Io(B)};return c&&(C.position="fixed",C.zIndex=G.ZStratum.BAR),s&&(C.minWidth=`${f.width}px`),a&&(C.width=`${f.width}px`),[C,w===r]}return[{},!1]}const It=x.createContext(null);function dr(e,t=[]){const n=x.useContext(It);return x.useMemo(()=>r=>{const a=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=a.lastElementChild;for(;c&&c!==a.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)a.contains(l)||a.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);a.appendChild(l)}return vo.createPortal(r,l)},[n])}async function sc(e,t,n,r,s,a){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),a.current=c?l:null;const m=c?await l||[]:l||[];if(c&&a.current!==l)return;let f=Array.from(m).filter(Boolean).map(u=>new G.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new G.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),f=f.filter(h=>{const S=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?S.test(y)||S.test(p(h.caption)):S.test(y)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of f)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(f)),e.onOptionListChanged&&e.onOptionListChanged(f.length),s(f.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function cS(e,t,n){const[r,s]=o.useState(Object.freeze([])),[a,l]=o.useState(!1),c=o.useRef(null),p=o.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const m=o.useMemo(()=>typeof p.current=="function"?v.debounce(sc,typeof e.searchDebounce<"u"?e.searchDebounce:500):sc,[p.current,e.disabledOptions]);return o.useEffect(()=>{m(e,t,n,s,l,c)},[p.current,t.value,e.disabledOptions]),[r,a]}class gn{constructor(t,n){Yt(this,"nativeEvent");Yt(this,"currentTarget");Yt(this,"isPgStoppedInternal",!1);this.target=t,this.currentTarget=t,this.nativeEvent=new CustomEvent("change",n),Object.defineProperty(this.nativeEvent,"target",{value:t,writable:!1,configurable:!1,enumerable:!0})}get bubbles(){return this.nativeEvent.bubbles}get cancelable(){return this.nativeEvent.cancelable}get defaultPrevented(){return this.nativeEvent.defaultPrevented}get eventPhase(){return this.nativeEvent.eventPhase}get isTrusted(){return this.nativeEvent.isTrusted}get timeStamp(){return this.nativeEvent.timeStamp}get type(){return this.nativeEvent.type}preventDefault(){this.nativeEvent.preventDefault()}isDefaultPrevented(){return this.defaultPrevented}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPgStoppedInternal=!0}isPropagationStopped(){return this.isPgStoppedInternal}persist(){throw new Error("This is not a real React ChangeEvent. React does not permit the creation of SyntheticEvents in userland.")}}function dS(e,t){return{...e,...t}}function qt(e){return x.useReducer(dS,e)}function pS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:s="Search…",searchInputRef:a}){const[l,c]=qt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(S=>{c({value:S.target.value}),n&&n(S)},[n]),m=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),f=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),c({value:""}),a!=null&&a.current&&(n&&n(new gn(a.current)),a.current.focus())},[n]),u=S=>{S&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation())};return o.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?o.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},o.createElement("div",{className:"sps-form-control"},!l.value&&o.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:s,ref:a,value:l.value,onChange:p,onClick:m,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:f}))):o.createElement(o.Fragment,null),l,c]}const uS=ko||Ks,mS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"],fS=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function hS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function ac(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var s;return r[t]&&r[t]===((s=n==null?void 0:n.value)==null?void 0:s[t])})):!1}const Br=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:s,options:a,tall:l,textKey:c,valueKey:p,zeroState:m,hideInlineSearch:f,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:T,attachTo:E,className:w,conformWidth:N,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:V,keyDown:B,nullOption:C,onOptionListChanged:P,onOptionSelected:L,onPositionFlip:H,onSelfToggle:q,optionRole:_,positionOverride:ee,selectedOption:A,specialAction:te,unsafelyReplaceClassName:$,loading:Z,filterByTextAndCaptionKey:se,maxHeightPx:W,maxHeightRem:z,disableOptionsMemoization:re,disableDefaultOptionsFiltering:ne,"data-testid":U,...R}=e,j=o.useMemo(()=>te?new G.SpsOptionListOption(te,{textKey:"label",captionKey:"caption"}):null,[te]),[X,oe]=o.useState(-1),[le,de]=o.useState(k),ie=t||o.useRef(null),ae=o.useRef(null),we=o.useRef(null),Ae=dr("sps-option-list-portal"),Je=o.useContext(It),[dt,St]=ee||[G.Position.BOTTOM_LEFT,G.Position.TOP_LEFT],[[pt,ge],ze]=o.useState([{},!1]),De=o.useRef(null),[ye,Ie,Qe]=pS({...e,searchInputRef:De}),[$e,et]=cS(e,Ie,Qe);o.useEffect(()=>{ze(le?Bn(ie,E,dt,{altPosition:St,setMinWidth:!I,setWidth:!I&&N,...Je}):[{},!1])},[le,dt,St,$e]),o.useEffect(()=>{let be;return le&&(be=()=>{le&&ze(Bn(ie,E,dt,{altPosition:St,setMinWidth:!I,setWidth:!I&&N,...Je}))},document.addEventListener("scroll",be)),()=>{be&&document.removeEventListener("scroll",be)}},[le]),o.useEffect(()=>{oe(-1)},[Ie]);const Xt=Y($||"sps-option-list","z-stratum-dropdown",le&&"sps-option-list--open",Ie.isAsync&&"sps-option-list--searchable",ge&&"sps-option-list--opens-upward",te&&te.label&&"sps-option-list--has-special-action",w),Mn=Y($||"sps-option-list__options",l&&"sps-option-list__options--tall"),ue=o.useCallback(()=>{le||(de(!0),De.current&&De.current.focus(),oe(-1),q&&q(!0))},[le,q]),he=o.useCallback(()=>{le&&(de(!1),oe(-1),q&&q(!1))},[le,q]),Oe=o.useCallback((be,Te)=>{Te||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),T&&T()):typeof L=="function"&&L(be.value),V||he())},[L,he]),lt=o.useCallback((be,Te,qe)=>{be.stopPropagation(),Oe(Te,qe)},[Oe]),Ne=o.useRef(s||[]);Ne.current=s||[];const gt=o.useCallback(be=>{switch(be.key){case"Tab":case"Escape":he();break;case"Enter":if(X>-1){const Te=$e[X]||j;be.preventDefault();const qe=!!Te&&ac(Ne.current,r||"",Te);!qe&&Te&&typeof L=="function"&&typeof Te.value=="function"?Te.value():Te&&Oe(Te,qe)}break;case"Up":case"ArrowUp":{let Te=X;ge?X<=-1?Te=$e.length-1:X===0?te&&(Te=$e.length):X<$e.length&&(Te=X-1):X>-1&&(Te=X-1),Te!==X&&(be.preventDefault(),oe(Te));break}case"Down":case"ArrowDown":{ue();let Te=X;ge?X!==-1&&(X>=$e.length?Te=0:X===$e.length-1?Te=-1:Te=X+1):X<$e.length-1+ +!!te&&(Te=X+1),Te!==X&&(be.preventDefault(),oe(Te));break}default:ue()}},[he,ue,X,Oe,L,ge,$e]),Et=o.useCallback(be=>{const Te=$e.findIndex(qe=>{if(qe.textKey){const Ht=qe.textKey;return qe.value[Ht].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return qe.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});Te>-1&&oe(Te)},[$e]),Be=o.useCallback(be=>{be&&(mS.includes(be.key)?gt(be):fS.includes(be.key)&&!f&&Et(be))},[he,ue,X,Oe,L,ge,$e]);o.useEffect(()=>{if(Je!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{q&&q(!1)},Te=document.getElementsByClassName("sps-modal__body")[0];return Te.addEventListener("scroll",be),()=>{Te.removeEventListener("scroll",be)}}},[]),o.useEffect(()=>{le&&we.current&&uS(we.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[X,le]),o.useEffect(()=>{de(k),k?De.current&&De.current.focus():oe(-1)},[k]),o.useEffect(()=>{B&&Be(B)},[B]),o.useEffect(()=>{!le&&ae.current&&(Qe({value:""}),ae.current.scrollTop=0),le&&H&&H(ge)},[le]);const ct=W?W/16:z,Qn=ct?{maxHeight:`${ct}rem`}:{};function Kt(be,Te){return Te?o.createElement(o.Fragment,null,be.split(Te).map((qe,Ht)=>Te.test(qe)?o.createElement("u",{key:Ht},qe):o.createElement(o.Fragment,{key:Ht},qe))):o.createElement(o.Fragment,null,be)}return Ae(o.createElement("div",{className:Xt,id:M,"aria-activedescendant":X>-1?`${M}-option-${X}`:"",tabIndex:-1,ref:ie,style:pt,onMouseLeave:()=>oe(-1),"data-testid":U,...R},ye,o.createElement("div",{className:Mn,ref:ae,"data-testid":`${U}-options`,style:Qn},!Z&&!Ie.pending&&m&&$e.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},m),(Z||Ie.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Hs,null)),!Z&&!Ie.pending&&$e.map((be,Te)=>{const qe=`${M}-option-${Te}`,Ht=hS(be.value,A,r),er=ac(Ne.current,r||"",be);return o.createElement("a",{key:qe,id:qe,role:_,"aria-selected":Ht,href:be.href,className:Y("sps-option-list__option",be.caption&&"sps-option-list__option--has-caption",be.disabled&&"sps-option-list__option--disabled",be.bold&&"sps-option-list__option--bold",(Ht||er)&&"sps-option-list__option--selected",X===Te&&"sps-option-list__option--highlighted"),onClick:me=>lt(me,be,er),onMouseOver:()=>oe(Te),tabIndex:-1,ref:X===Te?we:null,"data-testid":`${U}-option-${Te}`},be.value&&be.value.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&et)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,Kt(be.text,Ie.replacementPattern)),be.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,Kt(be.caption,Ie.replacementPattern))))})),j&&(te==null?void 0:te.label)&&o.createElement("a",{className:Y("sps-option-list__option","sps-option-list__special-action",X===$e.length&&"sps-option-list__option--highlighted",te.disabled&&"sps-option-list__special-action--disabled"),href:j.href,target:j.href&&te.newTab?"_blank":"_self",onClick:be=>lt(be,j),onMouseOver:()=>oe($e.length),"data-testid":`${U}-special-action`},te.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(te.icon)}`)}),!te.icon&&et&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,te.label))))});Object.assign(Br,{displayName:"SpsOptionList"});function SS(e,t,n=[]){return o.useMemo(()=>{function r(s){return o.createElement(e,{...s,...t},s.children)}return r},n)}function yt(e){return typeof e=="function"?e():e}const ic=function({children:e,elements:t}){if(t.length===0)return o.createElement(o.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return o.createElement(n,{...r??{}},o.createElement(ic,{elements:t.slice(1)},e))},lc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(ic,{elements:t},e))},gS=function({children:e,className:t,...n}){return o.createElement(lc,{className:`sps-app ${t}`,...n},e)};function xt(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(a=>Array.isArray(a)?a:[a]),s=new Array(r.length+1).fill(null).map(()=>[]);for(const a of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:m={}}of r[c])if(a.type===p&&Object.keys(m).every(u=>m[u]===a.props[u])){l=!0,s[c].push(a);break}l||s[s.length-1].push(a)}return s}function cc(e,t,n){const r=Object.entries(t).filter(([,a])=>typeof a!="string"&&a.deprecated).map(([a])=>a),s=r.map(a=>n[a]);o.useEffect(()=>{s.find(a=>typeof a<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},s)}function Gs(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ys(e,t,n){const r=o.useRef(t(...n));o.useEffect(()=>(document.addEventListener(e,r.current,{capture:!0}),()=>document.removeEventListener(e,r.current)),[]),o.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current,{capture:!0})},n)}function dc(e,t,n){return function(s){var a,l;!((a=e.current)!=null&&a.contains(s.target))&&!((l=t.current)!=null&&l.contains(s.target))&&n()}}function pr(e,t,n){const r=o.useRef(!1),[s,a]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:a(!0)},[]),c=o.useCallback((p=!1)=>{a(!1),r.current=p,n&&n()},[]);return Ys("mousedown",dc,[e,t,c]),Ys("pointerdown",dc,[e,t,c]),{showPopup:s,doShowPopup:l,doHidePopup:c}}const pc=e=>{const t=/(auto|scroll)/,n=(c,p)=>c.parentNode===null?p:n(c.parentNode,p.concat([c])),r=(c,p)=>getComputedStyle(c,null).getPropertyValue(p),s=c=>r(c,"overflow")+r(c,"overflow-y"),a=c=>t.test(s(c));return(c=>{if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const p=n(c.parentNode,[]);for(let m=0;m<p.length;m+=1)if(a(p[m]))return p[m];return null})(e)};let Us=0;function xo({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,s;if(e&&t.current){Us+=1,n=pc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const a=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=a&&a!=="0px"?`calc(${a} + ${r}px)`:`${r}px`,n===document.body)if(s=document.getElementsByClassName("sps-navbar-container").item(0),s&&window.getComputedStyle(s).position==="fixed"){const l=window.getComputedStyle(s).paddingRight;s.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(s=l==null?void 0:l.parentElement,s&&window.getComputedStyle(s).position==="fixed"){const c=window.getComputedStyle(s).paddingRight;s.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(Us-=1,Us===0&&(n.style.overflow=null,n.style.paddingRight=null,s&&(s.style.paddingRight=null)))}},[e])}const bS={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
2
2
  Eventually<Iterable<string>>
3
3
  | ((filter?: string) => Eventually<Iterable<string>>)
4
4
  `,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",inputNotClearable:"boolean",autoFocusOnSelection:"boolean"};function Jt({className:e,debounce:t=0,disabled:n,formControl:r,formMeta:s,onChange:a,onSelectionChange:l,icon:c,id:p,placeholder:m="",suggestions:f,unsafelyReplaceClassName:u,tallOptionList:h,value:S="",zeroState:y,loading:T,maxHeightOptionListPx:E,maxHeightOptionListRem:w,disableOptionsMemoization:N,inputNotClearable:M,autoFocusOnSelection:I,"data-testid":k,...V}){const B=s||r,{wrapperId:C,controlId:P}=vt(p,B),[L,H]=qt({keyDown:null,opensUpward:!1}),q=o.useRef(null),_=o.useRef(null),ee=o.useRef(null),{showPopup:A,doShowPopup:te,doHidePopup:$}=pr(q,ee);function Z(R,j,X=!1){B&&(B.setValue(R),B.markAsDirty()),l&&X?l(R):a&&a(j||new gn({value:R}))}function se(R){_.current&&(_.current.value="",Z("")),R.stopPropagation()}function W(R){Z(R.target.value,R)}function z(R){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(R.key)>-1&&(R.preventDefault(),R.persist()),R.stopPropagation(),H({keyDown:R})),R.key==="Tab"&&$()}function re(R){R?te():$()}function ne(R){H({opensUpward:R})}const U=Y(u||"sps-autocomplete",A&&"sps-autocomplete--open",A&&"z-stratum-dropdown",L.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return o.useEffect(()=>{let R;return A&&(R=()=>{$()},window.addEventListener("resize",R)),()=>{R&&window.removeEventListener("resize",R)}},[A]),xo({isOpen:A,rootRef:q}),o.createElement(at,{id:C,className:U,formControl:r,formMeta:s,inputRef:_,ref:q,focusInputOnClick:!0,onClick:R=>R.nativeEvent.stopImmediatePropagation(),"data-testid":`${k}`},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:"sps-form-control"},c&&o.createElement("i",{className:Y("sps-text-input__icon","sps-icon",`sps-icon-${c}`)}),o.createElement("input",{type:"text",ref:_,value:S,className:"sps-text-input__input",placeholder:m,onFocus:te,onClick:te,onChange:W,onKeyDown:z,disabled:n,id:P,"data-testid":`${k}__input`,...V}),S&&!n&&!M&&o.createElement("i",{"aria-label":"clear",className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:R=>se(R)}))),o.createElement(Br,{id:`${C}_options`,ref:ee,attachTo:q,isOpen:A,options:f,hideInlineSearch:!0,keyDown:L.keyDown,onOptionSelected:R=>{var j;Z(R,void 0,!0),I&&((j=_.current)==null||j.focus())},onPositionFlip:ne,onSelfToggle:re,offsets:[1,0],search:S,searchDebounce:t,tall:h,zeroState:y,loading:T,maxHeightPx:E,maxHeightRem:w,disableOptionsMemoization:N}))}Object.assign(Jt,{props:bS,displayName:"SpsAutocomplete"});const uc={basic:{label:"Basic",examples:{basic:{react:v.code`
@@ -356,7 +356,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ae=ie(X,de,U,R,j+"."
356
356
  *
357
357
  * This source code is licensed under the MIT license found in the
358
358
  * LICENSE file in the root directory of this source tree.
359
- */var Yc;function XS(){return Yc||(Yc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,s=60114,a=60109,l=60110,c=60112,p=60113,m=60120,f=60115,u=60116,h=60121,S=60122,y=60117,T=60129,E=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),s=w("react.profiler"),a=w("react.provider"),l=w("react.context"),c=w("react.forward_ref"),p=w("react.suspense"),m=w("react.suspense_list"),f=w("react.memo"),u=w("react.lazy"),h=w("react.block"),S=w("react.server.block"),y=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),T=w("react.debug_trace_mode"),w("react.offscreen"),E=w("react.legacy_hidden")}var N=!1;function M(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===s||ie===T||ie===r||ie===p||ie===m||ie===E||N||typeof ie=="object"&&ie!==null&&(ie.$$typeof===u||ie.$$typeof===f||ie.$$typeof===a||ie.$$typeof===l||ie.$$typeof===c||ie.$$typeof===y||ie.$$typeof===h||ie[0]===S))}function I(ie){if(typeof ie=="object"&&ie!==null){var ae=ie.$$typeof;switch(ae){case e:var we=ie.type;switch(we){case n:case s:case r:case p:case m:return we;default:var Ae=we&&we.$$typeof;switch(Ae){case l:case c:case u:case f:case a:return Ae;default:return ae}}case t:return ae}}}var k=l,V=a,B=e,C=c,P=n,L=u,H=f,q=t,_=s,ee=r,A=p,te=!1,$=!1;function Z(ie){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function se(ie){return $||($=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ie){return I(ie)===l}function z(ie){return I(ie)===a}function re(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function ne(ie){return I(ie)===c}function U(ie){return I(ie)===n}function R(ie){return I(ie)===u}function j(ie){return I(ie)===f}function X(ie){return I(ie)===t}function oe(ie){return I(ie)===s}function le(ie){return I(ie)===r}function de(ie){return I(ie)===p}Ve.ContextConsumer=k,Ve.ContextProvider=V,Ve.Element=B,Ve.ForwardRef=C,Ve.Fragment=P,Ve.Lazy=L,Ve.Memo=H,Ve.Portal=q,Ve.Profiler=_,Ve.StrictMode=ee,Ve.Suspense=A,Ve.isAsyncMode=Z,Ve.isConcurrentMode=se,Ve.isContextConsumer=W,Ve.isContextProvider=z,Ve.isElement=re,Ve.isForwardRef=ne,Ve.isFragment=U,Ve.isLazy=R,Ve.isMemo=j,Ve.isPortal=X,Ve.isProfiler=oe,Ve.isStrictMode=le,Ve.isSuspense=de,Ve.isValidElementType=M,Ve.typeOf=I}()),Ve}process.env.NODE_ENV==="production"?la.exports=ZS():la.exports=XS();var Uc=la.exports,QS=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],eg=["reactReduxForwardedRef"],tg=[],ng=[null,null],rg=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function og(e,t){var n=e[1];return[t.payload,n+1]}function zc(e,t,n){Bc(function(){return e.apply(void 0,t)},n)}function sg(e,t,n,r,s,a,l){e.current=r,t.current=s,n.current=!1,a.current&&(a.current=null,l())}function ag(e,t,n,r,s,a,l,c,p,m){if(e){var f=!1,u=null,h=function(){if(!f){var T=t.getState(),E,w;try{E=r(T,s.current)}catch(N){w=N,u=N}w||(u=null),E===a.current?l.current||p():(a.current=E,c.current=E,l.current=!0,m({type:"STORE_UPDATED",payload:{error:w}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var ig=function(){return[null,0]};function lg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,s=r===void 0?function(V){return"ConnectAdvanced("+V+")"}:r,a=n.methodName,l=a===void 0?"connectAdvanced":a,c=n.renderCountProp,p=c===void 0?void 0:c,m=n.shouldHandleStateChanges,f=m===void 0?!0:m,u=n.storeKey,h=u===void 0?"store":u,S=n.withRef,y=S===void 0?!1:S,T=n.forwardRef,E=T===void 0?!1:T,w=n.context,N=w===void 0?sa:w,M=Mo(n,QS);if(process.env.NODE_ENV!=="production"){if(p!==void 0)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(y)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var I="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";if(h!=="store")throw new Error("storeKey has been removed and does not do anything. "+I)}var k=N;return function(B){if(process.env.NODE_ENV!=="production"&&!Uc.isValidElementType(B))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+rg(B)));var C=B.displayName||B.name||"Component",P=s(C),L=ve({},M,{getDisplayName:s,methodName:l,renderCountProp:p,shouldHandleStateChanges:f,storeKey:h,displayName:P,wrappedComponentName:C,WrappedComponent:B}),H=M.pure;function q($){return e($.dispatch,L)}var _=H?x.useMemo:function($){return $()};function ee($){var Z=x.useMemo(function(){var Ie=$.reactReduxForwardedRef,Qe=Mo($,eg);return[$.context,Ie,Qe]},[$]),se=Z[0],W=Z[1],z=Z[2],re=x.useMemo(function(){return se&&se.Consumer&&Uc.isContextConsumer(x.createElement(se.Consumer,null))?se:k},[se,k]),ne=x.useContext(re),U=!!$.store&&!!$.store.getState&&!!$.store.dispatch,R=!!ne&&!!ne.store;if(process.env.NODE_ENV!=="production"&&!U&&!R)throw new Error('Could not find "store" in the context of '+('"'+P+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+P+" in connect options."));var j=U?$.store:ne.store,X=x.useMemo(function(){return q(j)},[j]),oe=x.useMemo(function(){if(!f)return ng;var Ie=Rc(j,U?null:ne.subscription),Qe=Ie.notifyNestedSubs.bind(Ie);return[Ie,Qe]},[j,U,ne]),le=oe[0],de=oe[1],ie=x.useMemo(function(){return U?ne:ve({},ne,{subscription:le})},[U,ne,le]),ae=x.useReducer(og,tg,ig),we=ae[0],Ae=we[0],Je=ae[1];if(Ae&&Ae.error)throw Ae.error;var dt=x.useRef(),St=x.useRef(z),pt=x.useRef(),ge=x.useRef(!1),je=_(function(){return pt.current&&z===St.current?pt.current:X(j.getState(),z)},[j,Ae,z]);zc(sg,[St,dt,ge,z,je,pt,de]),zc(ag,[f,j,le,X,St,dt,ge,pt,de,Je],[j,le,X]);var De=x.useMemo(function(){return x.createElement(B,ve({},je,{ref:W}))},[W,B,je]),ye=x.useMemo(function(){return f?x.createElement(re.Provider,{value:ie},De):De},[re,De,ie]);return ye}var A=H?x.memo(ee):ee;if(A.WrappedComponent=B,A.displayName=ee.displayName=P,E){var te=x.forwardRef(function(Z,se){return x.createElement(A,ve({},Z,{reactReduxForwardedRef:se}))});return te.displayName=P,te.WrappedComponent=B,Wc(te,B)}return Wc(A,B)}}function jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ca(e,t){if(jc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var s=0;s<n.length;s++)if(!Object.prototype.hasOwnProperty.call(t,n[s])||!jc(e[n[s]],t[n[s]]))return!1;return!0}function cg(e,t){var n={},r=function(l){var c=e[l];typeof c=="function"&&(n[l]=function(){return t(c.apply(void 0,arguments))})};for(var s in e)r(s);return n}function dg(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function qc(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Jc(e,t,n){dg(e)||qc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function da(e){return function(n,r){var s=e(n,r);function a(){return s}return a.dependsOnOwnProps=!1,a}}function Zc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function Xc(e,t){return function(r,s){var a=s.displayName,l=function(p,m){return l.dependsOnOwnProps?l.mapToProps(p,m):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,m){l.mapToProps=e,l.dependsOnOwnProps=Zc(e);var f=l(p,m);return typeof f=="function"&&(l.mapToProps=f,l.dependsOnOwnProps=Zc(f),f=l(p,m)),process.env.NODE_ENV!=="production"&&Jc(f,a,t),f},l}}function pg(e){return typeof e=="function"?Xc(e,"mapDispatchToProps"):void 0}function ug(e){return e?void 0:da(function(t){return{dispatch:t}})}function mg(e){return e&&typeof e=="object"?da(function(t){return cg(e,t)}):void 0}const fg=[pg,ug,mg];function hg(e){return typeof e=="function"?Xc(e,"mapStateToProps"):void 0}function Sg(e){return e?void 0:da(function(){return{}})}const gg=[hg,Sg];function bg(e,t,n){return ve({},n,e,t)}function vg(e){return function(n,r){var s=r.displayName,a=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(f,u,h){var S=e(f,u,h);return c?(!a||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&Jc(p,s,"mergeProps")),p}}}function yg(e){return typeof e=="function"?vg(e):void 0}function Tg(e){return e?void 0:function(){return bg}}const Eg=[yg,Tg];function pa(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||qc("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function wg(e,t,n,r){pa(e,"mapStateToProps",r),pa(t,"mapDispatchToProps",r),pa(n,"mergeProps",r)}var Cg=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Dg(e,t,n,r){return function(a,l){return n(e(a,l),t(r,l),l)}}function Ng(e,t,n,r,s){var a=s.areStatesEqual,l=s.areOwnPropsEqual,c=s.areStatePropsEqual,p=!1,m,f,u,h,S;function y(M,I){return m=M,f=I,u=e(m,f),h=t(r,f),S=n(u,h,f),p=!0,S}function T(){return u=e(m,f),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function E(){return e.dependsOnOwnProps&&(u=e(m,f)),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function w(){var M=e(m,f),I=!c(M,u);return u=M,I&&(S=n(u,h,f)),S}function N(M,I){var k=!l(I,f),V=!a(M,m,I,f);return m=M,f=I,k&&V?T():k?E():V?w():S}return function(I,k){return p?N(I,k):y(I,k)}}function kg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,s=t.initMergeProps,a=Mo(t,Cg),l=n(e,a),c=r(e,a),p=s(e,a);process.env.NODE_ENV!=="production"&&wg(l,c,p,a.displayName);var m=a.pure?Ng:Dg;return m(l,c,p,e,a)}var Ig=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ua(e,t,n){for(var r=t.length-1;r>=0;r--){var s=t[r](e);if(s)return s}return function(a,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function xg(e,t){return e===t}function Mg(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?lg:n,s=t.mapStateToPropsFactories,a=s===void 0?gg:s,l=t.mapDispatchToPropsFactories,c=l===void 0?fg:l,p=t.mergePropsFactories,m=p===void 0?Eg:p,f=t.selectorFactory,u=f===void 0?kg:f;return function(S,y,T,E){E===void 0&&(E={});var w=E,N=w.pure,M=N===void 0?!0:N,I=w.areStatesEqual,k=I===void 0?xg:I,V=w.areOwnPropsEqual,B=V===void 0?ca:V,C=w.areStatePropsEqual,P=C===void 0?ca:C,L=w.areMergedPropsEqual,H=L===void 0?ca:L,q=Mo(w,Ig),_=ua(S,a,"mapStateToProps"),ee=ua(y,c,"mapDispatchToProps"),A=ua(T,m,"mergeProps");return r(u,ve({methodName:"connect",getDisplayName:function($){return"Connect("+$+")"},shouldHandleStateChanges:!!S,initMapStateToProps:_,initMapDispatchToProps:ee,initMergeProps:A,pure:M,areStatesEqual:k,areOwnPropsEqual:B,areStatePropsEqual:P,areMergedPropsEqual:H},q))}}const Qc=Mg();$S(vo.unstable_batchedUpdates);function _g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ed(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),s=x.useRef(n),a=r.current||!!(t&&s.current.inputs&&_g(t,s.current.inputs)),l=a?s.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,s.current=l},[l]),l.result}function Og(e,t){return ed(function(){return e},t)}var Me=ed,Se=Og,Lg=process.env.NODE_ENV==="production",ma="Invariant failed";function td(e,t){if(Lg)throw new Error(ma);var n=typeof t=="function"?t():t,r=n?"".concat(ma,": ").concat(n):ma;throw new Error(r)}var Bt=function(t){var n=t.top,r=t.right,s=t.bottom,a=t.left,l=r-a,c=s-n,p={top:n,right:r,bottom:s,left:a,width:l,height:c,x:a,y:n,center:{x:(r+a)/2,y:(s+n)/2}};return p},fa=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},nd=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Pg=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},ha={top:0,right:0,bottom:0,left:0},Sa=function(t){var n=t.borderBox,r=t.margin,s=r===void 0?ha:r,a=t.border,l=a===void 0?ha:a,c=t.padding,p=c===void 0?ha:c,m=Bt(fa(n,s)),f=Bt(nd(n,l)),u=Bt(nd(f,p));return{marginBox:m,borderBox:Bt(n),paddingBox:f,contentBox:u,margin:s,border:l,padding:p}},Mt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var s=Number(n);return isNaN(s)&&(process.env.NODE_ENV!=="production"?td(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):td()),s},Rg=function(){return{x:window.pageXOffset,y:window.pageYOffset}},_o=function(t,n){var r=t.borderBox,s=t.border,a=t.margin,l=t.padding,c=Pg(r,n);return Sa({borderBox:c,border:s,margin:a,padding:l})},Oo=function(t,n){return n===void 0&&(n=Rg()),_o(t,n)},rd=function(t,n){var r={top:Mt(n.marginTop),right:Mt(n.marginRight),bottom:Mt(n.marginBottom),left:Mt(n.marginLeft)},s={top:Mt(n.paddingTop),right:Mt(n.paddingRight),bottom:Mt(n.paddingBottom),left:Mt(n.paddingLeft)},a={top:Mt(n.borderTopWidth),right:Mt(n.borderRightWidth),bottom:Mt(n.borderBottomWidth),left:Mt(n.borderLeftWidth)};return Sa({borderBox:t,margin:r,padding:s,border:a})},od=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return rd(n,r)},sd=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Bg(e,t){return!!(e===t||sd(e)&&sd(t))}function Ag(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Bg(e[n],t[n]))return!1;return!0}function rt(e,t){t===void 0&&(t=Ag);var n,r=[],s,a=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return a&&n===this&&t(c,r)||(s=e.apply(this,c),a=!0,n=this,r=c),s}return l}var Vr=function(t){var n=[],r=null,s=function(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return s.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},s},Fg=process.env.NODE_ENV==="production",Vg=/[ \t]{2,}/g,$g=/^[ \t]*/gm,ad=function(t){return t.replace(Vg," ").replace($g,"").trim()},Kg=function(t){return ad(`
359
+ */var Yc;function XS(){return Yc||(Yc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,s=60114,a=60109,l=60110,c=60112,p=60113,m=60120,f=60115,u=60116,h=60121,S=60122,y=60117,T=60129,E=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),s=w("react.profiler"),a=w("react.provider"),l=w("react.context"),c=w("react.forward_ref"),p=w("react.suspense"),m=w("react.suspense_list"),f=w("react.memo"),u=w("react.lazy"),h=w("react.block"),S=w("react.server.block"),y=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),T=w("react.debug_trace_mode"),w("react.offscreen"),E=w("react.legacy_hidden")}var N=!1;function M(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===s||ie===T||ie===r||ie===p||ie===m||ie===E||N||typeof ie=="object"&&ie!==null&&(ie.$$typeof===u||ie.$$typeof===f||ie.$$typeof===a||ie.$$typeof===l||ie.$$typeof===c||ie.$$typeof===y||ie.$$typeof===h||ie[0]===S))}function I(ie){if(typeof ie=="object"&&ie!==null){var ae=ie.$$typeof;switch(ae){case e:var we=ie.type;switch(we){case n:case s:case r:case p:case m:return we;default:var Ae=we&&we.$$typeof;switch(Ae){case l:case c:case u:case f:case a:return Ae;default:return ae}}case t:return ae}}}var k=l,V=a,B=e,C=c,P=n,L=u,H=f,q=t,_=s,ee=r,A=p,te=!1,$=!1;function Z(ie){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function se(ie){return $||($=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ie){return I(ie)===l}function z(ie){return I(ie)===a}function re(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function ne(ie){return I(ie)===c}function U(ie){return I(ie)===n}function R(ie){return I(ie)===u}function j(ie){return I(ie)===f}function X(ie){return I(ie)===t}function oe(ie){return I(ie)===s}function le(ie){return I(ie)===r}function de(ie){return I(ie)===p}Ve.ContextConsumer=k,Ve.ContextProvider=V,Ve.Element=B,Ve.ForwardRef=C,Ve.Fragment=P,Ve.Lazy=L,Ve.Memo=H,Ve.Portal=q,Ve.Profiler=_,Ve.StrictMode=ee,Ve.Suspense=A,Ve.isAsyncMode=Z,Ve.isConcurrentMode=se,Ve.isContextConsumer=W,Ve.isContextProvider=z,Ve.isElement=re,Ve.isForwardRef=ne,Ve.isFragment=U,Ve.isLazy=R,Ve.isMemo=j,Ve.isPortal=X,Ve.isProfiler=oe,Ve.isStrictMode=le,Ve.isSuspense=de,Ve.isValidElementType=M,Ve.typeOf=I}()),Ve}process.env.NODE_ENV==="production"?la.exports=ZS():la.exports=XS();var Uc=la.exports,QS=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],eg=["reactReduxForwardedRef"],tg=[],ng=[null,null],rg=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function og(e,t){var n=e[1];return[t.payload,n+1]}function zc(e,t,n){Bc(function(){return e.apply(void 0,t)},n)}function sg(e,t,n,r,s,a,l){e.current=r,t.current=s,n.current=!1,a.current&&(a.current=null,l())}function ag(e,t,n,r,s,a,l,c,p,m){if(e){var f=!1,u=null,h=function(){if(!f){var T=t.getState(),E,w;try{E=r(T,s.current)}catch(N){w=N,u=N}w||(u=null),E===a.current?l.current||p():(a.current=E,c.current=E,l.current=!0,m({type:"STORE_UPDATED",payload:{error:w}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var ig=function(){return[null,0]};function lg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,s=r===void 0?function(V){return"ConnectAdvanced("+V+")"}:r,a=n.methodName,l=a===void 0?"connectAdvanced":a,c=n.renderCountProp,p=c===void 0?void 0:c,m=n.shouldHandleStateChanges,f=m===void 0?!0:m,u=n.storeKey,h=u===void 0?"store":u,S=n.withRef,y=S===void 0?!1:S,T=n.forwardRef,E=T===void 0?!1:T,w=n.context,N=w===void 0?sa:w,M=Mo(n,QS);if(process.env.NODE_ENV!=="production"){if(p!==void 0)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(y)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var I="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";if(h!=="store")throw new Error("storeKey has been removed and does not do anything. "+I)}var k=N;return function(B){if(process.env.NODE_ENV!=="production"&&!Uc.isValidElementType(B))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+rg(B)));var C=B.displayName||B.name||"Component",P=s(C),L=ve({},M,{getDisplayName:s,methodName:l,renderCountProp:p,shouldHandleStateChanges:f,storeKey:h,displayName:P,wrappedComponentName:C,WrappedComponent:B}),H=M.pure;function q($){return e($.dispatch,L)}var _=H?x.useMemo:function($){return $()};function ee($){var Z=x.useMemo(function(){var Ie=$.reactReduxForwardedRef,Qe=Mo($,eg);return[$.context,Ie,Qe]},[$]),se=Z[0],W=Z[1],z=Z[2],re=x.useMemo(function(){return se&&se.Consumer&&Uc.isContextConsumer(x.createElement(se.Consumer,null))?se:k},[se,k]),ne=x.useContext(re),U=!!$.store&&!!$.store.getState&&!!$.store.dispatch,R=!!ne&&!!ne.store;if(process.env.NODE_ENV!=="production"&&!U&&!R)throw new Error('Could not find "store" in the context of '+('"'+P+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+P+" in connect options."));var j=U?$.store:ne.store,X=x.useMemo(function(){return q(j)},[j]),oe=x.useMemo(function(){if(!f)return ng;var Ie=Rc(j,U?null:ne.subscription),Qe=Ie.notifyNestedSubs.bind(Ie);return[Ie,Qe]},[j,U,ne]),le=oe[0],de=oe[1],ie=x.useMemo(function(){return U?ne:ve({},ne,{subscription:le})},[U,ne,le]),ae=x.useReducer(og,tg,ig),we=ae[0],Ae=we[0],Je=ae[1];if(Ae&&Ae.error)throw Ae.error;var dt=x.useRef(),St=x.useRef(z),pt=x.useRef(),ge=x.useRef(!1),ze=_(function(){return pt.current&&z===St.current?pt.current:X(j.getState(),z)},[j,Ae,z]);zc(sg,[St,dt,ge,z,ze,pt,de]),zc(ag,[f,j,le,X,St,dt,ge,pt,de,Je],[j,le,X]);var De=x.useMemo(function(){return x.createElement(B,ve({},ze,{ref:W}))},[W,B,ze]),ye=x.useMemo(function(){return f?x.createElement(re.Provider,{value:ie},De):De},[re,De,ie]);return ye}var A=H?x.memo(ee):ee;if(A.WrappedComponent=B,A.displayName=ee.displayName=P,E){var te=x.forwardRef(function(Z,se){return x.createElement(A,ve({},Z,{reactReduxForwardedRef:se}))});return te.displayName=P,te.WrappedComponent=B,Wc(te,B)}return Wc(A,B)}}function jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ca(e,t){if(jc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var s=0;s<n.length;s++)if(!Object.prototype.hasOwnProperty.call(t,n[s])||!jc(e[n[s]],t[n[s]]))return!1;return!0}function cg(e,t){var n={},r=function(l){var c=e[l];typeof c=="function"&&(n[l]=function(){return t(c.apply(void 0,arguments))})};for(var s in e)r(s);return n}function dg(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function qc(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Jc(e,t,n){dg(e)||qc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function da(e){return function(n,r){var s=e(n,r);function a(){return s}return a.dependsOnOwnProps=!1,a}}function Zc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function Xc(e,t){return function(r,s){var a=s.displayName,l=function(p,m){return l.dependsOnOwnProps?l.mapToProps(p,m):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,m){l.mapToProps=e,l.dependsOnOwnProps=Zc(e);var f=l(p,m);return typeof f=="function"&&(l.mapToProps=f,l.dependsOnOwnProps=Zc(f),f=l(p,m)),process.env.NODE_ENV!=="production"&&Jc(f,a,t),f},l}}function pg(e){return typeof e=="function"?Xc(e,"mapDispatchToProps"):void 0}function ug(e){return e?void 0:da(function(t){return{dispatch:t}})}function mg(e){return e&&typeof e=="object"?da(function(t){return cg(e,t)}):void 0}const fg=[pg,ug,mg];function hg(e){return typeof e=="function"?Xc(e,"mapStateToProps"):void 0}function Sg(e){return e?void 0:da(function(){return{}})}const gg=[hg,Sg];function bg(e,t,n){return ve({},n,e,t)}function vg(e){return function(n,r){var s=r.displayName,a=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(f,u,h){var S=e(f,u,h);return c?(!a||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&Jc(p,s,"mergeProps")),p}}}function yg(e){return typeof e=="function"?vg(e):void 0}function Tg(e){return e?void 0:function(){return bg}}const Eg=[yg,Tg];function pa(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||qc("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function wg(e,t,n,r){pa(e,"mapStateToProps",r),pa(t,"mapDispatchToProps",r),pa(n,"mergeProps",r)}var Cg=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Dg(e,t,n,r){return function(a,l){return n(e(a,l),t(r,l),l)}}function Ng(e,t,n,r,s){var a=s.areStatesEqual,l=s.areOwnPropsEqual,c=s.areStatePropsEqual,p=!1,m,f,u,h,S;function y(M,I){return m=M,f=I,u=e(m,f),h=t(r,f),S=n(u,h,f),p=!0,S}function T(){return u=e(m,f),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function E(){return e.dependsOnOwnProps&&(u=e(m,f)),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function w(){var M=e(m,f),I=!c(M,u);return u=M,I&&(S=n(u,h,f)),S}function N(M,I){var k=!l(I,f),V=!a(M,m,I,f);return m=M,f=I,k&&V?T():k?E():V?w():S}return function(I,k){return p?N(I,k):y(I,k)}}function kg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,s=t.initMergeProps,a=Mo(t,Cg),l=n(e,a),c=r(e,a),p=s(e,a);process.env.NODE_ENV!=="production"&&wg(l,c,p,a.displayName);var m=a.pure?Ng:Dg;return m(l,c,p,e,a)}var Ig=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ua(e,t,n){for(var r=t.length-1;r>=0;r--){var s=t[r](e);if(s)return s}return function(a,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function xg(e,t){return e===t}function Mg(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?lg:n,s=t.mapStateToPropsFactories,a=s===void 0?gg:s,l=t.mapDispatchToPropsFactories,c=l===void 0?fg:l,p=t.mergePropsFactories,m=p===void 0?Eg:p,f=t.selectorFactory,u=f===void 0?kg:f;return function(S,y,T,E){E===void 0&&(E={});var w=E,N=w.pure,M=N===void 0?!0:N,I=w.areStatesEqual,k=I===void 0?xg:I,V=w.areOwnPropsEqual,B=V===void 0?ca:V,C=w.areStatePropsEqual,P=C===void 0?ca:C,L=w.areMergedPropsEqual,H=L===void 0?ca:L,q=Mo(w,Ig),_=ua(S,a,"mapStateToProps"),ee=ua(y,c,"mapDispatchToProps"),A=ua(T,m,"mergeProps");return r(u,ve({methodName:"connect",getDisplayName:function($){return"Connect("+$+")"},shouldHandleStateChanges:!!S,initMapStateToProps:_,initMapDispatchToProps:ee,initMergeProps:A,pure:M,areStatesEqual:k,areOwnPropsEqual:B,areStatePropsEqual:P,areMergedPropsEqual:H},q))}}const Qc=Mg();$S(vo.unstable_batchedUpdates);function _g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ed(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),s=x.useRef(n),a=r.current||!!(t&&s.current.inputs&&_g(t,s.current.inputs)),l=a?s.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,s.current=l},[l]),l.result}function Og(e,t){return ed(function(){return e},t)}var Me=ed,Se=Og,Lg=process.env.NODE_ENV==="production",ma="Invariant failed";function td(e,t){if(Lg)throw new Error(ma);var n=typeof t=="function"?t():t,r=n?"".concat(ma,": ").concat(n):ma;throw new Error(r)}var Bt=function(t){var n=t.top,r=t.right,s=t.bottom,a=t.left,l=r-a,c=s-n,p={top:n,right:r,bottom:s,left:a,width:l,height:c,x:a,y:n,center:{x:(r+a)/2,y:(s+n)/2}};return p},fa=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},nd=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Pg=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},ha={top:0,right:0,bottom:0,left:0},Sa=function(t){var n=t.borderBox,r=t.margin,s=r===void 0?ha:r,a=t.border,l=a===void 0?ha:a,c=t.padding,p=c===void 0?ha:c,m=Bt(fa(n,s)),f=Bt(nd(n,l)),u=Bt(nd(f,p));return{marginBox:m,borderBox:Bt(n),paddingBox:f,contentBox:u,margin:s,border:l,padding:p}},Mt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var s=Number(n);return isNaN(s)&&(process.env.NODE_ENV!=="production"?td(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):td()),s},Rg=function(){return{x:window.pageXOffset,y:window.pageYOffset}},_o=function(t,n){var r=t.borderBox,s=t.border,a=t.margin,l=t.padding,c=Pg(r,n);return Sa({borderBox:c,border:s,margin:a,padding:l})},Oo=function(t,n){return n===void 0&&(n=Rg()),_o(t,n)},rd=function(t,n){var r={top:Mt(n.marginTop),right:Mt(n.marginRight),bottom:Mt(n.marginBottom),left:Mt(n.marginLeft)},s={top:Mt(n.paddingTop),right:Mt(n.paddingRight),bottom:Mt(n.paddingBottom),left:Mt(n.paddingLeft)},a={top:Mt(n.borderTopWidth),right:Mt(n.borderRightWidth),bottom:Mt(n.borderBottomWidth),left:Mt(n.borderLeftWidth)};return Sa({borderBox:t,margin:r,padding:s,border:a})},od=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return rd(n,r)},sd=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Bg(e,t){return!!(e===t||sd(e)&&sd(t))}function Ag(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Bg(e[n],t[n]))return!1;return!0}function rt(e,t){t===void 0&&(t=Ag);var n,r=[],s,a=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return a&&n===this&&t(c,r)||(s=e.apply(this,c),a=!0,n=this,r=c),s}return l}var Vr=function(t){var n=[],r=null,s=function(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return s.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},s},Fg=process.env.NODE_ENV==="production",Vg=/[ \t]{2,}/g,$g=/^[ \t]*/gm,ad=function(t){return t.replace(Vg," ").replace($g,"").trim()},Kg=function(t){return ad(`
360
360
  %creact-beautiful-dnd
361
361
 
362
362
  %c`+ad(t)+`
@@ -1510,7 +1510,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ae=ie(X,de,U,R,j+"."
1510
1510
  </div>
1511
1511
  );
1512
1512
  }
1513
- `}}}},$E=ko||Ks,KE={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",notClearable:"boolean",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",onChange:"ChangeEventHandler",onOpen:"OnOpenHandler",placeholder:"string",searchDebounce:"number",searchPlaceholder:"string",tallOptionList:"boolean",textKey:"string",valueKey:"string",value:"any",zeroState:"string",autoFixWidth:"boolean",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",onBeforeChange:"(value: string) => boolean | Promise<boolean>"},Gn=o.forwardRef((e,t)=>{const{action:n,autoFixWidth:r=!1,captionKey:s,className:a,comparisonKey:l,disabled:c,formControl:p,formMeta:m,id:f,notClearable:u,options:h,onChange:S,onClick:y,onOpen:T,placeholder:E,searchDebounce:w,searchPlaceholder:N="Search…",tallOptionList:M,textKey:I,valueKey:k,unsafelyReplaceClassName:V,value:B,zeroState:C,loading:P,filterByTextAndCaptionKey:L,maxHeightOptionListPx:H,maxHeightOptionListRem:q,"data-testid":_,disableOptionsMemoization:ee,disableDefaultOptionsFiltering:A,onBeforeChange:te,...$}=e,Z=m||p,{wrapperId:se,controlId:W}=vt(f,Z),z=o.useRef(null),re=o.useRef(null),ne=o.useRef(null),{t:U}=o.useContext(He),[R,j]=qt({isOpen:!1,value:B,text:"",keyDown:null,opensUpward:!1,optionIds:""});function X(ge){j({value:ge,text:ge&&I?ge[I]:ge})}async function oe(ge){if(te&&!await te(ge==null?void 0:ge.value))return;X(ge);const je=ge&&k&&typeof ge=="object"?ge[k]:ge;Z&&(Z.setValue(je),Z.markAsDirty()),S&&S(new gn({value:je}))}o.useEffect(()=>{X(B)},[B,I]);function le(){oe(void 0)}function de(){j({isOpen:!1})}function ie(ge){ge.nativeEvent.stopImmediatePropagation(),c||j({isOpen:!R.isOpen})}function ae(ge){c||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(ge.key)>-1&&ge.preventDefault(),ge.persist(),j({keyDown:ge}))}function we(ge){j({isOpen:ge})}function Ae(ge){j({opensUpward:ge})}function Je(ge){ge.detail!==se&&j({isOpen:!1})}function dt(ge){j({optionIds:new Array(ge).fill("").map((je,De)=>`${se}-options-option-${De}`).join(",")})}o.useEffect(()=>(document.addEventListener("click",de),document.addEventListener("DropdownOpened",Je),()=>{document.removeEventListener("click",de),document.removeEventListener("DropdownOpened",Je)}),[]),o.useLayoutEffect(()=>{if(r&&ne.current&&z.current){z.current.style.width="";const je=`${z.current.getBoundingClientRect().width+6}px`;z.current.style.width=je,ne.current.style.width=je,ne.current.style.maxWidth=je}}),Gs(()=>{if(R.isOpen){re.current&&$E(re.current,{scrollMode:"if-needed"}),T==null||T();const ge=document.createEvent("CustomEvent");ge.initCustomEvent("DropdownOpened",!1,!1,se),document.dispatchEvent(ge)}},[R.isOpen]),o.useImperativeHandle(t,()=>({focus:()=>{var ge;(ge=re.current)==null||ge.focus()}})),o.useEffect(()=>{let ge;return R.isOpen&&(ge=()=>{j({isOpen:!1})},window.addEventListener("resize",ge)),()=>{ge&&window.removeEventListener("resize",ge)}},[R.isOpen]),xo({isOpen:R.isOpen,rootRef:re});const St=Y(V||"sps-select",R.isOpen&&"sps-select--open",R.isOpen&&"z-stratum-dropdown",R.opensUpward&&"sps-select--opens-upward",a),pt=R.text||E||U("design-system:select.defaultPlaceholder");return o.createElement(at,{id:se,className:St,onKeyDown:ae,formControl:p,formMeta:m,ref:re,role:"listbox","aria-owns":R.optionIds,"data-testid":_,onClick:y,...$},o.createElement("div",{className:Y("sps-select__dropctrl",c&&"disabled"),id:W,tabIndex:0,onClick:ie,ref:ne,title:pt,"data-testid":`${_}-dropctrl`},o.createElement("div",{className:"sps-select__dropctrl-content"},o.createElement("span",{className:Y("sps-select__value",!R.text&&"sps-select__value--placeholder"),"data-testid":`${_}-value`},pt),R.value&&!u&&!c&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:le,"data-testid":`${_}-clear-value`}),o.createElement("i",{className:"sps-icon sps-icon-chevron-down sps-select__dropctrl-icon"}))),o.createElement(Br,{id:`${se}-options`,ref:z,attachTo:ne,captionKey:s,comparisonKey:l,isOpen:R.isOpen,keyDown:R.keyDown,options:h,onOptionSelected:oe,onPositionFlip:Ae,onSelfToggle:we,searchDebounce:w,searchPlaceholder:N,selectedOption:R.value,specialAction:n,tall:M,textKey:I,filterByTextAndCaptionKey:L,optionRole:"option",valueKey:k,onOptionListChanged:dt,zeroState:C,ignoreWidthStyles:r,loading:P,maxHeightPx:H,maxHeightRem:q,disableOptionsMemoization:ee,disableDefaultOptionsFiltering:A,"data-testid":`${_}-option-list`}))});Object.assign(Gn,{props:KE,displayName:"SpsSelect"});const eu={general:{label:"General Usage",description:({NavigateTo:e})=>x.createElement(x.Fragment,null,x.createElement("h5",null,"Use a Select:"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"When a list of predetermined values can be provided.")),x.createElement("h5",null,"Do Not Use a Select:"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",x.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",x.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead."),x.createElement("li",{className:"mb-2"},"When it is ideal to display all available options without requiring a click. Consider"," ",x.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",x.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead.")),x.createElement("h5",null,"Using Selects in a Form"),x.createElement("p",null,"Reference the ",x.createElement(e,{to:"form"},"Forms")," page for guidelines for placing inputs in Form layouts"))},basic:{label:"Basic Select",description:()=>x.createElement("p",null,"Basic Selects include a label and dropdown menu containing a list of options. The user is allowed to make a single selection."),examples:{basic:{react:v.code`
1513
+ `}}}},$E=ko||Ks,KE={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",notClearable:"boolean",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",onChange:"ChangeEventHandler",onOpen:"OnOpenHandler",placeholder:"string",searchDebounce:"number",searchPlaceholder:"string",tallOptionList:"boolean",textKey:"string",valueKey:"string",value:"any",zeroState:"string",autoFixWidth:"boolean",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",onBeforeChange:"(value: string) => boolean | Promise<boolean>"},Gn=o.forwardRef((e,t)=>{const{action:n,autoFixWidth:r=!1,captionKey:s,className:a,comparisonKey:l,disabled:c,formControl:p,formMeta:m,id:f,notClearable:u,options:h,onChange:S,onClick:y,onOpen:T,placeholder:E,searchDebounce:w,searchPlaceholder:N="Search…",tallOptionList:M,textKey:I,valueKey:k,unsafelyReplaceClassName:V,value:B,zeroState:C,loading:P,filterByTextAndCaptionKey:L,maxHeightOptionListPx:H,maxHeightOptionListRem:q,"data-testid":_,disableOptionsMemoization:ee,disableDefaultOptionsFiltering:A,onBeforeChange:te,...$}=e,Z=m||p,{wrapperId:se,controlId:W}=vt(f,Z),z=o.useRef(null),re=o.useRef(null),ne=o.useRef(null),{t:U}=o.useContext(He),[R,j]=qt({isOpen:!1,value:B,text:"",keyDown:null,opensUpward:!1,optionIds:""});function X(ge){j({value:ge,text:ge&&I?ge[I]:ge})}async function oe(ge){const ze=ge&&k&&typeof ge=="object"?ge[k]:ge;te&&!await te(ze)||(X(ge),Z&&(Z.setValue(ze),Z.markAsDirty()),S&&S(new gn({value:ze})))}o.useEffect(()=>{X(B)},[B,I]);function le(){oe(void 0)}function de(){j({isOpen:!1})}function ie(ge){ge.nativeEvent.stopImmediatePropagation(),c||j({isOpen:!R.isOpen})}function ae(ge){c||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(ge.key)>-1&&ge.preventDefault(),ge.persist(),j({keyDown:ge}))}function we(ge){j({isOpen:ge})}function Ae(ge){j({opensUpward:ge})}function Je(ge){ge.detail!==se&&j({isOpen:!1})}function dt(ge){j({optionIds:new Array(ge).fill("").map((ze,De)=>`${se}-options-option-${De}`).join(",")})}o.useEffect(()=>(document.addEventListener("click",de),document.addEventListener("DropdownOpened",Je),()=>{document.removeEventListener("click",de),document.removeEventListener("DropdownOpened",Je)}),[]),o.useLayoutEffect(()=>{if(r&&ne.current&&z.current){z.current.style.width="";const ze=`${z.current.getBoundingClientRect().width+6}px`;z.current.style.width=ze,ne.current.style.width=ze,ne.current.style.maxWidth=ze}}),Gs(()=>{if(R.isOpen){re.current&&$E(re.current,{scrollMode:"if-needed"}),T==null||T();const ge=document.createEvent("CustomEvent");ge.initCustomEvent("DropdownOpened",!1,!1,se),document.dispatchEvent(ge)}},[R.isOpen]),o.useImperativeHandle(t,()=>({focus:()=>{var ge;(ge=re.current)==null||ge.focus()}})),o.useEffect(()=>{let ge;return R.isOpen&&(ge=()=>{j({isOpen:!1})},window.addEventListener("resize",ge)),()=>{ge&&window.removeEventListener("resize",ge)}},[R.isOpen]),xo({isOpen:R.isOpen,rootRef:re});const St=Y(V||"sps-select",R.isOpen&&"sps-select--open",R.isOpen&&"z-stratum-dropdown",R.opensUpward&&"sps-select--opens-upward",a),pt=R.text||E||U("design-system:select.defaultPlaceholder");return o.createElement(at,{id:se,className:St,onKeyDown:ae,formControl:p,formMeta:m,ref:re,role:"listbox","aria-owns":R.optionIds,"data-testid":_,onClick:y,...$},o.createElement("div",{className:Y("sps-select__dropctrl",c&&"disabled"),id:W,tabIndex:0,onClick:ie,ref:ne,title:pt,"data-testid":`${_}-dropctrl`},o.createElement("div",{className:"sps-select__dropctrl-content"},o.createElement("span",{className:Y("sps-select__value",!R.text&&"sps-select__value--placeholder"),"data-testid":`${_}-value`},pt),R.value&&!u&&!c&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:le,"data-testid":`${_}-clear-value`}),o.createElement("i",{className:"sps-icon sps-icon-chevron-down sps-select__dropctrl-icon"}))),o.createElement(Br,{id:`${se}-options`,ref:z,attachTo:ne,captionKey:s,comparisonKey:l,isOpen:R.isOpen,keyDown:R.keyDown,options:h,onOptionSelected:oe,onPositionFlip:Ae,onSelfToggle:we,searchDebounce:w,searchPlaceholder:N,selectedOption:R.value,specialAction:n,tall:M,textKey:I,filterByTextAndCaptionKey:L,optionRole:"option",valueKey:k,onOptionListChanged:dt,zeroState:C,ignoreWidthStyles:r,loading:P,maxHeightPx:H,maxHeightRem:q,disableOptionsMemoization:ee,disableDefaultOptionsFiltering:A,"data-testid":`${_}-option-list`}))});Object.assign(Gn,{props:KE,displayName:"SpsSelect"});const eu={general:{label:"General Usage",description:({NavigateTo:e})=>x.createElement(x.Fragment,null,x.createElement("h5",null,"Use a Select:"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"When a list of predetermined values can be provided.")),x.createElement("h5",null,"Do Not Use a Select:"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",x.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",x.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead."),x.createElement("li",{className:"mb-2"},"When it is ideal to display all available options without requiring a click. Consider"," ",x.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",x.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead.")),x.createElement("h5",null,"Using Selects in a Form"),x.createElement("p",null,"Reference the ",x.createElement(e,{to:"form"},"Forms")," page for guidelines for placing inputs in Form layouts"))},basic:{label:"Basic Select",description:()=>x.createElement("p",null,"Basic Selects include a label and dropdown menu containing a list of options. The user is allowed to make a single selection."),examples:{basic:{react:v.code`
1514
1514
  import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
1515
1515
  function DemoComponent() {
1516
1516
  const colors = ["red", "blue", "green"];
@@ -1823,7 +1823,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ae=ie(X,de,U,R,j+"."
1823
1823
  </div>
1824
1824
  );
1825
1825
  }
1826
- `}}}},HE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function vr({children:e,className:t,formArray:n,formGroup:r,formMeta:s,stacked:a,"data-testid":l,unsafelyReplaceClassName:c,...p}){const m=r||n,f=m||s,[u,h]=o.useState(!1);o.useEffect(()=>{if(f){const y=f.isFocused();!u&&y&&f.onFocus?f.onFocus():u&&!y&&f.onBlur&&f.onBlur(),h(y)}});const S=Y(c||"sps-form-group",(m&&m.invalid||s&&(!s.isValid()||!s.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:S,"data-testid":l,...p},o.createElement("div",{className:Y("sps-input-group",a&&"sps-input-group--stacked")},e))}Object.assign(vr,{props:HE,displayName:"SpsInputGroup"});const WE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string",placeholder12h:"string",placeholder24h:"string"},tu="sps-datepicker",nu=["AM","PM"],ru=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"design-system:datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function mi({className:e,disabled:t,formMeta:n,id:r,maxDate:s,minDate:a,onChange:l,presets:c=ru,value:p,showTwoMonths:m=!1,twentyFourHour:f=!1,format:u,"data-testid":h,placeholder24h:S="00:00",placeholder12h:y="12:00"}){const{t:T}=o.useContext(He),{wrapperId:E,controlId:w}=vt(r&&`${r}_from`,n),{wrapperId:N,controlId:M}=vt(r&&`${r}_to`,n),I=o.useRef(null),k=o.useRef(null),V=o.useRef(null),B=o.useRef(null),C=o.useRef(null),P=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,f,u),L=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,f,u),[H,q]=o.useState(P[0]),[_,ee]=o.useState(L[0]),[A,te]=o.useState(P[1]),[$,Z]=o.useState(L[1]),[se,W]=o.useState(P[2]),[z,re]=o.useState(L[2]),[ne,U]=o.useState(null),{showPopup:R,doShowPopup:j,doHidePopup:X}=pr(I,C);function oe(ue){n&&(n.setValue(ue),n.markAsDirty()),l&&l(ue)}function le(ue){return ue&&/^design-system:/.test(ue.label)?T(ue.label):ue.label}const de=ne&&le(ne)==="Before",ie=ne&&le(ne)==="After";function ae(ue){const he=p||[],Oe=Q.toMoment(ue);let lt;if(de)lt=[null,Oe],X(!0);else if(ie)lt=[Oe,null],X(!0);else if(!he[0]||he[1]||Oe!=null&&Oe.isBefore(he[0])){let Ne=parseInt((A==null?void 0:A.split(":")[0])||"0",10);!f&&Ne===12&&(Ne=0);const gt=parseInt((A==null?void 0:A.split(":")[1])||"0",10);Oe==null||Oe.set("hour",se==="PM"?12+Ne:Ne<12?Ne:0),Oe==null||Oe.set("minute",gt),lt=[Oe,null],U(null)}else{let Ne=parseInt(($==null?void 0:$.split(":")[0])||"0",10);!f&&Ne===12&&(Ne=0);const gt=parseInt(($==null?void 0:$.split(":")[1])||"0",10);Oe==null||Oe.set("hour",z==="PM"?12+Ne:Ne),Oe==null||Oe.set("minute",gt),lt=[he[0],Oe],X(!0),U(null)}oe(lt)}function we(ue){q(ue.target.value)}function Ae(ue){Q.validateTimeString(ue.target.value,f)&&te(ue.target.value)}function Je(ue,he,Oe){const lt=H,Ne=he??A,gt=se;if(lt===P[0]&&Ne===P[1]&&gt===P[2])return;const Et=Q.createFrom(lt,u);if(Et&&Q.isValid(Et)){const Be=Q.toMoment(Et);let ct=parseInt((Ne==null?void 0:Ne.split(":")[0])||"0",10);!f&&ct===12&&(ct=0);const Qn=parseInt((Ne==null?void 0:Ne.split(":")[1])||"0",10);Be==null||Be.set("hour",gt==="PM"?12+ct:ct),Be==null||Be.set("minute",Qn);const Kt=[Be,(Be==null?void 0:Be.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];oe(Kt)}}function dt(ue){Q.validateTimeString(ue??A,f)&&(te(Q.padIncompleteTimeString(ue??A,f)),setTimeout(()=>Je(void 0,ue),0))}function St(ue){W(ue.target.value)}function pt(ue){Q.validateTimeString(ue,f)&&(te(ue),setTimeout(()=>dt(ue),0))}o.useEffect(()=>{se!==P[2]&&Je()},[se]);function ge(ue){ee(ue.target.value)}function je(ue){Q.validateTimeString(ue.target.value,f)&&Z(ue.target.value)}function De(ue,he,Oe){const lt=_,Ne=he??$,gt=z;if(lt===L[0]&&Ne===L[1]&&gt===L[2])return;const Et=Q.createFrom(lt,u);if(Et&&Q.isValid(Et)){const Be=Q.toMoment(Et);let ct=parseInt((Ne==null?void 0:Ne.split(":")[0])||"0",10);!f&&ct===12&&(ct=0);const Qn=parseInt((Ne==null?void 0:Ne.split(":")[1])||"0",10);Be==null||Be.set("hour",gt==="PM"?12+ct:ct),Be==null||Be.set("minute",Qn);const Kt=[(Be==null?void 0:Be.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Be];oe(Kt)}}function ye(ue){Q.validateTimeString(ue??$,f)&&(Z(Q.padIncompleteTimeString(ue??$,f)),setTimeout(()=>De(void 0,ue),0))}function Ie(ue){re(ue.target.value)}function Qe(ue){Q.validateTimeString(ue,f)&&(Z(ue),setTimeout(()=>ye(ue),0))}o.useEffect(()=>{z!==L[2]&&De()},[z]);function $e(){oe([null,null]),U(null)}function et(ue){return function(he){switch(he.key){case"Tab":X();break;case"Backspace":he.target.selectionStart===0&&p&&!Array.isArray(p)&&$e();break;case"Enter":ue==="from"?Je():ue==="to"&&De();break}}}function Xt(ue){if(!ue){U(null),oe([null,null]);return}U(ue);const he=Q.createDateTimeRangeFromPreset(ue);ue&&le(ue)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?oe([null,null]):Array.isArray(p)&&p[0]?oe([null,Q.toMoment(Q.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&oe([null,Q.toMoment(Q.createFrom(p[1],u))]):ue&&le(ue)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?oe([null,null]):Array.isArray(p)&&p[0]?oe([Q.toMoment(Q.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&oe([Q.toMoment(Q.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(he)&&oe([he[0],he[1]])}o.useEffect(()=>{if(p&&Array.isArray(p)){if(p[0]&&!p[1]){const ue=c.find(he=>le(he)==="After");ue&&Xt(ue)}else if(!p[0]&&p[1]){const ue=c.find(he=>le(he)==="Before");ue&&Xt(ue)}else if(p[0]&&p[1]){const ue=Q.toDateTimeStringRange(p,f,u),he=c.find(Oe=>ue===Q.toDateTimeStringRange(Q.createDateTimeRangeFromPreset(Oe),f,u));he&&Xt(he)}}},[]),o.useEffect(()=>{P[0]?q(P[0]):q(""),P[1]?te(P[1]):te(f?"00:00":"12:00"),f||(P[2]?W(P[2]):W("AM")),L[0]?ee(L[0]):ee(""),L[1]?Z(L[1]):Z(f?"00:00":"12:00"),f||(L[2]?re(L[2]):re("AM"))},[P[0],P[1],P[2],L[0],L[1],L[2],f]);const Mn=Y(tu,"sps-text-input",R&&`${tu}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:Y("sps-datetime-range-picker")},o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:E,className:Mn,formMeta:n,inputRef:k,focusInputOnClick:!0,ref:I},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),ne&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},le(ne))),o.createElement("input",{type:"text",ref:k,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:w,placeholder:!H&&!ne?(u==null?void 0:u.toUpperCase())||lr:de?L[0]:ie?P[0]:void 0,onChange:we,onClick:j,onFocus:j,onBlur:()=>Je(),onKeyDown:et("from"),value:ne?"":H,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:$e}))),!ne&&!f?o.createElement(vr,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Rs,zeroState:"Custom time",value:A,onChange:Ae,onBlur:()=>dt(),onSelectionChange:pt,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Gn,{options:nu,value:se,onChange:St,disabled:t,notClearable:!0})):o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Bs,zeroState:"Custom time",value:A,onChange:Ae,onBlur:()=>dt(),onSelectionChange:pt,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0})),!ne&&o.createElement("span",{className:Y("sps-datepicker__to")},"to"),!ne&&o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:N,className:Mn,formMeta:n,inputRef:B,focusInputOnClick:!0,ref:V},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),ne&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},le(ne))),o.createElement("input",{type:"text",ref:B,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:M,placeholder:!_&&!ne?(u==null?void 0:u.toUpperCase())||lr:void 0,onChange:ge,onClick:j,onFocus:j,onKeyDown:et("to"),onBlur:()=>De(),value:_,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:$e}))),f?o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Bs,zeroState:"Custom time",value:$,onChange:je,onBlur:()=>ye(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(vr,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Rs,zeroState:"Custom time",value:$,onChange:je,onBlur:()=>ye(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Gn,{options:nu,value:z,onChange:Ie,disabled:t,notClearable:!0})))),o.createElement(Zo,{isOpen:R,attachTo:I,ref:C},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},T("design-system:datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${E}__range-custom`,className:"sps-custom-control__input",checked:!ne,name:`sps-date-range-picker-${E}__range`,onChange:()=>Xt()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-custom`},T("design-system:datepicker.preset.custom"))),c.map((ue,he)=>o.createElement("div",{key:le(ue),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ue.label}`,id:`sps-date-range-picker-${E}__range-${he}`,name:`sps-date-range-picker-${E}__range`,onChange:()=>Xt(ue),checked:ne!=null&&ne.definition?ne.definition===ue.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-${he}`},le(ue)))))),o.createElement(Jo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[Q.createFrom(p[0],u),Q.createFrom(p[1],u)]:void 0,onNewSelection:ae,minDate:a,maxDate:s,showTwoMonths:m,selectedPreset:ne&&le(ne)})))}Object.assign(mi,{props:WE,displayName:"SpsDateTimeRangePicker"});const ou={basic:{label:"Basic",examples:{basic:{react:v.code`
1826
+ `}}}},HE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function vr({children:e,className:t,formArray:n,formGroup:r,formMeta:s,stacked:a,"data-testid":l,unsafelyReplaceClassName:c,...p}){const m=r||n,f=m||s,[u,h]=o.useState(!1);o.useEffect(()=>{if(f){const y=f.isFocused();!u&&y&&f.onFocus?f.onFocus():u&&!y&&f.onBlur&&f.onBlur(),h(y)}});const S=Y(c||"sps-form-group",(m&&m.invalid||s&&(!s.isValid()||!s.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:S,"data-testid":l,...p},o.createElement("div",{className:Y("sps-input-group",a&&"sps-input-group--stacked")},e))}Object.assign(vr,{props:HE,displayName:"SpsInputGroup"});const WE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string",placeholder12h:"string",placeholder24h:"string"},tu="sps-datepicker",nu=["AM","PM"],ru=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"design-system:datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function mi({className:e,disabled:t,formMeta:n,id:r,maxDate:s,minDate:a,onChange:l,presets:c=ru,value:p,showTwoMonths:m=!1,twentyFourHour:f=!1,format:u,"data-testid":h,placeholder24h:S="00:00",placeholder12h:y="12:00"}){const{t:T}=o.useContext(He),{wrapperId:E,controlId:w}=vt(r&&`${r}_from`,n),{wrapperId:N,controlId:M}=vt(r&&`${r}_to`,n),I=o.useRef(null),k=o.useRef(null),V=o.useRef(null),B=o.useRef(null),C=o.useRef(null),P=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,f,u),L=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,f,u),[H,q]=o.useState(P[0]),[_,ee]=o.useState(L[0]),[A,te]=o.useState(P[1]),[$,Z]=o.useState(L[1]),[se,W]=o.useState(P[2]),[z,re]=o.useState(L[2]),[ne,U]=o.useState(null),{showPopup:R,doShowPopup:j,doHidePopup:X}=pr(I,C);function oe(ue){n&&(n.setValue(ue),n.markAsDirty()),l&&l(ue)}function le(ue){return ue&&/^design-system:/.test(ue.label)?T(ue.label):ue.label}const de=ne&&le(ne)==="Before",ie=ne&&le(ne)==="After";function ae(ue){const he=p||[],Oe=Q.toMoment(ue);let lt;if(de)lt=[null,Oe],X(!0);else if(ie)lt=[Oe,null],X(!0);else if(!he[0]||he[1]||Oe!=null&&Oe.isBefore(he[0])){let Ne=parseInt((A==null?void 0:A.split(":")[0])||"0",10);!f&&Ne===12&&(Ne=0);const gt=parseInt((A==null?void 0:A.split(":")[1])||"0",10);Oe==null||Oe.set("hour",se==="PM"?12+Ne:Ne<12?Ne:0),Oe==null||Oe.set("minute",gt),lt=[Oe,null],U(null)}else{let Ne=parseInt(($==null?void 0:$.split(":")[0])||"0",10);!f&&Ne===12&&(Ne=0);const gt=parseInt(($==null?void 0:$.split(":")[1])||"0",10);Oe==null||Oe.set("hour",z==="PM"?12+Ne:Ne),Oe==null||Oe.set("minute",gt),lt=[he[0],Oe],X(!0),U(null)}oe(lt)}function we(ue){q(ue.target.value)}function Ae(ue){Q.validateTimeString(ue.target.value,f)&&te(ue.target.value)}function Je(ue,he,Oe){const lt=H,Ne=he??A,gt=se;if(lt===P[0]&&Ne===P[1]&&gt===P[2])return;const Et=Q.createFrom(lt,u);if(Et&&Q.isValid(Et)){const Be=Q.toMoment(Et);let ct=parseInt((Ne==null?void 0:Ne.split(":")[0])||"0",10);!f&&ct===12&&(ct=0);const Qn=parseInt((Ne==null?void 0:Ne.split(":")[1])||"0",10);Be==null||Be.set("hour",gt==="PM"?12+ct:ct),Be==null||Be.set("minute",Qn);const Kt=[Be,(Be==null?void 0:Be.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];oe(Kt)}}function dt(ue){Q.validateTimeString(ue??A,f)&&(te(Q.padIncompleteTimeString(ue??A,f)),setTimeout(()=>Je(void 0,ue),0))}function St(ue){W(ue.target.value)}function pt(ue){Q.validateTimeString(ue,f)&&(te(ue),setTimeout(()=>dt(ue),0))}o.useEffect(()=>{se!==P[2]&&Je()},[se]);function ge(ue){ee(ue.target.value)}function ze(ue){Q.validateTimeString(ue.target.value,f)&&Z(ue.target.value)}function De(ue,he,Oe){const lt=_,Ne=he??$,gt=z;if(lt===L[0]&&Ne===L[1]&&gt===L[2])return;const Et=Q.createFrom(lt,u);if(Et&&Q.isValid(Et)){const Be=Q.toMoment(Et);let ct=parseInt((Ne==null?void 0:Ne.split(":")[0])||"0",10);!f&&ct===12&&(ct=0);const Qn=parseInt((Ne==null?void 0:Ne.split(":")[1])||"0",10);Be==null||Be.set("hour",gt==="PM"?12+ct:ct),Be==null||Be.set("minute",Qn);const Kt=[(Be==null?void 0:Be.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Be];oe(Kt)}}function ye(ue){Q.validateTimeString(ue??$,f)&&(Z(Q.padIncompleteTimeString(ue??$,f)),setTimeout(()=>De(void 0,ue),0))}function Ie(ue){re(ue.target.value)}function Qe(ue){Q.validateTimeString(ue,f)&&(Z(ue),setTimeout(()=>ye(ue),0))}o.useEffect(()=>{z!==L[2]&&De()},[z]);function $e(){oe([null,null]),U(null)}function et(ue){return function(he){switch(he.key){case"Tab":X();break;case"Backspace":he.target.selectionStart===0&&p&&!Array.isArray(p)&&$e();break;case"Enter":ue==="from"?Je():ue==="to"&&De();break}}}function Xt(ue){if(!ue){U(null),oe([null,null]);return}U(ue);const he=Q.createDateTimeRangeFromPreset(ue);ue&&le(ue)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?oe([null,null]):Array.isArray(p)&&p[0]?oe([null,Q.toMoment(Q.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&oe([null,Q.toMoment(Q.createFrom(p[1],u))]):ue&&le(ue)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?oe([null,null]):Array.isArray(p)&&p[0]?oe([Q.toMoment(Q.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&oe([Q.toMoment(Q.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(he)&&oe([he[0],he[1]])}o.useEffect(()=>{if(p&&Array.isArray(p)){if(p[0]&&!p[1]){const ue=c.find(he=>le(he)==="After");ue&&Xt(ue)}else if(!p[0]&&p[1]){const ue=c.find(he=>le(he)==="Before");ue&&Xt(ue)}else if(p[0]&&p[1]){const ue=Q.toDateTimeStringRange(p,f,u),he=c.find(Oe=>ue===Q.toDateTimeStringRange(Q.createDateTimeRangeFromPreset(Oe),f,u));he&&Xt(he)}}},[]),o.useEffect(()=>{P[0]?q(P[0]):q(""),P[1]?te(P[1]):te(f?"00:00":"12:00"),f||(P[2]?W(P[2]):W("AM")),L[0]?ee(L[0]):ee(""),L[1]?Z(L[1]):Z(f?"00:00":"12:00"),f||(L[2]?re(L[2]):re("AM"))},[P[0],P[1],P[2],L[0],L[1],L[2],f]);const Mn=Y(tu,"sps-text-input",R&&`${tu}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:Y("sps-datetime-range-picker")},o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:E,className:Mn,formMeta:n,inputRef:k,focusInputOnClick:!0,ref:I},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),ne&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},le(ne))),o.createElement("input",{type:"text",ref:k,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:w,placeholder:!H&&!ne?(u==null?void 0:u.toUpperCase())||lr:de?L[0]:ie?P[0]:void 0,onChange:we,onClick:j,onFocus:j,onBlur:()=>Je(),onKeyDown:et("from"),value:ne?"":H,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:$e}))),!ne&&!f?o.createElement(vr,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Rs,zeroState:"Custom time",value:A,onChange:Ae,onBlur:()=>dt(),onSelectionChange:pt,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Gn,{options:nu,value:se,onChange:St,disabled:t,notClearable:!0})):o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Bs,zeroState:"Custom time",value:A,onChange:Ae,onBlur:()=>dt(),onSelectionChange:pt,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0})),!ne&&o.createElement("span",{className:Y("sps-datepicker__to")},"to"),!ne&&o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:N,className:Mn,formMeta:n,inputRef:B,focusInputOnClick:!0,ref:V},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),ne&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},le(ne))),o.createElement("input",{type:"text",ref:B,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:M,placeholder:!_&&!ne?(u==null?void 0:u.toUpperCase())||lr:void 0,onChange:ge,onClick:j,onFocus:j,onKeyDown:et("to"),onBlur:()=>De(),value:_,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:$e}))),f?o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Bs,zeroState:"Custom time",value:$,onChange:ze,onBlur:()=>ye(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(vr,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Rs,zeroState:"Custom time",value:$,onChange:ze,onBlur:()=>ye(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Gn,{options:nu,value:z,onChange:Ie,disabled:t,notClearable:!0})))),o.createElement(Zo,{isOpen:R,attachTo:I,ref:C},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},T("design-system:datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${E}__range-custom`,className:"sps-custom-control__input",checked:!ne,name:`sps-date-range-picker-${E}__range`,onChange:()=>Xt()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-custom`},T("design-system:datepicker.preset.custom"))),c.map((ue,he)=>o.createElement("div",{key:le(ue),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ue.label}`,id:`sps-date-range-picker-${E}__range-${he}`,name:`sps-date-range-picker-${E}__range`,onChange:()=>Xt(ue),checked:ne!=null&&ne.definition?ne.definition===ue.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-${he}`},le(ue)))))),o.createElement(Jo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[Q.createFrom(p[0],u),Q.createFrom(p[1],u)]:void 0,onNewSelection:ae,minDate:a,maxDate:s,showTwoMonths:m,selectedPreset:ne&&le(ne)})))}Object.assign(mi,{props:WE,displayName:"SpsDateTimeRangePicker"});const ou={basic:{label:"Basic",examples:{basic:{react:v.code`
1827
1827
  import {
1828
1828
  useSpsForm,
1829
1829
  SpsLabel,
@@ -1974,7 +1974,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ae=ie(X,de,U,R,j+"."
1974
1974
  `}}}};function Zt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fi={exports:{}},su;function tn(){return su||(su=1,function(e,t){(function(n,r){e.exports=r()})(Ut,function(){var n;function r(){return n.apply(null,arguments)}function s(i){n=i}function a(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function l(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function c(i,d){return Object.prototype.hasOwnProperty.call(i,d)}function p(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var d;for(d in i)if(c(i,d))return!1;return!0}function m(i){return i===void 0}function f(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function u(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function h(i,d){var g=[],b,D=i.length;for(b=0;b<D;++b)g.push(d(i[b],b));return g}function S(i,d){for(var g in d)c(d,g)&&(i[g]=d[g]);return c(d,"toString")&&(i.toString=d.toString),c(d,"valueOf")&&(i.valueOf=d.valueOf),i}function y(i,d,g,b){return th(i,d,g,b,!0).utc()}function T(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function E(i){return i._pf==null&&(i._pf=T()),i._pf}var w;Array.prototype.some?w=Array.prototype.some:w=function(i){var d=Object(this),g=d.length>>>0,b;for(b=0;b<g;b++)if(b in d&&i.call(this,d[b],b,d))return!0;return!1};function N(i){var d=null,g=!1,b=i._d&&!isNaN(i._d.getTime());if(b&&(d=E(i),g=w.call(d.parsedDateParts,function(D){return D!=null}),b=d.overflow<0&&!d.empty&&!d.invalidEra&&!d.invalidMonth&&!d.invalidWeekday&&!d.weekdayMismatch&&!d.nullInput&&!d.invalidFormat&&!d.userInvalidated&&(!d.meridiem||d.meridiem&&g),i._strict&&(b=b&&d.charsLeftOver===0&&d.unusedTokens.length===0&&d.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=b;else return b;return i._isValid}function M(i){var d=y(NaN);return i!=null?S(E(d),i):E(d).userInvalidated=!0,d}var I=r.momentProperties=[],k=!1;function V(i,d){var g,b,D,F=I.length;if(m(d._isAMomentObject)||(i._isAMomentObject=d._isAMomentObject),m(d._i)||(i._i=d._i),m(d._f)||(i._f=d._f),m(d._l)||(i._l=d._l),m(d._strict)||(i._strict=d._strict),m(d._tzm)||(i._tzm=d._tzm),m(d._isUTC)||(i._isUTC=d._isUTC),m(d._offset)||(i._offset=d._offset),m(d._pf)||(i._pf=E(d)),m(d._locale)||(i._locale=d._locale),F>0)for(g=0;g<F;g++)b=I[g],D=d[b],m(D)||(i[b]=D);return i}function B(i){V(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),k===!1&&(k=!0,r.updateOffset(this),k=!1)}function C(i){return i instanceof B||i!=null&&i._isAMomentObject!=null}function P(i){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+i)}function L(i,d){var g=!0;return S(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,i),g){var b=[],D,F,J,fe=arguments.length;for(F=0;F<fe;F++){if(D="",typeof arguments[F]=="object"){D+=`
1975
1975
  [`+F+"] ";for(J in arguments[0])c(arguments[0],J)&&(D+=J+": "+arguments[0][J]+", ");D=D.slice(0,-2)}else D=arguments[F];b.push(D)}P(i+`
1976
1976
  Arguments: `+Array.prototype.slice.call(b).join("")+`
1977
- `+new Error().stack),g=!1}return d.apply(this,arguments)},d)}var H={};function q(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),H[i]||(P(d),H[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function _(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function ee(i){var d,g;for(g in i)c(i,g)&&(d=i[g],_(d)?this[g]=d:this["_"+g]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function A(i,d){var g=S({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(g[b]={},S(g[b],i[b]),S(g[b],d[b])):d[b]!=null?g[b]=d[b]:delete g[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(g[b]=S({},g[b]));return g}function te(i){i!=null&&this.set(i)}var $;Object.keys?$=Object.keys:$=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var Z={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function se(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return _(b)?b.call(d,g):b}function W(i,d,g){var b=""+Math.abs(i),D=d-b.length,F=i>=0;return(F?g?"+":"":"-")+Math.pow(10,Math.max(0,D)).toString().substr(1)+b}var z=/(\[[^\[]*\])|(\\)?([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,re=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ne={},U={};function R(i,d,g,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(U[i]=D),d&&(U[d[0]]=function(){return W(D.apply(this,arguments),d[1],d[2])}),g&&(U[g]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function j(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function X(i){var d=i.match(z),g,b;for(g=0,b=d.length;g<b;g++)U[d[g]]?d[g]=U[d[g]]:d[g]=j(d[g]);return function(D){var F="",J;for(J=0;J<b;J++)F+=_(d[J])?d[J].call(D,i):d[J];return F}}function oe(i,d){return i.isValid()?(d=le(d,i.localeData()),ne[d]=ne[d]||X(d),ne[d](i)):i.localeData().invalidDate()}function le(i,d){var g=5;function b(D){return d.longDateFormat(D)||D}for(re.lastIndex=0;g>=0&&re.test(i);)i=i.replace(re,b),re.lastIndex=0,g-=1;return i}var de={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 ie(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(z).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var ae="Invalid date";function we(){return this._invalidDate}var Ae="%d",Je=/\d{1,2}/;function dt(i){return this._ordinal.replace("%d",i)}var St={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 pt(i,d,g,b){var D=this._relativeTime[g];return _(D)?D(i,d,g,b):D.replace(/%d/i,i)}function ge(i,d){var g=this._relativeTime[i>0?"future":"past"];return _(g)?g(d):g.replace(/%s/i,d)}var je={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 De(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function ye(i){var d={},g,b;for(b in i)c(i,b)&&(g=De(b),g&&(d[g]=i[b]));return d}var Ie={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 Qe(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:Ie[g]});return d.sort(function(b,D){return b.priority-D.priority}),d}var $e=/\d/,et=/\d\d/,Xt=/\d{3}/,Mn=/\d{4}/,ue=/[+-]?\d{6}/,he=/\d\d?/,Oe=/\d\d\d\d?/,lt=/\d\d\d\d\d\d?/,Ne=/\d{1,3}/,gt=/\d{1,4}/,Et=/[+-]?\d{1,6}/,Be=/\d+/,ct=/[+-]?\d+/,Qn=/Z|[+-]\d\d:?\d\d/gi,Kt=/Z|[+-]\d\d(?::?\d\d)?/gi,be=/[+-]?\d+(\.\d{1,3})?/,Te=/[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,qe=/^[1-9]\d?/,Ht=/^([1-9]\d|\d)/,er;er={};function me(i,d,g){er[i]=_(d)?d:function(b,D){return b&&g?g:d}}function SN(i,d){return c(er,i)?er[i](d._strict,d._locale):new RegExp(gN(i))}function gN(i){return sn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,D,F){return g||b||D||F}))}function sn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Rt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,g=0;return d!==0&&isFinite(d)&&(g=Rt(d)),g}var El={};function Ke(i,d){var g,b=d,D;for(typeof i=="string"&&(i=[i]),f(d)&&(b=function(F,J){J[d]=Ce(F)}),D=i.length,g=0;g<D;g++)El[i[g]]=b}function po(i,d){Ke(i,function(g,b,D,F){D._w=D._w||{},d(g,D._w,D,F)})}function bN(i,d,g){d!=null&&c(El,i)&&El[i](d,g._a,g,i)}function ys(i){return i%4===0&&i%100!==0||i%400===0}var ut=0,an=1,Qt=2,tt=3,Wt=4,ln=5,tr=6,vN=7,yN=8;R("Y",0,0,function(){var i=this.year();return i<=9999?W(i,4):"+"+i}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),me("Y",ct),me("YY",he,et),me("YYYY",gt,Mn),me("YYYYY",Et,ue),me("YYYYYY",Et,ue),Ke(["YYYYY","YYYYYY"],ut),Ke("YYYY",function(i,d){d[ut]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ke("YY",function(i,d){d[ut]=r.parseTwoDigitYear(i)}),Ke("Y",function(i,d){d[ut]=parseInt(i,10)});function uo(i){return ys(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Vf=Nr("FullYear",!0);function TN(){return ys(this.year())}function Nr(i,d){return function(g){return g!=null?($f(this,i,g),r.updateOffset(this,d),this):mo(this,i)}}function mo(i,d){if(!i.isValid())return NaN;var g=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return b?g.getUTCSeconds():g.getSeconds();case"Minutes":return b?g.getUTCMinutes():g.getMinutes();case"Hours":return b?g.getUTCHours():g.getHours();case"Date":return b?g.getUTCDate():g.getDate();case"Day":return b?g.getUTCDay():g.getDay();case"Month":return b?g.getUTCMonth():g.getMonth();case"FullYear":return b?g.getUTCFullYear():g.getFullYear();default:return NaN}}function $f(i,d,g){var b,D,F,J,fe;if(!(!i.isValid()||isNaN(g))){switch(b=i._d,D=i._isUTC,d){case"Milliseconds":return void(D?b.setUTCMilliseconds(g):b.setMilliseconds(g));case"Seconds":return void(D?b.setUTCSeconds(g):b.setSeconds(g));case"Minutes":return void(D?b.setUTCMinutes(g):b.setMinutes(g));case"Hours":return void(D?b.setUTCHours(g):b.setHours(g));case"Date":return void(D?b.setUTCDate(g):b.setDate(g));case"FullYear":break;default:return}F=g,J=i.month(),fe=i.date(),fe=fe===29&&J===1&&!ys(F)?28:fe,D?b.setUTCFullYear(F,J,fe):b.setFullYear(F,J,fe)}}function EN(i){return i=De(i),_(this[i])?this[i]():this}function wN(i,d){if(typeof i=="object"){i=ye(i);var g=Qe(i),b,D=g.length;for(b=0;b<D;b++)this[g[b].unit](i[g[b].unit])}else if(i=De(i),_(this[i]))return this[i](d);return this}function CN(i,d){return(i%d+d)%d}var Ze;Array.prototype.indexOf?Ze=Array.prototype.indexOf:Ze=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function wl(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=CN(d,12);return i+=(d-g)/12,g===1?ys(i)?29:28:31-g%7%2}R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),R("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",he,qe),me("MM",he,et),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),Ke(["M","MM"],function(i,d){d[an]=Ce(i)-1}),Ke(["MMM","MMMM"],function(i,d,g,b){var D=g._locale.monthsParse(i,b,g._strict);D!=null?d[an]=D:E(g).invalidMonth=i});var DN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Kf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Hf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,NN=Te,kN=Te;function IN(i,d){return i?a(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Hf).test(d)?"format":"standalone"][i.month()]:a(this._months)?this._months:this._months.standalone}function xN(i,d){return i?a(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Hf.test(d)?"format":"standalone"][i.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function MN(i,d,g){var b,D,F,J=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)F=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(F,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(F,"").toLocaleLowerCase();return g?d==="MMM"?(D=Ze.call(this._shortMonthsParse,J),D!==-1?D:null):(D=Ze.call(this._longMonthsParse,J),D!==-1?D:null):d==="MMM"?(D=Ze.call(this._shortMonthsParse,J),D!==-1?D:(D=Ze.call(this._longMonthsParse,J),D!==-1?D:null)):(D=Ze.call(this._longMonthsParse,J),D!==-1?D:(D=Ze.call(this._shortMonthsParse,J),D!==-1?D:null))}function _N(i,d,g){var b,D,F;if(this._monthsParseExact)return MN.call(this,i,d,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(D=y([2e3,b]),g&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(D,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(D,"").replace(".","")+"$","i")),!g&&!this._monthsParse[b]&&(F="^"+this.months(D,"")+"|^"+this.monthsShort(D,""),this._monthsParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(g&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!g&&this._monthsParse[b].test(i))return b}}function Wf(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=Ce(d);else if(d=i.localeData().monthsParse(d),!f(d))return i}var g=d,b=i.date();return b=b<29?b:Math.min(b,wl(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function Gf(i){return i!=null?(Wf(this,i),r.updateOffset(this,!0),this):mo(this,"Month")}function ON(){return wl(this.year(),this.month())}function LN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Yf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=NN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Yf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=kN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function Yf(){function i(Ee,ke){return ke.length-Ee.length}var d=[],g=[],b=[],D,F,J,fe;for(D=0;D<12;D++)F=y([2e3,D]),J=sn(this.monthsShort(F,"")),fe=sn(this.months(F,"")),d.push(J),g.push(fe),b.push(fe),b.push(J);d.sort(i),g.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function RN(i,d,g,b,D,F,J){var fe;return i<100&&i>=0?(fe=new Date(i+400,d,g,b,D,F,J),isFinite(fe.getFullYear())&&fe.setFullYear(i)):fe=new Date(i,d,g,b,D,F,J),fe}function fo(i){var d,g;return i<100&&i>=0?(g=Array.prototype.slice.call(arguments),g[0]=i+400,d=new Date(Date.UTC.apply(null,g)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ts(i,d,g){var b=7+d-g,D=(7+fo(i,0,b).getUTCDay()-d)%7;return-D+b-1}function Uf(i,d,g,b,D){var F=(7+g-b)%7,J=Ts(i,b,D),fe=1+7*(d-1)+F+J,Ee,ke;return fe<=0?(Ee=i-1,ke=uo(Ee)+fe):fe>uo(i)?(Ee=i+1,ke=fe-uo(i)):(Ee=i,ke=fe),{year:Ee,dayOfYear:ke}}function ho(i,d,g){var b=Ts(i.year(),d,g),D=Math.floor((i.dayOfYear()-b-1)/7)+1,F,J;return D<1?(J=i.year()-1,F=D+cn(J,d,g)):D>cn(i.year(),d,g)?(F=D-cn(i.year(),d,g),J=i.year()+1):(J=i.year(),F=D),{week:F,year:J}}function cn(i,d,g){var b=Ts(i,d,g),D=Ts(i+1,d,g);return(uo(i)-b+D)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),me("w",he,qe),me("ww",he,et),me("W",he,qe),me("WW",he,et),po(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function BN(i){return ho(i,this._week.dow,this._week.doy).week}var AN={dow:0,doy:6};function FN(){return this._week.dow}function VN(){return this._week.doy}function $N(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function KN(i){var d=ho(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),me("d",he),me("e",he),me("E",he),me("dd",function(i,d){return d.weekdaysMinRegex(i)}),me("ddd",function(i,d){return d.weekdaysShortRegex(i)}),me("dddd",function(i,d){return d.weekdaysRegex(i)}),po(["dd","ddd","dddd"],function(i,d,g,b){var D=g._locale.weekdaysParse(i,b,g._strict);D!=null?d.d=D:E(g).invalidWeekday=i}),po(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function HN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function WN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Cl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var GN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),YN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),UN=Te,zN=Te,jN=Te;function qN(i,d){var g=a(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Cl(g,this._week.dow):i?g[i.day()]:g}function JN(i){return i===!0?Cl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function ZN(i){return i===!0?Cl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function XN(i,d,g){var b,D,F,J=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)F=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(F,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(F,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(F,"").toLocaleLowerCase();return g?d==="dddd"?(D=Ze.call(this._weekdaysParse,J),D!==-1?D:null):d==="ddd"?(D=Ze.call(this._shortWeekdaysParse,J),D!==-1?D:null):(D=Ze.call(this._minWeekdaysParse,J),D!==-1?D:null):d==="dddd"?(D=Ze.call(this._weekdaysParse,J),D!==-1||(D=Ze.call(this._shortWeekdaysParse,J),D!==-1)?D:(D=Ze.call(this._minWeekdaysParse,J),D!==-1?D:null)):d==="ddd"?(D=Ze.call(this._shortWeekdaysParse,J),D!==-1||(D=Ze.call(this._weekdaysParse,J),D!==-1)?D:(D=Ze.call(this._minWeekdaysParse,J),D!==-1?D:null)):(D=Ze.call(this._minWeekdaysParse,J),D!==-1||(D=Ze.call(this._weekdaysParse,J),D!==-1)?D:(D=Ze.call(this._shortWeekdaysParse,J),D!==-1?D:null))}function QN(i,d,g){var b,D,F;if(this._weekdaysParseExact)return XN.call(this,i,d,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(D=y([2e3,1]).day(b),g&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(D,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(D,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(D,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(F="^"+this.weekdays(D,"")+"|^"+this.weekdaysShort(D,"")+"|^"+this.weekdaysMin(D,""),this._weekdaysParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(g&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(g&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!g&&this._weekdaysParse[b].test(i))return b}}function ek(i){if(!this.isValid())return i!=null?this:NaN;var d=mo(this,"Day");return i!=null?(i=HN(i,this.localeData()),this.add(i-d,"d")):d}function tk(i){if(!this.isValid())return i!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return i==null?d:this.add(i-d,"d")}function nk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=WN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function rk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=UN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function ok(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Dl(){function i(bt,fn){return fn.length-bt.length}var d=[],g=[],b=[],D=[],F,J,fe,Ee,ke;for(F=0;F<7;F++)J=y([2e3,1]).day(F),fe=sn(this.weekdaysMin(J,"")),Ee=sn(this.weekdaysShort(J,"")),ke=sn(this.weekdays(J,"")),d.push(fe),g.push(Ee),b.push(ke),D.push(fe),D.push(Ee),D.push(ke);d.sort(i),g.sort(i),b.sort(i),D.sort(i),this._weekdaysRegex=new RegExp("^("+D.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Nl(){return this.hours()%12||12}function ak(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Nl),R("k",["kk",2],0,ak),R("hmm",0,0,function(){return""+Nl.apply(this)+W(this.minutes(),2)}),R("hmmss",0,0,function(){return""+Nl.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)});function jf(i,d){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}jf("a",!0),jf("A",!1);function qf(i,d){return d._meridiemParse}me("a",qf),me("A",qf),me("H",he,Ht),me("h",he,qe),me("k",he,qe),me("HH",he,et),me("hh",he,et),me("kk",he,et),me("hmm",Oe),me("hmmss",lt),me("Hmm",Oe),me("Hmmss",lt),Ke(["H","HH"],tt),Ke(["k","kk"],function(i,d,g){var b=Ce(i);d[tt]=b===24?0:b}),Ke(["a","A"],function(i,d,g){g._isPm=g._locale.isPM(i),g._meridiem=i}),Ke(["h","hh"],function(i,d,g){d[tt]=Ce(i),E(g).bigHour=!0}),Ke("hmm",function(i,d,g){var b=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b)),E(g).bigHour=!0}),Ke("hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D)),E(g).bigHour=!0}),Ke("Hmm",function(i,d,g){var b=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b))}),Ke("Hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D))});function ik(i){return(i+"").toLowerCase().charAt(0)==="p"}var lk=/[ap]\.?m?\.?/i,ck=Nr("Hours",!0);function dk(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var Jf={calendar:Z,longDateFormat:de,invalidDate:ae,ordinal:Ae,dayOfMonthOrdinalParse:Je,relativeTime:St,months:DN,monthsShort:Kf,week:AN,weekdays:GN,weekdaysMin:YN,weekdaysShort:zf,meridiemParse:lk},ze={},So={},go;function pk(i,d){var g,b=Math.min(i.length,d.length);for(g=0;g<b;g+=1)if(i[g]!==d[g])return g;return b}function Zf(i){return i&&i.toLowerCase().replace("_","-")}function uk(i){for(var d=0,g,b,D,F;d<i.length;){for(F=Zf(i[d]).split("-"),g=F.length,b=Zf(i[d+1]),b=b?b.split("-"):null;g>0;){if(D=Es(F.slice(0,g).join("-")),D)return D;if(b&&b.length>=g&&pk(F,b)>=g-1)break;g--}d++}return go}function mk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Es(i){var d=null,g;if(ze[i]===void 0&&e&&e.exports&&mk(i))try{d=go._abbr,g=Zt,g("./locale/"+i),_n(d)}catch{ze[i]=null}return ze[i]}function _n(i,d){var g;return i&&(m(d)?g=dn(i):g=kl(i,d),g?go=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),go._abbr}function kl(i,d){if(d!==null){var g,b=Jf;if(d.abbr=i,ze[i]!=null)q("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."),b=ze[i]._config;else if(d.parentLocale!=null)if(ze[d.parentLocale]!=null)b=ze[d.parentLocale]._config;else if(g=Es(d.parentLocale),g!=null)b=g._config;else return So[d.parentLocale]||(So[d.parentLocale]=[]),So[d.parentLocale].push({name:i,config:d}),null;return ze[i]=new te(A(b,d)),So[i]&&So[i].forEach(function(D){kl(D.name,D.config)}),_n(i),ze[i]}else return delete ze[i],null}function fk(i,d){if(d!=null){var g,b,D=Jf;ze[i]!=null&&ze[i].parentLocale!=null?ze[i].set(A(ze[i]._config,d)):(b=Es(i),b!=null&&(D=b._config),d=A(D,d),b==null&&(d.abbr=i),g=new te(d),g.parentLocale=ze[i],ze[i]=g),_n(i)}else ze[i]!=null&&(ze[i].parentLocale!=null?(ze[i]=ze[i].parentLocale,i===_n()&&_n(i)):ze[i]!=null&&delete ze[i]);return ze[i]}function dn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return go;if(!a(i)){if(d=Es(i),d)return d;i=[i]}return uk(i)}function hk(){return $(ze)}function Il(i){var d,g=i._a;return g&&E(i).overflow===-2&&(d=g[an]<0||g[an]>11?an:g[Qt]<1||g[Qt]>wl(g[ut],g[an])?Qt:g[tt]<0||g[tt]>24||g[tt]===24&&(g[Wt]!==0||g[ln]!==0||g[tr]!==0)?tt:g[Wt]<0||g[Wt]>59?Wt:g[ln]<0||g[ln]>59?ln:g[tr]<0||g[tr]>999?tr:-1,E(i)._overflowDayOfYear&&(d<ut||d>Qt)&&(d=Qt),E(i)._overflowWeeks&&d===-1&&(d=vN),E(i)._overflowWeekday&&d===-1&&(d=yN),E(i).overflow=d),i}var Sk=/^\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)?)?$/,gk=/^\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)?)?$/,bk=/Z|[+-]\d\d(?::?\d\d)?/,ws=[["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]],xl=[["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/]],vk=/^\/?Date\((-?\d+)/i,yk=/^(?:(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}))$/,Tk={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 Xf(i){var d,g,b=i._i,D=Sk.exec(b)||gk.exec(b),F,J,fe,Ee,ke=ws.length,bt=xl.length;if(D){for(E(i).iso=!0,d=0,g=ke;d<g;d++)if(ws[d][1].exec(D[1])){J=ws[d][0],F=ws[d][2]!==!1;break}if(J==null){i._isValid=!1;return}if(D[3]){for(d=0,g=bt;d<g;d++)if(xl[d][1].exec(D[3])){fe=(D[2]||" ")+xl[d][0];break}if(fe==null){i._isValid=!1;return}}if(!F&&fe!=null){i._isValid=!1;return}if(D[4])if(bk.exec(D[4]))Ee="Z";else{i._isValid=!1;return}i._f=J+(fe||"")+(Ee||""),_l(i)}else i._isValid=!1}function Ek(i,d,g,b,D,F){var J=[wk(i),Kf.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(D,10)];return F&&J.push(parseInt(F,10)),J}function wk(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Ck(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dk(i,d,g){if(i){var b=zf.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return E(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function Nk(i,d,g){if(i)return Tk[i];if(d)return 0;var b=parseInt(g,10),D=b%100,F=(b-D)/100;return F*60+D}function Qf(i){var d=yk.exec(Ck(i._i)),g;if(d){if(g=Ek(d[4],d[3],d[2],d[5],d[6],d[7]),!Dk(d[1],g,i))return;i._a=g,i._tzm=Nk(d[8],d[9],d[10]),i._d=fo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),E(i).rfc2822=!0}else i._isValid=!1}function kk(i){var d=vk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(Xf(i),i._isValid===!1)delete i._isValid;else return;if(Qf(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=L("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(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function kr(i,d,g){return i??d??g}function Ik(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Ml(i){var d,g,b=[],D,F,J;if(!i._d){for(D=Ik(i),i._w&&i._a[Qt]==null&&i._a[an]==null&&xk(i),i._dayOfYear!=null&&(J=kr(i._a[ut],D[ut]),(i._dayOfYear>uo(J)||i._dayOfYear===0)&&(E(i)._overflowDayOfYear=!0),g=fo(J,0,i._dayOfYear),i._a[an]=g.getUTCMonth(),i._a[Qt]=g.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=D[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[tt]===24&&i._a[Wt]===0&&i._a[ln]===0&&i._a[tr]===0&&(i._nextDay=!0,i._a[tt]=0),i._d=(i._useUTC?fo:RN).apply(null,b),F=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[tt]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(E(i).weekdayMismatch=!0)}}function xk(i){var d,g,b,D,F,J,fe,Ee,ke;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,J=4,g=kr(d.GG,i._a[ut],ho(Ye(),1,4).year),b=kr(d.W,1),D=kr(d.E,1),(D<1||D>7)&&(Ee=!0)):(F=i._locale._week.dow,J=i._locale._week.doy,ke=ho(Ye(),F,J),g=kr(d.gg,i._a[ut],ke.year),b=kr(d.w,ke.week),d.d!=null?(D=d.d,(D<0||D>6)&&(Ee=!0)):d.e!=null?(D=d.e+F,(d.e<0||d.e>6)&&(Ee=!0)):D=F),b<1||b>cn(g,F,J)?E(i)._overflowWeeks=!0:Ee!=null?E(i)._overflowWeekday=!0:(fe=Uf(g,b,D,F,J),i._a[ut]=fe.year,i._dayOfYear=fe.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function _l(i){if(i._f===r.ISO_8601){Xf(i);return}if(i._f===r.RFC_2822){Qf(i);return}i._a=[],E(i).empty=!0;var d=""+i._i,g,b,D,F,J,fe=d.length,Ee=0,ke,bt;for(D=le(i._f,i._locale).match(z)||[],bt=D.length,g=0;g<bt;g++)F=D[g],b=(d.match(SN(F,i))||[])[0],b&&(J=d.substr(0,d.indexOf(b)),J.length>0&&E(i).unusedInput.push(J),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),U[F]?(b?E(i).empty=!1:E(i).unusedTokens.push(F),bN(F,b,i)):i._strict&&!b&&E(i).unusedTokens.push(F);E(i).charsLeftOver=fe-Ee,d.length>0&&E(i).unusedInput.push(d),i._a[tt]<=12&&E(i).bigHour===!0&&i._a[tt]>0&&(E(i).bigHour=void 0),E(i).parsedDateParts=i._a.slice(0),E(i).meridiem=i._meridiem,i._a[tt]=Mk(i._locale,i._a[tt],i._meridiem),ke=E(i).era,ke!==null&&(i._a[ut]=i._locale.erasConvertYear(ke,i._a[ut])),Ml(i),Il(i)}function Mk(i,d,g){var b;return g==null?d:i.meridiemHour!=null?i.meridiemHour(d,g):(i.isPM!=null&&(b=i.isPM(g),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function _k(i){var d,g,b,D,F,J,fe=!1,Ee=i._f.length;if(Ee===0){E(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Ee;D++)F=0,J=!1,d=V({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],_l(d),N(d)&&(J=!0),F+=E(d).charsLeftOver,F+=E(d).unusedTokens.length*10,E(d).score=F,fe?F<b&&(b=F,g=d):(b==null||F<b||J)&&(b=F,g=d,J&&(fe=!0));S(i,g||d)}function Ok(i){if(!i._d){var d=ye(i._i),g=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,g,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Ml(i)}}function Lk(i){var d=new B(Il(eh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function eh(i){var d=i._i,g=i._f;return i._locale=i._locale||dn(i._l),d===null||g===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),C(d)?new B(Il(d)):(u(d)?i._d=d:a(g)?_k(i):g?_l(i):Pk(i),N(i)||(i._d=null),i))}function Pk(i){var d=i._i;m(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?kk(i):a(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Ml(i)):l(d)?Ok(i):f(d)?i._d=new Date(d):r.createFromInputFallback(i)}function th(i,d,g,b,D){var F={};return(d===!0||d===!1)&&(b=d,d=void 0),(g===!0||g===!1)&&(b=g,g=void 0),(l(i)&&p(i)||a(i)&&i.length===0)&&(i=void 0),F._isAMomentObject=!0,F._useUTC=F._isUTC=D,F._l=g,F._i=i,F._f=d,F._strict=b,Lk(F)}function Ye(i,d,g,b){return th(i,d,g,b,!1)}var Rk=L("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),Bk=L("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function nh(i,d){var g,b;if(d.length===1&&a(d[0])&&(d=d[0]),!d.length)return Ye();for(g=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](g))&&(g=d[b]);return g}function Ak(){var i=[].slice.call(arguments,0);return nh("isBefore",i)}function Fk(){var i=[].slice.call(arguments,0);return nh("isAfter",i)}var Vk=function(){return Date.now?Date.now():+new Date},bo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $k(i){var d,g=!1,b,D=bo.length;for(d in i)if(c(i,d)&&!(Ze.call(bo,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<D;++b)if(i[bo[b]]){if(g)return!1;parseFloat(i[bo[b]])!==Ce(i[bo[b]])&&(g=!0)}return!0}function Kk(){return this._isValid}function Hk(){return Gt(NaN)}function Cs(i){var d=ye(i),g=d.year||0,b=d.quarter||0,D=d.month||0,F=d.week||d.isoWeek||0,J=d.day||0,fe=d.hour||0,Ee=d.minute||0,ke=d.second||0,bt=d.millisecond||0;this._isValid=$k(d),this._milliseconds=+bt+ke*1e3+Ee*6e4+fe*1e3*60*60,this._days=+J+F*7,this._months=+D+b*3+g*12,this._data={},this._locale=dn(),this._bubble()}function Ds(i){return i instanceof Cs}function Ol(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Wk(i,d,g){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),F=0,J;for(J=0;J<b;J++)Ce(i[J])!==Ce(d[J])&&F++;return F+D}function rh(i,d){R(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+W(~~(g/60),2)+d+W(~~g%60,2)})}rh("Z",":"),rh("ZZ",""),me("Z",Kt),me("ZZ",Kt),Ke(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Ll(Kt,i)});var Gk=/([\+\-]|\d\d)/gi;function Ll(i,d){var g=(d||"").match(i),b,D,F;return g===null?null:(b=g[g.length-1]||[],D=(b+"").match(Gk)||["-",0,0],F=+(D[1]*60)+Ce(D[2]),F===0?0:D[0]==="+"?F:-F)}function Pl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(C(i)||u(i)?i.valueOf():Ye(i).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+b),r.updateOffset(g,!1),g):Ye(i).local()}function Rl(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function Yk(i,d,g){var b=this._offset||0,D;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Ll(Kt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(D=Rl(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?ih(this,Gt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Rl(this)}function Uk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function zk(i){return this.utcOffset(0,i)}function jk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Rl(this),"m")),this}function qk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Ll(Qn,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Jk(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Zk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xk(){if(!m(this._isDSTShifted))return this._isDSTShifted;var i={},d;return V(i,this),i=eh(i),i._a?(d=i._isUTC?y(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Wk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Qk(){return this.isValid()?!this._isUTC:!1}function eI(){return this.isValid()?this._isUTC:!1}function oh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var tI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Gt(i,d){var g=i,b=null,D,F,J;return Ds(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=tI.exec(i))?(D=b[1]==="-"?-1:1,g={y:0,d:Ce(b[Qt])*D,h:Ce(b[tt])*D,m:Ce(b[Wt])*D,s:Ce(b[ln])*D,ms:Ce(Ol(b[tr]*1e3))*D}):(b=nI.exec(i))?(D=b[1]==="-"?-1:1,g={y:nr(b[2],D),M:nr(b[3],D),w:nr(b[4],D),d:nr(b[5],D),h:nr(b[6],D),m:nr(b[7],D),s:nr(b[8],D)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(J=rI(Ye(g.from),Ye(g.to)),g={},g.ms=J.milliseconds,g.M=J.months),F=new Cs(g),Ds(i)&&c(i,"_locale")&&(F._locale=i._locale),Ds(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}Gt.fn=Cs.prototype,Gt.invalid=Hk;function nr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function sh(i,d){var g={};return g.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(g.months,"M").isAfter(d)&&--g.months,g.milliseconds=+d-+i.clone().add(g.months,"M"),g}function rI(i,d){var g;return i.isValid()&&d.isValid()?(d=Pl(d,i),i.isBefore(d)?g=sh(i,d):(g=sh(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function ah(i,d){return function(g,b){var D,F;return b!==null&&!isNaN(+b)&&(q(d,"moment()."+d+"(period, number) is deprecated. Please use moment()."+d+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),F=g,g=b,b=F),D=Gt(g,b),ih(this,D,i),this}}function ih(i,d,g,b){var D=d._milliseconds,F=Ol(d._days),J=Ol(d._months);i.isValid()&&(b=b??!0,J&&Wf(i,mo(i,"Month")+J*g),F&&$f(i,"Date",mo(i,"Date")+F*g),D&&i._d.setTime(i._d.valueOf()+D*g),b&&r.updateOffset(i,F||J))}var oI=ah(1,"add"),sI=ah(-1,"subtract");function lh(i){return typeof i=="string"||i instanceof String}function aI(i){return C(i)||u(i)||lh(i)||f(i)||lI(i)||iI(i)||i===null||i===void 0}function iI(i){var d=l(i)&&!p(i),g=!1,b=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],D,F,J=b.length;for(D=0;D<J;D+=1)F=b[D],g=g||c(i,F);return d&&g}function lI(i){var d=a(i),g=!1;return d&&(g=i.filter(function(b){return!f(b)&&lh(i)}).length===0),d&&g}function cI(i){var d=l(i)&&!p(i),g=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],D,F;for(D=0;D<b.length;D+=1)F=b[D],g=g||c(i,F);return d&&g}function dI(i,d){var g=i.diff(d,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function pI(i,d){arguments.length===1&&(arguments[0]?aI(arguments[0])?(i=arguments[0],d=void 0):cI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||Ye(),b=Pl(g,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",F=d&&(_(d[D])?d[D].call(this,g):d[D]);return this.format(F||this.localeData().calendar(D,this,Ye(g)))}function uI(){return new B(this)}function mI(i,d){var g=C(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=De(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function fI(i,d){var g=C(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=De(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function hI(i,d,g,b){var D=C(i)?i:Ye(i),F=C(d)?d:Ye(d);return this.isValid()&&D.isValid()&&F.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(D,g):!this.isBefore(D,g))&&(b[1]===")"?this.isBefore(F,g):!this.isAfter(F,g))):!1}function SI(i,d){var g=C(i)?i:Ye(i),b;return this.isValid()&&g.isValid()?(d=De(d)||"millisecond",d==="millisecond"?this.valueOf()===g.valueOf():(b=g.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function gI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function bI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function vI(i,d,g){var b,D,F;if(!this.isValid())return NaN;if(b=Pl(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=De(d),d){case"year":F=Ns(this,b)/12;break;case"month":F=Ns(this,b);break;case"quarter":F=Ns(this,b)/3;break;case"second":F=(this-b)/1e3;break;case"minute":F=(this-b)/6e4;break;case"hour":F=(this-b)/36e5;break;case"day":F=(this-b-D)/864e5;break;case"week":F=(this-b-D)/6048e5;break;default:F=this-b}return g?F:Rt(F)}function Ns(i,d){if(i.date()<d.date())return-Ns(d,i);var g=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(g,"months"),D,F;return d-b<0?(D=i.clone().add(g-1,"months"),F=(d-b)/(b-D)):(D=i.clone().add(g+1,"months"),F=(d-b)/(D-b)),-(g+F)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function yI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function TI(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?oe(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",oe(g,"Z")):oe(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function EI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",g,b,D,F;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),g="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",D="-MM-DD[T]HH:mm:ss.SSS",F=d+'[")]',this.format(g+b+D+F)}function wI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=oe(this,i);return this.localeData().postformat(d)}function CI(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ye(i).isValid())?Gt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function DI(i){return this.from(Ye(),i)}function NI(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ye(i).isValid())?Gt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function kI(i){return this.to(Ye(),i)}function ch(i){var d;return i===void 0?this._locale._abbr:(d=dn(i),d!=null&&(this._locale=d),this)}var dh=L("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function ph(){return this._locale}var ks=1e3,Ir=60*ks,Is=60*Ir,uh=(365*400+97)*24*Is;function xr(i,d){return(i%d+d)%d}function mh(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-uh:new Date(i,d,g).valueOf()}function fh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-uh:Date.UTC(i,d,g)}function II(i){var d,g;if(i=De(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?fh:mh,i){case"year":d=g(this.year(),0,1);break;case"quarter":d=g(this.year(),this.month()-this.month()%3,1);break;case"month":d=g(this.year(),this.month(),1);break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=g(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=xr(d+(this._isUTC?0:this.utcOffset()*Ir),Is);break;case"minute":d=this._d.valueOf(),d-=xr(d,Ir);break;case"second":d=this._d.valueOf(),d-=xr(d,ks);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function xI(i){var d,g;if(i=De(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?fh:mh,i){case"year":d=g(this.year()+1,0,1)-1;break;case"quarter":d=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=g(this.year(),this.month()+1,1)-1;break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Is-xr(d+(this._isUTC?0:this.utcOffset()*Ir),Is)-1;break;case"minute":d=this._d.valueOf(),d+=Ir-xr(d,Ir)-1;break;case"second":d=this._d.valueOf(),d+=ks-xr(d,ks)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function MI(){return this._d.valueOf()-(this._offset||0)*6e4}function _I(){return Math.floor(this.valueOf()/1e3)}function OI(){return new Date(this.valueOf())}function LI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function PI(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function RI(){return this.isValid()?this.toISOString():null}function BI(){return N(this)}function AI(){return S({},E(this))}function FI(){return E(this).overflow}function VI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),me("N",Bl),me("NN",Bl),me("NNN",Bl),me("NNNN",JI),me("NNNNN",ZI),Ke(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var D=g._locale.erasParse(i,b,g._strict);D?E(g).era=D:E(g).invalidEra=i}),me("y",Be),me("yy",Be),me("yyy",Be),me("yyyy",Be),me("yo",XI),Ke(["y","yy","yyy","yyyy"],ut),Ke(["yo"],function(i,d,g,b){var D;g._locale._eraYearOrdinalRegex&&(D=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[ut]=g._locale.eraYearOrdinalParse(i,D):d[ut]=parseInt(i,10)});function $I(i,d){var g,b,D,F=this._eras||dn("en")._eras;for(g=0,b=F.length;g<b;++g){switch(typeof F[g].since){case"string":D=r(F[g].since).startOf("day"),F[g].since=D.valueOf();break}switch(typeof F[g].until){case"undefined":F[g].until=1/0;break;case"string":D=r(F[g].until).startOf("day").valueOf(),F[g].until=D.valueOf();break}}return F}function KI(i,d,g){var b,D,F=this.eras(),J,fe,Ee;for(i=i.toUpperCase(),b=0,D=F.length;b<D;++b)if(J=F[b].name.toUpperCase(),fe=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(fe===i)return F[b];break;case"NNNN":if(J===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([J,fe,Ee].indexOf(i)>=0)return F[b]}function HI(i,d){var g=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*g}function WI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].name;return""}function GI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].narrow;return""}function YI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].abbr;return""}function UI(){var i,d,g,b,D=this.localeData().eras();for(i=0,d=D.length;i<d;++i)if(g=D[i].since<=D[i].until?1:-1,b=this.clone().startOf("day").valueOf(),D[i].since<=b&&b<=D[i].until||D[i].until<=b&&b<=D[i].since)return(this.year()-r(D[i].since).year())*g+D[i].offset;return this.year()}function zI(i){return c(this,"_erasNameRegex")||Al.call(this),i?this._erasNameRegex:this._erasRegex}function jI(i){return c(this,"_erasAbbrRegex")||Al.call(this),i?this._erasAbbrRegex:this._erasRegex}function qI(i){return c(this,"_erasNarrowRegex")||Al.call(this),i?this._erasNarrowRegex:this._erasRegex}function Bl(i,d){return d.erasAbbrRegex(i)}function JI(i,d){return d.erasNameRegex(i)}function ZI(i,d){return d.erasNarrowRegex(i)}function XI(i,d){return d._eraYearOrdinalRegex||Be}function Al(){var i=[],d=[],g=[],b=[],D,F,J,fe,Ee,ke=this.eras();for(D=0,F=ke.length;D<F;++D)J=sn(ke[D].name),fe=sn(ke[D].abbr),Ee=sn(ke[D].narrow),d.push(J),i.push(fe),g.push(Ee),b.push(J),b.push(fe),b.push(Ee);this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+g.join("|")+")","i")}R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xs(i,d){R(0,[i,i.length],0,d)}xs("gggg","weekYear"),xs("ggggg","weekYear"),xs("GGGG","isoWeekYear"),xs("GGGGG","isoWeekYear"),me("G",ct),me("g",ct),me("GG",he,et),me("gg",he,et),me("GGGG",gt,Mn),me("gggg",gt,Mn),me("GGGGG",Et,ue),me("ggggg",Et,ue),po(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),po(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function QI(i){return hh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ex(i){return hh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function tx(){return cn(this.year(),1,4)}function nx(){return cn(this.isoWeekYear(),1,4)}function rx(){var i=this.localeData()._week;return cn(this.year(),i.dow,i.doy)}function ox(){var i=this.localeData()._week;return cn(this.weekYear(),i.dow,i.doy)}function hh(i,d,g,b,D){var F;return i==null?ho(this,b,D).year:(F=cn(i,b,D),d>F&&(d=F),sx.call(this,i,d,g,b,D))}function sx(i,d,g,b,D){var F=Uf(i,d,g,b,D),J=fo(F.year,0,F.dayOfYear);return this.year(J.getUTCFullYear()),this.month(J.getUTCMonth()),this.date(J.getUTCDate()),this}R("Q",0,"Qo","quarter"),me("Q",$e),Ke("Q",function(i,d){d[an]=(Ce(i)-1)*3});function ax(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),me("D",he,qe),me("DD",he,et),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Ke(["D","DD"],Qt),Ke("Do",function(i,d){d[Qt]=Ce(i.match(he)[0])});var Sh=Nr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ne),me("DDDD",Xt),Ke(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function ix(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}R("m",["mm",2],0,"minute"),me("m",he,Ht),me("mm",he,et),Ke(["m","mm"],Wt);var lx=Nr("Minutes",!1);R("s",["ss",2],0,"second"),me("s",he,Ht),me("ss",he,et),Ke(["s","ss"],ln);var cx=Nr("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ne,$e),me("SS",Ne,et),me("SSS",Ne,Xt);var On,gh;for(On="SSSS";On.length<=9;On+="S")me(On,Be);function dx(i,d){d[tr]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ke(On,dx);gh=Nr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function px(){return this._isUTC?"UTC":""}function ux(){return this._isUTC?"Coordinated Universal Time":""}var ce=B.prototype;ce.add=oI,ce.calendar=pI,ce.clone=uI,ce.diff=vI,ce.endOf=xI,ce.format=wI,ce.from=CI,ce.fromNow=DI,ce.to=NI,ce.toNow=kI,ce.get=EN,ce.invalidAt=FI,ce.isAfter=mI,ce.isBefore=fI,ce.isBetween=hI,ce.isSame=SI,ce.isSameOrAfter=gI,ce.isSameOrBefore=bI,ce.isValid=BI,ce.lang=dh,ce.locale=ch,ce.localeData=ph,ce.max=Bk,ce.min=Rk,ce.parsingFlags=AI,ce.set=wN,ce.startOf=II,ce.subtract=sI,ce.toArray=LI,ce.toObject=PI,ce.toDate=OI,ce.toISOString=TI,ce.inspect=EI,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=RI,ce.toString=yI,ce.unix=_I,ce.valueOf=MI,ce.creationData=VI,ce.eraName=WI,ce.eraNarrow=GI,ce.eraAbbr=YI,ce.eraYear=UI,ce.year=Vf,ce.isLeapYear=TN,ce.weekYear=QI,ce.isoWeekYear=ex,ce.quarter=ce.quarters=ax,ce.month=Gf,ce.daysInMonth=ON,ce.week=ce.weeks=$N,ce.isoWeek=ce.isoWeeks=KN,ce.weeksInYear=rx,ce.weeksInWeekYear=ox,ce.isoWeeksInYear=tx,ce.isoWeeksInISOWeekYear=nx,ce.date=Sh,ce.day=ce.days=ek,ce.weekday=tk,ce.isoWeekday=nk,ce.dayOfYear=ix,ce.hour=ce.hours=ck,ce.minute=ce.minutes=lx,ce.second=ce.seconds=cx,ce.millisecond=ce.milliseconds=gh,ce.utcOffset=Yk,ce.utc=zk,ce.local=jk,ce.parseZone=qk,ce.hasAlignedHourOffset=Jk,ce.isDST=Zk,ce.isLocal=Qk,ce.isUtcOffset=eI,ce.isUtc=oh,ce.isUTC=oh,ce.zoneAbbr=px,ce.zoneName=ux,ce.dates=L("dates accessor is deprecated. Use date instead.",Sh),ce.months=L("months accessor is deprecated. Use month instead",Gf),ce.years=L("years accessor is deprecated. Use year instead",Vf),ce.zone=L("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Uk),ce.isDSTShifted=L("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Xk);function mx(i){return Ye(i*1e3)}function fx(){return Ye.apply(null,arguments).parseZone()}function bh(i){return i}var Le=te.prototype;Le.calendar=se,Le.longDateFormat=ie,Le.invalidDate=we,Le.ordinal=dt,Le.preparse=bh,Le.postformat=bh,Le.relativeTime=pt,Le.pastFuture=ge,Le.set=ee,Le.eras=$I,Le.erasParse=KI,Le.erasConvertYear=HI,Le.erasAbbrRegex=jI,Le.erasNameRegex=zI,Le.erasNarrowRegex=qI,Le.months=IN,Le.monthsShort=xN,Le.monthsParse=_N,Le.monthsRegex=PN,Le.monthsShortRegex=LN,Le.week=BN,Le.firstDayOfYear=VN,Le.firstDayOfWeek=FN,Le.weekdays=qN,Le.weekdaysMin=ZN,Le.weekdaysShort=JN,Le.weekdaysParse=QN,Le.weekdaysRegex=rk,Le.weekdaysShortRegex=ok,Le.weekdaysMinRegex=sk,Le.isPM=ik,Le.meridiem=dk;function Ms(i,d,g,b){var D=dn(),F=y().set(b,d);return D[g](F,i)}function vh(i,d,g){if(f(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ms(i,d,g,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Ms(i,b,g,"month");return D}function Fl(i,d,g,b){typeof i=="boolean"?(f(d)&&(g=d,d=void 0),d=d||""):(d=i,g=d,i=!1,f(d)&&(g=d,d=void 0),d=d||"");var D=dn(),F=i?D._week.dow:0,J,fe=[];if(g!=null)return Ms(d,(g+F)%7,b,"day");for(J=0;J<7;J++)fe[J]=Ms(d,(J+F)%7,b,"day");return fe}function hx(i,d){return vh(i,d,"months")}function Sx(i,d){return vh(i,d,"monthsShort")}function gx(i,d,g){return Fl(i,d,g,"weekdays")}function bx(i,d,g){return Fl(i,d,g,"weekdaysShort")}function vx(i,d,g){return Fl(i,d,g,"weekdaysMin")}_n("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(i){var d=i%10,g=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+g}}),r.lang=L("moment.lang is deprecated. Use moment.locale instead.",_n),r.langData=L("moment.langData is deprecated. Use moment.localeData instead.",dn);var pn=Math.abs;function yx(){var i=this._data;return this._milliseconds=pn(this._milliseconds),this._days=pn(this._days),this._months=pn(this._months),i.milliseconds=pn(i.milliseconds),i.seconds=pn(i.seconds),i.minutes=pn(i.minutes),i.hours=pn(i.hours),i.months=pn(i.months),i.years=pn(i.years),this}function yh(i,d,g,b){var D=Gt(d,g);return i._milliseconds+=b*D._milliseconds,i._days+=b*D._days,i._months+=b*D._months,i._bubble()}function Tx(i,d){return yh(this,i,d,1)}function Ex(i,d){return yh(this,i,d,-1)}function Th(i){return i<0?Math.floor(i):Math.ceil(i)}function wx(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,D,F,J,fe,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=Th(Vl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,D=Rt(i/1e3),b.seconds=D%60,F=Rt(D/60),b.minutes=F%60,J=Rt(F/60),b.hours=J%24,d+=Rt(J/24),Ee=Rt(Eh(d)),g+=Ee,d-=Th(Vl(Ee)),fe=Rt(g/12),g%=12,b.days=d,b.months=g,b.years=fe,this}function Eh(i){return i*4800/146097}function Vl(i){return i*146097/4800}function Cx(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=De(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+Eh(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(Vl(this._months)),i){case"week":return d/7+b/6048e5;case"day":return d+b/864e5;case"hour":return d*24+b/36e5;case"minute":return d*1440+b/6e4;case"second":return d*86400+b/1e3;case"millisecond":return Math.floor(d*864e5)+b;default:throw new Error("Unknown unit "+i)}}function un(i){return function(){return this.as(i)}}var wh=un("ms"),Dx=un("s"),Nx=un("m"),kx=un("h"),Ix=un("d"),xx=un("w"),Mx=un("M"),_x=un("Q"),Ox=un("y"),Lx=wh;function Px(){return Gt(this)}function Rx(i){return i=De(i),this.isValid()?this[i+"s"]():NaN}function rr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Bx=rr("milliseconds"),Ax=rr("seconds"),Fx=rr("minutes"),Vx=rr("hours"),$x=rr("days"),Kx=rr("months"),Hx=rr("years");function Wx(){return Rt(this.days()/7)}var mn=Math.round,Mr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gx(i,d,g,b,D){return D.relativeTime(d||1,!!g,i,b)}function Yx(i,d,g,b){var D=Gt(i).abs(),F=mn(D.as("s")),J=mn(D.as("m")),fe=mn(D.as("h")),Ee=mn(D.as("d")),ke=mn(D.as("M")),bt=mn(D.as("w")),fn=mn(D.as("y")),Ln=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||J<=1&&["m"]||J<g.m&&["mm",J]||fe<=1&&["h"]||fe<g.h&&["hh",fe]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Ln=Ln||bt<=1&&["w"]||bt<g.w&&["ww",bt]),Ln=Ln||ke<=1&&["M"]||ke<g.M&&["MM",ke]||fn<=1&&["y"]||["yy",fn],Ln[2]=d,Ln[3]=+i>0,Ln[4]=b,Gx.apply(null,Ln)}function Ux(i){return i===void 0?mn:typeof i=="function"?(mn=i,!0):!1}function zx(i,d){return Mr[i]===void 0?!1:d===void 0?Mr[i]:(Mr[i]=d,i==="s"&&(Mr.ss=d-1),!0)}function jx(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=Mr,D,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},Mr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),F=Yx(this,!g,b,D),g&&(F=D.pastFuture(+this,F)),D.postformat(F)}var $l=Math.abs;function _r(i){return(i>0)-(i<0)||+i}function _s(){if(!this.isValid())return this.localeData().invalidDate();var i=$l(this._milliseconds)/1e3,d=$l(this._days),g=$l(this._months),b,D,F,J,fe=this.asSeconds(),Ee,ke,bt,fn;return fe?(b=Rt(i/60),D=Rt(b/60),i%=60,b%=60,F=Rt(g/12),g%=12,J=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=fe<0?"-":"",ke=_r(this._months)!==_r(fe)?"-":"",bt=_r(this._days)!==_r(fe)?"-":"",fn=_r(this._milliseconds)!==_r(fe)?"-":"",Ee+"P"+(F?ke+F+"Y":"")+(g?ke+g+"M":"")+(d?bt+d+"D":"")+(D||b||i?"T":"")+(D?fn+D+"H":"")+(b?fn+b+"M":"")+(i?fn+J+"S":"")):"P0D"}var xe=Cs.prototype;xe.isValid=Kk,xe.abs=yx,xe.add=Tx,xe.subtract=Ex,xe.as=Cx,xe.asMilliseconds=wh,xe.asSeconds=Dx,xe.asMinutes=Nx,xe.asHours=kx,xe.asDays=Ix,xe.asWeeks=xx,xe.asMonths=Mx,xe.asQuarters=_x,xe.asYears=Ox,xe.valueOf=Lx,xe._bubble=wx,xe.clone=Px,xe.get=Rx,xe.milliseconds=Bx,xe.seconds=Ax,xe.minutes=Fx,xe.hours=Vx,xe.days=$x,xe.weeks=Wx,xe.months=Kx,xe.years=Hx,xe.humanize=jx,xe.toISOString=_s,xe.toString=_s,xe.toJSON=_s,xe.locale=ch,xe.localeData=ph,xe.toIsoString=L("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_s),xe.lang=dh,R("X",0,0,"unix"),R("x",0,0,"valueOf"),me("x",ct),me("X",be),Ke("X",function(i,d,g){g._d=new Date(parseFloat(i)*1e3)}),Ke("x",function(i,d,g){g._d=new Date(Ce(i))});//! moment.js
1977
+ `+new Error().stack),g=!1}return d.apply(this,arguments)},d)}var H={};function q(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),H[i]||(P(d),H[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function _(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function ee(i){var d,g;for(g in i)c(i,g)&&(d=i[g],_(d)?this[g]=d:this["_"+g]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function A(i,d){var g=S({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(g[b]={},S(g[b],i[b]),S(g[b],d[b])):d[b]!=null?g[b]=d[b]:delete g[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(g[b]=S({},g[b]));return g}function te(i){i!=null&&this.set(i)}var $;Object.keys?$=Object.keys:$=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var Z={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function se(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return _(b)?b.call(d,g):b}function W(i,d,g){var b=""+Math.abs(i),D=d-b.length,F=i>=0;return(F?g?"+":"":"-")+Math.pow(10,Math.max(0,D)).toString().substr(1)+b}var z=/(\[[^\[]*\])|(\\)?([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,re=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ne={},U={};function R(i,d,g,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(U[i]=D),d&&(U[d[0]]=function(){return W(D.apply(this,arguments),d[1],d[2])}),g&&(U[g]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function j(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function X(i){var d=i.match(z),g,b;for(g=0,b=d.length;g<b;g++)U[d[g]]?d[g]=U[d[g]]:d[g]=j(d[g]);return function(D){var F="",J;for(J=0;J<b;J++)F+=_(d[J])?d[J].call(D,i):d[J];return F}}function oe(i,d){return i.isValid()?(d=le(d,i.localeData()),ne[d]=ne[d]||X(d),ne[d](i)):i.localeData().invalidDate()}function le(i,d){var g=5;function b(D){return d.longDateFormat(D)||D}for(re.lastIndex=0;g>=0&&re.test(i);)i=i.replace(re,b),re.lastIndex=0,g-=1;return i}var de={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 ie(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(z).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var ae="Invalid date";function we(){return this._invalidDate}var Ae="%d",Je=/\d{1,2}/;function dt(i){return this._ordinal.replace("%d",i)}var St={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 pt(i,d,g,b){var D=this._relativeTime[g];return _(D)?D(i,d,g,b):D.replace(/%d/i,i)}function ge(i,d){var g=this._relativeTime[i>0?"future":"past"];return _(g)?g(d):g.replace(/%s/i,d)}var ze={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 De(i){return typeof i=="string"?ze[i]||ze[i.toLowerCase()]:void 0}function ye(i){var d={},g,b;for(b in i)c(i,b)&&(g=De(b),g&&(d[g]=i[b]));return d}var Ie={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 Qe(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:Ie[g]});return d.sort(function(b,D){return b.priority-D.priority}),d}var $e=/\d/,et=/\d\d/,Xt=/\d{3}/,Mn=/\d{4}/,ue=/[+-]?\d{6}/,he=/\d\d?/,Oe=/\d\d\d\d?/,lt=/\d\d\d\d\d\d?/,Ne=/\d{1,3}/,gt=/\d{1,4}/,Et=/[+-]?\d{1,6}/,Be=/\d+/,ct=/[+-]?\d+/,Qn=/Z|[+-]\d\d:?\d\d/gi,Kt=/Z|[+-]\d\d(?::?\d\d)?/gi,be=/[+-]?\d+(\.\d{1,3})?/,Te=/[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,qe=/^[1-9]\d?/,Ht=/^([1-9]\d|\d)/,er;er={};function me(i,d,g){er[i]=_(d)?d:function(b,D){return b&&g?g:d}}function SN(i,d){return c(er,i)?er[i](d._strict,d._locale):new RegExp(gN(i))}function gN(i){return sn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,D,F){return g||b||D||F}))}function sn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Rt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,g=0;return d!==0&&isFinite(d)&&(g=Rt(d)),g}var El={};function Ke(i,d){var g,b=d,D;for(typeof i=="string"&&(i=[i]),f(d)&&(b=function(F,J){J[d]=Ce(F)}),D=i.length,g=0;g<D;g++)El[i[g]]=b}function po(i,d){Ke(i,function(g,b,D,F){D._w=D._w||{},d(g,D._w,D,F)})}function bN(i,d,g){d!=null&&c(El,i)&&El[i](d,g._a,g,i)}function ys(i){return i%4===0&&i%100!==0||i%400===0}var ut=0,an=1,Qt=2,tt=3,Wt=4,ln=5,tr=6,vN=7,yN=8;R("Y",0,0,function(){var i=this.year();return i<=9999?W(i,4):"+"+i}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),me("Y",ct),me("YY",he,et),me("YYYY",gt,Mn),me("YYYYY",Et,ue),me("YYYYYY",Et,ue),Ke(["YYYYY","YYYYYY"],ut),Ke("YYYY",function(i,d){d[ut]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ke("YY",function(i,d){d[ut]=r.parseTwoDigitYear(i)}),Ke("Y",function(i,d){d[ut]=parseInt(i,10)});function uo(i){return ys(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Vf=Nr("FullYear",!0);function TN(){return ys(this.year())}function Nr(i,d){return function(g){return g!=null?($f(this,i,g),r.updateOffset(this,d),this):mo(this,i)}}function mo(i,d){if(!i.isValid())return NaN;var g=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return b?g.getUTCSeconds():g.getSeconds();case"Minutes":return b?g.getUTCMinutes():g.getMinutes();case"Hours":return b?g.getUTCHours():g.getHours();case"Date":return b?g.getUTCDate():g.getDate();case"Day":return b?g.getUTCDay():g.getDay();case"Month":return b?g.getUTCMonth():g.getMonth();case"FullYear":return b?g.getUTCFullYear():g.getFullYear();default:return NaN}}function $f(i,d,g){var b,D,F,J,fe;if(!(!i.isValid()||isNaN(g))){switch(b=i._d,D=i._isUTC,d){case"Milliseconds":return void(D?b.setUTCMilliseconds(g):b.setMilliseconds(g));case"Seconds":return void(D?b.setUTCSeconds(g):b.setSeconds(g));case"Minutes":return void(D?b.setUTCMinutes(g):b.setMinutes(g));case"Hours":return void(D?b.setUTCHours(g):b.setHours(g));case"Date":return void(D?b.setUTCDate(g):b.setDate(g));case"FullYear":break;default:return}F=g,J=i.month(),fe=i.date(),fe=fe===29&&J===1&&!ys(F)?28:fe,D?b.setUTCFullYear(F,J,fe):b.setFullYear(F,J,fe)}}function EN(i){return i=De(i),_(this[i])?this[i]():this}function wN(i,d){if(typeof i=="object"){i=ye(i);var g=Qe(i),b,D=g.length;for(b=0;b<D;b++)this[g[b].unit](i[g[b].unit])}else if(i=De(i),_(this[i]))return this[i](d);return this}function CN(i,d){return(i%d+d)%d}var Ze;Array.prototype.indexOf?Ze=Array.prototype.indexOf:Ze=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function wl(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=CN(d,12);return i+=(d-g)/12,g===1?ys(i)?29:28:31-g%7%2}R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),R("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",he,qe),me("MM",he,et),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),Ke(["M","MM"],function(i,d){d[an]=Ce(i)-1}),Ke(["MMM","MMMM"],function(i,d,g,b){var D=g._locale.monthsParse(i,b,g._strict);D!=null?d[an]=D:E(g).invalidMonth=i});var DN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Kf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Hf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,NN=Te,kN=Te;function IN(i,d){return i?a(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Hf).test(d)?"format":"standalone"][i.month()]:a(this._months)?this._months:this._months.standalone}function xN(i,d){return i?a(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Hf.test(d)?"format":"standalone"][i.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function MN(i,d,g){var b,D,F,J=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)F=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(F,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(F,"").toLocaleLowerCase();return g?d==="MMM"?(D=Ze.call(this._shortMonthsParse,J),D!==-1?D:null):(D=Ze.call(this._longMonthsParse,J),D!==-1?D:null):d==="MMM"?(D=Ze.call(this._shortMonthsParse,J),D!==-1?D:(D=Ze.call(this._longMonthsParse,J),D!==-1?D:null)):(D=Ze.call(this._longMonthsParse,J),D!==-1?D:(D=Ze.call(this._shortMonthsParse,J),D!==-1?D:null))}function _N(i,d,g){var b,D,F;if(this._monthsParseExact)return MN.call(this,i,d,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(D=y([2e3,b]),g&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(D,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(D,"").replace(".","")+"$","i")),!g&&!this._monthsParse[b]&&(F="^"+this.months(D,"")+"|^"+this.monthsShort(D,""),this._monthsParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(g&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!g&&this._monthsParse[b].test(i))return b}}function Wf(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=Ce(d);else if(d=i.localeData().monthsParse(d),!f(d))return i}var g=d,b=i.date();return b=b<29?b:Math.min(b,wl(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function Gf(i){return i!=null?(Wf(this,i),r.updateOffset(this,!0),this):mo(this,"Month")}function ON(){return wl(this.year(),this.month())}function LN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Yf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=NN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Yf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=kN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function Yf(){function i(Ee,ke){return ke.length-Ee.length}var d=[],g=[],b=[],D,F,J,fe;for(D=0;D<12;D++)F=y([2e3,D]),J=sn(this.monthsShort(F,"")),fe=sn(this.months(F,"")),d.push(J),g.push(fe),b.push(fe),b.push(J);d.sort(i),g.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function RN(i,d,g,b,D,F,J){var fe;return i<100&&i>=0?(fe=new Date(i+400,d,g,b,D,F,J),isFinite(fe.getFullYear())&&fe.setFullYear(i)):fe=new Date(i,d,g,b,D,F,J),fe}function fo(i){var d,g;return i<100&&i>=0?(g=Array.prototype.slice.call(arguments),g[0]=i+400,d=new Date(Date.UTC.apply(null,g)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ts(i,d,g){var b=7+d-g,D=(7+fo(i,0,b).getUTCDay()-d)%7;return-D+b-1}function Uf(i,d,g,b,D){var F=(7+g-b)%7,J=Ts(i,b,D),fe=1+7*(d-1)+F+J,Ee,ke;return fe<=0?(Ee=i-1,ke=uo(Ee)+fe):fe>uo(i)?(Ee=i+1,ke=fe-uo(i)):(Ee=i,ke=fe),{year:Ee,dayOfYear:ke}}function ho(i,d,g){var b=Ts(i.year(),d,g),D=Math.floor((i.dayOfYear()-b-1)/7)+1,F,J;return D<1?(J=i.year()-1,F=D+cn(J,d,g)):D>cn(i.year(),d,g)?(F=D-cn(i.year(),d,g),J=i.year()+1):(J=i.year(),F=D),{week:F,year:J}}function cn(i,d,g){var b=Ts(i,d,g),D=Ts(i+1,d,g);return(uo(i)-b+D)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),me("w",he,qe),me("ww",he,et),me("W",he,qe),me("WW",he,et),po(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function BN(i){return ho(i,this._week.dow,this._week.doy).week}var AN={dow:0,doy:6};function FN(){return this._week.dow}function VN(){return this._week.doy}function $N(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function KN(i){var d=ho(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),me("d",he),me("e",he),me("E",he),me("dd",function(i,d){return d.weekdaysMinRegex(i)}),me("ddd",function(i,d){return d.weekdaysShortRegex(i)}),me("dddd",function(i,d){return d.weekdaysRegex(i)}),po(["dd","ddd","dddd"],function(i,d,g,b){var D=g._locale.weekdaysParse(i,b,g._strict);D!=null?d.d=D:E(g).invalidWeekday=i}),po(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function HN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function WN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Cl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var GN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),YN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),UN=Te,zN=Te,jN=Te;function qN(i,d){var g=a(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Cl(g,this._week.dow):i?g[i.day()]:g}function JN(i){return i===!0?Cl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function ZN(i){return i===!0?Cl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function XN(i,d,g){var b,D,F,J=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)F=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(F,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(F,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(F,"").toLocaleLowerCase();return g?d==="dddd"?(D=Ze.call(this._weekdaysParse,J),D!==-1?D:null):d==="ddd"?(D=Ze.call(this._shortWeekdaysParse,J),D!==-1?D:null):(D=Ze.call(this._minWeekdaysParse,J),D!==-1?D:null):d==="dddd"?(D=Ze.call(this._weekdaysParse,J),D!==-1||(D=Ze.call(this._shortWeekdaysParse,J),D!==-1)?D:(D=Ze.call(this._minWeekdaysParse,J),D!==-1?D:null)):d==="ddd"?(D=Ze.call(this._shortWeekdaysParse,J),D!==-1||(D=Ze.call(this._weekdaysParse,J),D!==-1)?D:(D=Ze.call(this._minWeekdaysParse,J),D!==-1?D:null)):(D=Ze.call(this._minWeekdaysParse,J),D!==-1||(D=Ze.call(this._weekdaysParse,J),D!==-1)?D:(D=Ze.call(this._shortWeekdaysParse,J),D!==-1?D:null))}function QN(i,d,g){var b,D,F;if(this._weekdaysParseExact)return XN.call(this,i,d,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(D=y([2e3,1]).day(b),g&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(D,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(D,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(D,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(F="^"+this.weekdays(D,"")+"|^"+this.weekdaysShort(D,"")+"|^"+this.weekdaysMin(D,""),this._weekdaysParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(g&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(g&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!g&&this._weekdaysParse[b].test(i))return b}}function ek(i){if(!this.isValid())return i!=null?this:NaN;var d=mo(this,"Day");return i!=null?(i=HN(i,this.localeData()),this.add(i-d,"d")):d}function tk(i){if(!this.isValid())return i!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return i==null?d:this.add(i-d,"d")}function nk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=WN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function rk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=UN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function ok(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Dl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Dl(){function i(bt,fn){return fn.length-bt.length}var d=[],g=[],b=[],D=[],F,J,fe,Ee,ke;for(F=0;F<7;F++)J=y([2e3,1]).day(F),fe=sn(this.weekdaysMin(J,"")),Ee=sn(this.weekdaysShort(J,"")),ke=sn(this.weekdays(J,"")),d.push(fe),g.push(Ee),b.push(ke),D.push(fe),D.push(Ee),D.push(ke);d.sort(i),g.sort(i),b.sort(i),D.sort(i),this._weekdaysRegex=new RegExp("^("+D.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Nl(){return this.hours()%12||12}function ak(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Nl),R("k",["kk",2],0,ak),R("hmm",0,0,function(){return""+Nl.apply(this)+W(this.minutes(),2)}),R("hmmss",0,0,function(){return""+Nl.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)});function jf(i,d){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}jf("a",!0),jf("A",!1);function qf(i,d){return d._meridiemParse}me("a",qf),me("A",qf),me("H",he,Ht),me("h",he,qe),me("k",he,qe),me("HH",he,et),me("hh",he,et),me("kk",he,et),me("hmm",Oe),me("hmmss",lt),me("Hmm",Oe),me("Hmmss",lt),Ke(["H","HH"],tt),Ke(["k","kk"],function(i,d,g){var b=Ce(i);d[tt]=b===24?0:b}),Ke(["a","A"],function(i,d,g){g._isPm=g._locale.isPM(i),g._meridiem=i}),Ke(["h","hh"],function(i,d,g){d[tt]=Ce(i),E(g).bigHour=!0}),Ke("hmm",function(i,d,g){var b=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b)),E(g).bigHour=!0}),Ke("hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D)),E(g).bigHour=!0}),Ke("Hmm",function(i,d,g){var b=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b))}),Ke("Hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[tt]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D))});function ik(i){return(i+"").toLowerCase().charAt(0)==="p"}var lk=/[ap]\.?m?\.?/i,ck=Nr("Hours",!0);function dk(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var Jf={calendar:Z,longDateFormat:de,invalidDate:ae,ordinal:Ae,dayOfMonthOrdinalParse:Je,relativeTime:St,months:DN,monthsShort:Kf,week:AN,weekdays:GN,weekdaysMin:YN,weekdaysShort:zf,meridiemParse:lk},je={},So={},go;function pk(i,d){var g,b=Math.min(i.length,d.length);for(g=0;g<b;g+=1)if(i[g]!==d[g])return g;return b}function Zf(i){return i&&i.toLowerCase().replace("_","-")}function uk(i){for(var d=0,g,b,D,F;d<i.length;){for(F=Zf(i[d]).split("-"),g=F.length,b=Zf(i[d+1]),b=b?b.split("-"):null;g>0;){if(D=Es(F.slice(0,g).join("-")),D)return D;if(b&&b.length>=g&&pk(F,b)>=g-1)break;g--}d++}return go}function mk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Es(i){var d=null,g;if(je[i]===void 0&&e&&e.exports&&mk(i))try{d=go._abbr,g=Zt,g("./locale/"+i),_n(d)}catch{je[i]=null}return je[i]}function _n(i,d){var g;return i&&(m(d)?g=dn(i):g=kl(i,d),g?go=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),go._abbr}function kl(i,d){if(d!==null){var g,b=Jf;if(d.abbr=i,je[i]!=null)q("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."),b=je[i]._config;else if(d.parentLocale!=null)if(je[d.parentLocale]!=null)b=je[d.parentLocale]._config;else if(g=Es(d.parentLocale),g!=null)b=g._config;else return So[d.parentLocale]||(So[d.parentLocale]=[]),So[d.parentLocale].push({name:i,config:d}),null;return je[i]=new te(A(b,d)),So[i]&&So[i].forEach(function(D){kl(D.name,D.config)}),_n(i),je[i]}else return delete je[i],null}function fk(i,d){if(d!=null){var g,b,D=Jf;je[i]!=null&&je[i].parentLocale!=null?je[i].set(A(je[i]._config,d)):(b=Es(i),b!=null&&(D=b._config),d=A(D,d),b==null&&(d.abbr=i),g=new te(d),g.parentLocale=je[i],je[i]=g),_n(i)}else je[i]!=null&&(je[i].parentLocale!=null?(je[i]=je[i].parentLocale,i===_n()&&_n(i)):je[i]!=null&&delete je[i]);return je[i]}function dn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return go;if(!a(i)){if(d=Es(i),d)return d;i=[i]}return uk(i)}function hk(){return $(je)}function Il(i){var d,g=i._a;return g&&E(i).overflow===-2&&(d=g[an]<0||g[an]>11?an:g[Qt]<1||g[Qt]>wl(g[ut],g[an])?Qt:g[tt]<0||g[tt]>24||g[tt]===24&&(g[Wt]!==0||g[ln]!==0||g[tr]!==0)?tt:g[Wt]<0||g[Wt]>59?Wt:g[ln]<0||g[ln]>59?ln:g[tr]<0||g[tr]>999?tr:-1,E(i)._overflowDayOfYear&&(d<ut||d>Qt)&&(d=Qt),E(i)._overflowWeeks&&d===-1&&(d=vN),E(i)._overflowWeekday&&d===-1&&(d=yN),E(i).overflow=d),i}var Sk=/^\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)?)?$/,gk=/^\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)?)?$/,bk=/Z|[+-]\d\d(?::?\d\d)?/,ws=[["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]],xl=[["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/]],vk=/^\/?Date\((-?\d+)/i,yk=/^(?:(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}))$/,Tk={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 Xf(i){var d,g,b=i._i,D=Sk.exec(b)||gk.exec(b),F,J,fe,Ee,ke=ws.length,bt=xl.length;if(D){for(E(i).iso=!0,d=0,g=ke;d<g;d++)if(ws[d][1].exec(D[1])){J=ws[d][0],F=ws[d][2]!==!1;break}if(J==null){i._isValid=!1;return}if(D[3]){for(d=0,g=bt;d<g;d++)if(xl[d][1].exec(D[3])){fe=(D[2]||" ")+xl[d][0];break}if(fe==null){i._isValid=!1;return}}if(!F&&fe!=null){i._isValid=!1;return}if(D[4])if(bk.exec(D[4]))Ee="Z";else{i._isValid=!1;return}i._f=J+(fe||"")+(Ee||""),_l(i)}else i._isValid=!1}function Ek(i,d,g,b,D,F){var J=[wk(i),Kf.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(D,10)];return F&&J.push(parseInt(F,10)),J}function wk(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Ck(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dk(i,d,g){if(i){var b=zf.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return E(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function Nk(i,d,g){if(i)return Tk[i];if(d)return 0;var b=parseInt(g,10),D=b%100,F=(b-D)/100;return F*60+D}function Qf(i){var d=yk.exec(Ck(i._i)),g;if(d){if(g=Ek(d[4],d[3],d[2],d[5],d[6],d[7]),!Dk(d[1],g,i))return;i._a=g,i._tzm=Nk(d[8],d[9],d[10]),i._d=fo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),E(i).rfc2822=!0}else i._isValid=!1}function kk(i){var d=vk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(Xf(i),i._isValid===!1)delete i._isValid;else return;if(Qf(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=L("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(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function kr(i,d,g){return i??d??g}function Ik(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Ml(i){var d,g,b=[],D,F,J;if(!i._d){for(D=Ik(i),i._w&&i._a[Qt]==null&&i._a[an]==null&&xk(i),i._dayOfYear!=null&&(J=kr(i._a[ut],D[ut]),(i._dayOfYear>uo(J)||i._dayOfYear===0)&&(E(i)._overflowDayOfYear=!0),g=fo(J,0,i._dayOfYear),i._a[an]=g.getUTCMonth(),i._a[Qt]=g.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=D[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[tt]===24&&i._a[Wt]===0&&i._a[ln]===0&&i._a[tr]===0&&(i._nextDay=!0,i._a[tt]=0),i._d=(i._useUTC?fo:RN).apply(null,b),F=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[tt]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(E(i).weekdayMismatch=!0)}}function xk(i){var d,g,b,D,F,J,fe,Ee,ke;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,J=4,g=kr(d.GG,i._a[ut],ho(Ye(),1,4).year),b=kr(d.W,1),D=kr(d.E,1),(D<1||D>7)&&(Ee=!0)):(F=i._locale._week.dow,J=i._locale._week.doy,ke=ho(Ye(),F,J),g=kr(d.gg,i._a[ut],ke.year),b=kr(d.w,ke.week),d.d!=null?(D=d.d,(D<0||D>6)&&(Ee=!0)):d.e!=null?(D=d.e+F,(d.e<0||d.e>6)&&(Ee=!0)):D=F),b<1||b>cn(g,F,J)?E(i)._overflowWeeks=!0:Ee!=null?E(i)._overflowWeekday=!0:(fe=Uf(g,b,D,F,J),i._a[ut]=fe.year,i._dayOfYear=fe.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function _l(i){if(i._f===r.ISO_8601){Xf(i);return}if(i._f===r.RFC_2822){Qf(i);return}i._a=[],E(i).empty=!0;var d=""+i._i,g,b,D,F,J,fe=d.length,Ee=0,ke,bt;for(D=le(i._f,i._locale).match(z)||[],bt=D.length,g=0;g<bt;g++)F=D[g],b=(d.match(SN(F,i))||[])[0],b&&(J=d.substr(0,d.indexOf(b)),J.length>0&&E(i).unusedInput.push(J),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),U[F]?(b?E(i).empty=!1:E(i).unusedTokens.push(F),bN(F,b,i)):i._strict&&!b&&E(i).unusedTokens.push(F);E(i).charsLeftOver=fe-Ee,d.length>0&&E(i).unusedInput.push(d),i._a[tt]<=12&&E(i).bigHour===!0&&i._a[tt]>0&&(E(i).bigHour=void 0),E(i).parsedDateParts=i._a.slice(0),E(i).meridiem=i._meridiem,i._a[tt]=Mk(i._locale,i._a[tt],i._meridiem),ke=E(i).era,ke!==null&&(i._a[ut]=i._locale.erasConvertYear(ke,i._a[ut])),Ml(i),Il(i)}function Mk(i,d,g){var b;return g==null?d:i.meridiemHour!=null?i.meridiemHour(d,g):(i.isPM!=null&&(b=i.isPM(g),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function _k(i){var d,g,b,D,F,J,fe=!1,Ee=i._f.length;if(Ee===0){E(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Ee;D++)F=0,J=!1,d=V({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],_l(d),N(d)&&(J=!0),F+=E(d).charsLeftOver,F+=E(d).unusedTokens.length*10,E(d).score=F,fe?F<b&&(b=F,g=d):(b==null||F<b||J)&&(b=F,g=d,J&&(fe=!0));S(i,g||d)}function Ok(i){if(!i._d){var d=ye(i._i),g=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,g,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Ml(i)}}function Lk(i){var d=new B(Il(eh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function eh(i){var d=i._i,g=i._f;return i._locale=i._locale||dn(i._l),d===null||g===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),C(d)?new B(Il(d)):(u(d)?i._d=d:a(g)?_k(i):g?_l(i):Pk(i),N(i)||(i._d=null),i))}function Pk(i){var d=i._i;m(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?kk(i):a(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Ml(i)):l(d)?Ok(i):f(d)?i._d=new Date(d):r.createFromInputFallback(i)}function th(i,d,g,b,D){var F={};return(d===!0||d===!1)&&(b=d,d=void 0),(g===!0||g===!1)&&(b=g,g=void 0),(l(i)&&p(i)||a(i)&&i.length===0)&&(i=void 0),F._isAMomentObject=!0,F._useUTC=F._isUTC=D,F._l=g,F._i=i,F._f=d,F._strict=b,Lk(F)}function Ye(i,d,g,b){return th(i,d,g,b,!1)}var Rk=L("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),Bk=L("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function nh(i,d){var g,b;if(d.length===1&&a(d[0])&&(d=d[0]),!d.length)return Ye();for(g=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](g))&&(g=d[b]);return g}function Ak(){var i=[].slice.call(arguments,0);return nh("isBefore",i)}function Fk(){var i=[].slice.call(arguments,0);return nh("isAfter",i)}var Vk=function(){return Date.now?Date.now():+new Date},bo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $k(i){var d,g=!1,b,D=bo.length;for(d in i)if(c(i,d)&&!(Ze.call(bo,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<D;++b)if(i[bo[b]]){if(g)return!1;parseFloat(i[bo[b]])!==Ce(i[bo[b]])&&(g=!0)}return!0}function Kk(){return this._isValid}function Hk(){return Gt(NaN)}function Cs(i){var d=ye(i),g=d.year||0,b=d.quarter||0,D=d.month||0,F=d.week||d.isoWeek||0,J=d.day||0,fe=d.hour||0,Ee=d.minute||0,ke=d.second||0,bt=d.millisecond||0;this._isValid=$k(d),this._milliseconds=+bt+ke*1e3+Ee*6e4+fe*1e3*60*60,this._days=+J+F*7,this._months=+D+b*3+g*12,this._data={},this._locale=dn(),this._bubble()}function Ds(i){return i instanceof Cs}function Ol(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Wk(i,d,g){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),F=0,J;for(J=0;J<b;J++)Ce(i[J])!==Ce(d[J])&&F++;return F+D}function rh(i,d){R(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+W(~~(g/60),2)+d+W(~~g%60,2)})}rh("Z",":"),rh("ZZ",""),me("Z",Kt),me("ZZ",Kt),Ke(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Ll(Kt,i)});var Gk=/([\+\-]|\d\d)/gi;function Ll(i,d){var g=(d||"").match(i),b,D,F;return g===null?null:(b=g[g.length-1]||[],D=(b+"").match(Gk)||["-",0,0],F=+(D[1]*60)+Ce(D[2]),F===0?0:D[0]==="+"?F:-F)}function Pl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(C(i)||u(i)?i.valueOf():Ye(i).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+b),r.updateOffset(g,!1),g):Ye(i).local()}function Rl(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function Yk(i,d,g){var b=this._offset||0,D;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Ll(Kt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(D=Rl(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?ih(this,Gt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Rl(this)}function Uk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function zk(i){return this.utcOffset(0,i)}function jk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Rl(this),"m")),this}function qk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Ll(Qn,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Jk(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Zk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xk(){if(!m(this._isDSTShifted))return this._isDSTShifted;var i={},d;return V(i,this),i=eh(i),i._a?(d=i._isUTC?y(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Wk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Qk(){return this.isValid()?!this._isUTC:!1}function eI(){return this.isValid()?this._isUTC:!1}function oh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var tI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Gt(i,d){var g=i,b=null,D,F,J;return Ds(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=tI.exec(i))?(D=b[1]==="-"?-1:1,g={y:0,d:Ce(b[Qt])*D,h:Ce(b[tt])*D,m:Ce(b[Wt])*D,s:Ce(b[ln])*D,ms:Ce(Ol(b[tr]*1e3))*D}):(b=nI.exec(i))?(D=b[1]==="-"?-1:1,g={y:nr(b[2],D),M:nr(b[3],D),w:nr(b[4],D),d:nr(b[5],D),h:nr(b[6],D),m:nr(b[7],D),s:nr(b[8],D)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(J=rI(Ye(g.from),Ye(g.to)),g={},g.ms=J.milliseconds,g.M=J.months),F=new Cs(g),Ds(i)&&c(i,"_locale")&&(F._locale=i._locale),Ds(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}Gt.fn=Cs.prototype,Gt.invalid=Hk;function nr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function sh(i,d){var g={};return g.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(g.months,"M").isAfter(d)&&--g.months,g.milliseconds=+d-+i.clone().add(g.months,"M"),g}function rI(i,d){var g;return i.isValid()&&d.isValid()?(d=Pl(d,i),i.isBefore(d)?g=sh(i,d):(g=sh(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function ah(i,d){return function(g,b){var D,F;return b!==null&&!isNaN(+b)&&(q(d,"moment()."+d+"(period, number) is deprecated. Please use moment()."+d+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),F=g,g=b,b=F),D=Gt(g,b),ih(this,D,i),this}}function ih(i,d,g,b){var D=d._milliseconds,F=Ol(d._days),J=Ol(d._months);i.isValid()&&(b=b??!0,J&&Wf(i,mo(i,"Month")+J*g),F&&$f(i,"Date",mo(i,"Date")+F*g),D&&i._d.setTime(i._d.valueOf()+D*g),b&&r.updateOffset(i,F||J))}var oI=ah(1,"add"),sI=ah(-1,"subtract");function lh(i){return typeof i=="string"||i instanceof String}function aI(i){return C(i)||u(i)||lh(i)||f(i)||lI(i)||iI(i)||i===null||i===void 0}function iI(i){var d=l(i)&&!p(i),g=!1,b=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],D,F,J=b.length;for(D=0;D<J;D+=1)F=b[D],g=g||c(i,F);return d&&g}function lI(i){var d=a(i),g=!1;return d&&(g=i.filter(function(b){return!f(b)&&lh(i)}).length===0),d&&g}function cI(i){var d=l(i)&&!p(i),g=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],D,F;for(D=0;D<b.length;D+=1)F=b[D],g=g||c(i,F);return d&&g}function dI(i,d){var g=i.diff(d,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function pI(i,d){arguments.length===1&&(arguments[0]?aI(arguments[0])?(i=arguments[0],d=void 0):cI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||Ye(),b=Pl(g,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",F=d&&(_(d[D])?d[D].call(this,g):d[D]);return this.format(F||this.localeData().calendar(D,this,Ye(g)))}function uI(){return new B(this)}function mI(i,d){var g=C(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=De(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function fI(i,d){var g=C(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=De(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function hI(i,d,g,b){var D=C(i)?i:Ye(i),F=C(d)?d:Ye(d);return this.isValid()&&D.isValid()&&F.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(D,g):!this.isBefore(D,g))&&(b[1]===")"?this.isBefore(F,g):!this.isAfter(F,g))):!1}function SI(i,d){var g=C(i)?i:Ye(i),b;return this.isValid()&&g.isValid()?(d=De(d)||"millisecond",d==="millisecond"?this.valueOf()===g.valueOf():(b=g.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function gI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function bI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function vI(i,d,g){var b,D,F;if(!this.isValid())return NaN;if(b=Pl(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=De(d),d){case"year":F=Ns(this,b)/12;break;case"month":F=Ns(this,b);break;case"quarter":F=Ns(this,b)/3;break;case"second":F=(this-b)/1e3;break;case"minute":F=(this-b)/6e4;break;case"hour":F=(this-b)/36e5;break;case"day":F=(this-b-D)/864e5;break;case"week":F=(this-b-D)/6048e5;break;default:F=this-b}return g?F:Rt(F)}function Ns(i,d){if(i.date()<d.date())return-Ns(d,i);var g=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(g,"months"),D,F;return d-b<0?(D=i.clone().add(g-1,"months"),F=(d-b)/(b-D)):(D=i.clone().add(g+1,"months"),F=(d-b)/(D-b)),-(g+F)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function yI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function TI(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?oe(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",oe(g,"Z")):oe(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function EI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",g,b,D,F;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),g="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",D="-MM-DD[T]HH:mm:ss.SSS",F=d+'[")]',this.format(g+b+D+F)}function wI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=oe(this,i);return this.localeData().postformat(d)}function CI(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ye(i).isValid())?Gt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function DI(i){return this.from(Ye(),i)}function NI(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ye(i).isValid())?Gt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function kI(i){return this.to(Ye(),i)}function ch(i){var d;return i===void 0?this._locale._abbr:(d=dn(i),d!=null&&(this._locale=d),this)}var dh=L("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function ph(){return this._locale}var ks=1e3,Ir=60*ks,Is=60*Ir,uh=(365*400+97)*24*Is;function xr(i,d){return(i%d+d)%d}function mh(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-uh:new Date(i,d,g).valueOf()}function fh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-uh:Date.UTC(i,d,g)}function II(i){var d,g;if(i=De(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?fh:mh,i){case"year":d=g(this.year(),0,1);break;case"quarter":d=g(this.year(),this.month()-this.month()%3,1);break;case"month":d=g(this.year(),this.month(),1);break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=g(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=xr(d+(this._isUTC?0:this.utcOffset()*Ir),Is);break;case"minute":d=this._d.valueOf(),d-=xr(d,Ir);break;case"second":d=this._d.valueOf(),d-=xr(d,ks);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function xI(i){var d,g;if(i=De(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?fh:mh,i){case"year":d=g(this.year()+1,0,1)-1;break;case"quarter":d=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=g(this.year(),this.month()+1,1)-1;break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Is-xr(d+(this._isUTC?0:this.utcOffset()*Ir),Is)-1;break;case"minute":d=this._d.valueOf(),d+=Ir-xr(d,Ir)-1;break;case"second":d=this._d.valueOf(),d+=ks-xr(d,ks)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function MI(){return this._d.valueOf()-(this._offset||0)*6e4}function _I(){return Math.floor(this.valueOf()/1e3)}function OI(){return new Date(this.valueOf())}function LI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function PI(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function RI(){return this.isValid()?this.toISOString():null}function BI(){return N(this)}function AI(){return S({},E(this))}function FI(){return E(this).overflow}function VI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),me("N",Bl),me("NN",Bl),me("NNN",Bl),me("NNNN",JI),me("NNNNN",ZI),Ke(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var D=g._locale.erasParse(i,b,g._strict);D?E(g).era=D:E(g).invalidEra=i}),me("y",Be),me("yy",Be),me("yyy",Be),me("yyyy",Be),me("yo",XI),Ke(["y","yy","yyy","yyyy"],ut),Ke(["yo"],function(i,d,g,b){var D;g._locale._eraYearOrdinalRegex&&(D=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[ut]=g._locale.eraYearOrdinalParse(i,D):d[ut]=parseInt(i,10)});function $I(i,d){var g,b,D,F=this._eras||dn("en")._eras;for(g=0,b=F.length;g<b;++g){switch(typeof F[g].since){case"string":D=r(F[g].since).startOf("day"),F[g].since=D.valueOf();break}switch(typeof F[g].until){case"undefined":F[g].until=1/0;break;case"string":D=r(F[g].until).startOf("day").valueOf(),F[g].until=D.valueOf();break}}return F}function KI(i,d,g){var b,D,F=this.eras(),J,fe,Ee;for(i=i.toUpperCase(),b=0,D=F.length;b<D;++b)if(J=F[b].name.toUpperCase(),fe=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(fe===i)return F[b];break;case"NNNN":if(J===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([J,fe,Ee].indexOf(i)>=0)return F[b]}function HI(i,d){var g=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*g}function WI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].name;return""}function GI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].narrow;return""}function YI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].abbr;return""}function UI(){var i,d,g,b,D=this.localeData().eras();for(i=0,d=D.length;i<d;++i)if(g=D[i].since<=D[i].until?1:-1,b=this.clone().startOf("day").valueOf(),D[i].since<=b&&b<=D[i].until||D[i].until<=b&&b<=D[i].since)return(this.year()-r(D[i].since).year())*g+D[i].offset;return this.year()}function zI(i){return c(this,"_erasNameRegex")||Al.call(this),i?this._erasNameRegex:this._erasRegex}function jI(i){return c(this,"_erasAbbrRegex")||Al.call(this),i?this._erasAbbrRegex:this._erasRegex}function qI(i){return c(this,"_erasNarrowRegex")||Al.call(this),i?this._erasNarrowRegex:this._erasRegex}function Bl(i,d){return d.erasAbbrRegex(i)}function JI(i,d){return d.erasNameRegex(i)}function ZI(i,d){return d.erasNarrowRegex(i)}function XI(i,d){return d._eraYearOrdinalRegex||Be}function Al(){var i=[],d=[],g=[],b=[],D,F,J,fe,Ee,ke=this.eras();for(D=0,F=ke.length;D<F;++D)J=sn(ke[D].name),fe=sn(ke[D].abbr),Ee=sn(ke[D].narrow),d.push(J),i.push(fe),g.push(Ee),b.push(J),b.push(fe),b.push(Ee);this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+g.join("|")+")","i")}R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xs(i,d){R(0,[i,i.length],0,d)}xs("gggg","weekYear"),xs("ggggg","weekYear"),xs("GGGG","isoWeekYear"),xs("GGGGG","isoWeekYear"),me("G",ct),me("g",ct),me("GG",he,et),me("gg",he,et),me("GGGG",gt,Mn),me("gggg",gt,Mn),me("GGGGG",Et,ue),me("ggggg",Et,ue),po(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),po(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function QI(i){return hh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ex(i){return hh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function tx(){return cn(this.year(),1,4)}function nx(){return cn(this.isoWeekYear(),1,4)}function rx(){var i=this.localeData()._week;return cn(this.year(),i.dow,i.doy)}function ox(){var i=this.localeData()._week;return cn(this.weekYear(),i.dow,i.doy)}function hh(i,d,g,b,D){var F;return i==null?ho(this,b,D).year:(F=cn(i,b,D),d>F&&(d=F),sx.call(this,i,d,g,b,D))}function sx(i,d,g,b,D){var F=Uf(i,d,g,b,D),J=fo(F.year,0,F.dayOfYear);return this.year(J.getUTCFullYear()),this.month(J.getUTCMonth()),this.date(J.getUTCDate()),this}R("Q",0,"Qo","quarter"),me("Q",$e),Ke("Q",function(i,d){d[an]=(Ce(i)-1)*3});function ax(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),me("D",he,qe),me("DD",he,et),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Ke(["D","DD"],Qt),Ke("Do",function(i,d){d[Qt]=Ce(i.match(he)[0])});var Sh=Nr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ne),me("DDDD",Xt),Ke(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function ix(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}R("m",["mm",2],0,"minute"),me("m",he,Ht),me("mm",he,et),Ke(["m","mm"],Wt);var lx=Nr("Minutes",!1);R("s",["ss",2],0,"second"),me("s",he,Ht),me("ss",he,et),Ke(["s","ss"],ln);var cx=Nr("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ne,$e),me("SS",Ne,et),me("SSS",Ne,Xt);var On,gh;for(On="SSSS";On.length<=9;On+="S")me(On,Be);function dx(i,d){d[tr]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ke(On,dx);gh=Nr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function px(){return this._isUTC?"UTC":""}function ux(){return this._isUTC?"Coordinated Universal Time":""}var ce=B.prototype;ce.add=oI,ce.calendar=pI,ce.clone=uI,ce.diff=vI,ce.endOf=xI,ce.format=wI,ce.from=CI,ce.fromNow=DI,ce.to=NI,ce.toNow=kI,ce.get=EN,ce.invalidAt=FI,ce.isAfter=mI,ce.isBefore=fI,ce.isBetween=hI,ce.isSame=SI,ce.isSameOrAfter=gI,ce.isSameOrBefore=bI,ce.isValid=BI,ce.lang=dh,ce.locale=ch,ce.localeData=ph,ce.max=Bk,ce.min=Rk,ce.parsingFlags=AI,ce.set=wN,ce.startOf=II,ce.subtract=sI,ce.toArray=LI,ce.toObject=PI,ce.toDate=OI,ce.toISOString=TI,ce.inspect=EI,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=RI,ce.toString=yI,ce.unix=_I,ce.valueOf=MI,ce.creationData=VI,ce.eraName=WI,ce.eraNarrow=GI,ce.eraAbbr=YI,ce.eraYear=UI,ce.year=Vf,ce.isLeapYear=TN,ce.weekYear=QI,ce.isoWeekYear=ex,ce.quarter=ce.quarters=ax,ce.month=Gf,ce.daysInMonth=ON,ce.week=ce.weeks=$N,ce.isoWeek=ce.isoWeeks=KN,ce.weeksInYear=rx,ce.weeksInWeekYear=ox,ce.isoWeeksInYear=tx,ce.isoWeeksInISOWeekYear=nx,ce.date=Sh,ce.day=ce.days=ek,ce.weekday=tk,ce.isoWeekday=nk,ce.dayOfYear=ix,ce.hour=ce.hours=ck,ce.minute=ce.minutes=lx,ce.second=ce.seconds=cx,ce.millisecond=ce.milliseconds=gh,ce.utcOffset=Yk,ce.utc=zk,ce.local=jk,ce.parseZone=qk,ce.hasAlignedHourOffset=Jk,ce.isDST=Zk,ce.isLocal=Qk,ce.isUtcOffset=eI,ce.isUtc=oh,ce.isUTC=oh,ce.zoneAbbr=px,ce.zoneName=ux,ce.dates=L("dates accessor is deprecated. Use date instead.",Sh),ce.months=L("months accessor is deprecated. Use month instead",Gf),ce.years=L("years accessor is deprecated. Use year instead",Vf),ce.zone=L("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Uk),ce.isDSTShifted=L("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Xk);function mx(i){return Ye(i*1e3)}function fx(){return Ye.apply(null,arguments).parseZone()}function bh(i){return i}var Le=te.prototype;Le.calendar=se,Le.longDateFormat=ie,Le.invalidDate=we,Le.ordinal=dt,Le.preparse=bh,Le.postformat=bh,Le.relativeTime=pt,Le.pastFuture=ge,Le.set=ee,Le.eras=$I,Le.erasParse=KI,Le.erasConvertYear=HI,Le.erasAbbrRegex=jI,Le.erasNameRegex=zI,Le.erasNarrowRegex=qI,Le.months=IN,Le.monthsShort=xN,Le.monthsParse=_N,Le.monthsRegex=PN,Le.monthsShortRegex=LN,Le.week=BN,Le.firstDayOfYear=VN,Le.firstDayOfWeek=FN,Le.weekdays=qN,Le.weekdaysMin=ZN,Le.weekdaysShort=JN,Le.weekdaysParse=QN,Le.weekdaysRegex=rk,Le.weekdaysShortRegex=ok,Le.weekdaysMinRegex=sk,Le.isPM=ik,Le.meridiem=dk;function Ms(i,d,g,b){var D=dn(),F=y().set(b,d);return D[g](F,i)}function vh(i,d,g){if(f(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ms(i,d,g,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Ms(i,b,g,"month");return D}function Fl(i,d,g,b){typeof i=="boolean"?(f(d)&&(g=d,d=void 0),d=d||""):(d=i,g=d,i=!1,f(d)&&(g=d,d=void 0),d=d||"");var D=dn(),F=i?D._week.dow:0,J,fe=[];if(g!=null)return Ms(d,(g+F)%7,b,"day");for(J=0;J<7;J++)fe[J]=Ms(d,(J+F)%7,b,"day");return fe}function hx(i,d){return vh(i,d,"months")}function Sx(i,d){return vh(i,d,"monthsShort")}function gx(i,d,g){return Fl(i,d,g,"weekdays")}function bx(i,d,g){return Fl(i,d,g,"weekdaysShort")}function vx(i,d,g){return Fl(i,d,g,"weekdaysMin")}_n("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(i){var d=i%10,g=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+g}}),r.lang=L("moment.lang is deprecated. Use moment.locale instead.",_n),r.langData=L("moment.langData is deprecated. Use moment.localeData instead.",dn);var pn=Math.abs;function yx(){var i=this._data;return this._milliseconds=pn(this._milliseconds),this._days=pn(this._days),this._months=pn(this._months),i.milliseconds=pn(i.milliseconds),i.seconds=pn(i.seconds),i.minutes=pn(i.minutes),i.hours=pn(i.hours),i.months=pn(i.months),i.years=pn(i.years),this}function yh(i,d,g,b){var D=Gt(d,g);return i._milliseconds+=b*D._milliseconds,i._days+=b*D._days,i._months+=b*D._months,i._bubble()}function Tx(i,d){return yh(this,i,d,1)}function Ex(i,d){return yh(this,i,d,-1)}function Th(i){return i<0?Math.floor(i):Math.ceil(i)}function wx(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,D,F,J,fe,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=Th(Vl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,D=Rt(i/1e3),b.seconds=D%60,F=Rt(D/60),b.minutes=F%60,J=Rt(F/60),b.hours=J%24,d+=Rt(J/24),Ee=Rt(Eh(d)),g+=Ee,d-=Th(Vl(Ee)),fe=Rt(g/12),g%=12,b.days=d,b.months=g,b.years=fe,this}function Eh(i){return i*4800/146097}function Vl(i){return i*146097/4800}function Cx(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=De(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+Eh(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(Vl(this._months)),i){case"week":return d/7+b/6048e5;case"day":return d+b/864e5;case"hour":return d*24+b/36e5;case"minute":return d*1440+b/6e4;case"second":return d*86400+b/1e3;case"millisecond":return Math.floor(d*864e5)+b;default:throw new Error("Unknown unit "+i)}}function un(i){return function(){return this.as(i)}}var wh=un("ms"),Dx=un("s"),Nx=un("m"),kx=un("h"),Ix=un("d"),xx=un("w"),Mx=un("M"),_x=un("Q"),Ox=un("y"),Lx=wh;function Px(){return Gt(this)}function Rx(i){return i=De(i),this.isValid()?this[i+"s"]():NaN}function rr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Bx=rr("milliseconds"),Ax=rr("seconds"),Fx=rr("minutes"),Vx=rr("hours"),$x=rr("days"),Kx=rr("months"),Hx=rr("years");function Wx(){return Rt(this.days()/7)}var mn=Math.round,Mr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gx(i,d,g,b,D){return D.relativeTime(d||1,!!g,i,b)}function Yx(i,d,g,b){var D=Gt(i).abs(),F=mn(D.as("s")),J=mn(D.as("m")),fe=mn(D.as("h")),Ee=mn(D.as("d")),ke=mn(D.as("M")),bt=mn(D.as("w")),fn=mn(D.as("y")),Ln=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||J<=1&&["m"]||J<g.m&&["mm",J]||fe<=1&&["h"]||fe<g.h&&["hh",fe]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Ln=Ln||bt<=1&&["w"]||bt<g.w&&["ww",bt]),Ln=Ln||ke<=1&&["M"]||ke<g.M&&["MM",ke]||fn<=1&&["y"]||["yy",fn],Ln[2]=d,Ln[3]=+i>0,Ln[4]=b,Gx.apply(null,Ln)}function Ux(i){return i===void 0?mn:typeof i=="function"?(mn=i,!0):!1}function zx(i,d){return Mr[i]===void 0?!1:d===void 0?Mr[i]:(Mr[i]=d,i==="s"&&(Mr.ss=d-1),!0)}function jx(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=Mr,D,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},Mr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),F=Yx(this,!g,b,D),g&&(F=D.pastFuture(+this,F)),D.postformat(F)}var $l=Math.abs;function _r(i){return(i>0)-(i<0)||+i}function _s(){if(!this.isValid())return this.localeData().invalidDate();var i=$l(this._milliseconds)/1e3,d=$l(this._days),g=$l(this._months),b,D,F,J,fe=this.asSeconds(),Ee,ke,bt,fn;return fe?(b=Rt(i/60),D=Rt(b/60),i%=60,b%=60,F=Rt(g/12),g%=12,J=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=fe<0?"-":"",ke=_r(this._months)!==_r(fe)?"-":"",bt=_r(this._days)!==_r(fe)?"-":"",fn=_r(this._milliseconds)!==_r(fe)?"-":"",Ee+"P"+(F?ke+F+"Y":"")+(g?ke+g+"M":"")+(d?bt+d+"D":"")+(D||b||i?"T":"")+(D?fn+D+"H":"")+(b?fn+b+"M":"")+(i?fn+J+"S":"")):"P0D"}var xe=Cs.prototype;xe.isValid=Kk,xe.abs=yx,xe.add=Tx,xe.subtract=Ex,xe.as=Cx,xe.asMilliseconds=wh,xe.asSeconds=Dx,xe.asMinutes=Nx,xe.asHours=kx,xe.asDays=Ix,xe.asWeeks=xx,xe.asMonths=Mx,xe.asQuarters=_x,xe.asYears=Ox,xe.valueOf=Lx,xe._bubble=wx,xe.clone=Px,xe.get=Rx,xe.milliseconds=Bx,xe.seconds=Ax,xe.minutes=Fx,xe.hours=Vx,xe.days=$x,xe.weeks=Wx,xe.months=Kx,xe.years=Hx,xe.humanize=jx,xe.toISOString=_s,xe.toString=_s,xe.toJSON=_s,xe.locale=ch,xe.localeData=ph,xe.toIsoString=L("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_s),xe.lang=dh,R("X",0,0,"unix"),R("x",0,0,"valueOf"),me("x",ct),me("X",be),Ke("X",function(i,d,g){g._d=new Date(parseFloat(i)*1e3)}),Ke("x",function(i,d,g){g._d=new Date(Ce(i))});//! moment.js
1978
1978
  return r.version="2.30.1",s(Ye),r.fn=ce,r.min=Ak,r.max=Fk,r.now=Vk,r.utc=y,r.unix=mx,r.months=hx,r.isDate=u,r.locale=_n,r.invalid=M,r.duration=Gt,r.isMoment=C,r.weekdays=gx,r.parseZone=fx,r.localeData=dn,r.isDuration=Ds,r.monthsShort=Sx,r.weekdaysMin=vx,r.defineLocale=kl,r.updateLocale=fk,r.locales=hk,r.weekdaysShort=bx,r.normalizeUnits=De,r.relativeTimeRounding=Ux,r.relativeTimeThreshold=zx,r.calendarFormat=dI,r.prototype=ce,r.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"},r})}(fi)),fi.exports}(function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
1979
1979
  var r=n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(s){var a=s%10,l=~~(s%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return s+l},week:{dow:0,doy:4}});return r})})(),function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
1980
1980
  var r=n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(s){var a=s%10,l=~~(s%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return s+l}});return r})}(),function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
@@ -5387,7 +5387,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
5387
5387
  </>
5388
5388
  );
5389
5389
  }
5390
- `}}}},Sw={captionKey:"string",clearSearchOnBlur:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Ci({action:e,captionKey:t,className:n,clearSearchOnBlur:r,debounce:s,disabled:a,disableSelected:l=!1,comparisonKey:c,formControl:p,formMeta:m,hideSelected:f,id:u,onChange:h,onSearchChange:S,options:y,placeholder:T,tallOptionList:E,textKey:w,unsafelyReplaceClassName:N,value:M,zeroState:I="There are no matching options.",loading:k,filterByTextAndCaptionKey:V,icon:B,maxHeightOptionListPx:C,maxHeightOptionListRem:P,disableOptionsMemoization:L,"data-testid":H,...q}){const _=M??[],ee=m||p,{wrapperId:A,controlId:te}=vt(u,ee),[$,Z]=qt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{S&&S($.searchText)},[$.searchText]);const se=o.useRef(null),W=o.useRef(null),z=o.useRef(null),re=o.useRef(null),ne=o.useRef(null);function U(){r&&Z({searchText:""})}const{showPopup:R,doShowPopup:j,doHidePopup:X}=pr(se,re,U);function oe(){Z({activeTagIndex:null}),j()}function le(){setTimeout(()=>{var ye;(ye=z.current)==null||ye.focus()},0)}function de(ye){if(ne.current&&ne.current.children.length&&typeof ye=="number"){const Ie=ne.current.children[ye],Qe=Ie==null?void 0:Ie.querySelector(".sps-clickable-tag__icon");Qe&&Qe.focus()}}function ie(ye){Z({searchText:""}),ee&&(ee.setValue(ye),ee.markAsDirty()),h&&h(new gn({value:ye}))}function ae(ye){_.indexOf(ye)===-1&&ie([..._,ye]),le()}function we(ye){const Ie=_.filter((Qe,$e)=>$e!==ye);ie(Ie)}function Ae(ye){Z({searchText:ye.target.value})}function Je(ye){var Ie,Qe;if(!a){const $e=!f&&!ye.target.selectionStart&&_&&_.length;switch(ye.key){case"Backspace":if($.activeTagIndex===_.length-1){we($.activeTagIndex),le();return}if($.activeTagIndex!==null){we($.activeTagIndex);return}if($e){ie(_.slice(0,_.length-1));return}break;case"Delete":if($.activeTagIndex!==null){we($.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":ye.preventDefault();break;case"Left":case"ArrowLeft":if($e){$.activeTagIndex===null?(Z({activeTagIndex:_.length-1}),X(),de(_.length-1)):$.activeTagIndex>0&&(Z({activeTagIndex:$.activeTagIndex-1}),X(),de($.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if($.activeTagIndex!==null){$.activeTagIndex===_.length-1?(Z({activeTagIndex:null}),j(),(Ie=z.current)==null||Ie.focus()):(Z({activeTagIndex:$.activeTagIndex+1}),de($.activeTagIndex+1));return}break;case"Tab":X();break;case"Escape":X(),(Qe=z.current)==null||Qe.blur();break}ye.persist(),Z({keyDown:ye})}}function dt(ye){Z({opensUpward:ye})}function St(ye){ie([]),ye.stopPropagation()}function pt(ye){Z({optionIds:new Array(ye).fill("").map((Ie,Qe)=>`${A}-options-option-${Qe}`).join(",")})}const ge=o.useCallback(()=>{Z({searchText:""}),le()},[]),je=Y(N||"sps-multi-select",R&&"sps-multi-select--open",R&&"z-stratum-dropdown",$.opensUpward&&"sps-multi-select--opens-upward",a&&"sps-form-control--disabled",n),De=new Array(_.length).fill(0).map((ye,Ie)=>`${A}_tag-${Ie}`);return o.useEffect(()=>{let ye;return R&&(ye=()=>{X()},window.addEventListener("resize",ye)),()=>{ye&&window.removeEventListener("resize",ye)}},[R]),xo({isOpen:R,rootRef:se}),o.createElement(at,{id:A,className:je,formControl:p,formMeta:m,ref:se,inputRef:z,focusInputOnClick:!0,onKeyDown:Je,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":De[$.activeTagIndex||0],"aria-owns":$.optionIds},o.createElement("div",{className:"sps-text-input",ref:W},o.createElement("div",{className:Y("sps-form-control",_&&!a&&"sps-form-control--clearable")},B&&o.createElement("i",{className:Y("sps-text-input__icon","sps-icon",`sps-icon-${B}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:ne},f?null:_.map((ye,Ie)=>o.createElement(Ar,{id:De[Ie],role:"option",disabled:a,"aria-selected":"true",key:De[Ie],onRemove:()=>we(Ie)},w?ye[w]:ye)),o.createElement("input",{type:"text",ref:z,"data-testid":`${H}__option-list-input`,value:$.searchText,className:"sps-text-input__input",placeholder:_.length===0?T:void 0,id:te,onClick:oe,onChange:Ae,onFocus:oe,onKeyDown:Je,disabled:a,role:"listbox","aria-multiselectable":"true","aria-owns":De.join(" "),...q})),_.length!==0&&!a?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ye=>St(ye)}):null)),o.createElement(Br,{id:`${A}_options`,ref:re,"data-testid":`${H}__option-list`,attachTo:W,captionKey:t,disabledOptions:l?_:null,isOpen:R,comparisonKey:c,keepOpen:!0,keyDown:$.keyDown,options:y,specialAction:e,onOptionSelected:ae,onPositionFlip:dt,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:pt,filterByTextAndCaptionKey:V,searchDebounce:s,search:$.searchText,tall:E,textKey:w,zeroState:I,loading:k,maxHeightPx:C,maxHeightRem:P,disableOptionsMemoization:L,onSpecialActionSelect:ge}))}Object.assign(Ci,{props:Sw,displayName:"SpsMultiSelect"});const $u={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Mulit-Select"),o.createElement("ul",null,o.createElement("li",null,"When a list of predetermined values can be provided and the input allows multiple entries.")),o.createElement("h5",null,"Do Not Use a Multi-Select:"),o.createElement("ul",null,o.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),o.createElement("li",null,"When it is ideal to display all available options without requiring a click. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead.")),o.createElement("h5",null,"Using Multi-Selects in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing"," ",o.createElement(e,{to:"text-inputs"},"Inputs")," in Form Layouts."))},basicMuliSelect:{label:"Basic Multi-Selects",description:"Basic Multi-Selects include a label and dropdown menu including a list of options. The user is allowed to make a single selection.",examples:{basic:{react:v.code`
5390
+ `}}}},Sw={captionKey:"string",clearSearchOnBlur:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Ci({action:e,captionKey:t,className:n,clearSearchOnBlur:r,debounce:s,disabled:a,disableSelected:l=!1,comparisonKey:c,formControl:p,formMeta:m,hideSelected:f,id:u,onChange:h,onSearchChange:S,options:y,placeholder:T,tallOptionList:E,textKey:w,unsafelyReplaceClassName:N,value:M,zeroState:I="There are no matching options.",loading:k,filterByTextAndCaptionKey:V,icon:B,maxHeightOptionListPx:C,maxHeightOptionListRem:P,disableOptionsMemoization:L,"data-testid":H,...q}){const _=M??[],ee=m||p,{wrapperId:A,controlId:te}=vt(u,ee),[$,Z]=qt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{S&&S($.searchText)},[$.searchText]);const se=o.useRef(null),W=o.useRef(null),z=o.useRef(null),re=o.useRef(null),ne=o.useRef(null);function U(){r&&Z({searchText:""})}const{showPopup:R,doShowPopup:j,doHidePopup:X}=pr(se,re,U);function oe(){Z({activeTagIndex:null}),j()}function le(){setTimeout(()=>{var ye;(ye=z.current)==null||ye.focus()},0)}function de(ye){if(ne.current&&ne.current.children.length&&typeof ye=="number"){const Ie=ne.current.children[ye],Qe=Ie==null?void 0:Ie.querySelector(".sps-clickable-tag__icon");Qe&&Qe.focus()}}function ie(ye){Z({searchText:""}),ee&&(ee.setValue(ye),ee.markAsDirty()),h&&h(new gn({value:ye}))}function ae(ye){_.indexOf(ye)===-1&&ie([..._,ye]),le()}function we(ye){const Ie=_.filter((Qe,$e)=>$e!==ye);ie(Ie)}function Ae(ye){Z({searchText:ye.target.value})}function Je(ye){var Ie,Qe;if(!a){const $e=!f&&!ye.target.selectionStart&&_&&_.length;switch(ye.key){case"Backspace":if($.activeTagIndex===_.length-1){we($.activeTagIndex),le();return}if($.activeTagIndex!==null){we($.activeTagIndex);return}if($e){ie(_.slice(0,_.length-1));return}break;case"Delete":if($.activeTagIndex!==null){we($.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":ye.preventDefault();break;case"Left":case"ArrowLeft":if($e){$.activeTagIndex===null?(Z({activeTagIndex:_.length-1}),X(),de(_.length-1)):$.activeTagIndex>0&&(Z({activeTagIndex:$.activeTagIndex-1}),X(),de($.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if($.activeTagIndex!==null){$.activeTagIndex===_.length-1?(Z({activeTagIndex:null}),j(),(Ie=z.current)==null||Ie.focus()):(Z({activeTagIndex:$.activeTagIndex+1}),de($.activeTagIndex+1));return}break;case"Tab":X();break;case"Escape":X(),(Qe=z.current)==null||Qe.blur();break}ye.persist(),Z({keyDown:ye})}}function dt(ye){Z({opensUpward:ye})}function St(ye){ie([]),ye.stopPropagation()}function pt(ye){Z({optionIds:new Array(ye).fill("").map((Ie,Qe)=>`${A}-options-option-${Qe}`).join(",")})}const ge=o.useCallback(()=>{Z({searchText:""}),le()},[]),ze=Y(N||"sps-multi-select",R&&"sps-multi-select--open",R&&"z-stratum-dropdown",$.opensUpward&&"sps-multi-select--opens-upward",a&&"sps-form-control--disabled",n),De=new Array(_.length).fill(0).map((ye,Ie)=>`${A}_tag-${Ie}`);return o.useEffect(()=>{let ye;return R&&(ye=()=>{X()},window.addEventListener("resize",ye)),()=>{ye&&window.removeEventListener("resize",ye)}},[R]),xo({isOpen:R,rootRef:se}),o.createElement(at,{id:A,className:ze,formControl:p,formMeta:m,ref:se,inputRef:z,focusInputOnClick:!0,onKeyDown:Je,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":De[$.activeTagIndex||0],"aria-owns":$.optionIds},o.createElement("div",{className:"sps-text-input",ref:W},o.createElement("div",{className:Y("sps-form-control",_&&!a&&"sps-form-control--clearable")},B&&o.createElement("i",{className:Y("sps-text-input__icon","sps-icon",`sps-icon-${B}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:ne},f?null:_.map((ye,Ie)=>o.createElement(Ar,{id:De[Ie],role:"option",disabled:a,"aria-selected":"true",key:De[Ie],onRemove:()=>we(Ie)},w?ye[w]:ye)),o.createElement("input",{type:"text",ref:z,"data-testid":`${H}__option-list-input`,value:$.searchText,className:"sps-text-input__input",placeholder:_.length===0?T:void 0,id:te,onClick:oe,onChange:Ae,onFocus:oe,onKeyDown:Je,disabled:a,role:"listbox","aria-multiselectable":"true","aria-owns":De.join(" "),...q})),_.length!==0&&!a?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ye=>St(ye)}):null)),o.createElement(Br,{id:`${A}_options`,ref:re,"data-testid":`${H}__option-list`,attachTo:W,captionKey:t,disabledOptions:l?_:null,isOpen:R,comparisonKey:c,keepOpen:!0,keyDown:$.keyDown,options:y,specialAction:e,onOptionSelected:ae,onPositionFlip:dt,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:pt,filterByTextAndCaptionKey:V,searchDebounce:s,search:$.searchText,tall:E,textKey:w,zeroState:I,loading:k,maxHeightPx:C,maxHeightRem:P,disableOptionsMemoization:L,onSpecialActionSelect:ge}))}Object.assign(Ci,{props:Sw,displayName:"SpsMultiSelect"});const $u={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Mulit-Select"),o.createElement("ul",null,o.createElement("li",null,"When a list of predetermined values can be provided and the input allows multiple entries.")),o.createElement("h5",null,"Do Not Use a Multi-Select:"),o.createElement("ul",null,o.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),o.createElement("li",null,"When it is ideal to display all available options without requiring a click. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead.")),o.createElement("h5",null,"Using Multi-Selects in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing"," ",o.createElement(e,{to:"text-inputs"},"Inputs")," in Form Layouts."))},basicMuliSelect:{label:"Basic Multi-Selects",description:"Basic Multi-Selects include a label and dropdown menu including a list of options. The user is allowed to make a single selection.",examples:{basic:{react:v.code`
5391
5391
  import {
5392
5392
  SpsLabel,
5393
5393
  SpsMultiSelect,